Jump to content

Weird behavior when scripting a second button


Nicolas90

Recommended Posts

Hello dear community,

I am having trouble scripting a second button on my hda. Both functions for the two buttons have been defined in the OnCreate callback in the scripts tab. While the first one is working fine, clicking the second one throws an error, saying the function or attribute defined in the parameter settings is not available.

The callback-parameter for the first button has the value:

kwargs["node"].hdaModule().OnCreateCurveButtonPressed()

The second one has the parameter:

kwargs["node"].hdaModule().OnCreateSectorsButtonPressed()

And this is the error message that the console throws:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.607/houdini/python2.7libs\hou.py", line 23413, in __getattr__
    def _SIDEEF_getattr__(*args): return _hou.HDAModule___getattr__(*args)
AttributeError: 'module' object has no attribute 'OnCreateSectorsButtonPressed'

 

Does anybody know whats causing this? :(

 

houButtonsScript.PNG

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