Skip to content

Commit

Permalink
Fix graph editor pitch max value mapping
Browse files Browse the repository at this point in the history
  • Loading branch information
Cornerback24 committed Jun 25, 2023
1 parent 3dd6536 commit 9642c80
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
- 0.16.1 2023-6-24
* Fix graph editor pitch max value mapping
- 0.16.0 2023-6-11
* Add keyframe generation from CC data to the graph editor
* Replace graph editor keyframe placement dropdown with checkboxes
Expand Down
3 changes: 2 additions & 1 deletion GraphEditorKeyframeGeneratorModule.py
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,8 @@ def generate_keyframes_from_range_list(self, value_range_list, frame_value_pairs
if len(value_range_list) == 0:
return []
values_map = {}
interval = (self.max_keyframe_value - self.min_keyframe_value) / len(value_range_list)
interval = 0 if len(value_range_list) < 2 else (self.max_keyframe_value - self.min_keyframe_value) / (
len(value_range_list) - 1)
mapped_keyframe_value = self.min_keyframe_value
for value in value_range_list:
values_map[value] = mapped_keyframe_value
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ for a selected action could be generated to line up with all the C4 notes played
the right-side panel in the Nonlinear Action View and select the Midi tab.

This add-on is written for Blender 3.5 and is compatible back to Blender 2.80.
Add-on Version 0.16.0. [Changelog here](CHANGELOG.md).
Add-on Version 0.16.1. [Changelog here](CHANGELOG.md).


<details>
Expand Down
2 changes: 1 addition & 1 deletion __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"name": "Blender NLA Midi Copier",
"author": "Cornerback24",
"version": (0, 16, 0),
"version": (0, 16, 1),
"blender": (2, 80, 0),
"location": "View NLA Editor > Tool Shelf",
"description": "Copy actions to action strips based on midi file input",
Expand Down

0 comments on commit 9642c80

Please sign in to comment.