macroscript createCameraFromView
buttontext: "Create Camera from View"
category: "Cameras"
tooltip: "Create Camera from View"
(
on isEnabled return viewport.getType () ==#view_persp_user
on Execute do
(
viewTM=inverse (viewport.gettm())
newcamName=uniquename "ViewCamera"
newcam=targetcamera transform:viewTM name:newcamName
viewport.setCamera newcam
)
)
|