Blender Git Loki

Git Commits -> Revision 897e97f

Revision 897e97f by Bastien Montagne (master)
June 22, 2016, 15:53 (GMT)
ID-Remap - Step one: core work (cleanup and rework of generic ID datablock handling).

This commit changes a lot of how IDs are handled internally, especially the unlinking/freeing
processes. So far, this was very fuzy, to summarize cleanly deleting or replacing a datablock
was pretty much impossible, except for a few special cases.

Also, unlinking was handled by each datatype, in a rather messy and prone-to-errors way (quite
a few ID usages were missed or wrongly handled that way).

One of the main goal of id-remap branch was to cleanup this, and fatorize ID links handling
by using library_query utils to allow generic handling of those, which is now the case
(now, generic ID links handling is only "knwon" from readfile.c and library_query.c).

This commit also adds backends to allow live replacement and deletion of datablocks in Blender
(so-called 'remapping' process, where we replace all usages of a given ID pointer by a new one,
or NULL one in case of unlinking).

This will allow nice new features, like ability to easily reload or relocate libraries, real immediate
deletion of datablocks in blender, replacement of one datablock by another, etc.
Some of those are for next commits.

A word of warning: this commit is highly risky, because it affects potentially a lot in Blender core.
Though it was tested rather deeply, being totally impossible to check all possible ID usage cases,
it's likely there are some remaining issues and bugs in new code... Please report them! ;)

Review task: D2027 (https://developer.blender.org/D2027).
Reviewed by campbellbarton, thanks a bunch.

Commit Details:

Full Hash: 897e97f078e64e5ee5fbbd929fd1e46240371ef4
Parent Commit: 73cfbb0
Lines Changed: +1583, -1508

2 Added Paths:

/source/blender/blenkernel/BKE_library_remap.h (+76, -0) (View)
/source/blender/blenkernel/intern/library_remap.c (+768, -0) (View)

93 Modified Paths:

/source/blender/blenkernel/BKE_animsys.h (+1, -1) (Diff)
/source/blender/blenkernel/BKE_curve.h (+0, -1) (Diff)
/source/blender/blenkernel/BKE_group.h (+0, -1) (Diff)
/source/blender/blenkernel/BKE_library.h (+7, -11) (Diff)
/source/blender/blenkernel/BKE_library_query.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_linestyle.h (+0, -2) (Diff)
/source/blender/blenkernel/BKE_mask.h (+1, -2) (Diff)
/source/blender/blenkernel/BKE_mball.h (+0, -1) (Diff)
/source/blender/blenkernel/BKE_mesh.h (+1, -2) (Diff)
/source/blender/blenkernel/BKE_node.h (+0, -1) (Diff)
/source/blender/blenkernel/BKE_object.h (+0, -2) (Diff)
/source/blender/blenkernel/BKE_sca.h (+0, -1) (Diff)
/source/blender/blenkernel/BKE_scene.h (+2, -1) (Diff)
/source/blender/blenkernel/BKE_screen.h (+5, -2) (Diff)
/source/blender/blenkernel/BKE_sound.h (+0, -2) (Diff)
/source/blender/blenkernel/BKE_world.h (+0, -1) (Diff)
/source/blender/blenkernel/CMakeLists.txt (+2, -0) (Diff)
/source/blender/blenkernel/intern/action.c (+6, -9) (Diff)
/source/blender/blenkernel/intern/anim_sys.c (+10, -8) (Diff)
/source/blender/blenkernel/intern/armature.c (+13, -18) (Diff)
/source/blender/blenkernel/intern/brush.c (+6, -10) (Diff)
/source/blender/blenkernel/intern/camera.c (+2, -1) (Diff)
/source/blender/blenkernel/intern/curve.c (+9, -44) (Diff)
/source/blender/blenkernel/intern/effect.c (+0, -3) (Diff)
/source/blender/blenkernel/intern/font.c (+1, -2) (Diff)
/source/blender/blenkernel/intern/gpencil.c (+3, -6) (Diff)
/source/blender/blenkernel/intern/group.c (+3, -63) (Diff)
/source/blender/blenkernel/intern/image.c (+6, -7) (Diff)
/source/blender/blenkernel/intern/key.c (+4, -2) (Diff)
/source/blender/blenkernel/intern/lamp.c (+1, -1) (Diff)
/source/blender/blenkernel/intern/lattice.c (+13, -10) (Diff)
/source/blender/blenkernel/intern/library.c (+2, -268) (Diff)
/source/blender/blenkernel/intern/library_query.c (+69, -7) (Diff)
/source/blender/blenkernel/intern/linestyle.c (+7, -35) (Diff)
/source/blender/blenkernel/intern/mask.c (+3, -56) (Diff)
/source/blender/blenkernel/intern/material.c (+14, -28) (Diff)
/source/blender/blenkernel/intern/mball.c (+4, -19) (Diff)
/source/blender/blenkernel/intern/mesh.c (+7, -35) (Diff)
/source/blender/blenkernel/intern/movieclip.c (+3, -1) (Diff)
/source/blender/blenkernel/intern/node.c (+7, -31) (Diff)
/source/blender/blenkernel/intern/object.c (+31, -442) (Diff)
/source/blender/blenkernel/intern/paint.c (+4, -7) (Diff)
/source/blender/blenkernel/intern/particle.c (+9, -16) (Diff)
/source/blender/blenkernel/intern/sca.c (+0, -71) (Diff)
/source/blender/blenkernel/intern/scene.c (+20, -66) (Diff)
/source/blender/blenkernel/intern/screen.c (+10, -7) (Diff)
/source/blender/blenkernel/intern/sequencer.c (+2, -2) (Diff)
/source/blender/blenkernel/intern/sound.c (+4, -11) (Diff)
/source/blender/blenkernel/intern/speaker.c (+1, -4) (Diff)
/source/blender/blenkernel/intern/text.c (+6, -3) (Diff)
/source/blender/blenkernel/intern/texture.c (+26, -11) (Diff)
/source/blender/blenkernel/intern/world.c (+10, -20) (Diff)
/source/blender/compositor/operations/COM_MaskOperation.cpp (+1, -1) (Diff)
/source/blender/editors/animation/anim_channels_edit.c (+1, -1) (Diff)
/source/blender/editors/include/ED_buttons.h (+0, -2) (Diff)
/source/blender/editors/include/ED_node.h (+0, -2) (Diff)
/source/blender/editors/include/ED_outliner.h (+0, -6) (Diff)
/source/blender/editors/include/ED_util.h (+1, -1) (Diff)
/source/blender/editors/include/ED_view3d.h (+2, -0) (Diff)
/source/blender/editors/mesh/editmesh_undo.c (+1, -1) (Diff)
/source/blender/editors/object/object_add.c (+1, -3) (Diff)
/source/blender/editors/object/object_group.c (+3, -1) (Diff)
/source/blender/editors/render/render_preview.c (+6, -2) (Diff)
/source/blender/editors/screen/screen_edit.c (+4, -1) (Diff)
/source/blender/editors/sound/sound_ops.c (+1, -1) (Diff)
/source/blender/editors/space_action/space_action.c (+16, -1) (Diff)
/source/blender/editors/space_buttons/buttons_context.c (+0, -30) (Diff)
/source/blender/editors/space_buttons/space_buttons.c (+57, -1) (Diff)
/source/blender/editors/space_clip/space_clip.c (+21, -0) (Diff)
/source/blender/editors/space_graph/space_graph.c (+16, -1) (Diff)
/source/blender/editors/space_image/space_image.c (+29, -1) (Diff)
/source/blender/editors/space_logic/space_logic.c (+20, -1) (Diff)
/source/blender/editors/space_nla/space_nla.c (+16, -1) (Diff)
/source/blender/editors/space_node/node_edit.c (+0, -28) (Diff)
/source/blender/editors/space_node/space_node.c (+37, -0) (Diff)
/source/blender/editors/space_outliner/outliner_draw.c (+5, -0) (Diff)
/source/blender/editors/space_outliner/outliner_edit.c (+0, -33) (Diff)
/source/blender/editors/space_outliner/outliner_intern.h (+1, -0) (Diff)
/source/blender/editors/space_outliner/outliner_tools.c (+6, -5) (Diff)
/source/blender/editors/space_outliner/space_outliner.c (+35, -1) (Diff)
/source/blender/editors/space_sequencer/space_sequencer.c (+19, -0) (Diff)
/source/blender/editors/space_text/space_text.c (+17, -1) (Diff)
/source/blender/editors/space_view3d/space_view3d.c (+62, -1) (Diff)
/source/blender/editors/util/ed_util.c (+6, -13) (Diff)
/source/blender/makesrna/intern/rna_ID.c (+1, -1) (Diff)
/source/blender/makesrna/intern/rna_main_api.c (+5, -4) (Diff)
/source/blender/nodes/shader/node_shader_tree.c (+1, -1) (Diff)
/source/blender/render/intern/source/pipeline.c (+3, -1) (Diff)
/source/blender/render/intern/source/render_texture.c (+2, -1) (Diff)
/source/blender/windowmanager/intern/wm_event_system.c (+2, -2) (Diff)
/source/blender/windowmanager/intern/wm_init_exit.c (+3, -2) (Diff)
/source/blender/windowmanager/WM_api.h (+1, -1) (Diff)
/source/gameengine/GamePlayer/ghost/GPG_ghost.cpp (+1, -0) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021