Blender Git Loki

Git Commits -> Revision e81fca1

Revision e81fca1 by Julian Eisel (master)
February 16, 2021, 14:34 (GMT)
Assets: Remove appended asset when dropping operation fails

When dropping an asset somewhere, it is appended and then a drop operation is
called to actually add it to the scene based on current context. If this drop
operation fails, the appended data-block is now still in the .blend. The user
may not notice and not expect this.
Instead idea is to rollback any changes done by dropping code if the operation
fails, namely removing the appended data-block again.

Adds a new `cancel()` callback which is called if the drop operator returns
`OPERATOR_CANCELLED` to drop-boxes and a generic function to deal with assets
on drop failure.

Also removes the `free_id_on_error` property of the `NODE_OT_add_group`
operator, which was used as ad-hoc solution to get this same behavior.

Commit Details:

Full Hash: e81fca1ed38ea447a1023dae3841f8980def28e4
Parent Commit: 500bc99
Lines Changed: +121, -49

Tehnyt: Miika HämäläinenViimeksi p?ivitetty: 07.11.2014 14:18 MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021