Announcement

Collapse
No announcement yet.

Finding objects with ID's

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

  • Finding objects with ID's

    I often have a lot of multimattes in my scenes, both assigned to shading groups or objects. However it is very easy to forget what object is assigned what ID (imagine you have grouped 50 objects and 15 of those have an ID), so I was wondering if there is an easy way to find out exactly which shaders/objects/groups is assigned to my which ID's and numbers.

  • #2
    In python script !

    LIke material ID :

    Code:
    import maya.cmds as cmds
    
    for object in cmds.ls(mat = True, type = "shadingEngine"):
        if cmds.objExists(object +".vrayColorId") or cmds.objExists(object +".vrayMaterialId"):
            print "You have materialID on " + object
    www.deex.info

    Comment


    • #3
      ObjectID:

      Code:
      import maya.cmds as cmds
      
      for object in cmds.ls(type = ["transform","mesh"]):
          if cmds.objExists(object +".vrayObjectID"):
              print "You have objectID on " + object
      I will create a ID manager in my next tool....
      www.deex.info

      Comment


      • #4
        Hey Deex thank you for the reply. That sounds great

        Comment

        Working...
        X