示例#1
0
def create(root=None):
    if not root:
        nodes, message = skeleton.get_root_skeletons()
        if not nodes:
            return 'failed', nodes, message
        root = nodes[0]
    input = get_input('biped')
    create_puppet(root, input)
示例#2
0
def create_puupet_data(data):    
    nodes = skeleton.get_root_skeletons()    
    if not nodes:
        return    
    pynode = core.PyNode(nodes[0])   
    if pynode.type() != generic.get_skeleton_type():
        return    
    if not core.objExists('%s.notes'%pynode.name()):        
        pynode.addAttr('notes', dt='string')   
    pynode.setAttr('notes', data)
    return True
示例#3
0
def get_puppet_data():
    node, message = skeleton.get_root_skeletons()
    if not node:
        return None, message 
    pynode = core.PyNode(node)   
    if pynode.type() != generic.get_skeleton_type():
        return None, 'Node type not match!...' 
    if not core.objExists('%s.notes'%pynode.name()):        
        return None, 'Wrong configure!...' 
    data = pynode.getAttr('notes')
    # dict_data = ast.literal_eval(data)
    dict_data = json.loads(data)
    return dict_data, 'success!...'
 def get_nodes(self):
     node, message = skeleton.get_root_skeletons()
     if not node:
         return 'failed', node, message
     return 'success', node, message
示例#5
0
def get_root_skeletons():
    return skeleton.get_root_skeletons()