Announcement

Collapse
No announcement yet.

Basic Maxscript help please

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

  • Basic Maxscript help please

    I've just started playing around with Maxscript and I'm trying to write a bit of code to turn off the max frame buffer and turn on the Vray frame buffer. I can turn off the max frame buffer using the following code -

    rendShowVFB = off

    I can't seem to find a way to use the Vray VFB instead. Is it possible?

    Please excuse the simple question, I only started using Maxscript half an hour ago

  • #2
    Nevermind, I figured it out -

    vr = renderers.current
    vr.output_on = true

    Comment


    • #3
      I'm not sure how you're implementing this, but just so you know if you enable the V-Ray frame buffer, you don't have to disable the max frame buffer

      If you're making a button or shortcut, try this:

      Code:
      vr = renderers.current
      if classof vr == V_Ray_Adv_2_10_01 then 
      	(
      	vr.output_on = true
      	)else messagebox "You're not using V-Ray!"
      Or if you want to toggle try this:

      Code:
      vr = renderers.current
      if classof vr == V_Ray_Adv_2_10_01 then 
      	(
      	if vr.output_on != true then (vr.output_on = true) else (vr.output_on = false)
      	)else messagebox "You're not using V-Ray!"
      You would need to change 'V_Ray_Adv_2_10_01' to your version of V-ray, but I'm guessing a boffin here knows a better way to handle that than me.
      MDI Digital
      moonjam

      Comment


      • #4
        Originally posted by AJ Jefferies View Post
        You would need to change 'V_Ray_Adv_2_10_01' to your version of V-ray, but I'm guessing a boffin here knows a better way to handle that than me.
        You can use:
        Code:
        vr = renderers.current
        if matchPattern ((classOf vr) as String) pattern:"*V?Ray*" then
        ...
        Last edited by Siger; 22-02-2012, 08:53 AM.
        Regimantas Valiukas
        SIGER STUDIO
        www.sigerstudio.eu

        Comment


        • #5
          Excellent - thank you!
          MDI Digital
          moonjam

          Comment

          Working...
          X