SteveNi Posted November 12, 2016 Share Posted November 12, 2016 Hi So I have some Vex code and I keep getting this warning: It says "implicit cast from float to int, use explicit cast instead". Now I know this warning message, but I dont understand why Im getting it here, since Im dealing with vectors...the code works and everything, but I keep getting that and I don't know how to get rid of it. Any hints? Thanks. Quote Link to comment Share on other sites More sharing options...
f1480187 Posted November 12, 2016 Share Posted November 12, 2016 (edited) You need to use type prefix on the first usage of @-binding inside wrangle: i@ptn will work. Without prefix, it will be defaulted to f@ptn or to the proper type, if the attribute name is something common (standard VEX/VOP variables and globals are recognized). Edited November 12, 2016 by f1480187 1 Quote Link to comment Share on other sites More sharing options...
SteveNi Posted November 13, 2016 Author Share Posted November 13, 2016 Oh ok, so I must specify the type of the attribute even if I didnt created that attribute but already exists in houdini? I wasn't aware of this...thanks Quote Link to comment Share on other sites More sharing options...
haggi Posted November 13, 2016 Share Posted November 13, 2016 I suppose you want to use @ptnum instead of @ptn for the number of the current point? Then the attribute is buitin and you do not need to prefix it. And you can simplify the call a bit by replacing attrib(1, "point", "up", @ptnum) by v@opinput1_up This only works if you are requesting an attribute for the same point number from any input. Quote Link to comment Share on other sites More sharing options...
SteveNi Posted November 13, 2016 Author Share Posted November 13, 2016 Yea I nedeed @ptnum but I wrote @ptn because thats an attribute I use in another wrangle in the same scene... 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.