Print at Dec 17, 2025, 5:47:34 AM

Posted by Puybaret at Feb 8, 2017, 4:05:28 PM
Re: Rendering on Windows Server 2008 Possible?
Under Windows, you must replace : separators by ;

About rendering photos at the stored points of view returned by the method getStoredCameras in Home class, you could replace the following two lines in ConsolePhotoGenerator.java:

renderer.render(image, home.getCamera(), null);
ImageIO.write(image, homePhoto.substring(homePhoto.lastIndexOf('.') + 1), new File(homePhoto));

by:

for (Camera camera : home.getStoredCameras()) {
renderer.render(image, camera, null);
int dotIndex = homePhoto.lastIndexOf('.');
String cameraPhoto = homePhoto.substring(0, dotIndex) + "-"
+ camera.getName().replaceAll("/|\\\\|:|;", "-").replace(File.pathSeparatorChar, '-').replace(File.separatorChar, '-')
+ homePhoto.substring(dotIndex);
ImageIO.write(image, homePhoto.substring(dotIndex + 1), new File(cameraPhoto));
}

and you should import com.eteks.sweethome3d.model.Camera class.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator