i have to look into why the warnings are printing the wrong locations,
but the reason that this warning occurs is because a PyNode is being
concatenated like a string. for example:
p = PyNode('persp')
print p + " is a camera"
although PyNodes act like strings, they are not strings, so not all
string methods will work and certain special string ops like + - / *
need to be reserved for other maya-specific purposes. as such, we've
deprecating the use of these in 0.9. you can expect support for them
to be removed in 1.0. if you need a name as a string use the various
name getting functions, like name and longName
-chad
On Nov 9, 2009, at 1:38 PM, martin tomoya wrote:
>
> I'm getting this warning about deprecated function and I'm not sure
> how to track it down as the warning returns lines numbers in maya2009/
> bin/maya.bin (?) not in my scripts
>
> pymel.pwarnings : WARNING : DeprecationWarning: The function
> 'pymel.core.general.PyNode.__add__' is deprecated and will become
> unavailable in future pymel versions. Convert to string first using
> str
> () or PyNode.name()
>
> >
--~--~---------~--~----~------------~-------~--~----~
http://groups.google.com/group/python_inside_maya
-~----------~----~----~----~------~----~------~--~---