2023-08-16 00:20:26 +10:00
|
|
|
# SPDX-FileCopyrightText: 2018-2023 Blender Authors
|
2023-06-15 13:09:04 +10:00
|
|
|
#
|
2022-02-11 09:07:11 +11:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-or-later
|
2023-06-15 13:09:04 +10:00
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
import bpy
|
|
|
|
|
from bpy.types import Menu, Panel, UIList
|
|
|
|
|
from rna_prop_ui import PropertyPanel
|
|
|
|
|
|
2019-12-04 14:13:21 +01:00
|
|
|
from bl_ui.properties_grease_pencil_common import (
|
2020-03-09 16:27:24 +01:00
|
|
|
GreasePencilLayerMasksPanel,
|
2021-01-25 23:39:20 +11:00
|
|
|
GreasePencilLayerTransformPanel,
|
2019-12-04 14:13:21 +01:00
|
|
|
GreasePencilLayerAdjustmentsPanel,
|
|
|
|
|
GreasePencilLayerRelationsPanel,
|
|
|
|
|
GreasePencilLayerDisplayPanel,
|
|
|
|
|
)
|
|
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
###############################
|
|
|
|
|
# Base-Classes (for shared stuff - e.g. poll, attributes, etc.)
|
|
|
|
|
|
2018-07-31 21:06:08 +10:00
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
class DataButtonsPanel:
|
|
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
|
bl_context = "data"
|
|
|
|
|
|
2019-02-26 19:40:07 -03:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
return context.gpencil
|
2019-02-26 19:40:07 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class ObjectButtonsPanel:
|
|
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
|
bl_context = "data"
|
|
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
ob = context.object
|
|
|
|
|
return ob and ob.type == 'GPENCIL'
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class LayerDataButtonsPanel:
|
|
|
|
|
bl_space_type = 'PROPERTIES'
|
|
|
|
|
bl_region_type = 'WINDOW'
|
|
|
|
|
bl_context = "data"
|
|
|
|
|
|
|
|
|
|
@classmethod
|
|
|
|
|
def poll(cls, context):
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
gpencil = context.gpencil
|
|
|
|
|
return gpencil and gpencil.layers.active
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
###############################
|
|
|
|
|
# GP Object Properties Panels and Helper Classes
|
|
|
|
|
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
class DATA_PT_context_gpencil(DataButtonsPanel, Panel):
|
2018-07-31 10:22:19 +02:00
|
|
|
bl_label = ""
|
|
|
|
|
bl_options = {'HIDE_HEADER'}
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
ob = context.object
|
|
|
|
|
space = context.space_data
|
2018-07-31 10:22:19 +02:00
|
|
|
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
if ob:
|
|
|
|
|
layout.template_ID(ob, "data")
|
|
|
|
|
else:
|
|
|
|
|
layout.template_ID(space, "pin_id")
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
|
|
2019-03-12 10:59:57 +11:00
|
|
|
class GPENCIL_MT_layer_context_menu(Menu):
|
2019-11-18 14:33:14 +01:00
|
|
|
bl_label = "Layer Specials"
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2019-07-01 13:24:27 +02:00
|
|
|
ob = context.object
|
|
|
|
|
gpd = ob.data
|
2021-01-25 23:39:20 +11:00
|
|
|
gpl = gpd.layers.active
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2021-07-06 12:05:27 +10:00
|
|
|
layout.operator("gpencil.layer_duplicate", text="Duplicate", icon='DUPLICATE').mode = 'ALL'
|
|
|
|
|
layout.operator("gpencil.layer_duplicate", text="Duplicate Empty Keyframes").mode = 'EMPTY'
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
2018-10-01 10:45:50 +02:00
|
|
|
layout.operator("gpencil.reveal", icon='RESTRICT_VIEW_OFF', text="Show All")
|
|
|
|
|
layout.operator("gpencil.hide", icon='RESTRICT_VIEW_ON', text="Hide Others").unselected = True
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
|
|
layout.operator("gpencil.lock_all", icon='LOCKED', text="Lock All")
|
2020-10-24 11:42:17 -07:00
|
|
|
layout.operator("gpencil.unlock_all", icon='UNLOCKED', text="Unlock All")
|
2018-10-31 14:18:16 +01:00
|
|
|
layout.prop(gpd, "use_autolock_layers", text="Autolock Inactive Layers")
|
2021-01-25 23:39:20 +11:00
|
|
|
layout.prop(gpl, "lock_material")
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
2021-11-04 19:40:18 +01:00
|
|
|
layout.operator("gpencil.layer_merge", icon='SORT_ASC', text="Merge Down").mode = 'ACTIVE'
|
|
|
|
|
layout.operator("gpencil.layer_merge", text="Merge All").mode = 'ALL'
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2018-08-27 16:29:19 +02:00
|
|
|
layout.separator()
|
2021-07-06 12:05:27 +10:00
|
|
|
layout.operator("gpencil.layer_duplicate_object", text="Copy Layer to Selected").only_active = True
|
|
|
|
|
layout.operator("gpencil.layer_duplicate_object", text="Copy All Layers to Selected").only_active = False
|
2018-08-27 16:29:19 +02:00
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
class DATA_PT_gpencil_layers(DataButtonsPanel, Panel):
|
2018-07-31 10:22:19 +02:00
|
|
|
bl_label = "Layers"
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
2020-03-09 16:27:24 +01:00
|
|
|
# layout.use_property_split = True
|
2018-07-31 10:22:19 +02:00
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
gpd = context.gpencil
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
|
# Grease Pencil data...
|
|
|
|
|
if (gpd is None) or (not gpd.layers):
|
|
|
|
|
layout.operator("gpencil.layer_add", text="New Layer")
|
|
|
|
|
else:
|
|
|
|
|
self.draw_layers(context, layout, gpd)
|
|
|
|
|
|
2019-04-19 07:32:24 +02:00
|
|
|
def draw_layers(self, _context, layout, gpd):
|
2018-10-11 18:27:09 +02:00
|
|
|
|
2019-08-23 23:01:06 +02:00
|
|
|
gpl = gpd.layers.active
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2019-08-23 23:01:06 +02:00
|
|
|
row = layout.row()
|
2018-09-28 15:47:36 +02:00
|
|
|
layer_rows = 7
|
2019-09-10 06:11:52 +10:00
|
|
|
|
2019-08-23 23:01:06 +02:00
|
|
|
col = row.column()
|
2018-10-11 18:27:09 +02:00
|
|
|
col.template_list("GPENCIL_UL_layer", "", gpd, "layers", gpd.layers, "active_index",
|
2019-01-09 15:48:09 +01:00
|
|
|
rows=layer_rows, sort_reverse=True, sort_lock=True)
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
|
col = row.column()
|
|
|
|
|
sub = col.column(align=True)
|
2018-10-01 10:45:50 +02:00
|
|
|
sub.operator("gpencil.layer_add", icon='ADD', text="")
|
|
|
|
|
sub.operator("gpencil.layer_remove", icon='REMOVE', text="")
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2019-11-18 14:33:14 +01:00
|
|
|
sub.separator()
|
|
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
if gpl:
|
2019-03-12 10:59:57 +11:00
|
|
|
sub.menu("GPENCIL_MT_layer_context_menu", icon='DOWNARROW_HLT', text="")
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
|
if len(gpd.layers) > 1:
|
|
|
|
|
col.separator()
|
|
|
|
|
|
|
|
|
|
sub = col.column(align=True)
|
2018-10-12 09:08:41 +02:00
|
|
|
sub.operator("gpencil.layer_move", icon='TRIA_UP', text="").type = 'UP'
|
|
|
|
|
sub.operator("gpencil.layer_move", icon='TRIA_DOWN', text="").type = 'DOWN'
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
|
col.separator()
|
|
|
|
|
|
|
|
|
|
sub = col.column(align=True)
|
2018-10-01 10:45:50 +02:00
|
|
|
sub.operator("gpencil.layer_isolate", icon='RESTRICT_VIEW_ON', text="").affect_visibility = True
|
2019-12-04 14:13:21 +01:00
|
|
|
sub.operator("gpencil.layer_isolate", icon='LOCKED', text="").affect_visibility = False
|
2019-09-10 06:11:52 +10:00
|
|
|
|
2019-08-23 23:01:06 +02:00
|
|
|
# Layer main properties
|
2019-09-10 06:11:52 +10:00
|
|
|
row = layout.row()
|
2019-08-23 23:01:06 +02:00
|
|
|
col = layout.column(align=True)
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2019-08-23 23:01:06 +02:00
|
|
|
if gpl:
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.use_property_decorate = True
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
|
|
|
|
|
|
col = layout.row(align=True)
|
|
|
|
|
col.prop(gpl, "blend_mode", text="Blend")
|
|
|
|
|
|
|
|
|
|
col = layout.row(align=True)
|
|
|
|
|
col.prop(gpl, "opacity", text="Opacity", slider=True)
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
col = layout.row(align=True)
|
2023-10-29 12:33:20 +01:00
|
|
|
col.prop(gpl, "use_lights", text="Lights")
|
2020-03-09 16:27:24 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class DATA_PT_gpencil_layer_masks(LayerDataButtonsPanel, GreasePencilLayerMasksPanel, Panel):
|
|
|
|
|
bl_label = "Masks"
|
2023-09-29 14:32:54 +10:00
|
|
|
bl_parent_id = "DATA_PT_gpencil_layers"
|
2020-03-09 16:27:24 +01:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
2019-08-23 23:24:07 +02:00
|
|
|
|
2021-01-25 23:39:20 +11:00
|
|
|
class DATA_PT_gpencil_layer_transform(LayerDataButtonsPanel, GreasePencilLayerTransformPanel, Panel):
|
|
|
|
|
bl_label = "Transform"
|
2023-09-29 14:32:54 +10:00
|
|
|
bl_parent_id = "DATA_PT_gpencil_layers"
|
2021-01-25 23:39:20 +11:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
|
2019-12-04 14:13:21 +01:00
|
|
|
class DATA_PT_gpencil_layer_adjustments(LayerDataButtonsPanel, GreasePencilLayerAdjustmentsPanel, Panel):
|
2018-07-31 10:22:19 +02:00
|
|
|
bl_label = "Adjustments"
|
2023-09-29 14:32:54 +10:00
|
|
|
bl_parent_id = "DATA_PT_gpencil_layers"
|
2018-07-31 10:22:19 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
|
2019-12-04 14:13:21 +01:00
|
|
|
class DATA_PT_gpencil_layer_relations(LayerDataButtonsPanel, GreasePencilLayerRelationsPanel, Panel):
|
2018-07-31 10:22:19 +02:00
|
|
|
bl_label = "Relations"
|
2023-09-29 14:32:54 +10:00
|
|
|
bl_parent_id = "DATA_PT_gpencil_layers"
|
2018-07-31 10:22:19 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
|
2019-12-04 14:13:21 +01:00
|
|
|
class DATA_PT_gpencil_layer_display(LayerDataButtonsPanel, GreasePencilLayerDisplayPanel, Panel):
|
2019-04-03 10:25:49 +02:00
|
|
|
bl_label = "Display"
|
2023-09-29 14:32:54 +10:00
|
|
|
bl_parent_id = "DATA_PT_gpencil_layers"
|
2019-04-03 10:25:49 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
2019-08-23 23:24:07 +02:00
|
|
|
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
class DATA_PT_gpencil_onion_skinning(DataButtonsPanel, Panel):
|
2018-07-31 10:22:19 +02:00
|
|
|
bl_label = "Onion Skinning"
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
gpd = context.gpencil
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
|
2019-03-07 14:56:31 +01:00
|
|
|
col = layout.column()
|
|
|
|
|
col.prop(gpd, "onion_mode")
|
|
|
|
|
col.prop(gpd, "onion_factor", text="Opacity", slider=True)
|
2019-05-16 14:00:31 +02:00
|
|
|
col.prop(gpd, "onion_keyframe_type")
|
2019-03-07 14:56:31 +01:00
|
|
|
|
|
|
|
|
if gpd.onion_mode == 'ABSOLUTE':
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
|
col.prop(gpd, "ghost_before_range", text="Frames Before")
|
|
|
|
|
col.prop(gpd, "ghost_after_range", text="Frames After")
|
2019-03-08 02:43:33 +11:00
|
|
|
elif gpd.onion_mode == 'RELATIVE':
|
2019-03-07 14:56:31 +01:00
|
|
|
col = layout.column(align=True)
|
|
|
|
|
col.prop(gpd, "ghost_before_range", text="Keyframes Before")
|
|
|
|
|
col.prop(gpd, "ghost_after_range", text="Keyframes After")
|
|
|
|
|
|
|
|
|
|
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
class DATA_PT_gpencil_onion_skinning_custom_colors(DataButtonsPanel, Panel):
|
|
|
|
|
bl_parent_id = "DATA_PT_gpencil_onion_skinning"
|
2019-03-07 14:56:31 +01:00
|
|
|
bl_label = "Custom Colors"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
def draw_header(self, context):
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
gpd = context.gpencil
|
2019-03-07 14:56:31 +01:00
|
|
|
|
|
|
|
|
self.layout.prop(gpd, "use_ghost_custom_colors", text="")
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
gpd = context.gpencil
|
2019-03-07 14:56:31 +01:00
|
|
|
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.enabled = gpd.users <= 1 and gpd.use_ghost_custom_colors
|
|
|
|
|
|
|
|
|
|
layout.prop(gpd, "before_color", text="Before")
|
|
|
|
|
layout.prop(gpd, "after_color", text="After")
|
|
|
|
|
|
|
|
|
|
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
class DATA_PT_gpencil_onion_skinning_display(DataButtonsPanel, Panel):
|
|
|
|
|
bl_parent_id = "DATA_PT_gpencil_onion_skinning"
|
2019-03-07 14:56:31 +01:00
|
|
|
bl_label = "Display"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
gpd = context.gpencil
|
2019-03-07 14:56:31 +01:00
|
|
|
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.enabled = gpd.users <= 1
|
|
|
|
|
|
2020-10-24 11:42:17 -07:00
|
|
|
layout.prop(gpd, "use_ghosts_always", text="View in Render")
|
2019-03-07 14:56:31 +01:00
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
|
|
|
|
col.prop(gpd, "use_onion_fade", text="Fade")
|
2019-03-08 02:47:00 +11:00
|
|
|
sub = layout.column()
|
|
|
|
|
sub.active = gpd.onion_mode in {'RELATIVE', 'SELECTED'}
|
2020-03-09 16:27:24 +01:00
|
|
|
sub.prop(gpd, "use_onion_loop", text="Show Start Frame")
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
class GPENCIL_MT_gpencil_vertex_group(Menu):
|
2020-12-17 19:06:21 -06:00
|
|
|
bl_label = "Grease Pencil Vertex Groups"
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
layout.operator_context = 'EXEC_AREA'
|
|
|
|
|
layout.operator("object.vertex_group_add")
|
|
|
|
|
|
|
|
|
|
ob = context.active_object
|
|
|
|
|
if ob.vertex_groups.active:
|
|
|
|
|
layout.separator()
|
|
|
|
|
|
|
|
|
|
layout.operator("gpencil.vertex_group_assign", text="Assign to Active Group")
|
|
|
|
|
layout.operator("gpencil.vertex_group_remove_from", text="Remove from Active Group")
|
|
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
layout.operator_menu_enum("object.vertex_group_set_active", "group", text="Set Active Group")
|
|
|
|
|
layout.operator("object.vertex_group_remove", text="Remove Active Group").all = False
|
|
|
|
|
layout.operator("object.vertex_group_remove", text="Remove All Groups").all = True
|
|
|
|
|
|
|
|
|
|
layout.separator()
|
|
|
|
|
layout.operator("gpencil.vertex_group_select", text="Select Points")
|
|
|
|
|
layout.operator("gpencil.vertex_group_deselect", text="Deselect Points")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
class GPENCIL_UL_vgroups(UIList):
|
2019-04-19 07:32:24 +02:00
|
|
|
def draw_item(self, _context, layout, _data, item, icon, _active_data, _active_propname, _index):
|
2018-07-31 10:22:19 +02:00
|
|
|
vgroup = item
|
|
|
|
|
if self.layout_type in {'DEFAULT', 'COMPACT'}:
|
|
|
|
|
layout.prop(vgroup, "name", text="", emboss=False, icon_value=icon)
|
2019-04-16 11:27:36 +02:00
|
|
|
icon = 'LOCKED' if vgroup.lock_weight else 'UNLOCKED'
|
|
|
|
|
layout.prop(vgroup, "lock_weight", text="", icon=icon, emboss=False)
|
2018-07-31 10:22:19 +02:00
|
|
|
elif self.layout_type == 'GRID':
|
|
|
|
|
layout.alignment = 'CENTER'
|
|
|
|
|
layout.label(text="", icon_value=icon)
|
|
|
|
|
|
|
|
|
|
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
class DATA_PT_gpencil_vertex_groups(ObjectButtonsPanel, Panel):
|
2018-07-31 10:22:19 +02:00
|
|
|
bl_label = "Vertex Groups"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
|
|
|
|
|
ob = context.object
|
|
|
|
|
group = ob.vertex_groups.active
|
|
|
|
|
|
|
|
|
|
rows = 2
|
|
|
|
|
if group:
|
|
|
|
|
rows = 4
|
|
|
|
|
|
|
|
|
|
row = layout.row()
|
|
|
|
|
row.template_list("GPENCIL_UL_vgroups", "", ob, "vertex_groups", ob.vertex_groups, "active_index", rows=rows)
|
|
|
|
|
|
|
|
|
|
col = row.column(align=True)
|
2018-10-01 10:45:50 +02:00
|
|
|
col.operator("object.vertex_group_add", icon='ADD', text="")
|
|
|
|
|
col.operator("object.vertex_group_remove", icon='REMOVE', text="").all = False
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2021-08-26 21:57:59 +02:00
|
|
|
if group:
|
|
|
|
|
col.separator()
|
|
|
|
|
col.operator("object.vertex_group_move", icon='TRIA_UP', text="").direction = 'UP'
|
|
|
|
|
col.operator("object.vertex_group_move", icon='TRIA_DOWN', text="").direction = 'DOWN'
|
|
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
if ob.vertex_groups:
|
|
|
|
|
row = layout.row()
|
|
|
|
|
|
|
|
|
|
sub = row.row(align=True)
|
|
|
|
|
sub.operator("gpencil.vertex_group_assign", text="Assign")
|
|
|
|
|
sub.operator("gpencil.vertex_group_remove_from", text="Remove")
|
|
|
|
|
|
|
|
|
|
sub = row.row(align=True)
|
|
|
|
|
sub.operator("gpencil.vertex_group_select", text="Select")
|
|
|
|
|
sub.operator("gpencil.vertex_group_deselect", text="Deselect")
|
|
|
|
|
|
|
|
|
|
layout.prop(context.tool_settings, "vertex_group_weight", text="Weight")
|
|
|
|
|
|
|
|
|
|
|
2019-02-25 21:59:35 +01:00
|
|
|
class DATA_PT_gpencil_strokes(DataButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Strokes"
|
2018-07-31 10:22:19 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
2018-10-05 10:39:02 +02:00
|
|
|
layout.use_property_decorate = False
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
|
ob = context.object
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
gpd = context.gpencil
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2019-03-04 17:05:44 +01:00
|
|
|
col = layout.column(align=True)
|
|
|
|
|
col.prop(gpd, "stroke_depth_order")
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
|
|
|
|
|
if ob:
|
|
|
|
|
col.enabled = not ob.show_in_front
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
|
col = layout.column(align=True)
|
2019-02-25 21:59:35 +01:00
|
|
|
col.prop(gpd, "stroke_thickness_space")
|
2018-07-31 10:22:19 +02:00
|
|
|
sub = col.column()
|
2019-02-25 21:59:35 +01:00
|
|
|
sub.active = gpd.stroke_thickness_space == 'WORLDSPACE'
|
2018-08-22 15:41:26 +10:00
|
|
|
sub.prop(gpd, "pixel_factor", text="Thickness Scale")
|
2018-07-31 10:22:19 +02:00
|
|
|
|
2020-11-13 21:43:00 +01:00
|
|
|
col.prop(gpd, "edit_curve_resolution")
|
|
|
|
|
|
2019-02-25 21:59:35 +01:00
|
|
|
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
class DATA_PT_gpencil_display(DataButtonsPanel, Panel):
|
2019-02-25 21:59:35 +01:00
|
|
|
bl_label = "Viewport Display"
|
|
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
|
|
|
|
layout.use_property_decorate = False
|
|
|
|
|
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
gpd = context.gpencil
|
2019-02-25 21:59:35 +01:00
|
|
|
|
2018-09-04 22:10:56 +02:00
|
|
|
layout.prop(gpd, "edit_line_color", text="Edit Line Color")
|
2018-07-31 10:22:19 +02:00
|
|
|
|
|
|
|
|
|
2018-10-04 23:27:34 +02:00
|
|
|
class DATA_PT_gpencil_canvas(DataButtonsPanel, Panel):
|
|
|
|
|
bl_label = "Canvas"
|
2023-09-29 14:32:54 +10:00
|
|
|
bl_parent_id = "DATA_PT_gpencil_display"
|
2018-10-04 23:27:34 +02:00
|
|
|
bl_options = {'DEFAULT_CLOSED'}
|
|
|
|
|
|
|
|
|
|
def draw(self, context):
|
|
|
|
|
layout = self.layout
|
|
|
|
|
layout.use_property_split = True
|
2018-10-05 10:39:02 +02:00
|
|
|
layout.use_property_decorate = False
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
gpd = context.gpencil
|
2018-10-05 10:23:13 +02:00
|
|
|
grid = gpd.grid
|
2018-10-04 23:27:34 +02:00
|
|
|
|
|
|
|
|
row = layout.row(align=True)
|
|
|
|
|
col = row.column()
|
2018-10-09 17:44:16 +02:00
|
|
|
col.prop(grid, "color", text="Color")
|
|
|
|
|
col.prop(grid, "scale", text="Scale")
|
2018-10-08 23:21:44 +02:00
|
|
|
col.prop(grid, "offset")
|
2018-10-04 23:27:34 +02:00
|
|
|
row = layout.row(align=True)
|
|
|
|
|
col = row.column()
|
2018-10-05 10:23:13 +02:00
|
|
|
col.prop(grid, "lines", text="Subdivisions")
|
2018-10-04 23:27:34 +02:00
|
|
|
|
|
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
class DATA_PT_custom_props_gpencil(DataButtonsPanel, PropertyPanel, Panel):
|
|
|
|
|
_context_path = "object.data"
|
|
|
|
|
_property_type = bpy.types.GreasePencil
|
|
|
|
|
|
2020-03-09 16:27:24 +01:00
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
###############################
|
|
|
|
|
|
2018-07-31 21:06:08 +10:00
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
classes = (
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
DATA_PT_context_gpencil,
|
|
|
|
|
DATA_PT_gpencil_layers,
|
|
|
|
|
DATA_PT_gpencil_onion_skinning,
|
|
|
|
|
DATA_PT_gpencil_onion_skinning_custom_colors,
|
|
|
|
|
DATA_PT_gpencil_onion_skinning_display,
|
2020-03-09 16:27:24 +01:00
|
|
|
DATA_PT_gpencil_layer_masks,
|
2021-01-25 23:39:20 +11:00
|
|
|
DATA_PT_gpencil_layer_transform,
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
DATA_PT_gpencil_layer_adjustments,
|
|
|
|
|
DATA_PT_gpencil_layer_relations,
|
2019-04-03 10:25:49 +02:00
|
|
|
DATA_PT_gpencil_layer_display,
|
Properties Editor: Grease Pencil and pinning fixes
The UI was trying to use screen_context.c for its poll and draw
functions. So the active object and active object data and active layer
was used in the UI, instead of the context one.
Besides, for the material, the wrong context path was used altogether
when the active object was a greasepencil.
This would lead to all sort of pinning problems:
* A Mesh panel is pinned, but the active object is a grease pencil, the
grease pencil panels would show.
* If a Grease Pencil (data) panel is pinned, but the active object is not
the one pinned, nothing would show.
* Material panels and pinning were totally broken, showing the material
context for pinned mesh data panels even.
I also sanitized the name of the panels, their inheritance and poll
functions.
Reviewers: antoniov, brecht
Subscribers: billrey
Differential Revision: https://developer.blender.org/D4470
2019-03-07 14:55:03 +00:00
|
|
|
DATA_PT_gpencil_vertex_groups,
|
2019-02-25 21:59:35 +01:00
|
|
|
DATA_PT_gpencil_strokes,
|
2018-07-31 10:22:19 +02:00
|
|
|
DATA_PT_gpencil_display,
|
2018-10-04 23:27:34 +02:00
|
|
|
DATA_PT_gpencil_canvas,
|
2018-07-31 10:22:19 +02:00
|
|
|
DATA_PT_custom_props_gpencil,
|
|
|
|
|
|
|
|
|
|
GPENCIL_UL_vgroups,
|
|
|
|
|
|
2019-03-12 10:59:57 +11:00
|
|
|
GPENCIL_MT_layer_context_menu,
|
2018-07-31 10:22:19 +02:00
|
|
|
GPENCIL_MT_gpencil_vertex_group,
|
|
|
|
|
)
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__": # only for live edit.
|
|
|
|
|
from bpy.utils import register_class
|
2020-03-09 16:27:24 +01:00
|
|
|
|
2018-07-31 10:22:19 +02:00
|
|
|
for cls in classes:
|
|
|
|
|
register_class(cls)
|