Hi All:

Maya throws an error when I try to use "error" and "warning" from
pymel in the root namespace:

warning ("A Warning")
# Error: NameError: file <maya console> line 1: name 'warning' is not
defined #
error ("This is an error")
# Error: NameError: file <maya console> line 1: name 'error' is not
defined #

When called from an external script the error message is:
NameError: global name 'warning' is not defined #

So I use a mel wrapper, which fixes "warning".
mel.warning ("A Warning")
# Warning: A Warning #

"mel.error" executes but also generates an runtime error:
mel.error ('This is an Error')
# Error: This is an Error #
# Error: RuntimeError: file C:\MiscApps\pymel\pymel\core\language.py
line 837: Error occurred during execution of MEL script #

Could someone tell me the correct usage for "error"?
Thanks.

-- 
http://groups.google.com/group/python_inside_maya

Reply via email to