Blender Git Loki
Git Commits -> Revision 41830cc
Revision 41830cc by Bastien Montagne (master) August 7, 2017, 18:34 (GMT) |
Refactor ID copying (and to some extent, ID freeing). This will allow much finer controll over how we copy data-blocks, from full copy in Main database, to "lighter" ones (out of Main, inside an already allocated datablock, etc.). This commit also transfers a llot of what was previously handled by per-ID-type custom code to generic ID handling code in BKE_library. Hopefully will avoid in future inconsistencies and missing bits we had all over the codebase in the past. It also adds missing copying handling for a few types, most notably Scene (which where using a fully customized handling previously). Note that the type of allocation used during copying (regular in Main, allocated but outside of Main, or not allocated by ID handling code at all) is stored in ID's, which allows to handle them correctly when freeing. This needs to be taken care of with caution when doing 'weird' unusual things with ID copying and/or allocation! As a final note, while rather noisy, this commit will hopefully not break too much existing branches, old 'API' has been kept for the main part, as a wrapper around new code. Cleaning it up will happen later. Design task : T51804 Phab Diff: D2714 |
Commit Details:
Full Hash: 41830cc432b9726cb64bc396af4dafbf591c17be
Parent Commit: 25b8eb4
Lines Changed: +2216, -1396
102 Modified Paths:
/source/blender/blenkernel/BKE_action.h (+4, -2) (Diff)
/source/blender/blenkernel/BKE_animsys.h (+3, -3) (Diff)
/source/blender/blenkernel/BKE_armature.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_brush.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_cachefile.h (+2, -0) (Diff)
/source/blender/blenkernel/BKE_camera.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_constraint.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_curve.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_font.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_freestyle.h (+1, -1) (Diff)
/source/blender/blenkernel/BKE_gpencil.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_group.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_idprop.h (+2, -1) (Diff)
/source/blender/blenkernel/BKE_image.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_key.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_lamp.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_lattice.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_library.h (+65, -5) (Diff)
/source/blender/blenkernel/BKE_linestyle.h (+11, -4) (Diff)
/source/blender/blenkernel/BKE_mask.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_material.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_mball.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_mesh.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_modifier.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_movieclip.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_node.h (+2, -0) (Diff)
/source/blender/blenkernel/BKE_object.h (+5, -5) (Diff)
/source/blender/blenkernel/BKE_paint.h (+5, -1) (Diff)
/source/blender/blenkernel/BKE_particle.h (+3, -0) (Diff)
/source/blender/blenkernel/BKE_pointcache.h (+1, -1) (Diff)
/source/blender/blenkernel/BKE_rigidbody.h (+3, -3) (Diff)
/source/blender/blenkernel/BKE_sca.h (+7, -7) (Diff)
/source/blender/blenkernel/BKE_scene.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_sequencer.h (+2, -2) (Diff)
/source/blender/blenkernel/BKE_sound.h (+2, -0) (Diff)
/source/blender/blenkernel/BKE_speaker.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_text.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_texture.h (+4, -3) (Diff)
/source/blender/blenkernel/BKE_tracking.h (+1, -1) (Diff)
/source/blender/blenkernel/BKE_world.h (+1, -0) (Diff)
/source/blender/blenkernel/intern/action.c (+51, -37) (Diff)
/source/blender/blenkernel/intern/anim_sys.c (+7, -6) (Diff)
/source/blender/blenkernel/intern/armature.c (+47, -31) (Diff)
/source/blender/blenkernel/intern/brush.c (+27, -23) (Diff)
/source/blender/blenkernel/intern/cachefile.c (+19, -9) (Diff)
/source/blender/blenkernel/intern/camera.c (+17, -8) (Diff)
/source/blender/blenkernel/intern/constraint.c (+15, -9) (Diff)
/source/blender/blenkernel/intern/curve.c (+28, -31) (Diff)
/source/blender/blenkernel/intern/font.c (+18, -1) (Diff)
/source/blender/blenkernel/intern/freestyle.c (+9, -9) (Diff)
/source/blender/blenkernel/intern/gpencil.c (+48, -33) (Diff)
/source/blender/blenkernel/intern/group.c (+23, -10) (Diff)
/source/blender/blenkernel/intern/idprop.c (+29, -22) (Diff)
/source/blender/blenkernel/intern/image.c (+40, -26) (Diff)
/source/blender/blenkernel/intern/key.c (+30, -21) (Diff)
/source/blender/blenkernel/intern/lamp.c (+37, -19) (Diff)
/source/blender/blenkernel/intern/lattice.c (+26, -19) (Diff)
/source/blender/blenkernel/intern/library.c (+353, -158) (Diff)
/source/blender/blenkernel/intern/library_remap.c (+88, -2) (Diff)
/source/blender/blenkernel/intern/linestyle.c (+57, -70) (Diff)
/source/blender/blenkernel/intern/mask.c (+20, -12) (Diff)
/source/blender/blenkernel/intern/material.c (+44, -27) (Diff)
/source/blender/blenkernel/intern/mball.c (+20, -17) (Diff)
/source/blender/blenkernel/intern/mesh.c (+36, -31) (Diff)
/source/blender/blenkernel/intern/modifier.c (+27, -2) (Diff)
/source/blender/blenkernel/intern/movieclip.c (+23, -15) (Diff)
/source/blender/blenkernel/intern/node.c (+147, -144) (Diff)
/source/blender/blenkernel/intern/object.c (+86, -84) (Diff)
/source/blender/blenkernel/intern/paint.c (+41, -24) (Diff)
/source/blender/blenkernel/intern/particle.c (+32, -25) (Diff)
/source/blender/blenkernel/intern/pointcache.c (+5, -4) (Diff)
/source/blender/blenkernel/intern/rigidbody.c (+17, -15) (Diff)
/source/blender/blenkernel/intern/sca.c (+17, -15) (Diff)
/source/blender/blenkernel/intern/scene.c (+282, -197) (Diff)
/source/blender/blenkernel/intern/sequencer.c (+12, -10) (Diff)
/source/blender/blenkernel/intern/sound.c (+29, -1) (Diff)
/source/blender/blenkernel/intern/speaker.c (+17, -11) (Diff)
/source/blender/blenkernel/intern/text.c (+34, -38) (Diff)
/source/blender/blenkernel/intern/texture.c (+69, -33) (Diff)
/source/blender/blenkernel/intern/tracking.c (+26, -18) (Diff)
/source/blender/blenkernel/intern/world.c (+35, -19) (Diff)
/source/blender/blenlib/BLI_vfontdata.h (+2, -0) (Diff)
/source/blender/blenlib/intern/freetypefont.c (+29, -0) (Diff)
/source/blender/blenloader/intern/readfile.c (+1, -1) (Diff)
/source/blender/blenloader/intern/writefile.c (+3, -0) (Diff)
/source/blender/editors/armature/armature_relations.c (+2, -2) (Diff)
/source/blender/editors/io/io_cache.c (+1, -1) (Diff)
/source/blender/editors/object/object_edit.c (+9, -9) (Diff)
/source/blender/editors/object/object_relations.c (+2, -2) (Diff)
/source/blender/editors/physics/particle_object.c (+1, -1) (Diff)
/source/blender/editors/render/render_shading.c (+4, -4) (Diff)
/source/blender/editors/screen/screen_edit.c (+6, -6) (Diff)
/source/blender/editors/space_sequencer/sequencer_edit.c (+3, -3) (Diff)
/source/blender/makesdna/DNA_ID.h (+8, -2) (Diff)
/source/blender/modifiers/intern/MOD_armature.c (+4, -4) (Diff)
/source/blender/modifiers/intern/MOD_bevel.c (+3, -11) (Diff)
/source/blender/modifiers/intern/MOD_displace.c (+1, -5) (Diff)
/source/blender/modifiers/intern/MOD_wave.c (+1, -5) (Diff)
/source/blender/modifiers/intern/MOD_weightvgedit.c (+0, -4) (Diff)
/source/blender/modifiers/intern/MOD_weightvgmix.c (+1, -5) (Diff)
/source/blender/modifiers/intern/MOD_weightvgproximity.c (+1, -5) (Diff)
/source/blender/windowmanager/intern/wm.c (+1, -1) (Diff)
/source/blender/blenkernel/BKE_animsys.h (+3, -3) (Diff)
/source/blender/blenkernel/BKE_armature.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_brush.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_cachefile.h (+2, -0) (Diff)
/source/blender/blenkernel/BKE_camera.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_constraint.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_curve.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_font.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_freestyle.h (+1, -1) (Diff)
/source/blender/blenkernel/BKE_gpencil.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_group.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_idprop.h (+2, -1) (Diff)
/source/blender/blenkernel/BKE_image.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_key.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_lamp.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_lattice.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_library.h (+65, -5) (Diff)
/source/blender/blenkernel/BKE_linestyle.h (+11, -4) (Diff)
/source/blender/blenkernel/BKE_mask.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_material.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_mball.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_mesh.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_modifier.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_movieclip.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_node.h (+2, -0) (Diff)
/source/blender/blenkernel/BKE_object.h (+5, -5) (Diff)
/source/blender/blenkernel/BKE_paint.h (+5, -1) (Diff)
/source/blender/blenkernel/BKE_particle.h (+3, -0) (Diff)
/source/blender/blenkernel/BKE_pointcache.h (+1, -1) (Diff)
/source/blender/blenkernel/BKE_rigidbody.h (+3, -3) (Diff)
/source/blender/blenkernel/BKE_sca.h (+7, -7) (Diff)
/source/blender/blenkernel/BKE_scene.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_sequencer.h (+2, -2) (Diff)
/source/blender/blenkernel/BKE_sound.h (+2, -0) (Diff)
/source/blender/blenkernel/BKE_speaker.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_text.h (+1, -0) (Diff)
/source/blender/blenkernel/BKE_texture.h (+4, -3) (Diff)
/source/blender/blenkernel/BKE_tracking.h (+1, -1) (Diff)
/source/blender/blenkernel/BKE_world.h (+1, -0) (Diff)
/source/blender/blenkernel/intern/action.c (+51, -37) (Diff)
/source/blender/blenkernel/intern/anim_sys.c (+7, -6) (Diff)
/source/blender/blenkernel/intern/armature.c (+47, -31) (Diff)
/source/blender/blenkernel/intern/brush.c (+27, -23) (Diff)
/source/blender/blenkernel/intern/cachefile.c (+19, -9) (Diff)
/source/blender/blenkernel/intern/camera.c (+17, -8) (Diff)
/source/blender/blenkernel/intern/constraint.c (+15, -9) (Diff)
/source/blender/blenkernel/intern/curve.c (+28, -31) (Diff)
/source/blender/blenkernel/intern/font.c (+18, -1) (Diff)
/source/blender/blenkernel/intern/freestyle.c (+9, -9) (Diff)
/source/blender/blenkernel/intern/gpencil.c (+48, -33) (Diff)
/source/blender/blenkernel/intern/group.c (+23, -10) (Diff)
/source/blender/blenkernel/intern/idprop.c (+29, -22) (Diff)
/source/blender/blenkernel/intern/image.c (+40, -26) (Diff)
/source/blender/blenkernel/intern/key.c (+30, -21) (Diff)
/source/blender/blenkernel/intern/lamp.c (+37, -19) (Diff)
/source/blender/blenkernel/intern/lattice.c (+26, -19) (Diff)
/source/blender/blenkernel/intern/library.c (+353, -158) (Diff)
/source/blender/blenkernel/intern/library_remap.c (+88, -2) (Diff)
/source/blender/blenkernel/intern/linestyle.c (+57, -70) (Diff)
/source/blender/blenkernel/intern/mask.c (+20, -12) (Diff)
/source/blender/blenkernel/intern/material.c (+44, -27) (Diff)
/source/blender/blenkernel/intern/mball.c (+20, -17) (Diff)
/source/blender/blenkernel/intern/mesh.c (+36, -31) (Diff)
/source/blender/blenkernel/intern/modifier.c (+27, -2) (Diff)
/source/blender/blenkernel/intern/movieclip.c (+23, -15) (Diff)
/source/blender/blenkernel/intern/node.c (+147, -144) (Diff)
/source/blender/blenkernel/intern/object.c (+86, -84) (Diff)
/source/blender/blenkernel/intern/paint.c (+41, -24) (Diff)
/source/blender/blenkernel/intern/particle.c (+32, -25) (Diff)
/source/blender/blenkernel/intern/pointcache.c (+5, -4) (Diff)
/source/blender/blenkernel/intern/rigidbody.c (+17, -15) (Diff)
/source/blender/blenkernel/intern/sca.c (+17, -15) (Diff)
/source/blender/blenkernel/intern/scene.c (+282, -197) (Diff)
/source/blender/blenkernel/intern/sequencer.c (+12, -10) (Diff)
/source/blender/blenkernel/intern/sound.c (+29, -1) (Diff)
/source/blender/blenkernel/intern/speaker.c (+17, -11) (Diff)
/source/blender/blenkernel/intern/text.c (+34, -38) (Diff)
/source/blender/blenkernel/intern/texture.c (+69, -33) (Diff)
/source/blender/blenkernel/intern/tracking.c (+26, -18) (Diff)
/source/blender/blenkernel/intern/world.c (+35, -19) (Diff)
/source/blender/blenlib/BLI_vfontdata.h (+2, -0) (Diff)
/source/blender/blenlib/intern/freetypefont.c (+29, -0) (Diff)
/source/blender/blenloader/intern/readfile.c (+1, -1) (Diff)
/source/blender/blenloader/intern/writefile.c (+3, -0) (Diff)
/source/blender/editors/armature/armature_relations.c (+2, -2) (Diff)
/source/blender/editors/io/io_cache.c (+1, -1) (Diff)
/source/blender/editors/object/object_edit.c (+9, -9) (Diff)
/source/blender/editors/object/object_relations.c (+2, -2) (Diff)
/source/blender/editors/physics/particle_object.c (+1, -1) (Diff)
/source/blender/editors/render/render_shading.c (+4, -4) (Diff)
/source/blender/editors/screen/screen_edit.c (+6, -6) (Diff)
/source/blender/editors/space_sequencer/sequencer_edit.c (+3, -3) (Diff)
/source/blender/makesdna/DNA_ID.h (+8, -2) (Diff)
/source/blender/modifiers/intern/MOD_armature.c (+4, -4) (Diff)
/source/blender/modifiers/intern/MOD_bevel.c (+3, -11) (Diff)
/source/blender/modifiers/intern/MOD_displace.c (+1, -5) (Diff)
/source/blender/modifiers/intern/MOD_wave.c (+1, -5) (Diff)
/source/blender/modifiers/intern/MOD_weightvgedit.c (+0, -4) (Diff)
/source/blender/modifiers/intern/MOD_weightvgmix.c (+1, -5) (Diff)
/source/blender/modifiers/intern/MOD_weightvgproximity.c (+1, -5) (Diff)
/source/blender/windowmanager/intern/wm.c (+1, -1) (Diff)