Hound fixes

This commit is contained in:
Simone Barbieri 2021-09-07 16:00:05 +01:00
parent 1d6b10bb1d
commit eae7079b08
2 changed files with 3 additions and 4 deletions

View file

@ -21,14 +21,13 @@ class CreateCamera(plugin.Creator):
mti = ops.MainThreadItem(self._process)
ops.execute_in_main_thread(mti)
def process(self):
def _process(self):
# Get Instance Containter or create it if it does not exist
instances = bpy.data.collections.get(AVALON_INSTANCES)
if not instances:
instances = bpy.data.collections.new(name=AVALON_INSTANCES)
bpy.context.scene.collection.children.link(instances)
# Create instance object
asset = self.data["asset"]
subset = self.data["subset"]

View file

@ -57,8 +57,8 @@ class CameraLoader(api.Loader):
)
# Get highest number to make a unique name
folders = [a for a in asset_content
if a[-1] == "/" and f"{name}_" in a]
folders = [a for a in asset_content
if a[-1] == "/" and f"{name}_" in a]
f_numbers = []
for f in folders:
# Get number from folder name. Splits the string by "_" and