adizanni / ExportToHASS

Sweethome3D Plugin for Home Assistant Export
GNU General Public License v3.0
52 stars 5 forks source link

Room names are not being used in the exported obj/mtl/json #10

Closed ndbroadbent closed 2 years ago

ndbroadbent commented 2 years ago

Hello,

I'm not sure if this is a problem with Sweet Home 3D or the ExportToHASS plugin. I've given my rooms some names in the properties, but my home.json just contains:

 "room_0_1" : { "object_id": "room_0_1" },
 "room_1_1" : { "object_id": "room_1_1" },
 "room_2_1" : { "object_id": "room_2_1" },
 "room_3_1" : { "object_id": "room_3_1" },
 "room_4_1" : { "object_id": "room_4_1" },
 "room_4_2" : { "object_id": "room_4_2" },
 "room_5_1" : { "object_id": "room_5_1" },
 "room_5_2" : { "object_id": "room_5_2" },
 "room_6_1" : { "object_id": "room_6_1" },
 "room_6_2" : { "object_id": "room_6_2" },
 "room_7_1" : { "object_id": "room_7_1" },
 "room_7_2" : { "object_id": "room_7_2" },
 ...
Screen Shot 2022-09-09 at 12 48 37 AM

It's hard to figure out the room numbers without these names.

I think this might be limitation with Sweet Home 3D since the normal "Export to OBJ Format" doesn't use the room names either.

Is there any way I can update these floor IDs? Thank you!

ndbroadbent commented 2 years ago

Ah, I just realized that I can double click on the floors and it will show me their object ID. So no need for any changes, I can work with this!

Screen Shot 2022-09-09 at 1 18 41 AM
adizanni commented 2 years ago

It is a good suggestion for a plugin enhancement. Bare in mind that in three.js the objects are not typed they are all meshes. The room_0_1 mesh is the floor of the room.