Vray Camera Creation Via Maxscript

Hi,

When I create a vray camera via MXS, it does not create a target (even with targeted:on) Creating with targeted:off, then toggling this state has the required effect.

v = VRayPhysicalCamera isSelected:true target_distance:200 targeted:on
[COLOR="#0000FF"]$VRayPhysicalCamera:VRayCam001 @ [0.000000,0.000000,0.000000][/COLOR]
v.target
[COLOR="#0000FF"]undefined[/COLOR]
v = VRayPhysicalCamera isSelected:true target_distance:200 targeted:off
[COLOR="#0000FF"]$VRayPhysicalCamera:VRayCam002 @ [0.000000,0.000000,0.000000][/COLOR]
v.targeted = on
[COLOR="#0000FF"]true[/COLOR]
v.target
[COLOR="#0000FF"]$Target:VRayCam002.Target @ [0.000000,0.000000,-200.000000][/COLOR]

Can anyone else clarify this behaviour, or does something else need to passed into the constructor?

Thanks,

Pete

Vray 3.10.01

Hi Pete,

I think off the top of my head it needs to be v = VrayPhysicalCamera target:(TargetObject()) targeted:on
or something along those lines.

Dave

Oh yes, That’s true for anything that uses a target isn’t it

v = VrayPhysicalCamera target:(TargetObject()) targeted:on name:"Bumholes"
v.target.name = v.name + ".Target"

Cheers Dave