[Bf-blender-cvs] [2f35045fd15] temp-eevee-gpencil-rewrite: Revert python changes in material panel

Antonio Vazquez noreply at git.blender.org
Wed Oct 6 10:35:49 CEST 2021


Commit: 2f35045fd157b818dfba820ec1d7e08118b360ee
Author: Antonio Vazquez
Date:   Wed Oct 6 10:35:40 2021 +0200
Branches: temp-eevee-gpencil-rewrite
https://developer.blender.org/rB2f35045fd157b818dfba820ec1d7e08118b360ee

Revert python changes in material panel

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

M	release/scripts/startup/bl_ui/properties_material.py
M	release/scripts/startup/bl_ui/properties_material_gpencil.py

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

diff --git a/release/scripts/startup/bl_ui/properties_material.py b/release/scripts/startup/bl_ui/properties_material.py
index a32f3ed4042..1c7f3639f0a 100644
--- a/release/scripts/startup/bl_ui/properties_material.py
+++ b/release/scripts/startup/bl_ui/properties_material.py
@@ -93,9 +93,8 @@ class EEVEE_MATERIAL_PT_context_material(MaterialButtonsPanel, Panel):
         ob = context.object
         mat = context.material
 
-        if (ob and ob.type == 'GPENCIL' and ob.use_grease_pencil_scene_engine is False):
-            if mat and mat.grease_pencil:
-                return False
+        if (ob and ob.type == 'GPENCIL') or (mat and mat.grease_pencil):
+            return False
 
         return (ob or mat) and (context.engine in cls.COMPAT_ENGINES)
 
diff --git a/release/scripts/startup/bl_ui/properties_material_gpencil.py b/release/scripts/startup/bl_ui/properties_material_gpencil.py
index 170593cd727..9d099ff2231 100644
--- a/release/scripts/startup/bl_ui/properties_material_gpencil.py
+++ b/release/scripts/startup/bl_ui/properties_material_gpencil.py
@@ -97,11 +97,6 @@ class GPMaterialButtonsPanel:
 
     @classmethod
     def poll(cls, context):
-        ob = context.active_object
-        # If using scene engine, don't use this type of materials
-        if ob and ob.type == 'GPENCIL' and ob.use_grease_pencil_scene_engine:
-            return False
-
         ma = context.material
         return ma and ma.grease_pencil
 
@@ -117,9 +112,6 @@ class MATERIAL_PT_gpencil_slots(GreasePencilMaterialsPanel, Panel):
     def poll(cls, context):
         ob = context.object
         ma = context.material
-        # If using scene engine, don't use this type of materials
-        if ob and ob.type == 'GPENCIL' and ob.use_grease_pencil_scene_engine:
-            return False
 
         return (ma and ma.grease_pencil) or (ob and ob.type == 'GPENCIL')



More information about the Bf-blender-cvs mailing list