Announcement

Collapse
No announcement yet.

General help with Maya, mel and Multimattes

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

  • General help with Maya, mel and Multimattes

    Hi there,

    Just wondering if anyone has a solution for this scenario:

    Basically I use multimattes quite extensively and set them up throughout a project. However a lot of the times I forget which numbers are already taken up. Is there a way to query which numbers are being used by multimattes in VRay and print them out the script editor?
    Maya 2020/2022
    Win 10x64
    Vray 5

  • #2
    Hiya,
    Yup I use it in my own material browser all the time.

    Click image for larger version

Name:	RHMatBrowse.jpg
Views:	1
Size:	68.8 KB
ID:	844510

    The snippet of code I use:

    Code:
    //procedure: Check for Vray MaterialID or display blank
    global proc int RHMatVRayID (string $RHNodeSource)
    {
    int $RHVRIDCHK;
    int $ICBCB;
    
    if (`objExists  ($RHNodeSource + ".vrayMaterialId")`)
        {
        int $ICBCB = `getAttr ($RHNodeSource + ".vrayMaterialId")`;
        if ($ICBCB > 0 ) $RHVRIDCHK = $ICBCB;
        else $RHVRIDCHK= 0;
        }
    
    return $RHVRIDCHK;
    }
    not elegant, but you get the idea

    Comment


    • #3
      [QUOTE=ricoholmes;531062]Hiya,

      Click image for larger version

Name:	RHMatBrowse.jpg
Views:	1
Size:	68.8 KB
ID:	844510

      Ah what a tease looks like a useful little tool there

      But seriously, thanks for the code it will be of a great help.
      Maya 2020/2022
      Win 10x64
      Vray 5

      Comment


      • #4
        Edit: post deleted due to old version linked. Updated link below
        Last edited by ricoholmes; 12-10-2011, 03:35 AM.

        Comment


        • #5
          Cool, thank you very much for sharing that.
          Maya 2020/2022
          Win 10x64
          Vray 5

          Comment


          • #6
            I had a couple of hours to spare this morning now that I'm back, so I went through my version and cleaned out all the garbage.
            Seems stable as well now, so feel free to download the latest:


            www.ricoholmes.com/OtherStuff/Downloads/RHMatBrowse_v5_0.zip


            DISCLAIMER: This is a tool designed for personal use, and is shared as such. (very rare) crashes have been known to happen. Also note that it's a user contribution and I have no affiliation with ChaosGroup *

            Having said all that, assume it's Beta and feel free to make any changes you see fit. (I'd love to see any updates )


            * Because they're gods, and I have the mel scripting prowess of a 4yr old.
            Last edited by ricoholmes; 12-10-2011, 04:37 AM.

            Comment


            • #7
              That's very generous of you, thanks Rico!

              I'm trying to get my own vray scripts up and running, I'm working on a an automated sun + Hdri setup that automatically locks the sun with the HDRi but its taking a while to get the bugs out.
              Maya 2020/2022
              Win 10x64
              Vray 5

              Comment


              • #8
                My pleasure It's actually nice to have had time and justification to fix the rare problems I've had with it. I've been using it for a year or so now, but I knew the caveats and what was likely to cause the rare crash. It's been updated twice now since the above link (click again and just download.. should be on version 5.2). I've stress tested the stuff I knew to seldom crash it, and it seems rock solid now (thank you!). Turns out deferred procs work a treat (controls not existing while being rebuilt = bad ;p)

                http://www.ricoholmes.com/OtherStuff/Downloads/RHMatBrowse_v5_0.zip (5.2 internally)

                Good luck with your scripting too. It can be very rewarding, even if you have to bang your head on the wall a little

                Comment

                Working...
                X