mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
removing redundant action
it was residual approach from old workflow
This commit is contained in:
parent
82b50dcfc2
commit
24cbaefe95
1 changed files with 1 additions and 16 deletions
|
|
@ -17,29 +17,14 @@ class RepairActionBase(pyblish.api.Action):
|
|||
def repair_knob(self, context, instances, state):
|
||||
create_context = context.data["create_context"]
|
||||
for instance in instances:
|
||||
files_to_remove = [
|
||||
# create full path to file
|
||||
os.path.join(instance.data["outputDir"], f_)
|
||||
# iterate representations from instance data
|
||||
for r_ in instance.data.get("representations", [])
|
||||
# make sure that the representation has files in list
|
||||
if r_.get("files") and isinstance(r_.get("files"), list)
|
||||
# iterate files from representation files list
|
||||
for f_ in r_.get("files", [])
|
||||
]
|
||||
self.log.info("Files to be removed: {}".format(files_to_remove))
|
||||
for f_ in files_to_remove:
|
||||
os.remove(f_)
|
||||
self.log.debug("removing file: {}".format(f_))
|
||||
|
||||
# Reset the render knob
|
||||
instance_id = instance.data.get("instance_id")
|
||||
created_instance = create_context.get_instance_by_id(
|
||||
instance_id
|
||||
)
|
||||
created_instance.creator_attributes["render_target"] = state
|
||||
|
||||
self.log.info("Rendering toggled to `{}`".format(state))
|
||||
|
||||
create_context.save_changes()
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue