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
This commit is contained in:

committed by
Antonio Vazquez

parent
a0a59972e7
commit
a39a6517af
@@ -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)
|
||||
|
||||
|
Reference in New Issue
Block a user