Just cant sleep. ;-)
Here you Go...
Select your "real"-Camera
Run script
Choose ViewPort you want to Match (A,B,C,D)
Am 11.05.2013 01:25, schrieb Lp3dsoft:
Rings a bell, I remember it as one of a set of camera tools that Chinny did....
On 11 May 2013, at 00:08, David Gallagher <[email protected]> wrote:
I seem to remember using a script that creates a camera and matches it to the
User View, but I can't find it now.
Sound familiar to anyone?
import win32com.client
c = win32com.client.constants
xsi = Application
# Property Page
oProp = XSIFactory.Createobject("CustomProperty")
oLayout = oProp.PPGLayout
oLayout.Clear()
oProp.AddParameter3("Views", c.siInt2)
aViews = ["A", 0, "B", 1, "C", 2, "D", 3]
oLayout.AddEnumControl( "Views", aViews, "Views", c.siControlCombo)
xsi.inspectobj( oProp , "", "Match UserCam", c.siModal)
cam = xsi.Selection[0].Name
user = "Views.View" + ["A", "B", "C", "D"][xsi.GetValue(oProp.Views)]
+ ".UserCamera"
# Match SRT
xsi.MatchTransform(cam, user, "siSRT", "")
cam += ".camera"
user += ".camera"
# Cam Props Tab "Primitive"
xsi.SetValue(cam + ".aspect", xsi.GetValue(user + ".aspect")
, "")
xsi.SetValue(cam + ".pixelratio", xsi.GetValue(user +
".pixelratio") , "")
xsi.SetValue(cam + ".fov", xsi.GetValue(user +
".fov") , "")
xsi.SetValue(cam + ".fovtype", xsi.GetValue(user + ".fovtype")
, "")
xsi.SetValue(cam + ".interestdist", xsi.GetValue(user +
".interestdist") , "")
xsi.SetValue(cam + ".near", xsi.GetValue(user +
".near") , "")
xsi.SetValue(cam + ".far", xsi.GetValue(user +
".far") , "")
xsi.SetValue(cam + "..projplane", xsi.GetValue(user +
".projplane") , "")
xsi.SetValue(cam + "..projplanedist", xsi.GetValue(user + ".projplanedist")
, "")
# Cam Props Tab "Proj Plane"
xsi.SetValue(cam + ".projplane", xsi.GetValue(user +
".projplane") , "")
xsi.SetValue(cam + ".projplanewidth", xsi.GetValue(user + ".projplanewidth")
, "")
xsi.SetValue(cam + ".projplaneheight", xsi.GetValue(user + ".projplaneheight")
, "")
xsi.SetValue(cam + ".projplaneoffx", xsi.GetValue(user + ".projplaneoffx")
, "")
xsi.SetValue(cam + ".projplaneoffy", xsi.GetValue(user + ".projplaneoffy")
, "")