Exemplo n.º 1
0
def import_from_tool_module_dict(tool_name):
    config = get_config()
    tool_modules = config["PIXO_RIGGING_TOOL_MODULES"]

    tool_mods = tool_modules[tool_name]
    
    mod = __import__ ("%s.%s"%(tool_mods, tool_name), (), (), [tool_name]);reload(mod)
    print "Launching from %s" %mod
    
    return mod
    
Description : ik utilities functions

Note : None

"""
#===============================================================================
# IMPORT
#===============================================================================
import pymel.core as pm
import logging

from lib.utils.utils_config import get_config
#===============================================================================
# LOGGER
#===============================================================================
config = get_config()
LOG_LEVEL = config["LOGGING_LEVEL"]
logger = logging.getLogger('  ')
logger.setLevel(LOG_LEVEL)

#===============================================================================
# FUNCTIONS
#===============================================================================
def add_stretchy_ik(ik_handle):
    """ create stretchy IK"""
    logger.debug("Running function.. (%s.add_strectchy_ik)" %__name__)    
    
    prefix = "%s_stretchy" %ik_handle.name()
    
    joints = ik_handle.getJointList()
    joints.extend(joints[-1].getChildren(type='joint'))