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:
authorJanne Karhu <jhkarh@gmail.com>2010-10-05 13:32:35 +0400
committerJanne Karhu <jhkarh@gmail.com>2010-10-05 13:32:35 +0400
commit6ca186fc5ac422001559a0c86d3d436163acc849 (patch)
tree38037fdd8260e5a8b6c35d8f18f712a122c618c4
parenta92c232c8b94d926b14785fb95cf8592f7deb1c3 (diff)
Fix for [#24107] Hair/General particle glitch- Presets
-rw-r--r--release/scripts/ui/properties_particle.py6
-rw-r--r--source/blender/makesrna/intern/rna_particle.c8
2 files changed, 9 insertions, 5 deletions
diff --git a/release/scripts/ui/properties_particle.py b/release/scripts/ui/properties_particle.py
index 7f630d6e5ff..ff49b0e4e9f 100644
--- a/release/scripts/ui/properties_particle.py
+++ b/release/scripts/ui/properties_particle.py
@@ -28,12 +28,10 @@ from properties_physics_common import basic_force_field_falloff_ui
def particle_panel_enabled(context, psys):
phystype = psys.settings.physics_type
- if phystype == 'NO' or phystype == 'KEYED':
+ if psys.settings.type in ('EMITTER', 'REACTOR') and phystype in ('NO', 'KEYED'):
return True
- if psys.settings.type in ('EMITTER', 'REACTOR') or (psys.settings.type == 'HAIR' and psys.use_hair_dynamics):
- return (psys.point_cache.is_baked is False) and (not psys.is_edited) and (not context.particle_system_editable)
else:
- return True
+ return (psys.point_cache.is_baked is False) and (not psys.is_edited) and (not context.particle_system_editable)
def particle_panel_poll(cls, context):
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
index 1151215f5f7..7a8165e9aa5 100644
--- a/source/blender/makesrna/intern/rna_particle.c
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -325,15 +325,21 @@ static PointerRNA rna_particle_settings_get(PointerRNA *ptr)
static void rna_particle_settings_set(PointerRNA *ptr, PointerRNA value)
{
ParticleSystem *psys= (ParticleSystem*)ptr->data;
+ int old_type = 0;
- if(psys->part)
+
+ if(psys->part) {
+ old_type = psys->part->type;
psys->part->id.us--;
+ }
psys->part = (ParticleSettings *)value.data;
if(psys->part) {
psys->part->id.us++;
psys_check_boid_data(psys);
+ if(old_type != psys->part->type)
+ psys->recalc |= PSYS_RECALC_TYPE;
}
}
static void rna_Particle_abspathtime_update(Main *bmain, Scene *scene, PointerRNA *ptr)