The CameraBagPlugin (as in bag for carrying cameras) adds two menu items to the tools menu:
Export Cameras - exports all saved points of view to a CSV file
Import Cameras - imports points of view from a CSV file, possible overwriting existing ones with the same name
The CSV files have a self describing header with the column names:
name,
x,y,z,
pitch,
yaw,
fov,
time,
cameraType,
viewType,
* observerSizeType
Of those listed the time (date-time) is most useful. I use it to quickly generate multiple versions of the same viewpoint for different days of the year (in order to examine sun/shading issues). The date-time is exported for the local zone. Fov (field of view) is in degrees.
Being a new plugin it might be wise to initially treat with some caution - for example, you could refrain from saving a model that you've imported cameras into (that would be very safe).
Fixed a problem with import which put it out of alignment with export. I need to add more error feedback for such situations.
Added error checking and reporting on unparsable times, numbers, wrong number of fields.
SH3D normally limits the number of cameras to 50. On import, if more than 50 cameras are imported, the importer will now pop up a dialog and ask if the limit should be ignored (added this because I wanted to generate more than 50 images for timelapse purposes). Note if you ask SH3D to store a location, it will truncate the list back to 50 and you will then have to reimport to restored any in excess of the limit.
Until 29 Nov 2020 the 1.0 plugin file was attached instead of the 1.5 version. The attachment is now the correct 1.5 version. Sorry for any confusion caused.
Last edit: mchnz 2020-11-28
thanks
Hello All
I tried to import 96 Cameras using v1.5 of the Plug, however SH3D limited the number of cameras to only 50 ! (Cameras list attached)
Any Advice ?
Thank You
The file 96-Cameras.csv you've attached seems to be missing the last column, the observerSizeType. After adding an observeSizeType of variableSize to all the rows I find my plugin can import all 96 camera-positions and I can use Multiple Photo Rendering v1.9 to select any of them for render (SH3D version 6.4). For reference I've attached a corrected 96-Cameras.csv.
Note, as per previous note from 2019-04-07, you cannot save your SH3D model with all 96 locations. During any save SH3D will be truncate them back to 50, so you must manually reload them into any SH3D session that needs them.
Cheers,
Michael
Hi Michael
I've tested both old & new 96-Cameras.csv on:
SH3D v6.4.2 + Multiple Photo Rendering v1.9 and
SH3D v6.4.2 + Multiple Photo Rendering v2.0
still neither worked, Am I missing anything ?
Much appreciated
Vic
Given the plugin is reporting "Import 0 cameras" it would seem it is not even starting to read the file. If it had trouble with one or more lines I would expect to see a popup for each line it objected to. Could it be a Windows permission/file-location /file-format issue?
Perhaps from within SH3D you could you export and import some existing cameras just to test whether that works OK? If that works you could edit the exported file a little and see if that can be imported. At least then you'd know whether the plugin worked at all.
The version of the PhotoVideoRendering plugin shouldn't matter because you haven't made it that far. I'm currently using 1.9 in SH3D 6.4 (Linux 64 bit).
If I run SweetHome3D from a Linux console I see the debugging output from loading 96-Cameras.csv:
During the above load the attached popup would appear, and afterward the multi renderer would should show a very long list of cameras (also attached).
Last edit: mchnz 2020-11-27
On Windows 7 x64 the Plugin does work, however the Exported file is without the last column "variableSize". Import works only if the last column is omitted and to a maximum of 50 files.
I believe it's caused by Windows vs Linux. It's still usable, I only need to split the list file into 50 cameras each :-)
Cheers
Vic
Thanks for persisting with this. My apologies, you tripped over a mistake I made when uploading version 1.5 to sourceforge.
This morning I installed a fresh SH3D and the plugin in a fresh Windows10 virtual machine and discovered that an earlier version of the plugin was uploaded to sourceforge insead of the intended 1.5. I have amended the 1.5 posting and 1.5 attachment, if it is downloaded and reinstalled it now works as described.
I can only assume you and I are the only users of the plugin (or others silently gave up on it).
Note, the extra column is now required. If you have the wrong number of columns you will have to press OK for each line that is in error (something to improve on in the future).
Thanks again for providing feedback and persisting with the plugin, much appreciated :-)
Works Perfectly with the additional column also gives the Dialogue to exceed the 50 limit.
CTRL-A to Select All and SHIFT-Arrow to select in Multiple Photo Rendering would be nice :-)
Good news. Perhaps add a suggestion to the the MPR plugin or post in the Sweethome 3d forums.
Check Also >>>
https://sourceforge.net/p/sweethome3d/feature-requests/1007/
Hi,
I'm using a French SH3D implementation, the 2 actions "Export Cameras" and "Import Cameras" are placed under menu "Tools" whilst other tools are usually (in french implementation) under menu "Outils" . If you can manage to have them under "Outils" (for french implementation) it will be nicer rather than to have 2 menus Tools & Outils for same purpose
Best Regards and Thanks
Thanks for the feedback. I think I'd have to move the name of the target menu into the plugin's ApplicationPlugin.properties file and have the code look it up. Then I'd need a French version of the properties file (ApplicationPlugin_fr.properties) and maybe some code to find it. That's a quick guess. I'm not sure when I'll get around to looking at it, I'd need to dust off the source code and my java development environment. (Recently I've "internationalised" a python app, so at least I'm a bit more familiar with the issue.)
Same reflexion for your other plugins like "ChangeColorPlugin" and "GeneralChangeTexturePlugin"
Thanks for all your contributions
Best Regards
Sorry for the long delay. I managed to dust off my Java development environment and re-familiarize myself with the plugin's code.. See my latest post below for details.
All three plugins have been updated - and they're now all also at github.
Michael, Thanks a lot, they all work fine !
Happy new year !
Last edit: Emmanuel Puybaret 2023-12-31
I've attached a new version of the CameraBagPlugin with a ApplicationPlugin_fr.properties and changed the code to lookup the name of the menu in the properties file.
I've created a SH3D-CameraBagPlugin repository at github to better document and track the source code.
I used google to produce some translations, so the French might be mangled. Feel free to review and suggest amendments to the ApplicationPlugin_fr.properties file.
As well as here at sourceforge, I'll also tag and release at github, the current release is now v1.6 outils
I will be doing the same for my other plugins (as I find the time).