Fix T50385: Deadlock in BKE_libblock_remap_locked.

Am pretty sure node update should not touch to Main database like that,
but for now let's allow it, I guess the hack is needed for things like
Sverchok. ;)
This commit is contained in:
Bastien Montagne
2017-01-09 10:43:23 +01:00
parent e713009e9b
commit 9c756162ae

View File

@@ -562,8 +562,14 @@ void BKE_libblock_remap_locked(
default:
break;
}
/* Node trees may virtually use any kind of data-block... */
/* XXX Yuck!!!! nodetree update can do pretty much any thing when talking about py nodes,
* including creating new data-blocks (see T50385), so we need to unlock main here. :(
* Why can't we have re-entrent locks? */
BKE_main_unlock(bmain);
libblock_remap_data_postprocess_nodetree_update(bmain, new_id);
BKE_main_lock(bmain);
/* Full rebuild of DAG! */
DAG_relations_tag_update(bmain);