one-liner script to send the selected object's origin to 0,0,0

mCasualmCasual Posts: 4,607
edited May 2023 in Freebies

say you create a 1000 meters diameter Primitive-Sphere

and you specify that the origin of the sphere should be at the center of the sphere

the bottom of your giant sphere will be created sitting on 0,0,0

but you want to use this sphere as an environment sphere for openGL or 3Delight

in the parameters tab, you see that the Y-Translate sliders is at 0

so , you now have to figure uhhh what's half of 1000 meters in centimeters, is it 5000 500000 or 5000000

so instead of straining your brain beyond repair on such a higher mathematics problem,

you select the sphere and run this script:

Scene.getPrimarySelection().setWSPos(DzVec3(0,0,0))

 

dsa
dsa
mcjSendSelectedNodeTo000.dsa
53B
Post edited by mCasual on

Comments

  • mCasualmCasual Posts: 4,607
    edited May 2023

    though in my case it's a tiny sphere i wanted at 0,0,0

    centerthisball.png
    1466 x 849 - 583K
    Post edited by mCasual on
  • Catherine3678abCatherine3678ab Posts: 8,359

    Thank you :-)

Sign In or Register to comment.