In a driver on a property of a material, I want to know the name of the object on wich this material is applied.
The material beeing applied to different object, I want to have a different behaviour in my python function depending on the object.
Is there a function like ‘self’ to designate the object onto which is my driver.
More detail :
- I created a material
- Assigned this material to cube1 and Cube2
- Added a driver on one property (transparency alpha) of this material
- In this driver I call the function :
v = bpy.data.objects[“Cube”][‘prop_vis’]
Instead of “Cube” i’m looking for a function that would give me the name of the object on which the driver/material is assigned (prop_vis is a custom property defined on each object)
As someone any idea ?