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:
authorNicholas Bishop <nicholasbishop@gmail.com>2008-06-23 01:56:52 +0400
committerNicholas Bishop <nicholasbishop@gmail.com>2008-06-23 01:56:52 +0400
commit749054fe077dc6d0d5de35068669a98b4e491a59 (patch)
tree28cb6480f83aead33d59024d7669ba5ff5b91140 /source/blender/blenloader
parent831384a9bb0b29ebaf4c7837dc23f4676cdc80a8 (diff)
parentd229db61e9f7e7e25a2c9c5cb5f4a8ce1623cc4d (diff)
Merge with trunk (r15316)
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r--source/blender/blenloader/intern/readfile.c20
-rw-r--r--source/blender/blenloader/intern/writefile.c4
2 files changed, 24 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 131fb03c292..9b233ab56f5 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -3006,6 +3006,10 @@ static void lib_link_object(FileData *fd, Main *main)
bActionActuator *aa= act->data;
aa->act= newlibadr(fd, ob->id.lib, aa->act);
}
+ else if(act->type==ACT_SHAPEACTION) {
+ bActionActuator *aa= act->data;
+ aa->act= newlibadr(fd, ob->id.lib, aa->act);
+ }
else if(act->type==ACT_PROPERTY) {
bPropertyActuator *pa= act->data;
pa->ob= newlibadr(fd, ob->id.lib, pa->ob);
@@ -3022,6 +3026,9 @@ static void lib_link_object(FileData *fd, Main *main)
bParentActuator *parenta = act->data;
parenta->ob = newlibadr(fd, ob->id.lib, parenta->ob);
}
+ else if(act->type==ACT_STATE) {
+ /* bStateActuator *statea = act->data; */
+ }
act= act->next;
}
@@ -3318,11 +3325,19 @@ static void direct_link_object(FileData *fd, Object *ob)
direct_link_constraints(fd, &ob->constraints);
link_glob_list(fd, &ob->controllers);
+ if (ob->init_state) {
+ /* if a known first state is specified, set it so that the game will start ok */
+ ob->state = ob->init_state;
+ } else if (!ob->state) {
+ ob->state = 1;
+ }
cont= ob->controllers.first;
while(cont) {
cont->data= newdataadr(fd, cont->data);
cont->links= newdataadr(fd, cont->links);
test_pointer_array(fd, (void **)&cont->links);
+ if (cont->state_mask == 0)
+ cont->state_mask = 1;
cont= cont->next;
}
@@ -7646,6 +7661,7 @@ static void do_versions(FileData *fd, Library *lib, Main *main)
}
}
+
/* WATCH IT!!!: pointers from libdata have not been converted yet here! */
/* WATCH IT 2!: Userdef struct init has to be in src/usiblender.c! */
@@ -8414,6 +8430,10 @@ static void expand_object(FileData *fd, Main *mainvar, Object *ob)
bActionActuator *aa= act->data;
expand_doit(fd, mainvar, aa->act);
}
+ else if(act->type==ACT_SHAPEACTION) {
+ bActionActuator *aa= act->data;
+ expand_doit(fd, mainvar, aa->act);
+ }
else if(act->type==ACT_PROPERTY) {
bPropertyActuator *pa= act->data;
expand_doit(fd, mainvar, pa->ob);
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c
index e12a4d25ce2..fd85560f72f 100644
--- a/source/blender/blenloader/intern/writefile.c
+++ b/source/blender/blenloader/intern/writefile.c
@@ -664,6 +664,7 @@ static void write_actuators(WriteData *wd, ListBase *lb)
switch(act->type) {
case ACT_ACTION:
+ case ACT_SHAPEACTION:
writestruct(wd, DATA, "bActionActuator", 1, act->data);
break;
case ACT_SOUND:
@@ -714,6 +715,9 @@ static void write_actuators(WriteData *wd, ListBase *lb)
case ACT_PARENT:
writestruct(wd, DATA, "bParentActuator", 1, act->data);
break;
+ case ACT_STATE:
+ writestruct(wd, DATA, "bStateActuator", 1, act->data);
+ break;
default:
; /* error: don't know how to write this file */
}