I would like to be able to control the power/energy of multiple lamps using a driver.
My idea is to have an empty that I would move on the Z axis between 0 and 1 to multiply the energy of each lamp.
On the lamp power attribute, I have Use Self enabled and this driver expression:
self.energy * var
Edit
It seems to provoke a kind of expression loop, and the value is increasing exponentially. So I guess my original "power" value should be defined elsewhere, maybe as a custom property of my lamp object ?
How could I link one to my driver expression?


self.energyis the power field you are driving. I don't get an error for this, but do get a constantly growing result.. which may lead to an error. See https://blender.stackexchange.com/questions/46903/how-to-view-python-error-messages re seeing the error message given, and post into question. – batFINGER Jan 11 '21 at 15:37self.energywithself["prop"]in expression above. – batFINGER Jan 14 '21 at 11:19C.object.data["foogle"] = 1There will now be a custom property on lamp named foogle. Your screen shot above suggests you are in object tab of properties, not in data tab.C.object["foogle"]instead ofC.object.data["foogle"]. Theselfin driver for this case isC.object.dataOr in UI terms First screen shot above (where driver is), is in data tab. Put the custom prop in the that ones "Custom Properties|". – batFINGER Jan 14 '21 at 11:40