|
Sweet Home 3D Forum » List all forums » » Forum: Wishlist » » » Thread: Keep folder structure intact » » » » Post: Re: Keep folder structure intact |
Print at Dec 17, 2025, 10:34:25 AM |
| Posted by Keet at Jun 19, 2025, 1:56:29 PM |
|
Re: Keep folder structure intact It looks like you understand how objects are organized inside a .sh3d project file. For others a little expansion on this. This is a definition in the Home.xml file in the .sh3d file. It defines a model that is added to the project and it describes exactly what you see in your 2D and 3D views. <pieceOfFurniture id='pieceOfFurniture-9ba18dbf-8b8f-4788-bf3f-30328b35a1fc' level='level-de4bbef8-27e5-41fc-8f1a-ce81a27ae213' name='Cable' model='61/Cable.obj' icon='59' x='28.017944' y='-8.1' elevation='21.6' width='74.1501' depth='3.0' height='52.11289' modelSize='66014'>Let's split that up: <pieceOfFurniture Start of object definition id='pieceOfFurniture-9ba18dbf-8b8f-4788-bf3f-30328b35a1fc' Sets a unique id for the object level='level-de4bbef8-27e5-41fc-8f1a-ce81a27ae213' Id of the level at which the object resides name='Cable' The name of the object model='61/Cable.obj' The subdirectory inside the .sh3d file where the object resides ("61") and its OBJ filename ("Cable.obj") icon='59' The thumbnail icon in the model list x='28.017944' y='-8.1' elevation='21.6' Position and elevation width='74.1501' depth='3.0' height='52.11289' The bounding box dimensions of the object modelSize='66014' The model size (bytes) > <material name='Cable' color='FF1969CC'/> A material that may differ from what is in the MTL file of the object </pieceOfFurniture> End of object definition Notice that <material > is a child node of <pieceOfFurniture > and not one of the attributes of <pieceOfFurniture >. It has its own attributes "name" and "color". Depending on the type of object more or different attributes are possible and depending on the materials there can be more lines with <material > or other child nodes. When you load a project each object is loaded from the subdirectory with the OBJ andf MTL files. Those files do not change when you change material or resize an object. Those changes are save in the <pieceOfFurniture> definition. When you first add a model to your project that definition will reflect the original values as read from the OBJ and MTL files. The important thing to remember is the difference between the stored object and the definition in the Home.Xml file. In the subdirectory the original model remains untouched where the definition in the Home.xml file decribes how you made it look in your plan with changed colors, sizes, etc. When you have lost a model but you know you have it somewhere in a project you can extract the model from its subdirectory to restore your lost object. Of course you can also export it but that will be including the changes you made in the project, not the original model. ---------------------------------------- Dodecagon.nl 1300+ 3D models, manuals, and projects |
|
|
Current timezone is GMT Dec 17, 2025, 10:34:25 AM |