Jump to content

simple question (using detail atrib for scaling)


Recommended Posts

Hey guys,

Easy problem (I am missing something).I calculate "ratio" detail attribute to use for scaling an object.Works fine,but in the display value tab (transform node) ,shows 0 value when I put inside @ratio (but it works OK).What am I missing? tks

What would be the best approach to have it much efficient - storing dimensions,center of objects (maybe not writing detail atribs).Also ,was considering not using bbox function,because later on I will have long calculation expressions.

 

Capture3.PNG

easy_question.hipnc

Edited by Screenglow VFX
Link to comment
Share on other sites

You can't use @ratio directly in a paramater
you have to use a detail hscript expression instead:
detail(opinputpath(".",0),"ratio",0)

or you can scale directly in vex if you run over points instead of detail
 

vector size = getbbox_size(0);
@P *= size.x/size.z;

 

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...