Are there any docs on how to publish an action from Blender? I just get a popup error whenever I try to create an action for publish.
For context this is what im using:
Blender: 3.6
Blender addon: 0.1.6
Ayon Server: 1.0.4+202402231406
Ayon Launcher: 1.0.0
Openpype addon: 3.18.7
and here’s the error I’m getting:
Creator: Action (io.openpype.creators.blender.action)
Error: 'asset'
Traceback (most recent call last):
File "C:\Users\[MyUsername]\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\pipeline\create\context.py", line 2059, in _create_with_unified_error
result = creator.create(*args, **kwargs)
File "C:\Users\[MyUsername]\AppData\Local\Ynput\AYON\addons\openpype_3.18.7\openpype\hosts\blender\plugins\create\create_action.py", line 25, in create
name = plugin.prepare_scene_name(instance_data["asset"], subset_name)
KeyError: 'asset'
Are you able to post the code for the plugin?
Looks like the asset
data member of instance_data
is not available.
I think it errors because in AYON mode we use folderPath
instead of asset
I assume, it works fine in OpenPype mode.
Some dev
So, I’m guessing this line
https://github.com/ynput/OpenPype/blob/5f5bb7d10066bb02d0d8c64febb82d25e2049ada/openpype/hosts/blender/plugins/create/create_action.py#L25-L25
should be like
https://github.com/ynput/OpenPype/blob/5f5bb7d10066bb02d0d8c64febb82d25e2049ada/openpype/hosts/blender/api/plugin.py#L234-L239
or like
if AYON_SERVER_ENABLED:
instance_data["folderPath"] = asset_name
else:
instance_data["asset"] = asset_name
name = plugin.prepare_scene_name(asset_name, subset_name)
I think it works fine in Ayon-core >= 0.2.0
but I’m not sure if the latest ayon launcher supports that addon or not.
I checked the code I think it will work fine in the upcoming ayon-core
release which I believe will be supported by the upcoming launcher release.
1 Like