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:
authorTon Roosendaal <ton@blender.org>2009-01-04 17:14:06 +0300
committerTon Roosendaal <ton@blender.org>2009-01-04 17:14:06 +0300
commitf7cb86df3a9ceccc4d649e42735732a608169157 (patch)
tree558a9ba43708a2213b1afa8f46d79f5daa140bc6 /source/blender/makesdna
parent74f9e98c828c17910405092785633373d4ae88e8 (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/makesdna')
-rw-r--r--source/blender/makesdna/DNA_image_types.h3
-rw-r--r--source/blender/makesdna/DNA_modifier_types.h16
-rw-r--r--source/blender/makesdna/DNA_scene_types.h7
3 files changed, 17 insertions, 9 deletions
diff --git a/source/blender/makesdna/DNA_image_types.h b/source/blender/makesdna/DNA_image_types.h
index e1d79f0f875..7a6e1707dad 100644
--- a/source/blender/makesdna/DNA_image_types.h
+++ b/source/blender/makesdna/DNA_image_types.h
@@ -34,6 +34,7 @@
#include "DNA_ID.h"
struct PackedFile;
+struct Scene;
struct anim;
struct ImBuf;
struct RenderResult;
@@ -51,6 +52,8 @@ typedef struct ImageUser {
short multi_index, layer, pass; /* listbase indices, for menu browsing or retrieve buffer */
short menunr; /* localized menu entry, for handling browse event */
+
+ struct Scene *scene; /* to retrieve render result */
} ImageUser;
/* iuser->flag */
diff --git a/source/blender/makesdna/DNA_modifier_types.h b/source/blender/makesdna/DNA_modifier_types.h
index ae07434a37f..88c75f1bccd 100644
--- a/source/blender/makesdna/DNA_modifier_types.h
+++ b/source/blender/makesdna/DNA_modifier_types.h
@@ -57,7 +57,10 @@ typedef struct ModifierData {
int type, mode;
char name[32];
-
+
+ /* XXX for timing info set by caller... solve later? (ton) */
+ struct Scene *scene;
+
char *error;
} ModifierData;
@@ -390,12 +393,13 @@ typedef struct SoftbodyModifierData {
} SoftbodyModifierData;
typedef struct ClothModifierData {
- ModifierData modifier;
+ ModifierData modifier;
- struct Cloth *clothObject; /* The internal data structure for cloth. */
- struct ClothSimSettings *sim_parms; /* definition is in DNA_cloth_types.h */
- struct ClothCollSettings *coll_parms; /* definition is in DNA_cloth_types.h */
- struct PointCache *point_cache; /* definition is in DNA_object_force.h */
+ struct Scene *scene; /* the context, time etc is here */
+ struct Cloth *clothObject; /* The internal data structure for cloth. */
+ struct ClothSimSettings *sim_parms; /* definition is in DNA_cloth_types.h */
+ struct ClothCollSettings *coll_parms; /* definition is in DNA_cloth_types.h */
+ struct PointCache *point_cache; /* definition is in DNA_object_force.h */
} ClothModifierData;
typedef struct CollisionModifierData {
diff --git a/source/blender/makesdna/DNA_scene_types.h b/source/blender/makesdna/DNA_scene_types.h
index f3ec189a9e7..8d446d265ad 100644
--- a/source/blender/makesdna/DNA_scene_types.h
+++ b/source/blender/makesdna/DNA_scene_types.h
@@ -166,7 +166,8 @@ typedef struct RenderData {
struct AviCodecData *avicodecdata;
struct QuicktimeCodecData *qtcodecdata;
struct FFMpegCodecData ffcodecdata;
-
+ struct AudioData audio; /* new in 2.5 */
+
int cfra, sfra, efra; /* frames as in 'images' */
int psfra, pefra; /* start+end frames of preview range */
@@ -546,7 +547,7 @@ typedef struct Scene {
/* migrate or replace? depends on some internal things... */
/* no, is on the right place (ton) */
struct RenderData r;
- struct AudioData audio;
+ struct AudioData audio; /* DEPRICATED 2.5 */
ScriptLink scriptlink;
@@ -725,7 +726,7 @@ typedef struct Scene {
/* depricate this! */
#define TESTBASE(v3d, base) ( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0) )
#define TESTBASELIB(v3d, base) ( ((base)->flag & SELECT) && ((base)->lay & v3d->lay) && ((base)->object->id.lib==0) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
-#define TESTBASELIB_BGMODE(base) ( ((base)->flag & SELECT) && ((base)->lay & (v3d ? v3d->lay : G.scene->lay)) && ((base)->object->id.lib==0) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
+#define TESTBASELIB_BGMODE(base) ( ((base)->flag & SELECT) && ((base)->lay & (v3d ? v3d->lay : scene->lay)) && ((base)->object->id.lib==0) && (((base)->object->restrictflag & OB_RESTRICT_VIEW)==0))
#define BASE_SELECTABLE(v3d, base) ((base->lay & v3d->lay) && (base->object->restrictflag & (OB_RESTRICT_SELECT|OB_RESTRICT_VIEW))==0)
#define FIRSTBASE scene->base.first
#define LASTBASE scene->base.last