SteveNi Posted April 8, 2017 Share Posted April 8, 2017 (edited) So I'm making a HDA wich has a color sop inside of it, of wich Im using the group field, thats why I need to acces this field at the upper level (the HDA interface). So to to do this, when building the HDA interface I dragged that field directly from the color sop to the HDA interface, (pic1/3)but when I try to use it from the HDA it throws this error (pic2), wich I guess is referencing this code inside the group's script (pic4). I've never messed around with this kind of stuff, how can I solve this? Edited April 8, 2017 by SteveNi Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted April 10, 2017 Share Posted April 10, 2017 Sounds like you have something fishy, can you post your example file? Quote Link to comment Share on other sites More sharing options...
SteveNi Posted April 12, 2017 Author Share Posted April 12, 2017 Yea sure! HDA_test.hipnc Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted April 12, 2017 Share Posted April 12, 2017 (edited) Lol, missing the .hda/.otl, too. So I can't say specifically what is wrong with that setup, share that too, and don't lock it. At any rate, If you just promote the group parameter through the Edit Parameter Interface/Edit Operators Type Properties as you did then the group drop down menu should work by default. You should never have to touch the Action Button script area. The only code to edit would be in the Menu > MenuScript dialog if you wanted to edit it i.e. opmenu -l color1 group that is in hscript to reference the other group menu. You can do this in python, too. As for using python to create it from scratch, one of the issue with the drop down menu, is you need a Label and a parameter value as an array in python. I'm probably butchering the python terms there just then. However, the label appears in the drop down menu, and the parameter value is what appears in the editable field. I think that may be stretching from the issue. Alternatively you may just need to re-create the hda again. Sometimes shit just breaks and a clean rebuild will fix it. Example are the attached hip and hda. GroupMenu.hip GroupMenu.hda Edited April 13, 2017 by LaidlawFX Notice I screwed up the code section on hscript Quote Link to comment Share on other sites More sharing options...
SteveNi Posted April 13, 2017 Author Share Posted April 13, 2017 Ops sorry I forgot to upload the .hda file, here it is. casdaf.hdanc Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted April 13, 2017 Share Posted April 13, 2017 So the error you are having is in the on your parameter select_some_polygons on the Menu > Menu Script Hscript code, your is on the left/top and the new one i promoted up is on the right/bottom for the opmenu script to work you need the name of the parameter at the end. http://www.sidefx.com/docs/houdini/commands/opmenu so by taking your script and adding group to it, it will work as that is the name of the parameter it is referencing. opmenu -l color2 group group_test.hdanc I didn't replicate the python error, so I can't help on that. Hope that helps. Quote Link to comment Share on other sites More sharing options...
SteveNi Posted April 14, 2017 Author Share Posted April 14, 2017 I added group to that script but gives the same error I dont think this matters but Im still working in H15.5... Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted April 14, 2017 Share Posted April 14, 2017 I just tried the same scene in 15.5.480 and it still fixes it. You might have a red herring, as in your issue may lie elsewhere. You can copy and paste the entire text from the error message as I can not repeat it, but it is probably being caused by something else you do not notice and just causing the error to appear there. At this point I would suggest discarding the HDA, and making it from scratch. That would 100% cure the issue. If it doesn't then the issue certainly lies elsewhere, and you need to look further. Quote Link to comment Share on other sites More sharing options...
SteveNi Posted April 14, 2017 Author Share Posted April 14, 2017 Please watch this video where I create the OTL from scratch, you can also read the error message. https://vimeo.com/213274634 Password: 101 Quote Link to comment Share on other sites More sharing options...
LaidlawFX Posted April 14, 2017 Share Posted April 14, 2017 Ah OK I can repo no problem now in 16 and 15. My misunderstanding on what you were doing. Send that to SideFX as a BUG for sure, include the video for the repo. The code below you pointed out before is referencing the wrong node I believe, now that it is promoted. As I understand kwargs(which is piss poor) are for the the current node context. This should be a link to the original node to work as I would understand. As this would happen every time you promote this group from the color node, I would classify it as a bug. I believe it is looking what type of entity/group type you are looking for i.e. primitives, edges, groups... So in short on the color node if you also promote up the parameter entity this menu would work. Or you can force it by using the line of code like from the point sop (hou.geometryType.Points,), or (hou.geometryType.Primitives,), or (hou.geometryType.Edges,). In addition I think you can redirect the kwargs['node'].parmTuple('grouptype') to reference the value of the parameter in the HDA... But you know brain fart on my end, LOL. import soputils kwargs['geometrytype'] = kwargs['node'].parmTuple('grouptype') kwargs['inputindex'] = 0 soputils.selectGroupParm(kwargs) The catch I found when i tried other nodes, is some of them worked.... so it appears not every node uses the same code in that context, plus people may be promoting up the other referenced parameter too. Which is why I think you may have discover this where others have not bothered to look. Below is the code from the point1 group if you promote it up, this only works on points and does not reference any other types i.e. primitives. import soputils kwargs['geometrytype'] = (hou.geometryType.Points,) kwargs['inputindex'] = 0 soputils.selectGroupParm(kwargs) The delete node's group would also error out as if your promote it up, then it errors the same too. Here is the full error output. This would be the specific error code to also share with SideFX. They could report as designed... however the error code seem to fall back on edges of all things, the least supported type. Maybe request in the least it to default to the last chosen option, i.e. the colors default is point... idk, they would know best, as that is way farther down the rabbit hole. Traceback (most recent call last): File "Parameter Scripted Action", line 4, in <module> File "C:/PROGRA~1/SIDEEF~1/HOUDIN~1.480/houdini/python2.7libs\soputils.py", line 219, in selectGroupParm if hou.geometryType.Edges in geotypes and len(geotypes) > 1: TypeError: argument of type 'NoneType' is not iterable Good find! Quote Link to comment Share on other sites More sharing options...
SteveNi Posted April 20, 2017 Author Share Posted April 20, 2017 I can finally reply after the maintenance on this site. So yea, if you import the "group type" menu it will work, but not without it. Ill report this to SideFx by also refer to this topic Thanks Quote Link to comment Share on other sites More sharing options...
zwick Posted April 11, 2019 Share Posted April 11, 2019 On 4/20/2017 at 9:18 AM, SteveNi said: I can finally reply after the maintenance on this site. So yea, if you import the "group type" menu it will work, but not without it. Ill report this to SideFx by also refer to this topic Thanks tip: once you have the group type you can make those parameters invisible 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.