gear::xsi::applyop Namespace Reference
library to easily apply operators This is not a UI to create operator within xsi but make the scripting easier.
More...
Detailed Description
library to easily apply operators This is not a UI to create operator within xsi but make the scripting easier.
This file is part of GEAR.
GEAR is free software: you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/lgpl.html>.
Author: Jeremie Passerin geerem@hotmail.com
Company: Studio Nest (TM)
Date: 2010 / 11 / 15
- Author:
- Jeremie Passerin
Function Documentation
| def gear::xsi::applyop::pathCns |
( |
|
obj, |
|
|
|
curve, |
|
|
|
cnsType = 0, |
|
|
|
u = 0, |
|
|
|
tangent = False, |
|
|
|
upv = None, |
|
|
|
comp = False | |
|
) |
| | |
Apply a path constraint or curve constraint.
- Parameters:
-
| obj | X3DObject - Constrained object. |
| curve | Nurbcurve - Constraining Curve. |
| cnsType | Integer - 0 for Path Constraint ; 1 for Curve Constraint (Parametric). |
| u | Double - Position of the object on the curve (from 0 to 100 for path constraint, from 0 to 1 for Curve cns). |
| tangent | Boolean - Active tangent. |
| upv | X3DObject - Object that act as up vector. |
| comp | Boolean - Active constraint compensation. |
- Returns:
- the newly created constraint.
| def gear::xsi::applyop::poseCns |
( |
|
obj, |
|
|
|
master, |
|
|
|
comp = False, |
|
|
|
position = True, |
|
|
|
orientation = True, |
|
|
|
scaling = True | |
|
) |
| | |
Apply a pose constraint.
- Parameters:
-
| obj | X3DObject - Constrained object. |
| master | X3DObject - Constraining Object. |
| comp | Boolean - Active constraint compensation. |
| position | - Boolean - Active position constraint. |
| orientation | - Boolean - Active orientation constraint. |
| scaling | - Boolean - Active scaling constraint. |
- Returns:
- the newly created constraint.
| def gear::xsi::applyop::dirCns |
( |
|
obj, |
|
|
|
master, |
|
|
|
upv = None, |
|
|
|
comp = False, |
|
|
|
axis = "xy" | |
|
) |
| | |
Apply a direction constraint.
- Parameters:
-
| obj | X3DObject - Constrained object. |
| master | X3DObject - Constraining Object. |
| upv | X3DObject - None of you don't want to use up vector |
| comp | Boolean - Active constraint compensation. |
| axis | String - Define pointing axis and upvector axis |
- Returns:
- the newly created constraint.
| def gear::xsi::applyop::twoPointsCns |
( |
|
obj, |
|
|
|
master0, |
|
|
|
master1, |
|
|
|
comp = False | |
|
) |
| | |
Apply a pose constraint.
- Parameters:
-
| obj | X3DObject - Constrained object. |
| master0 | X3DObject - First constraining Object. |
| master1 | X3DObject - Last constraining Object. |
| comp | Boolean - Active constraint compensation. |
- Returns:
- the newly created constraint.
| def gear::xsi::applyop::clsCtrOp |
( |
|
obj, |
|
|
|
center, |
|
|
|
pointIndexes | |
|
) |
| | |
Apply a cluster center operator.
- Parameters:
-
| obj | Geometry - A Polymesh, NurbMesh or NurbCurve to be constrained. |
| center | X3DObject - Constraining Object. |
| pointIndexes | List of Integer - List of point index to constraint. |
- Returns:
- the newly created operator.
| def gear::xsi::applyop::spinePointAtOp |
( |
|
cns, |
|
|
|
startobj, |
|
|
|
endobj, |
|
|
|
blend = .5 | |
|
) |
| | |
Apply a SpinePointAt operator.
- Parameters:
-
| cns | Constraint - The constraint to apply the operator on (must be a curve, path or direction constraint) |
| startobj | X3DObject - Start Reference. |
| endobj | X3DObject -End Reference. |
| blend | Double - Blend influence value from 0 to 1. |
- Returns:
- the newly created operator.
| def gear::xsi::applyop::sn_xfspring_op |
( |
|
out, |
|
|
|
mode = 2 | |
|
) |
| | |
Apply a sn_xfspring_op operator.
- Parameters:
-
| out | X3DObject - constrained Object. |
| mode | Integer - 0 Scaling, 1 Rotation, 2 Translation, 3 SR, 4 RT, 5 ST, 6 SRT |
- Returns:
- the newly created operator.
| def gear::xsi::applyop::sn_rotspring_op |
( |
|
out |
) |
|
Apply a sn_rotspring_op operator.
- Parameters:
-
- Returns:
- the newly created operator.
| def gear::xsi::applyop::sn_ik2bone_op |
( |
|
out = [], |
|
|
|
root = None, |
|
|
|
eff = None, |
|
|
|
upv = None, |
|
|
|
lengthA = 5, |
|
|
|
lengthB = 3, |
|
|
|
negate = False | |
|
) |
| | |
Apply a sn_ik2bone_op operator.
- Parameters:
-
| out | List of X3DObject - The constrained outputs order must be respected (BoneA, BoneB, Center, CenterN, Eff), set it to None if you don't want one of the output. |
| root | X3DObject - Object that will act as the root of the chain. |
| eff | X3DObject - Object that will act as the eff controler of the chain. |
| upv | X3DObject - Object that will act as the up vector of the chain. |
| lengthA | Double - Length of first bone. |
| lengthB | Double - Length of second bone. |
| negate | Boolean - Use with negative Scale. |
- Returns:
- the newly created operator.
| def gear::xsi::applyop::sn_ikfk2bone_op |
( |
|
out = [], |
|
|
|
root = None, |
|
|
|
eff = None, |
|
|
|
upv = None, |
|
|
|
fk0 = None, |
|
|
|
fk1 = None, |
|
|
|
fk2 = None, |
|
|
|
lengthA = 5, |
|
|
|
lengthB = 3, |
|
|
|
negate = False, |
|
|
|
blend = 0, |
|
|
|
lang = CPP | |
|
) |
| | |
Apply a sn_ikfk2bone_op operator.
- Parameters:
-
| out | List of X3DObject - The constrained outputs order must be respected (BoneA, BoneB, Center, CenterN, Eff), set it to None if you don't want one of the output. |
| root | X3DObject - Object that will act as the root of the chain. |
| eff | X3DObject - Object that will act as the eff controler of the chain. |
| upv | X3DObject - Object that will act as the up vector of the chain. |
| fk0 | X3DObject - Object that will act as the first fk controler of the chain. |
| fk1 | X3DObject - Object that will act as the second fk controler of the chain. |
| fk2 | X3DObject - Object that will act as the fk effector controler of the chain. |
| lengthA | Double - Length of first bone. |
| lengthB | Double - Length of second bone. |
| negate | Boolean - Use with negative Scale. |
| blend | Double - Default blend value (0 for full ik, 1 for full fk). |
- Returns:
- the newly created operator.
| def gear::xsi::applyop::sn_stretchChain_op |
( |
|
root, |
|
|
|
ik_ctl | |
|
) |
| | |
Apply a sn_stretchChain_op operator.
- Parameters:
-
| root | ChainRoot - Root of the chain to apply the operator to. |
| ik_ctl | X3DObject - Object that will act as the eff controler of the chain. |
- Returns:
- the newly created operator.
| def gear::xsi::applyop::sn_stretchChainMulti_op |
( |
|
root, |
|
|
|
ik_ctl | |
|
) |
| | |
Apply a sn_stretchChainMulti_op operator.
- Parameters:
-
| root | ChainRoot - Root of the chain to apply the operator to. |
| ik_ctl | X3DObject - Object that will act as the eff controler of the chain. |
- Returns:
- the newly created operator.
| def gear::xsi::applyop::sn_interLocalOri_op |
( |
|
out, |
|
|
|
refA, |
|
|
|
refB, |
|
|
|
blend = 0 | |
|
) |
| | |
Apply a sn_interLocalOri_op operator.
- Parameters:
-
| out | X3DObject - constrained Object. |
| refA | X3DObject - |
| refB | X3DObject - |
| blend | Double - |
- Returns:
- the newly created operator.
| def gear::xsi::applyop::sn_splinekine_op |
( |
|
out, |
|
|
|
ctrl = [], |
|
|
|
u = .5 | |
|
) |
| | |
Apply a sn_splinekine_op operator.
- Parameters:
-
| out | X3DObject - constrained Object. |
| ctrl | List of X3DObject - Objects that will act as controler of the bezier curve. |
| u | Double - Position of the object on the bezier curve (from 0 to 1). |
- Returns:
- the newly created operator.
| def gear::xsi::applyop::sn_rollsplinekine_op |
( |
|
out, |
|
|
|
ctrl = [], |
|
|
|
u = .5 | |
|
) |
| | |
Apply a sn_rollsplinekine_op operator.
- Parameters:
-
| out | X3DObject - constrained Object. |
| ctrl | List of X3DObject - Objects that will act as controler of the bezier curve. Objects must have a parent that will be used as an input for the operator. |
| u | Double - Position of the object on the bezier curve (from 0 to 1). |
- Returns:
- the newly created operator.
| def gear::xsi::applyop::sn_curveslide_op |
( |
|
crv |
) |
|
Apply a sn_curveslide_op operator.
- Parameters:
-
| crv | NurbeCurve - In / Out curve. |
- Returns:
- the newly created operator.
| def gear::xsi::applyop::sn_curveslide2_op |
( |
|
outcrv, |
|
|
|
incrv, |
|
|
|
position = 0, |
|
|
|
maxstretch = 1, |
|
|
|
maxsquash = 1, |
|
|
|
softness = 0 | |
|
) |
| | |
Apply a sn_curveslide2_op operator.
- Parameters:
-
| outcrv | NurbeCurve - Out Curve. |
| incrv | NurbeCurve - In Curve. |
| position | Double - Default position value (from 0 to 1). |
| maxstretch | Double - Default maxstretch value (from 1 to infinite). |
| maxsquash | Double - Default maxsquash value (from 0 to 1). |
| softness | Double - Default softness value (from 0 to 1). |
- Returns:
- the newly created operator.
| def gear::xsi::applyop::sn_curvelength_op |
( |
|
out, |
|
|
|
crv | |
|
) |
| | |
Apply a sn_curvelength_op operator.
- Parameters:
-
| out | Parameter - The output of the curve length value. |
| crv | NurbeCurve - In Curve. |
- Returns:
- the newly created operator.
| def gear::xsi::applyop::sn_squashstretch_op |
( |
|
out, |
|
|
|
u = .5, |
|
|
|
length = 5 | |
|
) |
| | |
Apply a sn_squashstretch_op operator.
- Parameters:
-
| out | X3DObject - Constrained object. |
| u | Double - Position of the object on the S&S curve. |
| length | Double - Rest Length of the S&S. |
- Returns:
- the newly created operator.
| def gear::xsi::applyop::sn_squashstretch2_op |
( |
|
out, |
|
|
|
sclref, |
|
|
|
length = 5, |
|
|
|
axis = "x" | |
|
) |
| | |
Apply a sn_squashstretch2_op operator.
- Parameters:
-
| out | X3DObject - Constrained object. |
| sclref | X3DObject - Global scaling reference object. |
| length | Double - Rest Length of the S&S. |
| axis | String - 'x' for scale all except x axis... |
- Returns:
- the newly created operator.
| def gear::xsi::applyop::sn_null2curve_op |
( |
|
out, |
|
|
|
driver, |
|
|
|
upv, |
|
|
|
crv0, |
|
|
|
crv1 = None | |
|
) |
| | |
Apply a sn_null2curve_op operator.
- Parameters:
-
| out | X3DObject - Constrained object. |
| driver | X3DObject - Driving object. |
| upv | X3DObject - Up Vector. |
| crv0 | NurbsCurve - Curve to constraint the object on. |
| crv1 | NurbsCurve - Curve Use as reference (if None, crv0 is used). |
- Returns:
- the newly created operator.
| def gear::xsi::applyop::sn_null2surface_op |
( |
|
out, |
|
|
|
driver, |
|
|
|
upv, |
|
|
|
srf0, |
|
|
|
srf1 = None | |
|
) |
| | |
Apply a sn_null2surface_op operator.
- Parameters:
-
| out | X3DObject - Constrained object. |
| driver | X3DObject - Driving object. |
| upv | X3DObject - Up Vector. |
| srf0 | NurbsSurface - NurbsSurface to constraint the object on. |
| srf1 | NurbsSurface - NurbsSurface Use as reference (if None, srf0 is used). |
- Returns:
- the newly created operator.
| def gear::xsi::applyop::sn_inverseRotorder_op |
( |
|
out_obj, |
|
|
|
in_obj | |
|
) |
| | |
Apply a sn_inverseRotorder_op operator.
- Parameters:
-
| out | X3DObject - Constrained object. |
| driver | X3DObject - Driving object. |
| upv | X3DObject - Up Vector. |
| srf0 | NurbsSurface - NurbsSurface to constraint the object on. |
| srf1 | NurbsSurface - NurbsSurface Use as reference (if None, srf0 is used). |
- Returns:
- the newly created operator.
| def gear::xsi::applyop::sn_pointAt_op |
( |
|
out_obj, |
|
|
|
target, |
|
|
|
upv | |
|
) |
| | |
Apply a sn_pointAt_op operator.
- Parameters:
-
| out_obj | X3DObject - Constrained object. |
| target | X3DObject |
| upv | X3DObject |
- Returns:
- the newly created operator.
| def gear::xsi::applyop::createJSOpFromFile |
( |
|
name, |
|
|
|
path, |
|
|
|
outputPorts, |
|
|
|
inputPorts, |
|
|
|
paramDefs = [] | |
|
) |
| | |
Create a JScript operator from given file.
- Parameters:
-
| name | String - Name of the operator |
| path | String - Path to the file that define the operator |
| outputPorts | List of Objects - Object to be connected as outputs |
| inputPorts | List of Objects - Object to be connected as inputs |
| paramDefs | List of Parameter Definition to create |
- Returns:
- the newly created operator.