diff options
author | Janne Karhu <jhkarh@gmail.com> | 2009-09-06 00:12:08 +0400 |
---|---|---|
committer | Janne Karhu <jhkarh@gmail.com> | 2009-09-06 00:12:08 +0400 |
commit | 08b8fc34cfc082d73e657d1c2941662c36bc3514 (patch) | |
tree | 221eb2513a3830e8bd51e61ccbb44529afca5f58 /source/blender/makesrna/intern | |
parent | 05c44056dc48bf718475a1e98c9abbd6cc00a535 (diff) |
Disconnect/connect hair:
- Moves hair from face-space to global space and back.
- Allows for editing of emitter mesh after hair combing.
- Disconnect hair before doing topology changing changes in mesh edit mode, connect after changes.
- Notes:
* The closest location on emitter surface to the hair root is used to connect the hair.
* Emitter deflection, sticky roots and add brush don't apply for disconnect hair in particle mode.
- Todo for future:
* Copy disconnected hair from object to another (when 2.5 has proper copy operators again).
* Possible automatic disconnect/connect with topology changing operations in mesh edit mode.
Other changes/fixes:
- Proper subtypes for some particle mode notifiers.
- Particle mode selections didn't draw correctly because of using lighting for the paths.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r-- | source/blender/makesrna/intern/rna_particle.c | 5 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_sculpt_paint.c | 10 |
2 files changed, 10 insertions, 5 deletions
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c index 4a23605c717..71b953effdf 100644 --- a/source/blender/makesrna/intern/rna_particle.c +++ b/source/blender/makesrna/intern/rna_particle.c @@ -1884,6 +1884,11 @@ static void rna_def_particle_system(BlenderRNA *brna) RNA_def_property_boolean_sdna(prop, NULL, "softflag", OB_SB_ENABLE); RNA_def_property_ui_text(prop, "Use Soft Body", "Enable use of soft body for hair physics simulation."); + prop= RNA_def_property(srna, "global_hair", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", PSYS_GLOBAL_HAIR); + RNA_def_property_clear_flag(prop, PROP_EDITABLE); + RNA_def_property_ui_text(prop, "Global Hair", "Hair keys are in global coordinate space"); + /* reactor */ prop= RNA_def_property(srna, "reactor_target_object", PROP_POINTER, PROP_NONE); RNA_def_property_pointer_sdna(prop, NULL, "target_ob"); diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index 5575b170398..ab4b27cea7b 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -107,7 +107,7 @@ static void rna_ParticleEdit_redo(bContext *C, PointerRNA *ptr) if(!edit) return; - psys_free_path_cache(NULL, edit); + psys_free_path_cache(edit->psys, edit); } static void rna_ParticleEdit_update(bContext *C, PointerRNA *ptr) @@ -410,7 +410,7 @@ static void rna_def_particle_edit(BlenderRNA *brna) prop= RNA_def_property(srna, "fade_time", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_FADE_TIME); RNA_def_property_ui_text(prop, "Fade Time", "Fade paths and keys further away from current frame."); - RNA_def_property_update(prop, NC_OBJECT, "rna_ParticleEdit_update"); + RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_ParticleEdit_update"); prop= RNA_def_property(srna, "auto_velocity", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", PE_AUTO_VELOCITY); @@ -443,18 +443,18 @@ static void rna_def_particle_edit(BlenderRNA *brna) prop= RNA_def_property(srna, "draw_step", PROP_INT, PROP_NONE); RNA_def_property_range(prop, 2, 10); RNA_def_property_ui_text(prop, "Steps", "How many steps to draw the path with."); - RNA_def_property_update(prop, NC_OBJECT, "rna_ParticleEdit_redo"); + RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_ParticleEdit_redo"); prop= RNA_def_property(srna, "fade_frames", PROP_INT, PROP_NONE); RNA_def_property_range(prop, 2, 100); RNA_def_property_ui_text(prop, "Frames", "How many frames to fade."); - RNA_def_property_update(prop, NC_OBJECT, "rna_ParticleEdit_update"); + RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_ParticleEdit_update"); prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE); RNA_def_property_enum_sdna(prop, NULL, "edittype"); RNA_def_property_enum_items(prop, edit_type_items); RNA_def_property_ui_text(prop, "Type", ""); - RNA_def_property_update(prop, NC_OBJECT, "rna_ParticleEdit_redo"); + RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, "rna_ParticleEdit_redo"); prop= RNA_def_property(srna, "editable", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_funcs(prop, "rna_ParticleEdit_editable_get", NULL); |