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:
authorLukas Toenne <lukas.toenne@googlemail.com>2013-03-19 22:15:33 +0400
committerLukas Toenne <lukas.toenne@googlemail.com>2013-03-19 22:15:33 +0400
commitaa40fcb0a72452a0a69c3b54b008678383a0119f (patch)
tree54e89a9194a6ee74372196555bdcd9514d6223c7 /source/blender/nodes/composite
parente45da6f40af633262fa1403b84ea613efdee8731 (diff)
Removed the is_local_tree property from compo/shader/texture node trees. This was using an ID property, which causes trouble with 2.62 builds (possibly later) due to an old bug that causes ID properties in local node trees not loaded correctly. The bug has been fixed since then, but creating id properties will break with these builds. The property was not really necessary, so removing it will make it work as long as users don't add id properties themselves.
Diffstat (limited to 'source/blender/nodes/composite')
-rw-r--r--source/blender/nodes/composite/nodes/node_composite_image.c22
1 files changed, 17 insertions, 5 deletions
diff --git a/source/blender/nodes/composite/nodes/node_composite_image.c b/source/blender/nodes/composite/nodes/node_composite_image.c
index aa218252472..c09903ad6c5 100644
--- a/source/blender/nodes/composite/nodes/node_composite_image.c
+++ b/source/blender/nodes/composite/nodes/node_composite_image.c
@@ -31,6 +31,9 @@
#include "node_composite_util.h"
+#include "BKE_global.h"
+#include "BKE_main.h"
+
/* **************** IMAGE (and RenderResult, multilayer image) ******************** */
static bNodeSocketTemplate cmp_node_rlayers_out[] = {
@@ -333,11 +336,20 @@ void register_node_type_cmp_image(void)
static int node_composit_poll_rlayers(bNodeType *UNUSED(ntype), bNodeTree *ntree)
{
- PointerRNA ptr;
-
- /* render layers node can only be used in local scene->nodetree, since it directly links to the scene */
- RNA_id_pointer_create((ID *)ntree, &ptr);
- return (strcmp(ntree->idname, "CompositorNodeTree")==0 && RNA_boolean_get(&ptr, "is_local_tree"));
+ if (strcmp(ntree->idname, "CompositorNodeTree")==0) {
+ Scene *scene;
+
+ /* XXX ugly: check if ntree is a local scene node tree.
+ * Render layers node can only be used in local scene->nodetree,
+ * since it directly links to the scene.
+ */
+ for (scene = G.main->scene.first; scene; scene = scene->id.next)
+ if (scene->nodetree == ntree)
+ break;
+
+ return (scene != NULL);
+ }
+ return false;
}
void register_node_type_cmp_rlayers(void)