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
path: root/source
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2006-02-05 22:43:46 +0300
committerTon Roosendaal <ton@blender.org>2006-02-05 22:43:46 +0300
commit3700984c994b68d26a06cd62aaab822b346236ad (patch)
tree565597d9b9cd44e7c48f16cbca97cf7308ca6b18 /source
parent4e97a43d56815de982448fc6fb2cf1cc53ec9968 (diff)
Appending a single object with particle system, will now also expand to
append its group and objects.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenloader/intern/readfile.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c
index 7b32a814f98..bac79cf4d01 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -5820,6 +5820,7 @@ static void expand_object(FileData *fd, Main *mainvar, Object *ob)
bController *cont;
bActuator *act;
bActionStrip *strip;
+ PartEff *paf;
int a;
@@ -5845,6 +5846,10 @@ static void expand_object(FileData *fd, Main *mainvar, Object *ob)
expand_doit(fd, mainvar, ob->mat[a]);
}
+ paf = give_parteff(ob);
+ if (paf && paf->group)
+ expand_doit(fd, mainvar, paf->group);
+
sens= ob->sensors.first;
while(sens) {
for(a=0; a<sens->totlinks; a++) {
@@ -6024,13 +6029,14 @@ static void give_base_to_objects(Scene *sce, ListBase *lb)
Object *ob;
Base *base;
- /* give all objects which are LIB_EXTERN and LIB_NEEDLINK a base */
+ /* give all objects which are LIB_INDIRECT a base */
ob= lb->first;
while(ob) {
- if(ob->id.us==0) {
+ if( ob->id.flag & LIB_INDIRECT ) {
+ /* hrmf... groups give user counter, so we check in that case entire scene */
+ if(ob->id.us==0 || ((ob->flag & OB_FROMGROUP) && object_in_scene(ob, sce)==0) ) {
- if( ob->id.flag & LIB_INDIRECT ) {
base= MEM_callocN( sizeof(Base), "add_ext_base");
BLI_addtail(&(sce->base), base);
base->lay= ob->lay;