Get rid of BKE_key_make_local().

This function was only a wrapper around id_clear_lib_data(), and shapekeys
are not linkable nor shareable anyway, no point keeping this currently,
was only adding confusion about shapekey 'status' as a datatblock.
This commit is contained in:
Bastien Montagne 2016-07-14 13:07:45 +02:00
parent f87603662d
commit e10ddc7a91
6 changed files with 4 additions and 18 deletions

View File

@ -53,7 +53,6 @@ void BKE_key_free_nolib(struct Key *key);
struct Key *BKE_key_add(struct ID *id);
struct Key *BKE_key_copy(struct Main *bmain, struct Key *key);
struct Key *BKE_key_copy_nolib(struct Key *key);
void BKE_key_make_local(struct Main *bmain, struct Key *key, const bool force_local);
void BKE_key_sort(struct Key *key);
void key_curve_position_weights(float t, float data[4], int type);

View File

@ -234,7 +234,7 @@ void BKE_curve_make_local(Main *bmain, Curve *cu, const bool force_local)
if (!is_lib) {
id_clear_lib_data(bmain, &cu->id);
if (cu->key) {
BKE_key_make_local(bmain, cu->key, force_local);
id_clear_lib_data(bmain, &cu->key->id);
}
BKE_id_expand_local(&cu->id);
}

View File

@ -203,18 +203,6 @@ Key *BKE_key_copy_nolib(Key *key)
return keyn;
}
void BKE_key_make_local(Main *bmain, Key *key, const bool UNUSED(force_local))
{
/* Note that here for now we simply just make it local...
* Sounds fishy behavior, but since skeys are not *real* IDs... */
if (!ID_IS_LINKED_DATABLOCK(key)) {
return;
}
id_clear_lib_data(bmain, &key->id);
}
/* Sort shape keys and Ipo curves after a change. This assumes that at most
* one key was moved, which is a valid assumption for the places it's
* currently being called.

View File

@ -349,7 +349,7 @@ void BKE_lattice_make_local(Main *bmain, Lattice *lt, const bool force_local)
if (!is_lib) {
id_clear_lib_data(bmain, &lt->id);
if (lt->key) {
BKE_key_make_local(bmain, lt->key, force_local);
id_clear_lib_data(bmain, &lt->key->id);
}
BKE_id_expand_local(&lt->id);
}

View File

@ -317,8 +317,7 @@ bool id_make_local(Main *bmain, ID *id, const bool test, const bool force_local)
case ID_IP:
return false; /* deprecated */
case ID_KE:
if (!test) BKE_key_make_local(bmain, (Key *)id, force_local);
return true;
return false; /* can't be linked */
case ID_WO:
if (!test) BKE_world_make_local(bmain, (World *)id, force_local);
return true;

View File

@ -574,7 +574,7 @@ void BKE_mesh_make_local(Main *bmain, Mesh *me, const bool force_local)
if (!is_lib) {
id_clear_lib_data(bmain, &me->id);
if (me->key) {
BKE_key_make_local(bmain, me->key, force_local);
id_clear_lib_data(bmain, &me->key->id);
}
BKE_id_expand_local(&me->id);
}