Announcement

Collapse
No announcement yet.

Vray Camera Creation Via Maxscript

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Vray Camera Creation Via Maxscript

    Hi,

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

    Code:
    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]
    Code:
    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

  • #2
    Hi Pete,

    I think off the top of my head it needs to be v = VrayPhysicalCamera targetTargetObject()) targetedn
    or something along those lines.


    Dave
    Maxscript made easy....
    davewortley.wordpress.com
    Follow me here:
    facebook.com/MaxMadeEasy

    If you don't MaxScript, then have a look at my blog and learn how easy and powerful it can be.

    Comment


    • #3
      Oh yes, That's true for anything that uses a target isn't it

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

      Comment

      Working...
      X