Module Expr Str Import alias Import alias identifier Import alias identifier Import alias identifier Expr Call AttributeLoad AttributeLoad NameLoad attr attr Str NameLoad Assign NameStore Str Assign NameStore Str Assign NameStore Str Assign NameStore Str FunctionDef arguments args defaults vararg body Expr Str Expr Call NameLoad decorator_list FunctionDef arguments args defaults body Expr Str If Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword BinOpMod Str NameLoad keyword NameLoad keyword TupleLoad Num Num Expr Call AttributeLoad NameLoad attr keyword Str Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Num Assign NameStore Call AttributeLoad NameLoad attr keyword Num Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr keyword NameLoad keyword NameLoad keyword Str If BoolOpAnd NameLoad CompareGt Call NameLoad NameLoad Num body TryExcept body Assign NameStore Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num keyword NameLoad keyword NameLoad Assign NameStore SubscriptLoad NameLoad Index Num handlers ExceptHandler body Pass Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Num keyword Num keyword Num keyword Num keyword Num keyword Str Assign NameStore Call AttributeLoad NameLoad attr keyword Num keyword Num keyword Num keyword Num keyword Num keyword Str Assign NameStore Call AttributeLoad NameLoad attr keyword Num keyword Num keyword Num keyword Num keyword Num keyword Str Assign NameStore Call AttributeLoad NameLoad attr keyword Num keyword Num keyword Num keyword Num keyword Num keyword Str Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword ListLoad TupleLoad NameLoad Str Num TupleLoad NameLoad Str Num keyword ListLoad TupleLoad NameLoad Str TupleLoad NameLoad Str Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword ListLoad TupleLoad NameLoad Str Num keyword ListLoad TupleLoad NameLoad Str TupleLoad NameLoad Str keyword ListLoad TupleLoad NameLoad Str Num NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword ListLoad TupleLoad NameLoad Str Num keyword ListLoad TupleLoad NameLoad Str TupleLoad NameLoad Str keyword ListLoad TupleLoad NameLoad Str Num NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword ListLoad TupleLoad NameLoad Str Num keyword ListLoad TupleLoad NameLoad Str TupleLoad NameLoad Str keyword ListLoad TupleLoad NameLoad Str Num NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword ListLoad TupleLoad NameLoad Str Num keyword ListLoad TupleLoad NameLoad Str TupleLoad NameLoad Str keyword ListLoad TupleLoad NameLoad Str Num NameLoad Expr Call AttributeLoad NameLoad attr Str Assign NameStore BinOpMod Str TupleLoad NameLoad NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str TryExcept body Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr keyword Str keyword Str keyword Num Assign NameStore Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad AttributeLoad NameLoad attr attr NameLoad Expr Call AttributeLoad NameLoad attr SubscriptLoad NameLoad Index Num keyword NameLoad keyword SubscriptLoad NameLoad Index Num keyword Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad handlers ExceptHandler body Raise decorator_list FunctionDef arguments args defaults body Expr Str Assign NameStore Num Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword ListLoad Num Num Num keyword NameLoad Expr Call AttributeLoad NameLoad attr keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword ListLoad Num Num Num keyword NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword ListLoad Num Num Num keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword Str keyword Str Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword ListLoad Num Num Num keyword NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword Str keyword Str Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword ListLoad Num Num Num Expr Call AttributeLoad NameLoad attr NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword BinOpMult NameLoad Num Print Str FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Print BinOpMod Str TupleLoad NameLoad NameLoad Print BinOpMod Str CompareEq NameLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Print BinOpMod Str CompareEq NameLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Print BinOpMod Str CompareEq NameLoad SubscriptLoad Call AttributeLoad NameLoad attr BinOpMod Str NameLoad keyword NameLoad Index Num decorator_list Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad NameLoad Expr Call NameLoad Num NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad keyword NameLoad Expr Call NameLoad Num NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore Call AttributeLoad NameLoad attr ListLoad NameLoad NameLoad keyword NameLoad Expr Call NameLoad Num NameLoad NameLoad NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults body Expr Str Return BoolOpAnd CompareEq SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num CompareEq SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num CompareEq SubscriptLoad NameLoad Index Num SubscriptLoad NameLoad Index Num decorator_list FunctionDef arguments args NameParam NameParam NameParam NameParam NameParam NameParam defaults body Expr Str Print BinOpMod Str TupleLoad NameLoad NameLoad Print BinOpMod Str CompareEq NameLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Print BinOpMod Str CompareEq NameLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Print BinOpMod Str CompareEq NameLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Print BinOpMod Str CompareEq NameLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad decorator_list Print Str Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Expr Call NameLoad Num NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad Expr Call NameLoad Num NameLoad NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call NameLoad Num NameLoad NameLoad NameLoad NameLoad Assign NameStore ListLoad Num Num Num Assign NameStore ListLoad Num Num Num Assign NameStore ListLoad Num Num Num Assign NameStore ListLoad Num Num Num Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad keyword NameLoad Expr Call NameLoad Num NameLoad NameLoad NameLoad NameLoad NameLoad Print Str Print BinOpMod Str CompareEq Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad SubscriptLoad Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Index Num Print BinOpMod Str CompareEq Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad SubscriptLoad Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Index Num Print BinOpMod Str Call NameLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad SubscriptLoad Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Index Num Print BinOpMod Str Call NameLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad SubscriptLoad Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Index Num Print BinOpMod Str Call NameLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad SubscriptLoad Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Index Num Print BinOpMod Str Call NameLoad Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword NameLoad SubscriptLoad Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Index Num Expr Call AttributeLoad NameLoad attr NameLoad decorator_list
N/A N/A 
A GUI for applying a hip constraint.

 Requirements:
AM_HipConstraint.py

To use this tool, first select your hip object, then add the constrained object
(your hip hip twist joint) to your selection and enter the desired data
into the option fields before pressing either the Create or Apply button.

\par Hip Constraint Options:
-  Pelvis  Object:
Specifies the name of the object to use for computing the hip's elevation
angle. The hip constraint is designed with the expectation that this is the
transform node that is the most direct parent of the hip joints (i.e. the
root). Though this will produce perfectly valid values if any intermediate
joints exist, such an intermediate joint could be used instead, provided that
the axes given for the pelvis node (below) are transformed into the
intermediate joint's local space.'
-  Hip  Aim  Axis:
Corresponds to the axis in the upper leg's local space that aims toward the
knee joint.
-  Hip  Front  Axis:
Corresponds to the axis in the upper leg's local space that points toward the
character's front.
-  Pelvis  Aim  Axis:
Corresponds to the axis in the specified pelvis joint's local space that aims
toward the next vertebra (up).
-  Pelvis  Front  Axis:
Corresponds to the axis in the specified pelvis joint's local space that aims
toward the character's front.

 Creation  Info:

 Donations: http://adammechtley.com/donations/

 License: The MIT License

Copyright (c) 2011 Adam Mechtley (http://adammechtley.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the 'Software'), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.


amespace amTools.rigging.hipConstraint
 N/A sys N/A maya.cmds cmds N/A amTools.utilities utils N/A amTools.utilities.ui amui N/A N/A N/A N/A utils plugins verifyPlugin AM_HipConstraint __file__ N/A kConstraintOptionsWindow am_hipConstraintOptionsWindow N/A kToolName Hip Constraint N/A kVersionNumber 1.04 N/A kVersionDate 2011.03.27 menuItem N/A N/A N/A args N/A N/A This function calls optionsWindow() from a menu item N/A N/A optionsWindow N/A optionsWindow N/A N/A N/A N/A N/A This function creates an options window for the am_hipConstraint command. 
	When executing it, first select the hip to which you are constraining, then 
	add the object to be constrained to your selection. N/A N/A N/A cmds window kConstraintOptionsWindow q True ex True N/A N/A N/A N/A cmds deleteUI kConstraintOptionsWindow N/A mainWindow N/A N/A cmds window kConstraintOptionsWindow title N/A %s Options kToolName menuBar True wh N/A 545 350 N/A N/A N/A cmds menu label Help N/A N/A N/A amui helpMenuItem kToolName __file__ N/A N/A N/A amui aboutMenuItem kToolName kVersionNumber kVersionDate N/A mainForm N/A N/A cmds formLayout nd 100 N/A mainFrame N/A N/A cmds formLayout nd 100 N/A pelvisText CenterRoot N/A sel N/A N/A cmds ls sl True l True type transform N/A N/A sel N/A N/A len sel 0 N/A N/A N/A N/A pelvis N/A N/A cmds listRelatives N/A sel N/A 0 p True f True N/A pelvisText N/A pelvis N/A 0 N/A N/A N/A N/A N/A if_pelvis N/A N/A cmds textFieldGrp label Pelvis Object: tx pelvisText N/A if_hipAimAxis N/A N/A cmds floatFieldGrp v1 1 v2 0 v3 0 nf 3 pre 4 label Hip Aim Axis: N/A if_hipFrontAxis N/A N/A cmds floatFieldGrp v1 0 v2 0 v3 1 nf 3 pre 4 label Hip Front Axis: N/A if_pelvisAimAxis N/A N/A cmds floatFieldGrp v1 0 v2 1 v3 0 nf 3 pre 4 label Pelvis Aim Axis: N/A if_pelvisFrontAxis N/A N/A cmds floatFieldGrp v1 0 v2 0 v3 1 nf 3 pre 4 label Pelvis Front Axis: N/A N/A N/A cmds formLayout mainFrame edit True attachForm N/A N/A if_pelvis left 30 N/A if_pelvis top 5 attachNone N/A N/A if_pelvis right N/A if_pelvis bottom N/A N/A N/A cmds formLayout mainFrame edit True attachForm N/A N/A if_hipAimAxis left 30 attachNone N/A N/A if_hipAimAxis right N/A if_hipAimAxis bottom attachControl N/A N/A if_hipAimAxis top 5 if_pelvis N/A N/A N/A cmds formLayout mainFrame edit True attachForm N/A N/A if_hipFrontAxis left 30 attachNone N/A N/A if_hipFrontAxis right N/A if_hipFrontAxis bottom attachControl N/A N/A if_hipFrontAxis top 5 if_hipAimAxis N/A N/A N/A cmds formLayout mainFrame edit True attachForm N/A N/A if_pelvisAimAxis left 30 attachNone N/A N/A if_pelvisAimAxis right N/A if_pelvisAimAxis bottom attachControl N/A N/A if_pelvisAimAxis top 5 if_hipFrontAxis N/A N/A N/A cmds formLayout mainFrame edit True attachForm N/A N/A if_pelvisFrontAxis left 30 attachNone N/A N/A if_pelvisFrontAxis right N/A if_pelvisFrontAxis bottom attachControl N/A N/A if_pelvisFrontAxis top 5 if_pelvisAimAxis N/A N/A N/A cmds setParent .. N/A cmd_create N/A amTools.rigging.hipConstraint.doOptions ("%s", "%s", "%s", "%s", "%s") N/A if_pelvis if_hipAimAxis if_hipFrontAxis if_pelvisAimAxis if_pelvisFrontAxis N/A N/A N/A N/A utils ui threeButtonLayout mainForm mainWindow cmd_create N/A N/A N/A cmds showWindow mainWindow N/A doOptions N/A N/A input_pelvis input_hipAimAxis input_hipFrontAxis input_pelvisAimAxis input_pelvisFrontAxis N/A N/A N/A Specifies the function called when the apply or create button is clicked N/A N/A N/A selection N/A N/A N/A utils dg validateSelection type transform msg Please select your hip object and then the twist object to constrain. exact 2 N/A pelvis N/A N/A cmds textFieldGrp input_pelvis q True tx True N/A N/A N/A N/A utils dg verifyNode pelvis N/A N/A N/A cmds am_hipConstraint N/A selection N/A 1 pelvisObject pelvis hipObject N/A selection N/A 0 ha N/A N/A cmds floatFieldGrp input_hipAimAxis q True v True hf N/A N/A cmds floatFieldGrp input_hipFrontAxis q True v True pa N/A N/A cmds floatFieldGrp input_pelvisAimAxis q True v True pf N/A N/A cmds floatFieldGrp input_pelvisFrontAxis q True v True N/A N/A N/A N/A N/A unitTest N/A N/A N/A N/A N/A A simple unit test for the am_hipConstraint command N/A jr 0.1 N/A pelvis N/A N/A cmds joint n pelvis p N/A 0 2 0 rad jr N/A N/A N/A cmds select cl True N/A hip N/A N/A cmds joint n hip p N/A 0.4 2 0 rad jr N/A knee N/A N/A cmds joint n knee p N/A 0.4 1.05 0.1 rad jr N/A N/A N/A cmds joint hip e True oj xzy sao zup N/A foot N/A N/A cmds joint n foot p N/A 0.4 0.1 0 rad jr N/A N/A N/A cmds joint knee e True oj xzy sao zup N/A N/A N/A cmds joint foot e True o N/A 0 0 0 N/A N/A N/A cmds parent hip pelvis N/A N/A N/A cmds select hip N/A twist N/A N/A cmds joint n twist rad N/A jr 2 N/A ---TESTING CREATE--- verifyObjects N/A N/A outNum hcNode expPelvis expHip expTwist N/A N/A N/A Print test results N/A N/A %s (test %i): N/A hcNode outNum N/A N/A 	pelvis: %s N/A expPelvis N/A N/A cmds am_hipConstraint hcNode q True p True N/A N/A 	hip:    %s N/A expHip N/A N/A cmds am_hipConstraint hcNode q True h True N/A N/A 	twist:  %s N/A expTwist N/A N/A N/A cmds listConnections N/A %s.rotate hcNode scn True N/A 0 N/A N/A hc N/A N/A cmds am_hipConstraint N/A pelvis hip twist N/A N/A verifyObjects 0 hc pelvis hip twist N/A N/A N/A cmds delete hc N/A hc N/A N/A cmds am_hipConstraint N/A hip twist pelvisObject pelvis N/A N/A verifyObjects 1 hc pelvis hip twist N/A N/A N/A cmds delete hc N/A hc N/A N/A cmds am_hipConstraint N/A pelvis twist hipObject hip N/A N/A verifyObjects 2 hc pelvis hip twist compareVectors N/A N/A listVec tupleVec N/A N/A N/A Return test result comparing vectors N/A N/A N/A N/A listVec N/A 0 N/A tupleVec N/A 0 N/A N/A listVec N/A 1 N/A tupleVec N/A 1 N/A N/A listVec N/A 2 N/A tupleVec N/A 2 N/A verifyValues N/A N/A outNum hcNode expHa expHf expPa expPf N/A N/A N/A Print test results N/A N/A %s (test %i): N/A hcNode outNum N/A N/A 	ha: %s N/A expHa N/A N/A cmds am_hipConstraint hcNode q True ha True N/A N/A 	hf: %s N/A expHf N/A N/A cmds am_hipConstraint hcNode q True hf True N/A N/A 	pa: %s N/A expPa N/A N/A cmds am_hipConstraint hcNode q True pa True N/A N/A 	pf: %s N/A expPf N/A N/A cmds am_hipConstraint hcNode q True pf True N/A N/A ---TESTING EDIT--- N/A N/A N/A cmds am_hipConstraint hc e True p foot N/A N/A verifyObjects 0 hc foot hip twist N/A N/A N/A cmds am_hipConstraint hc e True h pelvis N/A N/A verifyObjects 1 hc foot pelvis twist N/A N/A N/A cmds am_hipConstraint hc e True h hip p pelvis N/A N/A verifyObjects 2 hc pelvis hip twist N/A ha N/A 2 0 0 N/A hf N/A 0 0 2 N/A pa N/A 1.5 0 0 N/A pf N/A 1.2 0 0 N/A N/A N/A cmds am_hipConstraint hc e True ha ha hf hf pa pa pf pf N/A N/A verifyValues 0 hc ha hf pa pf N/A ---TESTING QUERY--- N/A N/A hip:  %s N/A N/A N/A cmds am_hipConstraint hc q True h True N/A N/A N/A cmds listConnections N/A %s.hip hc N/A 0 N/A N/A pelv: %s N/A N/A N/A cmds am_hipConstraint hc q True p True N/A N/A N/A cmds listConnections N/A %s.pelvis hc N/A 0 N/A N/A hAim: %s N/A compareVectors N/A N/A cmds am_hipConstraint hc q True ha True N/A N/A N/A cmds getAttr N/A %s.hipAim hc N/A 0 N/A N/A hFor: %s N/A compareVectors N/A N/A cmds am_hipConstraint hc q True hf True N/A N/A N/A cmds getAttr N/A %s.hipFront hc N/A 0 N/A N/A pAim: %s N/A compareVectors N/A N/A cmds am_hipConstraint hc q True pa True N/A N/A N/A cmds getAttr N/A %s.pelvisAim hc N/A 0 N/A N/A pFor: %s N/A compareVectors N/A N/A cmds am_hipConstraint hc q True pf True N/A N/A N/A cmds getAttr N/A %s.pelvisFront hc N/A 0 N/A N/A N/A cmds select pelvis N/A