ScriptSpot

Forum topic · General Scripting

Absolutely wrong render elements handling - NetRender

By Matyrix · 2015-08-24

Description

Hello All,

When i want to submit a job to the renderfarm, everything is work but the render elements goes wrong. The render elements output path are missing.

I attached a picture about the problem, or you can check here: https://dl.dropboxusercontent.com/u/1152958/renderelementproblem.jpg

The code:


(
rollout jobTest "jobTest" 
(
	button Test "test"
	
    on Test pressed do(
		--get a NetManager instance
		global m = netrender.getmanager()
 
		--start this session
		m.connect #manual "192.168.1.199"

		global srv_list = m.getservers()		
		--create a Job
		job = m.newjob file:(maxFilePath+maxFileName)

		--Try to get the render elements from the current scene
		num_rendElems = job.numRenderElements() --number of render elements for render

		print num_rendElems
	)
)
createDialog jobTest width:100 height:100 style:#(#style_titlebar, #style_sysmenu, #style_minimizebox, #style_resizing)
)

I copy - pasted the original script line from the original documentation: http://docs.autodesk.com/3DSMAX/16/ENU/MAXScript-Help/index.html?url=fil…

How can i render with correct render elements?

The documentation is wrong?

Thanks your answers in advance!
Mátyás Végh

Attachments
Comments (5)

Matyrix · 2015-08-27

Thanks the link, it's really cool, solved the problem! :)

`

pixamoon · 2015-08-24

Hi, try this:


re = maxOps.GetCurRenderElementMgr() 

renderSceneDialog.close()
for n = 0 to (re.numrenderelements() - 1) do (
	element = re.GetRenderElement n
	-----------------------
	print (re.GetRenderElementFilename n)
	re.SetRenderElementFilename n "C:\\test001.jpg"
)
renderSceneDialog.open()

Matyrix · 2015-08-24

Thanks you the reply, the code is really great, but unfortunatelly the submitted job doesnt contain the right render element pathes.

You can see here: https://dl.dropboxusercontent.com/u/1152958/element_lost.jpg

The incredible thing is that when i submit the job manually by the common Network dialog, the elements are right.
But when i use the:


job.submit servers:srv_list

script line, there is no element output path...

How can i submit jobs with contained element pathes?