def getmanipulator(object):

    manipulator = "ATTR_manip_none"
    props = object.getAllProperties()

    for prop in props:
        if prop.name == "manipulator_type":
            manipulator = prop.data

    if manipulator == "ATTR_manip_none":
        return None

    manipulator_dict, cursorList = getManipulators()
    keys = sorted(manipulator_dict[manipulator].keys())
    for prop in props:
        if prop.name.startswith(manipulator):
            tmp = prop.name.split("_")
            key = tmp[len(tmp) - 1]

            for dict_key in keys:
                if dict_key.find(key) > 0:
                    key = dict_key
                    break

            manipulator_dict[manipulator][key] = prop.data

    manipulator_dict[manipulator]["99@manipulator-name"] = manipulator
    return manipulator_dict[manipulator]
コード例 #2
0
def getmanipulator(object):

    manipulator = 'ATTR_manip_none'
    props = object.getAllProperties()

    for prop in props:
        if prop.name == 'manipulator_type':
            manipulator = prop.data

    if manipulator == 'ATTR_manip_none':
        return None

    manipulator_dict,cursorList = getManipulators()
    keys = sorted(manipulator_dict[manipulator].keys())
    for prop in props:
        if prop.name.startswith(manipulator):
            tmp = prop.name.split('_')
            key = tmp[len(tmp)-1]

            for dict_key in keys:
                if dict_key.find(key) > 0:
                    key = dict_key
                    break

            manipulator_dict[manipulator][key] = prop.data

    manipulator_dict[manipulator]['99@manipulator-name'] = manipulator
    return manipulator_dict[manipulator]
コード例 #3
0
            if type(field_val).__name__ == 'int':
                Draw.Number('', event_id, x + 100, y, 80, CONTROLSIZE,
                            int(field_val), -50000, 50000, '',
                            manipulatordatacallback)

            y -= 20
            event_id += 1

    return valid


if __name__ == '__main__' and getparents():

    # Init manipulator data
    manipulator_dict, cursorList = getManipulators()
    for ii in manipulator_dict.keys():
        manipulatorList.append(ii)

    (manipulator, cursor) = getmanipulatorvals()
    manipulators.append(manipulator)
    cursors.append(cursor)

    bonecount = len(bones)
    # Get values for other bones in armature too
    for bone in armature.getData().bones.values():
        if bone not in bones:
            bones.append(bone)

    for bone in bones:
        dataref = bone.name.split('.')[0]
コード例 #4
0
            if type(field_val).__name__ == 'float':
                Draw.Number('', event_id, x+100, y, 80, CONTROLSIZE, field_val, -50000.0,50000.0, '', manipulatordatacallback)

            if type(field_val).__name__ == 'int':
                Draw.Number('', event_id, x+100, y, 80, CONTROLSIZE, int(field_val), -50000,50000, '', manipulatordatacallback)

            y -= 20
            event_id += 1

    return valid


if __name__=='__main__' and getparents():

    # Init manipulator data
    manipulator_dict,cursorList = getManipulators()
    for ii in manipulator_dict.keys():
        manipulatorList.append(ii)

    (manipulator, cursor) = getmanipulatorvals()
    manipulators.append(manipulator)
    cursors.append(cursor)

    bonecount=len(bones)
    # Get values for other bones in armature too
    for bone in armature.getData().bones.values():
        if bone not in bones:
            bones.append(bone)

    for bone in bones:
        dataref=bone.name.split('.')[0]