moved py controller functions from SCA_PythonController to SCA_IController - the base controller class so python can get the sensors & actuators from any controller (not just SCA_PythonController types)
also deprecated getActuators() and getSensors() for 'sensors' and 'actuators' attributes. an example of getting every sensor connected to an object. all_sensors = [s for c in ob.controllers for s in c.sensors]
This commit is contained in:
@@ -440,7 +440,7 @@ class Vector:
|
||||
Example::
|
||||
wrappedObject = Object.getAttribute() #this is wrapped data
|
||||
print wrappedObject.wrapped #prints 'True'
|
||||
copyOfObject = Object(wrappedObject) #creates a copy of the object
|
||||
copyOfObject = wrappedObject.copy() #creates a copy of the object
|
||||
secondPointer = wrappedObject #creates a second pointer to the same data
|
||||
print wrappedObject.attribute #prints '5'
|
||||
secondPointer.attribute = 10
|
||||
@@ -564,7 +564,7 @@ class Euler:
|
||||
Example::
|
||||
wrappedObject = Object.getAttribute() #this is wrapped data
|
||||
print wrappedObject.wrapped #prints 'True'
|
||||
copyOfObject = Object(wrappedObject) #creates a copy of the object
|
||||
copyOfObject = wrappedObject.copy() #creates a copy of the object
|
||||
secondPointer = wrappedObject #creates a second pointer to the same data
|
||||
print wrappedObject.attribute #prints '5'
|
||||
secondPointer.attribute = 10
|
||||
@@ -652,7 +652,7 @@ class Quaternion:
|
||||
Example::
|
||||
wrappedObject = Object.getAttribute() #this is wrapped data
|
||||
print wrappedObject.wrapped #prints 'True'
|
||||
copyOfObject = Object(wrappedObject) #creates a copy of the object
|
||||
copyOfObject = wrappedObject.copy() #creates a copy of the object
|
||||
secondPointer = wrappedObject #creates a second pointer to the same data
|
||||
print wrappedObject.attribute #prints '5'
|
||||
secondPointer.attribute = 10
|
||||
@@ -760,7 +760,7 @@ class Matrix:
|
||||
Example::
|
||||
wrappedObject = Object.getAttribute() #this is wrapped data
|
||||
print wrappedObject.wrapped #prints 'True'
|
||||
copyOfObject = Object(wrappedObject) #creates a copy of the object
|
||||
copyOfObject = wrappedObject.copy() #creates a copy of the object
|
||||
secondPointer = wrappedObject #creates a second pointer to the same data
|
||||
print wrappedObject.attribute #prints '5'
|
||||
secondPointer.attribute = 10
|
||||
|
||||
Reference in New Issue
Block a user