Jump to content

HELP_Crash when using menu python script in digital asset


Recommended Posts

Hi , I am building currently building an HDA with an important interface (lots of tabs and multiParm list inside multiParm list .. ) so I wanted to use python in "Menu Script" to list a string array stored in the detail attribute to populate on of my ordered menu, after I finally got it to work on a null to experiment then I tried to replace my previous ordered menu with manually typed string with the new one using python script and houdini crashes each time I try. What's weird is that I am able to read the channel and access the value with no problem outside the HDA. Does anyone knows why this is happening, am I missing something here ?

Edit :  It seems that when I try to return the string inside the HDA, it gives me -1, but even if I just print that value, houdini still crashes and why it return that value only inside the HDA ? Also when I enable "Use Menu Item Token as Value" I am able to return the corresponding ID of my selection without crash, but I want the string value of course.

The python script I use :

node = hou.pwd()
geo = node.geometry()


menu = []
data_list = geo.stringListAttribValue("data_list")

for data in data_list:
    menu.append(data)
    menu.append(data)

return menu

Edited by gache
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...