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:
-rw-r--r--release/scripts/freestyle/modules/parameter_editor.py37
-rw-r--r--source/blender/editors/space_node/node_edit.c4
2 files changed, 18 insertions, 23 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())
diff --git a/source/blender/editors/space_node/node_edit.c b/source/blender/editors/space_node/node_edit.c
index 1cc2e41a570..ca13d87d632 100644
--- a/source/blender/editors/space_node/node_edit.c
+++ b/source/blender/editors/space_node/node_edit.c
@@ -643,8 +643,8 @@ void ED_node_set_active(Main *bmain, bNodeTree *ntree, bNode *node)
if (node->id && ELEM(GS(node->id->name), ID_MA, ID_LA, ID_WO))
nodeClearActiveID(ntree, ID_TE);
- if (ELEM5(node->type, SH_NODE_OUTPUT, SH_NODE_OUTPUT_MATERIAL,
- SH_NODE_OUTPUT_WORLD, SH_NODE_OUTPUT_LAMP, SH_NODE_OUTPUT_LINESTYLE))
+ if (ELEM(node->type, SH_NODE_OUTPUT, SH_NODE_OUTPUT_MATERIAL,
+ SH_NODE_OUTPUT_WORLD, SH_NODE_OUTPUT_LAMP, SH_NODE_OUTPUT_LINESTYLE))
{
bNode *tnode;