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:
authorCampbell Barton <ideasman42@gmail.com>2012-01-15 13:16:39 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-01-15 13:16:39 +0400
commit917714acf72340bbea363c81773887c6c532c7d8 (patch)
treef987aa296bb053949b2dbecf7931f4a73dc3a2db /source/blender/editors/physics
parent3bb9c4adf985aff5e8e213807f3db0d7cd7556e7 (diff)
parent5c93135ef9a1e7265ead3b92b10ea9a4ef82b909 (diff)
svn merge ^/trunk/blender -r43345:43381
Diffstat (limited to 'source/blender/editors/physics')
-rw-r--r--source/blender/editors/physics/particle_edit.c55
-rw-r--r--source/blender/editors/physics/physics_intern.h1
-rw-r--r--source/blender/editors/physics/physics_ops.c4
3 files changed, 18 insertions, 42 deletions
diff --git a/source/blender/editors/physics/particle_edit.c b/source/blender/editors/physics/particle_edit.c
index 3993707dbb9..a912fb5f81b 100644
--- a/source/blender/editors/physics/particle_edit.c
+++ b/source/blender/editors/physics/particle_edit.c
@@ -254,13 +254,21 @@ static PTCacheEdit *pe_get_current(Scene *scene, Object *ob, int create)
}
else if(pset->edittype == PE_TYPE_SOFTBODY && pid->type == PTCACHE_TYPE_SOFTBODY) {
if(create && pid->cache->flag & PTCACHE_BAKED && !pid->cache->edit)
+ {
+ pset->flag |= PE_FADE_TIME;
+ // NICE TO HAVE but doesn't work: pset->brushtype = PE_BRUSH_COMB;
PE_create_particle_edit(scene, ob, pid->cache, NULL);
+ }
edit = pid->cache->edit;
break;
}
else if(pset->edittype == PE_TYPE_CLOTH && pid->type == PTCACHE_TYPE_CLOTH) {
if(create && pid->cache->flag & PTCACHE_BAKED && !pid->cache->edit)
+ {
+ pset->flag |= PE_FADE_TIME;
+ // NICE TO HAVE but doesn't work: pset->brushtype = PE_BRUSH_COMB;
PE_create_particle_edit(scene, ob, pid->cache, NULL);
+ }
edit = pid->cache->edit;
break;
}
@@ -1872,43 +1880,6 @@ void PARTICLE_OT_select_more(wmOperatorType *ot)
ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
}
-static int select_inverse_exec(bContext *C, wmOperator *UNUSED(op))
-{
- PEData data;
- PTCacheEdit *edit;
- POINT_P; KEY_K;
-
- PE_set_data(C, &data);
-
- edit= PE_get_current(data.scene, data.ob);
-
- LOOP_VISIBLE_POINTS {
- LOOP_KEYS {
- key->flag ^= PEK_SELECT;
- point->flag |= PEP_EDIT_RECALC; /* redraw selection only */
- }
- }
-
- PE_update_selection(data.scene, data.ob, 1);
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_SELECTED, data.ob);
-
- return OPERATOR_FINISHED;
-}
-
-void PARTICLE_OT_select_inverse(wmOperatorType *ot)
-{
- /* identifiers */
- ot->name= "Select Inverse";
- ot->idname= "PARTICLE_OT_select_inverse";
-
- /* api callbacks */
- ot->exec= select_inverse_exec;
- ot->poll= PE_poll;
-
- /* flags */
- ot->flag= OPTYPE_REGISTER|OPTYPE_UNDO;
-}
-
/************************ rekey operator ************************/
static void rekey_particle(PEData *data, int pa_index)
@@ -3659,8 +3630,14 @@ static void brush_edit_apply(bContext *C, wmOperator *op, PointerRNA *itemptr)
PE_update_object(scene, ob, 1);
}
- WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob);
-
+ if(edit->psys)
+ WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob);
+ else
+ {
+ DAG_id_tag_update(&ob->id, OB_RECALC_DATA);
+ WM_event_add_notifier(C, NC_OBJECT|ND_MODIFIER, ob);
+ }
+
bedit->lastmouse[0]= mouse[0];
bedit->lastmouse[1]= mouse[1];
bedit->first= 0;
diff --git a/source/blender/editors/physics/physics_intern.h b/source/blender/editors/physics/physics_intern.h
index 0dae8b362cd..db6d63f6396 100644
--- a/source/blender/editors/physics/physics_intern.h
+++ b/source/blender/editors/physics/physics_intern.h
@@ -42,7 +42,6 @@ void PARTICLE_OT_select_tips(struct wmOperatorType *ot);
void PARTICLE_OT_select_linked(struct wmOperatorType *ot);
void PARTICLE_OT_select_less(struct wmOperatorType *ot);
void PARTICLE_OT_select_more(struct wmOperatorType *ot);
-void PARTICLE_OT_select_inverse(struct wmOperatorType *ot);
void PARTICLE_OT_hide(struct wmOperatorType *ot);
void PARTICLE_OT_reveal(struct wmOperatorType *ot);
diff --git a/source/blender/editors/physics/physics_ops.c b/source/blender/editors/physics/physics_ops.c
index e39b4b97d72..ba0465b866f 100644
--- a/source/blender/editors/physics/physics_ops.c
+++ b/source/blender/editors/physics/physics_ops.c
@@ -51,7 +51,6 @@ static void operatortypes_particle(void)
WM_operatortype_append(PARTICLE_OT_select_linked);
WM_operatortype_append(PARTICLE_OT_select_less);
WM_operatortype_append(PARTICLE_OT_select_more);
- WM_operatortype_append(PARTICLE_OT_select_inverse);
WM_operatortype_append(PARTICLE_OT_hide);
WM_operatortype_append(PARTICLE_OT_reveal);
@@ -95,11 +94,12 @@ static void keymap_particle(wmKeyConfig *keyconf)
keymap->poll= PE_poll;
WM_keymap_add_item(keymap, "PARTICLE_OT_select_all", AKEY, KM_PRESS, 0, 0);
+ RNA_enum_set(WM_keymap_add_item(keymap, "PARTICLE_OT_select_all", IKEY, KM_PRESS, KM_CTRL, 0)->ptr, "action", SEL_INVERT);
+
WM_keymap_add_item(keymap, "PARTICLE_OT_select_more", PADPLUSKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "PARTICLE_OT_select_less", PADMINUS, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "PARTICLE_OT_select_linked", LKEY, KM_PRESS, 0, 0);
RNA_boolean_set(WM_keymap_add_item(keymap, "PARTICLE_OT_select_linked", LKEY, KM_PRESS, KM_SHIFT, 0)->ptr, "deselect", 1);
- WM_keymap_add_item(keymap, "PARTICLE_OT_select_inverse", IKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "PARTICLE_OT_delete", XKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "PARTICLE_OT_delete", DELKEY, KM_PRESS, 0, 0);