Notifications
Clear all

[Closed] updateXRef causes ** system exception **

Hi there,

  im working on a script that updates XRefObjects and XRefScenes in our renderfarm,
 but updateXRef causes a ** system exception ** and Max crashes in a few worksteps
to desktop.

  Our productionscene contains about 5 heavy XRefScenes and some XRefObjects.
  For smaler testscenarios the script works fine.
  
  Any suggestions about that ?

      --getting all XRefObjects
      XRef_arr = objXRefs.getAllXRefObjects()
      --adding all XRefScenes to Array
      for k=1 to xrefs.getXRefFileCount()  do (
      	append XRef_arr (xrefs.getXRefFile k)
      )
      --while there is at least one XRef, update it.
      while XRef_arr.count > 0 do (
      	updateXRef XRef_arr[1]
      	print ("updated " + classof XRef_arr[1] as String + " " + XRef_arr[1].filename)
      	deleteItem XRef_arr 1
      )
      
2 Replies

does it crash on XRefObjects or XRefScene’s ?

how are you executing this script on your renderfarm? via a callback? if so make sure its set to persistent:true and I find the #filePostOpen callback works best.

and why are you calling updateXRefs on the renderfarm anyway since they will be updated as soon as they are opened on the render server?

Hi Gravey,

The Script craches when updating the XRefScenes. It will be called as PreRender Script.

@Renderfarm, yes i know that.
Its for VRay distributed rendering. Some of our DR Clients render buckets with none updated XRefScenes/Objects. Start rendering once/twice more then updates the XRefScenes/Objects but thats no slove for production pipline.

PS. There is a boolean property “changed” for XRefScenes and a “UpdateChangedXRefScenes” function i will give that a try.