486   2   1
User Avatar
2 posts
Joined: Aug. 2013
Hi Guys,

I am doing some work on Houdini Engine.
I try to make tool so Houdini asset is loaded automatically,
to work on many object with loop.
I try to make this command – houdiniEngine_setAssetInput - to run
with pyMel, like this – pm.mel.eval('houdiniEngine_setAssetInput “Asset.houdiniAssetParm_objPath1_node” “obj”')

but it does not recognize the command.
Any sugestions?
User Avatar
460 posts
start with sourcing the relevant mel script:
(import pymel.core as pm)
pm.mel.eval("source houdiniEngineAssetInput")
pm.mel.eval("houdiniEngine_setAssetInput \"" + self.hdaNode.fullPath() + ".input[" + str(index) + "].inputNodeId\" {" + mayaArray + "}"

Edit: Also looks like you got a strange string for your command. The string is split up and you got a pythonic path for a mel command. Mel paths looks like this “|parent|object”. Remember to get the ticks right, you can first test by writing it as mel and then reformat eval style.

Btw, I do a similar thing when loading engine to access necessary commands:
if not pm.pluginInfo("houdiniEngine", q=True, loaded=True):
   pm.loadPlugin("houdiniEngine", quiet=True)
   pm.mel.eval("source AEhoudiniAssetTemplate")
Edited by kahuna031 - Jan. 17, 2018 09:25:13
B.Henriksson, DICE
User Avatar
2 posts
Joined: Aug. 2013
Thanks I will try this one.
For a quick solution for now I used: pm.mel.AEhoudiniAssetSetInputToSelection(“asset path” , “asset node”)

It works as a fast “dirty” solution for now.
  • Quick Links