Announcement

Collapse
No announcement yet.

What means "Enabled with a script"? (Camera features)

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

  • What means "Enabled with a script"? (Camera features)

    • Camera clipping user interface implemented. When the camera clipping is enabled with a script the appropriate UI controls (Clipping Near, Clipping Far) are listed in the Camera settings rollout
    Hi,

    I don't understand how to get access to the new controls?

    -Micha
    www.simulacrum.de ... visualization for designer and architects

  • #2
    Hi Micha,

    After you run the following script
    Code:
    import rhinoscriptsyntax as rs
    import System
    rv = rs.GetPlugInObject("V-Ray for Rhino").Scene().Plugin("/RenderView")
    rv.Param("clipping").Value = System.Boolean(True)
    you should be now able to see the UI controls in the Asset Editor's Camera Settings - see attached image.
    Click image for larger version  Name:	vrayneui_2021-03-26_10-30-02.jpg Views:	0 Size:	77.8 KB ID:	1108711
    Last edited by nikoleta.garkova; 26-03-2021, 03:32 AM.
    Nikoleta Garkova | chaos.com

    Comment


    • #3
      Great, thank you. Could it be possible to get a button which enable all advanced features? Maybe at the VfR toolbar? So, your advanced users could get a full interface with all the handy nice features.
      www.simulacrum.de ... visualization for designer and architects

      Comment


      • #4

        Could it be possible to get a button which enable all advanced features? Maybe at the VfR toolbar?
        Please, not all of us know how to script. But advanced users need those tools.

        Comment


        • #5
          Can you guys advise how to run this script to enable the camera clipping?
          for some reason, I got an error?

          Best

          Comment


          • #6
            I figured it out. The issue is that the camera clipping UI appears after I save the file. Is there any easy way to update the UI?

            Best,

            Comment


            • #7
              I don't understand the problem. You get an UI and can change the parameter. Is it not easy? Or is something not working? I didn't test it now.
              www.simulacrum.de ... visualization for designer and architects

              Comment


              • #8
                Hi javierrentas

                Yes there is. There is a method called 'RefreshUI' you can call to push the changes to the UI
                As an alternative you can make a transaction that will automatically push the changes

                Also the script is using the old syntax. There is a wrapper python module in the installation that hides the details and makes it quite clean & neat to script V-Ray:

                Code:
                import rhVRay as vray
                
                vray.Scene.RenderView.clipping = 1
                vray.RefreshUI()
                If you prefer the transaction way

                Code:
                import rhVRay as vray
                
                vray.Scene.BeginChange()
                vray.Scene.RenderView.clipping = 1
                vray.Scene.EndChange()
                I'll make some changes to how the transactions work in the future releases, so it is even cleaner, neater and more intuitive

                Cheers

                Comment


                • #9
                  Thank you Nikolay, The scripts did their job.

                  Best,

                  Comment


                  • #10
                    Starting V-Ray 5.20.04 for Rhino there is a simpler transaction syntax, inspired from this thread

                    Code:
                    import rhVRay as vray
                    
                    with vray.Scene.Transaction() as f:
                        vray.Scene.RenderView.clipping = 1

                    Comment

                    Working...
                    X