Port operators to use COW (Parent Task) #54810
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
10 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: blender/blender#54810
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?
This is the parent task for the copy-on-write operator porting taskforce.
With copy-on-write in place we have clear separation between original data and evaluated state: dependency graph gets original data, goes through all the animation systems, drivers, constraints and modifiers stack and gets evaluated state of that data within the current context.
This means that now operators should read from an evaluated state and write to original data, and to inform dependency graph about changes.
Practical example: if an operator needs to get an object matrix, it should read it from the evaluated version. But if the operator needs to update the object’s location, it should write it to the original object and tag it as updated.
For further information read the dependency graph design .
How this works:
Note: Not all operators will actually need fixing (many should be fine already, without needing further changes). In that case, instead of submitting a patch, mark the operator as done directly.
What to do:
The code work is straightforward. But there are things which will help migrating operators:
DEG_get_evaluated_object()
.DEG_get_original_object()
.DEG_get_evaluated_rna_pointer()
method that can be used in exceptional cases. Unlike the other functions, it is slow - other methods should be used where possible.DEG_id_tag_update(id, DEG_TAG_COPY_ON_WRITE);
(e.g.,6a75a1a669
).Other examples:
40199c1d10
- Manipulator: Use evaluated object's matrix to get manipulator position.eb521b22b2
- Make View Selected to be aware of copy-on-write.3e26b84397
- Camera manipulator: Make it aware of evaluated version of object.Testing:
Run Blender normally.
We also found the following tips useful:
--debug-depsgraph-tag
to check if the correct tagging updates are happening--disable-copy-on-write
flag to check if something else in 2.8 (e.g. Message Bus system) may be causing refresh issuesDesign Notes:
bContext
) contains original non-evaluated data. This meansCTX_data_scene
will give original scene, not evaluated._eval
suffix to variables.const
Sub-tasks for each module's operators:
Stuff you can do now:
Major Changes Required (High Priority - for Blender Studio Migration to 2.8):
Pose Tools- #54812Animation Editors/Module- [Required changes here are being tackled by @JoshuaLeung Some things are broken (e.g. recalc after editing keyframes)]Major Changes Required (Lower Priority):
Armature Edit Mode- #54811Likely Only Minor Changes Needed:
#54815(all but blend_from_shape)Postponed (Blocking/Pending Issues need resolving first)
Waiting for Sergey to test/check first
CURVE_OT_*
)FONT_OT_*
)META_OT_*
)LATTICE_OT_*
)Waiting for Grease Pencil branch merge
Grease Pencil module (
editors/gpencil
)Should be fine without needing fixes
May need fixes at some point (but aren't operators/for taskforce work)
editors/space_view3d/view3d_manipulator_*.c
Added subscribers: @Sergey, @JoshuaLeung
Port operators to use COWto Port operators to use COW (Parent Task)Added subscriber: @dfelinto
Added subscriber: @Scaredyfish
Added subscriber: @jta
Added subscriber: @dr.sybren
Added subscriber: @brita
Added subscriber: @codekhor
I made this quick patch to show if Blender is running with or without COW enabled as I kept getting confused with multiple Blenders while testing.
It has an include for depsgraph, so double check your includes if editing that file.
P691
Added subscriber: @TuomoKeskitalo
Added subscriber: @LazyDodo
fixed the wiki links, @Sergey can you transfer dependency graph design to the new wiki? (had to place a en.blender.org link for now)
Added subscriber: @nBurn
@nBurn transferred the page, link has been updated.
Added subscriber: @brecht
Changed status from 'Open' to: 'Archived'
Most operators appear to be working, and we will use bug tracker to handle remaining issues.