Snippet error

   4550   7   2
User Avatar
Member
620 posts
Joined: Nov. 2013
Offline
hi,
When i set attribute in snippet in PopVop, it gave error message : “Read-only Expression given for Write-only parameter”.
But i CAN set same attribute in Pop Wrangle . I don't know why. Any help?

Thanks!

Attachments:
Snippet Error.hipnc (221.2 KB)

User Avatar
Member
443 posts
Joined: Sept. 2012
Offline
You can do two things:
1. make it temporary variable by type
float foo = 3;

or

2. use bind to export parameter.
Edited by - Dec. 16, 2014 10:14:49
User Avatar
Member
443 posts
Joined: Sept. 2012
Offline
check attached file:

Attachments:
snippet_error_165.hipnc (228.7 KB)

User Avatar
Member
620 posts
Joined: Nov. 2013
Offline
thank you!

But I'm still puzzled about it. It seemed geometry wrangle is same as geometry vop. Why Wrangle can do and Vop can't do?

Attachments:
still puzzle.hipnc (213.8 KB)

User Avatar
Member
620 posts
Joined: Nov. 2013
Offline
I want to write some data to custom attribute in pop force vex expression.
How to do it ?

Attachments:
write attribute from vexExpression.hipnc (220.7 KB)

User Avatar
Member
443 posts
Joined: Sept. 2012
Offline
Particle nodes cannot modify particle attributes. Particle DOPs can access particle attributes but can't modify them. Instead they affect the particles by varying the parameter values per-particle.
User Avatar
Member
443 posts
Joined: Sept. 2012
Offline
Warning

This node requires that you understand the vex language. It is very easy to write incorrect code using this node.


I highly recommend you to got through documents.

https://www.sidefx.com/docs/houdini13.0/vex/ [sidefx.com]
http://www.sidefx.com/docs/houdini13.0/vex/snippets [sidefx.com]
User Avatar
Member
7024 posts
Joined: July 2005
Offline
In fairness to jerry7, I've been using VEX since it was in Alpha, and the Wrangle nodes (specifically their error messages) still are confusing and hard to use IMO.

I got the message on a POP Wrangle node because I hadn't put * in the Attributes to Create. Unfortunately the error message was useless in helping determine that, because it refered to line number 110, except my code ended at line 50

VOPs are IMO the way to go if you're learning, or aren't an expert user who has memorized the myriad gotchas and intricacies of the Snippets.

I do love VEX, but not in Wrangle nodes I respect those who do like and use Wrangle nodes, but it's purely experts only IMO.

Cheers,

Peter B
  • Quick Links