[Bf-blender-cvs] [dd13952] master: Freestyle: Fix for git merge glitches.

Tamito Kajiyama noreply at git.blender.org
Tue Aug 12 03:18:30 CEST 2014


Commit: dd13952080ceddff6b8efff64b525c04cb6c0f42
Author: Tamito Kajiyama
Date:   Mon Jul 28 12:25:26 2014 +0900
Branches: master
https://developer.blender.org/rBdd13952080ceddff6b8efff64b525c04cb6c0f42

Freestyle: Fix for git merge glitches.

Also made minor code cleanup.

===================================================================

M	release/scripts/freestyle/modules/parameter_editor.py
M	source/blender/editors/space_node/node_edit.c

===================================================================

diff --git a/release/scripts/freestyle/modules/parameter_editor.py b/release/scripts/freestyle/modules/parameter_editor.py
index 161a16e..6de53c6 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 1cc2e41..ca13d87 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;




More information about the Bf-blender-cvs mailing list