Example #1
0
def _getActiveMeshObject(prop):
    objects = SceneOp(bpy.context).id_objects
    active_obj = objects.active
    if (active_obj and active_obj.type == 'MESH'
            and active_obj.mmd_type == 'NONE'):
        prop['active_mesh_index'] = objects.find(active_obj.name)
    return prop.get('active_mesh_index', -1)
Example #2
0
def _getActiveJointObject(prop):
    objects = SceneOp(bpy.context).id_objects
    active_obj = objects.active
    if mmd_model.isJointObject(active_obj):
        prop['active_joint_object_index'] = objects.find(active_obj.name)
    return prop.get('active_joint_object_index', 0)
Example #3
0
def _getActiveRigidbodyObject(prop):
    objects = SceneOp(bpy.context).id_objects
    active_obj = objects.active
    if mmd_model.isRigidBodyObject(active_obj):
        prop['active_rigidbody_object_index'] = objects.find(active_obj.name)
    return prop.get('active_rigidbody_object_index', 0)