diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py | 29 |
1 files changed, 10 insertions, 19 deletions
diff --git a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py index 7fc1c01279d..e1c0606c493 100644 --- a/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py +++ b/release/scripts/startup/bl_ui/properties_physics_dynamicpaint.py @@ -55,8 +55,7 @@ class PhysicButtonsPanel: @classmethod def poll(cls, context): ob = context.object - view_render = context.scene.view_render - return (ob and ob.type == 'MESH') and view_render.engine in cls.COMPAT_ENGINES and context.dynamic_paint + return (ob and ob.type == 'MESH') and context.engine in cls.COMPAT_ENGINES and context.dynamic_paint class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel): @@ -109,7 +108,7 @@ class PHYSICS_PT_dynamic_paint(PhysicButtonsPanel, Panel): elif md.ui_type == 'BRUSH': brush = md.brush_settings - use_shading_nodes = context.view_render.use_shading_nodes + use_shading_nodes = context.scene.render.use_shading_nodes if brush is None: layout.operator("dpaint.type_toggle", text="Add Brush").type = 'BRUSH' @@ -143,8 +142,7 @@ class PHYSICS_PT_dp_advanced_canvas(PhysicButtonsPanel, Panel): @classmethod def poll(cls, context): md = context.dynamic_paint - view_render = context.scene.view_render - return md and md.ui_type == 'CANVAS' and md.canvas_settings and md.canvas_settings.canvas_surfaces.active and view_render.engine in cls.COMPAT_ENGINES + return md and md.ui_type == 'CANVAS' and md.canvas_settings and md.canvas_settings.canvas_surfaces.active and context.engine in cls.COMPAT_ENGINES def draw(self, context): layout = self.layout @@ -220,13 +218,12 @@ class PHYSICS_PT_dp_canvas_output(PhysicButtonsPanel, Panel): @classmethod def poll(cls, context): md = context.dynamic_paint - view_render = context.scene.view_render if not (md and md.ui_type == 'CANVAS' and md.canvas_settings): return 0 surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active return (surface and (not (surface.surface_format == 'VERTEX' and (surface.surface_type in {'DISPLACE', 'WAVE'}))) and - (view_render.engine in cls.COMPAT_ENGINES)) + (context.engine in cls.COMPAT_ENGINES)) def draw(self, context): layout = self.layout @@ -314,11 +311,10 @@ class PHYSICS_PT_dp_canvas_initial_color(PhysicButtonsPanel, Panel): @classmethod def poll(cls, context): md = context.dynamic_paint - view_render = context.scene.view_render if not (md and md.ui_type == 'CANVAS' and md.canvas_settings): return 0 surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active - return (surface and surface.surface_type == 'PAINT') and (view_render.engine in cls.COMPAT_ENGINES) + return (surface and surface.surface_type == 'PAINT') and (context.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -351,11 +347,10 @@ class PHYSICS_PT_dp_effects(PhysicButtonsPanel, Panel): @classmethod def poll(cls, context): md = context.dynamic_paint - view_render = context.scene.view_render if not (md and md.ui_type == 'CANVAS' and md.canvas_settings): return False surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active - return (surface and surface.surface_type == 'PAINT') and (view_render.engine in cls.COMPAT_ENGINES) + return (surface and surface.surface_type == 'PAINT') and (context.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -401,13 +396,12 @@ class PHYSICS_PT_dp_cache(PhysicButtonsPanel, Panel): @classmethod def poll(cls, context): md = context.dynamic_paint - view_render = context.scene.view_render return (md and md.ui_type == 'CANVAS' and md.canvas_settings and md.canvas_settings.canvas_surfaces.active and md.canvas_settings.canvas_surfaces.active.is_cache_user and - (view_render.engine in cls.COMPAT_ENGINES)) + (context.engine in cls.COMPAT_ENGINES)) def draw(self, context): surface = context.dynamic_paint.canvas_settings.canvas_surfaces.active @@ -423,8 +417,7 @@ class PHYSICS_PT_dp_brush_source(PhysicButtonsPanel, Panel): @classmethod def poll(cls, context): md = context.dynamic_paint - view_render = context.scene.view_render - return md and md.ui_type == 'BRUSH' and md.brush_settings and (view_render.engine in cls.COMPAT_ENGINES) + return md and md.ui_type == 'BRUSH' and md.brush_settings and (context.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -477,8 +470,7 @@ class PHYSICS_PT_dp_brush_velocity(PhysicButtonsPanel, Panel): @classmethod def poll(cls, context): md = context.dynamic_paint - view_render = context.scene.view_render - return md and md.ui_type == 'BRUSH' and md.brush_settings and (view_render.engine in cls.COMPAT_ENGINES) + return md and md.ui_type == 'BRUSH' and md.brush_settings and (context.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -514,8 +506,7 @@ class PHYSICS_PT_dp_brush_wave(PhysicButtonsPanel, Panel): @classmethod def poll(cls, context): md = context.dynamic_paint - view_render = context.scene.view_render - return md and md.ui_type == 'BRUSH' and md.brush_settings and (view_render.engine in cls.COMPAT_ENGINES) + return md and md.ui_type == 'BRUSH' and md.brush_settings and (context.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout |