WM: avoid unnecessary undo step creation when duplicating
Calling duplicate operation without selecting anything registers an undo step. If nothing is selected (keyframe, curve, object, etc.), cancel the operator execution to prevent undo push. Patch improves following operators: - ACTION_OT_duplicate - GPENCIL_OT_duplicate - GRAPH_OT_duplicate - MESH_OT_duplicate - NODE_OT_duplicate - OBJECT_OT_duplicate Reviewed By: campbellbarton Ref D14511
This commit is contained in:
@@ -381,7 +381,7 @@ bool keyframe_region_circle_test(const KeyframeEdit_CircleData *data_circle, con
|
||||
void delete_fcurve_key(struct FCurve *fcu, int index, bool do_recalc);
|
||||
bool delete_fcurve_keys(struct FCurve *fcu);
|
||||
void clear_fcurve_keys(struct FCurve *fcu);
|
||||
void duplicate_fcurve_keys(struct FCurve *fcu);
|
||||
bool duplicate_fcurve_keys(struct FCurve *fcu);
|
||||
float get_default_rna_value(struct FCurve *fcu, struct PropertyRNA *prop, struct PointerRNA *ptr);
|
||||
|
||||
typedef struct FCurveSegment {
|
||||
|
||||
Reference in New Issue
Block a user