Notifications
Clear all
[Closed] Interface: Netrender
Mar 19, 2007 3:24 pm
Im creating a script for rendering across the network and Im having trouble assigning the servers and/or groups.
At the moment I can summit it to all servers. But the way I was planning is that I have a list box which shows all the servers then by double clicking on any severs they get add it to another listbox which holds an array of them.
but I cant assign this array to the network.
I also wanted to do something similar with server groups but I havent been able to get it to work either.
Could someone please take a look at the script or make a suggesting?
Thanks,
Guillermo Leal LLaguno
-------------------------------------------------------------------------------
--Net Render Script.
--Guillermo M Leal LLaguno
--Last updated 18/Marzo/07
--g.llaguno@evvisual.com
--Version 1.00
--Tested on Max8 sp3 and Vray 1.5RC4
-------------------------------------------------------------------------------
--NOTES
-- THE SCRIPT ESPECTS THE FOLLOWING VARIABLE
-- CamArray -- FOR ARRAY OF CAMERAS
--
SelectedServers = #()
RenderServers = #()
NetSave_path = undefined
GTRenderNet = undefined
rollout GToolsNetRender "-- GTools -- NetRender v1.00" width:209 height:380
(
spinner spn_Priority "Priority:" pos:[12,52] width:81 height:16 range:[0,100,10] type:#integer
checkbox chk_UseAllServers "Use All Servers" pos:[4,71] width:92 height:18 checked:true
checkbox chk_InitSuspend "Initially Suspended" pos:[100,70] width:113 height:20
label lbl_JobName "Job Name:" pos:[2,32] width:52 height:14
label lbl_JobName2 "-- name --" pos:[56,31] width:148 height:14
button btn_Submit "Submit" pos:[7,357] width:88 height:20
button btn_Cancel "Cancel" pos:[113,358] width:88 height:20
listbox lbx_Servers "Servers List:" pos:[5,92] width:198 height:10
listbox lbx_SelServers "Selected Servers:" pos:[5,259] width:198 height:5
groupBox grp_JobName "" pos:[54,22] width:154 height:26
button btn_SavePath "Select file Name and Render Path:" pos:[2,4] width:204 height:20
on lbx_Servers doubleClicked i do
(
append SelectedServers lbx_Servers.selected -- adds the selected sever to the list
lbx_SelServers.items = SelectedServers -- updetes tge selected servers listbox
append RenderServers lbx_Servers.selection -- uppdates the selection to assing to sumit()
)
on GToolsNetRender open do
(
try(lbl_JobName2.text = maxFileName + " - " +(CamArray[1].name))catch()
-- ESTABLISHING A CONNECTION --
GTRenderNet = netrender.getmanager() --get a NetManager instance
--start this session
GTRenderNet.connect #automatic "255.255.255.0"
-- QUEUE CONTROL --
if( GTRenderNet.QueryControl #wait ) do --only take control if you have permission
GTRenderNet.getcontrol() --takes queue control
GTRenderNet.wantControl=true --if another client does QueryControl(), they will get a return value of false
--m.Lock true --this completely prevents others from getting queue control
Temp_list = GTRenderNet.getservers() --get the server list to assign to the job
GTServerList = for o in 1 to Temp_list.count collect (Temp_list[o].name) -- displays the group on the rollout
lbx_Servers.items = GTServerList
GTRenderNet.Lock false --others can now get control
)
on btn_Submit pressed do
(
for o in CamArray do
(
jpeg.ijpegio.setQuality 100
viewport.setCamera o
Netjob = GTRenderNet.newJob()
if chk_InitSuspend.checked == true then Netjob.suspended = true --jobs can be submitted as suspended
if chk_InitSuspend.checked == false then Netjob.suspended = false
Netjob.includeMaps = true --turn on "Include Maps"
if chk_UseAllServers.checked == true then Netjob.useAllServers = true
if chk_UseAllServers.checked == false then Netjob.useAllServers = false
Netjob.name = maxFileName + " - " + (o.name)
Netjob.priority = spn_Priority.value