mcjCopyVPCam DS 1,2,3,4

introduction

This very short and simple script will take the position and rotation of the camera
you are currently looking through ( often the Perspective View Camera )
and apply them to the currently selected object ( often, a camera or a Spotlight )

installation


unzip the zip file found below in your daz studio content folder
often this means C:\Program Files\DAZ\Studio\content\

use


select an object in your scene, example a camera

you can find the script in your library under Studio / Scripts / mCasual /

for daz studio 3 use mcjCopy3DViewportCamTransforms.dsa
for daz studio 1 and 2 use mcjCopy3DViewportCamTransformsDS1and2.ds

launch the script

the selected object should have jumped to your viewpoint

source code:
var vpm = MainWindow.getViewportMgr();

var vp = vpm.getActiveViewport();

var vp3d = vp.get3DViewport()

var cam = vp3d.getCamera()

var node = Scene.getPrimarySelection();

node.setWSPos( cam.getWSPos() );

node.setWSRot( cam.getWSRot() );



ċ
mcjCopyVPCam.zip
(15k)
mCasual Jacques,
Jan 3, 2011, 10:25 PM
Comments