HTOTM: FUSION
Original Post
[LUA] TORIBASH TO BLENDER 2020
Hi

I found a script a little while ago called rpl2obj.lua, it would take toribash replays and put the environment, tori's and animation into blender.

Blender recently had an update which made the code stop working unless you used an older version. I couldn't find an updated version of the script so I got to work.

I went through and updated the error or two in the script so that it works with the latest version of blender.

Original thread: https://forum.toribash.com/showthread.php?t=610219

Orignal Tutorial:
Attached Files
rpl2obj.lua (38.6 KB, 73 views)
when i run the script in blender, the only thing happening is the uke, tori and scene objects are created, but have no data. help
I am looking into it at the moment. I didn't write the script, I just updated literally one or two lines that were causing it not to work with the new version of blender. I think the error your having has always been there. I am looking into it at the moment but I didn't make the code so it will probably take a while. I have been exporting 500 frame mma_tfc2 matches just fine with it.
-----
Found the solution. If there is no scene in the mod, i.e. xspar.tbm, make sure you have -noscene on the export command.

For example: /export supersick.rpl export_large -noscene

Hope this helps!
Last edited by LostMail; Jun 20, 2020 at 09:34 AM. Reason: <24 hour edit/bump
Found and fixed a bug that affected scene exporting on Linux. Probably part of the issue for other operating systems too.

Usage is largely the same.

Important to note that if you are exporting a scene, the mod for the replay you're exporting needs to be in data/mods and not some sub-folder.
Attached Files
rpl2obj.lua (38.7 KB, 40 views)
Squad Squad Squad lead?
The standardization of Toribash Squad roles may have gone too far!
bumping this to add some info - I got it working on the latest version of blender with these changes:

- using Toribash 5.41
- modified line 8 of blender_import.py to:
bpy.ops.wm.obj_import(filepath=os.path.join(path, f))
hii skyscooper xD , if u dont mind can u send the whole script modified, Im kinda clueless on how edit one ty
Last edited by pianoo; Jul 3, 2024 at 11:18 PM.
Originally Posted by pianoo View Post
hii skyscooper xD , if u dont mind can u send the whole script modified, Im kinda clueless on how edit one ty

When using the commands in the script, you'll end up with a blender_import.py file in your destination folder. Open that file in a text editor and change line 8 to what I shown in my previous post.