CinnamonMetal Posted October 27, 2018 Share Posted October 27, 2018 One of the arguments for the maketransform() function is T. How can I specify a channel axis; as seen in this pseudo-code ? matrix maketransform(x,x,@P.z(ch("../ctrl_panel/depth")*2),x,x); Quote Link to comment Share on other sites More sharing options...
konstantin magnus Posted October 27, 2018 Share Posted October 27, 2018 Append z to your channel reference (you can see this when hovering over the parameters text with your mouse): f@whatever = ch("../testgeometry_pighead1/tz"); And better separate a function call like maketransform() from your remaining channel references and calculations. Try to structure your code into sections like // INPUT, // PROCESSING, // OUTPUT instead of cramming everything into a one-liner // INPUT int trs = chi('transformation_order'); int xyz = chi('rotation_order'); vector t = vector(0.0); // setting up the vector for completeness sake, it will be overridden later vector r = chv('rotation'); vector s = chv('scale'); vector p = chv('pivot'); float trans = ch('../test_geo/tz'); // grabbing a single translation value from another node // PROCESSING trans *= 2.0; // changing the value t = set(trans, 0.0, 0.0); // combining the translation vector matrix m = maketransform(trs, xyz, t, r, s, p); // setting up the transformation matrix, dont put any distracting stuff in here // OUTPUT @P *= m; // carry out To ensure this example works, set the 'scale' parameter to 1, 1, 1 after clicking on the 'create parameters' button. 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.