I have created a PointerProperty so that I can specify a target object that I want a my script to act on, but I can't seem to find any information about how to actually use the pointer property once I have it.
I have created the property in the
bpy.types.Scene.targetObject = PointerProperty(type=bpy.types.Object)
And I'm drawing it successfully in my tool's control panel:
But how do I actually operate on the selected object? ie:
# throws error "AttributeError: 'tuple' object has no attribute 'name' print(bpy.types.Scene.targetObject.name)