(2016-07-15, 11:44)Trevor Sandy Wrote: Thanks Travis!
I imagine the ability to generate PoVRay renderings from the command line was not addressed in this update ?
I would like to replace the L3P module in LPub3D because is it not open source and there is no way to maintain it. If I could generate PoVRay images from the command line using LDView, it would be possible to replace L3P.
If you care to describe an efficient approach to incorporating PoVRay image generation via the command line, I could take a look at building an LPub3D version of LDView with this capability.
Cheers,
I assume by "PoVRay renderings", you actually mean .pov file generation, because actually calling out to POV from LDView doesn't seem like a good idea.
Command line access to the export commands was very high on my to-do list, but as I mentioned, it's unlikely I'll be doing any future releases at all, so that doesn't help you much.
If you want to implement it yourself, I wouldn't expect it to be
too difficult. One problem is that it would be kicked off from platform-specific code. If you search the code tree for LDSnapshotTaker::doCommandLine, you'll find where the command line snapshot handling happens. Peter Bartfai has already indicated his willingness to continue to maintain the Qt port, so if you get Windows working, he can do Qt, and I can probably do the Mac part.
You would need to add code to recognize a new command line option to perform an export, and then either create a new class with a doCommandLine function to take care of performing the export, or add a function onto LDrawModelViewer. (The LDrawModelViewer object would definitely be necessary, since LDrawModelViewer::exportCurModel is what you're going to want to call to perform the export.) If you just have a new command equivalent to -SaveSnapshot, then you would have to determine the export type from the file extension. If you also want to have the equivalent of -SaveSnapshots, then you'd need a command line option to set the export type.
Please note that even though LDView is potentially abandoned, I moved its source tree (with full change history from the old CVS repository) to github:
https://github.com/tcobbs/ldview
SourceForge angered me with crap they pulled in the last few years, and I didn't want to leave it there. They claim they are now better, but I'm not sure I trust them not to stray again in the future. Additionally, CVS is becoming more and more difficult to install and use, so a switch to a more modern SCM was very much overdo.
If you're really interested, I'd be willing to give you push access to the new github tree. You'll have to let me know your github user ID for me to do that. (If you don't already have one, you'll have to create one.) Further details, plus any Q&A, would better be taken care of via email.