Face selection through Asset UI

   6070   16   4
User Avatar
Member
12 posts
Joined: 8月 2015
Offline
Hi,

I'm working on a digital asset, which in its basic form
just includes a grid followed by a group SOP. I've promoted
the group SOP's basegroup parameter to the asset UI and would
like to use it to select faces on the grid and add it to the
group.
However, when I hit the action button, I get an error popup:

Traceback (most recent call last):
File “Parameter Scripted Action”, line 4, in <module>
AttributeError: ‘NoneType’ object has no attribute ‘eval’

If I only use a grid and a wrangle with the string parameter
and the action button, which works fine inside the asset, the
message that comes up says:

Not enough inputs connected to select this group.

I haven't really found anything about either in the forums or
on google, so I thought maybe someone here has encountered this
before.

Any help is appreciated.

Thanks!
User Avatar
Member
900 posts
Joined: 2月 2016
Offline
Hi, could you upload the digital asset?
or any version of it trimmed down to reproduce the problem?

otherwise it's difficult to debug
User Avatar
Member
12 posts
Joined: 8月 2015
Offline
Hi Andr,

thanks for the reply. I’ll try to upload it when I get home.

It’s a super small setup though. Put a grid followed by a group node into a subnet. this subnet is turned into a digital asset and the basegroup parameter of the group sop promoted to the asset UI.
Edited by Hendolph - 2019年3月14日 13:04:16
User Avatar
Member
900 posts
Joined: 2月 2016
Offline
Hi, in my system it's working

Attachments:
gridgroup.hiplc (68.4 KB)

User Avatar
Member
12 posts
Joined: 8月 2015
Offline
I tried yours and when I click the button, I still get the error. Are you on 17.5?
I haven't updated yet.

Edit: doesn't work in 17.5 either..
Edited by Hendolph - 2019年3月14日 17:20:16
User Avatar
Member
900 posts
Joined: 2月 2016
Offline
ah, now I see which button are you using.. yes it gives me an error as well.
Will give it a try later
User Avatar
Member
12 posts
Joined: 8月 2015
Offline
The error sounds like it has something to do with the python script creating the action button:

import soputils
kwargs = kwargs.parmTuple('grouptype')
kwargs = 0
kwargs = kwargs.parm('ordered').eval()
soputils.selectGroupParm(kwargs)

I don't really know python, so I wouldn't know how to change it to make it work.
User Avatar
Member
900 posts
Joined: 2月 2016
Offline
It looks like it cannot evaluate the paramater ‘ordered’.
So I guess you could try to copy-link that parameter as well
Edited by Andr - 2019年3月14日 19:36:13
User Avatar
Member
900 posts
Joined: 2月 2016
Offline
Andr
It looks like it cannot evaluate the paramater ‘ordered’.
So I guess you could try to copy-link that parameter as well

It fixes your issue, but then additional problems will raise.
You need to promote grouptype parm too (or hardcode the value of the key).
And finally the main problem seems to be that
kwargs['inputindex'] = 0
which, as far as I understand, It's an argument for the selectGroupParm() function, that expects the geometry coming from the first input of the node (in this case your digital asset).
I don't know how to fix it so that it would reference the geometry inside the digital asset.
Also I don't really know how that function works, as it's not really documented [jtomori.github.io]

Anyway, it looks like your are not the first facing this issue [forums.odforce.net].

You might want to ask to SideFx support or wait for some super houdini guru to help you out here.

cheers
Edited by Andr - 2019年3月14日 20:07:09
User Avatar
Member
12 posts
Joined: 8月 2015
Offline
hm, I might write to support then. I’ll keep the grid outside the asset for now. it works, but it would be better inside.

thanks a lot for taking the time though, Andr.
User Avatar
Member
12 posts
Joined: 8月 2015
Offline
I wrote to support and they actually solved it. I'll just paste their answer:

If you look at the action button script (in type properties window, switch to “action button” tab in parameter description window), it's referencing current node's “grouptype” and “ordered” parameters, which are not promoted. If you promote those parameters, it won't give you ‘NoneType’ error anymore, but it will still fail since selectGroupParm script expects an input connection to the current node (and it doesn't have one).

So instead, you could replace the action button script with something like this:

import soputils;
kwargs = kwargs.path() + ‘/group1’
kwargs = hou.node(kwargs).parmTuple('grouptype')
kwargs = 0
kwargs = hou.node(kwargs).parm('ordered').eval()
soputils.selectGroupParm(kwargs)

This solved the problem and the error popups. However, once I locked the asset, I still got a permission error,
saying that I can't modify the group node. In order to fix this, I had to make the group node editable by adding
it to “Type Properties > Node > Editable Nodes”.

Now when I hit the action button it jumps inside the asset to the group node, I make my selection, hit Enter
and it jumps back out.
User Avatar
Member
41 posts
Joined: 7月 2014
Offline
Is this working in H17.5 ? I tried to replace the action button script with the provided code:
import soputils;
kwargs = kwargs.path() + ‘/group1’
kwargs = hou.node(kwargs).parmTuple('grouptype')
kwargs = 0
kwargs = hou.node(kwargs).parm('ordered').eval()
soputils.selectGroupParm(kwargs)

and it's not working. I get this error
SyntaxError: ('invalid syntax', ('Parameter Scripted Action', 2, 26, ‘kwargs = kwargs.path() + \xe2\x80\x98/group1\xe2\x80\x99\n’))

name of the group node is: group1, name of the group is group1
Scene is in attachments.

Attachments:
group_HDA_problem.hiplc (269.9 KB)

User Avatar
Member
1 posts
Joined: 5月 2017
Offline
bobcat
Is this working in H17.5 ? I tried to replace the action button script with the provided code:
import soputils;.

import soputils
path = kwargs['node'].path()+'/node_inside_hda'
kwargs['node'] = hou.node(path)
kwargs['geometrytype'] = kwargs['node'].parmTuple('grouptype')
kwargs['inputindex'] = 0
kwargs['ordered'] = kwargs['node'].parm('ordered').eval()
soputils.selectGroupParm(kwargs)
User Avatar
Member
132 posts
Joined: 7月 2007
Offline
This issue came up for me just now and I found that the above code doesn't work if you are simply dragging the group field from inside an HDA into the parameter list.
The
kwargs['ordered']
line is the culprit so the following works (removed ‘ordered’ line):

import soputils
path = kwargs['node'].path()+'/node_inside_hda'
kwargs['node'] = hou.node(path)
kwargs['geometrytype'] = kwargs['node'].parmTuple('grouptype')
kwargs['inputindex'] = 0
soputils.selectGroupParm(kwargs)

Now the next issue is the permissions once you lock the HDA (make it non-editable).
As @Hendolph pointed out, changing the “editable nodes” field of the HDA solves the permissions issue that seems related to setting the display flag on the node that you select faces or points from.
However, my tests revealed that you have to add the node feeding the actual node that is getting the selection information from the HDA. I assume this has something to do with changing the display setting for the temporary viewport selection but that's just a guess.
After this the HDA can be “Matching current definition” (i.e. locked) and it all works as one would hope.

BTW: Mac 10.16, Houdini Indie 18.0.338
Edited by Len - 2020年3月8日 20:49:08
User Avatar
Member
8 posts
Joined: 11月 2019
Offline
len
Now the next issue is the permissions once you lock the HDA (make it non-editable).


Hi. Not sure it helps with permissions but anyway for anybody who doesn't want to deal with coding the easier solution will be to copy all the group node parameters together:

Group Name
Group Type
Initial Merge

+all the Base Group part

You can hide them later. No errors so far.
User Avatar
Member
7 posts
Joined: 11月 2017
Offline
Len
This issue came up for me just now and I found that the above code doesn't work if you are simply dragging the group field from inside an HDA into the parameter list.
The
kwargs['ordered']
line is the culprit so the following works (removed 'ordered' line):

import soputils
path = kwargs['node'].path()+'/node_inside_hda'
kwargs['node'] = hou.node(path)
kwargs['geometrytype'] = kwargs['node'].parmTuple('grouptype')
kwargs['inputindex'] = 0
soputils.selectGroupParm(kwargs)

Now the next issue is the permissions once you lock the HDA (make it non-editable).
As @Hendolph pointed out, changing the "editable nodes" field of the HDA solves the permissions issue that seems related to setting the display flag on the node that you select faces or points from.
However, my tests revealed that you have to add the node feeding the actual node that is getting the selection information from the HDA. I assume this has something to do with changing the display setting for the temporary viewport selection but that's just a guess.
After this the HDA can be "Matching current definition" (i.e. locked) and it all works as one would hope.

BTW: Mac 10.16, Houdini Indie 18.0.338

Hi, I'm trying to do the same thing here, in 18.5.462 this doesn't seem to work. With a locked network, after making the blast node, and the transform node which feed it both editable nodes. When I lock the asset and try to do a group selection, there is no geometry visible to try to select.

EDIT:

Realised it was because I was using python to force a custom preview. Silly me!
Edited by George_Hulm - 2021年2月24日 12:34:02
User Avatar
Member
10 posts
Joined: 10月 2010
Offline
B00merang
Hi, I'm trying to do the same thing here, in 18.5.462 this doesn't seem to work. With a locked network, after making the blast node, and the transform node which feed it both editable nodes. When I lock the asset and try to do a group selection, there is no geometry visible to try to select.

EDIT:

Realised it was because I was using python to force a custom preview. Silly me!


Hi B00merang, I have the same problem, everything works fine until I lock the asset. I’ve made both of my nodes (blast and the one that is feeding it) editable but when I lock the hda and try to use the group selection the temp display flag doesn’t go to the feeding node even though it’s editable. Can you elaborate more on how you fixed that?

EDIT: After doing some tests I realized that in order for this to work I had to enclose both the blast node and the null that is feeding it to a subnetwork and then declare that as editable in the type properties of the HDA.
Edited by Sifis - 2022年2月28日 07:30:23
  • Quick Links