[Bf-blender-cvs] [32a461adf2c] blender2.8: Shader Editor: tweak when the UI for managing the material is enabled

Ines Almeida noreply at git.blender.org
Wed Sep 12 20:06:50 CEST 2018


Commit: 32a461adf2cd02bb808eb8be34b036abdd751c76
Author: Ines Almeida
Date:   Wed Sep 12 19:26:28 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB32a461adf2cd02bb808eb8be34b036abdd751c76

Shader Editor: tweak when the UI for managing the material is enabled

- disable the UI if the currently selected object does not support materials.
- add Metaballs and GPencil as types supporting material.

===================================================================

M	release/scripts/addons
M	release/scripts/addons_contrib
M	release/scripts/startup/bl_ui/space_node.py
M	source/tools

===================================================================

diff --git a/release/scripts/addons b/release/scripts/addons
index 6c3a46dc113..5f7fba0565a 160000
--- a/release/scripts/addons
+++ b/release/scripts/addons
@@ -1 +1 @@
-Subproject commit 6c3a46dc113de870a03191e4c0685238b0823acd
+Subproject commit 5f7fba0565a7c9ae93eae31a08fc9bbbd16d333a
diff --git a/release/scripts/addons_contrib b/release/scripts/addons_contrib
index 15b25a42783..fecc0db5600 160000
--- a/release/scripts/addons_contrib
+++ b/release/scripts/addons_contrib
@@ -1 +1 @@
-Subproject commit 15b25a42783d1e516b5298d70b582fae2559ae17
+Subproject commit fecc0db5600405a0c14c70120ae279222861ef80
diff --git a/release/scripts/startup/bl_ui/space_node.py b/release/scripts/startup/bl_ui/space_node.py
index c106c197ecf..4dff94019ab 100644
--- a/release/scripts/startup/bl_ui/space_node.py
+++ b/release/scripts/startup/bl_ui/space_node.py
@@ -63,10 +63,12 @@ class NODE_HT_header(Header):
                 layout.separator_spacer()
 
                 row = layout.row()
+                types_that_support_material = {'MESH', 'CURVE', 'SURFACE', 'FONT', 'META', 'GPENCIL'}
                 # disable material slot buttons when pinned, cannot find correct slot within id_from (#36589)
-                row.enabled = not snode.pin
+                # disable also when the selected object does not support materials
+                row.enabled = not snode.pin and ob.type in types_that_support_material
                 # Show material.new when no active ID/slot exists
-                if not id_from and ob.type in {'MESH', 'CURVE', 'SURFACE', 'FONT', 'METABALL'}:
+                if not id_from and ob.type in types_that_support_material:
                     row.template_ID(ob, "active_material", new="material.new")
                 # Material ID, but not for Lights
                 if id_from and ob.type != 'LIGHT':
diff --git a/source/tools b/source/tools
index 870f46b6e3a..11656ebaf7f 160000
--- a/source/tools
+++ b/source/tools
@@ -1 +1 @@
-Subproject commit 870f46b6e3abe03c0b9907d08f79af47f4b58ee8
+Subproject commit 11656ebaf7f912cdb1b5eb39c5d0a3b5d492c1aa



More information about the Bf-blender-cvs mailing list