Skip to content

Instantly share code, notes, and snippets.

@BigRoy
Last active February 20, 2024 11:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save BigRoy/fe8e86cbe98323b165e83c6b40b5950b to your computer and use it in GitHub Desktop.
Save BigRoy/fe8e86cbe98323b165e83c6b40b5950b to your computer and use it in GitHub Desktop.
Houdini AttributeWrange LOP: remove any scaling - make sure primitive scale is {1, 1, 1}, for example useful for cameras.
// Remove any scaling from parent prims
matrix transform = usd_worldtransform(0, @primpath);
vector scale = cracktransform(0, 0, 2, {0, 0, 0}, transform);
if (scale != {1, 1, 1}) {
usd_addscale(0, @primpath, "remove_scale", 1 / scale);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment