[Closed] Create Object in PreRenderScript doesn't work!?
Hi,
I’m trying to render a max scene via 3dsmaxcmd.exe:
3dsmaxcmd c: est.max
Everything’s fine so far. Max renders beautifully
Now:
The examples of 3dsmaxcmd.exe says:
To run a script before rendering (for example, to set up some scene objects):
3dsmaxcmd scene.max -preRenderScript:d:\sceneSetup.ms
But when I try to do exactly that
3dsmaxcmd c: est.max -preRenderScript:c:\simple.ms
with the “simple.ms” containing
b = box pos:[0,0,-20] width:5 height:5 length:5
Max renders the scene correctly, but without the box the script should have created.
But it does work, when I do it manually:
- Open 3ds Max
- open the scene file "c: est.max"
- check the Pre-Render-Script box in the 'common'-tab of the render dialog and providing the same script
- hitting "render" in Max
So I know, that the script and everything is working fine. But it doesn't seemed to be executed when doing the rendering through 3dsmaxcmd.exe.
I also tried it with
.... -preRenderScript:"c:\simple.ms"
(quotationmarks) …but no luck…
What am I doing wrong here?
Thanks a lot!
Uli
btw: in the end I want to create a camera via preRenderScript and render that camera. But in order to do that I tried to render a script-created-object first… and even that didn’t work…
Sorry, for some reason I didn’t search the forum this time before I posted.
Anyway – to share my conclusion:
with this code
box()
f = createFile "c:\ emp.txt"
format "yes!" to:f
close f
the box is not shown in the rendered image, but the file is written (thanks chib for the post)
So it obviously does not create objects
I will try a different approch then…
thanks for listening
uli
Max won’t allow for the creation of objects on rendertime. I have no direct page to refer to, but I’m 100% sure it cannot be done from script as pre-render callback. I think because the objects are already gathered by the renderer, only changing of parameters is allowed, but I’m guessing here.
-Johan