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:
authorAntonioya <blendergit@gmail.com>2018-10-05 00:27:34 +0300
committerAntonioya <blendergit@gmail.com>2018-10-05 00:27:34 +0300
commit3a1e9b9997e33c059d08138da707ac16490fddf7 (patch)
tree770b8bf9c30d10ee4a0866e7f62b5e4cf23f79bc /release
parent65f77ccea1645f8c66fc171377641b08b62010e0 (diff)
GP: Move grid parameters to GP object data level
The grid now can be configured by object because this helps to identify objects and allows to define diferent grid parameters for each objects. Also added a color option.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/startup/bl_ui/properties_data_gpencil.py21
-rw-r--r--release/scripts/startup/bl_ui/space_view3d.py9
2 files changed, 21 insertions, 9 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_gpencil.py b/release/scripts/startup/bl_ui/properties_data_gpencil.py
index 3c9a30ff882..d545211c0c6 100644
--- a/release/scripts/startup/bl_ui/properties_data_gpencil.py
+++ b/release/scripts/startup/bl_ui/properties_data_gpencil.py
@@ -347,6 +347,26 @@ class DATA_PT_gpencil_display(DataButtonsPanel, Panel):
layout.prop(gpd, "zdepth_offset", text="Surface Offset")
+class DATA_PT_gpencil_canvas(DataButtonsPanel, Panel):
+ bl_label = "Canvas"
+ bl_parent_id = 'DATA_PT_gpencil_display'
+ bl_options = {'DEFAULT_CLOSED'}
+
+ def draw(self, context):
+ layout = self.layout
+ layout.use_property_split = True
+ gpd = context.gpencil_data
+
+ row = layout.row(align=True)
+ col = row.column()
+ col.prop(gpd, "grid_color")
+ col.prop(gpd, "grid_scale")
+ row = layout.row(align=True)
+ col = row.column()
+ col.prop(gpd, "grid_lines", text="Subdivisions")
+ col.prop(gpd, "grid_axis", text="Plane")
+
+
class DATA_PT_custom_props_gpencil(DataButtonsPanel, PropertyPanel, Panel):
_context_path = "object.data"
_property_type = bpy.types.GreasePencil
@@ -362,6 +382,7 @@ classes = (
DATA_PT_gpencil_parentpanel,
DATA_PT_gpencil_vertexpanel,
DATA_PT_gpencil_display,
+ DATA_PT_gpencil_canvas,
DATA_PT_custom_props_gpencil,
GPENCIL_UL_vgroups,
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index ffca18d0ab5..ed0e1febb28 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -4927,15 +4927,6 @@ class VIEW3D_PT_overlay_gpencil_options(Panel):
sub.active = overlay.use_gpencil_grid
sub.prop(overlay, "gpencil_grid_opacity", text="Canvas Grid", slider=True)
- if overlay.use_gpencil_grid:
- row = layout.row(align=True)
- col = row.column()
- col.prop(overlay, "gpencil_grid_scale")
- row = layout.row(align=True)
- col = row.column()
- col.prop(overlay, "gpencil_grid_lines", text="Subdivisions")
- col.prop(overlay, "gpencil_grid_axis", text="Plane")
-
if context.object.mode in {'GPENCIL_EDIT', 'GPENCIL_SCULPT', 'GPENCIL_WEIGHT'}:
layout.prop(overlay, "use_gpencil_edit_lines", text="Edit Lines")
layout.prop(overlay, "use_gpencil_multiedit_line_only", text="Show Edit Lines only in multiframe")