Revision: 15676
          
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=15676
Author:   campbellbarton
Date:     2008-07-21 19:05:59 +0200 (Mon, 21 Jul 2008)

Log Message:
-----------
allow to write to libraries that are indirectly linked

Modified Paths:
--------------
    trunk/blender/source/blender/python/api2_2x/Blender.c
    trunk/blender/source/blender/src/usiblender.c

Modified: trunk/blender/source/blender/python/api2_2x/Blender.c
===================================================================
--- trunk/blender/source/blender/python/api2_2x/Blender.c       2008-07-21 
16:59:46 UTC (rev 15675)
+++ trunk/blender/source/blender/python/api2_2x/Blender.c       2008-07-21 
17:05:59 UTC (rev 15676)
@@ -708,7 +708,7 @@
                                              "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" );
                }

Modified: trunk/blender/source/blender/src/usiblender.c
===================================================================
--- trunk/blender/source/blender/src/usiblender.c       2008-07-21 16:59:46 UTC 
(rev 15675)
+++ trunk/blender/source/blender/src/usiblender.c       2008-07-21 17:05:59 UTC 
(rev 15676)
@@ -883,7 +883,7 @@
        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;
                }


_______________________________________________
Bf-blender-cvs mailing list
Bf-blender-cvs@blender.org
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to