Announcement

Collapse
No announcement yet.

Macroscript for all VRayStuff or a VRayToolbar?

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

  • Macroscript for all VRayStuff or a VRayToolbar?

    Hi,

    It's possible add a macroscript for all VRay Stuff? For example, VRayPlane, Light (Sphere, PLane, Dome), VRayFur etc.. Just to create a shortcut or a VRayToolbar
    www.francescolegrenzi.com

    VRay - THE COMPLETE GUIDE - The book
    Corona - THE COMPLETE GUIDE - The book


    --- FACEBOOK ---

  • #2
    On a similar vein, is it possible to have the "VRay" category the default when I click on "Lights" or "Cameras" in the Create Panel? Some menu setting somewhere perhaps? I really don't use the standard ones all that much anymore and I'm tired of always clicking the drop down list.
    www.dpict3d.com - "That's a very nice rendering, Dave. I think you've improved a great deal." - HAL9000... At least I have one fan.

    Comment


    • #3
      Originally posted by dlparisi View Post
      On a similar vein, is it possible to have the "VRay" category the default when I click on "Lights" or "Cameras" in the Create Panel? Some menu setting somewhere perhaps? I really don't use the standard ones all that much anymore and I'm tired of always clicking the drop down list.
      It appears that it is not possible. A work-around has been suggested with a start-up MaxScript that changes the categories when 3ds Max is loaded or reset, but I have to look for it.

      Best regards,
      Vlado
      I only act like I know everything, Rogers.

      Comment


      • #4
        Here's the scripts I use and bind to a Quad menu to create VRayLights

        vraylight plane

        Code:
        macroScript VrayLightPlane category:"ColinScripts" tooltip:"VrayLightPlane" (
            on execute do (
                fn setType l = l.type = 0
                startObjectCreation VrayLight newNodeCallback:setType        
            )
        )
        and for a vraylight sphere

        Code:
        macroScript VrayLightSphere category:"ColinScripts" tooltip:"VrayLightSphere" (
            on execute do (
                fn setType l = l.type = 2
                startObjectCreation VrayLight newNodeCallback:setType        
            )
        )
        I know it's not exactly what you're looking for, but it is in the same vein.

        Run the above macroscripts then bind them to a keyboard shortcut or quad menu in

        Customize->Customize User Interface->Keybindings

        Category: "ColinScripts" and bind away!

        -Colin
        Colin Senner

        Comment


        • #5
          hi Colin,

          this is exactly what I want Thanks! And, it's possibile create the same shortcut for all other VRayStuff? Like VRayCamera, Plane, Fur? So, we can create a simple, but useful VRayToolbar?
          www.francescolegrenzi.com

          VRay - THE COMPLETE GUIDE - The book
          Corona - THE COMPLETE GUIDE - The book


          --- FACEBOOK ---

          Comment


          • #6
            Absolutely,
            the key to this script is "startObjectCreation" it basically clicks the button on the create panel to create the object creation process, the "newNodeCallback" part specifies a callback to set the vraylight to type "Plane" or "Sphere", if there isn't a property you want to change (like Plane, Sphere, or any other type) just omit "newNodeCallback"

            If you want to make your own toolbar type app you'll want to start like this

            Code:
            macroScript VRayToolbar category:"VRay" tooltip:"VRayToolbar" (
            
            global rlt_VRayToolbar  -- sets the variable for the rollout
            
            try (destroyDialog rlt_VRayToolbar) catch ()  -- This attempts to close the VRayToolbar if it's already opened
            
            rollout rlt_VRayToolbar "VRay Toolbar" (
                 button btn_CreateVRayLightPlane "Create VRay Light Plane"
                 button btn_HelpMe "Help"
            
                on btn_CreateVRayLightPlane pressed do (
                    -- When you push the CreateVRayLightPlane Button this code is executed
                    fn setType l = l.type = 0
                    startObjectCreation VrayLight newNodeCallback:setType
                )
            
                on btn_HelpMe pressed do (
                    messageBox "Here's your help!" beep:false
                )
            )
            createDialog rlt_VRayToolbar 300 250  -- creates the toolbar 300 pixels wide by 250 pixels high
            )
            Run the above code, and go into your Customize->Customize User Interface->Toolbars and go to the category "VRay" and drag "VRayToolbar to a toolbar, anytime you want your toolbar to popup, just click the button! If you want it dockable etc, I can point you to those resources as well. Hope this helps.
            Last edited by MoonDoggie; 25-03-2009, 03:39 PM.
            Colin Senner

            Comment


            • #7
              By the way, I can comment more of the above code if you like. Let me know.
              Colin Senner

              Comment


              • #8
                I Colin,

                yes, this is what i need.But the first macro is ok for me. Just I need some shorcut for fast work. Damn, I must begin to study maxscript mmm....
                www.francescolegrenzi.com

                VRay - THE COMPLETE GUIDE - The book
                Corona - THE COMPLETE GUIDE - The book


                --- FACEBOOK ---

                Comment


                • #9
                  I think I'll start a maxscript'ing 101 thread on here for everybody. I'm inspired to.

                  I'll start it this weekend and do some basic maxscript lessons on the forum so everyone can begin to understand what's going on with maxscript, and help you all automate your tasks quickly.
                  Colin Senner

                  Comment


                  • #10
                    For anyone willing to learn maxscript for real, go on cgacademy and spend a few bucks to get Bobo's and Laszlo basic dvd set.
                    Bobo writes the maxscript manual.
                    Sure, hey, they cost money, and some are somewhat allergic to the idea of parting from them... (ever so slight polemic tone? you got it.)
                    Lele
                    Trouble Stirrer in RnD @ Chaos
                    ----------------------
                    emanuele.lecchi@chaos.com

                    Disclaimer:
                    The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

                    Comment


                    • #11
                      Yes, but first I need to read the F1 MAXScript Guide. A lots of info!. After, Internet, DVD and commercial stuff.
                      www.francescolegrenzi.com

                      VRay - THE COMPLETE GUIDE - The book
                      Corona - THE COMPLETE GUIDE - The book


                      --- FACEBOOK ---

                      Comment


                      • #12
                        the what?
                        The examples in the maxscript manual alone are THE kickstarts of them all.
                        They are useful, and explained line by line.
                        And of course, they mostly come from the man himself, which more than expressing opinions, sets the standards.
                        Ofc, it's a suggestion only.
                        Lele
                        Trouble Stirrer in RnD @ Chaos
                        ----------------------
                        emanuele.lecchi@chaos.com

                        Disclaimer:
                        The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

                        Comment


                        • #13
                          I'm clearly not talking about supplicating the entire manual by any means. Bobo is certainly the expert, I think it would be helpful to give people a primer to maxscript so they can decide to continue learning it or at the least, have a basic understanding of scripting.
                          Colin Senner

                          Comment


                          • #14
                            Colin, i didn't mean to thwart your kind effort, by any means.
                            I am sure you'll do a great job providing the basics, and some direction.
                            The polemic tone was directed somewhere else
                            Lele
                            Trouble Stirrer in RnD @ Chaos
                            ----------------------
                            emanuele.lecchi@chaos.com

                            Disclaimer:
                            The views and opinions expressed here are my own and do not represent those of Chaos Group, unless otherwise stated.

                            Comment


                            • #15
                              Oh no offense taken lele! I think it'll be a nice way to show the beginnings of scripting in an arch-vis environment or at least inspire some. Your scripts are always an inspiration Enjoy your day everyone, just started snowing in Kansas City
                              Colin Senner

                              Comment

                              Working...
                              X