Allow undeletion of shots by relinking to the edit.
This commit is contained in:
parent
16b90d2ea8
commit
ae570e5907
@ -308,6 +308,11 @@ class AttractOperatorMixin:
|
|||||||
def relink(self, strip, atc_object_id, *, refresh=False):
|
def relink(self, strip, atc_object_id, *, refresh=False):
|
||||||
from .. import pillar
|
from .. import pillar
|
||||||
|
|
||||||
|
# The node may have been deleted, so we need to send a 'relink' before we try
|
||||||
|
# to fetch the node itself.
|
||||||
|
node = Node({'_id': atc_object_id})
|
||||||
|
pillar.sync_call(node.patch, {'op': 'relink'})
|
||||||
|
|
||||||
try:
|
try:
|
||||||
node = pillar.sync_call(Node.find, atc_object_id, caching=False)
|
node = pillar.sync_call(Node.find, atc_object_id, caching=False)
|
||||||
except (sdk_exceptions.ResourceNotFound, sdk_exceptions.MethodNotAllowed):
|
except (sdk_exceptions.ResourceNotFound, sdk_exceptions.MethodNotAllowed):
|
||||||
@ -317,7 +322,6 @@ class AttractOperatorMixin:
|
|||||||
strip.atc_is_synced = False
|
strip.atc_is_synced = False
|
||||||
return {'CANCELLED'}
|
return {'CANCELLED'}
|
||||||
|
|
||||||
pillar.sync_call(node.patch, {'op': 'relink'})
|
|
||||||
strip.atc_is_synced = True
|
strip.atc_is_synced = True
|
||||||
if not refresh:
|
if not refresh:
|
||||||
strip.atc_name = node.name
|
strip.atc_name = node.name
|
||||||
@ -433,6 +437,7 @@ class AttractShotDelete(AttractOperatorMixin, Operator):
|
|||||||
return {'CANCELLED'}
|
return {'CANCELLED'}
|
||||||
|
|
||||||
remove_atc_props(strip)
|
remove_atc_props(strip)
|
||||||
|
compute_strip_conflicts(context)
|
||||||
draw.tag_redraw_all_sequencer_editors()
|
draw.tag_redraw_all_sequencer_editors()
|
||||||
return {'FINISHED'}
|
return {'FINISHED'}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user