Maya command reference somewhere?

   8326   8   3
User Avatar
Member
29 posts
Joined: Feb. 2015
Offline
Is there a place where we can look up all the various maya commands for houdini assets. Things like “cmds.houdiniAsset”; I found that by accident on the web. It would be nice to have an official place to look up and discover all the various commands. is “hou.” documented somewhere?
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
There's not much scripting capability in the plugin yet. The only two commands available right now are:
help houdiniAsset;
// Result:

Synopsis: houdiniAsset
Flags:
-cm -cookMessages Name
-la -loadAsset String String
-ls -listAssets String
-rl -reloadAsset String
-rs -resetSimulation Name
-sa -syncAttributes
-shi -syncHidden
-so -syncOutputs
-stm -syncTemplatedGeos
-syn -sync Name


Command Type: Command
//
help houdiniEngine;
// Result:

Synopsis: houdiniEngine
Flags:
-bev -buildHoudiniEngineVersion
-bhv -buildHoudiniVersion
-hev -houdiniEngineVersion
-hv -houdiniVersion
-lic -license
-sh -saveHIP String


Command Type: Command
//
They can be called from both MEL and python. Since they were created to build the UI, they only perform very basic functions. So it doesn't seem like they would be useful for the users. Though if you're interested in using them, feel free to take a look at the MEL files, like houdiniEngineCreateUI.mel and houdiniEngineAssetSync.mel.
Andrew / アンドリュー
User Avatar
Member
29 posts
Joined: Feb. 2015
Offline
Thanks.

What about hou? If I type hou. in the Maya Python Script Editor I seem to have access to the entire hou libs. Can I actually use these in Maya or am I just glimpsing into another solution because of my pathing?
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
NakedChicken
What about hou? If I type hou. in the Maya Python Script Editor I seem to have access to the entire hou libs. Can I actually use these in Maya or am I just glimpsing into another solution because of my pathing?
Oops, forgot to reply to that question. That's the actual hou module [sidefx.com] that's inside a regular Houdini session. It's currently being “leaked” into the Maya python session, because Houdini is sharing the same python as Maya.

Technically, you could indeed use it to peek into (and control) the Houdini world from the Maya world. However, since Houdini Engine is meant to abstract away the Houdini world, using the hou module from the Maya world is probably fairly hairy and messy.

Note that the assets themselves could of course use the hou module within themselves, just like a regular Houdini asset.
Andrew / アンドリュー
User Avatar
Member
29 posts
Joined: Feb. 2015
Offline
awesome, thanks awong.
User Avatar
Member
1 posts
Joined: June 2008
Offline
I'm trying to script the loading of houdini assets into maya using houdiniAsset command
I couldn't find any examples on how to do so other then the following

Synopsis: houdiniAsset
Flags:
-cm -cookMessages Name
-la -loadAsset String String
-ls -listAssets String
-rl -reloadAsset String
-rs -resetSimulation Name
-sa -syncAttributes
-shi -syncHidden
-so -syncOutputs
-stm -syncTemplatedGeos
-syn -sync Name

i'm trying to do something along the lines of …
houdiniAsset -la “Ttools/houdini15.5/otls/test.hda”;
Though it looks like i need 2 strings for the loadAsset flag.
(that's assuming i'm even using it correctly)
Any example mel scripts on how to use the houdiniAsset mel? Or help in general?
Thanks
User Avatar
Member
818 posts
Joined: Sept. 2013
Offline
Because an HDA could contain multiple assets, you need to pass the name of the asset as the second string. For example:
houdiniAsset -loadAsset “T:/foo.hda” “Object/foo”
houdiniAsset -loadAsset “T:/foo.hda” “Sop/foo”


You could list the assets in a HDA by running:
houdiniAsset -listAssets “T:/foo.hda”
Andrew / アンドリュー
User Avatar
Member
1 posts
Joined: March 2018
Offline
This isn't working for me, I get syntax error with no description. Triple checked the file path and can't seem to load the asset.
User Avatar
Member
146 posts
Joined: Oct. 2017
Offline
What happens if you just browse to the asset from the GUI can you find it and load it?
Did houdiniAsset -listAssets fail too?
or just houdiniAsset -loadAsset fail?

Did you quote the file path and the asset name?

I get the syntax error with no description if I fail to quote either
  • Quick Links