#Are all aspects necessary for Undo.finishEdit()?

2 messages · Page 1 of 1 (latest)

olive wren
#

So I've been developing a plugin that edits textures, I'm currently using Undo.initEdit() where I pass in the current textures. Do I need to pass the same textures into Undo.finishEdit() in the aspects array?
Context:

let textures = getAllMeshTextures(meshSelection);
Undo.initEdit({textures : textures});

meshSelection.forEach(marginCreator)

Undo.finishEdit("Bleeds the Texture.", { textures: textures }) // Is this aspect {textures:textures} necessary?
rugged pebble
#

No, only if you are adding or deleting a texture