-- date: 16.03.2007 -- script: Object ID Assigner -- version: 1.0 -- written by: Arda Kutlu -- e-mail: ardakutlu@gmail.com -- Description: This script can be used to quickly assign Object ID's into mass number of objects. It can randomly distribute unique ID's in every object in the scene or a selection of objects you specify. -- -- or it can be used to give the same ID's to a selection of objects (allright you can also assign same ID's from the properties menu, but I just realized that :)... ) -- HOW TO INSTALL: -- 1. Run the .ms file from Maxscript -> Run Script -- 2. From the Customize -> Customize User Interface under "Tik Works" category assign "Object ID Assigner" as a shortcut, toolbar, menu or quad item. -- -- HOW TO USE: -- -- 1. Uncheck the "Affect ONLY selected Objects" checkbox if you want to change the entire scenes elements' ID's, otherwise select at least one object. -- 2. Use the "Randomize ID's button if you want to assign uniqe object ID's (except of 0) into every object in the selection -- 3. If you want to assign the same ID to the selection type the desired number in the ID number field and use "Assign Selected ID" button. -- Feel free to use it, alter it or distribute it... macroscript TIK_OBJ_ID category: "Tik Works" tooltip: "Object ID Assigner" ( if RO != undefined then (closeRolloutFloater RO) RO = NewRolloutFloater "TIK Random OBJ ID'S" 200 250 local b=true local objnum ( rollout ID "Object ID Assigner" ( group "Assign" ( button r_ID "Randomize ID's" tooltip:"Assigns random ID's to the objects" button a_ID "Assign Selected ID" tooltip:"Assigns selected object ID to the objects" ) group "Properties" ( spinner num "ID number" range: [0,999,0] type:#integer checkbox seonly "Affect ONLY selected Objects" checked: true ) on num changed value do objnum = value on seonly changed true do b=seonly.state on r_ID pressed do if b == true then for a in 1 to selection.count do selection[a].gbufferchannel = a else for i in 1 to objects.count do (objects as array)[i].gbufferchannel = i on a_ID pressed do if b== true then for c in selection do selection.gbufferchannel = objnum else objects.gbufferchannel = objnum ) addRollout ID RO rollout about_roll "About" ( label script "Object ID Assigner 1.0" label author "Arda Kutlu" label year "2007" label web "ardakutlu@gmail.com" ) addRollout about_roll RO rolledUp:true ) )