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:
authorCody Winchester <CodyWinch>2020-04-19 18:25:36 +0300
committerAntonio Vazquez <blendergit@gmail.com>2020-04-19 18:29:35 +0300
commita39a6517af6603fcb16728daed88b642c88aa6eb (patch)
treeccb82a3966c6d7bef20acf618f5f4ff345d94e77 /release/scripts/startup/bl_ui/properties_data_modifier.py
parenta0a59972e7e526ce3c49878f4607acbae8508e7a (diff)
GPencil: Add Texture modifier
This patch aims to add a new modifier for grease pencil objects that gives more control over the strokes texture UVs. There are 3 modes. 1 Control the stroke texture UVs alone 2 Control the fill texture UVs alone 3 Control both the fill and stroke texture UVs For the stroke texture UVs there are 2 options for fitting the texture to the stroke. 1 The texture uvs are kept a consistent length how it currently is set by default. 2 The uvs are normalized to fit the length of the stroke regardless of how long or short it gets allowing the texture to fit the length of the stroke. There are then 2 controls to scale up and down the uvs and an offset value that allows moving the texture along the stroke. For the fill texture UVs it includes all of the transformational controls. Location offset, scale, and rotation. Reviewed By: antoniov, mendio Differential Revision: https://developer.blender.org/D7439
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_data_modifier.py')
-rw-r--r--release/scripts/startup/bl_ui/properties_data_modifier.py21
1 files changed, 21 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index b9fc7431a9a..03debee4384 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -1976,6 +1976,27 @@ class DATA_PT_gpencil_modifiers(ModifierButtonsPanel, Panel):
self.gpencil_masking(layout, ob, md, True, True)
+ def GP_TEXTURE(self, layout, ob, md):
+ col = layout.column()
+
+ col.prop(md, "mode")
+ if md.mode in {'STROKE', 'STROKE_AND_FILL'}:
+ col.label(text="Stroke Texture Control:")
+ col.prop(md, "fit_method")
+ col.prop(md, "uv_offset")
+ col.prop(md, "uv_scale")
+
+ if md.mode == 'STROKE_AND_FILL':
+ col.separator()
+
+ if md.mode in {'FILL', 'STROKE_AND_FILL'}:
+ col.label(text="Fill Texture Control:")
+ col.prop(md, "fill_rotation", text="Rotation")
+ col.prop(md, "fill_offset", text="Location")
+ col.prop(md, "fill_scale", text="Scale")
+
+ self.gpencil_masking(layout, ob, md, True)
+
def GP_TINT(self, layout, ob, md):
layout.row().prop(md, "tint_type", expand=True)