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)
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
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
def get_root_skeletons(): return skeleton.get_root_skeletons()