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:
authorCampbell Barton <ideasman42@gmail.com>2018-07-07 09:36:17 +0300
committerCampbell Barton <ideasman42@gmail.com>2018-07-07 09:36:17 +0300
commit252207cc7a808bf70f8ef398eb578b58a3f1099d (patch)
tree1bf8bd21e1b5d77adf4298ae8d52191040ac6d5c /release
parentb94222b0903cee2c453e46b7bdb4c9862bbc771c (diff)
Cleanup: redundant poll checks
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py34
1 files changed, 3 insertions, 31 deletions
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index c8f113f558d..0a365c6a20c 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3395,11 +3395,6 @@ class VIEW3D_PT_view3d_properties(Panel):
bl_region_type = 'UI'
bl_label = "View"
- @classmethod
- def poll(cls, context):
- view = context.space_data
- return (view)
-
def draw(self, context):
layout = self.layout
@@ -3443,11 +3438,6 @@ class VIEW3D_PT_view3d_cursor(Panel):
bl_region_type = 'UI'
bl_label = "3D Cursor"
- @classmethod
- def poll(cls, context):
- view = context.space_data
- return (view is not None)
-
def draw(self, context):
layout = self.layout
@@ -3462,7 +3452,7 @@ class VIEW3D_PT_view3d_name(Panel):
@classmethod
def poll(cls, context):
- return (context.space_data and context.active_object)
+ return (context.active_object is not None)
def draw(self, context):
layout = self.layout
@@ -3486,11 +3476,6 @@ class VIEW3D_PT_view3d_display(Panel):
bl_label = "Display"
bl_options = {'DEFAULT_CLOSED'}
- @classmethod
- def poll(cls, context):
- view = context.space_data
- return (view)
-
def draw(self, context):
layout = self.layout
@@ -3553,9 +3538,7 @@ class VIEW3D_PT_view3d_stereo(Panel):
@classmethod
def poll(cls, context):
scene = context.scene
-
- multiview = scene.render.use_multiview
- return context.space_data and multiview
+ return scene.render.use_multiview
def draw(self, context):
layout = self.layout
@@ -3640,11 +3623,6 @@ class VIEW3D_PT_view3d_motion_tracking(Panel):
bl_label = "Motion Tracking"
bl_options = {'DEFAULT_CLOSED'}
- @classmethod
- def poll(cls, context):
- view = context.space_data
- return (view)
-
def draw_header(self, context):
view = context.space_data
@@ -3785,8 +3763,7 @@ class VIEW3D_PT_view3d_curvedisplay(Panel):
@classmethod
def poll(cls, context):
- editmesh = context.mode == 'EDIT_CURVE'
- return (editmesh)
+ return (context.mode == 'EDIT_CURVE')
def draw(self, context):
layout = self.layout
@@ -3913,11 +3890,6 @@ class VIEW3D_PT_transform_orientations(Panel):
bl_label = "Transform Orientations"
bl_options = {'DEFAULT_CLOSED'}
- @classmethod
- def poll(cls, context):
- view = context.space_data
- return (view)
-
def draw(self, context):
layout = self.layout