COMPONENT GUIDE. More...
Public Member Functions | |
def | __init__ |
Init method. More... | |
def | postInit |
Define the objects name and categories. More... | |
def | initialHierarchy |
Initial hierachy. More... | |
def | addObjects |
Create the objects of the guide. More... | |
def | addParameters |
Create the parameter definitions of the guide. More... | |
def | addLayout |
Define the layout attached to the parameters. More... | |
def | addLogic |
Define the logic attached to the ppg. More... | |
def | setFromHierarchy |
def | setFromXml |
def | getAsXml |
Return the guide as an xml definition. More... | |
def | draw |
Draw the guide in the scene. More... | |
def | drawFromUI |
Launch a pick session to get the position of the guide, then draw the guide in the scene. More... | |
def | drawFromXml |
def | pickPositions |
Launch a pick session to get the position of the guide. More... | |
def | drawRef |
Create a temporary null to display the picked position. More... | |
def | setIndex |
Update the component index to get the next valid one. More... | |
def | symmetrize |
Inverse the transform of each element of the guide. More... | |
def | rename |
Rename the component. More... | |
def | addRoot |
Add a root object to the guide. More... | |
def | addLoc |
Add a loc object to the guide. More... | |
def | addLocMulti |
Add multiple loc objects to the guide. More... | |
def | addCurve |
Add a curve object to the guide. More... | |
def | addCurve2 |
Add a curve object to the guide. More... | |
def | addBlade |
Add a blade object to the guide. More... | |
def | addDispCurve |
Add a display curve object to the guide. More... | |
def | getObjects |
def | addMinMax |
def | getSize |
def | getName |
Return the fullname of given element of the component. More... | |
def | getFullName |
Return the fullname of the component. More... | |
def | getType |
Return the type of the component. More... | |
def | getObjectNames |
def | getVersion |
Public Member Functions inherited from gear.xsi.rig.guide.MainGuide | |
def | __init__ |
def | addParameters |
Add more parameter to the parameter definition list. More... | |
def | addLayout |
Add layout for new parameters. More... | |
def | addLogic |
Add logic for new layout. More... | |
def | addProperty |
Add a property (sn_PSet) with all the parameters from the parameter definition list. More... | |
def | getParametersAsXml |
def | setParamDefValue |
Set the value of parameter with matching scriptname. More... | |
def | setParamDefValuesFromProperty |
Set the parameter values from given property. More... | |
def | setParamDefValuesFromXml |
Set the parameter values from given xml defintion. More... | |
def | addParam |
Add a paramDef to the list. More... | |
def | addFCurveParam |
Add a paramDef to the list. More... | |
def | addToGroup |
Add the object to a group. More... | |
Public Attributes | |
paramNames | |
paramDefs | |
List of parameter name cause it's actually important to keep them sorted. More... | |
values | |
Dictionary of parameter definition. More... | |
layout | |
Dictionary of options values. More... | |
logic | |
PPGLayout object. More... | |
valid | |
PPGLogic object. More... | |
root | |
id | |
parentComponent | |
parentLocalName | |
tra | |
atra | |
dictionary of global transform | |
pos | |
list of global transform | |
apos | |
dictionary of global postion | |
prim | |
list of global position | |
blades | |
List of primitive. | |
size | |
root_size | |
pick_transform | |
save_transform | |
User will have to pick the position of this object name. | |
save_primitive | |
Transform of object name in this list will be saved. | |
save_blade | |
Primitive of object name in this list will be saved. | |
minmax | |
Normal and BiNormal of object will be saved. | |
pCompType | |
pCompName | |
pCompSide | |
pCompIndex | |
pConnector | |
pUIHost | |
pSetGrp | |
pCtlGrp | |
model | |
settings | |
parent | |
Public Attributes inherited from gear.xsi.rig.guide.MainGuide | |
paramNames | |
paramDefs | |
List of parameter name cause it's actually important to keep them sorted. More... | |
values | |
Dictionary of parameter definition. More... | |
layout | |
Dictionary of options values. More... | |
logic | |
PPGLayout object. More... | |
valid | |
PPGLogic object. More... | |
Static Public Attributes | |
string | compType = "component" |
string | compName = "component" |
Component type. | |
string | compSide = "C" |
Component default name. | |
int | compIndex = 0 |
string | description = "" |
Component default index. | |
list | connectors = [] |
Description of the component. | |
list | compatible = [] |
string | ctl_grp = "" |
Properties | |
fullName = property(getFullName) | |
type = property(getType) | |
objectNames = property(getObjectNames) | |
COMPONENT GUIDE.
Main class for component guide creation.
This class handles all the parameters and objectDefs creation.
It also now how to parse its own hierachy of object to retrieve position and transform.
Finally it also now how to export itself as xml_node.
def gear.xsi.rig.component.guide.ComponentGuide.__init__ | ( | self | ) |
Init method.
self | |
ref | an xml definition or a SI3DObject |
def gear.xsi.rig.component.guide.ComponentGuide.addBlade | ( | self, | |
name, | |||
parentPos, | |||
parentDir, | |||
negate = False |
|||
) |
Add a blade object to the guide.
This mehod can initialize the object or draw it.
Blade object is a 3points curve to define a plan in the guide.
self | |
name | String - Local name of the element. |
parentPos | X3DObject - The parent of the element. |
parentDir | X3DObject - The direction constraint of the element. return X3DObject - The created blade curve. |
def gear.xsi.rig.component.guide.ComponentGuide.addCurve | ( | self, | |
name, | |||
parent, | |||
points = [] , |
|||
close = False , |
|||
degree = 1 , |
|||
position = None |
|||
) |
Add a curve object to the guide.
This mehod can initialize the object or draw it.
Curve object is a curve that can be use in the final rig.
self | |
name | String - Local name of the element. |
parent | X3DObject - parent guide object. |
points | List of Double - list of point position. |
degree | Int4 - Curve degree. |
position | SIVector3 - The default position of the element. Pick sesssion is launch if none. return X3DObject - The created curve. |
def gear.xsi.rig.component.guide.ComponentGuide.addCurve2 | ( | self, | |
name, | |||
parent, | |||
points = [] , |
|||
close = False , |
|||
degree = 1 , |
|||
position = None |
|||
) |
Add a curve object to the guide.
This mehod can initialize the object or draw it.
Curve object is a curve that can be use in the final rig.
self | |
name | String - Local name of the element. |
parent | X3DObject - parent guide object. |
points | List of Double - list of point position. |
degree | Int4 - Curve degree. |
position | SIVector3 - The default position of the element. Pick sesssion is launch if none. return X3DObject - The created curve. |
def gear.xsi.rig.component.guide.ComponentGuide.addDispCurve | ( | self, | |
name, | |||
centers = [] , |
|||
degree = 1 |
|||
) |
Add a display curve object to the guide.
This mehod can initialize the object or draw it.
Display curve object is a simple curve to show the connection between different guide element.
self | |
name | String - Local name of the element. |
centers | List of X3DObject - List of parent of the curve. |
degree | Int4 - Curve degree. return X3DObject - The created display curve. |
def gear.xsi.rig.component.guide.ComponentGuide.addLayout | ( | self | ) |
Define the layout attached to the parameters.
REIMPLEMENT. This method should be reimplemented in each component.
self |
def gear.xsi.rig.component.guide.ComponentGuide.addLoc | ( | self, | |
name, | |||
parent, | |||
position = None |
|||
) |
Add a loc object to the guide.
This mehod can initialize the object or draw it.
Loc object is a simple null to define a position or a tranformation in the guide.
self | |
name | String - Local name of the element. |
parent | X3DObject - The parent of the element. |
position | SIVector3 - The default position of the element. Pick sesssion is launch if none. return X3DObject - The created loc null. |
def gear.xsi.rig.component.guide.ComponentGuide.addLocMulti | ( | self, | |
name, | |||
parent, | |||
updateParent = True |
|||
) |
Add multiple loc objects to the guide.
This mehod can initialize the object or draw it.
Loc object is a simple null to define a position or a tranformation in the guide.
self | |
name | String - Local name of the element. |
parent | X3DObject - The parent of the element. |
minimum | Int - The minimum number of loc. |
maximum | Int - The maximum number of loc. |
updateParent | - update the parent reference or keep the same for all loc return List of X3DObject - The created loc nulls in a list. |
def gear.xsi.rig.component.guide.ComponentGuide.addLogic | ( | self | ) |
Define the logic attached to the ppg.
REIMPLEMENT. This method should be reimplemented in each component.
self |
def gear.xsi.rig.component.guide.ComponentGuide.addMinMax | ( | self, | |
name, | |||
minimum = 1 , |
|||
maximum = -1 |
|||
) |
self |
def gear.xsi.rig.component.guide.ComponentGuide.addObjects | ( | self | ) |
Create the objects of the guide.
REIMPLEMENT. This method should be reimplemented in each component.
self |
def gear.xsi.rig.component.guide.ComponentGuide.addParameters | ( | self | ) |
Create the parameter definitions of the guide.
REIMPLEMENT. This method should be reimplemented in each component.
self |
def gear.xsi.rig.component.guide.ComponentGuide.addRoot | ( | self | ) |
Add a root object to the guide.
This mehod can initialize the object or draw it.
Root object is a simple null with a specific display and a setting property.
self | return X3DObject - The created root null. |
def gear.xsi.rig.component.guide.ComponentGuide.draw | ( | self, | |
parent | |||
) |
Draw the guide in the scene.
param self param parent X3DObject - Parent object.
def gear.xsi.rig.component.guide.ComponentGuide.drawFromUI | ( | self, | |
parent | |||
) |
Launch a pick session to get the position of the guide, then draw the guide in the scene.
param self param parent X3DObject - Parent object.
def gear.xsi.rig.component.guide.ComponentGuide.drawRef | ( | self, | |
t | |||
) |
Create a temporary null to display the picked position.
param self param t SITransformation - The transformation of the reference object. return Null - The newly created reference null.
def gear.xsi.rig.component.guide.ComponentGuide.getAsXml | ( | self | ) |
Return the guide as an xml definition.
param self
def gear.xsi.rig.component.guide.ComponentGuide.getFullName | ( | self | ) |
Return the fullname of the component.
self |
def gear.xsi.rig.component.guide.ComponentGuide.getName | ( | self, | |
name | |||
) |
Return the fullname of given element of the component.
self | |
name | String - Localname of the element. |
def gear.xsi.rig.component.guide.ComponentGuide.getObjectNames | ( | self | ) |
self |
def gear.xsi.rig.component.guide.ComponentGuide.getObjects | ( | self, | |
model | |||
) |
self | model |
def gear.xsi.rig.component.guide.ComponentGuide.getSize | ( | self | ) |
self |
def gear.xsi.rig.component.guide.ComponentGuide.getType | ( | self | ) |
Return the type of the component.
self |
def gear.xsi.rig.component.guide.ComponentGuide.initialHierarchy | ( | self | ) |
Initial hierachy.
It's no more than the basic set of parameters and layout needed for the setting property.
self |
def gear.xsi.rig.component.guide.ComponentGuide.pickPositions | ( | self | ) |
Launch a pick session to get the position of the guide.
param self return Boolean - False if pick session was aborded at anytime.
def gear.xsi.rig.component.guide.ComponentGuide.postInit | ( | self | ) |
Define the objects name and categories.
REIMPLEMENT. This method should be reimplemented in each component.
self |
def gear.xsi.rig.component.guide.ComponentGuide.rename | ( | self, | |
prop | |||
) |
Rename the component.
Rename use the value of the setting property.
@param | prop Property - The setting property of the component to remame. |
def gear.xsi.rig.component.guide.ComponentGuide.setIndex | ( | self, | |
model | |||
) |
Update the component index to get the next valid one.
self | |
parent | X3DObject - The parent object of the guide. |
def gear.xsi.rig.component.guide.ComponentGuide.symmetrize | ( | self | ) |
Inverse the transform of each element of the guide.
self |
gear.xsi.rig.component.guide.ComponentGuide.layout |
Dictionary of options values.
gear.xsi.rig.component.guide.ComponentGuide.logic |
PPGLayout object.
gear.xsi.rig.component.guide.ComponentGuide.paramDefs |
List of parameter name cause it's actually important to keep them sorted.
gear.xsi.rig.component.guide.ComponentGuide.valid |
PPGLogic object.
gear.xsi.rig.component.guide.ComponentGuide.values |
Dictionary of parameter definition.