diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-03-17 19:52:05 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-03-17 23:53:13 +0300 |
commit | df96455c55110da00f0543c5895376ffbc66313b (patch) | |
tree | d1fc0a55f44d4b931362d84eea77a7662c1955a6 /release/scripts/startup/bl_ui/properties_material.py | |
parent | f79ad428085edd8289f37027ba3d5ed3a52bce67 (diff) |
UI: add light/world settings in shader node editor.
Material was already there. Implementation was changed so it's just a
single line of code to adapt a panel to the node editor.
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_material.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_material.py | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py index 6e21fba51f2..260e57c4b1c 100644 --- a/release/scripts/startup/bl_ui/properties_material.py +++ b/release/scripts/startup/bl_ui/properties_material.py @@ -206,11 +206,12 @@ class EEVEE_MATERIAL_PT_settings(MaterialButtonsPanel, Panel): bl_context = "material" COMPAT_ENGINES = {'BLENDER_EEVEE'} - @staticmethod - def draw_shared(self, mat): + def draw(self, context): layout = self.layout layout.use_property_split = True + mat = context.material + layout.prop(mat, "blend_method") if mat.blend_method != 'OPAQUE': @@ -228,9 +229,6 @@ class EEVEE_MATERIAL_PT_settings(MaterialButtonsPanel, Panel): layout.prop(mat, "use_sss_translucency") layout.prop(mat, "pass_index") - def draw(self, context): - self.draw_shared(self, context.material) - class MATERIAL_PT_viewport(MaterialButtonsPanel, Panel): bl_label = "Viewport Display" @@ -242,19 +240,17 @@ class MATERIAL_PT_viewport(MaterialButtonsPanel, Panel): mat = context.material return mat and not mat.grease_pencil - @staticmethod - def draw_shared(self, mat): + def draw(self, context): layout = self.layout layout.use_property_split = True + mat = context.material + col = layout.column() col.prop(mat, "diffuse_color", text="Color") col.prop(mat, "metallic") col.prop(mat, "roughness") - def draw(self, context): - self.draw_shared(self, context.material) - classes = ( MATERIAL_MT_context_menu, |