Hi all,

I'm looking to add an attribute to a node, say "printHello", of type
"button".

This attribute would appear as a button in the Attribute Editor which, when
pressed, would trigger a Python function of sorts.

The problem is, the type "button" doesn't exist. I would preferable *not*
use an Attribute Editor XML template, as I'd like to influence my
surroundings as little as possible.

Ideally, the workflow would go something like this.

def my_callback():
  print("Hello")

cmds.addAttr("myNode", ln="printHello", dt="button", callback=my_callback)

Any ideas on how to achieve this?

-- 
*Marcus Ottosson*
[email protected]

-- 
You received this message because you are subscribed to the Google Groups 
"Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/python_inside_maya/CAFRtmOA0HTUQY7j4WdyrwGKpD6JE470O%2B_sE6%3DQaQ0S3Ypk6mQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to