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:
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-07-28 07:25:26 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-08-12 05:10:50 +0400
commitdd13952080ceddff6b8efff64b525c04cb6c0f42 (patch)
treedadeccd4f5c380061fc51974c81caf05774dc921 /release/scripts/freestyle/modules/parameter_editor.py
parentb6065207913289cfab78ed3d5441f27342864f67 (diff)
Freestyle: Fix for git merge glitches.
Also made minor code cleanup.
Diffstat (limited to 'release/scripts/freestyle/modules/parameter_editor.py')
-rw-r--r--release/scripts/freestyle/modules/parameter_editor.py37
1 files changed, 16 insertions, 21 deletions
diff --git a/release/scripts/freestyle/modules/parameter_editor.py b/release/scripts/freestyle/modules/parameter_editor.py
index 161a16ea5f3..6de53c623a6 100644
--- a/release/scripts/freestyle/modules/parameter_editor.py
+++ b/release/scripts/freestyle/modules/parameter_editor.py
@@ -1075,20 +1075,7 @@ def process(layer_name, lineset_name):
elif m.type == '2D_TRANSFORM':
shaders_list.append(Transform2DShader(
m.pivot, m.scale_x, m.scale_y, m.angle, m.pivot_u, m.pivot_x, m.pivot_y))
- has_tex = False
- if scene.render.use_shading_nodes:
- if linestyle.use_nodes and linestyle.node_tree:
- shaders_list.append(BlenderTextureShader(linestyle.node_tree))
- has_tex = True
- else:
- if linestyle.use_texture:
- 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))
- color = linestyle.color
+ # -- Base color, alpha and thickness -- #
if (not linestyle.use_chaining) or (linestyle.chaining == 'PLAIN' and linestyle.use_same_object):
thickness_position = linestyle.thickness_position
else:
@@ -1097,11 +1084,10 @@ def process(layer_name, lineset_name):
if bpy.app.debug_freestyle:
print("Warning: Thickness position options are applied when chaining is disabled\n"
" or the Plain chaining is used with the Same Object option enabled.")
-
shaders_list.append(ConstantColorShader(*(linestyle.color), alpha=linestyle.alpha))
shaders_list.append(BaseThicknessShader(linestyle.thickness, thickness_position,
linestyle.thickness_ratio))
- # -- Modifiers and textures -- #
+ # -- Modifiers -- #
for m in linestyle.color_modifiers:
if not m.use:
continue
@@ -1166,11 +1152,20 @@ def process(layer_name, lineset_name):
thickness_position, linestyle.thickness_ratio,
m.blend, m.influence,
m.orientation, m.thickness_min, m.thickness_max))
- if linestyle.use_texture:
- textures = tuple(BlenderTextureShader(slot) for slot in linestyle.texture_slots if slot is not None)
- if textures:
- shaders_list.extend(textures)
- shaders_list.append(StrokeTextureStepShader(linestyle.texture_spacing))
+ # -- Textures -- #
+ has_tex = False
+ if scene.render.use_shading_nodes:
+ if linestyle.use_nodes and linestyle.node_tree:
+ shaders_list.append(BlenderTextureShader(linestyle.node_tree))
+ has_tex = True
+ else:
+ if linestyle.use_texture:
+ textures = tuple(BlenderTextureShader(slot) for slot in linestyle.texture_slots if slot is not None)
+ if textures:
+ shaders_list.extend(textures)
+ has_tex = True
+ if has_tex:
+ shaders_list.append(StrokeTextureStepShader(linestyle.texture_spacing))
# -- Stroke caps -- #
if linestyle.caps == 'ROUND':
shaders_list.append(RoundCapShader())