setAttr cluster2Handle.envelope = smoothstep 0 1 (.5 );
Is a syntax error, you may want to bursh up on your mel knowlege. In any case using setAttr and getAttr inside a expression will make your life really miserable. Its inefficient, doesn't survive imports, kills your undo, has no sane dirty pipe and succeeds in completely unoptimizing maya runtime of your entire scene. So im not even going bother with this one.*
cluster2Handle.envelope = smoothstep 0 1 (.5 );
is syntactically right, but most likely makes no sense for the DG. See clusterHandles don't have envelope attributes, that is unless you made one. However your error seems to indicate that no such attribute exists (yeah that's the error maya spits out, not very informative). So most likely you meant to do:
cluster2.envelope = smoothstep 0 1 (.5 );
tough normaly i would personally write:
cluster2.envelope = smoothstep(0, 1, .5 );
Off course having static values inside the expression does not make sense. So i assume theres something your not showing. (like why you have parentheses)
PS: Expressions are NOT MEL, they just execute with mostly the same rules. They are nodes so all things that applies to nodes applies to expressions. Hence they have functions that mel does not have.
- in essence if you dont know when youd use setAttr here thenyou would never need to