I’m new to Blender AND to Python so it’s a double punishment I’ve got here. :evilgrin:
I’ve got a world map in a blender file and I want to export all the meshes (==countries) in independant files in order to access them with Unity3D (because in Unity, we can’t, by script, access the meshes from the imported .blend file)
Thanks for your help!
You were right, that error came because the .blend file was not saved!
I did 2 other tests with .blend saved and it still didn’t work well.
First test, by batching the origin cube and 2 spheres I added (without a material). The only fbx saved after the batch with the unity addon was the one with the origin cube.
Second test with my map made by several meshes representing the countries.
I get that error :
Traceback (most recent call last):
File “<Blender_console>”, line27, in execute
File “C:Program Files\Blender Foundation\Blender\2.7.5\scripts\modules\bpy\ops.py”, line 189, in__call__ ret = op_call(self.idname_py(), None, kw)
RuntimeError: Operator bpy.ops.object.mode_set.poll() failed, context is incorrect
location: <unknown lication>:-1
I don’t think I’ll try anymore soon because i found a way, in Unity, to access all the meshes indenpendantly by using createAsset.
This allows me to save each meshes from the .blend file from the unityEditor , and it makes me be able to use them afterwards, on runtime.
But if someone get a solution about that new error, it could still be very handy.