diff options
Diffstat (limited to 'release/scripts/startup/bl_ui')
21 files changed, 72 insertions, 141 deletions
diff --git a/release/scripts/startup/bl_ui/properties_collection.py b/release/scripts/startup/bl_ui/properties_collection.py index 60f06b57f3c..e0ac7786b50 100644 --- a/release/scripts/startup/bl_ui/properties_collection.py +++ b/release/scripts/startup/bl_ui/properties_collection.py @@ -65,7 +65,7 @@ class COLLECTION_PT_clay_settings(CollectionButtonsPanel, Panel): @classmethod def poll(cls, context): - return context.view_render.engine in cls.COMPAT_ENGINES + return context.engine in cls.COMPAT_ENGINES def draw(self, context): layout = self.layout diff --git a/release/scripts/startup/bl_ui/properties_data_camera.py b/release/scripts/startup/bl_ui/properties_data_camera.py index bd80285515b..58cbcec25ca 100644 --- a/release/scripts/startup/bl_ui/properties_data_camera.py +++ b/release/scripts/startup/bl_ui/properties_data_camera.py @@ -147,11 +147,11 @@ class DATA_PT_camera_stereoscopy(CameraButtonsPanel, Panel): def draw(self, context): layout = self.layout - view_render = context.scene.view_render + render = context.scene.render st = context.camera.stereo cam = context.camera - is_spherical_stereo = cam.type != 'ORTHO' and view_render.use_spherical_stereo + is_spherical_stereo = cam.type != 'ORTHO' and render.use_spherical_stereo use_spherical_stereo = is_spherical_stereo and st.use_spherical_stereo col = layout.column() diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py index 4c2e8e03641..6465f22901a 100644 --- a/release/scripts/startup/bl_ui/properties_data_modifier.py +++ b/release/scripts/startup/bl_ui/properties_data_modifier.py @@ -935,7 +935,7 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel): col = split.column() scene = context.scene - engine = scene.view_render.engine + engine = context.engine show_adaptive_options = ( engine == 'CYCLES' and md == ob.modifiers[-1] and scene.cycles.feature_set == 'EXPERIMENTAL' diff --git a/release/scripts/startup/bl_ui/properties_data_workspace.py b/release/scripts/startup/bl_ui/properties_data_workspace.py index c699fac7dd2..e6ac4ab7477 100644 --- a/release/scripts/startup/bl_ui/properties_data_workspace.py +++ b/release/scripts/startup/bl_ui/properties_data_workspace.py @@ -51,15 +51,11 @@ class WORKSPACE_PT_workspace(WorkSpaceButtonsPanel, Panel): window = context.window workspace = context.workspace scene = context.scene - view_render = workspace.view_render layout.enabled = not workspace.use_scene_settings layout.template_search(window, "view_layer", scene, "view_layers") - if view_render.has_multiple_engines: - layout.prop(view_render, "engine", text="") - class WORKSPACE_PT_owner_ids(WorkSpaceButtonsPanel, Panel): bl_label = "Workspace Add-ons" diff --git a/release/scripts/startup/bl_ui/properties_freestyle.py b/release/scripts/startup/bl_ui/properties_freestyle.py index d9f28040b16..b1992127932 100644 --- a/release/scripts/startup/bl_ui/properties_freestyle.py +++ b/release/scripts/startup/bl_ui/properties_freestyle.py @@ -33,7 +33,7 @@ class RenderFreestyleButtonsPanel: def poll(cls, context): scene = context.scene with_freestyle = bpy.app.build_options.freestyle - return scene and with_freestyle and(scene.view_render.engine in cls.COMPAT_ENGINES) + return scene and with_freestyle and(context.engine in cls.COMPAT_ENGINES) class RENDER_PT_freestyle(RenderFreestyleButtonsPanel, Panel): @@ -75,7 +75,7 @@ class ViewLayerFreestyleButtonsPanel: with_freestyle = bpy.app.build_options.freestyle return (scene and with_freestyle and rd.use_freestyle and - scene.view_layers.active and(scene.view_render.engine in cls.COMPAT_ENGINES)) + scene.view_layers.active and(context.engine in cls.COMPAT_ENGINES)) class ViewLayerFreestyleEditorButtonsPanel(ViewLayerFreestyleButtonsPanel): @@ -185,7 +185,6 @@ class VIEWLAYER_PT_freestyle_lineset(ViewLayerFreestyleEditorButtonsPanel, Panel scene = context.scene rd = scene.render - view_render = scene.view_render view_layer = scene.view_layers.active freestyle = view_layer.freestyle_settings @@ -782,7 +781,7 @@ class VIEWLAYER_PT_freestyle_linestyle(ViewLayerFreestyleEditorButtonsPanel, Pan layout.separator() row = layout.row() - if view_render.use_shading_nodes: + if scene.render.use_shading_nodes: row.prop(linestyle, "use_nodes") else: row.prop(linestyle, "use_texture") @@ -813,7 +812,7 @@ class MaterialFreestyleButtonsPanel: material = context.material with_freestyle = bpy.app.build_options.freestyle return with_freestyle and material and scene and scene.render.use_freestyle and \ - (scene.view_render.engine in cls.COMPAT_ENGINES) + (context.engine in cls.COMPAT_ENGINES) class MATERIAL_PT_freestyle_line(MaterialFreestyleButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py index 5010ea1e096..233a1c4369e 100644 --- a/release/scripts/startup/bl_ui/properties_material.py +++ b/release/scripts/startup/bl_ui/properties_material.py @@ -82,7 +82,7 @@ class MATERIAL_UL_matslots(UIList): layout.prop(ma, "name", text="", emboss=False, icon_value=icon) else: layout.label(text="", icon_value=icon) - if ma and not context.view_render.use_shading_nodes: + if ma and not context.scene.render.use_shading_nodes: manode = ma.active_node_material if manode: layout.label(text=iface_("Node %s") % manode.name, translate=False, icon_value=layout.icon(manode)) diff --git a/release/scripts/startup/bl_ui/properties_physics_cloth.py b/release/scripts/startup/bl_ui/properties_physics_cloth.py index 351418c9d23..1528899a4de 100644 --- a/release/scripts/startup/bl_ui/properties_physics_cloth.py +++ b/release/scripts/startup/bl_ui/properties_physics_cloth.py @@ -45,8 +45,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.cloth) + return (ob and ob.type == 'MESH') and (context.engine in cls.COMPAT_ENGINES) and (context.cloth) class PHYSICS_PT_cloth(PhysicButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/properties_physics_common.py b/release/scripts/startup/bl_ui/properties_physics_common.py index 15c8bd68d10..3615f8be48c 100644 --- a/release/scripts/startup/bl_ui/properties_physics_common.py +++ b/release/scripts/startup/bl_ui/properties_physics_common.py @@ -30,8 +30,7 @@ class PhysicButtonsPanel: @classmethod def poll(cls, context): - view_render = context.scene.view_render - return (context.object) and view_render.engine in cls.COMPAT_ENGINES + return (context.object) and context.engine in cls.COMPAT_ENGINES def physics_add(self, layout, md, name, type, typeicon, toggles): 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 diff --git a/release/scripts/startup/bl_ui/properties_physics_field.py b/release/scripts/startup/bl_ui/properties_physics_field.py index aee93f840be..3e3a2145682 100644 --- a/release/scripts/startup/bl_ui/properties_physics_field.py +++ b/release/scripts/startup/bl_ui/properties_physics_field.py @@ -33,8 +33,7 @@ class PhysicButtonsPanel: @classmethod def poll(cls, context): - view_render = context.scene.view_render - return (context.object) and (view_render.engine in cls.COMPAT_ENGINES) + return (context.object) and (context.engine in cls.COMPAT_ENGINES) class PHYSICS_PT_field(PhysicButtonsPanel, Panel): @@ -44,8 +43,7 @@ class PHYSICS_PT_field(PhysicButtonsPanel, Panel): @classmethod def poll(cls, context): ob = context.object - view_render = context.scene.view_render - return (view_render.engine in cls.COMPAT_ENGINES) and (ob.field) and (ob.field.type != 'NONE') + return (context.engine in cls.COMPAT_ENGINES) and (ob.field) and (ob.field.type != 'NONE') def draw(self, context): layout = self.layout @@ -182,8 +180,7 @@ class PHYSICS_PT_collision(PhysicButtonsPanel, Panel): @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.collision) + return (ob and ob.type == 'MESH') and (context.engine in cls.COMPAT_ENGINES) and (context.collision) def draw(self, context): layout = self.layout diff --git a/release/scripts/startup/bl_ui/properties_physics_fluid.py b/release/scripts/startup/bl_ui/properties_physics_fluid.py index 61ca23be4bc..80ad9e358c3 100644 --- a/release/scripts/startup/bl_ui/properties_physics_fluid.py +++ b/release/scripts/startup/bl_ui/properties_physics_fluid.py @@ -37,8 +37,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.fluid) + return (ob and ob.type == 'MESH') and context.engine in cls.COMPAT_ENGINES and (context.fluid) class PHYSICS_PT_fluid(PhysicButtonsPanel, Panel): @@ -211,8 +210,7 @@ class PHYSICS_PT_domain_gravity(PhysicButtonsPanel, Panel): @classmethod def poll(cls, context): md = context.fluid - view_render = context.scene.view_render - return md and md.settings and (md.settings.type == 'DOMAIN') and view_render.engine in cls.COMPAT_ENGINES + return md and md.settings and (md.settings.type == 'DOMAIN') and context.engine in cls.COMPAT_ENGINES def draw(self, context): layout = self.layout @@ -265,8 +263,7 @@ class PHYSICS_PT_domain_boundary(PhysicButtonsPanel, Panel): @classmethod def poll(cls, context): md = context.fluid - view_render = context.scene.view_render - return md and md.settings and (md.settings.type == 'DOMAIN') and view_render.engine in cls.COMPAT_ENGINES + return md and md.settings and (md.settings.type == 'DOMAIN') and context.engine in cls.COMPAT_ENGINES def draw(self, context): layout = self.layout @@ -296,8 +293,7 @@ class PHYSICS_PT_domain_particles(PhysicButtonsPanel, Panel): @classmethod def poll(cls, context): md = context.fluid - view_render = context.scene.view_render - return md and md.settings and (md.settings.type == 'DOMAIN') and view_render.engine in cls.COMPAT_ENGINES + return md and md.settings and (md.settings.type == 'DOMAIN') and context.engine in cls.COMPAT_ENGINES def draw(self, context): layout = self.layout diff --git a/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py b/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py index a9b30c3b388..90d3b3da057 100644 --- a/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py +++ b/release/scripts/startup/bl_ui/properties_physics_rigidbody_constraint.py @@ -34,8 +34,7 @@ class PHYSICS_PT_rigid_body_constraint(PHYSICS_PT_rigidbody_constraint_panel, Pa @classmethod def poll(cls, context): ob = context.object - view_render = context.scene.view_render - return (ob and ob.rigid_body_constraint and view_render.engine in cls.COMPAT_ENGINES) + return (ob and ob.rigid_body_constraint and context.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout diff --git a/release/scripts/startup/bl_ui/properties_physics_smoke.py b/release/scripts/startup/bl_ui/properties_physics_smoke.py index 9e6e73a4b1c..ddb898c7881 100644 --- a/release/scripts/startup/bl_ui/properties_physics_smoke.py +++ b/release/scripts/startup/bl_ui/properties_physics_smoke.py @@ -34,8 +34,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.smoke) + return (ob and ob.type == 'MESH') and (context.engine in cls.COMPAT_ENGINES) and (context.smoke) class PHYSICS_PT_smoke(PhysicButtonsPanel, Panel): @@ -242,8 +241,7 @@ class PHYSICS_PT_smoke_highres(PhysicButtonsPanel, Panel): @classmethod def poll(cls, context): md = context.smoke - view_render = context.scene.view_render - return md and (md.smoke_type == 'DOMAIN') and (view_render.engine in cls.COMPAT_ENGINES) + return md and (md.smoke_type == 'DOMAIN') and (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): md = context.smoke.domain_settings @@ -282,8 +280,7 @@ class PHYSICS_PT_smoke_groups(PhysicButtonsPanel, Panel): @classmethod def poll(cls, context): md = context.smoke - view_render = context.scene.view_render - return md and (md.smoke_type == 'DOMAIN') and (view_render.engine in cls.COMPAT_ENGINES) + return md and (md.smoke_type == 'DOMAIN') and (context.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -311,8 +308,7 @@ class PHYSICS_PT_smoke_cache(PhysicButtonsPanel, Panel): @classmethod def poll(cls, context): md = context.smoke - view_render = context.scene.view_render - return md and (md.smoke_type == 'DOMAIN') and (view_render.engine in cls.COMPAT_ENGINES) + return md and (md.smoke_type == 'DOMAIN') and (context.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -348,8 +344,7 @@ class PHYSICS_PT_smoke_field_weights(PhysicButtonsPanel, Panel): @classmethod def poll(cls, context): md = context.smoke - view_render = context.scene.view_render - return md and (md.smoke_type == 'DOMAIN') and (view_render.engine in cls.COMPAT_ENGINES) + return md and (md.smoke_type == 'DOMAIN') and (context.engine in cls.COMPAT_ENGINES) def draw(self, context): domain = context.smoke.domain_settings @@ -363,7 +358,6 @@ class PHYSICS_PT_smoke_display_settings(PhysicButtonsPanel, Panel): @classmethod def poll(cls, context): md = context.smoke - view_render = context.scene.view_render return md and (md.smoke_type == 'DOMAIN') def draw(self, context): diff --git a/release/scripts/startup/bl_ui/properties_physics_softbody.py b/release/scripts/startup/bl_ui/properties_physics_softbody.py index 718f552cf33..101a1528c7e 100644 --- a/release/scripts/startup/bl_ui/properties_physics_softbody.py +++ b/release/scripts/startup/bl_ui/properties_physics_softbody.py @@ -41,8 +41,7 @@ class PhysicButtonsPanel: @classmethod def poll(cls, context): ob = context.object - view_render = context.scene.view_render - return ob and ob.type in COMPAT_OB_TYPES and view_render.engine in cls.COMPAT_ENGINES and context.soft_body + return ob and ob.type in COMPAT_OB_TYPES and context.engine in cls.COMPAT_ENGINES and context.soft_body class PHYSICS_PT_softbody(PhysicButtonsPanel, Panel): diff --git a/release/scripts/startup/bl_ui/properties_render.py b/release/scripts/startup/bl_ui/properties_render.py index 6ba49627579..9b9cfee5dc7 100644 --- a/release/scripts/startup/bl_ui/properties_render.py +++ b/release/scripts/startup/bl_ui/properties_render.py @@ -51,8 +51,7 @@ class RenderButtonsPanel: @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) class RENDER_PT_context(Panel): @@ -70,10 +69,10 @@ class RENDER_PT_context(Panel): layout = self.layout scene = context.scene - view_render = scene.view_render + rd = scene.render - if view_render.has_multiple_engines: - layout.prop(view_render, "engine", text="") + if rd.has_multiple_engines: + layout.prop(rd, "engine", text="") class RENDER_PT_render(RenderButtonsPanel, Panel): @@ -228,10 +227,8 @@ class RENDER_PT_motion_blur(RenderButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - rd = scene.render - view_render = scene.view_render - return not rd.use_full_sample and (view_render.engine in cls.COMPAT_ENGINES) + rd = context.scene.render + return not rd.use_full_sample and (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): rd = context.scene.render @@ -337,7 +334,7 @@ class RENDER_PT_post_processing(RenderButtonsPanel, Panel): split.prop(rd, "dither_intensity", text="Dither", slider=True) - if context.scene.view_render.engine == 'BLENDER_EEVEE': + if context.engine == 'BLENDER_EEVEE': return layout.separator() @@ -631,8 +628,7 @@ class RENDER_PT_eevee_ambient_occlusion(RenderButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): scene = context.scene @@ -660,8 +656,7 @@ class RENDER_PT_eevee_motion_blur(RenderButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): scene = context.scene @@ -686,8 +681,7 @@ class RENDER_PT_eevee_depth_of_field(RenderButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): scene = context.scene @@ -712,8 +706,7 @@ class RENDER_PT_eevee_bloom(RenderButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): scene = context.scene @@ -742,8 +735,7 @@ class RENDER_PT_eevee_volumetric(RenderButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): scene = context.scene @@ -776,8 +768,7 @@ class RENDER_PT_eevee_subsurface_scattering(RenderButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): scene = context.scene @@ -802,8 +793,7 @@ class RENDER_PT_eevee_screen_space_reflections(RenderButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): scene = context.scene @@ -833,8 +823,7 @@ class RENDER_PT_eevee_shadows(RenderButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -854,8 +843,7 @@ class RENDER_PT_eevee_sampling(RenderButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -874,8 +862,7 @@ class RENDER_PT_eevee_indirect_lighting(RenderButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -895,8 +882,7 @@ class RENDER_PT_eevee_film(RenderButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout diff --git a/release/scripts/startup/bl_ui/properties_scene.py b/release/scripts/startup/bl_ui/properties_scene.py index d61e99f1e1e..79a7113374b 100644 --- a/release/scripts/startup/bl_ui/properties_scene.py +++ b/release/scripts/startup/bl_ui/properties_scene.py @@ -60,8 +60,7 @@ class SceneButtonsPanel: @classmethod def poll(cls, context): - view_render = context.scene.view_render - return context.scene and (view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) class SCENE_PT_scene(SceneButtonsPanel, Panel): @@ -330,8 +329,7 @@ class SCENE_PT_rigid_body_world(SceneButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): scene = context.scene @@ -377,8 +375,7 @@ class SCENE_PT_rigid_body_cache(SceneButtonsPanel, Panel): @classmethod def poll(cls, context): scene = context.scene - view_render = scene.view_render - return scene and scene.rigidbody_world and (view_render.engine in cls.COMPAT_ENGINES) + return scene and scene.rigidbody_world and (context.engine in cls.COMPAT_ENGINES) def draw(self, context): scene = context.scene @@ -394,9 +391,8 @@ class SCENE_PT_rigid_body_field_weights(SceneButtonsPanel, Panel): @classmethod def poll(cls, context): - view_render = context.scene.view_render scene = context.scene - return scene and scene.rigidbody_world and (view_render.engine in cls.COMPAT_ENGINES) + return scene and scene.rigidbody_world and (context.engine in cls.COMPAT_ENGINES) def draw(self, context): scene = context.scene diff --git a/release/scripts/startup/bl_ui/properties_view_layer.py b/release/scripts/startup/bl_ui/properties_view_layer.py index 162f8b89a3e..d43f5c43f28 100644 --- a/release/scripts/startup/bl_ui/properties_view_layer.py +++ b/release/scripts/startup/bl_ui/properties_view_layer.py @@ -29,8 +29,7 @@ class ViewLayerButtonsPanel: @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) class VIEWLAYER_UL_viewlayers(UIList): @@ -55,7 +54,6 @@ class VIEWLAYER_PT_layers(ViewLayerButtonsPanel, Panel): scene = context.scene rd = scene.render - view_render = scene.view_render row = layout.row() col = row.column() @@ -133,8 +131,7 @@ class VIEWLAYER_PT_clay_settings(ViewLayerButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -154,8 +151,7 @@ class VIEWLAYER_PT_eevee_ambient_occlusion(ViewLayerButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): scene = context.scene @@ -187,8 +183,7 @@ class VIEWLAYER_PT_eevee_motion_blur(ViewLayerButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): scene = context.scene @@ -217,8 +212,7 @@ class VIEWLAYER_PT_eevee_depth_of_field(ViewLayerButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): scene = context.scene @@ -247,8 +241,7 @@ class VIEWLAYER_PT_eevee_bloom(ViewLayerButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): scene = context.scene @@ -281,8 +274,7 @@ class VIEWLAYER_PT_eevee_volumetric(ViewLayerButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): scene = context.scene @@ -319,8 +311,7 @@ class VIEWLAYER_PT_eevee_subsurface_scattering(ViewLayerButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): scene = context.scene @@ -350,8 +341,7 @@ class VIEWLAYER_PT_eevee_screen_space_reflections(ViewLayerButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw_header(self, context): scene = context.scene @@ -385,8 +375,7 @@ class VIEWLAYER_PT_eevee_shadows(ViewLayerButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -408,8 +397,7 @@ class VIEWLAYER_PT_eevee_sampling(ViewLayerButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -430,8 +418,7 @@ class VIEWLAYER_PT_eevee_indirect_lighting(ViewLayerButtonsPanel, Panel): @classmethod def poll(cls, context): - scene = context.scene - return scene and (scene.view_render.engine in cls.COMPAT_ENGINES) + return (context.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout diff --git a/release/scripts/startup/bl_ui/properties_world.py b/release/scripts/startup/bl_ui/properties_world.py index abf17b96064..045ddc0aa59 100644 --- a/release/scripts/startup/bl_ui/properties_world.py +++ b/release/scripts/startup/bl_ui/properties_world.py @@ -41,8 +41,7 @@ class WORLD_PT_context_world(WorldButtonsPanel, Panel): @classmethod def poll(cls, context): - view_render = context.scene.view_render - return view_render.engine in cls.COMPAT_ENGINES + return (context.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout diff --git a/release/scripts/startup/bl_ui/space_info.py b/release/scripts/startup/bl_ui/space_info.py index b6c845c5995..35b3d46c678 100644 --- a/release/scripts/startup/bl_ui/space_info.py +++ b/release/scripts/startup/bl_ui/space_info.py @@ -32,7 +32,6 @@ class INFO_HT_header(Header): screen = context.screen scene = context.scene layer = context.view_layer - view_render = workspace.view_render row = layout.row(align=True) row.template_header() @@ -57,9 +56,6 @@ class INFO_HT_header(Header): # Active workspace view-layer is retrieved through window, not through workspace. row.template_search(window, "view_layer", scene, "view_layers") - if view_render.has_multiple_engines: - row.prop(view_render, "engine", text="") - layout.separator() layout.template_ID(window, "scene", new="scene.new", unlink="scene.delete") @@ -97,8 +93,6 @@ class INFO_MT_editor_menus(Menu): @staticmethod def draw_menus(layout, context): - view_render = context.view_render - layout.menu("INFO_MT_file") layout.menu("INFO_MT_render") layout.menu("INFO_MT_window") diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py index 2f98585f538..8b199d7eef1 100644 --- a/release/scripts/startup/bl_ui/space_node.py +++ b/release/scripts/startup/bl_ui/space_node.py @@ -51,7 +51,7 @@ class NODE_HT_header(Header): NODE_MT_editor_menus.draw_collapsible(context, layout) layout.prop(snode, "tree_type", text="", expand=True) - use_shading_nodes = scene.view_render.use_shading_nodes or context.view_render.use_shading_nodes + use_shading_nodes = scene.render.use_shading_nodes if snode.tree_type == 'ShaderNodeTree': if use_shading_nodes: diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index af032a7e75d..731295ed330 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -1547,7 +1547,7 @@ class VIEW3D_MT_object_specials(Menu): lamp = obj.data layout.operator_context = 'INVOKE_REGION_WIN' - use_shading_nodes = context.view_render.use_shading_nodes + use_shading_nodes = scene.render.use_shading_nodes if use_shading_nodes: emission_node = None |