Page 1 of 1

SuperTuxKart Exporter Tools/Scripts For Blender 2.80+

PostPosted: 02 Oct 2020, 23:35
by Worldblender
I've spent the last two months porting the existing exporter scripts to work with Blender 2.80 and later. This will hopefully allow us to eventually migrate to using newer Blender versions for producing STK assets. Along the way, I spent a considerable amount of effort to reorganize the layout and workings of every script. Today, the scripts are ready for testing! :D

Download at https://github.com/RQWorldblender/stk-blender <-- :cool:

Give them a try; they need all the testing possible before becoming official. To help with converting existing assets, there is an extra conversion script to aid in migration, as there barely exist any assets to test with.

Re: SuperTuxKart Exporter Tools/Scripts For Blender 2.80+

PostPosted: 03 Oct 2020, 00:04
by GeekPenguinBR
Downloaded! This exporter will help us a lot.

Re: SuperTuxKart Exporter Tools/Scripts For Blender 2.80+

PostPosted: 10 Oct 2020, 13:04
by Kitetsu
Hello,

i tried your addons with Blender v2.81.16 but I always get issues exporting my track.

Here is the Log:

{l Code}: {l Select All Code}
Traceback (most recent call last):
  File "C:\Users\darkf\Desktop\blender-2.81a-windows64\blender-2.81a-windows64\2.81\scripts\addons\io_antarctica_scene\stk_track.py", line 1282, in invoke
    return self.execute(context)
  File "C:\Users\darkf\Desktop\blender-2.81a-windows64\blender-2.81a-windows64\2.81\scripts\addons\io_antarctica_scene\stk_track.py", line 1296, in execute
    savescene_callback(self, self.filepath, exportImages, self.exportDrivelines, self.exportScene, self.exportMaterials)
  File "C:\Users\darkf\Desktop\blender-2.81a-windows64\blender-2.81a-windows64\2.81\scripts\addons\io_antarctica_scene\stk_track.py", line 1221, in savescene_callback
    TrackExport(self, sFilePath, exportImages, exportDrivelines and stk_utils.getSceneProperty(bpy.data.scenes[0], 'is_stk_node', 'false') != 'true', exportScene, exportMaterials)
  File "C:\Users\darkf\Desktop\blender-2.81a-windows64\blender-2.81a-windows64\2.81\scripts\addons\io_antarctica_scene\stk_track.py", line 1128, in __init__
    if exporter.processObject(obj, stktype):
  File "C:\Users\darkf\Desktop\blender-2.81a-windows64\blender-2.81a-windows64\2.81\scripts\addons\io_antarctica_scene\stk_track_utils.py", line 687, in processObject
    self.lDrivelines.insert(0, Driveline(obj, 1))
  File "C:\Users\darkf\Desktop\blender-2.81a-windows64\blender-2.81a-windows64\2.81\scripts\addons\io_antarctica_scene\stk_track_utils.py", line 1236, in __init__
    self.convertToLists()
  File "C:\Users\darkf\Desktop\blender-2.81a-windows64\blender-2.81a-windows64\2.81\scripts\addons\io_antarctica_scene\stk_track_utils.py", line 1562, in convertToLists
    self.log.report({'WARNING'}, "Warning, driveline '%s' appears to be broken in separate sections. Vertex at %f %f %f is not connected with the rest" % \
AttributeError: 'Driveline' object has no attribute 'log'

location: <unknown location>:-1



Maybe you can tell me, whats wrong. Or it helps.

I actually don't know what i've could done wrong.

I just build a round course to try and learn a little bit in building tracks.

just let me know, if you need something more. It's my first try to build a track :)

Greetings
Kitetsu

Re: SuperTuxKart Exporter Tools/Scripts For Blender 2.80+

PostPosted: 11 Oct 2020, 22:07
by Worldblender
Kitetsu {l Wrote}:Hello,

i tried your addons with Blender v2.81.16 but I always get issues exporting my track.

Here is the Log:

{l Code}: {l Select All Code}
Traceback (most recent call last):
  File "C:\Users\darkf\Desktop\blender-2.81a-windows64\blender-2.81a-windows64\2.81\scripts\addons\io_antarctica_scene\stk_track.py", line 1282, in invoke
    return self.execute(context)
  File "C:\Users\darkf\Desktop\blender-2.81a-windows64\blender-2.81a-windows64\2.81\scripts\addons\io_antarctica_scene\stk_track.py", line 1296, in execute
    savescene_callback(self, self.filepath, exportImages, self.exportDrivelines, self.exportScene, self.exportMaterials)
  File "C:\Users\darkf\Desktop\blender-2.81a-windows64\blender-2.81a-windows64\2.81\scripts\addons\io_antarctica_scene\stk_track.py", line 1221, in savescene_callback
    TrackExport(self, sFilePath, exportImages, exportDrivelines and stk_utils.getSceneProperty(bpy.data.scenes[0], 'is_stk_node', 'false') != 'true', exportScene, exportMaterials)
  File "C:\Users\darkf\Desktop\blender-2.81a-windows64\blender-2.81a-windows64\2.81\scripts\addons\io_antarctica_scene\stk_track.py", line 1128, in __init__
    if exporter.processObject(obj, stktype):
  File "C:\Users\darkf\Desktop\blender-2.81a-windows64\blender-2.81a-windows64\2.81\scripts\addons\io_antarctica_scene\stk_track_utils.py", line 687, in processObject
    self.lDrivelines.insert(0, Driveline(obj, 1))
  File "C:\Users\darkf\Desktop\blender-2.81a-windows64\blender-2.81a-windows64\2.81\scripts\addons\io_antarctica_scene\stk_track_utils.py", line 1236, in __init__
    self.convertToLists()
  File "C:\Users\darkf\Desktop\blender-2.81a-windows64\blender-2.81a-windows64\2.81\scripts\addons\io_antarctica_scene\stk_track_utils.py", line 1562, in convertToLists
    self.log.report({'WARNING'}, "Warning, driveline '%s' appears to be broken in separate sections. Vertex at %f %f %f is not connected with the rest" % \
AttributeError: 'Driveline' object has no attribute 'log'

location: <unknown location>:-1



Maybe you can tell me, whats wrong. Or it helps.

I actually don't know what i've could done wrong.

I just build a round course to try and learn a little bit in building tracks.

just let me know, if you need something more. It's my first try to build a track :)

Greetings
Kitetsu

That's most likely an oversight during my porting. I was trying to remove the built-in log as part of my porting effort. In place of this, I would be using the built-in Blender log facility. It looks like I didn't catch every usage of log usage, so I may need to go back to check it.
You might also want to upgrade to a more recent Blender version; 2.83 LTS is a good place to start if you don't want to go all the way to 2.90 (the scripts should still work on that version, but it's untested).

Update: I fixed the issue now with commit https://github.com/RQWorldblender/stk-blender/commit/c400020a62513be0d723d01f819d53a2c40bc745. Check out the latest update and try again what you were doing. You can reload scripts from the menu by clicking the Blender icon at the top-left -> system -> reload scripts.

Re: SuperTuxKart Exporter Tools/Scripts For Blender 2.80+

PostPosted: 09 Nov 2020, 03:50
by tempAnon093
Thank you for this! I've just started using it now and my basic test track is exporting perfectly. :)

(The only issue I had was when a badly-made driveline (forgot to use merge on the array) didn't throw an error and just exported a driveline with no quads, which segfaults STK. Again, it was a broken driveline so not really an issue)

Re: SuperTuxKart Exporter Tools/Scripts For Blender 2.80+

PostPosted: 07 Dec 2020, 15:45
by McRavenINDo
This tool works perfectly in Blender 2.91 for making Kart. Already test on Pepper and Revamped Gnu. :)

Re: SuperTuxKart Exporter Tools/Scripts For Blender 2.80+

PostPosted: 20 Dec 2020, 04:05
by Worldblender
Today I made a commit that enables hiding objects while still being able to export them: https://github.com/RQWorldblender/stk-b ... 12ef4f18f8
This consists of collecting all hidden objects and unhiding them, performing the export as usual by selecting individual objects, and then hiding those objects again. All of this happens in the background and users won't see objects being revealed during the export process, so it will look almost the same as from before the export process.

This is part of me trying to restore part of the old workflow from Blender workflow, but without having to stay on old Blender versions.

Re: SuperTuxKart Exporter Tools/Scripts For Blender 2.80+

PostPosted: 01 Feb 2021, 20:43
by Worldblender
Today, my version of the Blender 2.80+ scripts have become an official part of STK. They can now be found at https://github.com/supertuxkart/stk-blender, in addition to my original repository. I will be updating the main website to include information about them.

Re: SuperTuxKart Exporter Tools/Scripts For Blender 2.80+

PostPosted: 01 Feb 2021, 21:29
by tempAnon093
Worldblender {l Wrote}:Today, my version of the Blender 2.80+ scripts have become an official part of STK. They can now be found at https://github.com/supertuxkart/stk-blender, in addition to my original repository. I will be updating the main website to include information about them.

Nice work! Thank you. :)

Re: SuperTuxKart Exporter Tools/Scripts For Blender 2.80+

PostPosted: 02 Feb 2021, 02:49
by GeekPenguinBR
Worldblender {l Wrote}:Today, my version of the Blender 2.80+ scripts have become an official part of STK. They can now be found at https://github.com/supertuxkart/stk-blender, in addition to my original repository. I will be updating the main website to include information about them.


Great job! Congrats and be sure your work will be very useful for us.