LDView Using CommandLinesList and ExportFile


RE: Using CommandLinesList and ExportFile
#2
(2021-02-23, 21:11)Bertrand Lequy Wrote: the first one is that the pov file I get using command line with ExportFile is not the same I get using the same command line  and manual export.

Case 1 :

Code:
D:\Installations\LDRAW\LDView64\LDView64.exe D:\LEGO\Python\data\3001.ldr -DefaultLatitude=20 -DefaultLongitude=45 -WindowWidth=504 -WindowHeight=563 -ExportFile=D:\LEGO\Python\data\3001.pov

vs :

Case 2 :

Code:
D:\Installations\LDRAW\LDView64\LDView64.exe D:\LEGO\Python\data\3001.ldr -DefaultLatitude=20 -DefaultLongitude=45 -WindowWidth=504 -WindowHeight=563

Of course, the second line give me exactly what I want in the LDView window.

they're only two differences :

the first line of the header is not the same (it's not a problem, but it's strange)

Case 1 :
Code:
// Generated By: LDView Copyright (C) 2018 Travis Cobbs & Peter Bartfai
vs :

Case 2 :
Code:
// Generated By: LDView 4.3 Copyright (C) 2018 Travis Cobbs & Peter Bartfai

This is a bug (although obviously relatively minor). When setting things up for the command line, it skips the step where it figures out what version of LDView is being used to generate the POV file. I should be able to fix this fairly easily. The POV generation code is shared by the Windows, Mac and Qt versions of LDView, and doesn't know what the application version is. The code that injects that version into the POV section isn't being run when generating a POV from the command line.


(2021-02-23, 21:11)Bertrand Lequy Wrote: the camera settings are wrong in case 2 :

Case 1 :
Code:
#declare LDXCameraLoc = < 447.158142,-351.187286,-446.14975 >;    // Camera Location vector
#declare LDXCameraLookAt = < 4.58077876387164906191,10.17561232900345657981,-3.57247258550586366255 >;    // Camera look-at point vector
#declare LDXCameraSky = < -0.35355329881115843405,-0.86602543005723520153,0.35355341802042911103 >;    // Camera sky vector (<0,-1,0> will usually work for standard "up")
vs :

Case 2 :
Code:
#declare LDXCameraLoc = < 707.842224,-354.348816,-707.842224 >; // Camera Location vector
#declare LDXCameraLookAt = < 2.24497200047949263535,8.84444866651756456122,-2.24497200047949263535 >; // Camera look-at point vector
#declare LDXCameraSky = < -0.24184478580022841787,-0.93969260886871053273,0.24184478580022841787 >; // Camera sky vector (<0,-1,0> will usually work for standard "up")

Obviously, in the first case, the camera is too close and my renders are cropped. I bypass the problem by tweaking LDXCamAspect and angle, but the result is not what I want and what I've set up. I can go with it for now, but it's strange.

What you describe sounds like it is "works as designed". (In other words, good or bad, I think it is doing what I intended it to do.) The WindowWidth and WindowHeight settings are ignored for command line exports. You should instead use SaveWidth and SaveHeight. Additionally, I suspect that you have LDView's POV Aspect Ratio setting set to "Current LDView aspect ratio". You may or may not want it to be set to this. If you set it to Automatic, the POV aspect ratio will always match the aspect ratio of the image you instruct POV to generate.


(2021-02-23, 21:11)Bertrand Lequy Wrote: The other problem is that I'm not able to use the -commandLinesList functionnality.

I've created a file  named commandlist.txt :
Code:
Common: -DefaultLatitude=20 -DefaultLongitude=45 -WindowWidth=504 -WindowHeight=563
D:\LEGO\Python\data\3001.ldr -ExportFile=D:\LEGO\Python\data\3001.pov
D:\LEGO\Python\data\3002.ldr -ExportFile=D:\LEGO\Python\data\3002.pov
D:\LEGO\Python\data\3003.ldr -ExportFile=D:\LEGO\Python\data\3003.pov
D:\LEGO\Python\data\3002.ldr -ExportFile=D:\LEGO\Python\data\3004.pov
D:\LEGO\Python\data\3002.ldr -ExportFile=D:\LEGO\Python\data\3005.pov
D:\LEGO\Python\data\3002.ldr -ExportFile=D:\LEGO\Python\data\3006.pov
D:\LEGO\Python\data\3002.ldr -ExportFile=D:\LEGO\Python\data\3007.pov
D:\LEGO\Python\data\3002.ldr -ExportFile=D:\LEGO\Python\data\3008.pov

My command line is :
Code:
D:\Installations\LDRAW\LDView64\LDView64.exe -CommandLinesList=D:\LEGO\Python\data\commandlist.txt

LDview just pop up like usualy, asking me to open a file. I'm lost.

I'm not sure what is going on here; I'll have to test. Your commandlist.txt file works for me on my Mac after I edit the filenames to be valid for my Mac. The behavior you describe is what would happen if LDView cannot find any of the files you are specifying (D:\LEGO\Python\data\3001.ldr, etc.), or if it cannot find D:\LEGO\Python\data\commandlist.txt. Basically, during startup, it tries to determine if there is anything on the command line requesting snapshots or exports. If is successfully generates any snapshots or exports, it then simply exits. If not, it runs as normal, which seems to be what you are seeing. I'll test in Windows to see if I somehow broke the CommandLinesList functionality there.

As an aside, I do notice that you have an apparent copy-and-paste error, in that only the first three LDR filenames match the target POV filenames, and the rest reuse 3002.ldr.
Reply
« Next Oldest | Next Newest »



Messages In This Thread
RE: Using CommandLinesList and ExportFile - by Travis Cobbs - 2021-02-24, 0:26

Forum Jump:


Users browsing this thread: 1 Guest(s)