[Bf-extensions-cvs] [ab78981] master: Remove mesh poll. Changes in GUI

Eugenio Pignataro noreply at git.blender.org
Sun Aug 31 16:33:37 CEST 2014


Commit: ab789815025c2bfe555ee506f421950e23a4736b
Author: Eugenio Pignataro
Date:   Sun Aug 31 11:33:22 2014 -0300
Branches: master
https://developer.blender.org/rBACab789815025c2bfe555ee506f421950e23a4736b

Remove mesh poll. Changes in GUI

===================================================================

M	oscurart_tools/__init__.py
M	oscurart_tools/oscurart_meshes.py

===================================================================

diff --git a/oscurart_tools/__init__.py b/oscurart_tools/__init__.py
index 0699af6..3c139ea 100644
--- a/oscurart_tools/__init__.py
+++ b/oscurart_tools/__init__.py
@@ -204,7 +204,7 @@ class OscPanelShapes(OscPollShapes, bpy.types.Panel):
         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=col.row(align=1)
         colrow.operator("mesh.create_symmetrical_layout_osc", icon="SETTINGS")
         colrow.operator("mesh.create_asymmetrical_layout_osc", icon="SETTINGS")
 
@@ -251,9 +251,8 @@ class OscPanelFiles(OscPollFiles, bpy.types.Panel):
         active_obj = context.active_object
         layout = self.layout
         col = layout.column(align=1)
-        colrow = col.row()
-        colrow.operator("file.save_incremental_osc", icon="NEW")
-        colrow.operator("image.reload_images_osc", icon="IMAGE_COL")
+        col.operator("file.save_incremental_osc", icon="NEW")
+        col.operator("image.reload_images_osc", icon="IMAGE_COL")
         col = layout.column(align=1)
         colrow = col.row(align=1)
         colrow.prop(bpy.context.scene, "oscSearchText", text="")
@@ -268,8 +267,9 @@ class OscPanelOverrides(OscPollOverrides, bpy.types.Panel):
     def draw(self, context):
         layout = self.layout
         obj = context.object
-        col = layout.box().column(align=1)
-        colrow = col.row()
+        box = layout.box()
+        col = box.column(align=1)
+        colrow = col.row(align=1)
         #col.operator("render.overrides_set_list", text="Create Override List", icon="GREASEPENCIL")
         col.label(text="Active Scene: " + bpy.context.scene.name)
         col.label(text="Example: [[Group,Material]]")
@@ -277,10 +277,11 @@ class OscPanelOverrides(OscPollOverrides, bpy.types.Panel):
         col.operator("render.check_overrides", text="Check List", icon="ZOOM_ALL")
         col.operator("render.overrides_on", text="On / Off", icon="QUIT")   
         col.label(text=str("OVERRIDES: ON" if bpy.use_overrides else "OVERRIDES: OFF"))             
-
-        boxcol=layout.box().column(align=1)
+        
+        box = layout.box()
+        boxcol = box.column(align=1)
         boxcol.label(text="Danger Zone")
-        boxcolrow=boxcol.row()
+        boxcolrow = boxcol.row(align=1)
         boxcolrow.operator("render.apply_overrides", text="Apply Overrides", icon="ERROR")
         boxcolrow.operator("render.restore_overrides", text="Restore Overrides", icon="ERROR")
 
@@ -300,3 +301,4 @@ if __name__ == "__main__":
 
 
 
+
diff --git a/oscurart_tools/oscurart_meshes.py b/oscurart_tools/oscurart_meshes.py
index 5060b77..b3e1186 100644
--- a/oscurart_tools/oscurart_meshes.py
+++ b/oscurart_tools/oscurart_meshes.py
@@ -50,7 +50,7 @@ class reConst (bpy.types.Operator):
 
     @classmethod
     def poll(cls, context):
-        return True if context.active_object is not None and context.object.type == "MESH" else False
+        return context.active_object is not None
 
     def execute(self,context):
         defReconst(self, self.OFFSET)
@@ -84,7 +84,7 @@ class SelectMenor (bpy.types.Operator):
 
     @classmethod
     def poll(cls, context):
-        return True if context.active_object is not None and context.object.type == "MESH" else False
+        return context.active_object is not None
 
     side = bpy.props.BoolProperty(name="Greater than zero", default=False)
     offset = bpy.props.FloatProperty(name="Offset", default=0)
@@ -106,7 +106,7 @@ class resymVertexGroups (bpy.types.Operator):
 
     @classmethod
     def poll(cls, context):
-        return True if context.active_object is not None and context.object.type == "MESH" else False
+        return context.active_object is not None
     
     def execute(self,context):
 
@@ -134,7 +134,7 @@ class OscExportVG (bpy.types.Operator):
 
     @classmethod
     def poll(cls, context):
-        return True if context.active_object is not None and context.object.type == "MESH" else False
+        return context.active_object is not None
     
     def execute(self,context):
         
@@ -159,7 +159,7 @@ class OscImportVG (bpy.types.Operator):
 
     @classmethod
     def poll(cls, context):
-        return True if context.active_object is not None and context.object.type == "MESH" else False    
+        return context.active_object is not None   
     
     def execute(self,context):
         
@@ -249,7 +249,7 @@ class OscResymSave (bpy.types.Operator):
 
     @classmethod
     def poll(cls, context):
-        return True if context.active_object is not None and context.object.type == "MESH" else False
+        return context.active_object is not None
 
     quality = bpy.props.IntProperty(default=4, name="Quality")
     
@@ -264,7 +264,7 @@ class OscResymMesh (bpy.types.Operator):
 
     @classmethod
     def poll(cls, context):
-        return True if context.active_object is not None and context.object.type == "MESH" else False
+        return context.active_object is not None
 
     selected=bpy.props.BoolProperty(default=False, name="Only Selected")
     
@@ -296,7 +296,7 @@ class OscObjectToMesh(bpy.types.Operator):
 
     @classmethod
     def poll(cls, context):
-        return True if context.active_object is not None and context.object.type == "MESH" else False
+        return context.active_object is not None
 
     def execute(self, context):
         DefOscObjectToMesh()
@@ -360,7 +360,7 @@ class OscOverlapUv(bpy.types.Operator):
 
     @classmethod
     def poll(cls, context):
-        return True if context.active_object is not None and context.object.type == "MESH" else False
+        return context.active_object is not None
     
     presicion = bpy.props.IntProperty(default=4, min=1, max=10, name="precision" )
     
@@ -389,7 +389,7 @@ class OscExportVC (bpy.types.Operator):
 
     @classmethod
     def poll(cls, context):
-        return True if context.active_object is not None and context.object.type == "MESH" else False
+        return context.active_object is not None
 
     def execute(self, context):
         DefOscExportVC()
@@ -402,7 +402,7 @@ class OscImportVC (bpy.types.Operator):
 
     @classmethod
     def poll(cls, context):
-        return True if context.active_object is not None and context.object.type == "MESH" else False
+        return context.active_object is not None
 
     def execute(self, context):
         DefOscImportVC()
@@ -428,7 +428,7 @@ class ModalIndexOperator(bpy.types.Operator):
     
     @classmethod
     def poll(cls, context):
-        return True if context.active_object is not None and context.object.type == "MESH" else False
+        return context.active_object is not None
     
     def modal(self, context, event):
         context.area.tag_redraw()        
@@ -475,3 +475,5 @@ class ModalIndexOperator(bpy.types.Operator):
 
 
 
+
+



More information about the Bf-extensions-cvs mailing list