Re: [script] CaptureViewport aborts without error
| Date : Thu, 07 Dec 2006 11:18:28 +0100 |
| To : XSI(at)Softimage.COM |
| From : André Adam <a_adam(at)49games.de> |
| Subject : Re: [script] CaptureViewport aborts without error |
Hi Bernard,
below is a code snippet taken from a more complex capture script of mine. Perhaps you can spot a relevant difference compared to your approach...
Cheers, and good luck!
-André
function fCreateView(){ SetViewCamera ("Camera", 1); SetDisplayMode("Camera", "textured"); SetValue("Camera.camera.std", 0); SetValue("Camera.camera.aspect", 1.3333); SetValue("Camera.camera.pixelratio", 1); SetValue("Camera.camvis.gridvis", true); SetValue("Camera.camvis.objlights", false); SetValue("Camera.camvis.objcameras", false); SetValue("Camera.camvis.objnurbssrf", true); SetValue("Camera.camvis.objpolymesh", true); SetValue("Camera.camvis.objimpgeometry", false); SetValue("Camera.camvis.objcurves", true); SetValue("Camera.camvis.objparticles", false); SetValue("Camera.camvis.objhair", false); SetValue("Camera.camvis.objnulls", false); SetValue("Camera.camvis.objctrltransfogroups", false); SetValue("Camera.camvis.objctrlchnjnts", false); SetValue("Camera.camvis.objctrlchnroots", false); SetValue("Camera.camvis.objctrlchneff", false); SetValue("Camera.camvis.objctrllattices", false); SetValue("Camera.camvis.objctrltextsupp", false); SetValue("Camera.camvis.objctrlwaves", false); SetValue("Camera.camvis.objctrlother", false); SetValue("Camera.camvis.objinstances", false); SetValue("Camera.camvis.constructionlevel", false); SetValue("Camera.camvis.gridaxisvis", false); SetValue("Camera.camdisp.headlight", true); SetValue("Camera.camdisp.headlight_intensity", 1); SetValue("Camera.camdisp.headlight_azimuth", 0); SetValue("Camera.camdisp.headlight_elevation", 15); }
function fCreateCaptureOptions(oName, oFormat, oAA, oWidth, oHeight, oStart, oEnd){
Dictionary.GetObject("ViewportCapture.FileName").Value = "Render_Pictures\\" + oName + oFormat;
Dictionary.GetObject("ViewportCapture.Padding").Value = "(fn).#(ext)";
Dictionary.GetObject("ViewportCapture.ImageWidth").Value = oWidth;
Dictionary.GetObject("ViewportCapture.ImageHeight").Value = oHeight;
Dictionary.GetObject("ViewportCapture.ImageScale").Value = 1;
Dictionary.GetObject("ViewportCapture.UserPixelRatio").Value = false;
Dictionary.GetObject("ViewportCapture.FrameRate").Value = 25;
Dictionary.GetObject("ViewportCapture.WriteAlpha").Value = true;
Dictionary.GetObject("ViewportCapture.CaptureAudio").Value = false;
Dictionary.GetObject("ViewportCapture.Start").Value = oStart;
Dictionary.GetObject("ViewportCapture.End").Value = oEnd;
Dictionary.GetObject("ViewportCapture.LaunchFlipbook").Value = false;
Dictionary.GetObject("ViewportCapture.UseNativePlayer").Value = false;
Dictionary.GetObject("ViewportCapture.IsMovie").Value = false;
if(oAA){
Dictionary.GetObject("ViewportCapture.OpenGLAntiAliasing").Value = 4;
}
else{
Dictionary.GetObject("ViewportCapture.OpenGLAntiAliasing").Value = 1;
}
Dictionary.GetObject("ViewportCapture.CustomTimeRange").Value = false;
}
fCreateView();
fCreateCaptureOptions(oParamName, oParamFFormat, oParamAA, oParamWidth, oParamHeight, oParamStart, oParamEnd);
CaptureViewport(2);
Bernard Lebel wrote:
Hello,
Trying to script viewport captures, using the CaptureViewport() command. This is done in XSI, not XSIBATCH.
First, I set the parameters, then run the command. The capture actually starts, but aborts at the very first frame, without any error being logged. This happens no matter if the "interactive" argument is true or false.
If I do the exact same thing manually (by selected Start Capture... in the camera menu), that is, same parameters, same output, and so on, no problem at all.
A colleagues suggested that there might be a UI refresh problem, so I tried the Refresh() command, the Desktop.RedrawUI() method, and also increasing the scene root dirty count by one. To no avail.
I also tried changing the output location, no success.
Any idea?
Thanks Bernard
--- Unsubscribe? Mail Majordomo(at)Softimage.COM with the following text in body: unsubscribe xsi
- References:
- [script] CaptureViewport aborts without error
- From: "Bernard Lebel" <3dbernard(at)gmail.com>
- [script] CaptureViewport aborts without error
| DATE: | << | >> | THREAD: | << | >> | INDEX: | Main | Thread |
|---|
- Previous by Date: RE: Softimage MR Price Politics
- Next by Date: RE: Softimage MR Price Politics
- Previous by Thread: RE: Softimage MR Price Politics
- Next by Thread: RE: Softimage MR Price Politics
- Index(es):
| Search the XSI List archives here or use the advanced search form to search across mailing lists. Searching help is available. |