From f4160ff742ee636954b8f7f8cf48b572e77637c4 Mon Sep 17 00:00:00 2001 From: Alan Stanzione Date: Tue, 13 Apr 2021 18:25:09 +0100 Subject: [PATCH] updated readme, cmake and example scene --- README.md | 2 +- examples/scripts/atomsExampleScene.gfr | 116 +++++++--------------- include/AtomsGaffer/AtomsCrowdGenerator.h | 2 +- 3 files changed, 38 insertions(+), 82 deletions(-) diff --git a/README.md b/README.md index 027de56..e8f3f8e 100644 --- a/README.md +++ b/README.md @@ -22,7 +22,7 @@ setenv ATOMS_ROOT setenv ATOMSGAFFER_INSTALL_PREFIX cd atomsGaffer -cmake -DGAFFER_ROOT=$GAFFER_ROOT -DATOMS_ROOT=$ATOMS_ROOT -DCMAKE_CXX_FLAGS='-std=c++11' -DCMAKE_INSTALL_PREFIX=$ATOMSGAFFER_INSTALL_PREFIX . +cmake -DGAFFER_ROOT=$GAFFER_ROOT -DATOMS_ROOT=$ATOMS_ROOT -DCMAKE_CXX_FLAGS='-std=c++14' -DCMAKE_INSTALL_PREFIX=$ATOMSGAFFER_INSTALL_PREFIX . make install -j ) ``` diff --git a/examples/scripts/atomsExampleScene.gfr b/examples/scripts/atomsExampleScene.gfr index 47add3a..273b179 100644 --- a/examples/scripts/atomsExampleScene.gfr +++ b/examples/scripts/atomsExampleScene.gfr @@ -8,21 +8,15 @@ import IECore import imath Gaffer.Metadata.registerValue( parent, "serialiser:milestoneVersion", 0, persistent=False ) -Gaffer.Metadata.registerValue( parent, "serialiser:majorVersion", 53, persistent=False ) -Gaffer.Metadata.registerValue( parent, "serialiser:minorVersion", 0, persistent=False ) +Gaffer.Metadata.registerValue( parent, "serialiser:majorVersion", 59, persistent=False ) +Gaffer.Metadata.registerValue( parent, "serialiser:minorVersion", 4, persistent=False ) Gaffer.Metadata.registerValue( parent, "serialiser:patchVersion", 0, persistent=False ) __children = {} -parent["variables"].addChild( Gaffer.CompoundDataPlug.MemberPlug( "imageCataloguePort", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -parent["variables"]["imageCataloguePort"].addChild( Gaffer.StringPlug( "name", defaultValue = 'image:catalogue:port', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -parent["variables"]["imageCataloguePort"].addChild( Gaffer.IntPlug( "value", defaultValue = 0, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -parent["variables"].addChild( Gaffer.CompoundDataPlug.MemberPlug( "projectName", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -parent["variables"]["projectName"].addChild( Gaffer.StringPlug( "name", defaultValue = 'project:name', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -parent["variables"]["projectName"].addChild( Gaffer.StringPlug( "value", defaultValue = 'default', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -parent["variables"].addChild( Gaffer.CompoundDataPlug.MemberPlug( "projectRootDirectory", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -parent["variables"]["projectRootDirectory"].addChild( Gaffer.StringPlug( "name", defaultValue = 'project:rootDirectory', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -parent["variables"]["projectRootDirectory"].addChild( Gaffer.StringPlug( "value", defaultValue = '$HOME/gaffer/projects/${project:name}', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) +parent["variables"].addChild( Gaffer.NameValuePlug( "image:catalogue:port", Gaffer.IntPlug( "value", defaultValue = 0, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), "imageCataloguePort", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) ) +parent["variables"].addChild( Gaffer.NameValuePlug( "project:name", Gaffer.StringPlug( "value", defaultValue = 'default', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), "projectName", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) ) +parent["variables"].addChild( Gaffer.NameValuePlug( "project:rootDirectory", Gaffer.StringPlug( "value", defaultValue = '$HOME/gaffer/projects/${project:name}', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), "projectRootDirectory", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) ) __children["defaultFormat"] = GafferImage.FormatPlug( "defaultFormat", defaultValue = GafferImage.Format( 1920, 1080, 1.000 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) parent.addChild( __children["defaultFormat"] ) __children["AtomsVariationReader"] = AtomsGaffer.AtomsVariationReader( "AtomsVariationReader" ) @@ -31,9 +25,6 @@ __children["AtomsVariationReader"].addChild( Gaffer.V2fPlug( "__uiPosition", def __children["AtomsCrowdReader"] = AtomsGaffer.AtomsCrowdReader( "AtomsCrowdReader" ) parent.addChild( __children["AtomsCrowdReader"] ) __children["AtomsCrowdReader"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["AtomsCrowdGenerator"] = AtomsGaffer.AtomsCrowdGenerator( "AtomsCrowdGenerator" ) -parent.addChild( __children["AtomsCrowdGenerator"] ) -__children["AtomsCrowdGenerator"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) __children["AtomsCrowdClothReader"] = AtomsGaffer.AtomsCrowdClothReader( "AtomsCrowdClothReader" ) parent.addChild( __children["AtomsCrowdClothReader"] ) __children["AtomsCrowdClothReader"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) @@ -93,21 +84,11 @@ __children["Outputs"]["outputs"]["output1"].addChild( Gaffer.StringPlug( "fileNa __children["Outputs"]["outputs"]["output1"].addChild( Gaffer.StringPlug( "type", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) __children["Outputs"]["outputs"]["output1"].addChild( Gaffer.StringPlug( "data", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) __children["Outputs"]["outputs"]["output1"].addChild( Gaffer.CompoundDataPlug( "parameters", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["Outputs"]["outputs"]["output1"]["parameters"].addChild( Gaffer.CompoundDataPlug.MemberPlug( "displayHost", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["Outputs"]["outputs"]["output1"]["parameters"]["displayHost"].addChild( Gaffer.StringPlug( "name", defaultValue = 'displayHost', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["Outputs"]["outputs"]["output1"]["parameters"]["displayHost"].addChild( Gaffer.StringPlug( "value", defaultValue = 'localhost', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["Outputs"]["outputs"]["output1"]["parameters"].addChild( Gaffer.CompoundDataPlug.MemberPlug( "quantize", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["Outputs"]["outputs"]["output1"]["parameters"]["quantize"].addChild( Gaffer.StringPlug( "name", defaultValue = 'quantize', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["Outputs"]["outputs"]["output1"]["parameters"]["quantize"].addChild( Gaffer.IntVectorDataPlug( "value", defaultValue = IECore.IntVectorData( [ 0, 0, 0, 0 ] ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["Outputs"]["outputs"]["output1"]["parameters"].addChild( Gaffer.CompoundDataPlug.MemberPlug( "driverType", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["Outputs"]["outputs"]["output1"]["parameters"]["driverType"].addChild( Gaffer.StringPlug( "name", defaultValue = 'driverType', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["Outputs"]["outputs"]["output1"]["parameters"]["driverType"].addChild( Gaffer.StringPlug( "value", defaultValue = 'ClientDisplayDriver', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["Outputs"]["outputs"]["output1"]["parameters"].addChild( Gaffer.CompoundDataPlug.MemberPlug( "displayPort", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["Outputs"]["outputs"]["output1"]["parameters"]["displayPort"].addChild( Gaffer.StringPlug( "name", defaultValue = 'displayPort', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["Outputs"]["outputs"]["output1"]["parameters"]["displayPort"].addChild( Gaffer.StringPlug( "value", defaultValue = '${image:catalogue:port}', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["Outputs"]["outputs"]["output1"]["parameters"].addChild( Gaffer.CompoundDataPlug.MemberPlug( "remoteDisplayType", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["Outputs"]["outputs"]["output1"]["parameters"]["remoteDisplayType"].addChild( Gaffer.StringPlug( "name", defaultValue = 'remoteDisplayType', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["Outputs"]["outputs"]["output1"]["parameters"]["remoteDisplayType"].addChild( Gaffer.StringPlug( "value", defaultValue = 'GafferImage::GafferDisplayDriver', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) +__children["Outputs"]["outputs"]["output1"]["parameters"].addChild( Gaffer.NameValuePlug( "displayHost", Gaffer.StringPlug( "value", defaultValue = 'localhost', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), "displayHost", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) ) +__children["Outputs"]["outputs"]["output1"]["parameters"].addChild( Gaffer.NameValuePlug( "quantize", Gaffer.IntVectorDataPlug( "value", defaultValue = IECore.IntVectorData( [ 0, 0, 0, 0 ] ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), "quantize", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) ) +__children["Outputs"]["outputs"]["output1"]["parameters"].addChild( Gaffer.NameValuePlug( "driverType", Gaffer.StringPlug( "value", defaultValue = 'ClientDisplayDriver', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), "driverType", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) ) +__children["Outputs"]["outputs"]["output1"]["parameters"].addChild( Gaffer.NameValuePlug( "displayPort", Gaffer.StringPlug( "value", defaultValue = '${image:catalogue:port}', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), "displayPort", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) ) +__children["Outputs"]["outputs"]["output1"]["parameters"].addChild( Gaffer.NameValuePlug( "remoteDisplayType", Gaffer.StringPlug( "value", defaultValue = 'GafferImage::GafferDisplayDriver', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), "remoteDisplayType", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) ) __children["Outputs"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) __children["InteractiveArnoldRender"] = GafferArnold.InteractiveArnoldRender( "InteractiveArnoldRender" ) parent.addChild( __children["InteractiveArnoldRender"] ) @@ -117,6 +98,7 @@ parent.addChild( __children["Catalogue"] ) __children["Catalogue"]["images"].addChild( GafferImage.Catalogue.Image( "Image", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) __children["Catalogue"]["images"].addChild( GafferImage.Catalogue.Image( "Image1", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) __children["Catalogue"]["images"].addChild( GafferImage.Catalogue.Image( "Image2", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) +__children["Catalogue"]["images"].addChild( GafferImage.Catalogue.Image( "Image3", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) __children["Catalogue"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) __children["ShaderAssignment2"] = GafferScene.ShaderAssignment( "ShaderAssignment2" ) parent.addChild( __children["ShaderAssignment2"] ) @@ -162,10 +144,7 @@ parent.addChild( __children["PathFilter4"] ) __children["PathFilter4"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) __children["AtomsMetadata"] = AtomsGaffer.AtomsMetadata( "AtomsMetadata" ) parent.addChild( __children["AtomsMetadata"] ) -__children["AtomsMetadata"]["metadata"].addChild( Gaffer.CompoundDataPlug.MemberPlug( "member1", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["AtomsMetadata"]["metadata"]["member1"].addChild( Gaffer.StringPlug( "name", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["AtomsMetadata"]["metadata"]["member1"].addChild( Gaffer.StringPlug( "value", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["AtomsMetadata"]["metadata"]["member1"].addChild( Gaffer.BoolPlug( "enabled", defaultValue = True, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) +__children["AtomsMetadata"]["metadata"].addChild( Gaffer.NameValuePlug( "", Gaffer.StringPlug( "value", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), True, "member1", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) ) __children["AtomsMetadata"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) __children["ShaderAssignment5"] = GafferScene.ShaderAssignment( "ShaderAssignment5" ) parent.addChild( __children["ShaderAssignment5"] ) @@ -183,10 +162,7 @@ __children["user_data_rgb"].loadShader( "user_data_rgb" ) __children["user_data_rgb"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) __children["AtomsMetadata1"] = AtomsGaffer.AtomsMetadata( "AtomsMetadata1" ) parent.addChild( __children["AtomsMetadata1"] ) -__children["AtomsMetadata1"]["metadata"].addChild( Gaffer.CompoundDataPlug.MemberPlug( "member1", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["AtomsMetadata1"]["metadata"]["member1"].addChild( Gaffer.StringPlug( "name", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["AtomsMetadata1"]["metadata"]["member1"].addChild( Gaffer.V3fPlug( "value", defaultValue = imath.V3f( 0, 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, interpretation = IECore.GeometricData.Interpretation.Point ) ) -__children["AtomsMetadata1"]["metadata"]["member1"].addChild( Gaffer.BoolPlug( "enabled", defaultValue = True, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) +__children["AtomsMetadata1"]["metadata"].addChild( Gaffer.NameValuePlug( "", Gaffer.V3fPlug( "value", defaultValue = imath.V3f( 0, 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, interpretation = IECore.GeometricData.Interpretation.Point ), True, "member1", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) ) __children["AtomsMetadata1"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) __children["DeleteObject"] = GafferScene.DeleteObject( "DeleteObject" ) parent.addChild( __children["DeleteObject"] ) @@ -196,24 +172,20 @@ parent.addChild( __children["PathFilter6"] ) __children["PathFilter6"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) __children["AtomsMetadata2"] = AtomsGaffer.AtomsMetadata( "AtomsMetadata2" ) parent.addChild( __children["AtomsMetadata2"] ) -__children["AtomsMetadata2"]["metadata"].addChild( Gaffer.CompoundDataPlug.MemberPlug( "member1", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["AtomsMetadata2"]["metadata"]["member1"].addChild( Gaffer.StringPlug( "name", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["AtomsMetadata2"]["metadata"]["member1"].addChild( Gaffer.V3fPlug( "value", defaultValue = imath.V3f( 0, 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, interpretation = IECore.GeometricData.Interpretation.Point ) ) -__children["AtomsMetadata2"]["metadata"]["member1"].addChild( Gaffer.BoolPlug( "enabled", defaultValue = True, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) +__children["AtomsMetadata2"]["metadata"].addChild( Gaffer.NameValuePlug( "", Gaffer.V3fPlug( "value", defaultValue = imath.V3f( 0, 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, interpretation = IECore.GeometricData.Interpretation.Point ), True, "member1", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) ) __children["AtomsMetadata2"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) __children["AtomsMetadata3"] = AtomsGaffer.AtomsMetadata( "AtomsMetadata3" ) parent.addChild( __children["AtomsMetadata3"] ) -__children["AtomsMetadata3"]["metadata"].addChild( Gaffer.CompoundDataPlug.MemberPlug( "member1", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["AtomsMetadata3"]["metadata"]["member1"].addChild( Gaffer.StringPlug( "name", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["AtomsMetadata3"]["metadata"]["member1"].addChild( Gaffer.FloatPlug( "value", defaultValue = 0.0, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["AtomsMetadata3"]["metadata"]["member1"].addChild( Gaffer.BoolPlug( "enabled", defaultValue = True, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["AtomsMetadata3"]["metadata"].addChild( Gaffer.CompoundDataPlug.MemberPlug( "member2", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["AtomsMetadata3"]["metadata"]["member2"].addChild( Gaffer.StringPlug( "name", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["AtomsMetadata3"]["metadata"]["member2"].addChild( Gaffer.FloatPlug( "value", defaultValue = 0.0, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -__children["AtomsMetadata3"]["metadata"]["member2"].addChild( Gaffer.BoolPlug( "enabled", defaultValue = True, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) +__children["AtomsMetadata3"]["metadata"].addChild( Gaffer.NameValuePlug( "", Gaffer.FloatPlug( "value", defaultValue = 0.0, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), True, "member1", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) ) +__children["AtomsMetadata3"]["metadata"].addChild( Gaffer.NameValuePlug( "", Gaffer.FloatPlug( "value", defaultValue = 0.0, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), True, "member2", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) ) __children["AtomsMetadata3"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) -parent["frame"].setValue( 3.0 ) -parent["variables"]["imageCataloguePort"]["value"].setValue( 40547 ) +__children["PathFilter7"] = GafferScene.PathFilter( "PathFilter7" ) +parent.addChild( __children["PathFilter7"] ) +__children["PathFilter7"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) +__children["AtomsCrowdGenerator1"] = AtomsGaffer.AtomsCrowdGenerator( "AtomsCrowdGenerator1" ) +parent.addChild( __children["AtomsCrowdGenerator1"] ) +__children["AtomsCrowdGenerator1"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) ) +parent["variables"]["imageCataloguePort"]["value"].setValue( 42973 ) Gaffer.Metadata.registerValue( parent["variables"]["imageCataloguePort"], 'readOnly', True ) Gaffer.Metadata.registerValue( parent["variables"]["projectName"]["name"], 'readOnly', True ) Gaffer.Metadata.registerValue( parent["variables"]["projectRootDirectory"]["name"], 'readOnly', True ) @@ -221,11 +193,6 @@ __children["AtomsVariationReader"]["atomsVariationFile"].setValue( '${ATOMS_GAFF __children["AtomsVariationReader"]["__uiPosition"].setValue( imath.V2f( 8.67286682, 121.501701 ) ) __children["AtomsCrowdReader"]["atomsSimFile"].setValue( '${ATOMS_GAFFER_ROOT}/examples/assets/atomsRobot/cache/test_sim.atoms' ) __children["AtomsCrowdReader"]["__uiPosition"].setValue( imath.V2f( -27.4776421, 11.9359703 ) ) -__children["AtomsCrowdGenerator"]["in"].setInput( __children["AtomsMetadata2"]["out"] ) -__children["AtomsCrowdGenerator"]["parent"].setValue( '/crowd' ) -__children["AtomsCrowdGenerator"]["variations"].setInput( __children["ShaderAssignment5"]["out"] ) -__children["AtomsCrowdGenerator"]["clothCache"].setInput( __children["AtomsCrowdClothReader"]["out"] ) -__children["AtomsCrowdGenerator"]["__uiPosition"].setValue( imath.V2f( 8.67286873, -29.3415184 ) ) __children["AtomsCrowdClothReader"]["in"].setInput( __children["AtomsCrowdReader"]["out"] ) __children["AtomsCrowdClothReader"]["atomsClothFile"].setValue( '${ATOMS_GAFFER_ROOT}/examples/assets/atomsRobot/cloth_cache/cloth_sim.clothcache' ) __children["AtomsCrowdClothReader"]["__uiPosition"].setValue( imath.V2f( 18.8750935, -15.4387569 ) ) @@ -234,9 +201,6 @@ __children["ShaderAssignment"]["filter"].setInput( __children["PathFilter"]["out __children["ShaderAssignment"]["shader"].setInput( __children["robot1_material"]["out"] ) __children["ShaderAssignment"]["__uiPosition"].setValue( imath.V2f( 8.66736221, 107.713287 ) ) __children["robot1_material"]["parameters"]["base_color"].setInput( __children["image"]["out"] ) -__children["robot1_material"]["parameters"]["base_color"]["r"].setInput( __children["image"]["out"]["r"] ) -__children["robot1_material"]["parameters"]["base_color"]["g"].setInput( __children["image"]["out"]["g"] ) -__children["robot1_material"]["parameters"]["base_color"]["b"].setInput( __children["image"]["out"]["b"] ) __children["robot1_material"]["__uiPosition"].setValue( imath.V2f( -8.01374531, 107.712708 ) ) __children["image"]["parameters"]["filename"].setValue( '${ATOMS_GAFFER_ROOT}/examples/assets/atomsRobot/preview/atomsRobot/robot1_material_diff.jpg' ) __children["image"]["__uiPosition"].setValue( imath.V2f( -21.0827217, 112.51236 ) ) @@ -247,17 +211,14 @@ __children["ShaderAssignment1"]["filter"].setInput( __children["PathFilter1"]["o __children["ShaderAssignment1"]["shader"].setInput( __children["robot2_material"]["out"] ) __children["ShaderAssignment1"]["__uiPosition"].setValue( imath.V2f( 8.65846252, 88.6374054 ) ) __children["robot2_material"]["parameters"]["base_color"].setInput( __children["image1"]["out"] ) -__children["robot2_material"]["parameters"]["base_color"]["r"].setInput( __children["image1"]["out"]["r"] ) -__children["robot2_material"]["parameters"]["base_color"]["g"].setInput( __children["image1"]["out"]["g"] ) -__children["robot2_material"]["parameters"]["base_color"]["b"].setInput( __children["image1"]["out"]["b"] ) __children["robot2_material"]["__uiPosition"].setValue( imath.V2f( -8.34950352, 88.6360016 ) ) __children["image1"]["parameters"]["filename"].setValue( '${ATOMS_GAFFER_ROOT}/examples/assets/atomsRobot/preview/atomsRobot/robot2_material_diff.jpg' ) __children["image1"]["__uiPosition"].setValue( imath.V2f( -21.7571201, 93.4352722 ) ) __children["PathFilter1"]["paths"].setValue( IECore.StringVectorData( [ '/atomsRobot/Robot2' ] ) ) __children["PathFilter1"]["__uiPosition"].setValue( imath.V2f( 23.2556305, 94.7194366 ) ) -__children["Group"]["in"]["in0"].setInput( __children["DeleteObject"]["out"] ) -__children["Group"]["in"]["in1"].setInput( __children["Camera"]["out"] ) -__children["Group"]["in"]["in2"].setInput( __children["skydome_light"]["out"] ) +__children["Group"]["in"][0].setInput( __children["DeleteObject"]["out"] ) +__children["Group"]["in"][1].setInput( __children["Camera"]["out"] ) +__children["Group"]["in"][2].setInput( __children["skydome_light"]["out"] ) __children["Group"]["__uiPosition"].setValue( imath.V2f( 35.2672348, -45.8375702 ) ) __children["Camera"]["transform"]["translate"].setValue( imath.V3f( 1164.69336, 0, 0 ) ) __children["Camera"]["transform"]["rotate"].setValue( imath.V3f( 0, 90, 0 ) ) @@ -282,18 +243,15 @@ Gaffer.Metadata.registerValue( __children["Catalogue"]["images"]["Image"], 'imag __children["Catalogue"]["images"]["Image"]["fileName"].setValue( '/home/alan/gaffer/projects/default/catalogues/atomsExampleScene/28336951b30291dde594110611c694d8.exr' ) __children["Catalogue"]["images"]["Image1"]["fileName"].setValue( '/home/alan/gaffer/projects/default/catalogues/atomsExampleScene/1b607f54d2a160bbfb28297e445ada2a.exr' ) __children["Catalogue"]["images"]["Image2"]["fileName"].setValue( '/home/alan/gaffer/projects/default/catalogues/atomsExampleScene/370b89806b02f72c3a398502419a82cd.exr' ) -__children["Catalogue"]["imageIndex"].setValue( 2 ) +__children["Catalogue"]["images"]["Image3"]["fileName"].setValue( '/home/alan/gaffer/projects/default/catalogues/atomsExampleScene/f90a006577b06ef65d7fa462832ac4c5.exr' ) +__children["Catalogue"]["imageIndex"].setValue( 3 ) __children["Catalogue"]["directory"].setValue( '${project:rootDirectory}/catalogues/${script:name}' ) -__children["Catalogue"]["__mapping"].setValue( IECore.CompoundData({'Image':IECore.IntData( 0 ),'Image2':IECore.IntData( 2 ),'Image1':IECore.IntData( 1 )}) ) __children["Catalogue"]["__uiPosition"].setValue( imath.V2f( 16.6360798, -56.9887085 ) ) __children["ShaderAssignment2"]["in"].setInput( __children["ShaderAssignment1"]["out"] ) __children["ShaderAssignment2"]["filter"].setInput( __children["PathFilter2"]["out"] ) __children["ShaderAssignment2"]["shader"].setInput( __children["purple_robot_material"]["out"] ) __children["ShaderAssignment2"]["__uiPosition"].setValue( imath.V2f( 8.65506649, 69.5639191 ) ) __children["purple_robot_material"]["parameters"]["base_color"].setInput( __children["image2"]["out"] ) -__children["purple_robot_material"]["parameters"]["base_color"]["r"].setInput( __children["image2"]["out"]["r"] ) -__children["purple_robot_material"]["parameters"]["base_color"]["g"].setInput( __children["image2"]["out"]["g"] ) -__children["purple_robot_material"]["parameters"]["base_color"]["b"].setInput( __children["image2"]["out"]["b"] ) __children["purple_robot_material"]["__uiPosition"].setValue( imath.V2f( -10.0755529, 69.5622787 ) ) __children["image2"]["parameters"]["filename"].setValue( '${ATOMS_GAFFER_ROOT}/examples/assets/atomsRobot/preview/atoms2Robot/purple_material_diff.jpg' ) __children["image2"]["__uiPosition"].setValue( imath.V2f( -25.205471, 74.3614502 ) ) @@ -304,9 +262,6 @@ __children["ShaderAssignment3"]["filter"].setInput( __children["PathFilter3"]["o __children["ShaderAssignment3"]["shader"].setInput( __children["red_robot_material"]["out"] ) __children["ShaderAssignment3"]["__uiPosition"].setValue( imath.V2f( 8.65846634, 50.493454 ) ) __children["red_robot_material"]["parameters"]["base_color"].setInput( __children["image3"]["out"] ) -__children["red_robot_material"]["parameters"]["base_color"]["r"].setInput( __children["image3"]["out"]["r"] ) -__children["red_robot_material"]["parameters"]["base_color"]["g"].setInput( __children["image3"]["out"]["g"] ) -__children["red_robot_material"]["parameters"]["base_color"]["b"].setInput( __children["image3"]["out"]["b"] ) __children["red_robot_material"]["__uiPosition"].setValue( imath.V2f( -9.18983364, 50.4922485 ) ) __children["image3"]["parameters"]["filename"].setValue( '${ATOMS_GAFFER_ROOT}/examples/assets/atomsRobot/preview/atoms2Robot/red_material_diff.jpg' ) __children["image3"]["__uiPosition"].setValue( imath.V2f( -23.4377823, 55.2916107 ) ) @@ -317,9 +272,6 @@ __children["ShaderAssignment4"]["filter"].setInput( __children["PathFilter4"]["o __children["ShaderAssignment4"]["shader"].setInput( __children["yellow_robot_material"]["out"] ) __children["ShaderAssignment4"]["__uiPosition"].setValue( imath.V2f( 8.66618633, 33.3921967 ) ) __children["yellow_robot_material"]["parameters"]["base_color"].setInput( __children["image4"]["out"] ) -__children["yellow_robot_material"]["parameters"]["base_color"]["r"].setInput( __children["image4"]["out"]["r"] ) -__children["yellow_robot_material"]["parameters"]["base_color"]["g"].setInput( __children["image4"]["out"]["g"] ) -__children["yellow_robot_material"]["parameters"]["base_color"]["b"].setInput( __children["image4"]["out"]["b"] ) __children["yellow_robot_material"]["__uiPosition"].setValue( imath.V2f( -10.1013918, 33.3922005 ) ) __children["image4"]["parameters"]["filename"].setValue( '${ATOMS_GAFFER_ROOT}/examples/assets/atomsRobot/preview/atoms2Robot/yellow_material_diff.jpg' ) __children["image4"]["__uiPosition"].setValue( imath.V2f( -25.27071, 38.1921616 ) ) @@ -335,9 +287,6 @@ __children["ShaderAssignment5"]["filter"].setInput( __children["PathFilter5"]["o __children["ShaderAssignment5"]["shader"].setInput( __children["flag_material"]["out"] ) __children["ShaderAssignment5"]["__uiPosition"].setValue( imath.V2f( 8.67286777, 16.8256397 ) ) __children["flag_material"]["parameters"]["base_color"].setInput( __children["user_data_rgb"]["out"] ) -__children["flag_material"]["parameters"]["base_color"]["r"].setInput( __children["user_data_rgb"]["out"]["r"] ) -__children["flag_material"]["parameters"]["base_color"]["g"].setInput( __children["user_data_rgb"]["out"]["g"] ) -__children["flag_material"]["parameters"]["base_color"]["b"].setInput( __children["user_data_rgb"]["out"]["b"] ) __children["flag_material"]["__uiPosition"].setValue( imath.V2f( -5.06980801, 16.8256397 ) ) __children["PathFilter5"]["paths"].setValue( IECore.StringVectorData( [ '/atomsRobot/Robot1/RobotSkin1/flag_group/pPlane1' ] ) ) __children["PathFilter5"]["__uiPosition"].setValue( imath.V2f( 29.1910629, 21.9280891 ) ) @@ -348,7 +297,7 @@ __children["AtomsMetadata1"]["in"].setInput( __children["AtomsMetadata3"]["out"] __children["AtomsMetadata1"]["metadata"]["member1"]["name"].setValue( 'flagColor' ) __children["AtomsMetadata1"]["metadata"]["member1"]["value"].setValue( imath.V3f( 1, 0, 0 ) ) __children["AtomsMetadata1"]["__uiPosition"].setValue( imath.V2f( -13.843298, -12.8485851 ) ) -__children["DeleteObject"]["in"].setInput( __children["AtomsCrowdGenerator"]["out"] ) +__children["DeleteObject"]["in"].setInput( __children["AtomsCrowdGenerator1"]["out"] ) __children["DeleteObject"]["filter"].setInput( __children["PathFilter6"]["out"] ) __children["DeleteObject"]["__uiPosition"].setValue( imath.V2f( 12.0950851, -37.6735458 ) ) __children["PathFilter6"]["paths"].setValue( IECore.StringVectorData( [ '/crowd' ] ) ) @@ -365,6 +314,13 @@ __children["AtomsMetadata3"]["metadata"]["member1"]["value"].setValue( 1.0 ) __children["AtomsMetadata3"]["metadata"]["member2"]["name"].setValue( 'atomsRobot_robot1_head_1' ) __children["AtomsMetadata3"]["metadata"]["member2"]["value"].setValue( 1.0 ) __children["AtomsMetadata3"]["__uiPosition"].setValue( imath.V2f( -20.3091068, -4.68452263 ) ) +__children["PathFilter7"]["paths"].setValue( IECore.StringVectorData( [ '/crowd' ] ) ) +__children["PathFilter7"]["__uiPosition"].setValue( imath.V2f( 24.9639721, -22.8593197 ) ) +__children["AtomsCrowdGenerator1"]["in"].setInput( __children["AtomsMetadata2"]["out"] ) +__children["AtomsCrowdGenerator1"]["filter"].setInput( __children["PathFilter7"]["out"] ) +__children["AtomsCrowdGenerator1"]["variations"].setInput( __children["ShaderAssignment5"]["out"] ) +__children["AtomsCrowdGenerator1"]["clothCache"].setInput( __children["AtomsCrowdClothReader"]["out"] ) +__children["AtomsCrowdGenerator1"]["__uiPosition"].setValue( imath.V2f( 5.53106594, -29.3415146 ) ) del __children diff --git a/include/AtomsGaffer/AtomsCrowdGenerator.h b/include/AtomsGaffer/AtomsCrowdGenerator.h index b5c2819..17c899e 100644 --- a/include/AtomsGaffer/AtomsCrowdGenerator.h +++ b/include/AtomsGaffer/AtomsCrowdGenerator.h @@ -57,7 +57,7 @@ class AtomsCrowdGenerator : public GafferScene::BranchCreator AtomsCrowdGenerator( const std::string &name = defaultName() ); ~AtomsCrowdGenerator() = default; - IE_CORE_DECLARERUNTIMETYPEDEXTENSION( AtomsGaffer::AtomsCrowdGenerator, TypeId::AtomsCrowdGeneratorTypeId, GafferScene::BranchCreator ); + GAFFER_NODE_DECLARE_TYPE( AtomsGaffer::AtomsCrowdGenerator, TypeId::AtomsCrowdGeneratorTypeId, GafferScene::BranchCreator ); Gaffer::StringPlug *namePlug(); const Gaffer::StringPlug *namePlug() const;