rigidbody: Clean up wm notifiers in rigid body operators
Remore group notifiers, they're already sent by add/remove group operators. Add pointcache notifiers. Fixes UI not being updated properly in some cases.
This commit is contained in:
@@ -133,7 +133,6 @@ static int rigidbody_con_add_exec(bContext *C, wmOperator *op)
|
||||
DAG_ids_flush_update(CTX_data_main(C), 0);
|
||||
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
|
||||
WM_event_add_notifier(C, NC_GROUP | NA_EDITED, NULL);
|
||||
|
||||
/* done */
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -181,7 +180,6 @@ static int rigidbody_con_remove_exec(bContext *C, wmOperator *op)
|
||||
DAG_ids_flush_update(CTX_data_main(C), 0);
|
||||
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
|
||||
WM_event_add_notifier(C, NC_GROUP | NA_EDITED, NULL);
|
||||
|
||||
/* done */
|
||||
return OPERATOR_FINISHED;
|
||||
|
||||
@@ -154,7 +154,6 @@ static int rigidbody_ob_add_exec(bContext *C, wmOperator *op)
|
||||
DAG_ids_flush_update(CTX_data_main(C), 0);
|
||||
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
|
||||
WM_event_add_notifier(C, NC_GROUP | NA_EDITED, NULL);
|
||||
|
||||
/* done */
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -201,7 +200,6 @@ static int rigidbody_ob_remove_exec(bContext *C, wmOperator *op)
|
||||
DAG_ids_flush_update(CTX_data_main(C), 0);
|
||||
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
|
||||
WM_event_add_notifier(C, NC_GROUP | NA_EDITED, NULL);
|
||||
|
||||
/* done */
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -247,7 +245,7 @@ static int rigidbody_obs_add_exec(bContext *C, wmOperator *op)
|
||||
DAG_ids_flush_update(CTX_data_main(C), 0);
|
||||
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
|
||||
WM_event_add_notifier(C, NC_GROUP | NA_EDITED, NULL);
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_POINTCACHE, NULL);
|
||||
|
||||
/* done */
|
||||
return OPERATOR_FINISHED;
|
||||
@@ -293,8 +291,7 @@ static int rigidbody_obs_remove_exec(bContext *C, wmOperator *UNUSED(op))
|
||||
/* send updates */
|
||||
DAG_ids_flush_update(CTX_data_main(C), 0);
|
||||
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_TRANSFORM, NULL);
|
||||
WM_event_add_notifier(C, NC_GROUP | NA_EDITED, NULL);
|
||||
WM_event_add_notifier(C, NC_OBJECT | ND_POINTCACHE, NULL);
|
||||
|
||||
/* done */
|
||||
return OPERATOR_FINISHED;
|
||||
|
||||
@@ -128,9 +128,6 @@ static int rigidbody_world_remove_exec(bContext *C, wmOperator *op)
|
||||
BKE_rigidbody_free_world(rbw);
|
||||
scene->rigidbody_world = NULL;
|
||||
|
||||
/* send updates */
|
||||
WM_event_add_notifier(C, NC_GROUP | NA_EDITED, NULL);
|
||||
|
||||
/* done */
|
||||
return OPERATOR_FINISHED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user