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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'release/scripts/ui/space_view3d.py')
-rw-r--r--release/scripts/ui/space_view3d.py30
1 files changed, 20 insertions, 10 deletions
diff --git a/release/scripts/ui/space_view3d.py b/release/scripts/ui/space_view3d.py
index 446cf2d5fce..e89604de1dd 100644
--- a/release/scripts/ui/space_view3d.py
+++ b/release/scripts/ui/space_view3d.py
@@ -714,7 +714,8 @@ class VIEW3D_MT_object_clear(bpy.types.Menu):
class VIEW3D_MT_object_specials(bpy.types.Menu):
bl_label = "Specials"
- def poll(self, context):
+ @staticmethod
+ def poll(context):
# add more special types
return context.object
@@ -1939,7 +1940,8 @@ class VIEW3D_PT_view3d_properties(bpy.types.Panel):
bl_region_type = 'UI'
bl_label = "View"
- def poll(self, context):
+ @staticmethod
+ def poll(context):
view = context.space_data
return (view)
@@ -1975,7 +1977,8 @@ class VIEW3D_PT_view3d_name(bpy.types.Panel):
bl_region_type = 'UI'
bl_label = "Item"
- def poll(self, context):
+ @staticmethod
+ def poll(context):
return (context.space_data and context.active_object)
def draw(self, context):
@@ -2000,7 +2003,8 @@ class VIEW3D_PT_view3d_display(bpy.types.Panel):
bl_label = "Display"
bl_default_closed = True
- def poll(self, context):
+ @staticmethod
+ def poll(context):
view = context.space_data
return (view)
@@ -2067,7 +2071,8 @@ class VIEW3D_PT_view3d_meshdisplay(bpy.types.Panel):
bl_region_type = 'UI'
bl_label = "Mesh Display"
- def poll(self, context):
+ @staticmethod
+ def poll(context):
# The active object check is needed because of localmode
return (context.active_object and (context.mode == 'EDIT_MESH'))
@@ -2103,7 +2108,8 @@ class VIEW3D_PT_view3d_curvedisplay(bpy.types.Panel):
bl_region_type = 'UI'
bl_label = "Curve Display"
- def poll(self, context):
+ @staticmethod
+ def poll(context):
editmesh = context.mode == 'EDIT_CURVE'
return (editmesh)
@@ -2125,7 +2131,8 @@ class VIEW3D_PT_background_image(bpy.types.Panel):
bl_label = "Background Images"
bl_default_closed = True
- def poll(self, context):
+ @staticmethod
+ def poll(context):
view = context.space_data
# bg = context.space_data.background_image
return (view)
@@ -2174,7 +2181,8 @@ class VIEW3D_PT_transform_orientations(bpy.types.Panel):
bl_label = "Transform Orientations"
bl_default_closed = True
- def poll(self, context):
+ @staticmethod
+ def poll(context):
view = context.space_data
return (view)
@@ -2201,7 +2209,8 @@ class VIEW3D_PT_etch_a_ton(bpy.types.Panel):
bl_label = "Skeleton Sketching"
bl_default_closed = True
- def poll(self, context):
+ @staticmethod
+ def poll(context):
scene = context.space_data
ob = context.active_object
return scene and ob and ob.type == 'ARMATURE' and ob.mode == 'EDIT'
@@ -2257,7 +2266,8 @@ class VIEW3D_PT_context_properties(bpy.types.Panel):
return ""
- def poll(self, context):
+ @staticmethod
+ def poll(context):
member = self._active_context_member(context)
if member:
context_member = getattr(context, member)