How to use sop groups in dop networks? [Solved]

   1718   0   0
User Avatar
Member
9 posts
Joined: Aug. 2013
Offline
For example, when I use ‘Cloth Attach Constraint’ node I should set ‘Constrained Points’ parameter in this node. I can do it via ‘Attach to Body’ tool selecting points manually. But what if it is necessary to use procedurally defined group for this ‘Constrained Points’ parameter? For example it can be surface boundary. In general such group can’t be defined manually because surface topology can change.
I tried to use expression
' '.join()
in the ‘Constrained Points’ parameter of the node in attached sample file. But it doesn’t work. I get error:
Error: constrained_points:
Error: Unable to evaluate expression (Syntax error - extra tokens detected in expression (/obj/AutoDopNetwork/clothattachconstraint1/constrainedpoints)).
Though this expression works in the Python shell and returns correct string of point numbers.

Also I tried groupbyval HScript function (though not in the sample file). It returns some crazy string with negative and huge numbers. I guess it is a bug.

Any ideas? I mean - is there another method to use sop groups in dops? And where am I wrong in my expression?

P.S. There is attached sample file where above mentioned expression is used. It is very simple - just two cubes, soft body cube attached to the static one. So you can try it.

EDIT.
Well, it appears to be trivial - just set the parameter to the corresponding group name. Somehow I thought that it is not possible a priori. Maybe because there is no drop-down list for groups as in sops.

Attachments:
attach.hipnc (170.5 KB)

  • Quick Links