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:
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_grease_pencil_common.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_grease_pencil_common.py87
1 files changed, 84 insertions, 3 deletions
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index bc76f57fa86..c2fb697337d 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -871,8 +871,8 @@ class GreasePencilMaterialsPanel:
col.separator()
sub = col.column(align=True)
- sub.operator("gpencil.color_isolate", icon='LOCKED', text="").affect_visibility = False
sub.operator("gpencil.color_isolate", icon='RESTRICT_VIEW_ON', text="").affect_visibility = True
+ sub.operator("gpencil.color_isolate", icon='LOCKED', text="").affect_visibility = False
if show_full_ui:
row = layout.row()
@@ -935,8 +935,6 @@ class GPENCIL_UL_layer(UIList):
icon='MOD_MASK' if gpl.mask_layer else 'LAYER_ACTIVE',
emboss=False)
- row.prop(gpl, "lock", text="", emboss=False)
- row.prop(gpl, "hide", text="", emboss=False)
subrow = row.row(align=True)
subrow.prop(
gpl,
@@ -945,6 +943,8 @@ class GPENCIL_UL_layer(UIList):
icon='ONIONSKIN_ON' if gpl.use_onion_skinning else 'ONIONSKIN_OFF',
emboss=False,
)
+ row.prop(gpl, "hide", text="", emboss=False)
+ row.prop(gpl, "lock", text="", emboss=False)
elif self.layout_type == 'GRID':
layout.alignment = 'CENTER'
layout.label(
@@ -981,6 +981,87 @@ class GreasePencilSimplifyPanel:
sub.prop(rd, "simplify_gpencil_remove_lines", text="Lines")
+class GreasePencilLayerAdjustmentsPanel:
+ bl_label = "Adjustments"
+ bl_parent_id = 'DOPESHEET_PT_gpencil_mode'
+ bl_options = {'DEFAULT_CLOSED'}
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+ scene = context.scene
+
+ ob = context.object
+ gpd = ob.data
+ gpl = gpd.layers.active
+ layout.active = not gpl.lock
+
+ # Layer options
+ # Offsets - Color Tint
+ layout.enabled = not gpl.lock
+ col = layout.column(align=True)
+ col.prop(gpl, "tint_color")
+ col.prop(gpl, "tint_factor", text="Factor", slider=True)
+
+ # Offsets - Thickness
+ col = layout.row(align=True)
+ col.prop(gpl, "line_change", text="Stroke Thickness")
+
+ col = layout.row(align=True)
+ col.prop(gpl, "pass_index")
+
+ col = layout.row(align=True)
+ col.prop_search(gpl, "viewlayer_render", scene, "view_layers", text="View Layer")
+
+ col = layout.row(align=True)
+ col.prop(gpl, "lock_material")
+
+
+class GreasePencilLayerRelationsPanel:
+ bl_label = "Relations"
+ bl_parent_id = 'DOPESHEET_PT_gpencil_mode'
+ bl_options = {'DEFAULT_CLOSED'}
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+ layout.use_property_decorate = False
+
+ ob = context.object
+ gpd = ob.data
+ gpl = gpd.layers.active
+
+ col = layout.column()
+ col.active = not gpl.lock
+ col.prop(gpl, "parent")
+ col.prop(gpl, "parent_type", text="Type")
+ parent = gpl.parent
+
+ if parent and gpl.parent_type == 'BONE' and parent.type == 'ARMATURE':
+ col.prop_search(gpl, "parent_bone", parent.data, "bones", text="Bone")
+
+
+class GreasePencilLayerDisplayPanel:
+ bl_label = "Display"
+ bl_parent_id = 'DOPESHEET_PT_gpencil_mode'
+ bl_options = {'DEFAULT_CLOSED'}
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+ layout.use_property_decorate = False
+
+ ob = context.object
+ gpd = ob.data
+ gpl = gpd.layers.active
+
+ col = layout.row(align=True)
+ col.prop(gpl, "channel_color")
+
+ col = layout.row(align=True)
+ col.prop(gpl, "use_solo_mode", text="Show Only On Keyframed")
+
+
classes = (
GPENCIL_MT_pie_tool_palette,
GPENCIL_MT_pie_settings_palette,