diff options
Diffstat (limited to 'release/scripts/ui/properties_data_camera.py')
-rw-r--r-- | release/scripts/ui/properties_data_camera.py | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/release/scripts/ui/properties_data_camera.py b/release/scripts/ui/properties_data_camera.py index 5152e004f28..15d513b5a25 100644 --- a/release/scripts/ui/properties_data_camera.py +++ b/release/scripts/ui/properties_data_camera.py @@ -28,16 +28,17 @@ class DataButtonsPanel(): bl_region_type = 'WINDOW' bl_context = "data" - def poll(self, context): - engine = context.scene.render.engine - return context.camera and (engine in self.COMPAT_ENGINES) - class DATA_PT_context_camera(DataButtonsPanel, bpy.types.Panel): bl_label = "" bl_show_header = False COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + @staticmethod + def poll(context): + engine = context.scene.render.engine + return context.camera and (engine in __class__.COMPAT_ENGINES) + def draw(self, context): layout = self.layout @@ -65,11 +66,21 @@ class DATA_PT_custom_props_camera(DataButtonsPanel, PropertyPanel, bpy.types.Pan _context_path = "object.data" COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + @staticmethod + def poll(context): + engine = context.scene.render.engine + return context.camera and (engine in __class__.COMPAT_ENGINES) + class DATA_PT_camera(DataButtonsPanel, bpy.types.Panel): bl_label = "Lens" COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + @staticmethod + def poll(context): + engine = context.scene.render.engine + return context.camera and (engine in __class__.COMPAT_ENGINES) + def draw(self, context): layout = self.layout @@ -131,6 +142,11 @@ class DATA_PT_camera_display(DataButtonsPanel, bpy.types.Panel): bl_label = "Display" COMPAT_ENGINES = {'BLENDER_RENDER', 'BLENDER_GAME'} + @staticmethod + def poll(context): + engine = context.scene.render.engine + return context.camera and (engine in __class__.COMPAT_ENGINES) + def draw(self, context): layout = self.layout |