Elena_ DeCosta Posted November 27, 2014 Share Posted November 27, 2014 hello friend. i stuck in unusual problem. i wrote a vex expression in point wrangler.and bring the hittime dop context And map the variable with "addvariablename" function. but that variable is giving error in sop contexts. I though its a bug so i tried in different version of houdini but same case. Any suggestion please. float mulla;import("hittime",mulla,0);addvariablename("mulla", "MADA"); Quote Link to comment Share on other sites More sharing options...
dennis.albus Posted November 27, 2014 Share Posted November 27, 2014 (edited) You are probably using an attribute wrangle instead of a point wrangle. addvariablename has not yet been ported from the SOP vex context to the CVex context which attribute wrangle runs in. The import function is also not available in the CVex context so that might also throw an error when you are using an attribute wrangle. Can you make sure that you are using a point wrangle? If so your code should work. Maybe you should upload an example scene. Also be aware of the fact that you need to bind your variable to the geometry attribute with the @ syntax. f@mulla; //creates the geometry attribute 'mulla' instead of just a vex variable import("hittime",mulla,0); addvariablename("mulla", "MADA"); Edited November 27, 2014 by dennis.albus 1 Quote Link to comment Share on other sites More sharing options...
Pazuzu Posted November 27, 2014 Share Posted November 27, 2014 Hi!! The problem its that you are not using an attribute just a temp float value. f@mulla;import("hittime",f@mulla,0);addvariablename("mulla", "MADA"); Cheers! 1 Quote Link to comment Share on other sites More sharing options...
Elena_ DeCosta Posted November 28, 2014 Author Share Posted November 28, 2014 thanks a lot....Guys...i have used your suggestion but unfortunately no use. please find the work file I am uploaded.vex variable test.hipnc 1 Quote Link to comment Share on other sites More sharing options...
dennis.albus Posted November 28, 2014 Share Posted November 28, 2014 I see You used the binding syntax @ when you actually just want to specify your variable name as a string. Notice how the variable mapping reads _bound_mulla -> MADA. As there is no variable called _bound_mulla this results in an error as Houdini fails to find the mapped variable. Remove the @ from the addvariablename function argument. addvariablename("mulla", "MADA"); 1 Quote Link to comment Share on other sites More sharing options...
Elena_ DeCosta Posted November 28, 2014 Author Share Posted November 28, 2014 Thanks a lot .it solved, i tried the same earlier also but this time it happen. Any way i should not say you but still my goal is to achieve litter further. I have a animated point position of a sphere which i have copied to tie DOP point. And circumstances is to play that animated sphere on a certain position of colision and time( "hitpos" and "hittime") of the DOP point. the animation of the sphere should start only when particle hit the ground. Any minor suggestion how to achive but still thanks dennis. Quote Link to comment Share on other sites More sharing options...
Elena_ DeCosta Posted November 28, 2014 Author Share Posted November 28, 2014 Hi!! The problem its that you are not using an attribute just a temp float value. f@mulla; import("hittime",f@mulla,0); addvariablename("mulla", "MADA"); Cheers! thanks man. Quote Link to comment Share on other sites More sharing options...
pbarua Posted November 29, 2014 Share Posted November 29, 2014 (edited) the animation of the sphere should start only when particle hit the ground. First of all map all the variables you want to use for condition. Create a new stamp variable in copy sop called "hitpos" set value to $HITPOS1, $HITPOS2 , $HITPOS3 or length of these or whatever you want. Then append a switch sop in first input of copy sop and stamp copy variables in switch input to animated sphere. Edited November 29, 2014 by Pradeep Barua 1 Quote Link to comment Share on other sites More sharing options...
pbarua Posted November 29, 2014 Share Posted November 29, 2014 Rather than creating "colide" group at sop level you can add it in pop collision behavior popdop. Because adding group in DOPs is faster than color it and later on in sop group it. That way you don't need Cd attribute and any condition to group. 1 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.