Jump to content

python plugging code in the hda


Omy

Recommended Posts

i created a otl via python

now if i do

d=hou.node("obj/otl").type().definition()

d.sections().keys()

['CreateScript', 'DialogScript', 'Contents']

I only see these.I dont find a python module

how to turn the event handler to python module in the otl by scripting

Link to comment
Share on other sites

You can create a PythonModule section with hou.HDADefinition.addSection(). You then must set the section to be Python using hou.HDADefintion.setExtraFileOption().

d.addSection("PythonModule")
d.setExtraFileOption("PythonModule/IsPython", True)

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...