[Bf-blender-cvs] [ba1af2e] id-remap: Some cleanup.
Bastien Montagne
noreply at git.blender.org
Tue May 24 14:44:02 CEST 2016
Commit: ba1af2e1bfacb4dfe8ce2d1f046ae97a755cda97
Author: Bastien Montagne
Date: Tue May 24 14:43:48 2016 +0200
Branches: id-remap
https://developer.blender.org/rBba1af2e1bfacb4dfe8ce2d1f046ae97a755cda97
Some cleanup.
===================================================================
M source/blender/blenkernel/intern/library.c
M source/blender/blenkernel/intern/library_query.c
M source/blender/blenkernel/intern/object.c
M source/blender/editors/space_outliner/outliner_edit.c
===================================================================
diff --git a/source/blender/blenkernel/intern/library.c b/source/blender/blenkernel/intern/library.c
index 6fa5f36..57c32b0 100644
--- a/source/blender/blenkernel/intern/library.c
+++ b/source/blender/blenkernel/intern/library.c
@@ -226,7 +226,7 @@ void id_us_plus(ID *id)
void id_us_min(ID *id)
{
if (id) {
- const int limit = ID_FAKE_USERS(id);
+ const int limit = ID_FAKE_USERS(id);
if (id->us <= limit) {
printf("ID user decrement error: %s (from '%s'): %d <= %d\n",
diff --git a/source/blender/blenkernel/intern/library_query.c b/source/blender/blenkernel/intern/library_query.c
index 9eed486..ea4e8d8 100644
--- a/source/blender/blenkernel/intern/library_query.c
+++ b/source/blender/blenkernel/intern/library_query.c
@@ -798,9 +798,13 @@ static int foreach_libblock_id_users_callback(void *user_data, ID *UNUSED(self_i
IDUsersIter *iter = user_data;
if (*id_p && (*id_p == iter->id)) {
+#if 0
printf("%s uses %s (refcounted: %d, userone: %d, used_one: %d, used_one_active: %d)\n",
iter->curr_id->name, iter->id->name, (cb_flag & IDWALK_USER) ? 1 : 0, (cb_flag & IDWALK_USER_ONE) ? 1 : 0,
(iter->id->tag & LIB_TAG_EXTRAUSER) ? 1 : 0, (iter->id->tag & LIB_TAG_EXTRAUSER_SET) ? 1 : 0);
+#else
+ UNUSED_VARS(cb_flag);
+#endif
iter->count++;
}
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 2458f18..f456962 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -3369,39 +3369,6 @@ bool BKE_object_is_animated(Scene *scene, Object *ob)
return false;
}
-static void copy_object__forwardModifierLinks(
- void *UNUSED(userData), Object *UNUSED(ob), ID **idpoin, int UNUSED(cd_flag))
-{
- /* this is copied from ID_NEW; it might be better to have a macro */
- if (*idpoin && (*idpoin)->newid) *idpoin = (*idpoin)->newid;
-}
-
-void BKE_object_relink(Object *ob)
-{
- if (ob->id.lib)
- return;
-
- BKE_constraints_relink(&ob->constraints);
- if (ob->pose) {
- bPoseChannel *chan;
- for (chan = ob->pose->chanbase.first; chan; chan = chan->next) {
- BKE_constraints_relink(&chan->constraints);
- }
- }
- modifiers_foreachIDLink(ob, copy_object__forwardModifierLinks, NULL);
-
- if (ob->adt)
- BKE_animdata_relink(ob->adt);
-
- if (ob->rigidbody_constraint)
- BKE_rigidbody_relink_constraint(ob->rigidbody_constraint);
-
- ID_NEW(ob->parent);
-
- ID_NEW(ob->proxy);
- ID_NEW(ob->proxy_group);
-}
-
MovieClip *BKE_object_movieclip_get(Scene *scene, Object *ob, bool use_default)
{
MovieClip *clip = use_default ? scene->clip : NULL;
diff --git a/source/blender/editors/space_outliner/outliner_edit.c b/source/blender/editors/space_outliner/outliner_edit.c
index 082c4aa..d265b3c 100644
--- a/source/blender/editors/space_outliner/outliner_edit.c
+++ b/source/blender/editors/space_outliner/outliner_edit.c
@@ -632,7 +632,7 @@ void OUTLINER_OT_lib_relocate(wmOperatorType *ot)
}
/* XXX This does not work with several items
- * (ot is only called once in the end, due to the 'deffered' filebrowser invocation through event system...). */
+ * (it is only called once in the end, due to the 'deffered' filebrowser invocation through event system...). */
void lib_relocate_cb(
bContext *C, Scene *UNUSED(scene), TreeElement *te,
TreeStoreElem *UNUSED(tsep), TreeStoreElem *tselem, void *UNUSED(user_data))
More information about the Bf-blender-cvs
mailing list