Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Exporting tracks from blender 2.80
01-03-2020, 12:57 PM,
#1
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/vdrift.py 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.

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

Traceback (most recent call last):
  File "/usr/share/blender/scripts/addons/vdrift.py", line 997, in execute
    joe_pack.write(filepath, self.export_list, self.ExportJpk)
  File "/usr/share/blender/scripts/addons/vdrift.py", line 348, in write
    jpk = joe_pack().from_mesh()
  File "/usr/share/blender/scripts/addons/vdrift.py", 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.
Reply
01-05-2020, 03:41 PM,
#4
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.
Reply
01-05-2020, 04:23 PM,
#5
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.
Reply
01-05-2020, 07:09 PM,
#6
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.
Reply
01-06-2020, 05:33 AM,
#7
RE: Exporting tracks from blender 2.80
adding something like

                bpy.ops.object.editmode_toggle()
                bpy.ops.mesh.separate(type='MATERIAL')

before 

                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.
Reply
01-06-2020, 04:48 PM,
#8
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.
Reply
01-06-2020, 04:52 PM,
#9
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.
Reply
01-07-2020, 05:25 PM,
#10
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.
Reply
01-08-2020, 05:44 AM,
#11
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.
Reply
01-10-2020, 08:09 AM,
#12
RE: Exporting tracks from blender 2.80
I selected it as a group.  It worked fine. lawn care beavercreek ohio
Reply
01-10-2020, 08:53 AM,
#13
RE: Exporting tracks from blender 2.80
No meshes with multiple materials for me. Merchant Account Companies
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)