diff options
Diffstat (limited to 'release/scripts/ui/properties_render.py')
-rw-r--r-- | release/scripts/ui/properties_render.py | 62 |
1 files changed, 57 insertions, 5 deletions
diff --git a/release/scripts/ui/properties_render.py b/release/scripts/ui/properties_render.py index 4e6596957d7..dc0b76645ae 100644 --- a/release/scripts/ui/properties_render.py +++ b/release/scripts/ui/properties_render.py @@ -42,15 +42,16 @@ class RenderButtonsPanel(): bl_context = "render" # COMPAT_ENGINES must be defined in each subclass, external engines can add themselves here - def poll(self, context): - rd = context.scene.render - return (context.scene and rd.use_game_engine is False) and (rd.engine in self.COMPAT_ENGINES) - class RENDER_PT_render(RenderButtonsPanel, bpy.types.Panel): bl_label = "Render" COMPAT_ENGINES = {'BLENDER_RENDER'} + @staticmethod + def poll(context): + rd = context.scene.render + return (context.scene and rd.use_game_engine is False) and (rd.engine in __class__.COMPAT_ENGINES) + def draw(self, context): layout = self.layout @@ -74,6 +75,11 @@ class RENDER_PT_layers(RenderButtonsPanel, bpy.types.Panel): bl_default_closed = True COMPAT_ENGINES = {'BLENDER_RENDER'} + @staticmethod + def poll(context): + rd = context.scene.render + return (context.scene and rd.use_game_engine is False) and (rd.engine in __class__.COMPAT_ENGINES) + def draw(self, context): layout = self.layout @@ -178,6 +184,11 @@ class RENDER_PT_shading(RenderButtonsPanel, bpy.types.Panel): bl_label = "Shading" COMPAT_ENGINES = {'BLENDER_RENDER'} + @staticmethod + def poll(context): + rd = context.scene.render + return (context.scene and rd.use_game_engine is False) and (rd.engine in __class__.COMPAT_ENGINES) + def draw(self, context): layout = self.layout @@ -204,6 +215,11 @@ class RENDER_PT_performance(RenderButtonsPanel, bpy.types.Panel): bl_default_closed = True COMPAT_ENGINES = {'BLENDER_RENDER'} + @staticmethod + def poll(context): + rd = context.scene.render + return (context.scene and rd.use_game_engine is False) and (rd.engine in __class__.COMPAT_ENGINES) + def draw(self, context): layout = self.layout @@ -248,6 +264,11 @@ class RENDER_PT_post_processing(RenderButtonsPanel, bpy.types.Panel): bl_default_closed = True COMPAT_ENGINES = {'BLENDER_RENDER'} + @staticmethod + def poll(context): + rd = context.scene.render + return (context.scene and rd.use_game_engine is False) and (rd.engine in __class__.COMPAT_ENGINES) + def draw(self, context): layout = self.layout @@ -291,6 +312,11 @@ class RENDER_PT_output(RenderButtonsPanel, bpy.types.Panel): bl_label = "Output" COMPAT_ENGINES = {'BLENDER_RENDER'} + @staticmethod + def poll(context): + rd = context.scene.render + return (context.scene and rd.use_game_engine is False) and (rd.engine in __class__.COMPAT_ENGINES) + def draw(self, context): layout = self.layout @@ -412,7 +438,8 @@ class RENDER_PT_encoding(RenderButtonsPanel, bpy.types.Panel): bl_default_closed = True COMPAT_ENGINES = {'BLENDER_RENDER'} - def poll(self, context): + @staticmethod + def poll(context): rd = context.scene.render return rd.file_format in ('FFMPEG', 'XVID', 'H264', 'THEORA') @@ -483,6 +510,11 @@ class RENDER_PT_antialiasing(RenderButtonsPanel, bpy.types.Panel): bl_label = "Anti-Aliasing" COMPAT_ENGINES = {'BLENDER_RENDER'} + @staticmethod + def poll(context): + rd = context.scene.render + return (context.scene and rd.use_game_engine is False) and (rd.engine in __class__.COMPAT_ENGINES) + def draw_header(self, context): rd = context.scene.render @@ -514,6 +546,11 @@ class RENDER_PT_motion_blur(RenderButtonsPanel, bpy.types.Panel): bl_default_closed = True COMPAT_ENGINES = {'BLENDER_RENDER'} + @staticmethod + def poll(context): + rd = context.scene.render + return (context.scene and rd.use_game_engine is False) and (rd.engine in __class__.COMPAT_ENGINES) + def draw_header(self, context): rd = context.scene.render @@ -533,6 +570,11 @@ class RENDER_PT_dimensions(RenderButtonsPanel, bpy.types.Panel): bl_label = "Dimensions" COMPAT_ENGINES = {'BLENDER_RENDER'} + @staticmethod + def poll(context): + rd = context.scene.render + return (context.scene and rd.use_game_engine is False) and (rd.engine in __class__.COMPAT_ENGINES) + def draw(self, context): layout = self.layout @@ -581,6 +623,11 @@ class RENDER_PT_stamp(RenderButtonsPanel, bpy.types.Panel): bl_default_closed = True COMPAT_ENGINES = {'BLENDER_RENDER'} + @staticmethod + def poll(context): + rd = context.scene.render + return (context.scene and rd.use_game_engine is False) and (rd.engine in __class__.COMPAT_ENGINES) + def draw_header(self, context): rd = context.scene.render @@ -627,6 +674,11 @@ class RENDER_PT_bake(RenderButtonsPanel, bpy.types.Panel): bl_default_closed = True COMPAT_ENGINES = {'BLENDER_RENDER'} + @staticmethod + def poll(context): + rd = context.scene.render + return (context.scene and rd.use_game_engine is False) and (rd.engine in __class__.COMPAT_ENGINES) + def draw(self, context): layout = self.layout |