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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2008-04-30 17:29:57 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2008-04-30 17:29:57 +0400
commit93ba2dd6a1b5a841a49469e12a3671957e6a3500 (patch)
tree7f1507399b9e2fa34d820d1ccb34029063daec0c /source
parente997e6b1fcd0465f0ad110e64c35e71a1d7c2760 (diff)
Fix for bug #9867: issues with making particle systems local.
Diffstat (limited to 'source')
-rw-r--r--source/blender/blenkernel/BKE_particle.h1
-rw-r--r--source/blender/blenkernel/intern/object.c4
-rw-r--r--source/blender/blenkernel/intern/particle.c2
-rw-r--r--source/blender/src/editobject.c7
4 files changed, 10 insertions, 4 deletions
diff --git a/source/blender/blenkernel/BKE_particle.h b/source/blender/blenkernel/BKE_particle.h
index fbde861891d..944a9081679 100644
--- a/source/blender/blenkernel/BKE_particle.h
+++ b/source/blender/blenkernel/BKE_particle.h
@@ -231,6 +231,7 @@ struct ParticleSystemModifierData *psys_get_modifier(struct Object *ob, struct P
struct ParticleSettings *psys_new_settings(char *name, struct Main *main);
struct ParticleSettings *psys_copy_settings(struct ParticleSettings *part);
void psys_flush_settings(struct ParticleSettings *part, int event, int hair_recalc);
+void make_local_particlesettings(struct ParticleSettings *part);
struct LinkNode *psys_using_settings(struct ParticleSettings *part, int flush_update);
void psys_changed_type(struct ParticleSystem *psys);
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 2423c949204..5594a1dfaf7 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -1215,6 +1215,7 @@ Object *copy_object(Object *ob)
void expand_local_object(Object *ob)
{
bActionStrip *strip;
+ ParticleSystem *psys;
int a;
id_lib_extern((ID *)ob->action);
@@ -1228,7 +1229,8 @@ void expand_local_object(Object *ob)
for (strip=ob->nlastrips.first; strip; strip=strip->next) {
id_lib_extern((ID *)strip->act);
}
-
+ for(psys=ob->particlesystem.first; psys; psys=psys->next)
+ id_lib_extern((ID *)psys->part);
}
void make_local_object(Object *ob)
diff --git a/source/blender/blenkernel/intern/particle.c b/source/blender/blenkernel/intern/particle.c
index 207ab56de9b..1eb47fa3da0 100644
--- a/source/blender/blenkernel/intern/particle.c
+++ b/source/blender/blenkernel/intern/particle.c
@@ -2988,7 +2988,7 @@ ParticleSettings *psys_copy_settings(ParticleSettings *part)
return partn;
}
-void psys_make_local_settings(ParticleSettings *part)
+void make_local_particlesettings(ParticleSettings *part)
{
Object *ob;
ParticleSettings *par;
diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c
index 335c8378507..512a29edbc2 100644
--- a/source/blender/src/editobject.c
+++ b/source/blender/src/editobject.c
@@ -4783,6 +4783,7 @@ void make_local(int mode)
Base *base;
Object *ob;
bActionStrip *strip;
+ ParticleSystem *psys;
Material *ma, ***matarar;
Lamp *la;
Curve *cu;
@@ -4869,6 +4870,9 @@ void make_local(int mode)
make_local_armature ((bArmature *)id);
break;
}
+
+ for(psys=ob->particlesystem.first; psys; psys=psys->next)
+ make_local_particlesettings(psys->part);
}
id= (ID *)ob->ipo;
if(id && id->lib) make_local_ipo(ob->ipo);
@@ -4876,11 +4880,10 @@ void make_local(int mode)
id= (ID *)ob->action;
if(id && id->lib) make_local_action(ob->action);
- for (strip=ob->nlastrips.first; strip; strip=strip->next) {
+ for(strip=ob->nlastrips.first; strip; strip=strip->next) {
if(strip->act && strip->act->id.lib)
make_local_action(strip->act);
}
-
}
base= base->next;
}