Before anyone mentions it yes I have done the "
Make objects clickable" tutorial. I even understand the blender side of it.
Problem is that I am starting from zero on scripting and don't know how to take the script stub provided
- Show Spoiler
- Code: Select all
ObjectName:
physical:
pinned: true
quickscript:
simpleclick:
pythonfile: myPythonFile
region: MyClickRegion
and generate a useful action in the python stub.
- Show Spoiler
- Code: Select all
actClickableObject = ptAttribActivator(1, 'Clickable object activator')
strObject = ptAttribString(2, 'Object string')
class myPythonFile(ptModifier,):
def OnNotify(self, state, id, events):
if ((id == actClickableObject.id) and state):
print ('Object %s was clicked' % strObject.value)
#place your code here
If someone can walk me through how to properly reference a object in python to simulate the movement of a pocket door......
I've got the animated door Age and the python is simple enough to follow; It just doesn't make sense I haven't been able to look at the code and go "eureka" that's how you do it.