Skip to content
This repository has been archived by the owner on Sep 20, 2024. It is now read-only.

Commit

Permalink
Merge pull request #769 from pypeclub/bugfix/tvpaint_store_members_key
Browse files Browse the repository at this point in the history
TVPaint store members key
  • Loading branch information
mkolar authored Dec 2, 2020
2 parents 9576c46 + be2434b commit 5596954
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion pype/plugins/tvpaint/load/load_reference_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,7 @@ def load(self, context, name, namespace, options):

def _remove_layers(self, layer_ids, layers=None):
if not layer_ids:
self.log.warning("Got empty layer ids list.")
return

if layers is None:
Expand All @@ -117,6 +118,7 @@ def _remove_layers(self, layer_ids, layers=None):
layer_ids_to_remove.append(layer_id)

if not layer_ids_to_remove:
self.log.warning("No layers to delete.")
return

george_script_lines = []
Expand All @@ -128,12 +130,14 @@ def _remove_layers(self, layer_ids, layers=None):

def remove(self, container):
layer_ids = self.layer_ids_from_container(container)
self.log.warning("Layers to delete {}".format(layer_ids))
self._remove_layers(layer_ids)

current_containers = pipeline.ls()
pop_idx = None
for idx, cur_con in enumerate(current_containers):
if cur_con["objectName"] == container["objectName"]:
cur_con_layer_ids = self.layer_ids_from_container(cur_con)
if cur_con_layer_ids == layer_ids:
pop_idx = idx
break

Expand Down

0 comments on commit 5596954

Please sign in to comment.