Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-08-05 19:58:52 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-08-05 19:58:52 +0400
commitebfb6490e11ae9ae0429737c1bf0e0cd64222f5a (patch)
treed6b7ff4e93a37043d83ceb5dbabfdf8bc2bab117
parent8d94603a8de70935166a933d2fb0f9af369d567f (diff)
update for changes in blender.
-rw-r--r--add_curve_aceous_galore.py3
-rw-r--r--add_curve_torus_knots.py3
-rw-r--r--add_mesh_BoltFactory/Boltfactory.py3
-rw-r--r--curve_simplify.py6
-rw-r--r--io_export_unreal_psk_psa.py6
-rw-r--r--mesh_relax.py3
-rw-r--r--mesh_surface_sketch.py3
-rw-r--r--object_cloud_gen.py3
-rw-r--r--render_povray/ui.py3
-rw-r--r--render_renderfarmfi.py3
-rw-r--r--space_view3d_align_tools.py39
-rw-r--r--space_view3d_materials_utils.py18
-rw-r--r--space_view3d_panel_measure.py3
-rw-r--r--space_view3d_property_chart.py3
-rw-r--r--space_view3d_spacebar_menu.py9
15 files changed, 72 insertions, 36 deletions
diff --git a/add_curve_aceous_galore.py b/add_curve_aceous_galore.py
index ed03576d..21dfbd28 100644
--- a/add_curve_aceous_galore.py
+++ b/add_curve_aceous_galore.py
@@ -1063,7 +1063,8 @@ class Curveaceous_galore(bpy.types.Operator):
##### POLL #####
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.scene != None
##### EXECUTE #####
diff --git a/add_curve_torus_knots.py b/add_curve_torus_knots.py
index 3d66e8ba..eed9c67c 100644
--- a/add_curve_torus_knots.py
+++ b/add_curve_torus_knots.py
@@ -274,7 +274,8 @@ class torus_knot_plus(bpy.types.Operator):
box.prop(props, 'geo_res')
##### POLL #####
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.scene != None
##### EXECUTE #####
diff --git a/add_mesh_BoltFactory/Boltfactory.py b/add_mesh_BoltFactory/Boltfactory.py
index 6ddd51bb..d4bc8bea 100644
--- a/add_mesh_BoltFactory/Boltfactory.py
+++ b/add_mesh_BoltFactory/Boltfactory.py
@@ -259,7 +259,8 @@ class add_mesh_bolt(bpy.types.Operator):
##### POLL #####
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.scene != None
##### EXECUTE #####
diff --git a/curve_simplify.py b/curve_simplify.py
index 6d76c325..aa373a84 100644
--- a/curve_simplify.py
+++ b/curve_simplify.py
@@ -423,7 +423,8 @@ class GRAPH_OT_simplify(bpy.types.Operator):
col.prop(props, 'error', expand=True)
## Check for animdata
- def poll(self, context):
+ @staticmethod
+ def poll(context):
obj = context.active_object
fcurves = False
if obj:
@@ -548,7 +549,8 @@ class CURVE_OT_simplify(bpy.types.Operator):
## Check for curve
- def poll(self, context):
+ @staticmethod
+ def poll(context):
obj = context.active_object
return (obj and obj.type == 'CURVE')
diff --git a/io_export_unreal_psk_psa.py b/io_export_unreal_psk_psa.py
index 52c06ca0..8c208c5a 100644
--- a/io_export_unreal_psk_psa.py
+++ b/io_export_unreal_psk_psa.py
@@ -1476,7 +1476,8 @@ class ExportUDKAnimData(bpy.types.Operator):
psaexportbool = BoolProperty(name="Export PSA", description="Export Action Set (Animation Data)", default= True)
actionexportall = BoolProperty(name="All Actions", description="This will export all the actions that matches the current armature.", default=False)
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.active_object != None
def execute(self, context):
@@ -1507,7 +1508,8 @@ class VIEW3D_PT_unrealtools_objectmode(bpy.types.Panel):
bl_region_type = "TOOLS"
bl_label = "Unreal Tools"
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.active_object
def draw(self, context):
diff --git a/mesh_relax.py b/mesh_relax.py
index cc752105..42419218 100644
--- a/mesh_relax.py
+++ b/mesh_relax.py
@@ -98,7 +98,8 @@ class Relax(bpy.types.Operator):
iterations = IntProperty(name="Relax iterations",
default=1, min=0, max=100, soft_min=0, soft_max=10)
- def poll(self, context):
+ @staticmethod
+ def poll(context):
obj = context.active_object
return (obj and obj.type == 'MESH')
diff --git a/mesh_surface_sketch.py b/mesh_surface_sketch.py
index 5f0035f2..2b0c7490 100644
--- a/mesh_surface_sketch.py
+++ b/mesh_surface_sketch.py
@@ -42,7 +42,8 @@ class VIEW3D_PT_tools_SURF_SKETCH(bpy.types.Panel):
bl_context = "mesh_edit"
bl_label = "Surface Sketching"
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.active_object
def draw(self, context):
diff --git a/object_cloud_gen.py b/object_cloud_gen.py
index 884ef55a..3564d0b7 100644
--- a/object_cloud_gen.py
+++ b/object_cloud_gen.py
@@ -318,7 +318,8 @@ class GenerateCloud(bpy.types.Operator):
bl_register = True
bl_undo = True
- def poll(self, context):
+ @staticmethod
+ def poll(context):
if not context.active_object:
return False
else:
diff --git a/render_povray/ui.py b/render_povray/ui.py
index 1dfed0f3..ee3ce2c2 100644
--- a/render_povray/ui.py
+++ b/render_povray/ui.py
@@ -159,7 +159,8 @@ class RenderButtonsPanel():
bl_context = "render"
# COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
- def poll(self, context):
+ @staticmethod
+ def poll(context):
rd = context.scene.render
return (rd.use_game_engine == False) and (rd.engine in self.COMPAT_ENGINES)
diff --git a/render_renderfarmfi.py b/render_renderfarmfi.py
index 737611bd..444ab615 100644
--- a/render_renderfarmfi.py
+++ b/render_renderfarmfi.py
@@ -151,7 +151,8 @@ class RenderButtonsPanel():
bl_context = "render"
# COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here
- def poll(self, context):
+ @staticmethod
+ def poll(context):
rd = context.scene.render
return (rd.use_game_engine==False) and (rd.engine in self.COMPAT_ENGINES)
diff --git a/space_view3d_align_tools.py b/space_view3d_align_tools.py
index 31a04d11..2d577f4a 100644
--- a/space_view3d_align_tools.py
+++ b/space_view3d_align_tools.py
@@ -155,7 +155,8 @@ class AlignOperator(bpy.types.Operator):
bl_idname = "object.AlignObjects"
bl_label = "Align Selected To Active"
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.active_object != None
def execute(self, context):
@@ -169,7 +170,8 @@ class AlignLocationOperator(bpy.types.Operator):
bl_idname = "object.AlignObjectsLocationAll"
bl_label = "Align Selected Location To Active"
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.active_object != None
def execute(self, context):
@@ -181,7 +183,8 @@ class AlignLocationXOperator(bpy.types.Operator):
bl_idname = "object.AlignObjectsLocationX"
bl_label = "Align Selected Location X To Active"
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.active_object != None
def execute(self, context):
@@ -193,7 +196,8 @@ class AlignLocationYOperator(bpy.types.Operator):
bl_idname = "object.AlignObjectsLocationY"
bl_label = "Align Selected Location Y To Active"
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.active_object != None
def execute(self, context):
@@ -205,7 +209,8 @@ class AlignLocationZOperator(bpy.types.Operator):
bl_idname = "object.AlignObjectsLocationZ"
bl_label = "Align Selected Location Z To Active"
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.active_object != None
def execute(self, context):
@@ -219,7 +224,8 @@ class AlignRotationOperator(bpy.types.Operator):
bl_idname = "object.AlignObjectsRotationAll"
bl_label = "Align Selected Rotation To Active"
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.active_object != None
def execute(self, context):
@@ -231,7 +237,8 @@ class AlignRotationXOperator(bpy.types.Operator):
bl_idname = "object.AlignObjectsRotationX"
bl_label = "Align Selected Rotation X To Active"
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.active_object != None
def execute(self, context):
@@ -243,7 +250,8 @@ class AlignRotationYOperator(bpy.types.Operator):
bl_idname = "object.AlignObjectsRotationY"
bl_label = "Align Selected Rotation Y To Active"
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.active_object != None
def execute(self, context):
@@ -255,7 +263,8 @@ class AlignRotationZOperator(bpy.types.Operator):
bl_idname = "object.AlignObjectsRotationZ"
bl_label = "Align Selected Rotation Z To Active"
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.active_object != None
def execute(self, context):
@@ -268,7 +277,8 @@ class AlignScaleOperator(bpy.types.Operator):
bl_idname = "object.AlignObjectsScaleAll"
bl_label = "Align Selected Scale To Active"
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.active_object != None
def execute(self, context):
@@ -280,7 +290,8 @@ class AlignScaleXOperator(bpy.types.Operator):
bl_idname = "object.AlignObjectsScaleX"
bl_label = "Align Selected Scale X To Active"
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.active_object != None
def execute(self, context):
@@ -292,7 +303,8 @@ class AlignScaleYOperator(bpy.types.Operator):
bl_idname = "object.AlignObjectsScaleY"
bl_label = "Align Selected Scale Y To Active"
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.active_object != None
def execute(self, context):
@@ -304,7 +316,8 @@ class AlignScaleZOperator(bpy.types.Operator):
bl_idname = "object.AlignObjectsScaleZ"
bl_label = "Align Selected Scale Z To Active"
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.active_object != None
def execute(self, context):
diff --git a/space_view3d_materials_utils.py b/space_view3d_materials_utils.py
index 0cbfa0dd..ccd4bb07 100644
--- a/space_view3d_materials_utils.py
+++ b/space_view3d_materials_utils.py
@@ -486,7 +486,8 @@ class VIEW3D_OT_texface_to_material(bpy.types.Operator):
bl_label = "MW Texface Images to Material/Texture"
bl_options = {'REGISTER', 'UNDO'}
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.active_object != None
def execute(self, context):
@@ -507,7 +508,8 @@ class VIEW3D_OT_assign_material(bpy.types.Operator):
description = 'Name of Material to Assign',
default = "", maxlen = 21)
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.active_object != None
def execute(self, context):
@@ -525,7 +527,8 @@ class VIEW3D_OT_clean_material_slots(bpy.types.Operator):
bl_label = "MW Clean Material Slots"
bl_options = {'REGISTER', 'UNDO'}
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.active_object != None
def execute(self, context):
@@ -538,7 +541,8 @@ class VIEW3D_OT_material_to_texface(bpy.types.Operator):
bl_label = "MW Material Images to Texface"
bl_options = {'REGISTER', 'UNDO'}
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.active_object != None
def execute(self, context):
@@ -554,7 +558,8 @@ class VIEW3D_OT_select_material_by_name(bpy.types.Operator):
description = 'Name of Material to Select',
default = "", maxlen = 21)
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.active_object != None
def execute(self, context):
@@ -581,7 +586,8 @@ class VIEW3D_OT_replace_material(bpy.types.Operator):
description="replace for all objects in this blend file",
default = True)
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.active_object != None
def execute(self, context):
diff --git a/space_view3d_panel_measure.py b/space_view3d_panel_measure.py
index e7f0612e..f48b4a35 100644
--- a/space_view3d_panel_measure.py
+++ b/space_view3d_panel_measure.py
@@ -656,7 +656,8 @@ class VIEW3D_PT_measure(bpy.types.Panel):
bl_label = "Measure"
bl_default_closed = True
- def poll(self, context):
+ @staticmethod
+ def poll(context):
# Only display this panel in the object and edit mode 3D view.
if (context.area.type == 'VIEW_3D' and
(context.mode == 'EDIT_MESH'
diff --git a/space_view3d_property_chart.py b/space_view3d_property_chart.py
index 10aeba9b..eb4d57ae 100644
--- a/space_view3d_property_chart.py
+++ b/space_view3d_property_chart.py
@@ -169,7 +169,8 @@ class SequencerEditProps(bpy.types.Panel):
draw = _property_chart_draw
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return context.scene.sequence_editor is not None
# Operator to copy properties
diff --git a/space_view3d_spacebar_menu.py b/space_view3d_spacebar_menu.py
index 921c90b0..72bdd890 100644
--- a/space_view3d_spacebar_menu.py
+++ b/space_view3d_spacebar_menu.py
@@ -1238,7 +1238,8 @@ class VIEW3D_OT_pivot_cursor(bpy.types.Operator):
bl_idname = "view3d.pivot_cursor"
bl_label = "Cursor as Pivot Point"
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return bpy.context.space_data.pivot_point != 'CURSOR'
def execute(self, context):
@@ -1250,7 +1251,8 @@ class VIEW3D_OT_revert_pivot(bpy.types.Operator):
bl_idname = "view3d.revert_pivot"
bl_label = "Reverts Pivot Point to median"
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return bpy.context.space_data.pivot_point != 'MEDIAN_POINT'
def execute(self, context):
@@ -1401,7 +1403,8 @@ class VIEW3D_OT_CursorToEdgeIntersection(bpy.types.Operator):
bl_idname = "view3d.snap_cursor_to_edge_intersection"
bl_label = "Cursor to Edge Intersection"
- def poll(self, context):
+ @staticmethod
+ def poll(context):
obj = context.active_object
return obj != None and obj.type == 'MESH'