diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_material.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_material.py | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py index 29cb2466ee5..42a132004d4 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.scene.render.use_shading_nodes: + if ma and not context.view_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)) @@ -101,7 +101,7 @@ class MaterialButtonsPanel: @classmethod def poll(cls, context): - return context.material and (context.scene.render.engine in cls.COMPAT_ENGINES) + return context.material and (context.engine in cls.COMPAT_ENGINES) class MATERIAL_PT_context_material(MaterialButtonsPanel, Panel): @@ -114,7 +114,7 @@ class MATERIAL_PT_context_material(MaterialButtonsPanel, Panel): # An exception, don't call the parent poll func because # this manages materials for all engine types - engine = context.scene.render.engine + engine = context.engine return (context.material or context.object) and (engine in cls.COMPAT_ENGINES) def draw(self, context): @@ -197,7 +197,7 @@ class MATERIAL_PT_pipeline(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return mat and (not simple_material(mat)) and (mat.type in {'SURFACE', 'WIRE', 'VOLUME'}) and (engine in cls.COMPAT_ENGINES) def draw(self, context): @@ -250,7 +250,7 @@ class MATERIAL_PT_diffuse(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return check_material(mat) and (mat.type in {'SURFACE', 'WIRE'}) and (engine in cls.COMPAT_ENGINES) def draw(self, context): @@ -307,7 +307,7 @@ class MATERIAL_PT_specular(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return check_material(mat) and (mat.type in {'SURFACE', 'WIRE'}) and (engine in cls.COMPAT_ENGINES) def draw(self, context): @@ -360,7 +360,7 @@ class MATERIAL_PT_shading(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return check_material(mat) and (mat.type in {'SURFACE', 'WIRE'}) and (engine in cls.COMPAT_ENGINES) def draw(self, context): @@ -394,7 +394,7 @@ class MATERIAL_PT_transp(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return check_material(mat) and (mat.type in {'SURFACE', 'WIRE'}) and (engine in cls.COMPAT_ENGINES) def draw_header(self, context): @@ -460,7 +460,7 @@ class MATERIAL_PT_mirror(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return check_material(mat) and (mat.type in {'SURFACE', 'WIRE'}) and (engine in cls.COMPAT_ENGINES) def draw_header(self, context): @@ -518,7 +518,7 @@ class MATERIAL_PT_sss(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return check_material(mat) and (mat.type in {'SURFACE', 'WIRE'}) and (engine in cls.COMPAT_ENGINES) def draw_header(self, context): @@ -569,7 +569,7 @@ class MATERIAL_PT_halo(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return mat and (mat.type == 'HALO') and (engine in cls.COMPAT_ENGINES) def draw(self, context): @@ -622,7 +622,7 @@ class MATERIAL_PT_flare(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return mat and (mat.type == 'HALO') and (engine in cls.COMPAT_ENGINES) def draw_header(self, context): @@ -656,7 +656,7 @@ class MATERIAL_PT_game_settings(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): - return context.material and (context.scene.render.engine in cls.COMPAT_ENGINES) + return context.material and (context.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -685,7 +685,7 @@ class MATERIAL_PT_physics(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): - return context.material and (context.scene.render.engine in cls.COMPAT_ENGINES) + return context.material and (context.engine in cls.COMPAT_ENGINES) def draw(self, context): layout = self.layout @@ -718,7 +718,7 @@ class MATERIAL_PT_strand(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return mat and (mat.type in {'SURFACE', 'WIRE', 'HALO'}) and (engine in cls.COMPAT_ENGINES) def draw(self, context): @@ -764,7 +764,7 @@ class MATERIAL_PT_options(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return check_material(mat) and (mat.type in {'SURFACE', 'WIRE'}) and (engine in cls.COMPAT_ENGINES) def draw(self, context): @@ -814,7 +814,7 @@ class MATERIAL_PT_shadow(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return check_material(mat) and (mat.type in {'SURFACE', 'WIRE'}) and (engine in cls.COMPAT_ENGINES) def draw(self, context): @@ -864,7 +864,7 @@ class MATERIAL_PT_transp_game(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return check_material(mat) and (engine in cls.COMPAT_ENGINES) def draw_header(self, context): @@ -897,7 +897,7 @@ class VolumeButtonsPanel: @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return mat and (mat.type == 'VOLUME') and (engine in cls.COMPAT_ENGINES) @@ -982,7 +982,7 @@ class MATERIAL_PT_volume_transp(VolumeButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return mat and simple_material(mat) and (mat.type == 'VOLUME') and (engine in cls.COMPAT_ENGINES) def draw(self, context): @@ -1023,7 +1023,7 @@ class MATERIAL_PT_volume_options(VolumeButtonsPanel, Panel): @classmethod def poll(cls, context): mat = context.material - engine = context.scene.render.engine + engine = context.engine return check_material(mat) and (mat.type == 'VOLUME') and (engine in cls.COMPAT_ENGINES) def draw(self, context): @@ -1061,7 +1061,7 @@ class EEVEE_MATERIAL_PT_context_material(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): - engine = context.scene.render.engine + engine = context.engine return (context.material or context.object) and (engine in cls.COMPAT_ENGINES) def draw(self, context): @@ -1135,7 +1135,7 @@ class EEVEE_MATERIAL_PT_surface(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): - engine = context.scene.render.engine + engine = context.engine return context.material and (engine in cls.COMPAT_ENGINES) def draw(self, context): @@ -1163,7 +1163,7 @@ class EEVEE_MATERIAL_PT_options(MaterialButtonsPanel, Panel): @classmethod def poll(cls, context): - engine = context.scene.render.engine + engine = context.engine return context.material and (engine in cls.COMPAT_ENGINES) def draw(self, context): |