Skip to main content
replaced http://blender.stackexchange.com/ with https://blender.stackexchange.com/
Source Link

By using the addon I added to your other questionother question you can create a bounding box that has the dimensions that you can easily export to a text file.

If you want to export an individual bounding box for each object you can enable the addon and run the following -

startobjs = [o.name for o in bpy.context.selected_objects]

for objname in startobjs:
    bpy.ops.object.select_all(action='DESELECT')
    bpy.data.objects[objname].select = True
    bpy.ops.mesh.boundbox_add()

As the addon names each bounding box with the name BoundingBox you can easily select just the bounding boxes (using select pattern in the select menu) and then export the selected objects.

enter image description here

Then when you export turn on the selected only option available in most exporters. If your using your own script to export to text then loop over the selected objects.

for obj in bpy.context.selected_objects:
    print(obj.dimensions.x)

By using the addon I added to your other question you can create a bounding box that has the dimensions that you can easily export to a text file.

If you want to export an individual bounding box for each object you can enable the addon and run the following -

startobjs = [o.name for o in bpy.context.selected_objects]

for objname in startobjs:
    bpy.ops.object.select_all(action='DESELECT')
    bpy.data.objects[objname].select = True
    bpy.ops.mesh.boundbox_add()

As the addon names each bounding box with the name BoundingBox you can easily select just the bounding boxes (using select pattern in the select menu) and then export the selected objects.

enter image description here

Then when you export turn on the selected only option available in most exporters. If your using your own script to export to text then loop over the selected objects.

for obj in bpy.context.selected_objects:
    print(obj.dimensions.x)

By using the addon I added to your other question you can create a bounding box that has the dimensions that you can easily export to a text file.

If you want to export an individual bounding box for each object you can enable the addon and run the following -

startobjs = [o.name for o in bpy.context.selected_objects]

for objname in startobjs:
    bpy.ops.object.select_all(action='DESELECT')
    bpy.data.objects[objname].select = True
    bpy.ops.mesh.boundbox_add()

As the addon names each bounding box with the name BoundingBox you can easily select just the bounding boxes (using select pattern in the select menu) and then export the selected objects.

enter image description here

Then when you export turn on the selected only option available in most exporters. If your using your own script to export to text then loop over the selected objects.

for obj in bpy.context.selected_objects:
    print(obj.dimensions.x)
Source Link
sambler
  • 55.8k
  • 3
  • 62
  • 193

By using the addon I added to your other question you can create a bounding box that has the dimensions that you can easily export to a text file.

If you want to export an individual bounding box for each object you can enable the addon and run the following -

startobjs = [o.name for o in bpy.context.selected_objects]

for objname in startobjs:
    bpy.ops.object.select_all(action='DESELECT')
    bpy.data.objects[objname].select = True
    bpy.ops.mesh.boundbox_add()

As the addon names each bounding box with the name BoundingBox you can easily select just the bounding boxes (using select pattern in the select menu) and then export the selected objects.

enter image description here

Then when you export turn on the selected only option available in most exporters. If your using your own script to export to text then loop over the selected objects.

for obj in bpy.context.selected_objects:
    print(obj.dimensions.x)