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:
Tamito Kajiyama
2014-05-03 18:51:53 +09:00
parent 6ec2d72eca
commit b7f085d9c1
44 changed files with 1337 additions and 191 deletions

View File

@@ -30,6 +30,7 @@ to be a collection of examples for shader definition in Python
from _freestyle import (
BackboneStretcherShader,
BezierCurveShader,
BlenderTextureShader,
CalligraphicShader,
ColorNoiseShader,
ColorVariationPatternShader,
@@ -44,6 +45,7 @@ from _freestyle import (
SmoothingShader,
SpatialNoiseShader,
StrokeTextureShader,
StrokeTextureStepShader,
TextureAssignerShader,
ThicknessNoiseShader,
ThicknessVariationPatternShader,

View File

@@ -66,12 +66,14 @@ from freestyle.predicates import (
from freestyle.shaders import (
BackboneStretcherShader,
BezierCurveShader,
BlenderTextureShader,
ConstantColorShader,
GuidingLinesShader,
PolygonalizationShader,
SamplingShader,
SpatialNoiseShader,
StrokeShader,
StrokeTextureStepShader,
TipRemoverShader,
pyBluePrintCirclesShader,
pyBluePrintEllipsesShader,
@@ -1368,6 +1370,14 @@ def process(layer_name, lineset_name):
shaders_list.append(Transform2DShader(
m.pivot, m.scale_x, m.scale_y, m.angle, m.pivot_u, m.pivot_x, m.pivot_y))
color = linestyle.color
if linestyle.use_texture:
has_tex = False
for slot in linestyle.texture_slots:
if slot is not None:
shaders_list.append(BlenderTextureShader(slot))
has_tex = True
if has_tex:
shaders_list.append(StrokeTextureStepShader(linestyle.texture_spacing))
if (not linestyle.use_chaining) or (linestyle.chaining == 'PLAIN' and linestyle.use_same_object):
thickness_position = linestyle.thickness_position
else: