Asset Pipeline v2 #145

Closed
Nick Alberelli wants to merge 431 commits from (deleted):feature/asset-pipeline-v2 into main

When changing the target branch, be careful to rebase the branch in your fork to match. See documentation.
Showing only changes of commit 02163d71c3 - Show all commits

View File

@ -15,7 +15,16 @@ class ASSETPIPE_OT_create_new_asset(bpy.types.Operator):
_name = None
_dir = None
# TODO add poll method to check if name and directory are valid before running
@classmethod
def poll(cls, context: bpy.types.Context) -> bool:
new_asset = context.scene.asset_new
if new_asset.name == "" or new_asset.dir == "":
cls.poll_message_set("Asset Name and Directory must be valid")
return False
if os.path.exists(os.path.join(new_asset.dir, new_asset.name)):
cls.poll_message_set("Asset Folder already exists")
return False
return True
def execute(self, context: bpy.types.Context):
# New File is Createed so Props need to be saved