Cleanup: get rid of some now unused animdata ID management custom functions.

That's the kind of commit that are nice to do - getting rid of
half-working custom pieces of code, now that we have generic tools
to do same thing. ;)
This commit is contained in:
Bastien Montagne 2017-06-09 16:29:20 +02:00
parent f097e73a2a
commit e0bc5b533c
Notes: blender-bot 2023-02-14 06:53:18 +01:00
Referenced by issue #52149, Crash on entering Edit Mode of high poly mesh used by Shrink Wrap
Referenced by issue #51960, 2.79-testbuild1 Crash with SIGABRT on macos, OOM on linux
Referenced by issue #51946, "Delete Lower" Multires subdivision level.
Referenced by issue #51950, Abnormally long Cycles OpenCL GPU render times with certain panoramic camera settings
Referenced by issue #51909, Blender 2.79 fur denoise bug
Referenced by issue #51910, where is the problem?
Referenced by issue #51896, Filmic default view isn't working correctly
Referenced by issue #51889, Broken UI after creating new file in 2.79 test and daily builds
Referenced by issue #51827, eevee don't work on mac osx
Referenced by issue #51833, Principled BSDF Transmission works incorrectly if exposure is low. Blender 2.79
Referenced by issue #51822, Mac OS blender 2.79 test build opencl render
2 changed files with 0 additions and 73 deletions

View File

@ -89,12 +89,6 @@ typedef enum eAnimData_MergeCopy_Modes {
void BKE_animdata_merge_copy(struct ID *dst_id, struct ID *src_id, eAnimData_MergeCopy_Modes action_mode, bool fix_drivers);
/* Make Local */
void BKE_animdata_make_local(struct AnimData *adt);
/* Re-Assign ID's */
void BKE_animdata_relink(struct AnimData *adt);
/* ************************************* */
/* KeyingSets API */

View File

@ -397,73 +397,6 @@ void BKE_animdata_merge_copy(ID *dst_id, ID *src_id, eAnimData_MergeCopy_Modes a
}
}
/* Make Local -------------------------------------------- */
static void make_local_strips(ListBase *strips)
{
NlaStrip *strip;
for (strip = strips->first; strip; strip = strip->next) {
if (strip->act) BKE_action_make_local(G.main, strip->act, false);
if (strip->remap && strip->remap->target) BKE_action_make_local(G.main, strip->remap->target, false);
make_local_strips(&strip->strips);
}
}
/* Use local copy instead of linked copy of various ID-blocks */
void BKE_animdata_make_local(AnimData *adt)
{
NlaTrack *nlt;
/* Actions - Active and Temp */
if (adt->action) BKE_action_make_local(G.main, adt->action, false);
if (adt->tmpact) BKE_action_make_local(G.main, adt->tmpact, false);
/* Remaps */
if (adt->remap && adt->remap->target) BKE_action_make_local(G.main, adt->remap->target, false);
/* Drivers */
/* TODO: need to remap the ID-targets too? */
/* NLA Data */
for (nlt = adt->nla_tracks.first; nlt; nlt = nlt->next)
make_local_strips(&nlt->strips);
}
/* When duplicating data (i.e. objects), drivers referring to the original data will
* get updated to point to the duplicated data (if drivers belong to the new data)
*/
void BKE_animdata_relink(AnimData *adt)
{
/* sanity check */
if (adt == NULL)
return;
/* drivers */
if (adt->drivers.first) {
FCurve *fcu;
/* check each driver against all the base paths to see if any should go */
for (fcu = adt->drivers.first; fcu; fcu = fcu->next) {
ChannelDriver *driver = fcu->driver;
DriverVar *dvar;
/* driver variables */
for (dvar = driver->variables.first; dvar; dvar = dvar->next) {
/* only change the used targets, since the others will need fixing manually anyway */
DRIVER_TARGETS_USED_LOOPER(dvar)
{
if (dtar->id && dtar->id->newid) {
dtar->id = dtar->id->newid;
}
}
DRIVER_TARGETS_LOOPER_END
}
}
}
}
/* Sub-ID Regrouping ------------------------------------------- */
/**