Cleanup: Move notifiers to move_to_index functions

Move the notifiers and DEG tagging to the ED_* level functions for
modifiers and gpencil shaderfx in preparation for outliner modifier and
shaderfx drag and drop. No functional changes.

Differential Revision: https://developer.blender.org/D8642
This commit is contained in:
2020-09-15 15:01:49 -06:00
parent a6434ff417
commit 4d04a345a6
3 changed files with 9 additions and 9 deletions

View File

@@ -228,6 +228,9 @@ bool ED_object_gpencil_modifier_move_to_index(ReportList *reports,
}
}
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob);
return true;
}
@@ -674,9 +677,6 @@ static int gpencil_modifier_move_to_index_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
return OPERATOR_FINISHED;
}

View File

@@ -510,6 +510,9 @@ bool ED_object_modifier_move_to_index(ReportList *reports,
}
}
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob);
return true;
}
@@ -1300,9 +1303,6 @@ static int modifier_move_to_index_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, ob);
return OPERATOR_FINISHED;
}

View File

@@ -235,6 +235,9 @@ bool ED_object_shaderfx_move_to_index(ReportList *reports,
}
}
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
WM_main_add_notifier(NC_OBJECT | ND_SHADERFX, ob);
return true;
}
@@ -607,9 +610,6 @@ static int shaderfx_move_to_index_exec(bContext *C, wmOperator *op)
return OPERATOR_CANCELLED;
}
DEG_id_tag_update(&ob->id, ID_RECALC_GEOMETRY);
WM_event_add_notifier(C, NC_OBJECT | ND_SHADERFX, ob);
return OPERATOR_FINISHED;
}