diff options
author | Ton Roosendaal <ton@blender.org> | 2009-01-04 17:14:06 +0300 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-01-04 17:14:06 +0300 |
commit | f7cb86df3a9ceccc4d649e42735732a608169157 (patch) | |
tree | 558a9ba43708a2213b1afa8f46d79f5daa140bc6 /source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c | |
parent | 74f9e98c828c17910405092785633373d4ae88e8 (diff) |
2.5
Think global, act local!
The old favorite G.scene gone! Man... that took almost 2 days.
Also removed G.curscreen and G.edbo.
Not everything could get solved; here's some notes.
- modifiers now store current scene in ModifierData. This is not
meant for permanent, but it can probably stick there until we
cleaned the anim system and depsgraph to cope better with
timing issues.
- Game engine G.scene should become an argument for staring it.
Didn't solve this yet.
- Texture nodes should get scene cfra, but the current implementation
is too tightly wrapped to do it easily.
Diffstat (limited to 'source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c')
-rw-r--r-- | source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c b/source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c index 722b00d57a9..8c63c348b57 100644 --- a/source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c +++ b/source/blender/nodes/intern/CMP_nodes/CMP_outputFile.c @@ -62,9 +62,9 @@ static void node_composit_exec_output_file(void *data, bNode *node, bNodeStack * } } - BKE_makepicstring(string, nif->name, rd->cfra, nif->imtype); + BKE_makepicstring((Scene *)node->id, string, nif->name, rd->cfra, nif->imtype); - if(0 == BKE_write_ibuf(ibuf, string, nif->imtype, nif->subimtype, nif->imtype==R_OPENEXR?nif->codec:nif->quality)) + if(0 == BKE_write_ibuf((Scene *)node->id, ibuf, string, nif->imtype, nif->subimtype, nif->imtype==R_OPENEXR?nif->codec:nif->quality)) printf("Cannot save Node File Output to %s\n", string); else printf("Saved: %s\n", string); @@ -81,15 +81,19 @@ static void node_composit_exec_output_file(void *data, bNode *node, bNodeStack * static void node_composit_init_output_file(bNode *node) { - NodeImageFile *nif= MEM_callocN(sizeof(NodeImageFile), "node image file"); - node->storage= nif; - BLI_strncpy(nif->name, G.scene->r.pic, sizeof(nif->name)); - nif->imtype= G.scene->r.imtype; - nif->subimtype= G.scene->r.subimtype; - nif->quality= G.scene->r.quality; - nif->sfra= G.scene->r.sfra; - nif->efra= G.scene->r.efra; -}; + Scene *scene= (Scene *)node->id; + NodeImageFile *nif= MEM_callocN(sizeof(NodeImageFile), "node image file"); + node->storage= nif; + + if(scene) { + BLI_strncpy(nif->name, scene->r.pic, sizeof(nif->name)); + nif->imtype= scene->r.imtype; + nif->subimtype= scene->r.subimtype; + nif->quality= scene->r.quality; + nif->sfra= scene->r.sfra; + nif->efra= scene->r.efra; + } +} bNodeType cmp_node_output_file= { /* *next,*prev */ NULL, NULL, |