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-19 13:52:32 +0400
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>2014-08-12 05:10:36 +0400
commit34c133a488bdd78a1bd5027e1dcc8c60da86d25a (patch)
tree6cc5822b6a0fc79b9d8ae0fdb75a3cebf6fa6080 /source/blender/freestyle/intern/stroke/Stroke.cpp
parentc38e80d6322b942fd2a893f4f294a919ed6e6b99 (diff)
Freestyle: an improved workflow of line style shading nodes.
Removed the previous changes for passing a line style through the Controller, and revised the BlenderTextureShader to assign the shader node tree of a line style (if specified) to strokes. This way the assignment of shading nodes can be done through both the Freestyle GUI and Python scripting.
Diffstat (limited to 'source/blender/freestyle/intern/stroke/Stroke.cpp')
-rw-r--r--source/blender/freestyle/intern/stroke/Stroke.cpp14
1 files changed, 2 insertions, 12 deletions
diff --git a/source/blender/freestyle/intern/stroke/Stroke.cpp b/source/blender/freestyle/intern/stroke/Stroke.cpp
index 8900d19a102..863da069259 100644
--- a/source/blender/freestyle/intern/stroke/Stroke.cpp
+++ b/source/blender/freestyle/intern/stroke/Stroke.cpp
@@ -30,10 +30,7 @@
#include "StrokeAdvancedIterators.h"
#include "StrokeRenderer.h"
-#include "DNA_linestyle_types.h"
-
#include "BKE_global.h"
-#include "BKE_linestyle.h"
#include "BKE_node.h"
namespace Freestyle {
@@ -398,11 +395,10 @@ Stroke::Stroke()
_mediumType = OPAQUE_MEDIUM;
_textureId = 0;
_textureStep = 1.0;
- _lineStyle = NULL;
- _useShadingNodes = false;
for (int a = 0; a < MAX_MTEX; a++) {
_mtex[a] = NULL;
}
+ _nodeTree = NULL;
_tips = false;
}
@@ -421,8 +417,6 @@ Stroke::Stroke(const Stroke& iBrother)
_mediumType = iBrother._mediumType;
_textureId = iBrother._textureId;
_textureStep = iBrother._textureStep;
- _lineStyle = iBrother._lineStyle;
- _useShadingNodes = iBrother._useShadingNodes;
for (int a = 0; a < MAX_MTEX; a++) {
if (iBrother._mtex) {
_mtex[a] = iBrother._mtex[a];
@@ -431,6 +425,7 @@ Stroke::Stroke(const Stroke& iBrother)
_mtex[a] = NULL;
}
}
+ _nodeTree = iBrother._nodeTree;
_tips = iBrother._tips;
}
@@ -760,11 +755,6 @@ void Stroke::ScaleThickness(float iFactor)
}
}
-bool Stroke::hasTex() const
-{
- return BKE_linestyle_use_textures(_lineStyle, _useShadingNodes);
-}
-
void Stroke::Render(const StrokeRenderer *iRenderer)
{
StrokeRep rep(this);