Пример #1
0
    def execute(self, context):

        delete_objs = []

        for obj in context.scene.objects:
            if obj.animation_data:
                for driver in obj.animation_data.drivers:
                    obj.driver_remove(driver.data_path)
            obj.select = True
            context.scene.objects.active = obj

            for mod in obj.modifiers:
                bpy.ops.object.modifier_apply(apply_as='DATA',
                                              modifier=mod.name)

            obj.lock_location = (False, False, False)
            obj.lock_scale = (False, False, False)
            obj.lock_rotation = (False, False, False)

            if obj.mv.type in {'CAGE', 'VPDIMX', 'VPDIMY', 'VPDIMZ'}:
                delete_objs.append(obj)

        utils.delete_obj_list(delete_objs)

        return {'FINISHED'}
Пример #2
0
 def execute(self, context):
     obj_bp = utils.get_bp(context.object,'PRODUCT')
     bool_list = []
     self.get_boolean_objects(obj_bp, bool_list)
     for bool_obj in bool_list:
         self.remove_referenced_modifiers(context, bool_obj)
     obj_list = []
     obj_list = utils.get_child_objects(obj_bp,obj_list)
     utils.delete_obj_list(obj_list)
     self.object_name = ""
     return {'FINISHED'}
Пример #3
0
 def cancel_drop(self,context,event):
     utils.delete_object_and_children(self.wall.obj_bp)
     context.window.cursor_set('DEFAULT')
     utils.delete_obj_list([self.drawing_plane])
     return {'FINISHED'}