On 22/07/2015 at 10:22, xxxxxxxx wrote:
Hi everyone,
I am trying to change settings in a vray light tag via python. It is working so far, except of one thing. Each time I am running the script it is changing the settings and then directly switching back into it's default settings. Does anyone know, what the problem might be?
I wrote the following script:
import c4d
from c4d import documents, plugins
#Welcome to the world of Python
def main() :
def tool() :
return plugins.FindPlugin(doc.GetAction(), c4d.PLUGINTYPE_TOOL)
def object() :
return doc.GetActiveObject()
def tag() :
return doc.GetActiveTag()
def renderdata() :
return doc.GetActiveRenderData()
def prefs(id) :
return plugins.FindPlugin(id, c4d.PLUGINTYPE_PREFS)
c4d.CallCommand(600000106, 600000106) # Flächen-Lichtquelle
c4d.CallCommand(100004788, 50071) # Neues Tag
tag()[c4d.VRAYLIGHTTAG_COMMON_SHDON]=True
if __name__=='__main__':
main()
c4d.EventAdd()
Have a nice evening and thanks a lot
Anna