Pherakki / Blender-Tools-for-DSCS

This repository provides a work-in-progress addon for Blender 2.8 that can (to some degree) import model files from the PC version of Digimon Story: Cyber Sleuth. It provides new options in File > Import and File > Export named "DSCS Model", which should be pointed towards 'name' files in the game data. The file format is mostly understood; but some bugs remain and there are some Blender issues yet to be understood. Also has experimental support for the PS4 version, and for Megido72.
MIT License
24 stars 5 forks source link

Incompatibility with Blender > 4.x #19

Open LorisC93 opened 1 year ago

LorisC93 commented 1 year ago

In order to fix the incompatibility it is enough to edit AnimationImport, at line 85:

start = int(action.frame_range[0])
nla_strip = track.strips.new(action.name, start, action)

For some reasons I haven't investigated in later versions of Blender action.frame_range[0] ends up being a float and track.strips.new requires an int, hence the cast in the previous line.

I'd do a pull request myself but I'd need to fork the project, do the edit and submit the request only for 1 line...

Pherakki commented 1 year ago

Thanks for making the bug report. The reason for this is that Blender 3.X uses Python 3.10, which introduced this breaking change. If you want to use 3.X, I recommend just making this change locally for now since I have been overhauling the plugin for a Blender 3.X-compatible v0.3 release (https://github.com/Pherakki/Blender-Tools-for-DSCS/tree/feature/refactor) which I hope to complete in the coming weeks.

LorisC93 commented 3 weeks ago

Blender-Tools-for-DSCS-feature-refactor.zip I managed to create a version that doesn't explode on Blender 4.1. Most likely it isn't perfect, but at least it works.