Send the selected object to 0,0,0

mCasualmCasual Posts: 4,607
edited February 2023 in Freebies

attached below but also available as a zip package here:

https://sites.google.com/site/mcasualsdazscripts10/mcjgoto000

Say you create a sphere with it's origin at the center of the sphere 

BUT the created sphere stands on the ground plane. 

In the parameters tab you can see that its Local Coordinates are 0,0,0, 

so you now have to compute the negative Y-Offset to bring its center to 0,0,0. 

ex: the sphere diameter was 100 meters so you have to move the sphere (manually !!!) down 5000 centimeters ( not 500, not 50000 ). 

But since you installed mcjGoTo000.dsa, 

instead you select the sphere 

and run mcjGoTo000 

and bam it's centered at 0,0,0. 

I even added an Undo, so thoughtful, so thoughtful.

 

//mcjVoyageToTheCenterOfTheWorld by mCasualJacques
appName = "mcjGoto[0,0,0]";
node = Scene.getPrimarySelection();
if( node )
{
beginUndo();
node.setWSPos( DzVec3( 0, 0, 0 ) );
acceptUndo( appName );
}

dsa
dsa
mcjVoyageToTheCenterOfTheWorld .dsa
209B
mcjGoto000.png
364 x 364 - 23K
Post edited by mCasual on

Comments

  • mCasualmCasual Posts: 4,607
    edited February 2023

    the icon 

    mcjGoto000.png
    364 x 364 - 23K
    Post edited by mCasual on
  • Very thoughtful and useful script. Thank you!

  • UnseenUnseen Posts: 651

    I agree, very useful script! Thank you so much!!!

  • Not that I am not being greedy... 

    But how hard would it be to create a script where you would...


    1) Click a node in the Scene tab
    2) Click mCasual's "come-to-papa" script
    3) Then Click something in the library OR another node in the scene tab and come-to-papa would place that item/character/prop at the same location 

    That way if I wanted to put a bunch of stuff on a table, I could just place the table, and then dump a bunch of stuff on it.  Of course, I would have to arrange the stuff that was dumped, but getting it near the table would be 93.7% of the battle.

    Feasible?

  • mCasualmCasual Posts: 4,607
    There's mcjParent (which i use very often) you select 2 nodes and you can send one of the 2 to the other it can also copy the rotations optionally and parent one to the other also optionally. It can do it for the current frame or all the playrange
    Chumly said:

    Not that I am not being greedy... 

    But how hard would it be to create a script where you would...


    1) Click a node in the Scene tab
    2) Click mCasual's "come-to-papa" script
    3) Then Click something in the library OR another node in the scene tab and come-to-papa would place that item/character/prop at the same location 

    That way if I wanted to put a bunch of stuff on a table, I could just place the table, and then dump a bunch of stuff on it.  Of course, I would have to arrange the stuff that was dumped, but getting it near the table would be 93.7% of the battle.

    Feasible?

  • manekiNekomanekiNeko Posts: 1,405

    excellent complement of the great come-here script, very appreciated, thanks a lot ^^

  • mCasualmCasual Posts: 4,607
    edited March 2023

     I quickly wrote mcjSelectedGotoLastSelected a minute ago

    I'll post it in its own forum thread, in case it evolves ( a.k.a. gets complicated )

    so you select all your loaded props copies or instances, the last selected node position is the target position

     

    Chumly said:

    Not that I am not being greedy... 

    But how hard would it be to create a script where you would...


    1) Click a node in the Scene tab
    2) Click mCasual's "come-to-papa" script
    3) Then Click something in the library OR another node in the scene tab and come-to-papa would place that item/character/prop at the same location 

    That way if I wanted to put a bunch of stuff on a table, I could just place the table, and then dump a bunch of stuff on it.  Of course, I would have to arrange the stuff that was dumped, but getting it near the table would be 93.7% of the battle.

    Feasible?

    mcjSelectedGotoLastSelectedPromo1.jpg
    1080 x 1640 - 855K
    mcjSelectedGotoLastSelectedPromo2.jpg
    800 x 500 - 279K
    Post edited by mCasual on
  • pjwhoopie@yandex.com[email protected] Posts: 793
    edited March 2023

    Ahh shoot!  I think mcjCome-to-Papa would have been a great name!

     

    Regardless, Thank-you!

    Post edited by [email protected] on
  • Thank you!

  • mCasualmCasual Posts: 4,607
    edited March 2023

    or mcjComeToJesus would've been a good click-bait name

    vaguely related render including the word 'come'

     

    Chumly said:

    Ahh shoot!  I think mcjCome-to-Papa would have been a great name!

     

    Regardless, Thank-you!

    everybody___though_others_may_come___is_getting_re_by_mcasual_df9uisn.png
    1440 x 1176 - 2M
    Post edited by mCasual on
Sign In or Register to comment.