allow to write to libraries that are indirectly linked
This commit is contained in:
@@ -708,7 +708,7 @@ static PyObject *Blender_Save( PyObject * self, PyObject * args )
|
||||
"expected filename and optional int (overwrite flag) as arguments" );
|
||||
|
||||
for( li = G.main->library.first; li; li = li->id.next ) {
|
||||
if( BLI_streq( li->name, fname ) ) {
|
||||
if( li->parent==NULL && BLI_streq( li->name, fname ) ) {
|
||||
return EXPP_ReturnPyObjError( PyExc_AttributeError,
|
||||
"cannot overwrite used library" );
|
||||
}
|
||||
|
||||
@@ -883,7 +883,7 @@ void BIF_write_file(char *target)
|
||||
if (G.f & G_DOSCRIPTLINKS) BPY_do_pyscript(&G.scene->id, SCRIPT_ONSAVE);
|
||||
|
||||
for (li= G.main->library.first; li; li= li->id.next) {
|
||||
if (BLI_streq(li->name, target)) {
|
||||
if (li->parent==NULL && BLI_streq(li->name, target)) {
|
||||
error("Cannot overwrite used library");
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user