THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 24/10/2011 at 23:17, xxxxxxxx wrote:
I'am trying to set up a little helper script in order to manage all my cameras and rendersettings. When I'm trying the script in C4D R12 directly everything works fine.
But when I try to render the scene on our servers with NetRender the clients report the following problem:
File "<Python-Generator>", line19, in main
Attribute Error; 'module' object has no attribute 'RDATA_PATH'
Isn't there any active renderdata when rendering with NetRender? That would be very astonishing.
Does anybody have an idea?
Here's the code:
from c4d import documents
#Welcome to the world of Python
def main() :
doc = documents.GetActiveDocument()
rd = doc.GetActiveRenderData()
rdName = rd.GetName()
bd = doc.GetActiveBaseDraw()
rc = bd.GetSceneCamera(doc)
rcName = rc.GetName()
if rdName != rcName:
rdOutputFilename = rd[c4d.RDATA_PATH]
newRdOutputFilename = rdName+"_"+doc.SearchObject("Namenszusatz")[c4d.ID_USERDATA, 1]+"___"
if rdOutputFilename != newRdOutputFilename:
rd[c4d.RDATA_PATH] = newRdOutputFilename
rd[c4d.RDATA_MULTIPASS_FILENAME] = newRdOutputFilename