Skip to content

Commit

Permalink
GafferCycles : Add version attributes
Browse files Browse the repository at this point in the history
  • Loading branch information
murraystevenson committed Oct 17, 2024
1 parent 2914c72 commit 150ee68
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions Changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ API
- GafferCycles :
- Refactored bindings so they are no longer dependent on linking to Cycles.
- The `devices`, `nodes`, `shaders`, `lights`, and `passes` Python attributes now contain IECore.CompoundData instead of Python dictionaries.
- Added `majorVersion`, `minorVersion`, `patchVersion`, and `version` Python attributes containing the Cycles version.

Breaking Changes
----------------
Expand Down
4 changes: 4 additions & 0 deletions src/GafferCyclesModule/GafferCyclesModule.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,10 @@ BOOST_PYTHON_MODULE( _GafferCycles )

IECoreCycles::init();

scope().attr( "majorVersion" ) = IECoreCycles::majorVersion();
scope().attr( "minorVersion" ) = IECoreCycles::minorVersion();
scope().attr( "patchVersion" ) = IECoreCycles::patchVersion();
scope().attr( "version" ) = IECoreCycles::versionString();
scope().attr( "devices" ) = IECoreCycles::devices()->copy();
scope().attr( "nodes" ) = IECoreCycles::nodes()->copy();
scope().attr( "shaders" ) = IECoreCycles::shaders()->copy();
Expand Down

0 comments on commit 150ee68

Please sign in to comment.