Skip to content

Houdini symbol visibility management #957

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jun 18, 2019
Merged
9 changes: 7 additions & 2 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -2461,16 +2461,19 @@ if doConfigure :

houdiniEnvSets = {
"IECORE_NAME" : "IECoreHoudini",
"CXXFLAGS" : dependencyIncludes + [ "$HOUDINI_CXX_FLAGS", "-DMAKING_DSO" ]
}

houdiniEnvAppends = {
"CXXFLAGS" : [
"-isystem", "$GLEW_INCLUDE_PATH",
"-isystem", "$HOUDINI_INCLUDE_PATH",
"-std=$CXXSTD",
"$HOUDINI_CXX_FLAGS",
"-DMAKING_DSO",
"-DIECoreHoudini_EXPORTS",
],
"CPPFLAGS" : [
## \todo: libIECoreHoudini should not use python.
## Remove it from the src and then remove these flags.
pythonEnv["PYTHON_INCLUDE_FLAGS"],
],
"LIBPATH" : [
Expand All @@ -2489,6 +2492,8 @@ houdiniEnvAppends = {
"HoudiniUT",
"HoudiniRAY",
"HoudiniAPPS3",
## \todo: libIECoreHoudini should not use python.
## Remove it from the src and then remove this lib.
"boost_python" + env["BOOST_LIB_SUFFIX"],
"GLEW$GLEW_LIB_SUFFIX"
]
Expand Down
3 changes: 1 addition & 2 deletions config/ie/options
Original file line number Diff line number Diff line change
Expand Up @@ -339,8 +339,7 @@ if targetApp=="houdini" :
USD_LIB_PREFIX = "libpxr_"
WITH_USD_MONOLITHIC = True

HOUDINI_CXX_FLAGS = " ".join( CXXFLAGS + houdiniReg['compilerFlags'] )
# houdini 17.5 suffix openEXR with _sidefx
HOUDINI_CXX_FLAGS = " ".join( houdiniReg['compilerFlags'] )
if distutils.version.LooseVersion(houdiniVersion) >= distutils.version.LooseVersion("17.5") :
ALEMBIC_LIB_SUFFIX = ""

Expand Down
58 changes: 31 additions & 27 deletions include/IECoreHoudini/Convert.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,20 +35,24 @@
#ifndef IE_COREHOUDINI_CONVERT_H
#define IE_COREHOUDINI_CONVERT_H

#include "IECoreHoudini/Export.h"

#include "IECore/Convert.h"
#include "IECore/Data.h"

#include "OpenEXR/ImathColor.h"
#include "OpenEXR/ImathVec.h"
IECORE_PUSH_DEFAULT_VISIBILITY
#include "OpenEXR/ImathBox.h"
#include "OpenEXR/ImathQuat.h"
#include "OpenEXR/ImathMatrix.h"
#include "OpenEXR/ImathColor.h"
#include "OpenEXR/ImathEuler.h"
#include "OpenEXR/ImathMatrix.h"
#include "OpenEXR/ImathQuat.h"
#include "OpenEXR/ImathVec.h"
IECORE_POP_DEFAULT_VISIBILITY

#include "UT/UT_BoundingBox.h"
#include "UT/UT_Color.h"
#include "UT/UT_Matrix4.h"
#include "UT/UT_Vector3.h"
#include "UT/UT_BoundingBox.h"

#include <string>

Expand All @@ -58,70 +62,70 @@ namespace IECore
{

template<>
UT_Vector3 convert( const Imath::V3f &from );
IECOREHOUDINI_API UT_Vector3 convert( const Imath::V3f &from );

template<>
Imath::V3f convert( const UT_Vector3 &from );
IECOREHOUDINI_API Imath::V3f convert( const UT_Vector3 &from );

template<>
UT_Vector3 convert( const Imath::V3d &from );
IECOREHOUDINI_API UT_Vector3 convert( const Imath::V3d &from );

template<>
Imath::V3d convert( const UT_Vector3 &from );
IECOREHOUDINI_API Imath::V3d convert( const UT_Vector3 &from );

template<>
UT_Vector4 convert( const Imath::V3f &from );
IECOREHOUDINI_API UT_Vector4 convert( const Imath::V3f &from );

template<>
Imath::V3f convert( const UT_Vector4 &from );
IECOREHOUDINI_API Imath::V3f convert( const UT_Vector4 &from );

template<>
UT_Vector4 convert( const Imath::V3d &from );
IECOREHOUDINI_API UT_Vector4 convert( const Imath::V3d &from );

template<>
Imath::V3d convert( const UT_Vector4 &from );
IECOREHOUDINI_API Imath::V3d convert( const UT_Vector4 &from );

template<>
Imath::Color3f convert( const UT_Color &from );
IECOREHOUDINI_API Imath::Color3f convert( const UT_Color &from );

template<>
UT_Color convert( const Imath::Color3f &from );
IECOREHOUDINI_API UT_Color convert( const Imath::Color3f &from );

template<>
Imath::Color4f convert( const UT_Color &from );
IECOREHOUDINI_API Imath::Color4f convert( const UT_Color &from );

template<>
UT_Color convert( const Imath::Color4f &from );
IECOREHOUDINI_API UT_Color convert( const Imath::Color4f &from );

template<>
UT_BoundingBox convert( const Imath::Box3f &from );
IECOREHOUDINI_API UT_BoundingBox convert( const Imath::Box3f &from );

template<>
Imath::Box3f convert( const UT_BoundingBox &from );
IECOREHOUDINI_API Imath::Box3f convert( const UT_BoundingBox &from );

template<>
UT_BoundingBox convert( const Imath::Box3d &from );
IECOREHOUDINI_API UT_BoundingBox convert( const Imath::Box3d &from );

template<>
Imath::Box3d convert( const UT_BoundingBox &from );
IECOREHOUDINI_API Imath::Box3d convert( const UT_BoundingBox &from );

template<>
UT_Matrix4T<double> convert( const Imath::M44d &from );
IECOREHOUDINI_API UT_Matrix4T<double> convert( const Imath::M44d &from );

template<>
Imath::M44d convert( const UT_Matrix4T<double> &from );
IECOREHOUDINI_API Imath::M44d convert( const UT_Matrix4T<double> &from );

template<>
Imath::M44f convert( const UT_Matrix4T<double> &from );
IECOREHOUDINI_API Imath::M44f convert( const UT_Matrix4T<double> &from );

template<>
UT_Matrix4T<float> convert( const Imath::M44f &from );
IECOREHOUDINI_API UT_Matrix4T<float> convert( const Imath::M44f &from );

template<>
Imath::M44f convert( const UT_Matrix4T<float> &from );
IECOREHOUDINI_API Imath::M44f convert( const UT_Matrix4T<float> &from );

template<>
Imath::M44d convert( const UT_Matrix4T<float> &from );
IECOREHOUDINI_API Imath::M44d convert( const UT_Matrix4T<float> &from );

} // namespace IECore

Expand Down
13 changes: 8 additions & 5 deletions include/IECoreHoudini/CoreHoudini.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,20 +38,23 @@
#ifndef IECOREHOUDINI_COREHOUDINI_H
#define IECOREHOUDINI_COREHOUDINI_H

#include <string>
#include <vector>

// \todo: libIECoreHoudini should not use python. Move any use case to the IECoreHoudini bindings
#include "boost/python.hpp"

#include "GU/GU_DetailHandle.h"
#include "IECoreHoudini/Export.h"

#include "IECore/Object.h"

#include "GU/GU_DetailHandle.h"

#include <string>
#include <vector>

/// The IECoreHoudini namespace holds all the functionality of libIECoreHoudini.
namespace IECoreHoudini
{

class CoreHoudini
class IECOREHOUDINI_API CoreHoudini
{
public:

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
//////////////////////////////////////////////////////////////////////////
//
// Copyright 2010 Dr D Studios Pty Limited (ACN 127 184 954) (Dr. D Studios),
// its affiliates and/or its licensors.
//
// Copyright (c) 2010-2013, Image Engine Design Inc. All rights reserved.
// Copyright (c) 2019, Image Engine Design Inc. All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are
Expand Down Expand Up @@ -35,47 +32,15 @@
//
//////////////////////////////////////////////////////////////////////////

#ifndef IECOREHOUDINI_FNPARAMETERISEDHOLDER_H
#define IECOREHOUDINI_FNPARAMETERISEDHOLDER_H

#include "OP/OP_Node.h"

#include "IECoreHoudini/NodeHandle.h"
#include "IECoreHoudini/ParameterisedHolderInterface.h"

namespace IECoreHoudini
{

/// \todo: This class is a bit funny. Can this all be moved to the bindings like in IECoreMaya?
class FnParameterisedHolder
{
public :

FnParameterisedHolder( OP_Node *node=0 );
virtual ~FnParameterisedHolder();

bool hasParameterised();

void setParameterised( IECore::RunTimeTypedPtr p );
void setParameterised( const std::string &className, int classVerison, const std::string &seachPathEnvVar );

/// Sets the values of the parameters of the held Parameterised object
/// to reflect the values of the attributes of the node.
/// \todo: add setNodeValues as well
void setParameterisedValues( double time );

IECore::RunTimeTypedPtr getParameterised();

private :

bool hasHolder();
void setHolder( OP_Node *node );
ParameterisedHolderInterface *getHolder( OP_Node *node );

NodeHandle m_handle;
#ifndef IECOREHOUDINI_EXPORT_H
#define IECOREHOUDINI_EXPORT_H

};
#include "IECore/Export.h"

}
#ifdef IECoreHoudini_EXPORTS
#define IECOREHOUDINI_API IECORE_EXPORT
#else
#define IECOREHOUDINI_API IECORE_IMPORT
#endif

#endif // IECOREHOUDINI_FNPARAMETERISEDHOLDER_H
#endif // #ifndef IECOREHOUDINI_EXPORT_H
8 changes: 4 additions & 4 deletions include/IECoreHoudini/FromHoudiniCompoundObjectConverter.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,18 +35,18 @@
#ifndef IECOREHOUDINI_FROMHOUDINICOMPOUNDOBJECTCONVERTER_H
#define IECOREHOUDINI_FROMHOUDINICOMPOUNDOBJECTCONVERTER_H

#include "IECore/Object.h"

#include "IECoreHoudini/TypeIds.h"
#include "IECoreHoudini/FromHoudiniGeometryConverter.h"
#include "IECoreHoudini/TypeIds.h"

#include "IECore/Object.h"

namespace IECoreHoudini
{

/// Converter which converts from a Houdini GU_Detail to an IECore::CompoundObject,
/// maintaining the name mappings of the various GU_CortexPrimitives held by the detail.
/// The converter is exclusive for details that contain GU_CortexPrimitives only.
class FromHoudiniCompoundObjectConverter : public IECoreHoudini::FromHoudiniGeometryConverter
class IECOREHOUDINI_API FromHoudiniCompoundObjectConverter : public IECoreHoudini::FromHoudiniGeometryConverter
{
public :

Expand Down
7 changes: 4 additions & 3 deletions include/IECoreHoudini/FromHoudiniConverter.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,18 @@
#ifndef IE_COREHOUDINI_FROMHOUDINICONVERTER_H
#define IE_COREHOUDINI_FROMHOUDINICONVERTER_H

#include "IECore/ToCoreConverter.h"

#include "IECoreHoudini/Export.h"
#include "IECoreHoudini/TypeIds.h"

#include "IECore/ToCoreConverter.h"

namespace IECoreHoudini
{

/// The FromHoudiniConverter class forms an abstract base class for
/// all classes able to perform some kind of conversion
/// from a Houdini datatype to an IECore datatype.
class FromHoudiniConverter : public IECore::ToCoreConverter
class IECOREHOUDINI_API FromHoudiniConverter : public IECore::ToCoreConverter
{

public :
Expand Down
8 changes: 4 additions & 4 deletions include/IECoreHoudini/FromHoudiniCortexObjectConverter.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,17 +35,17 @@
#ifndef IECOREHOUDINI_FROMHOUDINICORTEXOBJECTCONVERTER_H
#define IECOREHOUDINI_FROMHOUDINICORTEXOBJECTCONVERTER_H

#include "IECore/Object.h"

#include "IECoreHoudini/TypeIds.h"
#include "IECoreHoudini/FromHoudiniGeometryConverter.h"
#include "IECoreHoudini/TypeIds.h"

#include "IECore/Object.h"

namespace IECoreHoudini
{

/// Converter which converts from a Houdini GU_Detail to an IECore::Object. This converter
/// extracts only a single IECore::Object from a single GU_CortexPrimitive in the detail.
class FromHoudiniCortexObjectConverter : public IECoreHoudini::FromHoudiniGeometryConverter
class IECOREHOUDINI_API FromHoudiniCortexObjectConverter : public IECoreHoudini::FromHoudiniGeometryConverter
{
public :

Expand Down
8 changes: 4 additions & 4 deletions include/IECoreHoudini/FromHoudiniCurvesConverter.h
Original file line number Diff line number Diff line change
Expand Up @@ -35,16 +35,16 @@
#ifndef IECOREHOUDINI_FROMHOUDINICURVESCONVERTER_H
#define IECOREHOUDINI_FROMHOUDINICURVESCONVERTER_H

#include "IECoreScene/CurvesPrimitive.h"

#include "IECoreHoudini/TypeIds.h"
#include "IECoreHoudini/FromHoudiniGeometryConverter.h"
#include "IECoreHoudini/TypeIds.h"

#include "IECoreScene/CurvesPrimitive.h"

namespace IECoreHoudini
{

/// Converter which converts from a Houdini GU_Detail to an IECore::CurvesPrimitive.
class FromHoudiniCurvesConverter : public IECoreHoudini::FromHoudiniGeometryConverter
class IECOREHOUDINI_API FromHoudiniCurvesConverter : public IECoreHoudini::FromHoudiniGeometryConverter
{
public :

Expand Down
26 changes: 13 additions & 13 deletions include/IECoreHoudini/FromHoudiniGeometryConverter.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,23 +38,23 @@
#ifndef IECOREHOUDINI_FROMHOUDINIGEOMETRYCONVERTER_H
#define IECOREHOUDINI_FROMHOUDINIGEOMETRYCONVERTER_H

#include "GA/GA_AttributeRef.h"
#include "GU/GU_Detail.h"
#include "GU/GU_DetailHandle.h"
#include "SOP/SOP_Node.h"
#include "UT/UT_StringMMPattern.h"
#include "IECoreHoudini/bindings/FromHoudiniGeometryConverterBinding.h"

#include "IECore/SimpleTypedData.h"
#include "IECore/SimpleTypedParameter.h"
#include "IECore/VectorTypedData.h"
#include "IECore/InternedString.h"
#include "IECoreHoudini/FromHoudiniConverter.h"
#include "IECoreHoudini/TypeIds.h"

#include "IECoreScene/Primitive.h"

#include "IECoreHoudini/TypeIds.h"
#include "IECoreHoudini/FromHoudiniConverter.h"
#include "IECore/InternedString.h"
#include "IECore/SimpleTypedData.h"
#include "IECore/SimpleTypedParameter.h"
#include "IECore/VectorTypedData.h"

#include "IECoreHoudini/bindings/FromHoudiniGeometryConverterBinding.h" // to enable friend declaration for bindFromHoudiniGeometryConverter()
#include "GA/GA_AttributeRef.h"
#include "GU/GU_Detail.h"
#include "GU/GU_DetailHandle.h"
#include "SOP/SOP_Node.h"
#include "UT/UT_StringMMPattern.h"

namespace IECoreHoudini
{
Expand All @@ -64,7 +64,7 @@ IE_CORE_FORWARDDECLARE( FromHoudiniGeometryConverter );
/// The FromHoudiniGeometryConverter class forms a base class for all classes able to perform
/// some kind of conversion from a Houdini GU_Detail to an IECore::Object. The most common use
/// is conversion to an IECore::Primitive, but any Object could be supported.
class FromHoudiniGeometryConverter : public FromHoudiniConverter
class IECOREHOUDINI_API FromHoudiniGeometryConverter : public FromHoudiniConverter
{
public :

Expand Down
Loading