Sanity Checker - Private to ensure Pool is not set to 'none'

Can anyone point me in the right direction here. I want to write a Private Sanity Check function which ensures that the Pool is not set to ‘none’.

I have got as far as SMTDSettings.PoolName != “none”, but can anyone help put it into a check and repair function for me?

Many thanks,
Matt

You need to add all these bits in to the 3 sections…

Remember when adding in a new item you need to add a comma after the last one…

[code]-----------------------------------------------------------------------------------------------------------------------------------------------
–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 THINKBOX SOFTWARE INC
–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 CheckFilmFrameRate =
(
FrameRate==24
), --need comma to delimit functions in struct!
fn CheckPoolNotNone = --new check function
(
SMTDSettings.PoolName != “none”
)
)–end struct

struct SMTD_Private_RepairFunctions
(
fn FixFilmFrameRate =
(
FrameRate=24
::SMTD_SanityCheck_errorReportRollout.log_action “Fixed” (color 0 155 0) true “Frame Rate Changed To 24 fps.”
), --need comma to delimit functions in struct!
fn FixPoolNotNone = --new repair function
(
SMTDSettings.PoolName = “3dsmax”
SMTD_MainRollout.displayPoolsList() --update the pools - if “3dsmax” is not a valid pool, it will revert back to “none”
if SMTDSettings.PoolName == “3dsmax” then --if the new name persisted, then the new pool name existed on the list
::SMTD_SanityCheck_errorReportRollout.log_action “Fixed” (color 0 155 0) true “Pool Name changed to ‘3dsmax’.”
else
::SMTD_SanityCheck_errorReportRollout.log_action “FAILED” (color 0 0 255) true “Failed to set Pool Name to ‘3dsmax’.”
)
)–end struct


–SANITY CHECK PRIVATE DEFINITIONS

SMTD_Private_SanityChecksToPerform = #(
#(SMTD_Private_SanityCheckFunctions.CheckFilmFrameRate, #fix, “Frame Rate is NOT 24 fps!”, SMTD_Private_RepairFunctions.FixFilmFrameRate, true), --add comma to the line
#(SMTD_Private_SanityCheckFunctions.CheckPoolNotNone, #fix, “Pool name is set to ‘none’!”, SMTD_Private_RepairFunctions.FixPoolNotNone, true) --new check
)–end checks array

)–End File
[/code]

Superb. Cheers guys. Working that through it all seems to make sense and was quite helpful to see how these are put together. A lot of potential here! Can think of so many good checks that we can do.

ignore! problem solved.