🐛 fix multiple selection

This commit is contained in:
Ondřej Samohel 2022-10-21 11:07:23 +02:00
parent 21e98faef0
commit 19d237323d
No known key found for this signature in database
GPG key ID: 02376E18990A97C6

View file

@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
"""Creator plugin for creating alembic camera subsets."""
from openpype.hosts.houdini.api import plugin
from openpype.pipeline import CreatedInstance
from openpype.pipeline import CreatedInstance, CreatorError
class CreateAlembicCamera(plugin.HoudiniCreator):
@ -30,7 +30,9 @@ class CreateAlembicCamera(plugin.HoudiniCreator):
}
if self.selected_nodes:
path = self.selected_nodes.path()
if len(self.selected_nodes) > 1:
raise CreatorError("More than one item selected.")
path = self.selected_nodes[0].path()
# Split the node path into the first root and the remainder
# So we can set the root and objects parameters correctly
_, root, remainder = path.split("/", 2)