STEAM GROUP
Blender Source Tools BleST
STEAM GROUP
Blender Source Tools BleST
339
IN-GAME
1,962
ONLINE
Founded
8 November, 2013
All Discussions > Help > Topic Details
elimin8 16 May, 2021 @ 11:27am
SMD export failure (various errors)
Hi, I've been having a huge headache attempting to compile https://blendswap.com/blend/24696 in SMD format using this blender addon. The chairs, windows and doors collections will not compile to SMD, mostly giving me the following error:
Python: Traceback (most recent call last): File "/home/x00010/.config/blender/2.92/scripts/addons/io_scene_valvesource/export_smd.py", line 218, in execute else: self.exportId(context, collection) File "/home/x00010/.config/blender/2.92/scripts/addons/io_scene_valvesource/export_smd.py", line 351, in exportId bake = self.bakeObj(ob) File "/home/x00010/.config/blender/2.92/scripts/addons/io_scene_valvesource/export_smd.py", line 714, in bakeObj duplis.append(self.bakeObj(dupli, generate_uvs = False)) File "/home/x00010/.config/blender/2.92/scripts/addons/io_scene_valvesource/export_smd.py", line 849, in bakeObj result.object = baked UnboundLocalError: local variable 'baked' referenced before assignment location: <unknown location>:-1
Or sometimes, it throws this error instead:
Python: Traceback (most recent call last): File "/home/x00010/.config/blender/2.92/scripts/addons/io_scene_valvesource/export_smd.py", line 218, in execute else: self.exportId(context, collection) File "/home/x00010/.config/blender/2.92/scripts/addons/io_scene_valvesource/export_smd.py", line 351, in exportId bake = self.bakeObj(ob) File "/home/x00010/.config/blender/2.92/scripts/addons/io_scene_valvesource/export_smd.py", line 699, in bakeObj select_only(id) File "/home/x00010/.config/blender/2.92/scripts/addons/io_scene_valvesource/utils.py", line 328, in select_only bpy.ops.object.mode_set(mode='OBJECT') File "/usr/share/blender/2.92/scripts/modules/bpy/ops.py", line 132, in __call__ ret = _op_call(self.idname_py(), None, kw) RuntimeError: Operator bpy.ops.object.mode_set.poll() failed, context is incorrect location: <unknown location>:-1
I cannot determine why it throws a different error sometimes.

I have attempted to delete several parts of the aforementioned collections, but it did not help me compile unfortunately. I am running blender 2.92 with source tools version 3.1.1, downloaded from github.
Additionally, I have attempted to compile the same model on my second linux machine as well as a windows machine of mine, all of which failed in exactly the same manner.
Last edited by elimin8; 16 May, 2021 @ 12:42pm
< >
Showing 1-4 of 4 comments
Pte Jack 16 May, 2021 @ 7:52pm 
6 armatures, 281 Mesh objects, 61 materials, Curves that need to be converted to mesh objects, Subdivision-subsurface modifiers, edge split modifiers, 128K + verts before the modifiers are applied, Drivers and shapekeys up the ying-yang. No wonder your having a problem compiling this thing.

StudioMdl can't handle something as complex as this, it has to be simplified to the extreme before it will compile. Materials alone are double the allowed amount of 32 mats.
Last edited by Pte Jack; 16 May, 2021 @ 7:53pm
elimin8 17 May, 2021 @ 12:20am 
I see, where could I find all of these limitations so I can ensure the model meets them in the future?
Artfunkel 24 May, 2021 @ 9:01am 
The exporter should be able to copy with models of any size, regardless of whether the engine will compile them. The errors should be fixable, I will investigate!
Pte Jack 24 May, 2021 @ 9:13am 
Artfunkel,
I've pulled this Bus to have a look at it and I have managed to export it.

The Context error is happening on instanced objects. There are 2 sets of passenger seats that are instanced, when exporting Blender crashed when trying to export them.

Also, this bus is fully rigged with a lot of shape key drivers, controlling various aspects of the armature to textures and emissions and mesh to adding Subsurf and bevel modifiers.

One shape key actually switches the entire bus from right hand drive (British/Japan) to left hand (North American).

Because of the way the model is pinned together using Empties, origin points are all over the map.

And the poles inside the bus are still Bezier curve that need to be converted to mesh before exporting.

Its really a well done model.

https://i.imgur.com/bAdYnoi.png

Edit: One other point I forgot to mention is that not everything is Unwrapped.

Last edited by Pte Jack; 24 May, 2021 @ 3:23pm
< >
Showing 1-4 of 4 comments
Per page: 1530 50

All Discussions > Help > Topic Details