changing values of an attribute tuple

   2601   5   0
User Avatar
Member
98 posts
Joined: 1月 2008
Offline
I have a detail integer attribute tuple with 4 entries. In another node I want to change the i-th element of that tuple. What's the best way to do this?
User Avatar
Member
512 posts
Joined: 7月 2009
Offline
it's easy, have a look at this file!

cheers,

Manu

Attachments:
detail_attribute.hipnc (39.2 KB)

http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
98 posts
Joined: 1月 2008
Offline
hi,

thanks a lot! But I have to be more specific. I don't know in advance which index of the parameter is going to change. So what I am looking for is more like a simple array assignemd. a = value. Also the 4-tuple is just an example what if I have an n-tuple? I guess my best bet is to use a simple python op.
User Avatar
Member
512 posts
Joined: 7月 2009
Offline
yeah, Python is the way to go!
I put a quick example together, that should fix you up!
check out the attached python otl !

Attachments:
SOP_overwriteDetailTupleItem_PyOp.otl (3.6 KB)

http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
User Avatar
Member
98 posts
Joined: 1月 2008
Offline
Thanks again!. I wanted to do this myself today, so you saved me some time .
User Avatar
Member
512 posts
Joined: 7月 2009
Offline
you're most welcome :wink:
I always find some excuse to write some code lol
http://vimeo.com/user2522760 [vimeo.com]
http://stormbornvfx.com/ [stormbornvfx.com]
Manuel Tausch
  • Quick Links