Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntonio Vazquez <blendergit@gmail.com>2021-09-13 16:57:04 +0300
committerAntonio Vazquez <blendergit@gmail.com>2021-10-05 13:25:23 +0300
commita74350af582ce013079563c1f477601f3b3bf991 (patch)
tree5fe5a45ed9cba098e5e2282a9ce77ce9e385bc96
parentefa55c157a301ff3c4a682090a4fb1af1f5ad329 (diff)
More python changes
-rw-r--r--release/scripts/startup/bl_ui/properties_material_gpencil.py8
-rw-r--r--release/scripts/startup/bl_ui/properties_object.py4
2 files changed, 11 insertions, 1 deletions
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)