diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2007-12-18 19:55:09 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2007-12-18 19:55:09 +0300 |
commit | 84b58f8653218ff10f701cfef402c4f699a9b0d2 (patch) | |
tree | 10d1f64b52541f280b3315552a3a67eabde2112e /source/blender/src | |
parent | f4e1c89b2020a73c330aebbdcfe619956608d3b1 (diff) |
Particles
=========
- The render and realtime button for the particle system modifier
and the enabled button for particles now work seperate again,
made a bad design decision to tie them together. Now with only
the render button and not realtime enabled it renders.
- Fix for bug #7948: particle mode crash while constraining axis.
- Fix for bug #7945: crash loading effector groups from an old file.
- Fix for bug #7942: crash for reactor particles emitting from particles.
Diffstat (limited to 'source/blender/src')
-rw-r--r-- | source/blender/src/buttons_editing.c | 15 | ||||
-rw-r--r-- | source/blender/src/buttons_object.c | 9 | ||||
-rw-r--r-- | source/blender/src/drawobject.c | 2 | ||||
-rw-r--r-- | source/blender/src/editobject.c | 3 | ||||
-rw-r--r-- | source/blender/src/editparticle.c | 6 | ||||
-rw-r--r-- | source/blender/src/transform_conversions.c | 1 |
6 files changed, 5 insertions, 31 deletions
diff --git a/source/blender/src/buttons_editing.c b/source/blender/src/buttons_editing.c index 92ee7af26cc..83139fcfb0a 100644 --- a/source/blender/src/buttons_editing.c +++ b/source/blender/src/buttons_editing.c @@ -1639,19 +1639,6 @@ void modifiers_explodeFacepa(void *arg1, void *arg2) emd->flag |= eExplodeFlag_CalcFaces; } -void modifiers_psysEnable(void *ob_v, void *md_v) -{ - ParticleSystemModifierData *psmd = (ParticleSystemModifierData*) md_v; - - if(psmd->modifier.mode & eModifierMode_Realtime) { - psmd->psys->flag |= PSYS_ENABLED; - } - else { - psmd->psys->flag &= ~PSYS_ENABLED; - PE_free_particle_edit(psmd->psys); - } -} - static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco, int *yco, int index, int cageIndex, int lastCageIndex) { ModifierTypeInfo *mti = modifierType_getInfo(md->type); @@ -1691,8 +1678,6 @@ static void draw_modifier(uiBlock *block, Object *ob, ModifierData *md, int *xco if (md->type!=eModifierType_Softbody || !(ob->pd && ob->pd->deflect)) { uiDefIconButBitI(block, TOG, eModifierMode_Render, B_MODIFIER_RECALC, ICON_SCENE, x+10+buttonWidth-60, y-1, 19, 19,&md->mode, 0, 0, 1, 0, "Enable modifier during rendering"); but= uiDefIconButBitI(block, TOG, eModifierMode_Realtime, B_MODIFIER_RECALC, VICON_VIEW3D, x+10+buttonWidth-40, y-1, 19, 19,&md->mode, 0, 0, 1, 0, "Enable modifier during interactive display"); - if (md->type==eModifierType_ParticleSystem) - uiButSetFunc(but, modifiers_psysEnable, ob, md); if (mti->flags&eModifierTypeFlag_SupportsEditmode) { uiDefIconButBitI(block, TOG, eModifierMode_Editmode, B_MODIFIER_RECALC, VICON_EDIT, x+10+buttonWidth-20, y-1, 19, 19,&md->mode, 0, 0, 1, 0, "Enable modifier during Editmode (only if enabled for display)"); } diff --git a/source/blender/src/buttons_object.c b/source/blender/src/buttons_object.c index 3c1a7680ed2..3c2969e77bf 100644 --- a/source/blender/src/buttons_object.c +++ b/source/blender/src/buttons_object.c @@ -2855,15 +2855,6 @@ void do_effects_panels(unsigned short event) break; case B_PART_ENABLE: if(psys) { - ParticleSystemModifierData *psmd= psys_get_modifier(ob, psys); - if(psys->flag & PSYS_ENABLED) { - psmd->modifier.mode |= eModifierMode_Realtime; - } - else { - psmd->modifier.mode &= ~eModifierMode_Realtime; - PE_free_particle_edit(psys); - } - DAG_object_flush_update(G.scene, ob, OB_RECALC_DATA); allqueue(REDRAWVIEW3D, 0); allqueue(REDRAWBUTSOBJECT, 0); diff --git a/source/blender/src/drawobject.c b/source/blender/src/drawobject.c index 397d411e4b0..db2225f4823 100644 --- a/source/blender/src/drawobject.c +++ b/source/blender/src/drawobject.c @@ -3005,7 +3005,7 @@ static void draw_new_particle_system(Base *base, ParticleSystem *psys) part=psys->part; pars=psys->particles; - if(part==0 || (psys->flag & PSYS_ENABLED)==0) + if(part==0 || !psys_check_enabled(ob, psys)) return; if(pars==0) return; diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c index 7e88c8278b5..bb3beb329f1 100644 --- a/source/blender/src/editobject.c +++ b/source/blender/src/editobject.c @@ -2841,7 +2841,6 @@ static void object_has_subdivision_particles(Object *ob, int *havesubdiv, int *h static void object_flip_subdivison_particles(Object *ob, int *set, int level, int mode, int particles, int depth) { - void modifiers_psysEnable(void *ob_v, void *md_v); ModifierData *md; if(ob->type==OB_MESH) { @@ -2857,8 +2856,6 @@ static void object_flip_subdivison_particles(Object *ob, int *set, int level, in psmd->modifier.mode &= ~(mode); else psmd->modifier.mode |= (mode); - - modifiers_psysEnable(ob, md); } } } diff --git a/source/blender/src/editparticle.c b/source/blender/src/editparticle.c index cad5e4af5b5..0475e91f2b7 100644 --- a/source/blender/src/editparticle.c +++ b/source/blender/src/editparticle.c @@ -157,7 +157,7 @@ void PE_change_act(void *ob_v, void *act_v) if((psys=BLI_findlink(&ob->particlesystem,act))) { psys->flag |= PSYS_CURRENT; - if(psys->flag & PSYS_ENABLED) { + if(psys_check_enabled(ob, psys)) { if(G.f & G_PARTICLEEDIT && !psys->edit) PE_create_particle_edit(ob, psys); PE_recalc_world_cos(ob, psys); @@ -186,7 +186,7 @@ ParticleSystem *PE_get_current(Object *ob) psys->flag |= PSYS_CURRENT; } - if(psys && (psys->flag & PSYS_ENABLED) && ob == OBACT && (G.f & G_PARTICLEEDIT)) + if(psys && psys_check_enabled(ob, psys) && ob == OBACT && (G.f & G_PARTICLEEDIT)) if(psys->part->type == PART_HAIR && psys->flag & PSYS_EDITED) if(psys->edit == NULL) PE_create_particle_edit(ob, psys); @@ -1102,7 +1102,7 @@ void PE_set_particle_edit(void) if((G.f & G_PARTICLEEDIT)==0){ if(psys && psys->part->type == PART_HAIR && psys->flag & PSYS_EDITED) { - if(psys->flag & PSYS_ENABLED) { + if(psys_check_enabled(ob, psys)) { if(psys->edit==0) PE_create_particle_edit(ob, psys); PE_recalc_world_cos(ob, psys); diff --git a/source/blender/src/transform_conversions.c b/source/blender/src/transform_conversions.c index 9b2b563595d..bde79b068dd 100644 --- a/source/blender/src/transform_conversions.c +++ b/source/blender/src/transform_conversions.c @@ -1565,6 +1565,7 @@ static void createTransParticleVerts(TransInfo *t) if(k==0 && pset->flag & PE_LOCK_FIRST) td->protectflag |= OB_LOCK_LOC; + td->ob = ob; td->ext = tx; td->tdi = NULL; if(t->mode == TFM_BAKE_TIME) { |