On 24/07/2018 at 11:05, xxxxxxxx wrote:
Hey All,
I'm still getting a handle on python basics so any help would be much appreciated. I'm trying to make a python tag that will select lights by name in my hierarchy and will then control certain parameters with user data. From all the examples I've seen, this code should be working....
import c4d
def Lights() :
for i in doc.GetObjects() :
if (i.GetName() == 'v2' and 'v1') :
Lights = i
def main() :
Vol_On = op[c4d.ID_USERDATA,1]
Lights = c4d.BaseObject (5102) # Light
op[c4d.LIGHT_VLTYPE] = Vol_On
c4d.EventAdd()
if __name__=='__main__':
main()
Thanks!