Blender-Tools-for-DSCS icon indicating copy to clipboard operation
Blender-Tools-for-DSCS copied to clipboard

Incompatibility with Blender > 4.x

Open LorisC93 opened this issue 1 year ago • 2 comments

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...

LorisC93 avatar Jun 21 '23 06:06 LorisC93

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.

Pherakki avatar Jun 23 '23 23:06 Pherakki

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.

LorisC93 avatar Aug 22 '24 09:08 LorisC93