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/BasicStrokeShaders.h
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/BasicStrokeShaders.h')
-rw-r--r--source/blender/freestyle/intern/stroke/BasicStrokeShaders.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.h b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.h
index 9186d164e9b..6ac22c5b2d1 100644
--- a/source/blender/freestyle/intern/stroke/BasicStrokeShaders.h
+++ b/source/blender/freestyle/intern/stroke/BasicStrokeShaders.h
@@ -36,7 +36,10 @@
#include "../geometry/Bezier.h"
#include "../geometry/Geom.h"
+extern "C" {
struct MTex;
+struct bNodeTree;
+}
using namespace std;
@@ -904,6 +907,7 @@ class BlenderTextureShader : public StrokeShader
{
private:
MTex *_mtex;
+ bNodeTree *_nodeTree;
public:
/*! Builds the shader.
@@ -913,6 +917,17 @@ public:
BlenderTextureShader(MTex *mtex) : StrokeShader()
{
_mtex = mtex;
+ _nodeTree = NULL;
+ }
+
+ /*! Builds the shader.
+ * \param nodetree
+ * A node tree (of new shading nodes) to define textures.
+ */
+ BlenderTextureShader(bNodeTree *nodetree) : StrokeShader()
+ {
+ _nodeTree = nodetree;
+ _mtex = NULL;
}
virtual string getName() const