Skip to content

Commit 7eb1c9b

Browse files
Merge pull request #957 from andrewkaufman/houdiniSymbols
Houdini symbol visibility management
2 parents 6ab8218 + 26177e0 commit 7eb1c9b

File tree

106 files changed

+795
-822
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+795
-822
lines changed

SConstruct

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2461,16 +2461,19 @@ if doConfigure :
24612461

24622462
houdiniEnvSets = {
24632463
"IECORE_NAME" : "IECoreHoudini",
2464-
"CXXFLAGS" : dependencyIncludes + [ "$HOUDINI_CXX_FLAGS", "-DMAKING_DSO" ]
24652464
}
24662465

24672466
houdiniEnvAppends = {
24682467
"CXXFLAGS" : [
24692468
"-isystem", "$GLEW_INCLUDE_PATH",
24702469
"-isystem", "$HOUDINI_INCLUDE_PATH",
2471-
"-std=$CXXSTD",
2470+
"$HOUDINI_CXX_FLAGS",
2471+
"-DMAKING_DSO",
2472+
"-DIECoreHoudini_EXPORTS",
24722473
],
24732474
"CPPFLAGS" : [
2475+
## \todo: libIECoreHoudini should not use python.
2476+
## Remove it from the src and then remove these flags.
24742477
pythonEnv["PYTHON_INCLUDE_FLAGS"],
24752478
],
24762479
"LIBPATH" : [
@@ -2489,6 +2492,8 @@ houdiniEnvAppends = {
24892492
"HoudiniUT",
24902493
"HoudiniRAY",
24912494
"HoudiniAPPS3",
2495+
## \todo: libIECoreHoudini should not use python.
2496+
## Remove it from the src and then remove this lib.
24922497
"boost_python" + env["BOOST_LIB_SUFFIX"],
24932498
"GLEW$GLEW_LIB_SUFFIX"
24942499
]

config/ie/options

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -339,8 +339,7 @@ if targetApp=="houdini" :
339339
USD_LIB_PREFIX = "libpxr_"
340340
WITH_USD_MONOLITHIC = True
341341

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

include/IECoreHoudini/Convert.h

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,24 @@
3535
#ifndef IE_COREHOUDINI_CONVERT_H
3636
#define IE_COREHOUDINI_CONVERT_H
3737

38+
#include "IECoreHoudini/Export.h"
39+
3840
#include "IECore/Convert.h"
3941
#include "IECore/Data.h"
4042

41-
#include "OpenEXR/ImathColor.h"
42-
#include "OpenEXR/ImathVec.h"
43+
IECORE_PUSH_DEFAULT_VISIBILITY
4344
#include "OpenEXR/ImathBox.h"
44-
#include "OpenEXR/ImathQuat.h"
45-
#include "OpenEXR/ImathMatrix.h"
45+
#include "OpenEXR/ImathColor.h"
4646
#include "OpenEXR/ImathEuler.h"
47+
#include "OpenEXR/ImathMatrix.h"
48+
#include "OpenEXR/ImathQuat.h"
49+
#include "OpenEXR/ImathVec.h"
50+
IECORE_POP_DEFAULT_VISIBILITY
4751

52+
#include "UT/UT_BoundingBox.h"
4853
#include "UT/UT_Color.h"
4954
#include "UT/UT_Matrix4.h"
5055
#include "UT/UT_Vector3.h"
51-
#include "UT/UT_BoundingBox.h"
5256

5357
#include <string>
5458

@@ -58,70 +62,70 @@ namespace IECore
5862
{
5963

6064
template<>
61-
UT_Vector3 convert( const Imath::V3f &from );
65+
IECOREHOUDINI_API UT_Vector3 convert( const Imath::V3f &from );
6266

6367
template<>
64-
Imath::V3f convert( const UT_Vector3 &from );
68+
IECOREHOUDINI_API Imath::V3f convert( const UT_Vector3 &from );
6569

6670
template<>
67-
UT_Vector3 convert( const Imath::V3d &from );
71+
IECOREHOUDINI_API UT_Vector3 convert( const Imath::V3d &from );
6872

6973
template<>
70-
Imath::V3d convert( const UT_Vector3 &from );
74+
IECOREHOUDINI_API Imath::V3d convert( const UT_Vector3 &from );
7175

7276
template<>
73-
UT_Vector4 convert( const Imath::V3f &from );
77+
IECOREHOUDINI_API UT_Vector4 convert( const Imath::V3f &from );
7478

7579
template<>
76-
Imath::V3f convert( const UT_Vector4 &from );
80+
IECOREHOUDINI_API Imath::V3f convert( const UT_Vector4 &from );
7781

7882
template<>
79-
UT_Vector4 convert( const Imath::V3d &from );
83+
IECOREHOUDINI_API UT_Vector4 convert( const Imath::V3d &from );
8084

8185
template<>
82-
Imath::V3d convert( const UT_Vector4 &from );
86+
IECOREHOUDINI_API Imath::V3d convert( const UT_Vector4 &from );
8387

8488
template<>
85-
Imath::Color3f convert( const UT_Color &from );
89+
IECOREHOUDINI_API Imath::Color3f convert( const UT_Color &from );
8690

8791
template<>
88-
UT_Color convert( const Imath::Color3f &from );
92+
IECOREHOUDINI_API UT_Color convert( const Imath::Color3f &from );
8993

9094
template<>
91-
Imath::Color4f convert( const UT_Color &from );
95+
IECOREHOUDINI_API Imath::Color4f convert( const UT_Color &from );
9296

9397
template<>
94-
UT_Color convert( const Imath::Color4f &from );
98+
IECOREHOUDINI_API UT_Color convert( const Imath::Color4f &from );
9599

96100
template<>
97-
UT_BoundingBox convert( const Imath::Box3f &from );
101+
IECOREHOUDINI_API UT_BoundingBox convert( const Imath::Box3f &from );
98102

99103
template<>
100-
Imath::Box3f convert( const UT_BoundingBox &from );
104+
IECOREHOUDINI_API Imath::Box3f convert( const UT_BoundingBox &from );
101105

102106
template<>
103-
UT_BoundingBox convert( const Imath::Box3d &from );
107+
IECOREHOUDINI_API UT_BoundingBox convert( const Imath::Box3d &from );
104108

105109
template<>
106-
Imath::Box3d convert( const UT_BoundingBox &from );
110+
IECOREHOUDINI_API Imath::Box3d convert( const UT_BoundingBox &from );
107111

108112
template<>
109-
UT_Matrix4T<double> convert( const Imath::M44d &from );
113+
IECOREHOUDINI_API UT_Matrix4T<double> convert( const Imath::M44d &from );
110114

111115
template<>
112-
Imath::M44d convert( const UT_Matrix4T<double> &from );
116+
IECOREHOUDINI_API Imath::M44d convert( const UT_Matrix4T<double> &from );
113117

114118
template<>
115-
Imath::M44f convert( const UT_Matrix4T<double> &from );
119+
IECOREHOUDINI_API Imath::M44f convert( const UT_Matrix4T<double> &from );
116120

117121
template<>
118-
UT_Matrix4T<float> convert( const Imath::M44f &from );
122+
IECOREHOUDINI_API UT_Matrix4T<float> convert( const Imath::M44f &from );
119123

120124
template<>
121-
Imath::M44f convert( const UT_Matrix4T<float> &from );
125+
IECOREHOUDINI_API Imath::M44f convert( const UT_Matrix4T<float> &from );
122126

123127
template<>
124-
Imath::M44d convert( const UT_Matrix4T<float> &from );
128+
IECOREHOUDINI_API Imath::M44d convert( const UT_Matrix4T<float> &from );
125129

126130
} // namespace IECore
127131

include/IECoreHoudini/CoreHoudini.h

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -38,20 +38,23 @@
3838
#ifndef IECOREHOUDINI_COREHOUDINI_H
3939
#define IECOREHOUDINI_COREHOUDINI_H
4040

41-
#include <string>
42-
#include <vector>
43-
41+
// \todo: libIECoreHoudini should not use python. Move any use case to the IECoreHoudini bindings
4442
#include "boost/python.hpp"
4543

46-
#include "GU/GU_DetailHandle.h"
44+
#include "IECoreHoudini/Export.h"
4745

4846
#include "IECore/Object.h"
4947

48+
#include "GU/GU_DetailHandle.h"
49+
50+
#include <string>
51+
#include <vector>
52+
5053
/// The IECoreHoudini namespace holds all the functionality of libIECoreHoudini.
5154
namespace IECoreHoudini
5255
{
5356

54-
class CoreHoudini
57+
class IECOREHOUDINI_API CoreHoudini
5558
{
5659
public:
5760

Lines changed: 10 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
//////////////////////////////////////////////////////////////////////////
22
//
3-
// Copyright 2010 Dr D Studios Pty Limited (ACN 127 184 954) (Dr. D Studios),
4-
// its affiliates and/or its licensors.
5-
//
6-
// Copyright (c) 2010-2013, Image Engine Design Inc. All rights reserved.
3+
// Copyright (c) 2019, Image Engine Design Inc. All rights reserved.
74
//
85
// Redistribution and use in source and binary forms, with or without
96
// modification, are permitted provided that the following conditions are
@@ -35,47 +32,15 @@
3532
//
3633
//////////////////////////////////////////////////////////////////////////
3734

38-
#ifndef IECOREHOUDINI_FNPARAMETERISEDHOLDER_H
39-
#define IECOREHOUDINI_FNPARAMETERISEDHOLDER_H
40-
41-
#include "OP/OP_Node.h"
42-
43-
#include "IECoreHoudini/NodeHandle.h"
44-
#include "IECoreHoudini/ParameterisedHolderInterface.h"
45-
46-
namespace IECoreHoudini
47-
{
48-
49-
/// \todo: This class is a bit funny. Can this all be moved to the bindings like in IECoreMaya?
50-
class FnParameterisedHolder
51-
{
52-
public :
53-
54-
FnParameterisedHolder( OP_Node *node=0 );
55-
virtual ~FnParameterisedHolder();
56-
57-
bool hasParameterised();
58-
59-
void setParameterised( IECore::RunTimeTypedPtr p );
60-
void setParameterised( const std::string &className, int classVerison, const std::string &seachPathEnvVar );
61-
62-
/// Sets the values of the parameters of the held Parameterised object
63-
/// to reflect the values of the attributes of the node.
64-
/// \todo: add setNodeValues as well
65-
void setParameterisedValues( double time );
66-
67-
IECore::RunTimeTypedPtr getParameterised();
68-
69-
private :
70-
71-
bool hasHolder();
72-
void setHolder( OP_Node *node );
73-
ParameterisedHolderInterface *getHolder( OP_Node *node );
74-
75-
NodeHandle m_handle;
35+
#ifndef IECOREHOUDINI_EXPORT_H
36+
#define IECOREHOUDINI_EXPORT_H
7637

77-
};
38+
#include "IECore/Export.h"
7839

79-
}
40+
#ifdef IECoreHoudini_EXPORTS
41+
#define IECOREHOUDINI_API IECORE_EXPORT
42+
#else
43+
#define IECOREHOUDINI_API IECORE_IMPORT
44+
#endif
8045

81-
#endif // IECOREHOUDINI_FNPARAMETERISEDHOLDER_H
46+
#endif // #ifndef IECOREHOUDINI_EXPORT_H

include/IECoreHoudini/FromHoudiniCompoundObjectConverter.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,18 +35,18 @@
3535
#ifndef IECOREHOUDINI_FROMHOUDINICOMPOUNDOBJECTCONVERTER_H
3636
#define IECOREHOUDINI_FROMHOUDINICOMPOUNDOBJECTCONVERTER_H
3737

38-
#include "IECore/Object.h"
39-
40-
#include "IECoreHoudini/TypeIds.h"
4138
#include "IECoreHoudini/FromHoudiniGeometryConverter.h"
39+
#include "IECoreHoudini/TypeIds.h"
40+
41+
#include "IECore/Object.h"
4242

4343
namespace IECoreHoudini
4444
{
4545

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

include/IECoreHoudini/FromHoudiniConverter.h

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,18 @@
3535
#ifndef IE_COREHOUDINI_FROMHOUDINICONVERTER_H
3636
#define IE_COREHOUDINI_FROMHOUDINICONVERTER_H
3737

38-
#include "IECore/ToCoreConverter.h"
39-
38+
#include "IECoreHoudini/Export.h"
4039
#include "IECoreHoudini/TypeIds.h"
4140

41+
#include "IECore/ToCoreConverter.h"
42+
4243
namespace IECoreHoudini
4344
{
4445

4546
/// The FromHoudiniConverter class forms an abstract base class for
4647
/// all classes able to perform some kind of conversion
4748
/// from a Houdini datatype to an IECore datatype.
48-
class FromHoudiniConverter : public IECore::ToCoreConverter
49+
class IECOREHOUDINI_API FromHoudiniConverter : public IECore::ToCoreConverter
4950
{
5051

5152
public :

include/IECoreHoudini/FromHoudiniCortexObjectConverter.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,17 @@
3535
#ifndef IECOREHOUDINI_FROMHOUDINICORTEXOBJECTCONVERTER_H
3636
#define IECOREHOUDINI_FROMHOUDINICORTEXOBJECTCONVERTER_H
3737

38-
#include "IECore/Object.h"
39-
40-
#include "IECoreHoudini/TypeIds.h"
4138
#include "IECoreHoudini/FromHoudiniGeometryConverter.h"
39+
#include "IECoreHoudini/TypeIds.h"
40+
41+
#include "IECore/Object.h"
4242

4343
namespace IECoreHoudini
4444
{
4545

4646
/// Converter which converts from a Houdini GU_Detail to an IECore::Object. This converter
4747
/// extracts only a single IECore::Object from a single GU_CortexPrimitive in the detail.
48-
class FromHoudiniCortexObjectConverter : public IECoreHoudini::FromHoudiniGeometryConverter
48+
class IECOREHOUDINI_API FromHoudiniCortexObjectConverter : public IECoreHoudini::FromHoudiniGeometryConverter
4949
{
5050
public :
5151

include/IECoreHoudini/FromHoudiniCurvesConverter.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,16 @@
3535
#ifndef IECOREHOUDINI_FROMHOUDINICURVESCONVERTER_H
3636
#define IECOREHOUDINI_FROMHOUDINICURVESCONVERTER_H
3737

38-
#include "IECoreScene/CurvesPrimitive.h"
39-
40-
#include "IECoreHoudini/TypeIds.h"
4138
#include "IECoreHoudini/FromHoudiniGeometryConverter.h"
39+
#include "IECoreHoudini/TypeIds.h"
40+
41+
#include "IECoreScene/CurvesPrimitive.h"
4242

4343
namespace IECoreHoudini
4444
{
4545

4646
/// Converter which converts from a Houdini GU_Detail to an IECore::CurvesPrimitive.
47-
class FromHoudiniCurvesConverter : public IECoreHoudini::FromHoudiniGeometryConverter
47+
class IECOREHOUDINI_API FromHoudiniCurvesConverter : public IECoreHoudini::FromHoudiniGeometryConverter
4848
{
4949
public :
5050

include/IECoreHoudini/FromHoudiniGeometryConverter.h

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -38,23 +38,23 @@
3838
#ifndef IECOREHOUDINI_FROMHOUDINIGEOMETRYCONVERTER_H
3939
#define IECOREHOUDINI_FROMHOUDINIGEOMETRYCONVERTER_H
4040

41-
#include "GA/GA_AttributeRef.h"
42-
#include "GU/GU_Detail.h"
43-
#include "GU/GU_DetailHandle.h"
44-
#include "SOP/SOP_Node.h"
45-
#include "UT/UT_StringMMPattern.h"
41+
#include "IECoreHoudini/bindings/FromHoudiniGeometryConverterBinding.h"
4642

47-
#include "IECore/SimpleTypedData.h"
48-
#include "IECore/SimpleTypedParameter.h"
49-
#include "IECore/VectorTypedData.h"
50-
#include "IECore/InternedString.h"
43+
#include "IECoreHoudini/FromHoudiniConverter.h"
44+
#include "IECoreHoudini/TypeIds.h"
5145

5246
#include "IECoreScene/Primitive.h"
5347

54-
#include "IECoreHoudini/TypeIds.h"
55-
#include "IECoreHoudini/FromHoudiniConverter.h"
48+
#include "IECore/InternedString.h"
49+
#include "IECore/SimpleTypedData.h"
50+
#include "IECore/SimpleTypedParameter.h"
51+
#include "IECore/VectorTypedData.h"
5652

57-
#include "IECoreHoudini/bindings/FromHoudiniGeometryConverterBinding.h" // to enable friend declaration for bindFromHoudiniGeometryConverter()
53+
#include "GA/GA_AttributeRef.h"
54+
#include "GU/GU_Detail.h"
55+
#include "GU/GU_DetailHandle.h"
56+
#include "SOP/SOP_Node.h"
57+
#include "UT/UT_StringMMPattern.h"
5858

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

0 commit comments

Comments
 (0)