diff options
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/freestyle/modules/parameter_editor.py | 37 |
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()) |