US
Joined: Feb 27, 2014
Post Count: 87
Status:
Offline
Re: 3D models specifications?
Actually, i look again in the SVG mini-manual that "okh" linked to, and i found the section on editing the properties text files, and it says the sh3f file is a zipped archive but it doesn't explain how to extract files. Do we just use 7Zip for this?
Joined: May 12, 2013
Post Count: 1545
Status:
Offline
Re: 3D models specifications?
An exact description of how to open a compressed library, extract the file, edit it and copy it back into the library, is almost impossible. It will depend on your system, configuration and tools available. But the general approach would go something like this: - Open the compressed library, *.sh3f, file with some zip tool (you may have to rename the file to *.zip temporarily) - Copy the *.properties file out of the library - Edit the copy with a text editor to add/change properties. - Copy the edited *.properties file back into the compressed library. - (rename the compressed library back to *.sh3f) - In SH3D, use Import Furniture Library.
But even such a general description may not be of too much use unless you already have some familiarity with how your file system works. In which case you probably don't need the description...
ok
PS Puybaret - I think a way of opening the "raw" .propeties file with/from the FurnitureLibraryEditor might be of help to some (I would use it), but whether it is worth the trouble (or makes sense) from development point of view, I really don't know. (And you would probably need a file back-up and restore procedure for small mishaps )
US
Joined: Feb 27, 2014
Post Count: 87
Status:
Offline
Re: 3D models specifications?
That's what i tried -- i used 7zip to extract just the .properties file, which worked, and i made my edits (watching the syntax very carefully). When i tried to add it back into the file, i got am error message that read something like "Could not allocate memory." (I'm using Windows XP.) So i re-did the extension to .zip, extracted everything in the whole sh3f with 7Zip into a separate folder, replaced the properties file with the edited one, and re-zipped it. Then i changed the extension back to .sh3f. I tried opening it with the FLE and it took a minute, but it wouldn't load the file, obviously because the compression was wrong or something...
Instead of having to edit this file directly, it would be better if we amped up the FLE features so we can add lights, etc, and edit the properties within a program. That way we don't have to be geeks that must know how to edit raw files. (I have a lot of lighting fixtures that i'd rather have lights installed in them; i'd like to avoid adding those invisible light sources.)
France
Joined: Nov 7, 2005
Post Count: 9420
Status:
Offline
Re: 3D models specifications?
I guess that 7zip compression algorithm is by default LZMA and not Deflate (the one of ZIP format). Either you find in 7zip how to change the algorithm, or use the other method that will uncompress/compress with the default ZIP utility available in all systems nowadays.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
US
Joined: Feb 27, 2014
Post Count: 87
Status:
Offline
Re: 3D models specifications?
I tried the Deflate algorithm (there was also a "Deflate64") but i could tell it wouldn't work because the resulting file size was way off. When i tried loading the .sh3f file, it wouldn't read it.
A tutorial by anyone who's had success in editing the zipped files would be helpful, even if you don't have accompanying graphics...
Joined: May 12, 2013
Post Count: 1545
Status:
Offline
Re: 3D models specifications?
I thought XP opened zip files directly (provided you have the right file association)? Did you try to rename your library to .zip and open? You would then need to copy the file out of the zipped directory and copy it back in after editing (Win will open files in a zipped directory based on a temporary copy, but dos not move the changed copy back into the compressed file). ok
US
Joined: Feb 27, 2014
Post Count: 87
Status:
Offline
Re: 3D models specifications?
OK. What association do i need to make? I did rename the sh3f extension to zip (because that's the only way 7Zip would apply its contextual menu to it). I then extracted opened the file directly from 7Zip, edited it, then when i tried to re-insert it, that's when the allocation memory error came up.
France
Joined: Nov 7, 2005
Post Count: 9420
Status:
Offline
Re: 3D models specifications?
What system do you run? If you use Windows, simply use Extract all menu item found in the contextual menu of any zip file.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
US
Joined: Feb 27, 2014
Post Count: 87
Status:
Offline
Re: 3D models specifications?
I was able to figure out how to get Windows to use its own archive methods to get into the .properties file.
As okh mentioned, reset the .sh3d extension to .zip. (You'll get a warning but a low it anyway.) Then right-click on the file and choose "Open with..." and then "Windows Explorer". Windows will then treat it like a folder and make everything editable. You can then either open the .properties file of your choice there, or extract it to the desktop and open it with Notepad or some other text editor.
After your edits, then save it back into the .zip folder, close it (it will be recompressed), and reset the extension to .sh3d. In okh's tutorial, he did casually note that it may not always work, and I hope someone can figure out how to make it work all the time (assuming of course the syntax is right).
For my case, the edit I made on the one fixture (I added a light source to a lamp) didn't work, because when the FLE listed all the fixtures, it read everything but simply ignored that entry, not even displaying the icon. I checked the syntax carefully and I didn't see a mistake.