Dynamic Number of Action Layers #39572
Labels
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
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#39572
Loading…
Reference in New Issue
No description provided.
Delete Branch "%!s(<nil>)"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Patch: D211
Summary:
This patch removes the limitations on the number of action layers in the BGE.
Implementation:
BL_ActionManager currently creates a variable called m_layers which is a fixed array of BL_Action. This variable is used to keep track of the action layers. This patch replaces the fixed array with a variable called m_actions which is of type BL_ActionList. BL_ActionList is a Vector of type BL_Action* defined in BL_Action.h. This allows for dynamic allocation of action layers.
Features:
Concerns:
Future:
0001-Dynamic-Number-of-Action-Layers.patch
Changed status to: 'Open'
Added subscriber: @mahalin
Version 2:
0001-Dynamic-Number-of-Action-Layers.patch
Version 3:
Future:
Version 4 (upcoming):
Just saw Moguri's multithreaded animations update, will update accordingly.
0001-Dynamic-Number-of-Action-Layers-v3.patch
All of these patches break existing scripts (i.e., they change the API). Also, it's really best to have a patch fix/change one thing at a time. This is turning into a complete refactor of the Python animation API when the original intent was to have a more flexible limit of action layers. So, I will begin by just addressing your first patch.
This patch breaks the existing API. For example, if I cannot play animations on arbitrary layers, I have to first add the layers. And what if I do not want to add the layers in order? I'm not entirely sure on the use case for non-consecutive layers, but the old API supported it. I think it would be better to have the action manager automatically handle adding and removing layers. Also, using a map would allow for sparse layer allocation.
The latest patch (v3) supersedes the others. v3 automates the adding and removal of layers since that was too much boilerplate code. I guess it is a refactor then? For future reference, I'll keep that in mind.
Proposed changes for v4 (relative to v3):
The first two changes should maintain backwards compatability and work as expected.
By exposing BL_Action, we could remove some of the action functions out of KX_GameObject. Although, we could leave in the old functions for backwards compatability but that seems redundant...two ways to do the same thing?
As for breaking the API, I'm not completely sure what the rules are on that. I've been looking around, e.g. new developer guides etc. but haven't found anything definitive. AFAIK, we try to maintain as much backwards compatability as possible?
http://code.blender.org/index.php/2013/06/blender-roadmap-2-7-2-8-and-beyond/
2.7 allowed to break API?
Alright, I broke down the patch into 3 parts. To keep it simple, I'll only attach patch #1 in this task and create separate tasks for the other two, and keep the discussion of this task to patch #1.
Patch #1: 0001-BGE-Dynamically-allocated-action-layers.patch
The Python API was not changed and the action system should remain backwards compatible and function as expected.
Patch #2 will add additional action-related methods to KX_GameObject and patch #3 will create new game type - BL_Action, and possibly a fourth patch for cleanup.
Changed status from 'Open' to: 'Resolved'
The patch has been committed.