Hi Everyone,
I'am using a phyton sop for testing simple stuffs. What here I want to solve a simple varible acces which varriable is not in definded in this code but earlier with a AttribCreate SOP. The problem is that the variable is not
accessable by its name.
How can I solve this ?
ThANKs!
– THE CODE –
node = hou.pwd()
geo = node.geometry()
# Add code to modify contents of geo.
# Use drop down menu to select examples.
points = geo.points()
for p in points:
p.setAttribValue( “A”, 1)
Accessing a Varriable with Python SOP
2184 3 1- geminicgi
- Member
- 4 posts
- Joined: May 2014
- Offline
- Sadjad Rabiee
- Member
- 1391 posts
- Joined: Dec. 2010
- Offline
- geminicgi
- Member
- 4 posts
- Joined: May 2014
- Offline
- Sadjad Rabiee
- Member
- 1391 posts
- Joined: Dec. 2010
- Offline
But that's work perfectly my friend , you should use setAttribValue expression !
I think your problem is for Attribute type , Integer or Float ?
If your attribute type in the AttribCreate SOP is Integer , So You should use Integer value in the Python Code and same rule for float.
Check attached project please :wink:
I think your problem is for Attribute type , Integer or Float ?
If your attribute type in the AttribCreate SOP is Integer , So You should use Integer value in the Python Code and same rule for float.
Check attached project please :wink:
-
- Quick Links