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:
Diffstat (limited to 'source/blender/makesrna/intern/rna_particle.c')
-rw-r--r--source/blender/makesrna/intern/rna_particle.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 47a20518648..73b3515030e 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -41,6 +41,8 @@
#include "BKE_mesh.h"
+#include "BLI_listbase.h"
+
#include "BLT_translation.h"
#include "rna_internal.h"
@@ -695,7 +697,7 @@ static void rna_Particle_change_type(Main *bmain, Scene *UNUSED(scene), PointerR
/* Iterating over all object is slow, but no better solution exists at the moment. */
for (Object *ob = bmain->objects.first; ob; ob = ob->id.next) {
- for (ParticleSystem *psys = ob->particlesystem.first; psys; psys = psys->next) {
+ LISTBASE_FOREACH (ParticleSystem *, psys, &ob->particlesystem) {
if (psys->part == part) {
psys_changed_type(ob, psys);
psys->recalc |= ID_RECALC_PSYS_RESET;
@@ -825,7 +827,7 @@ static void rna_Particle_hair_dynamics_update(Main *bmain, Scene *scene, Pointer
ParticleSystem *psys = (ParticleSystem *)ptr->data;
if (psys && !psys->clmd) {
- psys->clmd = (ClothModifierData *)modifier_new(eModifierType_Cloth);
+ psys->clmd = (ClothModifierData *)BKE_modifier_new(eModifierType_Cloth);
psys->clmd->sim_parms->goalspring = 0.0f;
psys->clmd->sim_parms->flags |= CLOTH_SIMSETTINGS_FLAG_RESIST_SPRING_COMPRESS;
psys->clmd->coll_parms->flags &= ~CLOTH_COLLSETTINGS_FLAG_SELF;