Fix T48844: Nodetrees of appended materials/textures/etc. were not correctly made local.

Previous commits now allow to use id_make_local() here, as one would expect.

Note that I also checked T36003 case, working fine as well with new code.
This commit is contained in:
Bastien Montagne 2016-07-14 18:18:54 +02:00
parent bcfd8d9ab8
commit 39dee8a201
Notes: blender-bot 2023-02-14 10:21:15 +01:00
Referenced by issue #48856, Cycles/Cuda crash when live rendering an object with an animated array modifier
Referenced by issue #48859, From Buildbot: impossible to modify values in an appended maerial
Referenced by issue #48844, Appended Cycles materials are not editable in Properties panel/Node Editor
1 changed files with 2 additions and 8 deletions

View File

@ -1602,14 +1602,8 @@ void BKE_library_make_local(Main *bmain, const Library *lib, const bool untagged
{
if (lib == NULL || id->lib == lib) {
if (id->lib) {
/* for Make Local > All we should be calling id_make_local,
* but doing that breaks append (see #36003 and #36006), we
* we should make it work with all datablocks and id.us==0 */
id_clear_lib_data(bmain, id); /* sets 'id->tag' */
/* why sort alphabetically here but not in
* id_clear_lib_data() ? - campbell */
id_sort_by_name(lbarray[a], id);
/* In this specific case, we do want to make ID local even if it has no local usage yet... */
id_make_local(bmain, id, false, true);
}
else {
id->tag &= ~(LIB_TAG_EXTERN | LIB_TAG_INDIRECT | LIB_TAG_NEW);