gear_mc
 All Classes Namespaces Functions Variables
Classes | Functions | Variables
gear.xsi.animation Namespace Reference

xsi animation methods, keys, mirror animation, apply action... test More...

Classes

class  PlayControl
 PLAYCONTROL. More...
 

Functions

def getKeyableParameters
 KEYS. More...
 
def setKey
 Set a key on keyable parameters for given controler at current keyable frame. More...
 
def createMirrorCnxTemplate
 MIRROR. More...
 
def addMirroringRule
 Adding a mirroring rul to the connection grid for given controlers. More...
 
def mirror
 Transfer the pose/animation of givben controlers according to the rules define in the connection template. More...
 
def invertSource
 Inverse the source value. More...
 
def applyAction
 ACTION. More...
 

Variables

string MIRROR_PROP_NAME = "mirror_cnx"
 

Detailed Description

xsi animation methods, keys, mirror animation, apply action... test

    This file is part of GEAR_mc.
    GEAR_mc is a fork of Jeremie Passerin's GEAR project.

    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  www.jeremiepasserin.com
    Fork Author:  Miquel Campos       hello@miqueltd.com  www.miqueltd.com
    Date:       2013 / 08 / 16
Author
Jeremie Passerin

Function Documentation

def gear.xsi.animation.addMirroringRule (   ctl,
  cnx_grid,
  inversed_params = [],
  delUnused = False 
)

Adding a mirroring rul to the connection grid for given controlers.

Parameters
ctlX3DObject - Controler to add to the mirroring template
cnx_gridGrid - The connection grid
inversed_paramsList of String - List of the fullname of parameters to inverse
delUnusedBoolean - True to remove rules that mirror to themself
Returns
Dictionary - Connections
def gear.xsi.animation.applyAction (   model,
  action_name,
  controlers = None 
)

ACTION.

Apply action to model for given controlers

Parameters
modelModel - model to apply the action to
action_nameString - Name of the action to apply XSICollection - Controlers to apply the action to (None, to apply to all)
def gear.xsi.animation.createMirrorCnxTemplate (   model,
  in_controlers = None 
)

MIRROR.

======================================================== Create the mirror connection template

Parameters
modelModel - Model to add the template to
in_controlersXSICollection - Controlers to add to the template
Returns
Grid
def gear.xsi.animation.getKeyableParameters (   in_controlers)

KEYS.

======================================================== Return a collection of keyable parameters for input objects

Parameters
in_controlersXSICollection
Returns
XSICollection of Parameters
def gear.xsi.animation.invertSource (   source)

Inverse the source value.

Parameters
source
def gear.xsi.animation.mirror (   controlers = xsi.Selection,
  animation = False,
  frame_offset = 0,
  considerTime = False,
  frame_in = 0,
  frame_out = 0 
)

Transfer the pose/animation of givben controlers according to the rules define in the connection template.

Parameters
controlersXSICollection - Controlers to mirror
animationBoolean - True to mirror the FCurve and not only the static value
frame_offsetInteger - Offset original animation
considerTimeBoolean - True to use the in and out frame
frame_inInteger - Start frame of animation to mirror
frame_outInteger - End frame of animation to mirror
def gear.xsi.animation.setKey (   controlers = xsi.Selection)

Set a key on keyable parameters for given controler at current keyable frame.

Parameters
controlersan XSI Collection of controler, if None, current selection is used
Returns
true if the controlers has been succefully keyed