diff --git a/mel/AETemplates/AEmmImagePlaneShapeTemplate.mel b/mel/AETemplates/AEmmImagePlaneShapeTemplate.mel index 075ba7ff..e72940a5 100644 --- a/mel/AETemplates/AEmmImagePlaneShapeTemplate.mel +++ b/mel/AETemplates/AEmmImagePlaneShapeTemplate.mel @@ -97,6 +97,8 @@ global proc AEmmImagePlaneShape_browser( string $cmd = ""; $cmd = $cmd + "import mmSolver.tools.createimageplane.tool as tool;\n"; $cmd = $cmd + "import mmSolver.tools.createimageplane.lib as lib;\n"; + $cmd = $cmd + "import mmSolver.tools.createimageplane._lib.constant as const;\n"; + $cmd = $cmd + "version = const.MM_IMAGE_PLANE_VERSION_ONE;\n"; $cmd = $cmd + "image_seq = tool.prompt_user_for_image_sequence();\n"; $cmd = $cmd + "if image_seq:\n"; $cmd = $cmd + " mm_ip_shp = \"" + $image_plane_shp + "\";\n"; @@ -106,7 +108,8 @@ global proc AEmmImagePlaneShape_browser( $cmd = $cmd + " lib.set_image_sequence(\n"; $cmd = $cmd + " mm_ip_shp,\n"; $cmd = $cmd + " image_seq,\n"; - $cmd = $cmd + " attr_name=attr_name\n"; + $cmd = $cmd + " attr_name=attr_name,\n"; + $cmd = $cmd + " version=version\n"; $cmd = $cmd + " )\n"; $cmd = $cmd + " else:\n"; $cmd = $cmd + " maya.cmds.setAttr(\n"; @@ -135,6 +138,8 @@ global proc AEmmImagePlaneShape_sequenceSlotChanged( $cmd = $cmd + "import os.path;\n"; $cmd = $cmd + "import mmSolver.tools.createimageplane.tool as tool;\n"; $cmd = $cmd + "import mmSolver.tools.createimageplane.lib as lib;\n"; + $cmd = $cmd + "import mmSolver.tools.createimageplane._lib.constant as const;\n"; + $cmd = $cmd + "version = const.MM_IMAGE_PLANE_VERSION_ONE;\n"; $cmd = $cmd + "mm_ip_shp = \"" + $image_plane_shp + "\";\n"; $cmd = $cmd + "attr_name = \"" + $attr_name + "\";\n"; $cmd = $cmd + "current_slot_attr = \"" + $slot_attr_name + "\";\n"; @@ -145,7 +150,8 @@ global proc AEmmImagePlaneShape_sequenceSlotChanged( $cmd = $cmd + "lib.set_image_sequence(\n"; $cmd = $cmd + " mm_ip_shp,\n"; $cmd = $cmd + " image_seq,\n"; - $cmd = $cmd + " attr_name=current_slot_attr\n"; + $cmd = $cmd + " attr_name=current_slot_attr,\n"; + $cmd = $cmd + " version=version\n"; $cmd = $cmd + ")\n"; python($cmd); diff --git a/python/mmSolver/tools/createimageplane/_lib/mmimageplane.py b/python/mmSolver/tools/createimageplane/_lib/mmimageplane.py index 868b89db..73e10c1e 100644 --- a/python/mmSolver/tools/createimageplane/_lib/mmimageplane.py +++ b/python/mmSolver/tools/createimageplane/_lib/mmimageplane.py @@ -211,6 +211,7 @@ def create_shape_node( # Add extra message attributes for finding nodes during callbacks. if shader_node_network is not None: maya.cmds.addAttr(shp, longName='shaderFileNode', attributeType='message') + lib_utils.force_connect_attr(file_node + '.message', shp + '.shaderFileNode') # Logic to calculate the frame number. node = maya.cmds.createNode('mmImageSequenceFrameLogic') diff --git a/python/mmSolver/tools/createimageplane/tool.py b/python/mmSolver/tools/createimageplane/tool.py index 79272412..c5a40020 100644 --- a/python/mmSolver/tools/createimageplane/tool.py +++ b/python/mmSolver/tools/createimageplane/tool.py @@ -147,11 +147,11 @@ def _run(version): # user has the transform and shape nodes selected. if cam_shp in created: continue - mm_ip_tfm, mm_ip_shp = lib.create_image_plane_on_camera(cam) + mm_ip_tfm, mm_ip_shp = lib.create_image_plane_on_camera(cam, version=version) image_seq = prompt_user_for_image_sequence() if image_seq: - lib.set_image_sequence(mm_ip_tfm, image_seq) + lib.set_image_sequence(mm_ip_tfm, image_seq, version=version) nodes.append(mm_ip_shp) created.add(cam_shp) @@ -168,7 +168,7 @@ def _run(version): def main(): - _run(const.MM_IMAGE_PLANE_VERSION_ONE) + _run(const.MM_IMAGE_PLANE_VERSION_TWO) def main_version_one():