return value of houdiniAsset command

   3034   5   2
User Avatar
Member
1799 posts
Joined: Oct. 2010
Offline
hi! up to this point, the houdiniAsset command has successfully returned the name of the node created, but I ran into a case where it seems to fail to do so (The node is created, but the command simply returns None). Is there a known case where this may be happening? I am trying to dig into why this is the case. The only difference in between my assets is that one is an OBJ .otl, and the other one is a SOP .hda

thank you!
-G
User Avatar
Member
1799 posts
Joined: Oct. 2010
Offline
it seems to have to do with new assets for some reason:

using houdini engine 15.0.347

print.otl will actually return the node name when instantiated with pm.houdiniAsset()

digitalAssetMaya_Maya does not work

digitalAssetMaya_Maya was created with a more recent version of Houdini (15.0.424) whereas print.otl is one of our older assets.

are you able to repro this? (using Maya 2015x64)

thank you!

Attachments:
DigitalAssetMaya_Maya.hda (10.2 KB)
print.otl (8.7 KB)

-G
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
Yup, I was able to reproduce it. It should be fixed in tomorrow/'s build(15.0.431). Thanks for reporting this!
Andrew / アンドリュー
User Avatar
Member
1799 posts
Joined: Oct. 2010
Offline
Not a problem! Thank you for fixing this so promptly!

What causes this on some operators if you do not mind me asking?
-G
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
It's actually pretty silly. The relevant steps are:
1. create node
2. set command's return result to the node name
3. sync

The return result from (2) is what you want to get. But unfortunately, sync also sets the command's return result, which would overriding the previous return result.

The case where the result was returned “correctly” is actually when (3) fails. (3) fails when the asset doesn't generate any output initially, which is usually because the asset is expecting some input.

This means if the asset requires an input, then the result would return “correctly”!
Andrew / アンドリュー
User Avatar
Member
1799 posts
Joined: Oct. 2010
Offline
lol good catch man and good to know. Thank you as usual for addressing this promptly!
-G
  • Quick Links