# Command For Relationship Editor

**URL:** https://forum.highend3d.com/t/command-for-relationship-editor/3384
**Category:** Maya
**Tags:** mel
**Created:** [January 17, 2006, 10:36pm UTC](https://forum.highend3d.com/t/command-for-relationship-editor/3384 "2006-01-17T22:36:31Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![hansesurfer](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/h/dfb087/32.png) [@hansesurfer](https://forum.highend3d.com/u/hansesurfer)
#### Post date: [January 17, 2006, 10:36pm UTC](https://forum.highend3d.com/t/command-for-relationship-editor/3384/1 "2006-01-17T22:36:31Z")

</div>

I cannot find the mel command for connecting/disconnecting objects in the relationship editor. With "echo all commands" turned on the command is not listed...

any idea??

thanks!

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [January 17, 2006, 10:48pm UTC](https://forum.highend3d.com/t/command-for-relationship-editor/3384/2 "2006-01-17T22:48:45Z")

</div>

huh it echoes them plainly on screen for me the commands are supprisingly

connectAttr and repectively disconnectAttr

or fdo you mean the command that invokes the connection editor instead.

---

<div class="post-metadata">

### Author: ![hansesurfer](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/h/dfb087/32.png) [@hansesurfer](https://forum.highend3d.com/u/hansesurfer)
#### Post date: [January 18, 2006, 8:46am UTC](https://forum.highend3d.com/t/command-for-relationship-editor/3384/3 "2006-01-18T08:46:21Z")

</div>

Hi Jooja,

I don`t mean the connection editor, but the relationship editor...

for example, here I added "pPlane1" to "LIGHT\_1",   
all info I get get is like this:

relationshipEditorSelectKey relationshipPanel1 lightCentricLightLinking {"LIGHT\_1"};  
relationshipEditorMakeRelationship relationshipPanel1 lightCentricLightLinking {"pPlane1"};

but this doesn`t help me.  
when I run the first line in the script editor nothing happens, only the second line is executed as expected and theres no command for working with the relationship editor in the command reference !?!?!?

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [January 18, 2006, 10:09am UTC](https://forum.highend3d.com/t/command-for-relationship-editor/3384/4 "2006-01-18T10:09:37Z")

</div>

OKay this! ye sthey are all sets so the command is

set

---

<div class="post-metadata">

### Author: ![hansesurfer](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/h/dfb087/32.png) [@hansesurfer](https://forum.highend3d.com/u/hansesurfer)
#### Post date: [January 18, 2006, 5:31pm UTC](https://forum.highend3d.com/t/command-for-relationship-editor/3384/5 "2006-01-18T17:31:58Z")

</div>

I bet I am too stupid, but with the sets command I cannot add or remove objects from being lit by a light

???

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [January 18, 2006, 5:52pm UTC](https://forum.highend3d.com/t/command-for-relationship-editor/3384/6 "2006-01-18T17:52:02Z")

</div>

No your right the ligtlinking is not set you can use lightlink command to obtain whats liked and whats not. But all others excluding the uvlinks are sets of somekind. But as lightlink comands docs state its better to use even the lightlinker via sets. But i didnt realy think this was the case because anybody can type link in the manual and find this info the sets info is harder to know. (it will then dawn on you that uvs can be linked wit uvLink) but all the oether linkages will still be obscure.

so instead of

lightlink -light spotLight1 -light pointLight2 -object apple -object orange -object banana -light ambientLight4; //make is asumed

you should use something like

lightlink -make -light ceilingLightSet -object fruitsSet;

because its lighter on your lighteingene, becaus eotherwise you may end up with a hundred or so connections to teh lightlinker while with sets you end upp with a few. in the example above using sets 2 connections and below 6.

interesting note all objects are lighted by all lights becaus ethey belong to default light set that is linked to everything. BUt if you remove a object form default light set it nolonger illuminates anything.

---

<div class="post-metadata">

### Author: ![hansesurfer](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/h/dfb087/32.png) [@hansesurfer](https://forum.highend3d.com/u/hansesurfer)
#### Post date: [January 18, 2006, 6:13pm UTC](https://forum.highend3d.com/t/command-for-relationship-editor/3384/7 "2006-01-18T18:13:24Z")

</div>

ah, yipieee!! ![](http://www.highend3d.com/boards/style_emoticons/<#EMO_DIR#>/smile.gif) !!!

thanks!

---

<div class="post-metadata">

### Author: ![hansesurfer](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/h/dfb087/32.png) [@hansesurfer](https://forum.highend3d.com/u/hansesurfer)
#### Post date: [January 19, 2006, 1:06pm UTC](https://forum.highend3d.com/t/command-for-relationship-editor/3384/8 "2006-01-19T13:06:56Z")

</div>

...mmmmm...

actually I don`t understand the those light sets:

I have a light and a cube.  
When I have the cube connected to the light, the cube is lit.

When I break the connection, the cube is not lit (of course); connections from the lightShape to the lightLinker and from the lightLinker to the cubeShape are made.

Then I add the light to a lightSet and the lightSet is not connected to the cube but the light itself is: cube is lit.  
(no connections between lightLink node and lightSet/ cubeShape.

When the lightSet is connected to the cube but the light itself is not: cube is not lit.  
(connections from the lightSet to lightLinker and from lightLinker to CubeShape).

Also, when I connect the lightSet to a objectSet which includes the cube, the cube is not lit when the light is not linked to the cube "directly".

so, whats the sense of lightSets???

---

<div class="post-metadata">

### Author: ![joojaa](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/j/5daacb/32.png) [@joojaa](https://forum.highend3d.com/u/joojaa)
#### Post date: [January 19, 2006, 2:06pm UTC](https://forum.highend3d.com/t/command-for-relationship-editor/3384/9 "2006-01-19T14:06:04Z")

</div>

either light directly or use sets, if you do both then it can be hard to know what will happen ESPECIALY if you exclusively use the relationship editor to do this. since it goves you absolutely no clue on whats going on.

In both cases you describe doing BOTH individual linking and set linking wich again is like saying hey grils go thisway and boys go thatway but i want specificaly that lisa, lana and laura to go thatway. And mike, bob and andy thisway (offcourse if that was all you had then having said anything about boys and girls was just extra superfluous and totaly IDIOTIC)

Bottom line is that the straight connection supperceedes whatever is in the set. NOTE a light can easily be part of 2 sets so when you create a light and assign it to a new set be sure to UNLINK it form the default light set. IF you never dabble in lightlinkage torugh individual lights the problem never occours but if you DO that light is forever going to need individual supervision (so in the example above lisa,lana, laura, mike,bob and andy never will respond to girls and boys command again, theyv lost your trust on the matter ![](http://www.highend3d.com/boards/style_emoticons/<#EMO_DIR#>/laugh.gif)). And you have a way more manageable scene.

NOW the sense in lets is if you never ever connect in any other way youve got a whol lot off less data and work to do. So scenesload faster and you can manage a hudred lights just as you would 1.

---

<div class="post-metadata">

### Author: ![hansesurfer](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/h/dfb087/32.png) [@hansesurfer](https://forum.highend3d.com/u/hansesurfer)
#### Post date: [January 19, 2006, 3:24pm UTC](https://forum.highend3d.com/t/command-for-relationship-editor/3384/10 "2006-01-19T15:24:27Z")

</div>

that`s what I thought: when connecting the lights directly maya will no longer take into account the set lightning..

but I reallydon`t understand:

when I open the relationship editor and hilight a light there are connections made to all objects, of course.  
Every light lits all object by default.  
So I have first to disconnect the objects from the light, create a lightSet and then connect the lightSet to the desired object...and then I hope the lights in the lightSet do react with the objects, but they don`t!!!!

I just don`t understand what I do wrong ![](http://www.highend3d.com/boards/style_emoticons/<#EMO_DIR#>/sad.gif) ![](http://www.highend3d.com/boards/style_emoticons/<#EMO_DIR#>/sad.gif) ![](http://www.highend3d.com/boards/style_emoticons/<#EMO_DIR#>/sad.gif)

and what else could I use instead of the relationship editor???

---

<div class="post-metadata">

### Author: ![hansesurfer](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/h/dfb087/32.png) [@hansesurfer](https://forum.highend3d.com/u/hansesurfer)
#### Post date: [January 19, 2006, 3:45pm UTC](https://forum.highend3d.com/t/command-for-relationship-editor/3384/11 "2006-01-19T15:45:18Z")

</div>

okay, tried again..

you are right, joojaa. when I never touch the individual lights in the relationship editor, only the lightSets it works.

But what when I did direct connections before???  
How can I tell maya that the lightSets should superceed the old direct connections??????????

---

<div class="post-metadata">

### Author: ![hansesurfer](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/h/dfb087/32.png) [@hansesurfer](https://forum.highend3d.com/u/hansesurfer)
#### Post date: [January 19, 2006, 5:33pm UTC](https://forum.highend3d.com/t/command-for-relationship-editor/3384/12 "2006-01-19T17:33:30Z")

</div>

okay!

so use the hypershade instead of the relationship editor!!!
