mcjComethHere - Bring your figures in front of your camera in 1 click

mCasualmCasual Posts: 4,436
edited March 2016 in Freebies

well 3 clicks

1 - Select the figure in the Scene tab

2 - Click DS's "Scripts" menu

3 - Click the mcjComethHere menu item

-------

and Bam the figure jumps 4 meters away in front of you

this is similar to mcjComeHere, but the figure stays at the same floor level it was at

also different from mcjComeHere is that , if it's indeed a figure, the hip node is what is brought into view, not the root node

-----

LINK : https://sites.google.com/site/mcasualsdazscripts7/mcjco

 

 

 

Post edited by mCasual on

Comments

  • JeremyDJeremyD Posts: 265

    Thank you again. Your scripts are so valuable! 

     

  • SkelchSkelch Posts: 269

    Thank you for this, I use the original script almost every day and this improvment is exacatly what I was hoping for. Thank you

  • SteveM17SteveM17 Posts: 951

    Very useful, I also use the original a lot.

  • mCasualmCasual Posts: 4,436
    edited March 2016

    Update Update Update Update Update Update Update 

    March 19th 2016 4 pm version 2 - Will Zero the Hip's Local-space position and use the root node to bring the hip in front of the camera

    else you could have a situation where, yes, the hip did move in front of your camera

    BUT the root node stayed 1 km away !


    since it's short here's the code 

     

    // DAZ Studio version 4.9.0.63 filetype DAZ Scriptvar distance = 400; //bring 4 meters in frontvar appName = "mcjComethHere";var node = Scene.getPrimarySelection();if( node ){	if( node.inherits( "DzBone" ) )	{		node = node.getSkeleton();	}	if( node.inherits( "DzSkeleton" ) )	{		node = node.findBone( "hip" );	}	var vmgr = MainWindow.getViewportMgr();	var vport = vmgr.getActiveViewport().get3DViewport();	var cam = vport.getCamera();	var camPos = cam.getWSPos();	var camRot = cam.getWSRot();	var vecCamForth = camRot.getZAxis();	vecCamForth.setLength( distance );	beginUndo();	var nodey = node.getWSPos().y;	var nupos = camPos.subtract( vecCamForth )	nupos.y = nodey;	if( node.name == "hip" )	{		//in this new version, we force 		//the hip to be near or at the root node position		node.setLocalPos( DzVec3( 0, 0, 0 ) );		var d = nupos.subtract( node.getWSPos() );		node = node.getSkeleton();		p = node.getWSPos();			node.setWSPos( p.add(d) )		}	else	{		node.setWSPos( nupos );	}	acceptUndo( appName ); }

     

    location.jpg
    800 x 600 - 55K
    Post edited by mCasual on
  • mCasualmCasual Posts: 4,436
    edited March 2016

    Update 

    March 19th 2016 4:44 pm version 3 - will ignore cases where nothing is selected ( the silent treatment ! how cruel )

     

    Post edited by mCasual on
  • nonesuch00nonesuch00 Posts: 16,476

    Where is that school house from?

  • mCasualmCasual Posts: 4,436
    edited March 2016

    It's the new version of my free mcjCastle prop

    i'm working on the 3rd version with lots of improvements

    though version 2 is already usable with open'able doors/windows and corrected stairs

    https://sites.google.com/site/mcasualsdazscripts7/mcjcastlexiii

    you can see my progress at this and other projects here http://mcasual.deviantart.com/gallery/

     

     

     

    Where is that school house from?

     

    Post edited by mCasual on
  • DigiDotzDigiDotz Posts: 485

    Thanks for it.  and mcjCastle is looking greatsmiley

     

  • nonesuch00nonesuch00 Posts: 16,476
    mCasual said:

    It's the new version of my free mcjCastle prop

    i'm working on the 3rd version with lots of improvements

    though version 2 is already usable with open'able doors/windows and corrected stairs

    https://sites.google.com/site/mcasualsdazscripts7/mcjcastlexiii

    you can see my progress at this and other projects here http://mcasual.deviantart.com/gallery/

     

     

     

    Where is that school house from?

     

    Wow, it's great!

  • dHandledHandle Posts: 617

    Great stuff, Jacques! 

    Moving stuff around in a scene has always been a major pain!  I tried this script and BAM!  Couldn't be simpler!

    Will it work for props as well?  Everything is tough to move.  What I normally do is select an object nearby, and copy its transform data, then paste it into the new object's transform data.  It works, but it can be tedious.

    Clicking a script....magisterial!   (Like that Scottish football announcer always says, right!?)

    smiley

    Thanks a ton!

  • mCasualmCasual Posts: 4,436
    edited July 2016

     yes it works on any node except bones other than the hip 

    i also wrote a script named mcjComeHere which is similar but doesnt attempt to keep figures at the same altitude

    https://sites.google.com/site/mcasualsdazscripts3/mcjcome

    and there's mcjParent which, in non-parenting mode can help you get a node to GoTo another node or follow it, even orientation-wise

    https://sites.google.com/site/mcasualsdazscripts3/mcjparent

    dHandle said:

    Great stuff, Jacques! 

    Moving stuff around in a scene has always been a major pain!  I tried this script and BAM!  Couldn't be simpler!

    Will it work for props as well?  Everything is tough to move.  What I normally do is select an object nearby, and copy its transform data, then paste it into the new object's transform data.  It works, but it can be tedious.

    Clicking a script....magisterial!   (Like that Scottish football announcer always says, right!?)

    smiley

    Thanks a ton!

     

    parentpromo.jpg
    800 x 800 - 105K
    Post edited by mCasual on
  • 3Diva3Diva Posts: 11,084
    mCasual said:

    well 3 clicks

    1 - Select the figure in the Scene tab

    2 - Click DS's "Scripts" menu

    3 - Click the mcjComethHere menu item

    -------

    and Bam the figure jumps 4 meters away in front of you

    this is similar to mcjComeHere, but the figure stays at the same floor level it was at

    also different from mcjComeHere is that , if it's indeed a figure, the hip node is what is brought into view, not the root node

    -----

    LINK : https://sites.google.com/site/mcasualsdazscripts7/mcjco

     

     

     

    This is hugely helpful! Thank you! I can't wait to try out your other freebies too! Thanks so much for your generousity! 

  • von Hobovon Hobo Posts: 1,207

    Is it still better to move the scene around the characters to avoid the scelera (eye) rendering problem that has been discussed in the forums?

    Or has that issue been fixed in updates to DAZ Studio?

    I tried the ALT key method. Holding ALT key while dragging the figure into the scene from Smart Content pane.

    It works but what if you have a stylized figure that is saved as it's own .duf file. It's not something you can drag from Smart Content. Instead you would have to load it from the file menu. So the ALT key method won't work in that case.

    That's where this Cometh He're script would be very useful!

    It's just that throughout the forums the sclera (eye) rendering problem is pointed out when you move characters away from the world center. But I'm not sure if that is still and issue.

    https://www.daz3d.com/forums/discussion/391586/black-sclera-in-the-eyes

    If anyone can shed some light on that I would be so grateful.

     

     

     

     

     

  • Your donatation link on your site seems to be broken.

  • ioonrxoonioonrxoon Posts: 423

    von Hobo said:

    I tried the ALT key method. Holding ALT key while dragging the figure into the scene from Smart Content pane.

    It works but what if you have a stylized figure that is saved as it's own .duf file. It's not something you can drag from Smart Content. Instead you would have to load it from the file menu. So the ALT key method won't work in that case.

    I've never used smart content and alt drag works fine for me from the content library.

Sign In or Register to comment.