jonahhawk
05-14-2009, 10:47 PM
How do I set the isNetRender flag/option/condition of the preRender Callbacks.addscript?
From the Help:
#preRender: Array
Sent before rendering is started. This notification is sent out before the renderer creates the render instance objects, which means that you can create nodes and other objects as a response to this event. When rendering multiple frames, this event is sent only once at the beginning of the rendering phase, and not on a per-frame basis. In the #preRender callback, you can't change any of the render parameters (height, width, aliasing, etc) and affect the current render sessions. Those parameters have already been set up internally in 3ds Max, and so changes to them won't occur until the next render session occurs.
Returns a 28 element array - see the SDK help file, class RendParams, for more information on the parameter definitions.
1 - Name - rpar->rendType
2 - Boolean - rpar->isNetRender
3 - Boolean - rpar->fieldRender
4 - Integer - rpar->fieldOrder
5 - Time - rpar->frameDur
6 - Boolean - rpar->colorCheck
7 - Integer - rpar->vidCorrectMethod
8 - Integer - rpar->ntscPAL
9 - Boolean - rpar->superBlack
10 - Integer - rpar->sbThresh
11 - Boolean - rpar->rendHidden
12 - Boolean - rpar->force2Side
13 - Boolean - rpar->inMtlEdit
14 - Float - rpar->mtlEditTile
15 - Boolean - rpar->mtlEditAA
16 - Boolean - rpar->multiThread
17 - Boolean - rpar->useEnvironAlpha
18 - Boolean - rpar->dontAntialiasBG
19 - Boolean - rpar->useDisplacement
20 - Boolean - rpar->useRadiosity
21 - Boolean - rpar->computeRadiosity
22 - TextureMap - rpar->envMap
23 - Time - rpar->firstFrame
24 - Integer - rpar->scanBandHeight
25 - Integer - rpar->extraFlags
26 - Point2 - rpar->width, rpar->height
27 - Boolean - rpar->filterBG
28 - Boolean - rpar->alphaOutOnAdditive
Having Scene Explorers open when netRendering to nodes running BB as a service, crash on opening the scene.
My Script:
fn closeAllSceneExplorers =
(
for i = 1 to SceneExplorerManager.GetExplorerCount() do
(
theName = SceneExplorerManager.GetExplorerName i
SceneExplorerManager.CloseExplorer theName
)
)
fn openAllSceneExplorers =
(
for i = 1 to SceneExplorerManager.GetExplorerCount() do
(
theName = SceneExplorerManager.GetExplorerName i
SceneExplorerManager.OpenExplorer theName
)
)
callbacks.addscript #preRender "closeAllSceneExplorers()"
callbacks.addscript #postRender "openAllSceneExplorers()"
callbacks.addscript #preSystemShutdown "closeAllSceneExplorers()"
From the Help:
#preRender: Array
Sent before rendering is started. This notification is sent out before the renderer creates the render instance objects, which means that you can create nodes and other objects as a response to this event. When rendering multiple frames, this event is sent only once at the beginning of the rendering phase, and not on a per-frame basis. In the #preRender callback, you can't change any of the render parameters (height, width, aliasing, etc) and affect the current render sessions. Those parameters have already been set up internally in 3ds Max, and so changes to them won't occur until the next render session occurs.
Returns a 28 element array - see the SDK help file, class RendParams, for more information on the parameter definitions.
1 - Name - rpar->rendType
2 - Boolean - rpar->isNetRender
3 - Boolean - rpar->fieldRender
4 - Integer - rpar->fieldOrder
5 - Time - rpar->frameDur
6 - Boolean - rpar->colorCheck
7 - Integer - rpar->vidCorrectMethod
8 - Integer - rpar->ntscPAL
9 - Boolean - rpar->superBlack
10 - Integer - rpar->sbThresh
11 - Boolean - rpar->rendHidden
12 - Boolean - rpar->force2Side
13 - Boolean - rpar->inMtlEdit
14 - Float - rpar->mtlEditTile
15 - Boolean - rpar->mtlEditAA
16 - Boolean - rpar->multiThread
17 - Boolean - rpar->useEnvironAlpha
18 - Boolean - rpar->dontAntialiasBG
19 - Boolean - rpar->useDisplacement
20 - Boolean - rpar->useRadiosity
21 - Boolean - rpar->computeRadiosity
22 - TextureMap - rpar->envMap
23 - Time - rpar->firstFrame
24 - Integer - rpar->scanBandHeight
25 - Integer - rpar->extraFlags
26 - Point2 - rpar->width, rpar->height
27 - Boolean - rpar->filterBG
28 - Boolean - rpar->alphaOutOnAdditive
Having Scene Explorers open when netRendering to nodes running BB as a service, crash on opening the scene.
My Script:
fn closeAllSceneExplorers =
(
for i = 1 to SceneExplorerManager.GetExplorerCount() do
(
theName = SceneExplorerManager.GetExplorerName i
SceneExplorerManager.CloseExplorer theName
)
)
fn openAllSceneExplorers =
(
for i = 1 to SceneExplorerManager.GetExplorerCount() do
(
theName = SceneExplorerManager.GetExplorerName i
SceneExplorerManager.OpenExplorer theName
)
)
callbacks.addscript #preRender "closeAllSceneExplorers()"
callbacks.addscript #postRender "openAllSceneExplorers()"
callbacks.addscript #preSystemShutdown "closeAllSceneExplorers()"
