Gaffer - asset_products_v002

 avatar
polygonMerge
plain_text
14 days ago
39 kB
3
Indexable
Never
import Gaffer
import GafferScene
import IECore
import icon_gaffer.nodes.DictionaryData
import imath

Gaffer.Metadata.registerValue( parent, "serialiser:milestoneVersion", 1, persistent=False )
Gaffer.Metadata.registerValue( parent, "serialiser:majorVersion", 4, persistent=False )
Gaffer.Metadata.registerValue( parent, "serialiser:minorVersion", 4, persistent=False )
Gaffer.Metadata.registerValue( parent, "serialiser:patchVersion", 0, persistent=False )

__children = {}

__children["asset_products"] = Gaffer.Box( "asset_products" )
parent.addChild( __children["asset_products"] )
__children["asset_products"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( Gaffer.Expression( "product_expression" ) )
__children["asset_products"]["product_expression"]["__in"].addChild( Gaffer.AtomicCompoundDataPlug( "p0", defaultValue = IECore.CompoundData(), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"]["product_expression"]["__out"].addChild( Gaffer.StringVectorDataPlug( "p0", direction = Gaffer.Plug.Direction.Out, defaultValue = IECore.StringVectorData( [  ] ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"]["product_expression"]["__out"].addChild( Gaffer.StringVectorDataPlug( "p1", direction = Gaffer.Plug.Direction.Out, defaultValue = IECore.StringVectorData( [  ] ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"]["product_expression"]["__out"].addChild( Gaffer.StringPlug( "p2", direction = Gaffer.Plug.Direction.Out, defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"]["product_expression"]["__out"].addChild( Gaffer.StringPlug( "p3", direction = Gaffer.Plug.Direction.Out, defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"]["product_expression"]["__out"].addChild( Gaffer.StringPlug( "p4", direction = Gaffer.Plug.Direction.Out, defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"]["product_expression"]["__out"].addChild( Gaffer.StringPlug( "p5", direction = Gaffer.Plug.Direction.Out, defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"]["product_expression"]["__out"].addChild( Gaffer.StringPlug( "p6", direction = Gaffer.Plug.Direction.Out, defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"]["product_expression"]["__out"].addChild( Gaffer.StringPlug( "p7", direction = Gaffer.Plug.Direction.Out, defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"]["product_expression"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( GafferScene.CollectScenes( "Collect_Assets" ) )
__children["asset_products"]["Collect_Assets"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( GafferScene.SceneReader( "SceneReader" ) )
__children["asset_products"]["SceneReader"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( Gaffer.StringPlug( "update_all", defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( Gaffer.BoxOut( "BoxOut" ) )
__children["asset_products"]["BoxOut"].setup( GafferScene.ScenePlug( "in", ) )
__children["asset_products"]["BoxOut"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"]["BoxOut"].addChild( Gaffer.BoolPlug( "__uiInputConnectionsMinimised", defaultValue = False, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( GafferScene.ScenePlug( "out", direction = Gaffer.Plug.Direction.Out, flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( GafferScene.CollectScenes( "Collect_Procedural_Products" ) )
__children["asset_products"]["Collect_Procedural_Products"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( GafferScene.ExternalProcedural( "ExternalProcedural" ) )
__children["asset_products"]["ExternalProcedural"]["parameters"].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["asset_products"]["ExternalProcedural"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( Gaffer.Expression( "shot_product_expression" ) )
__children["asset_products"]["shot_product_expression"]["__in"].addChild( Gaffer.AtomicCompoundDataPlug( "p0", defaultValue = IECore.CompoundData(), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"]["shot_product_expression"]["__out"].addChild( Gaffer.StringPlug( "p0", direction = Gaffer.Plug.Direction.Out, defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"]["shot_product_expression"]["__out"].addChild( Gaffer.StringPlug( "p1", direction = Gaffer.Plug.Direction.Out, defaultValue = '', flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"]["shot_product_expression"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( GafferScene.SceneReader( "CameraReader" ) )
__children["asset_products"]["CameraReader"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( GafferScene.Set( "Cameras_Set" ) )
__children["asset_products"]["Cameras_Set"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( GafferScene.PathFilter( "Cameras_PathFilter" ) )
__children["asset_products"]["Cameras_PathFilter"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( GafferScene.CopyPrimitiveVariables( "CopyPrimitiveVariables" ) )
__children["asset_products"]["CopyPrimitiveVariables"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( GafferScene.ShufflePrimitiveVariables( "ShufflePrimitiveVariables1" ) )
__children["asset_products"]["ShufflePrimitiveVariables1"]["shuffles"].addChild( Gaffer.ShufflePlug( "shuffle0", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"]["ShufflePrimitiveVariables1"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( GafferScene.PathFilter( "PathFilter3" ) )
__children["asset_products"]["PathFilter3"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( GafferScene.SceneReader( "PrefReader" ) )
__children["asset_products"]["PrefReader"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( GafferScene.Group( "asset_cache_group_pref" ) )
__children["asset_products"]["asset_cache_group_pref"]["in"].addChild( GafferScene.ScenePlug( "in1", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"]["asset_cache_group_pref"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( Gaffer.Dot( "Dot" ) )
__children["asset_products"]["Dot"].setup( GafferScene.ScenePlug( "in", ) )
__children["asset_products"]["Dot"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( Gaffer.NameSwitch( "Asset_Cache_Switch" ) )
__children["asset_products"]["Asset_Cache_Switch"].setup( GafferScene.ScenePlug( "value", ) )
__children["asset_products"]["Asset_Cache_Switch"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( GafferScene.SceneReader( "FinLocatorsReader" ) )
__children["asset_products"]["FinLocatorsReader"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( GafferScene.Group( "asset_cache_group" ) )
__children["asset_products"]["asset_cache_group"]["in"].addChild( GafferScene.ScenePlug( "in1", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"]["asset_cache_group"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( GafferScene.SceneReader( "CogLocatorsReader" ) )
__children["asset_products"]["CogLocatorsReader"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( Gaffer.Dot( "Dot1" ) )
__children["asset_products"]["Dot1"].setup( GafferScene.ScenePlug( "in", ) )
__children["asset_products"]["Dot1"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( Gaffer.NameSwitch( "Light_Rig_Switch" ) )
__children["asset_products"]["Light_Rig_Switch"].setup( GafferScene.ScenePlug( "value", ) )
__children["asset_products"]["Light_Rig_Switch"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( GafferScene.MergeScenes( "AssetProductsMerge" ) )
__children["asset_products"]["AssetProductsMerge"]["in"].addChild( GafferScene.ScenePlug( "in2", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"]["AssetProductsMerge"]["in"].addChild( GafferScene.ScenePlug( "in3", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"]["AssetProductsMerge"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( GafferScene.MergeScenes( "ShotProductsMerge" ) )
__children["asset_products"]["ShotProductsMerge"]["in"].addChild( GafferScene.ScenePlug( "in2", flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"]["ShotProductsMerge"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( GafferScene.PointConstraint( "Lgt_Rig_Constraint" ) )
__children["asset_products"]["Lgt_Rig_Constraint"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( GafferScene.PathFilter( "Light_Grp_PathFilter" ) )
__children["asset_products"]["Light_Grp_PathFilter"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( Gaffer.Reference( "default_character_lights" ) )
__children["asset_products"]["default_character_lights"].load( "Y:/CWD2/assets/type/Character/Light_Rig_CHAR/products/gaffer_lights/gaffer_lights_v0003.grf" )
__children["asset_products"]["default_character_lights"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( icon_gaffer.nodes.DictionaryData.DictionaryDataNode( "ShotAssetDict" ) )
__children["asset_products"]["ShotAssetDict"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( icon_gaffer.nodes.DictionaryData.DictionaryDataNode( "ShotProductDict" ) )
__children["asset_products"]["ShotProductDict"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( Gaffer.BoxOut( "BoxOut1" ) )
__children["asset_products"]["BoxOut1"].setup( Gaffer.AtomicCompoundDataPlug( "in", defaultValue = IECore.CompoundData(), ) )
__children["asset_products"]["BoxOut1"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( Gaffer.AtomicCompoundDataPlug( "shotDict", direction = Gaffer.Plug.Direction.Out, defaultValue = IECore.CompoundData(), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( GafferScene.CustomOptions( "CustomOptions_ai_ass_meters" ) )
__children["asset_products"]["CustomOptions_ai_ass_meters"]["options"].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["asset_products"]["CustomOptions_ai_ass_meters"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( GafferScene.CustomOptions( "OptionsShots" ) )
__children["asset_products"]["OptionsShots"]["options"].addChild( Gaffer.NameValuePlug( "", Gaffer.StringVectorDataPlug( "value", defaultValue = IECore.StringVectorData( [  ] ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ), True, "member2", Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic ) )
__children["asset_products"]["OptionsShots"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"].addChild( Gaffer.Expression( "Expression8" ) )
__children["asset_products"]["Expression8"]["__in"].addChild( Gaffer.AtomicCompoundDataPlug( "p0", defaultValue = IECore.CompoundData(), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"]["Expression8"]["__out"].addChild( Gaffer.StringVectorDataPlug( "p0", direction = Gaffer.Plug.Direction.Out, defaultValue = IECore.StringVectorData( [  ] ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
__children["asset_products"]["Expression8"].addChild( Gaffer.V2fPlug( "__uiPosition", defaultValue = imath.V2f( 0, 0 ), flags = Gaffer.Plug.Flags.Default | Gaffer.Plug.Flags.Dynamic, ) )
Gaffer.Metadata.registerValue( __children["asset_products"], 'description', 'A container for "subgraphs" - node networks which exist inside the\nBox and can be exposed by promoting selected internal plugs onto the\noutside of the Box.\n\nBoxes can be used as an organisational tool for simplifying large\ngraphs by collapsing them into sections which perform distinct tasks.\nThey are also used for authoring files to be used with the Reference\nnode.' )
Gaffer.Metadata.registerValue( __children["asset_products"], 'nodeGadget:color', imath.Color3f( 0, 0.455000013, 0 ) )
Gaffer.MetadataAlgo.setNumericBookmark( __children["asset_products"].scriptNode(), 7, __children["asset_products"] )
Gaffer.Metadata.registerValue( __children["asset_products"], 'noduleLayout:customGadget:addButtonTop:visible', False )
Gaffer.Metadata.registerValue( __children["asset_products"], 'noduleLayout:customGadget:addButtonBottom:visible', False )
Gaffer.Metadata.registerValue( __children["asset_products"], 'noduleLayout:customGadget:addButtonLeft:visible', False )
Gaffer.Metadata.registerValue( __children["asset_products"], 'noduleLayout:customGadget:addButtonRight:visible', False )
Gaffer.Metadata.registerValue( __children["asset_products"], 'annotation:user:text', 'Press Update All to get and or update the assets' )
Gaffer.Metadata.registerValue( __children["asset_products"], 'annotation:user:color', imath.Color3f( 0.150000006, 0.25999999, 0.25999999 ) )
__children["asset_products"]["__uiPosition"].setValue( imath.V2f( -187.99762, 214.354507 ) )
__children["asset_products"]["product_expression"]["__in"]["p0"].setInput( __children["asset_products"]["ShotAssetDict"]["out"] )
__children["asset_products"]["product_expression"]["__uiPosition"].setValue( imath.V2f( -176.730835, 174.006012 ) )
__children["asset_products"]["Collect_Assets"]["in"].setInput( __children["asset_products"]["AssetProductsMerge"]["out"] )
__children["asset_products"]["Collect_Assets"]["rootNames"].setInput( __children["asset_products"]["product_expression"]["__out"]["p0"] )
__children["asset_products"]["Collect_Assets"]["__uiPosition"].setValue( imath.V2f( -84.1041107, 117.346352 ) )
__children["asset_products"]["SceneReader"]["fileName"].setInput( __children["asset_products"]["product_expression"]["__out"]["p7"] )
__children["asset_products"]["SceneReader"]["__uiPosition"].setValue( imath.V2f( -148.1315, 243.351501 ) )
Gaffer.Metadata.registerValue( __children["asset_products"]["update_all"], 'nodule:type', '' )
Gaffer.Metadata.registerValue( __children["asset_products"]["update_all"], 'layout:section', 'Settings' )
Gaffer.Metadata.registerValue( __children["asset_products"]["update_all"], 'plugValueWidget:type', 'GafferUI.ButtonPlugValueWidget' )
Gaffer.Metadata.registerValue( __children["asset_products"]["update_all"], 'buttonPlugValueWidget:clicked', 'import pprint\nimport os\n\nimport GafferUI\nimport GafferScene\n\nfrom icon_gaffer.utilities.path_utilities import shot_path_dict\nimport importlib\nimportlib.reload(shot_path_dict)\n\n\nproduct_dict = shot_path_dict.get_current_shot()\n\nscene_node = plug.node()\nscene_node[\'ShotAssetDict\'][\'data\'].setValue(product_dict)\n\nshot_product_dict = shot_path_dict.get_util_products_dict()\nscene_node[\'ShotProductDict\'][\'data\'].setValue(shot_product_dict)\n\nreference_switch = scene_node[\'Asset_Cache_Switch\']\nlight_rig_switch = scene_node[\'Light_Rig_Switch\']\nasset_product_dict = shot_path_dict.get_current_shot_assets()\n\nfor i, asset in enumerate(asset_product_dict):\n\ti += 1\n\tif not reference_switch["in"].getChild("in" + str(i)):\n\t\treference_switch["in"].addChild(Gaffer.NameValuePlug("", GafferScene.ScenePlug("value"), True, "in" + str(i), Gaffer.Plug.Flags.Default|Gaffer.Plug.Flags.Dynamic))\n\treference_switch["in"][i]["name"].setValue(asset + \'_??\')\n\tlast_node = scene_node[\'asset_cache_group\']\n\tparent_products = ["gaffer_mesh_attr", "gaffer_shader"]\n\tasset_type = asset_product_dict[asset]["asset_type"]\n\tfor product in asset_product_dict[asset]["products"]:\n\t\tif product in parent_products:\n\t\t\tfor product_data in asset_product_dict[asset]["products"][product]:\n\t\t\t\tasset_name, product_path = product_data.values()\n\t\t\t\tproduct_node = scene_node.getChild(asset_name + "_" + product)\n\t\t\t\tif not product_node:\n\t\t\t\t\tproduct_node = Gaffer.Reference(asset_name + "_" + product)\n\t\t\t\t\tscene_node.addChild(product_node)\n\t\t\t\t\tproduct_node.load(product_path)\n\t\t\t\t\tproduct_node[\'in\'].setInput(last_node[\'out\'])\n\t\t\t\t\tif product_node.getChild("fin_locators"):\n\t\t\t\t\t\tproduct_node["fin_locators"].setInput(scene_node[\'FinLocatorsReader\'][\'out\'])\n\t\t\t\telse:\n\t\t\t\t\tproduct_node.load(product_path)\n\t\t\t\tlast_node = product_node\n\t\telif product == "gaffer_lights":\n\t\t\tif not light_rig_switch["in"].getChild("in" + asset):\n\t\t\t\tlight_rig_switch["in"].addChild(Gaffer.NameValuePlug("", GafferScene.ScenePlug("value"), True, "in" + asset, Gaffer.Plug.Flags.Default|Gaffer.Plug.Flags.Dynamic))\n\t\t\tlight_rig_switch["in"]["in" + asset]["name"].setValue(asset_type + "_" + asset + \'_??\')\n\t\t\tproduct_node = scene_node.getChild(asset_name + "_" + product)\n\t\t\tproduct_path = asset_product_dict[asset]["products"][product]\n\t\t\tif not product_node:\n\t\t\t\tproduct_node = Gaffer.Reference(asset_name + "_" + product)\n\t\t\t\tscene_node.addChild(product_node)\n\t\t\t\tproduct_node.load(product_path)\n\t\t\t\tlight_rig_switch["in"]["in" + asset]["value"].setInput(product_node[\'out\'])\n\t\t\telse:\n\t\t\t\tproduct_node.load(product_path)\n\tif not reference_switch["in"][i]["value"].getInput():\n\t\treference_switch["in"][i]["value"].setInput(last_node[\'out\'])\n\ndefault_char_plug = light_rig_switch["in"].getChild("inCharacter")\nif default_char_plug:\n\tlight_rig_switch["in"].removeChild(default_char_plug)\nlight_rig_switch["in"].addChild(Gaffer.NameValuePlug("", GafferScene.ScenePlug("value"), True, "inCharacter", Gaffer.Plug.Flags.Default|Gaffer.Plug.Flags.Dynamic))\nlight_rig_switch["in"]["inCharacter"]["name"].setValue("Character_*")\nlight_rig_switch["in"]["inCharacter"]["value"].setInput(scene_node["default_character_lights"]["out"])\n\ndefault_character_light_rig = scene_node["default_character_lights"].fileName()\nfolder = os.path.dirname(default_character_light_rig)\nlatest = max(os.listdir(folder))\nlatest = os.path.join(folder, latest)\nscene_node["default_character_lights"].load(latest)' )
Gaffer.Metadata.registerValue( __children["asset_products"]["update_all"], 'label', 'Update All' )
Gaffer.Metadata.registerValue( __children["asset_products"]["update_all"], 'description', '' )
__children["asset_products"]["BoxOut"]["in"].setInput( __children["asset_products"]["OptionsShots"]["out"] )
Gaffer.Metadata.registerValue( __children["asset_products"]["BoxOut"]["in"], 'noduleLayout:section', 'top' )
Gaffer.Metadata.registerValue( __children["asset_products"]["BoxOut"]["__out"], 'plugValueWidget:type', '' )
Gaffer.Metadata.registerValue( __children["asset_products"]["BoxOut"]["__out"], 'noduleLayout:section', 'bottom' )
Gaffer.Metadata.registerValue( __children["asset_products"]["BoxOut"]["passThrough"], 'noduleLayout:section', 'top' )
__children["asset_products"]["BoxOut"]["__uiPosition"].setValue( imath.V2f( -79.6041107, 74.2439728 ) )
__children["asset_products"]["out"].setInput( __children["asset_products"]["BoxOut"]["__out"] )
Gaffer.Metadata.registerValue( __children["asset_products"]["out"], 'plugValueWidget:type', '' )
Gaffer.Metadata.registerValue( __children["asset_products"]["out"], 'noduleLayout:section', 'bottom' )
__children["asset_products"]["Collect_Procedural_Products"]["in"].setInput( __children["asset_products"]["ExternalProcedural"]["out"] )
__children["asset_products"]["Collect_Procedural_Products"]["rootNames"].setInput( __children["asset_products"]["product_expression"]["__out"]["p1"] )
__children["asset_products"]["Collect_Procedural_Products"]["rootNameVariable"].setValue( 'collect:product' )
__children["asset_products"]["Collect_Procedural_Products"]["__uiPosition"].setValue( imath.V2f( -85.6041107, 167.510941 ) )
__children["asset_products"]["ExternalProcedural"]["fileName"].setValue( 'procedural' )
__children["asset_products"]["ExternalProcedural"]["parameters"]["member1"]["name"].setValue( 'dso' )
__children["asset_products"]["ExternalProcedural"]["parameters"]["member1"]["value"].setInput( __children["asset_products"]["product_expression"]["__out"]["p2"] )
__children["asset_products"]["ExternalProcedural"]["__uiPosition"].setValue( imath.V2f( -85.6041107, 190.574951 ) )
__children["asset_products"]["shot_product_expression"]["__in"]["p0"].setInput( __children["asset_products"]["ShotProductDict"]["out"] )
__children["asset_products"]["shot_product_expression"]["__uiPosition"].setValue( imath.V2f( -21.8683319, 138.499573 ) )
__children["asset_products"]["CameraReader"]["fileName"].setInput( __children["asset_products"]["shot_product_expression"]["__out"]["p0"] )
__children["asset_products"]["CameraReader"]["__uiPosition"].setValue( imath.V2f( -21.7345123, 122.581093 ) )
__children["asset_products"]["Cameras_Set"]["in"].setInput( __children["asset_products"]["CameraReader"]["out"] )
__children["asset_products"]["Cameras_Set"]["filter"].setInput( __children["asset_products"]["Cameras_PathFilter"]["out"] )
__children["asset_products"]["Cameras_Set"]["name"].setValue( '__cameras' )
__children["asset_products"]["Cameras_Set"]["__uiPosition"].setValue( imath.V2f( -21.7345123, 116.91703 ) )
__children["asset_products"]["Cameras_PathFilter"]["paths"].setValue( IECore.StringVectorData( [ '/.../RENDER', '/RENDER' ] ) )
__children["asset_products"]["Cameras_PathFilter"]["__uiPosition"].setValue( imath.V2f( -5.82213974, 121.137657 ) )
__children["asset_products"]["CopyPrimitiveVariables"]["in"].setInput( __children["asset_products"]["Asset_Cache_Switch"]["out"]["value"] )
__children["asset_products"]["CopyPrimitiveVariables"]["filter"].setInput( __children["asset_products"]["PathFilter3"]["out"] )
__children["asset_products"]["CopyPrimitiveVariables"]["adjustBounds"].setValue( False )
__children["asset_products"]["CopyPrimitiveVariables"]["source"].setInput( __children["asset_products"]["ShufflePrimitiveVariables1"]["out"] )
__children["asset_products"]["CopyPrimitiveVariables"]["primitiveVariables"].setValue( 'Pref' )
__children["asset_products"]["CopyPrimitiveVariables"]["__uiPosition"].setValue( imath.V2f( -139.1315, 163.91246 ) )
__children["asset_products"]["ShufflePrimitiveVariables1"]["in"].setInput( __children["asset_products"]["asset_cache_group_pref"]["out"] )
__children["asset_products"]["ShufflePrimitiveVariables1"]["filter"].setInput( __children["asset_products"]["PathFilter3"]["out"] )
__children["asset_products"]["ShufflePrimitiveVariables1"]["shuffles"]["shuffle0"]["source"].setValue( 'P' )
__children["asset_products"]["ShufflePrimitiveVariables1"]["shuffles"]["shuffle0"]["destination"].setValue( 'Pref' )
__children["asset_products"]["ShufflePrimitiveVariables1"]["__uiPosition"].setValue( imath.V2f( -119.621338, 172.076523 ) )
__children["asset_products"]["PathFilter3"]["paths"].setValue( IECore.StringVectorData( [ '/...' ] ) )
__children["asset_products"]["PathFilter3"]["__uiPosition"].setValue( imath.V2f( -99.0494156, 176.220688 ) )
__children["asset_products"]["PrefReader"]["fileName"].setInput( __children["asset_products"]["product_expression"]["__out"]["p6"] )
__children["asset_products"]["PrefReader"]["__uiPosition"].setValue( imath.V2f( -121.121338, 185.904648 ) )
__children["asset_products"]["asset_cache_group_pref"]["in"][0].setInput( __children["asset_products"]["PrefReader"]["out"] )
__children["asset_products"]["asset_cache_group_pref"]["name"].setValue( 'asset_cache' )
__children["asset_products"]["asset_cache_group_pref"]["__uiPosition"].setValue( imath.V2f( -119.621338, 177.740585 ) )
__children["asset_products"]["Dot"]["in"].setInput( __children["asset_products"]["CopyPrimitiveVariables"]["out"] )
__children["asset_products"]["Dot"]["__uiPosition"].setValue( imath.V2f( -139.1315, 130.342468 ) )
__children["asset_products"]["Asset_Cache_Switch"]["__index"].setInput( __children["asset_products"]["Asset_Cache_Switch"]["__outIndex"] )
__children["asset_products"]["Asset_Cache_Switch"]["selector"].setValue( '${collect:rootName}' )
Gaffer.Metadata.registerValue( __children["asset_products"]["Asset_Cache_Switch"]["in"], 'noduleLayout:section', 'top' )
__children["asset_products"]["Asset_Cache_Switch"]["in"][0]["name"].setValue( 'Bedroom_Danny_SI_??_asset_cache' )
__children["asset_products"]["Asset_Cache_Switch"]["in"][0]["value"].setInput( __children["asset_products"]["asset_cache_group"]["out"] )
Gaffer.Metadata.registerValue( __children["asset_products"]["Asset_Cache_Switch"]["out"], 'noduleLayout:section', 'bottom' )
__children["asset_products"]["Asset_Cache_Switch"]["__uiPosition"].setValue( imath.V2f( -140.6315, 189.572113 ) )
__children["asset_products"]["FinLocatorsReader"]["fileName"].setInput( __children["asset_products"]["product_expression"]["__out"]["p3"] )
__children["asset_products"]["FinLocatorsReader"]["__uiPosition"].setValue( imath.V2f( -162.875687, 243.55983 ) )
__children["asset_products"]["asset_cache_group"]["in"][0].setInput( __children["asset_products"]["SceneReader"]["out"] )
__children["asset_products"]["asset_cache_group"]["name"].setValue( 'asset_cache' )
__children["asset_products"]["asset_cache_group"]["__uiPosition"].setValue( imath.V2f( -146.6315, 235.187439 ) )
__children["asset_products"]["CogLocatorsReader"]["fileName"].setInput( __children["asset_products"]["shot_product_expression"]["__out"]["p1"] )
__children["asset_products"]["CogLocatorsReader"]["__uiPosition"].setValue( imath.V2f( -21.9037571, 155.269211 ) )
__children["asset_products"]["Dot1"]["in"].setInput( __children["asset_products"]["Lgt_Rig_Constraint"]["out"] )
__children["asset_products"]["Dot1"]["__uiPosition"].setValue( imath.V2f( -57.5892982, 130.342468 ) )
__children["asset_products"]["Light_Rig_Switch"]["__index"].setInput( __children["asset_products"]["Light_Rig_Switch"]["__outIndex"] )
__children["asset_products"]["Light_Rig_Switch"]["selector"].setInput( __children["asset_products"]["product_expression"]["__out"]["p5"] )
Gaffer.Metadata.registerValue( __children["asset_products"]["Light_Rig_Switch"]["in"], 'noduleLayout:section', 'top' )
__children["asset_products"]["Light_Rig_Switch"]["in"][0]["name"].setValue( '*' )
Gaffer.Metadata.registerValue( __children["asset_products"]["Light_Rig_Switch"]["out"], 'noduleLayout:section', 'bottom' )
__children["asset_products"]["Light_Rig_Switch"]["__uiPosition"].setValue( imath.V2f( -59.0892982, 164.583878 ) )
__children["asset_products"]["AssetProductsMerge"]["in"][0].setInput( __children["asset_products"]["Dot"]["out"] )
__children["asset_products"]["AssetProductsMerge"]["in"][1].setInput( __children["asset_products"]["Collect_Procedural_Products"]["out"] )
__children["asset_products"]["AssetProductsMerge"]["in"][2].setInput( __children["asset_products"]["Dot1"]["out"] )
__children["asset_products"]["AssetProductsMerge"]["__uiPosition"].setValue( imath.V2f( -84.1041107, 123.010414 ) )
__children["asset_products"]["ShotProductsMerge"]["in"][0].setInput( __children["asset_products"]["Collect_Assets"]["out"] )
__children["asset_products"]["ShotProductsMerge"]["in"][1].setInput( __children["asset_products"]["Cameras_Set"]["out"] )
__children["asset_products"]["ShotProductsMerge"]["__uiPosition"].setValue( imath.V2f( -81.1041107, 108.752968 ) )
__children["asset_products"]["Lgt_Rig_Constraint"]["in"].setInput( __children["asset_products"]["Light_Rig_Switch"]["out"]["value"] )
__children["asset_products"]["Lgt_Rig_Constraint"]["filter"].setInput( __children["asset_products"]["Light_Grp_PathFilter"]["out"] )
__children["asset_products"]["Lgt_Rig_Constraint"]["targetScene"].setInput( __children["asset_products"]["CogLocatorsReader"]["out"] )
__children["asset_products"]["Lgt_Rig_Constraint"]["target"].setInput( __children["asset_products"]["product_expression"]["__out"]["p4"] )
__children["asset_products"]["Lgt_Rig_Constraint"]["ignoreMissingTarget"].setValue( True )
__children["asset_products"]["Lgt_Rig_Constraint"]["__uiPosition"].setValue( imath.V2f( -57.5892982, 147.105148 ) )
__children["asset_products"]["Light_Grp_PathFilter"]["paths"].setValue( IECore.StringVectorData( [ '/*_Light_Rig_CHAR' ] ) )
__children["asset_products"]["Light_Grp_PathFilter"]["__uiPosition"].setValue( imath.V2f( -48.728344, 155.55452 ) )
Gaffer.Metadata.registerValue( __children["asset_products"]["default_character_lights"], 'noduleLayout:customGadget:addButtonTop:visible', False )
Gaffer.Metadata.registerValue( __children["asset_products"]["default_character_lights"], 'noduleLayout:customGadget:addButtonBottom:visible', False )
Gaffer.Metadata.registerValue( __children["asset_products"]["default_character_lights"], 'noduleLayout:customGadget:addButtonLeft:visible', False )
Gaffer.Metadata.registerValue( __children["asset_products"]["default_character_lights"], 'noduleLayout:customGadget:addButtonRight:visible', False )
Gaffer.Metadata.registerValue( __children["asset_products"]["default_character_lights"], 'nodeGadget:color', imath.Color3f( 0.685000002, 0.663080215, 0.246600017 ) )
__children["asset_products"]["default_character_lights"]["__uiPosition"].setValue( imath.V2f( -58.7283821, 201.324356 ) )
__children["asset_products"]["ShotAssetDict"]["__uiPosition"].setValue( imath.V2f( -207.728622, 195.000305 ) )
__children["asset_products"]["ShotProductDict"]["__uiPosition"].setValue( imath.V2f( -4.92006493, 143.121002 ) )
__children["asset_products"]["BoxOut1"]["name"].setValue( 'shotDict' )
__children["asset_products"]["BoxOut1"]["in"].setInput( __children["asset_products"]["ShotProductDict"]["out"] )
__children["asset_products"]["BoxOut1"]["__uiPosition"].setValue( imath.V2f( -3.42073846, 134.788971 ) )
__children["asset_products"]["shotDict"].setInput( __children["asset_products"]["BoxOut1"]["__out"] )
Gaffer.Metadata.registerValue( __children["asset_products"]["CustomOptions_ai_ass_meters"], 'annotation:user:text', 'This node sets arnold \nstandins to cm scale' )
Gaffer.Metadata.registerValue( __children["asset_products"]["CustomOptions_ai_ass_meters"], 'annotation:user:color', imath.Color3f( 0.150000006, 0.25999999, 0.25999999 ) )
Gaffer.Metadata.registerValue( __children["asset_products"]["CustomOptions_ai_ass_meters"], 'description', 'Applies arbitrary user-defined options to the root of the scene. Note\nthat for most common cases the StandardOptions or renderer-specific options\nnodes should be preferred, as they provide predefined sets of options with customised\nuser interfaces. The CustomOptions node is of most use when needing to set am\noption not supported by the specialised nodes.' )
__children["asset_products"]["CustomOptions_ai_ass_meters"]["in"].setInput( __children["asset_products"]["ShotProductsMerge"]["out"] )
__children["asset_products"]["CustomOptions_ai_ass_meters"]["options"]["member1"]["name"].setValue( 'ai:meters_per_unit' )
__children["asset_products"]["CustomOptions_ai_ass_meters"]["options"]["member1"]["value"].setValue( 0.009999999776482582 )
__children["asset_products"]["CustomOptions_ai_ass_meters"]["__uiPosition"].setValue( imath.V2f( -81.1041107, 100.588905 ) )
__children["asset_products"]["OptionsShots"]["in"].setInput( __children["asset_products"]["CustomOptions_ai_ass_meters"]["out"] )
__children["asset_products"]["OptionsShots"]["options"]["member2"]["name"].setValue( 'shots:linked' )
__children["asset_products"]["OptionsShots"]["options"]["member2"]["value"].setInput( __children["asset_products"]["Expression8"]["__out"]["p0"] )
__children["asset_products"]["OptionsShots"]["__uiPosition"].setValue( imath.V2f( -81.1041107, 86.4812622 ) )
__children["asset_products"]["Expression8"]["__in"]["p0"].setInput( __children["asset_products"]["ShotProductDict"]["out"] )
__children["asset_products"]["Expression8"]["__uiPosition"].setValue( imath.V2f( -64.3877487, 86.6121063 ) )
__children["asset_products"]["product_expression"]["__engine"].setValue( 'python' )
__children["asset_products"]["product_expression"]["__expression"].setValue( 'shot_dict = dict(parent["__in"]["p0"])\nshot = context.get("shot", "")\n\nparent["__out"]["p0"] = IECore.StringVectorData( list( shot_dict.keys() ) )\n\ncollectRoot = context.get( "collect:rootName", "" )\nproduct = context.get( "collect:product", "" )\n\nasset = shot_dict.get(collectRoot, {"shots": {}, "asset_products": {}})\nshot = asset["shots"].get(shot, {})\nproducts = {"asset_cache", "fin_locators"}\nparent["__out"]["p1"] = IECore.StringVectorData( list( set(shot.keys()) -  products) )\nparent["__out"]["p7"] = shot.get("asset_cache", "")\nparent["__out"]["p3"] = shot.get("fin_locators", "")\nparent["__out"]["p6"] = asset["asset_products"].get("asset_cache", "")\nparent["__out"]["p2"] = shot.get(product, "")\nlgt_target = "/{0}_COG_LOC".format(collectRoot)\nparent["__out"]["p4"] = lgt_target\nparent["__out"]["p5"] = str(asset.get("asset_type", "")) + "_" + collectRoot\n' )
__children["asset_products"]["shot_product_expression"]["__engine"].setValue( 'python' )
__children["asset_products"]["shot_product_expression"]["__expression"].setValue( 'shot_dict = dict(parent["__in"]["p0"])\nshot = context.get("shot", "")\ncollectRoot = context.get( "collect:rootName", "" )\nshot_products = shot_dict.get(shot, {})\nparent["__out"]["p0"] = shot_products.get("camera", "")\nparent["__out"]["p1"] = shot_products.get("cog_locators", "")\n' )
__children["asset_products"]["Expression8"]["__engine"].setValue( 'python' )
__children["asset_products"]["Expression8"]["__expression"].setValue( 'shot_dict = dict(parent["__in"]["p0"])\nparent["__out"]["p0"] = IECore.StringVectorData( list( shot_dict.keys() ) )' )


del __children

Leave a Comment