Message 1 of 2

Not applicable
05-10-2020
02:51 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
im wanting to make a script that will set up a float expression script for bone stretch.
i have a bone where i add a ScaleXYZ controller with a float expression assigned to Z scale. theres an expose transform tracking the distance of 2 helpers where the bone is in between. the distance is used to stretch the bone.
$[2].distance is not acceptable for the AddScalerTarget. how can i have the distance variable of the expose transform be accepted into the function?
$[1] is the bone selection where the script will be placed
$[2] is the expose transform
on addStretchScript pressed do
(
etDistance = $[2].distance as string
dExpression = "dist/" + etDistance
$[1].scale.controller = ScaleXYZ ()
$[1].scale.controller.Z_Scale.controller = Float_Expression ()
$[1].scale.controller.Z_Scale.controller.AddScalarTarget "dist" $[2].distance
$[1].scale.controller.Z_Scale.controller.setExpression dExpression
)
Solved! Go to Solution.