[Bf-blender-cvs] [a74350af582] temp-eevee-gpencil-rewrite: More python changes
Antonio Vazquez
noreply at git.blender.org
Tue Oct 5 14:13:41 CEST 2021
Commit: a74350af582ce013079563c1f477601f3b3bf991
Author: Antonio Vazquez
Date: Mon Sep 13 15:57:04 2021 +0200
Branches: temp-eevee-gpencil-rewrite
https://developer.blender.org/rBa74350af582ce013079563c1f477601f3b3bf991
More python changes
===================================================================
M release/scripts/startup/bl_ui/properties_material_gpencil.py
M release/scripts/startup/bl_ui/properties_object.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_material_gpencil.py b/release/scripts/startup/bl_ui/properties_material_gpencil.py
index 9d099ff2231..170593cd727 100644
--- a/release/scripts/startup/bl_ui/properties_material_gpencil.py
+++ b/release/scripts/startup/bl_ui/properties_material_gpencil.py
@@ -97,6 +97,11 @@ 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
@@ -112,6 +117,9 @@ 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')
diff --git a/release/scripts/startup/bl_ui/properties_object.py b/release/scripts/startup/bl_ui/properties_object.py
index 812c18052b9..85b6263cc5b 100644
--- a/release/scripts/startup/bl_ui/properties_object.py
+++ b/release/scripts/startup/bl_ui/properties_object.py
@@ -405,7 +405,9 @@ class OBJECT_PT_visibility(ObjectButtonsPanel, Panel):
if context.object.type == 'GPENCIL':
col = layout.column(heading="Grease Pencil")
- col.prop(ob, "use_grease_pencil_lights", toggle=False)
+ subcol = layout.column()
+ subcol.prop(ob, "use_grease_pencil_lights", toggle=False)
+ subcol.active = not ob.use_grease_pencil_scene_engine
subcol = layout.column()
subcol.prop(ob, "use_grease_pencil_scene_engine", toggle=False)
More information about the Bf-blender-cvs
mailing list