I get an error when I have a group node inside my OTL and I expose the "basegroup" parameter and try to select points on the OTL controls, I want to be able to select points for a group.
Traceback (most recent call last):
File "Parameter Scripted Action", line 4, in <module>
AttributeError: 'NoneType' object has no attribute 'eval'
Can anyone fill me in how to get this working?
Vincent Griffith
Access exposed "basegroup" parameter on Digital Asset?
733 3 0-
- VGriffith
- Member
- 128 posts
- Joined: 9月 2018
- Offline
-
- Mike_A
- Member
- 172 posts
- Joined: 8月 2018
- Offline
-
- tamte
- Member
- 8449 posts
- Joined: 7月 2007
- Offline
it's because you are promoting only "basegroup" parameter but still using it's Action Button script on promoted parameter:
which as you see tries to find on 'grouptype' and 'ordered' parameter and can't so it errors out
so you can either promote those parameter also, if you want to have choice
or just alter the Action Button script and hardcode the ones you didn't promote to specific value:
import soputils kwargs['geometrytype'] = kwargs['node'].parmTuple('grouptype') kwargs['inputindex'] = 0 kwargs['ordered'] = kwargs['node'].parm('ordered').eval() soputils.selectGroupParm(kwargs)
which as you see tries to find on 'grouptype' and 'ordered' parameter and can't so it errors out
so you can either promote those parameter also, if you want to have choice
or just alter the Action Button script and hardcode the ones you didn't promote to specific value:
import soputils kwargs['geometrytype'] = hou.geometryType.Primitives # or hou.geometryType.Points etc... kwargs['inputindex'] = 0 kwargs['ordered'] = False # or True soputils.selectGroupParm(kwargs)
Edited by tamte - 2023年5月10日 17:55:59
Tomas Slancik
FX Supervisor
Method Studios, NY
FX Supervisor
Method Studios, NY
-
- Mike_A
- Member
- 172 posts
- Joined: 8月 2018
- Offline
-
- Quick Links