Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Exporting tracks from blender 2.80
01-03-2020, 12:57 PM,
Exporting tracks from blender 2.80
i've been trying to export all objects from blender 2.80 into a jpk file but no objects get exported. if i export just one object to a joe file then it works fine. not quite sure what i'm doing wrong? i've tried selecting all objects, deselecting them all but still no objects get exported. i'm doing this on debian. any ideas?

looking at blender-scripts/blender28/ at joe_pack.from_mesh() at line 367 i see

  objlist = bpy.context.scene.collection.objects

but it's empty so no wonder nothing gets exported.

01-05-2020, 10:58 AM,
RE: Exporting tracks from blender 2.80
Try changing bpy.context.scene.collection.objects to bpy.context.scene.collection.all_objects.
01-05-2020, 11:30 AM,
RE: Exporting tracks from blender 2.80
i did and now i get:

Traceback (most recent call last):
  File "/usr/share/blender/scripts/addons/", line 997, in execute
    joe_pack.write(filepath, self.export_list, self.ExportJpk)
  File "/usr/share/blender/scripts/addons/", line 348, in write
    jpk = joe_pack().from_mesh()
  File "/usr/share/blender/scripts/addons/", line 389, in from_mesh
    image = bsdf.inputs['Base Color'].links[0].from_node.image
IndexError: tuple index out of range

location: <unknown location>:-1

location: <unknown location>:-1

that's because bsdf.inputs['Base Color'].links is empty.
01-05-2020, 03:41 PM,
RE: Exporting tracks from blender 2.80
The exporter assumes that the texture is linked to the 'Base Color' input. You can check it in the shading workspace, shader editor window.
01-05-2020, 04:23 PM,
RE: Exporting tracks from blender 2.80
If you can upload a minimal blend file, a single object should be enough, I can try to figure out where the texture is.
01-05-2020, 07:09 PM,
RE: Exporting tracks from blender 2.80
never mind, turns out the textures were in the wrong directory so blender couldn't find them. once i fixed that i managed to export the objects. i wish there were a way i can split all objects by material in one go rather than doing it by hand for each and every one of them. still needed to replace collection.objects with collection.all_objects. thanks.
01-06-2020, 05:33 AM,
RE: Exporting tracks from blender 2.80
adding something like



                objlist = bpy.context.scene.collection.all_objects

joe_pack.from_mesh() seems to split the objects by material. it might act only on selected objects, so selecting all objects might be needed first (i had them all selected in blender). thanks. now i have to remember how surfaces work, etc.
01-06-2020, 04:48 PM,
RE: Exporting tracks from blender 2.80
Yeah. That is the Splitting Mesh by Material command (enter Edit mode, press the P key, select split By Material). The exporter does not handle meshes with multiple materials at all.
01-06-2020, 04:52 PM,
RE: Exporting tracks from blender 2.80
this is why i added that piece of code. is getting kind of boring to do that manually for more than 1000 objects). it would be nice if a more robust version could be added to the exporter.
01-07-2020, 05:25 PM,
RE: Exporting tracks from blender 2.80
But you don't have to do it for each object separately. Select them all, go into edit mode, and separate. I've just tried it, and it works just fine.
01-08-2020, 05:44 AM,
RE: Exporting tracks from blender 2.80
yes, but since having one material per object is a requirement for exporting to joe format, why not just make sure that's actually the case rather than silently give the wrong answer? funny how things are, i had almost forgotten how annoying it is to work with you. thanks for reminding me, i won't bother you guys again. good luck.

Forum Jump:

Users browsing this thread: 1 Guest(s)