AWS Thinkbox Discussion Forums

Private Sanity Check in 3ds Max

Hi,

I’m trying to modify the private sanity check as a test to see how it works, I’ve attempted to make it check the frame rate and warn me if it’s not at 25. Unfortunately I don’t seem to be able to get it to fire up, I’m not sure if maybe I’m editing the wrong file.

Below I’ve included the modified maxscript code.

I’m running deadline 4, through 3ds Max 2011 on XP

So my questions are:

  1. Where is the SubmitMaxToDeadline_SanityCheck_Private.ms file that I should change to make this work and can i change it on the repository so all users get the same sanity checks?

  2. Any suggestions as to why it won’t load? I’ve basically copied the entries as they appeared in the General file, so maybe my understanding of how it works is off.

Thanks for any support you may be able to offer.

Nick

-----------------------------------------------------------------------------------------------------------------------------------------------
--THIS FILE CONTAINS YOUR USER-DEFINED CHECKS TO BE PERFORMED AND THE FUNCTIONS
--TO BE USED TO CHECK AND REPAIR THE SCENE BEFORE SUBMISSION
-----------------------------------------------------------------------------------------------------------------------------------------------
--THIS FILE WILL **NOT** BE UPDATED AUTOMATICALLY BY PRIME FOCUS
--AND SHOULD BE USED FOR YOUR IN-HOUSE NEEDS.
-----------------------------------------------------------------------------------------------------------------------------------------------

(
global SMTD_Private_SanityCheckFunctions
global SMTD_Private_SanityChecksToPerform
global SMTD_Private_RepairFunctions 

global SMTD_RepairFunctions
global SMTD_SanityChecksToPerform
global SMTD_SanityCheckFunctions

struct SMTD_Private_SanityCheckFunctions
(
    fn CheckFrameRate=
    (
		Framerate==25
    )
)--end struct		


struct SMTD_Private_RepairFunctions 
(
    fn FixFrameRate =
    (
		framerate=25
    )
)--end struct 

------------------------------------------------------------------------------------------------------------------------------------------------------
--SANITY CHECK PRIVATE DEFINITIONS
------------------------------------------------------------------------------------------------------------------------------------------------------

SMTD_Private_SanityChecksToPerform = #(
	
	#(SMTD_Private_SanityCheckFunctions.CheckFrameRate, #fix, "Frame rate not set to 25fps", SMTD_Private_RepairFunctions.FixFrameRate, true ),
		

)--end checks array

)--End File

Your code is correct except for the comma at the end of the array entry:

   #(SMTD_Private_SanityCheckFunctions.CheckFrameRate, #fix, "Frame rate not set to 25fps", SMTD_Private_RepairFunctions.FixFrameRate, true ),

should be

   #(SMTD_Private_SanityCheckFunctions.CheckFrameRate, #fix, "Frame rate not set to 25fps", SMTD_Private_RepairFunctions.FixFrameRate, true )

You should put this file in the Repository\submission\3dsmax folder and all Max seats accessing the Repository will start using it automatically.

I found a little problem with the propagation of updates when changing Private definitions.

Here is the long story: A couple of years ago, we tried to speed up the loading of the Max Submitter as much as possible. To do this, we now copy all files from the Repository to the local machine and leave them there together with a startup file which tries to load them when you launch Max. When SMTD is launching, it compares the date and size of all files that have to be synced from the Repository with those found in the local cache and if they are all identical, nothing has to be copied from the network. This provided a significant boost to the startup times of the tool.

Unfortunately, if you modify and save only the Private sanity check script, the main Sanity Check script found on the local workstation will be assumed already loaded and will not be reloaded. Since that script is responsible for joining the General and Private definitions together, your changes to the private definitions will not be reflected unless you do one of the following:
*Restart 3ds Max,
*Delete the cached files before relaunching SMTD,
*Resave all three sanity check files on the Repository to modify their date/size and force a reload (for example add a new line to the end of each), or
*In the MAXScript Listener, type in SMTD_AutoLoadSuccessful=false and press Enter before re-launching SMTD.

The last approach appears to be the easiest.

The correct way to fix this would be to reload all sanity check files even if only one of the three components has been modified. I will look into fixing this for the next version 5.1.

Good point Bobo!
For years, I just double-click a quick bat script on my desktop which deletes my local cache files from all my versions of 3dsMax. (I have to test my code works on multiple versions/bit builds).
Re-checking all 3 files makes sense, but how about a little “D” / “Debug” button within the SMTD interface that allows dev/TD’s to re-load the sanity check system without even having to close the SMTD and re-open it?
Useful if you are developing and are carrying out a few iterative tests?
Mike

No, I consider this a bug in the SMTD Launcher and will try to just make it work. If you modified one of three Sanity Check files, all three should be reloaded automatically.
I just missed it when I was adding the caching mechanism. Will try to fix it for the next update. Or even post a fixed launcher here today if I get it to work :slight_smile:

It took me 5 minutes to fix.
Please try it out - run the script on every Workstation and try modifying the Private Sanity Checker definition in the Repository. Restart SMTD - all 3 Sanity Checker files will be reloaded automatically if the Private one has been modified.
Deadline-SubmitMaxToDeadline_SanChkFix.zip (2.14 KB)

And here is the official Sanity Check Tutorial inspired by this thread:

thinkboxsoftware.com/3ds-max … r-customi/

Cheers for sorting that, it’s working fine now. Knew it would be something silly that I’d missed.

Was looking on the website early and found the tutorial before I’d read the last post here. Was thinking, “how didn’t I see this when I was looking for information on the sanity check, he’s even used frame rate as an example!”.

LOL! I used your post as inspiration, if you don’t mind :mrgreen:

Privacy | Site terms | Cookie preferences