How to create Vray Camera with Target, through maxscript?

i tried the macrorecorder

but this code

VRayPhysicalCamera name:"VRayPhysicalCamera01.Target" pos:[-94.0349,1.66455,0] isSelected:on

will not correctly generate a vray camera with a functioning target,

how can i create a vray camera with maxscript?

thanks

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
tassel's picture

Check out SigerStudio:

Check out SigerStudio: http://www.sigershop.eu

Register and download the "VRay Studio Setup" (It's Free). Very usefull script :D

This snippet is copied from his code:

	on btn_camera pressed do
	(
	cam01 = vrayphysicalcamera name:"Camera_Common01" nearclip:1 farclip:1000 nearrange:0 farrange:1000 transform:(matrix3 [0,1,0] [0,0,1] [1,0,0] [0,-347.291,213.576]) isSelected:off target:(Targetobject transform:(matrix3 [1,0,0] [0,1,0] [0,0,1] [0,15.219,29.225]))
	cam01.focal_length = 51.0
	cam01.targetDistance = 407.083
	cam01.f_number = 3.0
	cam01.vignetting = off
	cam01.whiteBalance_preset = 1
	cam01.shutter_speed = 250.0
	cam01.ISO = 200.0
	viewport.setCamera cam01
	viewport.setShowEdgeFaces true
	displaySafeFrames = true
	)

/ Raymond

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.