BabylonJS / BabylonJS/BlenderExporter

Exception: error, no selected mesh objects

Open
#15 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
308
Forks
57
PR merge metrics
No merged PRs in 30d

Description

Hi guys, I got this trying to export my scene in blender 2.81 (first time I tried the tool). It exported a bunch of images, but for some reason the mesh part fails it seems.

```
Traceback (most recent call last):
File "/home/james/.config/blender/2.81/scripts/addons/babylon_js/__init__.py", line 65, in execute
exporter.execute(context, self.filepath)
File "/home/james/.config/blender/2.81/scripts/addons/babylon_js/json_exporter.py", line 111, in execute
mesh = Mesh(object, scene, self)
File "/home/james/.config/blender/2.81/scripts/addons/babylon_js/mesh.py", line 146, in __init__
recipe = BakingRecipe(bpyMesh, exporter)
File "/home/james/.config/blender/2.81/scripts/addons/babylon_js/materials/baking_recipe.py", line 105, in __init__
self.bakedMaterial.bake(bpyMesh, self)
File "/home/james/.config/blender/2.81/scripts/addons/babylon_js/materials/material.py", line 138, in bake
bpy.ops.uv.smart_project(angle_limit = 66.0, island_margin = 0.0, user_area_weight = 1.0, use_aspect = True, stretch_to_bounds = True)
File "/home/james/Downloads/blender-2.81-linux-glibc217-x86_64/2.81/scripts/modules/bpy/ops.py", line 201, in __call__
ret = op_call(self.idname_py(), None, kw)
RuntimeError: Error: Traceback (most recent call last):
File "/home/james/Downloads/blender-2.81-linux-glibc217-x86_64/2.81/scripts/startup/bl_operators/uvcalc_smart_project.py", line 1032, in execute
self.stretch_to_bounds,
File "/home/james/Downloads/blender-2.81-linux-glibc217-x86_64/2.81/scripts/startup/bl_operators/uvcalc_smart_project.py", line 744, in main
raise Exception("error, no selected mesh objects")
Exception: error, no selected mesh objects

location: /home/james/Downloads/blender-2.81-linux-glibc217-x86_64/2.81/scripts/modules/bpy/ops.py:201

location: :-1

```

I noticed there were no export settings. It said something about finding the settings in the properties panel

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the export in Blender 2.81, then trace the call from json_exporter.py through mesh.py, materials/baking_recipe.py, and materials/material.py to bpy.ops.uv.smart_project. Compare the exporter context with Blender's UV operator requirements; done means mesh export completes without the reported no-selected-mesh-objects exception while the scene's images still export.

Written by the indexing model from the issue text.

Assessment

Tech stack
blender, python
Domain
computer-graphics, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.