Changeset View
Changeset View
Standalone View
Standalone View
oscurart_tools/oscurart_objects.py
| Context not available. | |||||
| class oscApplyModifiers (Operator): | class oscApplyModifiers (Operator): | ||||
| """Applys all the modifiers in the selected objects.(This does not work in objects with shapekeys)""" | """Applies all the modifiers in the selected objects.(This does not work in objects with shapekeys)""" | ||||
| bl_idname = "object.modifiers_apply_osc" | bl_idname = "object.modifiers_apply_osc" | ||||
| bl_label = "Apply modifiers" | bl_label = "Apply modifiers" | ||||
| bl_options = {"REGISTER", "UNDO"} | bl_options = {"REGISTER", "UNDO"} | ||||
| Context not available. | |||||
| class RenderOnlyInCamera (Operator): | class RenderOnlyInCamera (Operator): | ||||
| """Create two different groups, one group contains the objetcs that are in the camera frame, """ \ | """Create two different groups, one group contains the objects that are in the camera frame, """ \ | ||||
| """those that camera can see, and then a second group that contains the object that the camera can`t see""" | """those that camera can see, and then a second group that contains the object that the camera can`t see""" | ||||
| bl_idname = "group.group_in_out_camera" | bl_idname = "group.group_in_out_camera" | ||||
| bl_label = "Make a group for objects in outer camera" | bl_label = "Make a group for objects in outer camera" | ||||
| Context not available. | |||||
| # ------------------------ DUPLICATE OBJECTS SYMMETRY ------------------------ | # ------------------------ DUPLICATE OBJECTS SYMMETRY ------------------------ | ||||
| def duplicateSymmetrical(self, disconect): | def duplicateSymmetrical(self, disconnect): | ||||
| for objeto in bpy.context.selected_objects: | for objeto in bpy.context.selected_objects: | ||||
| bpy.ops.object.select_all(action='DESELECT') | bpy.ops.object.select_all(action='DESELECT') | ||||
| Context not available. | |||||
| 0].targets[ | 0].targets[ | ||||
| 0].transform_type = 'ROT_Z' | 0].transform_type = 'ROT_Z' | ||||
| if disconect is not True: | if disconnect is not True: | ||||
| bpy.ops.object.make_single_user(obdata=True, object=True) | bpy.ops.object.make_single_user(obdata=True, object=True) | ||||
| bpy.context.active_object.driver_remove("location") | bpy.context.active_object.driver_remove("location") | ||||
| bpy.context.active_object.driver_remove("rotation_euler") | bpy.context.active_object.driver_remove("rotation_euler") | ||||
| Context not available. | |||||