Blender Kitsu: New Assset Tagging System #286
@ -290,13 +290,17 @@ class KITSU_OT_con_set_asset(bpy.types.Operator):
|
||||
return True
|
||||
return False
|
||||
|
||||
def is_asset_pipeline_folder(self, context) -> bool:
|
||||
current_folder = Path(bpy.data.filepath).parent
|
||||
return current_folder.joinpath("task_layers.json").exists()
|
||||
|
||||
def get_asset_pipeline_publish(self, context) -> Path:
|
||||
from asset_pipeline.merge.publish import find_latest_publish
|
||||
|
||||
return find_latest_publish(Path(bpy.data.filepath))
|
||||
|
||||
def invoke(self, context, event):
|
||||
if self.is_asset_pipeline_enabled(context):
|
||||
if self.is_asset_pipeline_enabled(context) and self.is_asset_pipeline_folder(context):
|
||||
self._published_file_path = self.get_asset_pipeline_publish(context)
|
||||
if self._published_file_path.exists():
|
||||
self.use_asset_pipeline_publish = True
|
||||
|
Loading…
Reference in New Issue
Block a user