Fix missing datablocks types in id_make_local.
Adding make_local for vfont/gpencil/group/freestyle linestyle/mask/scene/sound/text. Note that there are still some lose ends here, since some type are not handled by id_copy (Scene, Sound and VFont), which means in case a datablock of that type is used both directly and indirectly, localization will fail. Scene copying might be doable though (maybe with a simple new 'full shalow' mode to existing BKE_scene_copy?), not sure about sounds and vfonts... Situations where this becomes an issue should be very rare corner cases anyway.
This commit is contained in:
@@ -355,6 +355,13 @@ void BKE_scene_groups_relink(Scene *sce)
|
||||
BKE_rigidbody_world_groups_relink(sce->rigidbody_world);
|
||||
}
|
||||
|
||||
void BKE_scene_make_local(Main *bmain, Scene *sce, const bool lib_local)
|
||||
{
|
||||
/* For now should work, may need more work though to support all possible corner cases
|
||||
* (also scene_copy probably needs some love). */
|
||||
BKE_id_make_local_generic(bmain, &sce->id, true, lib_local);
|
||||
}
|
||||
|
||||
/** Free (or release) any data used by this scene (does not free the scene itself). */
|
||||
void BKE_scene_free(Scene *sce)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user