[Bf-committers] [patch] A patch to add KX_KetsjiEngine::ShowDeprecationWarning()

Mitchell Stokes mitchell at daboys4u.com
Wed Dec 17 07:03:25 CET 2008

>From the tracker (

"In order to clean up the BGE Python API, me and cyborg_ar needed a way to
tell users that they were using a deprecated
function and should use another one.

Just put this into a deprecated function:
KX_KetsjiEngine::ShowDeprecationWarning("old way", "new way");

For example:
KX_KetsjiEngine::ShowDeprecationWarning("getPosition()", "position

Will print "Method getPosition() is deprecated, please use the position
property instead" to the console.

The warnings can be turned off with Game -> Ignore Deprecation Warnings."

-Mitchell "Moguri" Stokes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.blender.org/pipermail/bf-committers/attachments/20081216/62928096/attachment.htm 

More information about the Bf-committers mailing list