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.

In python script !

LIke material ID :

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

ObjectID:

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…

Hey Deex thank you for the reply. That sounds great :slight_smile: