diff options
Diffstat (limited to 'source/blender/editors/physics/particle_object.c')
-rw-r--r-- | source/blender/editors/physics/particle_object.c | 29 |
1 files changed, 16 insertions, 13 deletions
diff --git a/source/blender/editors/physics/particle_object.c b/source/blender/editors/physics/particle_object.c index d8ca65fa8c9..059805fdf2d 100644 --- a/source/blender/editors/physics/particle_object.c +++ b/source/blender/editors/physics/particle_object.c @@ -69,7 +69,9 @@ static int particle_system_add_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; object_add_particle_system(scene, ob, NULL); - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); + + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_POINTCACHE, ob); return OPERATOR_FINISHED; } @@ -107,7 +109,8 @@ static int particle_system_remove_exec(bContext *C, wmOperator *op) if(scene->basact && scene->basact->object==ob) WM_event_add_notifier(C, NC_SCENE|ND_MODE|NS_MODE_OBJECT, NULL); - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_POINTCACHE, ob); return OPERATOR_FINISHED; } @@ -166,7 +169,7 @@ static int new_particle_settings_exec(bContext *C, wmOperator *op) DAG_scene_sort(scene); DAG_id_flush_update(&ob->id, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); return OPERATOR_FINISHED; } @@ -214,7 +217,7 @@ static int new_particle_target_exec(bContext *C, wmOperator *op) DAG_scene_sort(scene); DAG_id_flush_update(&ob->id, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); return OPERATOR_FINISHED; } @@ -262,7 +265,7 @@ static int remove_particle_target_exec(bContext *C, wmOperator *op) DAG_scene_sort(scene); DAG_id_flush_update(&ob->id, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); return OPERATOR_FINISHED; } @@ -300,7 +303,7 @@ static int target_move_up_exec(bContext *C, wmOperator *op) BLI_insertlink(&psys->targets, pt->prev->prev, pt); DAG_id_flush_update(&ob->id, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); break; } } @@ -338,7 +341,7 @@ static int target_move_down_exec(bContext *C, wmOperator *op) BLI_insertlink(&psys->targets, pt->next, pt); DAG_id_flush_update(&ob->id, OB_RECALC_DATA); - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); break; } } @@ -376,7 +379,7 @@ static int dupliob_move_up_exec(bContext *C, wmOperator *op) BLI_remlink(&part->dupliweights, dw); BLI_insertlink(&part->dupliweights, dw->prev->prev, dw); - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, NULL); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, NULL); break; } } @@ -415,7 +418,7 @@ static int copy_particle_dupliob_exec(bContext *C, wmOperator *op) dw->flag |= PART_DUPLIW_CURRENT; BLI_addhead(&part->dupliweights, dw); - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, NULL); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, NULL); break; } } @@ -461,7 +464,7 @@ static int remove_particle_dupliob_exec(bContext *C, wmOperator *op) if(dw) dw->flag |= PART_DUPLIW_CURRENT; - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, NULL); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, NULL); return OPERATOR_FINISHED; } @@ -498,7 +501,7 @@ static int dupliob_move_down_exec(bContext *C, wmOperator *op) BLI_remlink(&part->dupliweights, dw); BLI_insertlink(&part->dupliweights, dw->next, dw); - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, NULL); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, NULL); break; } } @@ -590,7 +593,7 @@ static int disconnect_hair_exec(bContext *C, wmOperator *op) disconnect_hair(scene, ob, psys); } - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); return OPERATOR_FINISHED; } @@ -729,7 +732,7 @@ static int connect_hair_exec(bContext *C, wmOperator *op) connect_hair(scene, ob, psys); } - WM_event_add_notifier(C, NC_OBJECT|ND_DRAW, ob); + WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE, ob); return OPERATOR_FINISHED; } |