In theory this change should not bring functional changes.
But when I test a branch with a snap gizmo, I realize that after a Undo, the depsgraph pointed by the snap_context has its memory invalidated.
I don't know why that happens, but it tells me that the depsgraph shouldn't be part of creating the context, and should be called at runtime.
This patch is essential for D7000.
Details
Details
- Reviewers
Campbell Barton (campbellbarton) - Group Reviewers
Dependency Graph - Commits
- rBa922a097ef5c: Transform Snap Object: Remove depsgraph when creating context
Diff Detail
Diff Detail
- Repository
- rB Blender
- Branch
- arcpatch-D7013 (branched from master)
- Build Status
Buildable 6955 Build 6955: arc lint + arc unit
Event Timeline
Comment Actions
Note that the snapping context wasn't intended to be kept between undo-steps, however if this all thats needed to support it. It seems fine.
Minor request relating to ruler inline.
Note that the number of arguments to ED_transform_snap_object_* functions is getting a bit out of hand, we could could make input parameters & output parameters two separate arguments. Although thats for a separate patch.
| source/blender/editors/space_view3d/view3d_gizmo_ruler.c | ||
|---|---|---|
| 306–307 | Prefer to pass depsgraph instead of context. BKE_scene_graph_evaluated_ensure can then be used before passing the depsgraph to the snap context. RulerItem will need to have a reference to Main. | |
Comment Actions
- Remove peelObjectsSnapContext (it is not really used)
- Pass depsgraph in view3d_ruler_item_mousemove instead of context