Inside Sabertooth
Learn how Sabertooth uses 3ds Max to create 3D interactive projects, including HBO Go’s Game of Thrones interactive experience
  • 1/3
You are here: Forum Home / Autodesk® Maya® / Python / Is it possible to catch a missing reference on file load?
  RSS 2.0 ATOM  

Is it possible to catch a missing reference on file load?
Rate this thread
 
61253
 
Permlink of this thread  
avatar
  • Location: Vancouver
  • Total Posts: 8
  • Joined: 09 May 2011 03:06 PM

I have a script that runs through a number of scenes (that contain references), and if it finds a missing reference, I do not want it to stop processing. Ideally instead of bringing up the createMissingReferenceDialog I could find a way to copy a “dummy file” (like a cube) in to the path of the missing reference appears (so it can be updated later), but this is more of a “nice to have”.

I have looked at both the scriptJob and MSceneMessage as a way of handling this, but neither seem to have options for listening to this type of missing reference event, and there seems to be very little in tracing back what fires the mel “createMissingReferenceDialog” option.

Any suggestions would be appreciated.



Game Programmer/Technical Artist: http://michaelhubbard.ca

Replies: 0
avatar

Found “file -prompt false” which looks like it will help with the prompt appearing, but it would still be great to catch this error rather than ignoring it.



Game Programmer/Technical Artist: http://michaelhubbard.ca

Replies: 0
avatar
  • ldunham1
  • Posted: 21 October 2011 01:56 PM

just wondering, would it not be possible to run through the files externally, ie without running them.

save the files as ascii, search through for file references, check the paths of references if they exist and replace them if needed?

i know there is alot to go wrong with this method, but it could work if done right (you will have the issue of the reference edits failing, but as far as i know it doesn’t break out entirely)



Lee Dunham | Character TD
ldunham.blogspot.com

Replies: 0