Turok: Dinosaur Hunter Forums!

Turok Games => Turok Dinosaur Hunter => Turok Dinosaur Hunter Modding/Mapping => Topic started by: BehemothProgrammer on August 23, 2019, 07:13:50 PM

Title: Blender Import-Export Addon
Post by: BehemothProgrammer on August 23, 2019, 07:13:50 PM
TurokEX Import-Export Blender addon by BehemothProgrammer
(https://i.imgur.com/KLENUF4.jpg)

This is an addon for Blender 2.8 that allows you to Import and Export models and animations from and to TurokEX.

Download at: https://behemothprogrammer.github.io/TurokBlender/ (https://behemothprogrammer.github.io/TurokBlender/)
Title: Re: Blender Import-Export Addon v0.0.2
Post by: DoomMarine23 on August 23, 2019, 07:19:33 PM
You absolute legend. Gonna try em out right away
Title: Re: Blender Import-Export Addon v0.0.2
Post by: BehemothProgrammer on August 30, 2019, 03:50:25 PM
For anyone currently using this Add-on: please don't use v0.0.2 (the current version) because it's not importing everything. Wait until I fix some things and get the next version out, thanks.
Title: Re: Blender Import-Export Addon v0.0.2
Post by: Duke64 on August 30, 2019, 09:43:21 PM
Good work on this BP keep up the good work hope you get things setup without to much hassle :) Or I should say more hassle than it probably already has been lol.
Title: Re: Blender Import-Export Addon v0.0.2
Post by: Badger on September 03, 2019, 07:13:47 PM
I'm grateful you want to donate and help out but I don't want it. You can keep the money. A Thanks is good enough. :have a nice day:

And I updated the addon to v0.1.1 which fixes some importing issues and adds some more features in Blenders UI. Next up is the last big step of handling exporting.

Hot Damn BP!

Edit: Sanctum site download updated.
Title: Re: Blender Import-Export Addon
Post by: raul on March 09, 2023, 12:07:28 AM
Hello, im trying to create some more automated features for myself and hopefully to share. Just had a few questions since im a bit new to blender scripting.

The first one is how would i call your addon from my own. I tried calling different things based on what ive seen on the source code but i just cant figure it out.

Is it?
Code: [Select]
from turok_export_model import save or
Code: [Select]
import turok_object. turok_export
Code: [Select]
import bpy
from turok_export_model import save

def export_bin_model(filepath):
    # Set export options
    exportSettings = {
        "filepath": filepath,
        "use_selection": True,
        "global_matrix": None,
        "path_mode": "AUTO",
        "exportMaterials": False,
        "copyTextures": False,
        "copyTextureSets": False,
        "exportAnim": False,
        "animNLATracks": False,
        "useModelsDir": True
    }

   

    # Call the TurokEXBlenderTools export_models operator with the export settings
   
    bpy.ops.turok_object.export_model(**exportSettings)

selected_obj = bpy.context.object
# Set the export path and filename
export_path = "C:/Users/raule/Desktop/junk"
export_filename = selected_obj.name + ".bin"
filepath = export_path + export_filename
export_bin_model(filepath)

Another question is that i noticed that there are two functions to import and export map data. But when i run map import on blender 3.4 only the player start object comes through. Likewise if i export a map nothing happens.

I think this would be more idea to use since i can create the sectors in blender and not in the engine, but if thats not the case is ok. I just wanted to ask.

Thank you for such a great tool!