Jump to content

Axis channel with maketransform ?


CinnamonMetal

Recommended Posts

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.

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...