patch [#23110] isolate render type UI labelling + operator to clear all hide render...
authorNathan Letwory <nathan@letworyinteractive.com>
Fri, 30 Jul 2010 23:25:26 +0000 (23:25 +0000)
committerNathan Letwory <nathan@letworyinteractive.com>
Fri, 30 Jul 2010 23:25:26 +0000 (23:25 +0000)
release/scripts/op/object.py
release/scripts/ui/space_view3d.py

index 0b052195541919bdb003f6737245434ee2a87b7f..403491bfa28fde860565017da4ad93d7cf52371e 100644 (file)
@@ -528,9 +528,9 @@ class MakeDupliFace(bpy.types.Operator):
 
 
 class IsolateTypeRender(bpy.types.Operator):
-    '''Select object matching a naming pattern'''
+    '''Hide unselected render objects of same type as active by setting the hide render flag'''
     bl_idname = "object.isolate_type_render"
-    bl_label = "Isolate Render Selection"
+    bl_label = "Restrict Render Unselected"
     bl_options = {'REGISTER', 'UNDO'}
 
     def execute(self, context):
@@ -545,6 +545,17 @@ class IsolateTypeRender(bpy.types.Operator):
                     obj.hide_render = True
 
         return {'FINISHED'}
+        
+class ClearAllRestrictRender(bpy.types.Operator):
+    '''Reveal all render objects by setting the hide render flag'''
+    bl_idname = "object.hide_render_clear_all"
+    bl_label = "Clear All Restrict Render"
+    bl_options = {'REGISTER', 'UNDO'}
+
+    def execute(self, context):
+        for obj in context.scene.objects:
+               obj.hide_render = False
+        return {'FINISHED'}
 
 
 classes = [
@@ -555,7 +566,8 @@ classes = [
     ShapeTransfer,
     JoinUVs,
     IsolateTypeRender,
-    MakeDupliFace]
+    MakeDupliFace,
+    ClearAllRestrictRender]
 
 
 def register():
@@ -570,4 +582,4 @@ def unregister():
         unregister(cls)
 
 if __name__ == "__main__":
-    register()
+    register()
\ No newline at end of file
index 5d22c3b41bb7d07272e97ad0b1ee9b2ff4e55123..7b59b00dc566a0a6afde5dff88969b45055dd15b 100644 (file)
@@ -791,7 +791,7 @@ class VIEW3D_MT_object_specials(bpy.types.Menu):
         layout.separator()
 
         props = layout.operator("object.isolate_type_render")
-
+        props = layout.operator("object.hide_render_clear_all")
 
 class VIEW3D_MT_object_apply(bpy.types.Menu):
     bl_label = "Apply"
@@ -2388,4 +2388,4 @@ def unregister():
         unregister(cls)
 
 if __name__ == "__main__":
-    register()
+    register()
\ No newline at end of file