Netrender----any gurus out there who can help

Netrender----any gurus out there who can help

Anonymous
Not applicable
238 Views
1 Reply
Message 1 of 2

Netrender----any gurus out there who can help

Anonymous
Not applicable
Hi need to send a job using maxcript to the first Server available (I want to send the job to only one server.
but I cant work out the syntax...


m = netrender.getmanager()
if m.connected == false then isConnected = m.connect #automatic "255.255.255.0"

job = m.newJob()
job.AssignServer (????)

can anyone help with job.AssignServer (????)

thanks
Mike Nowson
0 Likes
239 Views
1 Reply
Reply (1)
Message 2 of 2

keithm
Enthusiast
Enthusiast
Should be close....

(
global NM

if (classof NM != MixinInterface) then
(
local ManagerName = "Name of Manager"
local ManagerPort = 3234
NM = netrender.getmanager()
NM.connect #manual ManagerName port:ManagerPort
)
if NM.connected == true then
(
local JOB = NM.newjob()
JOB.name = "NameOfTheJob2"
JOB.priority = 50
-- get servers
tnServers = NM.getservers()
-- assign local var to random server incase they all busy
local ServerToUse = tnServers
-- check all servers to see if one is not busy, then assign that one instead
for chkServer in tnServers do
if chkServer.state == #idle then
(
ServerToUse = chkServer
exit
)
JOB.submit servers:ServerToUse
)
else
(
messagebox "Manager not found!"
NM=undefined
)
)
0 Likes