Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Fraser <alex@phatcore.com>2011-10-26 14:49:21 +0400
committerAlex Fraser <alex@phatcore.com>2011-10-26 14:49:21 +0400
commitf09d36d6bce6f2fb9f618f9bf57a91a3502ba3eb (patch)
tree3f693ae09a7d9352c8621b863ad10150b3d85cbc /source/blender/blenkernel/intern/action.c
parent944b07f5b7339f45bfb0bded22f64458cca3980b (diff)
Fix [#28772] Filepaths are not remmaped after making a library item local
Added a visitor function to simplify processing of file paths that are attached to IDs. This is used for images, and could be used for other ID types in future. Code reviewed by ideasman_42.
Diffstat (limited to 'source/blender/blenkernel/intern/action.c')
-rw-r--r--source/blender/blenkernel/intern/action.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/action.c b/source/blender/blenkernel/intern/action.c
index e46e2df8353..ac0697ddbf9 100644
--- a/source/blender/blenkernel/intern/action.c
+++ b/source/blender/blenkernel/intern/action.c
@@ -137,19 +137,14 @@ void make_local_action(bAction *act)
// XXX: double-check this; it used to be just single-user check, but that was when fake-users were still default
if ((act->id.flag & LIB_FAKEUSER) && (act->id.us<=1)) {
- act->id.lib= NULL;
- act->id.flag= LIB_LOCAL;
- new_id(&bmain->action, (ID *)act, NULL);
+ id_clear_lib_data(&bmain->action, (ID *)act);
return;
}
BKE_animdata_main_cb(bmain, make_localact_init_cb, &mlac);
if (mlac.local && mlac.lib==0) {
- act->id.lib= NULL;
- act->id.flag= LIB_LOCAL;
- //make_local_action_channels(act);
- new_id(&bmain->action, (ID *)act, NULL);
+ id_clear_lib_data(&bmain->action, (ID *)act);
}
else if (mlac.local && mlac.lib) {
mlac.actn= copy_action(act);