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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2012-12-03 20:21:43 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2012-12-03 20:21:43 +0400
commit81a762e79f8391942026f8c8614fe5c364b85168 (patch)
treec9674dead7904d468cfb648fcea16d2b94d18a8f /source/blender/blenkernel/intern/node.c
parent458131e3957d14d7440acd7fe12a0e381fbf936f (diff)
Fix cycles viewport render getting stuck with driven/animated nodes, the updated
flag would not get cleared due to the nodetree not being a real datablock.
Diffstat (limited to 'source/blender/blenkernel/intern/node.c')
-rw-r--r--source/blender/blenkernel/intern/node.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/node.c b/source/blender/blenkernel/intern/node.c
index 70867a45fd7..17dcf34b71f 100644
--- a/source/blender/blenkernel/intern/node.c
+++ b/source/blender/blenkernel/intern/node.c
@@ -38,9 +38,13 @@
#include "DNA_action_types.h"
#include "DNA_anim_types.h"
+#include "DNA_lamp_types.h"
+#include "DNA_material_types.h"
#include "DNA_node_types.h"
#include "DNA_node_types.h"
#include "DNA_scene_types.h"
+#include "DNA_texture_types.h"
+#include "DNA_world_types.h"
#include "BLI_string.h"
#include "BLI_math.h"
@@ -1154,6 +1158,18 @@ void ntreeSetOutput(bNodeTree *ntree)
* might be different for editor or for "real" use... */
}
+bNodeTree *ntreeFromID(ID *id)
+{
+ switch (GS(id->name)) {
+ case ID_MA: return ((Material*)id)->nodetree;
+ case ID_LA: return ((Lamp*)id)->nodetree;
+ case ID_WO: return ((World*)id)->nodetree;
+ case ID_TE: return ((Tex*)id)->nodetree;
+ case ID_SCE: return ((Scene*)id)->nodetree;
+ default: return NULL;
+ }
+}
+
typedef struct MakeLocalCallData {
ID *group_id;
ID *new_id;