mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-25 05:14:40 +01:00
nuke get asset data using lib function
This commit is contained in:
parent
20f053a067
commit
8402d3bfda
1 changed files with 7 additions and 4 deletions
|
|
@ -1,5 +1,6 @@
|
|||
import pyblish.api
|
||||
from avalon import io
|
||||
from pype import lib
|
||||
|
||||
|
||||
@pyblish.api.log
|
||||
|
|
@ -15,10 +16,12 @@ class ValidateScript(pyblish.api.InstancePlugin):
|
|||
ctx_data = instance.context.data
|
||||
asset_name = ctx_data["asset"]
|
||||
|
||||
asset = io.find_one({
|
||||
"type": "asset",
|
||||
"name": asset_name
|
||||
})
|
||||
# asset = io.find_one({
|
||||
# "type": "asset",
|
||||
# "name": asset_name
|
||||
# })
|
||||
|
||||
asset = lib.get_asset(asset_name)
|
||||
asset_data = asset["data"]
|
||||
|
||||
# These attributes will be checked
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue