Skip to content

Commit

Permalink
GafferCycles : Refactored python bindings
Browse files Browse the repository at this point in the history
  • Loading branch information
boberfly committed Jul 24, 2024
1 parent 1d753b1 commit 7301e61
Show file tree
Hide file tree
Showing 5 changed files with 539 additions and 371 deletions.
3 changes: 3 additions & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ Improvements
- LightEditor : Values of inherited attributes are now displayed in the Light Editor. These are presented as dimmed "fallback" values.
- LightEditor, RenderPassEditor : Fallback values shown in the history window are displayed with the same dimmed text colour used for fallback values in editor columns.
- EditScope : Filtered the EditScope menu to show only nodes that are active in the relevant context.
- GafferCycles :
- Refactored the python module so that the data needed for binding is all located in IECoreCycles and not dependent on linking with Cycles itself for that data.
- Added `majorVersion` `minorVersion` `patchVersion` and `version` to the python module to easily query the running Cycles version

Fixes
-----
Expand Down
5 changes: 0 additions & 5 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -1361,13 +1361,8 @@ libraries = {
"FRAMEWORKS" : [ "Foundation", "Metal", "IOKit" ],
},
"pythonEnvAppends" : {
"LIBPATH" : [ "$CYCLES_ROOT/lib" ],
"LIBS" : [
"Gaffer", "GafferScene", "GafferDispatch", "GafferBindings", "GafferCycles", "IECoreScene",
"cycles_session", "cycles_scene", "cycles_graph", "cycles_bvh", "cycles_device", "cycles_kernel", "cycles_kernel_osl",
"cycles_integrator", "cycles_util", "cycles_subd", "extern_sky", "extern_cuew",
"OpenImageIO$OIIO_LIB_SUFFIX", "OpenImageIO_Util$OIIO_LIB_SUFFIX", "oslexec$OSL_LIB_SUFFIX", "openvdb$VDB_LIB_SUFFIX",
"oslquery$OSL_LIB_SUFFIX", "Alembic", "osdCPU", "OpenColorIO$OCIO_LIB_SUFFIX", "embree4", "Iex", "openpgl",
],
"CXXFLAGS" : [ systemIncludeArgument, "$CYCLES_ROOT/include" ],
"CPPDEFINES" : cyclesDefines,
Expand Down
20 changes: 16 additions & 4 deletions include/GafferCycles/IECoreCyclesPreview/IECoreCycles.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@

#include "GafferCycles/IECoreCyclesPreview/Export.h"

// Cycles
IECORE_PUSH_DEFAULT_VISIBILITY
#include "device/device.h"
IECORE_POP_DEFAULT_VISIBILITY
#include "IECore/CompoundData.h"

#include <string>

Expand All @@ -64,4 +61,19 @@ IECORECYCLES_API int patchVersion();
/// Returns a string of the form "major.minor.patch"
IECORECYCLES_API const std::string &versionString();

/// Returns all device data (for python bindings)
IECORECYCLES_API const IECore::CompoundData *devices();
/// Returns all node data (for python bindings)
IECORECYCLES_API const IECore::CompoundData *nodes();
/// Returns all shader data (for python bindings)
IECORECYCLES_API const IECore::CompoundData *shaders();
/// Returns all light data (for python bindings)
IECORECYCLES_API const IECore::CompoundData *lights();
/// Returns all pass data (for python bindings)
IECORECYCLES_API const IECore::CompoundData *passes();
/// Returns if OpenImageDenoise has been compiled in Cycles
IECORECYCLES_API bool openImageDenoiseSupported();
/// Returns if OptixDenoise has been compiled in Cycles
IECORECYCLES_API bool optixDenoiseSupported();

}
Loading

0 comments on commit 7301e61

Please sign in to comment.