View Full Version : Add object to layer
04-30-2004, 12:43 AM
How to add an object to a display layer through mel? Whne working in Maya, nothing is retruned in the Script Editor :( And teh F1 doc helps to creates display layer only ;(
04-30-2004, 04:46 AM
just edit the code, this code creates a displayLayer and then add the selected object to the layer.
createDisplayLayer -name "layer1" -number 1 -empty;
04-30-2004, 01:13 PM
Adding an object to a layer is just making a connection between the object and the layer. You can do this easily via MEL:
connectAttr displayLayer.drawInfo object.drawOverride;
04-30-2004, 01:38 PM
hOtice : good idea to use A\W mel built functions :)
dwalden74 : but I prefer your method in mel my workflow :beer:
Thanks both mates :)
04-30-2004, 01:51 PM
You can also use
this will add the current selection to the layer named "layerName".
09-03-2004, 04:06 PM
hey guys just wondering if this is simply done, most of my work is importing dwg files for archi tectural viz, so how I normally do it is import the drawing then breal it up into floor, side, front etc and add the different parts, but whats really annoying is when I add say the floor plan to its own layer it gets a uniform layer colour, is there a way to keep the dwg files original layer colour because its manageable with a simple design but aometimes it makes it really hard to make out whats what:scream:
Thanks for your time
09-03-2004, 05:39 PM
there's a modified outliner on http://www.naughtynathan.supanet.com/data/mel.htm but its for maya 4.5 and doesn't quite work on 6.0. I mention this because in the outliner is has a 'Send To Layer' feature, which allows you to send your selected objects to your created layers, that looks particularly nice.
Whch brings me to ask; Anyone know how to get mel to pickup your list of your current layers?
01-18-2006, 05:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
vBulletin v3.0.5, Copyright ©2000-2013, Jelsoft Enterprises Ltd.