so i’m polishing off an update to my vr add-on that lets users bind vr controller inputs to any property in blender: OpenVR Tracker Streaming
i’m using getattr() and setattr() to accomplish this.
i’m using a prop_search of scene objects in the ui to let the user select an object, and i give a text field so the user needs to enter the specific property path and then i parse it with sequential getattr() calls.
so for a simple example like a light’s energy value, the property would be:
but when i start getting into more complex situations, like the x location of a given bone in an armature, the property path starts getting much more complex:
so now i’m getting into regular expressions and more complicated logic to figure out when i’m dealing with lists and whether the lists are indexed by strings or ints, etc.
i’ve more or less figured it out, but i wanted to gut check if theres some easier way that i’m just overlooking.