ross-g / io_pdx_mesh

Import/Export files for the Clausewitz game engine
GNU General Public License v3.0
81 stars 11 forks source link

CK3 select_all Error #17

Closed zumbak04 closed 3 years ago

zumbak04 commented 3 years ago

I was playing around loading and exporting CK3 vanilla models for testing purposes when I came across a problem.

Errors ``` Operator bpy.ops.object.select_all.poll() failed, context is incorrect Traceback (most recent call last): File "C:\Users\zumba\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\io_pdx_mesh\pdx_blender\blender_ui.py", line 516, in execute merge_verts=self.chk_merge File "C:\Users\zumba\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons\io_pdx_mesh\pdx_blender\blender_import_export.py", line 1245, in export_meshfile bpy.ops.object.select_all(action='DESELECT') File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\modules\bpy\ops.py", line 201, in __call__ ret = op_call(self.idname_py(), None, kw) RuntimeError: Operator bpy.ops.object.select_all.poll() failed, context is incorrect location: :-1 ``` ![image](https://user-images.githubusercontent.com/46384992/98468426-cb820f00-21f3-11eb-9489-53ab7448f0c4.png)

I was able to load this model and export without problems yesterday, but these errors appeared today and I have no idea why.

Model Itself and Interface ![image](https://user-images.githubusercontent.com/46384992/98468460-f79d9000-21f3-11eb-81e6-9dd9031b5c27.png)

I'll attach meshes I'm trying to export. prophet_shield.zip

ross-g commented 3 years ago

Hey, thanks for the detailed report! This is just a small bug which I have now fixed. You just need to make sure you export in "Object" mode and not in "Edit Mesh" mode.

ross-g commented 3 years ago

This is now fixed in the newest release. (https://github.com/ross-g/io_pdx_mesh/commit/2af4c48320d0a7d213915b3ea7e0d9e07f1a7abb)