Patch D246: Texture Marks for freestyle strokes, written and contributed by Paolo Acampora.
Reviewers: brecht, kjym3, #freestyle Reviewed By: brecht, kjym3 Differential Revision: https://developer.blender.org/D246
This commit is contained in:
@@ -25,6 +25,7 @@ from bpy.types import (Brush,
|
||||
Material,
|
||||
Object,
|
||||
ParticleSettings,
|
||||
FreestyleLineStyle,
|
||||
Texture,
|
||||
World)
|
||||
|
||||
@@ -94,6 +95,10 @@ def context_tex_datablock(context):
|
||||
if idblock:
|
||||
return idblock
|
||||
|
||||
idblock = context.line_style
|
||||
if idblock:
|
||||
return idblock
|
||||
|
||||
if context.particle_system:
|
||||
idblock = context.particle_system.settings
|
||||
|
||||
@@ -134,6 +139,7 @@ class TEXTURE_PT_context_texture(TextureButtonsPanel, Panel):
|
||||
context.world or
|
||||
context.lamp or
|
||||
context.texture or
|
||||
context.line_style or
|
||||
context.particle_system or
|
||||
isinstance(context.space_data.pin_id, ParticleSettings) or
|
||||
context.texture_user) and
|
||||
@@ -952,11 +958,28 @@ class TEXTURE_PT_mapping(TextureSlotPanel, Panel):
|
||||
split.label(text="Object:")
|
||||
split.prop(tex, "object", text="")
|
||||
|
||||
elif tex.texture_coords == 'ALONG_STROKE':
|
||||
split = layout.split(percentage=0.3)
|
||||
split.label(text="Use Tips:")
|
||||
split.prop(tex, "use_tips", text="")
|
||||
|
||||
if isinstance(idblock, Brush):
|
||||
if context.sculpt_object or context.image_paint_object:
|
||||
brush_texture_settings(layout, idblock, context.sculpt_object)
|
||||
else:
|
||||
if isinstance(idblock, Material):
|
||||
if isinstance(idblock, FreestyleLineStyle):
|
||||
split = layout.split(percentage=0.3)
|
||||
split.label(text="Projection:")
|
||||
split.prop(tex, "mapping", text="")
|
||||
|
||||
split = layout.split(percentage=0.3)
|
||||
split.separator()
|
||||
row = split.row()
|
||||
row.prop(tex, "mapping_x", text="")
|
||||
row.prop(tex, "mapping_y", text="")
|
||||
row.prop(tex, "mapping_z", text="")
|
||||
|
||||
elif isinstance(idblock, Material):
|
||||
split = layout.split(percentage=0.3)
|
||||
split.label(text="Projection:")
|
||||
split.prop(tex, "mapping", text="")
|
||||
@@ -1129,6 +1152,15 @@ class TEXTURE_PT_influence(TextureSlotPanel, Panel):
|
||||
factor_but(col, "use_map_kink", "kink_factor", "Kink")
|
||||
factor_but(col, "use_map_rough", "rough_factor", "Rough")
|
||||
|
||||
elif isinstance(idblock, FreestyleLineStyle):
|
||||
split = layout.split()
|
||||
|
||||
col = split.column()
|
||||
factor_but(col, "use_map_color_diffuse", "diffuse_color_factor", "Color")
|
||||
col = split.column()
|
||||
factor_but(col, "use_map_alpha", "alpha_factor", "Alpha")
|
||||
|
||||
|
||||
layout.separator()
|
||||
|
||||
if not isinstance(idblock, ParticleSettings):
|
||||
|
Reference in New Issue
Block a user