Closed justus-hildebrand closed 1 year ago
Dear Justus, you are right that Blender2Helios uses collections (bpy.data.collections). This happens here: https://github.com/neumicha/Blender2Helios/blob/61d65fa9446a50ad0f52e5e948c1613e08b005e9/Blender2Helios.py#L153 A few lines later it loops through the objects of the current collection: https://github.com/neumicha/Blender2Helios/blob/61d65fa9446a50ad0f52e5e948c1613e08b005e9/Blender2Helios.py#L156
The reason why I used the collections is that most users may see them as the easiest way to "group" objects. By putting multiple objects into one collection, Blender2Helios is able (if enabled in the settings) to override the materials. Example: The exported obj file of a car gets the material "car" as it belonged to the collection "car". By exploiting this we can create semantically labeled point clouds with Helios.
Does this information help? Maybe you know a better and user-friendly way to "group" semantically similar objects?
Anyway, possible solutions for you:
collection_name
and just use one loop for the objects. The collection_name
is only used in the export path etc.
I'm trying to convert this file to benchmark HELIOS: blender classroom demo scene
While trying to run the blender2helios export, the script crashes when accessing objects in scenes that are not currently selected. This hints that the script does not access the current scene's object tree but instead the file's object collection.
Is this intended or should it only go over
context.scene.objects
or maybecontext.view_layer.objects
?