Blender Git Commit Log
Git Commits -> Revision 5949d59
Revision 5949d59 by Bastien Montagne (master) September 27, 2021, 13:33 (GMT) |
RNA: Make is clear that `Scene` parameter of `update` callback may be NULL. There are cases where there is no way to ensure we do have/know about an active scene. Further more, this should not be required to perform 'real' updates on data, only to perform additional special handling in current scene (mostly related to editing tools, UI, etc.). This pointer is actually almost never used in practice, and half of its current usages are fairly close to abuse of the system (like calls to `ED_gpencil_tag_scene_gpencil` or `BKE_rigidbody_cache_reset`). This commit ensures that the few places using this 'active scene' pointer are safely handling the `NULL` case, and clearly document the fact that a NULL scene pointer is valid. |
Commit Details:
Full Hash: 5949d598bc33e0f15fc6dd127c6df03f6f0caced
Parent Commit: b077f06
Lines Changed: +31, -12
8 Modified Paths:
/source/blender/makesrna/intern/rna_access.c (+1, -0) (Diff)
/source/blender/makesrna/intern/rna_image.c (+3, -1) (Diff)
/source/blender/makesrna/intern/rna_internal_types.h (+10, -1) (Diff)
/source/blender/makesrna/intern/rna_nodetree.c (+3, -3) (Diff)
/source/blender/makesrna/intern/rna_rigidbody.c (+4, -3) (Diff)
/source/blender/makesrna/intern/rna_scene.c (+3, -1) (Diff)
/source/blender/makesrna/intern/rna_sculpt_paint.c (+3, -1) (Diff)
/source/blender/makesrna/intern/rna_space.c (+4, -2) (Diff)
/source/blender/makesrna/intern/rna_image.c (+3, -1) (Diff)
/source/blender/makesrna/intern/rna_internal_types.h (+10, -1) (Diff)
/source/blender/makesrna/intern/rna_nodetree.c (+3, -3) (Diff)
/source/blender/makesrna/intern/rna_rigidbody.c (+4, -3) (Diff)
/source/blender/makesrna/intern/rna_scene.c (+3, -1) (Diff)
/source/blender/makesrna/intern/rna_sculpt_paint.c (+3, -1) (Diff)
/source/blender/makesrna/intern/rna_space.c (+4, -2) (Diff)