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/TEX_nodes | |
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/TEX_nodes')
-rw-r--r-- | source/blender/nodes/intern/TEX_nodes/TEX_curves.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source/blender/nodes/intern/TEX_nodes/TEX_curves.c b/source/blender/nodes/intern/TEX_nodes/TEX_curves.c index 8c86656b4f3..7d1366b5b18 100644 --- a/source/blender/nodes/intern/TEX_nodes/TEX_curves.c +++ b/source/blender/nodes/intern/TEX_nodes/TEX_curves.c @@ -41,8 +41,9 @@ static void time_colorfn(float *out, float *coord, bNode *node, bNodeStack **in, /* stack order output: fac */ float fac= 0.0f; - if(node->custom1 < node->custom2) - fac = (G.scene->r.cfra - node->custom1)/(float)(node->custom2-node->custom1); + // XXX SOLVE! these functions should get the TexCallData pointer +// if(node->custom1 < node->custom2) +// fac = (scene->r.cfra - node->custom1)/(float)(node->custom2-node->custom1); fac = curvemapping_evaluateF(node->storage, 0, fac); out[0] = CLAMPIS(fac, 0.0f, 1.0f); @@ -56,8 +57,8 @@ static void time_exec(void *data, bNode *node, bNodeStack **in, bNodeStack **out static void time_init(bNode* node) { - node->custom1= G.scene->r.sfra; - node->custom2= G.scene->r.efra; + node->custom1= 1; + node->custom2= 250; node->storage= curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f); } |