Give this a try:

import maya.cmds as cmds
msg_node = cmds.group(empty=True,name='messageNode')
cmds.addAttr(msg_node,attributeType='message',longName='myMessage')

 Perhaps its breaking because you dont have an object specified as the
first argument, although it should be using your selection.


On Tue, Sep 30, 2008 at 12:41 PM, barnabas79 <[EMAIL PROTECTED]> wrote:
>
> Hey all - I was wondering if there was a way to add a dynamic message
> attribute without receiving a warning - ie, if I do:
>
> import maya.cmds as cmds
> cmds.addAttr(longName="msgAttr", attributeType="message")
>
> ... I receive:
>
> // Warning: file: C:/3D/Maya2008/scripts/AETemplates/
> AEreplaceCompound.mel line 97: Message attributes have no data
> values. //
>
> Anyone know a way to get around this, ie add a message attribute
> without receiving an error? Or some way to temporarily disable the
> error?
>
> I know I could do this from the API, but then I would lose the ability
> to undo, which I'd rather be able to keep.
> >
>

--~--~---------~--~----~------------~-------~--~----~
Yours,
Maya-Python Club Team.
-~----------~----~----~----~------~----~------~--~---

Reply via email to