Refactor: move FCurve baking code to animrig #120984

Merged
Christoph Lendenfeld merged 4 commits from ChrisLend/blender:refactor_move_fcurve_bake into main 2024-04-30 12:22:57 +02:00

No functional changes.

This PR moves the following public functions to animrig:

  • sample_fcurve_segment
  • bake_fcurve
  • bake_fcurve_segments

The bake_fcurve_segments also gets a docstring and its comments have been
updated to follow the style guide.

No functional changes. This PR moves the following public functions to animrig: * sample_fcurve_segment * bake_fcurve * bake_fcurve_segments The `bake_fcurve_segments` also gets a docstring and its comments have been updated to follow the style guide.
Christoph Lendenfeld added 1 commit 2024-04-23 15:07:56 +02:00
Christoph Lendenfeld added 1 commit 2024-04-23 15:11:41 +02:00
buildbot/vexp-code-patch-darwin-arm64 Build done. Details
buildbot/vexp-code-patch-windows-amd64 Build done. Details
buildbot/vexp-code-patch-darwin-x86_64 Build done. Details
buildbot/vexp-code-patch-linux-x86_64 Build done. Details
buildbot/vexp-code-patch-coordinator Build done. Details
8d19a7b48e
add docstring
Christoph Lendenfeld added the
Module
Animation & Rigging
label 2024-04-23 15:13:58 +02:00
Author
Member

@blender-bot build

@blender-bot build
Sybren A. Stüvel approved these changes 2024-04-30 11:59:52 +02:00
Sybren A. Stüvel left a comment
Member

LGTM. I didn't look at the function definintions, I expect those to be simply moved anyway.

Just a small little polish for the sample_fcurve_segment declaration, can be handled when landing.

LGTM. I didn't look at the function definintions, I expect those to be simply moved anyway. Just a small little polish for the `sample_fcurve_segment` declaration, can be handled when landing.
@ -92,0 +93,4 @@
* \param sample_rate: indicates how many samples per frame should be generated.
*/
void sample_fcurve_segment(
FCurve *fcu, float start_frame, float sample_rate, float *r_samples, int sample_count);

r_samples has another name (samples) in the function definition. These should be consistent. I think samples is actually better. If it were to be named r_samples, I'd expect it to receive a single float (as that would be the typical use for a float * return parameter).

Probably also good to document that samples is expected to be an array that's large enough to hold sample_count values.

`r_samples` has another name (`samples`) in the function definition. These should be consistent. I think `samples` is actually better. If it were to be named `r_samples`, I'd expect it to receive a single float (as that would be the typical use for a `float *` return parameter). Probably also good to document that `samples` is expected to be an array that's large enough to hold `sample_count` values.
Sybren A. Stüvel reviewed 2024-04-30 12:05:53 +02:00
Sybren A. Stüvel left a comment
Member

PS: not for this PR, but just something that I just noticed: the BakeCurveRemove values all start with REMOVE, which creates a 'stutter' (BakeCurveRemove::REMOVE_NONE). Might be ok to just remove the REMOVE prefixes so they becomes BakeCurveRemove::NONE etc?

PS: not for this PR, but just something that I just noticed: the `BakeCurveRemove` values all start with `REMOVE`, which creates a 'stutter' (`BakeCurveRemove::REMOVE_NONE`). Might be ok to just remove the `REMOVE` prefixes so they becomes `BakeCurveRemove::NONE` etc?
Christoph Lendenfeld added 2 commits 2024-04-30 12:21:29 +02:00
Author
Member

PS: not for this PR, but just something that I just noticed: the BakeCurveRemove values all start with REMOVE, which creates a 'stutter' (BakeCurveRemove::REMOVE_NONE). Might be ok to just remove the REMOVE prefixes so they becomes BakeCurveRemove::NONE etc?

good point. will make another PR for that

> PS: not for this PR, but just something that I just noticed: the `BakeCurveRemove` values all start with `REMOVE`, which creates a 'stutter' (`BakeCurveRemove::REMOVE_NONE`). Might be ok to just remove the `REMOVE` prefixes so they becomes `BakeCurveRemove::NONE` etc? good point. will make another PR for that
Christoph Lendenfeld merged commit 33c6e9f92c into main 2024-04-30 12:22:57 +02:00
Christoph Lendenfeld deleted branch refactor_move_fcurve_bake 2024-04-30 12:23:00 +02:00
Sign in to join this conversation.
No reviewers
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
2 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#120984
No description provided.