A script that moves the center of a scene around

I remember having seen in the forums a script someone kindly provided, which readjusted the center of the whole scene to bewherever the selected figure/object was. For example, if you had a G8 standing in a room on the edge of the scene, the center value of the scene would shift to that spot. It was very useful when wanting to apply poses to the figure without it flying back to the "default" center of the scene. Or maybe it was the stuff in the scene and the character being moved to the default center, I don't remember how it worked.

I thought I had it saved somewhere and I can't find it anymore. Does anyone else remember it and can point me to it?

Cheers :)

 

Post edited by second_technician_rimmer_9571136c47 on

Comments

  • crosswindcrosswind Posts: 6,986
    edited June 10

    It think this should be the one you asked for:  https://sites.google.com/site/mcasualsdazscripts7/mcjco or https://sites.google.com/site/mcasualsdazscripts3/mcjcome

    But actually you don't have to use this script... you may go for a standard function when appying a pose onto the figure: firstly hold Ctrl key when you load the pose, uncheck X and Z Axis in Translation options group, then the figure will be still kept at the current position after the pose is loaded.

    Post edited by crosswind on
  • Thanks for the suggestion, Crosswind, but It probably isn't the right script. I have it and yes, it can move my figure to a given spot, but I would have to redo it if I try to load any other pose (trying to figure the better one for example). It'd be the same thing with the ctrl combo. The script I was going on about doesnt move the guy to the miving room: it shifts the appartment so the living room places itself around the guy.

  • crosswindcrosswind Posts: 6,986

    I've ever used this script to do the same thing... Just group all the environment objects as well as the figure itself, select the group and use the script to send it to the world center. Not sure if it's the same result that you want.

    Well, I'm not aware of other scripts. Let's see if other folks can give some clues...

     

  • Richard HaseltineRichard Haseltine Posts: 100,948

    You could just move the root element of the environment to the centre of the world and then save a preset for loading it that way.

  • TimberWolfTimberWolf Posts: 288
    edited June 10

    I also don't think this is the best way to do it. Ideally, due to floating point errors, you position your character(s) as close to world centre as possible and move the scene around them. Anyway, as movement is relative I can't see any advantage in moving a scene to a figure rather than the other way round. Quite the opposite in fact.

    If your poses keep sending the figure back to world centre, Crosswind has pointed out the CTRL+pose combination which will prevent that but I would suggest leaving your figures at world centre anyway.

    Post edited by TimberWolf on
  • I'll try and see if I can parent the decor to a marker and move the marker to the center of the scene, then, using the script. Somehow I am quite persuaded that there used to be something simpler and that I lost all trace of it x_x

  • chris-2599934chris-2599934 Posts: 1,814

    Take a look at this thread (it may be the one you remember): https://www.daz3d.com/forums/discussion/comment/5756476

  • crosswindcrosswind Posts: 6,986

    Ah, it must be the one that OP looked for 'cause he posted in the thread, ho ~

    And better add a Undo function to the script... to make it more robust.

  • Yes, that's the one! I couldn't find the thread again... chris, thanks a lot! Crosswind, I don't really know how to script, so I wouldn't know how to add an undo function to it. Still you are very right, it would really benefit from one.

  • crosswindcrosswind Posts: 6,986

    second_technician_rimmer_9571136c47 said:

    Yes, that's the one! I couldn't find the thread again... chris, thanks a lot! Crosswind, I don't really know how to script, so I wouldn't know how to add an undo function to it. Still you are very right, it would really benefit from one.

    Ah, I rechecked the thread, actually OmniFlux and Function had already updated the script to support undo / redo. You may copy the code posted by Function (in the middle of the thread.), paste it into Script Editor, and save it as a DSA file. That'll do!

  • Roger that. And that script is definitely useful. It reminds me of something I read in the Secret Histories books. "I didn't teleport us across space. I moved the universe around us. Much easier, if you ask me."

  • crosswindcrosswind Posts: 6,986

    second_technician_rimmer_9571136c47 said:

    Roger that. And that script is definitely useful. It reminds me of something I read in the Secret Histories books. "I didn't teleport us across space. I moved the universe around us. Much easier, if you ask me."

    Haha ~ nice !yes

Sign In or Register to comment.