Mocap Tools - Index out of range in "Samples to Beziers" #43259

Closed
opened 2015-01-15 07:17:45 +01:00 by Joshua Leung · 9 comments
Member

System Information
Windows 8.1, 64-bit

Blender Version
Broken: 3d503ea
Worked: (optional)

Short description of error
The "Samples to Beziers" operator from the Mocap tools addon throws an exception on the provided file.

Exact steps for others to reproduce the error

  1. Ensure that the Motion Capture tools addon is enabled
  2. Open cube_reduce-simple01.blend
  3. In the Graph Editor, convert all the keyframes to fsamples by using the Bake Curve (Alt-C) operator
  4. In the Properties Editor, Object Tab, click the "Samples to Beziers" operator to convert those curves back to beziers, but with simplified curves.

The console log and traceback are shown below:


Processing curve 1/3
['location', 'location', 'location']
Traceback (most recent call last):
  File "C:\blenderdev\trunk\install\2.73\scripts\addons\mocap\__init__.py", line 556, in execute
    mocap_tools.fcurves_simplify(context, context.active_object)
  File "C:\blenderdev\trunk\install\2.73\scripts\addons\mocap\mocap_tools.py", line 564, in fcurves_simplify
    simplifyCurves(fcurveGroup, error, reparaError, maxIterations, group_mode)
  File "C:\blenderdev\trunk\install\2.73\scripts\addons\mocap\mocap_tools.py", line 519, in simplifyCurves
    fitCubic(data_pts, s, e)
  File "C:\blenderdev\trunk\install\2.73\scripts\addons\mocap\mocap_tools.py", line 445, in fitCubic
    bez = fitSingleCubic2Pts(data_pts, s, e)
  File "C:\blenderdev\trunk\install\2.73\scripts\addons\mocap\mocap_tools.py", line 346, in fitSingleCubic2Pts
    alpha0 = alpha1 = (data_pts[s].co - data_pts[e].co).length / 3
IndexError: list index out of range
**System Information** Windows 8.1, 64-bit **Blender Version** Broken: 3d503ea Worked: (optional) **Short description of error** The "Samples to Beziers" operator from the Mocap tools addon throws an exception on the provided file. **Exact steps for others to reproduce the error** 1. Ensure that the Motion Capture tools addon is enabled 2. Open [cube_reduce-simple01.blend](https://archive.blender.org/developer/F137213/cube_reduce-simple01.blend) 3. In the Graph Editor, convert all the keyframes to fsamples by using the Bake Curve (Alt-C) operator 4. In the Properties Editor, Object Tab, click the "Samples to Beziers" operator to convert those curves back to beziers, but with simplified curves. The console log and traceback are shown below: ``` Processing curve 1/3 ['location', 'location', 'location'] Traceback (most recent call last): File "C:\blenderdev\trunk\install\2.73\scripts\addons\mocap\__init__.py", line 556, in execute mocap_tools.fcurves_simplify(context, context.active_object) File "C:\blenderdev\trunk\install\2.73\scripts\addons\mocap\mocap_tools.py", line 564, in fcurves_simplify simplifyCurves(fcurveGroup, error, reparaError, maxIterations, group_mode) File "C:\blenderdev\trunk\install\2.73\scripts\addons\mocap\mocap_tools.py", line 519, in simplifyCurves fitCubic(data_pts, s, e) File "C:\blenderdev\trunk\install\2.73\scripts\addons\mocap\mocap_tools.py", line 445, in fitCubic bez = fitSingleCubic2Pts(data_pts, s, e) File "C:\blenderdev\trunk\install\2.73\scripts\addons\mocap\mocap_tools.py", line 346, in fitSingleCubic2Pts alpha0 = alpha1 = (data_pts[s].co - data_pts[e].co).length / 3 IndexError: list index out of range ```
Author
Member

Changed status to: 'Open'

Changed status to: 'Open'
Author
Member

Added subscriber: @JoshuaLeung

Added subscriber: @JoshuaLeung
Author
Member

NOTE: I'd probably fix this myself if I had the time (which I don't really currently). So, adding a note of this here so that this doesn't fall through the cracks. That said, if anyone feels inclined to investigate, feel free to proceed :)

NOTE: I'd probably fix this myself if I had the time (which I don't really currently). So, adding a note of this here so that this doesn't fall through the cracks. That said, if anyone feels inclined to investigate, feel free to proceed :)
Bastien Montagne self-assigned this 2015-01-16 12:05:46 +01:00

Ok, issue actually is this addon comes from a time where samples and keyframes used the same data (at least from RNA pov), I guess... Thing is it completely ignores samples currently.

And we do not have a way to convert between keyframes and samples from RNA, will add that first, and then add a check to mocap tools, to first convert samples fcurve to keyframes one, if needed.

Ok, issue actually is this addon comes from a time where samples and keyframes used the same data (at least from RNA pov), I guess... Thing is it completely ignores samples currently. And we do not have a way to convert between keyframes and samples from RNA, will add that first, and then add a check to mocap tools, to first convert samples fcurve to keyframes one, if needed.

This issue was referenced by 89308ed082

This issue was referenced by 89308ed082f58bb568fbf7a684d063448566b86b

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'

Closed by commit 89308ed082.

Closed by commit 89308ed082.

This issue was referenced by db1b2b35e2

This issue was referenced by db1b2b35e299ccb9145851c3a5e7f7cf3eecd98e

This issue was referenced by ed9bd050bb

This issue was referenced by ed9bd050bbc27a470bc10680c6db1289857b404f
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#43259
No description provided.