[Bf-blender-cvs] [d5c7fd54fd6] greasepencil-object: T55445: Add custom properties panel to materials
Antonio Vazquez
noreply at git.blender.org
Tue Jul 24 16:46:04 CEST 2018
Commit: d5c7fd54fd65162d2a3b70c170630ad66c4fdf89
Author: Antonio Vazquez
Date: Tue Jul 24 16:45:54 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rBd5c7fd54fd65162d2a3b70c170630ad66c4fdf89
T55445: Add custom properties panel to materials
===================================================================
M release/scripts/startup/bl_ui/properties_material_gpencil.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_material_gpencil.py b/release/scripts/startup/bl_ui/properties_material_gpencil.py
index c7cc6f9298e..2d823594547 100644
--- a/release/scripts/startup/bl_ui/properties_material_gpencil.py
+++ b/release/scripts/startup/bl_ui/properties_material_gpencil.py
@@ -19,6 +19,7 @@
# <pep8 compliant>
import bpy
from bpy.types import Menu, Panel, UIList
+from rna_prop_ui import PropertyPanel
class GPENCIL_MT_color_specials(Menu):
@@ -282,6 +283,12 @@ class MATERIAL_PT_gpencil_preview(GPMaterialButtonsPanel, Panel):
self.layout.template_preview(ma)
+class MATERIAL_PT_gpencil_custom_props(GPMaterialButtonsPanel, PropertyPanel, Panel):
+ COMPAT_ENGINES = {'BLENDER_EEVEE', 'BLENDER_OPENGL'}
+ _context_path = "object.active_material"
+ _property_type = bpy.types.Material
+
+
class MATERIAL_PT_gpencil_options(GPMaterialButtonsPanel, Panel):
bl_label = "Options"
bl_options = {'DEFAULT_CLOSED'}
@@ -306,6 +313,7 @@ classes = (
MATERIAL_PT_gpencil_strokecolor,
MATERIAL_PT_gpencil_fillcolor,
MATERIAL_PT_gpencil_options,
+ MATERIAL_PT_gpencil_custom_props,
)
if __name__ == "__main__": # only for live edit.
More information about the Bf-blender-cvs
mailing list