JoshJ Posted April 19, 2014 Share Posted April 19, 2014 How can I create a vector attribute with a vector qualifier in attribwrangle? When I enter: v@up= set(0,1,0); the up attribute shows up as up[0],up[1],up[2] in the details view. I need it to be up[x],up[y],up[z] so that transform sops etc will modify the value. (Of course, I could use a vopsop with addattrib, but I'm trying to use attribwrangle more lately) Thanks! Quote Link to comment Share on other sites More sharing options...
sanostol Posted April 19, 2014 Share Posted April 19, 2014 afaik,it is not possible right now, hope it will be possible soon, as the signature causes houdini to handle data different 1 Quote Link to comment Share on other sites More sharing options...
Pazuzu Posted April 19, 2014 Share Posted April 19, 2014 You can use: http://www.sidefx.com/docs/houdini13.0/vex/functions/addattribute. Quote Link to comment Share on other sites More sharing options...
JoshJ Posted April 20, 2014 Author Share Posted April 20, 2014 You can use: http://www.sidefx.com/docs/houdini13.0/vex/functions/addattribute. I tried, but it gives an error. "Call to undefined function "addattribute" " It works in pointwrangle though. Out of curiosity, is there any way to change the qualifier of an attribute after creation? (Or would you need to create a new one with the correct qualifier and copy the values over?) Quote Link to comment Share on other sites More sharing options...
magneto Posted April 20, 2014 Share Posted April 20, 2014 addattribute is not in CVEX. You can use setattrib, but that requires the attribute to be created before hand, even if empty. That should allow you to set the right signature. 1 Quote Link to comment Share on other sites More sharing options...
anim Posted April 20, 2014 Share Posted April 20, 2014 you can change it even after by Attribute Create SOP, setting the same name, type to float with the same length, uncheck Write Values and set qualifier as you want Quote Link to comment Share on other sites More sharing options...
sanostol Posted April 20, 2014 Share Posted April 20, 2014 addattribute is not in CVEX. You can use setattrib, but that requires the attribute to be created before hand, even if empty. That should allow you to set the right signature. but it is by far not so fast to use lie v@up Quote Link to comment Share on other sites More sharing options...
JoshJ Posted April 20, 2014 Author Share Posted April 20, 2014 addattribute is not in CVEX. You can use setattrib, but that requires the attribute to be created before hand, even if empty. That should allow you to set the right signature. I just tried, and I can't see how to have setattrib change the signature, either in attribvop or attribwrangle. I guess the way to change it is in attribute create for now. Thanks all Quote Link to comment Share on other sites More sharing options...
magneto Posted April 20, 2014 Share Posted April 20, 2014 (edited) but it is by far not so fast to use lie v@up Yes definitely not as quick, and also shows the same problem when you want to read from any input other than the first. I just tried, and I can't see how to have setattrib change the signature, either in attribvop or attribwrangle. I guess the way to change it is in attribute create for now. Thanks all No I meant you can use setattrib to set the attribute but you have to use something like AttribCreate beforehand or after like anim said. There are no other way to create attributes than using @ and setattrib in AttribWrangle AFAIK. Edited April 20, 2014 by magneto Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.