# Attrenumoptionmenu Strange?

**URL:** https://forum.highend3d.com/t/attrenumoptionmenu-strange/1141
**Category:** Maya
**Tags:** mel
**Created:** [March 2, 2009, 7:22am UTC](https://forum.highend3d.com/t/attrenumoptionmenu-strange/1141 "2009-03-02T07:22:38Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![mayapower](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/m/54ee81/32.png) [@mayapower](https://forum.highend3d.com/u/mayapower)
#### Post date: [March 2, 2009, 7:22am UTC](https://forum.highend3d.com/t/attrenumoptionmenu-strange/1141/1 "2009-03-02T07:22:38Z")

</div>

The small example in the docs about "attrEnumOptionMenu" works fine.

CODE  
string $window = `window`;  
columnLayout;  
string $node = `createNode opticalFX`;  
attrEnumOptionMenu -label "Glow Type" -attribute ($node + ".glowType");  
showWindow $window;

But if you change the command into this, to call a procedure also:  
CODE  
attrEnumOptionMenu -cc "renderPreview" -label "Glow Type" -attribute ($node + ".glowType");

It only calls the procedure and does not change the attribute state.

Anything wrong here or with Maya.

WinXP, Maya 2008

Prashant

---

<div class="post-metadata">

### Author: ![kurianos3d](https://forum.highend3d.com/user_avatar/forum.highend3d.com/kurianos3d/32/55947_2.png) [@kurianos3d](https://forum.highend3d.com/u/kurianos3d)
#### Post date: [March 5, 2009, 4:02am UTC](https://forum.highend3d.com/t/attrenumoptionmenu-strange/1141/2 "2009-03-05T04:02:15Z")

</div>

Do you mean the command is not working ??

but in Maya there is not renderPreview i think . if you give any other commands its working

or if you made any change in option box its not getting affected is it ??

---

<div class="post-metadata">

### Author: ![mayapower](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/m/54ee81/32.png) [@mayapower](https://forum.highend3d.com/u/mayapower)
#### Post date: [March 5, 2009, 5:15am UTC](https://forum.highend3d.com/t/attrenumoptionmenu-strange/1141/3 "2009-03-05T05:15:44Z")

</div>

"renderPreview" is custom procedure. You could do a simple check by using this:

CODE  
global proc renderPreview(){  
print "Here I come...";  
}

string $window = `window`;  
columnLayout;  
string $node = `createNode opticalFX`;  
attrEnumOptionMenu -cc "renderPreview" -label "Glow Type" -attribute ($node + ".glowType");  
showWindow $window;

Prashant

---

<div class="post-metadata">

### Author: ![kurianos3d](https://forum.highend3d.com/user_avatar/forum.highend3d.com/kurianos3d/32/55947_2.png) [@kurianos3d](https://forum.highend3d.com/u/kurianos3d)
#### Post date: [March 5, 2009, 8:48am UTC](https://forum.highend3d.com/t/attrenumoptionmenu-strange/1141/4 "2009-03-05T08:48:59Z")

</div>

Do you mean glowType is not changing ??

Or i am thinking in wrong way ![]()

---

<div class="post-metadata">

### Author: ![mayapower](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/m/54ee81/32.png) [@mayapower](https://forum.highend3d.com/u/mayapower)
#### Post date: [March 6, 2009, 9:47am UTC](https://forum.highend3d.com/t/attrenumoptionmenu-strange/1141/5 "2009-03-06T09:47:09Z")

</div>

Yes, glow type is not changing. Just give a try and let me know.

Prashant

---

<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: [March 9, 2009, 6:08am UTC](https://forum.highend3d.com/t/attrenumoptionmenu-strange/1141/6 "2009-03-09T06:08:11Z")

</div>

theres nothing weird, if you define a cc then you must also set the values in the cc command. Its sort of a universal override.

---

<div class="post-metadata">

### Author: ![mayapower](https://forum.highend3d.com/letter_avatar_proxy/v4/letter/m/54ee81/32.png) [@mayapower](https://forum.highend3d.com/u/mayapower)
#### Post date: [March 9, 2009, 3:53pm UTC](https://forum.highend3d.com/t/attrenumoptionmenu-strange/1141/7 "2009-03-09T15:53:42Z")

</div>

QUOTE  
theres nothing weird, if you define a cc then you must also set the values in the cc command. Its sort of a universal override.

I couldn't get you. Could you plz explain.

Prashant
