Hi
I was looking for a way to generically mirror symmetric controllers that I
could setup and re-use with other assets with similar controllers. Gear
Mirror Pose could be a viable option but while I can set up rules and the
the "Mirror Pose" to work I can't import a set of ruls. I get some errors,
so just wondering if that is it.
*If GEAR it's not supposed to support arbitrary FK controllers Import
ignore the below.*
So this is what I got with a Non-Gear controllers.
"Edit Mirroring Template" error with Non-Gear controllers:
# ERROR : Traceback (most recent call last):
# File "<Script Block 2>", line 150, in gear_CreateMirrorTemplate_Execute
# cnx_prop = ani.createMirrorCnxTemplate(model, xsi.Selection)
# File "B:\XSI\Workgroups\Animation\PythonModules\gear\xsi\animation.py",
line 114, in createMirrorCnxTemplate
# cnx_grid.BeginEdit()
# UnboundLocalError: local variable 'cnx_grid' referenced before assignment
# - [line 149 in
B:\XSI\Workgroups\Animation\Addons\gear\Application\Plugins\gear_mirrorAnimation.py]
# ERROR : OLE error 0x80020101
Application.gear_CreateMirrorTemplate()
"Import" error with Non-Gear controllers:
# ERROR : Traceback (most recent call last):
# File "<Script Block 2>", line 241, in gear_Mirror_ImportRules_OnClicked
# for xml_cnx in root.findall("mirrorCnxMap/cnx"):
# NameError: global name 'root' is not defined
# - [line 240 in
B:\XSI\Workgroups\Animation\Addons\gear\Application\Plugins\gear_mirrorAnimation.py]
# ERROR : Property Page Script Logic Error (Python ActiveX Scripting Engine)
# ERROR : [238]
# ERROR : [239] # Create Dictionary
# ERROR : >[240] connections = {}
# ERROR : [241] for xml_cnx in root.findall("mirrorCnxMap/cnx"):
# ERROR : [242] connections[cnx.get("map_to")] =
[xml_cnx.get("map_from"), xml_cnx.get("inv")]
# ERROR : [243]
# ERROR : Traceback (most recent call last):
# File "<Script Block 2>", line 241, in gear_Mirror_ImportRules_OnClicked
# for xml_cnx in root.findall("mirrorCnxMap/cnx"):
# NameError: global name 'root' is not defined
#
"Edit Mirror Template" error with Gear Rig. It's the same, but it makes
sense if this is not needed since mirror.cnx is already in place
# ERROR : Traceback (most recent call last):
# File "<Script Block 2>", line 150, in gear_CreateMirrorTemplate_Execute
# cnx_prop = ani.createMirrorCnxTemplate(model, xsi.Selection)
# File "B:\XSI\Workgroups\Animation\PythonModules\gear\xsi\animation.py",
line 114, in createMirrorCnxTemplate
# cnx_grid.BeginEdit()
# UnboundLocalError: local variable 'cnx_grid' referenced before assignment
# - [line 149 in
B:\XSI\Workgroups\Animation\Addons\gear\Application\Plugins\gear_mirrorAnimation.py]
# ERROR : OLE error 0x80020101
Application.gear_CreateMirrorTemplate()
So I decided to check Gear's chicken rig and the "Mirror Pose" command
works! But strangely this is what "mirror_cnx" PPG looks like
Nothing there.
But if I Export the xml has it all like
But if I try to Import that same xml it throws an error. Just like the
Non-Gear controllers.
# ERROR : Traceback (most recent call last):
# File "<Script Block 2>", line 241, in gear_Mirror_ImportRules_OnClicked
# for xml_cnx in root.findall("mirrorCnxMap/cnx"):
# NameError: global name 'root' is not defined
# - [line 240 in
B:\XSI\Workgroups\Animation\Addons\gear\Application\Plugins\gear_mirrorAnimation.py]
# ERROR : Property Page Script Logic Error (Python ActiveX Scripting Engine)
# ERROR : [238]
# ERROR : [239] # Create Dictionary
# ERROR : >[240] connections = {}
# ERROR : [241] for xml_cnx in root.findall("mirrorCnxMap/cnx"):
# ERROR : [242] connections[cnx.get("map_to")] =
[xml_cnx.get("map_from"), xml_cnx.get("inv")]
# ERROR : [243]
# ERROR : Traceback (most recent call last):
# File "<Script Block 2>", line 241, in gear_Mirror_ImportRules_OnClicked
# for xml_cnx in root.findall("mirrorCnxMap/cnx"):
# NameError: global name 'root' is not defined
Is there someway to make this work or I might just have to reeinvent my own
wheel? :D
Cheers
Pedro Alpiarça dos Santos