[Bf-extensions-cvs] SVN commit: /data/svn/bf-extensions [3424] contrib/py/scripts/addons/ oscurart_tools.py: Cleaning code by CodemanX

Eugenio Pignataro info at oscurart.com.ar
Wed May 30 01:49:03 CEST 2012


Revision: 3424
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-extensions&revision=3424
Author:   oscurart
Date:     2012-05-29 23:49:03 +0000 (Tue, 29 May 2012)
Log Message:
-----------
Cleaning code by CodemanX

Modified Paths:
--------------
    contrib/py/scripts/addons/oscurart_tools.py

Modified: contrib/py/scripts/addons/oscurart_tools.py
===================================================================
--- contrib/py/scripts/addons/oscurart_tools.py	2012-05-29 23:01:59 UTC (rev 3423)
+++ contrib/py/scripts/addons/oscurart_tools.py	2012-05-29 23:49:03 UTC (rev 3424)
@@ -28,8 +28,6 @@
     "tracker_url": "",
     "category": "Object"}
 
-
-
 import bpy
 import math
 import sys
@@ -40,12 +38,12 @@
 ## CREA PANELES EN TOOLS
 
 # VARIABLES DE ENTORNO
-bpy.types.Scene.osc_object_tools=bpy.props.BoolProperty(default=False)
-bpy.types.Scene.osc_mesh_tools=bpy.props.BoolProperty(default=False)
-bpy.types.Scene.osc_shapes_tools=bpy.props.BoolProperty(default=False)
-bpy.types.Scene.osc_render_tools=bpy.props.BoolProperty(default=False)
-bpy.types.Scene.osc_files_tools=bpy.props.BoolProperty(default=False)
-bpy.types.Scene.osc_overrides_tools=bpy.props.BoolProperty(default=False)
+bpy.types.Scene.osc_object_tools = bpy.props.BoolProperty(default=False)
+bpy.types.Scene.osc_mesh_tools = bpy.props.BoolProperty(default=False)
+bpy.types.Scene.osc_shapes_tools = bpy.props.BoolProperty(default=False)
+bpy.types.Scene.osc_render_tools = bpy.props.BoolProperty(default=False)
+bpy.types.Scene.osc_files_tools = bpy.props.BoolProperty(default=False)
+bpy.types.Scene.osc_overrides_tools = bpy.props.BoolProperty(default=False)
 
 # PANEL DE CONTROL
 class OscPanelControl(bpy.types.Panel):
@@ -54,228 +52,224 @@
     bl_label = "Oscurart Tools"
     def draw(self,context):
         active_obj = context.active_object
-        layout = self.layout             
-  
-        col = layout.column(align=1)         
-        col.prop(bpy.context.scene,"osc_object_tools",text="Object",icon="OBJECT_DATAMODE")
-        col.prop(bpy.context.scene,"osc_mesh_tools",text="Mesh",icon="EDITMODE_HLT")
-        col.prop(bpy.context.scene,"osc_shapes_tools",text="Shapes",icon="SHAPEKEY_DATA")
-        col.prop(bpy.context.scene,"osc_render_tools",text="Render",icon="SCENE")
-        col.prop(bpy.context.scene,"osc_files_tools",text="Files",icon="IMASEL")
-        col.prop(bpy.context.scene,"osc_overrides_tools",text="Overrides",icon="GREASEPENCIL")
+        layout = self.layout
 
+        col = layout.column(align=1)
+        col.prop(bpy.context.scene, "osc_object_tools", text="Object", icon="OBJECT_DATAMODE")
+        col.prop(bpy.context.scene, "osc_mesh_tools", text="Mesh", icon="EDITMODE_HLT")
+        col.prop(bpy.context.scene, "osc_shapes_tools", text="Shapes", icon="SHAPEKEY_DATA")
+        col.prop(bpy.context.scene, "osc_render_tools", text="Render", icon="SCENE")
+        col.prop(bpy.context.scene, "osc_files_tools", text="Files", icon="IMASEL")
+        col.prop(bpy.context.scene, "osc_overrides_tools", text="Overrides", icon="GREASEPENCIL")
 
+
 # POLLS
 class OscPollObject():
     bl_space_type = 'VIEW_3D'
     bl_region_type = 'TOOLS'
-    
+
     @classmethod
     def poll(cls, context):
-        return(context.scene.osc_object_tools == True)
-    
+        return context.scene.osc_object_tools
 
+
 class OscPollMesh():
     bl_space_type = 'VIEW_3D'
     bl_region_type = 'TOOLS'
-    
+
     @classmethod
     def poll(cls, context):
-        return(context.scene.osc_mesh_tools == True)    
+        return context.scene.osc_mesh_tools
 
 
 class OscPollShapes():
     bl_space_type = 'VIEW_3D'
     bl_region_type = 'TOOLS'
-    
+
     @classmethod
     def poll(cls, context):
-        return(context.scene.osc_shapes_tools == True)
+        return context.scene.osc_shapes_tools
 
 class OscPollRender():
     bl_space_type = 'VIEW_3D'
     bl_region_type = 'TOOLS'
-    
+
     @classmethod
     def poll(cls, context):
-        return(context.scene.osc_render_tools == True)
-    
+        return context.scene.osc_render_tools
+
 class OscPollFiles():
     bl_space_type = 'VIEW_3D'
     bl_region_type = 'TOOLS'
-    
+
     @classmethod
     def poll(cls, context):
-        return(context.scene.osc_files_tools == True)  
-    
+        return context.scene.osc_files_tools
+
 class OscPollOverrides():
     bl_space_type = 'VIEW_3D'
     bl_region_type = 'TOOLS'
-    
+
     @classmethod
     def poll(cls, context):
-        return(context.scene.osc_overrides_tools == True)       
+        return context.scene.osc_overrides_tools
 
 
-
-## PANELES    
+## PANELES
 class OscPanelObject(OscPollObject, bpy.types.Panel):
     bl_idname = "Oscurart Object Tools"
     bl_label = "Object Tools"
-        
+
     def draw(self, context):
         active_obj = context.active_object
-        layout = self.layout        
+        layout = self.layout
         col = layout.column(align=1)
-        row = col.row()           
-        
-        colrow = col.row(align=1)  
-        colrow.operator("objects.relink_objects_between_scenes",icon="LINKED")     
-        colrow.operator("objects.copy_objects_groups_layers",icon="LINKED")      
-        col.operator("object.distribute_apply_osc",icon="OBJECT_DATAMODE") 
+        row = col.row()
+
         colrow = col.row(align=1)
-        colrow.prop(bpy.context.scene,"SearchAndSelectOt",text="")
-        colrow.operator("object.search_and_select_osc",icon="ZOOM_SELECTED")       
+        colrow.operator("objects.relink_objects_between_scenes", icon="LINKED")
+        colrow.operator("objects.copy_objects_groups_layers", icon="LINKED")
+        col.operator("object.distribute_apply_osc", icon="OBJECT_DATAMODE")
         colrow = col.row(align=1)
-        colrow.prop(bpy.context.scene,"RenameObjectOt",text="")
-        colrow.operator("object.rename_objects_osc",icon="SHORTDISPLAY")  
-        col.operator("object.duplicate_object_symmetry_osc",icon="OBJECT_DATAMODE", text="Duplicate Object Symmetry")      
+        colrow.prop(bpy.context.scene, "SearchAndSelectOt", text="")
+        colrow.operator("object.search_and_select_osc", icon="ZOOM_SELECTED")
         colrow = col.row(align=1)
-        colrow.operator("object.modifiers_remove_osc",icon="MODIFIER", text="Remove Modifiers")
-        colrow.operator("object.modifiers_apply_osc",icon="MODIFIER", text="Apply Modifiers")
-        
+        colrow.prop(bpy.context.scene, "RenameObjectOt", text="")
+        colrow.operator("object.rename_objects_osc", icon="SHORTDISPLAY")
+        col.operator("object.duplicate_object_symmetry_osc", icon="OBJECT_DATAMODE", text="Duplicate Object Symmetry")
+        colrow = col.row(align=1)
+        colrow.operator("object.modifiers_remove_osc", icon="MODIFIER", text="Remove Modifiers")
+        colrow.operator("object.modifiers_apply_osc", icon="MODIFIER", text="Apply Modifiers")
 
+
 class OscPanelMesh(OscPollMesh, bpy.types.Panel):
     bl_idname = "Oscurart Mesh Tools"
     bl_label = "Mesh Tools"
-        
+
     def draw(self, context):
         active_obj = context.active_object
-        layout = self.layout        
+        layout = self.layout
         col = layout.column(align=1)
-        row = col.row()           
-        
-        col.operator("mesh.select_side_osc",icon="VERTEXSEL")  
-        col.operator("mesh.normals_outside_osc",icon="SNAP_NORMAL")       
+        row = col.row()
+
+        col.operator("mesh.select_side_osc", icon="VERTEXSEL")
+        col.operator("mesh.normals_outside_osc", icon="SNAP_NORMAL")
         colrow=col.row(align=1)
-        colrow.operator("mesh.resym_osc",icon="UV_SYNC_SELECT") 
-        colrow.operator("mesh.resym_vertex_weights_osc",icon="UV_SYNC_SELECT") 
-        colrow=col.row(align=1)        
+        colrow.operator("mesh.resym_osc", icon="UV_SYNC_SELECT")
+        colrow.operator("mesh.resym_vertex_weights_osc", icon="UV_SYNC_SELECT")
+        colrow=col.row(align=1)
         colrow.operator("file.export_groups_osc", icon='GROUP_VCOL')
-        colrow.operator("file.import_groups_osc", icon='GROUP_VCOL')        
+        colrow.operator("file.import_groups_osc", icon='GROUP_VCOL')
 
-        
+
 class OscPanelShapes(OscPollShapes, bpy.types.Panel):
     bl_idname = "Oscurart Shapes Tools"
     bl_label = "Shapes Tools"
-        
+
     def draw(self, context):
         active_obj = context.active_object
-        layout = self.layout        
+        layout = self.layout
         col = layout.column(align=1)
-        row = col.row()           
+        row = col.row()
 
-        col.operator("object.shape_key_to_objects_osc",icon="OBJECT_DATAMODE")
-        col.operator("mesh.create_lmr_groups_osc",icon="GROUP_VERTEX")
-        col.operator("mesh.split_lr_shapes_osc",icon="SHAPEKEY_DATA")
+        col.operator("object.shape_key_to_objects_osc", icon="OBJECT_DATAMODE")
+        col.operator("mesh.create_lmr_groups_osc", icon="GROUP_VERTEX")
+        col.operator("mesh.split_lr_shapes_osc", icon="SHAPEKEY_DATA")
         colrow=col.row()
-        colrow.operator("mesh.create_symmetrical_layout_osc",icon="SETTINGS")         
-        colrow.operator("mesh.create_asymmetrical_layout_osc",icon="SETTINGS") 
-        
+        colrow.operator("mesh.create_symmetrical_layout_osc", icon="SETTINGS")
+        colrow.operator("mesh.create_asymmetrical_layout_osc", icon="SETTINGS")
+
 class OscPanelRender(OscPollRender, bpy.types.Panel):
     bl_idname = "Oscurart Render Tools"
     bl_label = "Render Tools"
-        
+
     def draw(self, context):
         active_obj = context.active_object
-        layout = self.layout        
+        layout = self.layout
         col = layout.column(align=1)
-        row = col.row() 
+        row = col.row()
 
-        col.operator("file.create_batch_maker_osc", icon="LINENUMBERS_ON", text="Make Render Batch") 
+        col.operator("file.create_batch_maker_osc", icon="LINENUMBERS_ON", text="Make Render Batch")
         colrow = col.row()
-        colrow.operator("render.render_layers_at_time_osc",icon="RENDER_STILL", text="All Scenes")  
-        colrow.operator("render.render_layers_at_time_osc_cf",icon="RENDER_STILL", text="> Frame")
+        colrow.operator("render.render_layers_at_time_osc", icon="RENDER_STILL", text="All Scenes")
+        colrow.operator("render.render_layers_at_time_osc_cf", icon="RENDER_STILL", text="> Frame")
         colrow = col.row()
-        colrow.operator("render.render_current_scene_osc",icon="RENDER_STILL", text="Active Scene")
-        colrow.operator("render.render_current_scene_osc_cf",icon="RENDER_STILL", text="> Frame")
-        colrow = col.row(align=1) 
-        colrow.prop(bpy.context.scene,"OscSelScenes",text="")

@@ Diff output truncated at 10240 characters. @@


More information about the Bf-extensions-cvs mailing list