Jump to content

Python Promote Parameter


Achayan

Recommended Posts

Hi All,

Is there any way I can promote a parameter from vopnode with python ?. I was trying some other solution like find the parm type and all those stuff but nothing come good . And I didnt find any really helpful doc from houdini also maybe I didnt do a good search icon_smile.gif . So if any one has a idea how I can promote a parameter then it will be really helpful.

So here is workflow

Create a Material Shader builder and go inside the vopnode then create a colormix then middle click on any parm then promote as parameter .

I want the same promote as parameter flow with python or hscript .

Thanks

Link to comment
Share on other sites

Yes thats possible but the issue is the source parm never say the correct parm type , say for ex if its color then it will say float in one way its right , and for the order menu and a int both it will say int . so its really confusing and i didnt find any way to get the type properly otherwise I need to use look and name scheme to find it .

Link to comment
Share on other sites

  • 3 years later...

In case someone else comes across this thread, trying to promote VOP Parms with Python (i.e. HOM code that does the same as RMB > Create Input Parameters), it's insertParmGeneratorsForAllInputs().

 

Here's an example, on a Color Mix VOP:

hou.node("/obj/geo1/primitivevop1/colormix1").insertParmGeneratorsForAllInputs(hou.vopParmGenType.Parameter,True)
Hope it's helpful!
  • Thanks 2
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...