MEL Beginner Problem

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  02 February 2013
Question MEL Beginner Problem

Hi ,

How to write a MEL code to custom Enum Attribute?

such as :

- Enum Attribute (Green , Blue)
if select "Green" then create a "sphere" .
if select "Blue" then create a "polyCube".

can you help me with a code ?

  02 February 2013
You have to use scriptnode and fire off command on attribute change. Not so simple for beginner I'm afraid.

If you're looking for simple solution, you should try either create 2 shelf buttons. Or a UI with 2 buttons.

Last edited by Panupat : 02 February 2013 at 03:32 AM.
  02 February 2013
you don't need a scriptnode.

create a sphere and add an enum attribute.

Then add an attribute called result to the sphere.

This will cause the expression to evaluate when you change the enum atttribute.

p, li { white-space: pre-wrap; }
if(pSphere1.test == 0){






blah blah blah
  02 February 2013
Thank you Panupat .

Thank you gmask .very appreciate . it's working
  02 February 2013
Thread automatically closed

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.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 08:49 PM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.