This commit is contained in:
Petr Kalis 2020-10-30 13:10:43 +01:00
parent 180a45ac2e
commit aa6bedd57c
3 changed files with 6 additions and 8 deletions

View file

@ -90,7 +90,7 @@ class AfterEffectsServerStub():
layers_meta[str(layer.id)] = data layers_meta[str(layer.id)] = data
# Ensure only valid ids are stored. # Ensure only valid ids are stored.
if not all_layers: if not all_layers:
# loaders create FootagetItem now # loaders create FootageItem now
all_layers = self.get_items(comps=True, all_layers = self.get_items(comps=True,
folders=False, folders=False,
footages=True) footages=True)
@ -112,7 +112,7 @@ class AfterEffectsServerStub():
Returns(string): file name Returns(string): file name
""" """
res = self.websocketserver.call(self.client.call( res = self.websocketserver.call(self.client.call(
'AfterEffects.get_active_document_full_name')) 'AfterEffects.get_active_document_full_name'))
return res return res
@ -122,14 +122,14 @@ class AfterEffectsServerStub():
Returns(string): file name Returns(string): file name
""" """
res = self.websocketserver.call(self.client.call( res = self.websocketserver.call(self.client.call(
'AfterEffects.get_active_document_name')) 'AfterEffects.get_active_document_name'))
return res return res
def get_items(self, comps, folders=False, footages=False): def get_items(self, comps, folders=False, footages=False):
""" """
Get all items from Project panel according to arguments. Get all items from Project panel according to arguments.
There are mutliple different types: There are multiple different types:
CompItem (could have multiple layers - source for Creator) CompItem (could have multiple layers - source for Creator)
FolderItem (collection type, currently not used FolderItem (collection type, currently not used
FootageItem (imported file - created by Loader) FootageItem (imported file - created by Loader)

View file

@ -49,7 +49,6 @@ class ResourceLoader(api.Loader):
if '.psd' in file: if '.psd' in file:
import_options['ImportAsType'] = 'ImportAsType.COMP' import_options['ImportAsType'] = 'ImportAsType.COMP'
#with photoshop.maintained_selection():
comp = stub.import_file(self.fname, comp_name, import_options) comp = stub.import_file(self.fname, comp_name, import_options)
self[:] = [comp] self[:] = [comp]
@ -98,5 +97,3 @@ class ResourceLoader(api.Loader):
def switch(self, container, representation): def switch(self, container, representation):
self.update(container, representation) self.update(container, representation)

View file

@ -1,5 +1,6 @@
import re import re
def get_unique_layer_name(layers, asset_name, subset_name): def get_unique_layer_name(layers, asset_name, subset_name):
""" """
Gets all layer names and if 'name' is present in them, increases Gets all layer names and if 'name' is present in them, increases