blender/source/gameengine/PyDoc/SCA_PropertyActuator.py
Benoit Bolsee 1c663bbc7e First batch of GE API cleanup.
The principle is to replace most get/set methods of logic bricks by direct property access. 
To make porting of game code easier, the properties have usually the same type and use than
the return values/parameters of the get/set methods. 
More details on http://wiki.blender.org/index.php/GameEngineDev/Python_API_Clean_Up

Old methods are still available but will produce deprecation warnings on the console: 

"<method> is deprecated, use the <property> property instead"

You can avoid these messages by turning on the "Ignore deprecation warnings" option in Game menu.

PyDoc is updated to include the new properties and display a deprecation warning
for the get/set methods that are being deprecated.
2008-12-29 16:36:58 +00:00

50 lines
1.1 KiB
Python

# $Id$
# Documentation for SCA_PropertyActuator
from SCA_IActuator import *
class SCA_PropertyActuator(SCA_IActuator):
"""
Property Actuator
Properties:
@ivar property: the property on which to operate.
@type property: string
@ivar value: the value with which the actuator operates.
@type value: string
"""
def setProperty(prop):
"""
DEPRECATED: use the 'property' property
Set the property on which to operate.
If there is no property of this name, the call is ignored.
@type prop: string
@param prop: The name of the property to set.
"""
def getProperty():
"""
DEPRECATED: use the 'property' property
Returns the name of the property on which to operate.
@rtype: string
"""
def setValue(value):
"""
DEPRECATED: use the 'value' property
Set the value with which the actuator operates.
If the value is not compatible with the type of the
property, the subsequent action is ignored.
@type value: string
"""
def getValue():
"""
DEPRECATED: use the 'value' property
Gets the value with which this actuator operates.
@rtype: string
"""