svn merge ^/trunk/blender -r41226:41227 .
[blender.git] / source / blender / blenkernel / intern / lattice.c
index ebf5492..84f9829 100644 (file)
@@ -255,7 +255,9 @@ void make_local_lattice(Lattice *lt)
        
        if(lt->id.lib==NULL) return;
        if(lt->id.us==1) {
-               id_clear_lib_data(&bmain->latt, (ID *)lt);
+               lt->id.lib= NULL;
+               lt->id.flag= LIB_LOCAL;
+               new_id(&bmain->latt, (ID *)lt, NULL);
                return;
        }
        
@@ -267,7 +269,9 @@ void make_local_lattice(Lattice *lt)
        }
        
        if(local && lib==0) {
-               id_clear_lib_data(&bmain->latt, (ID *)lt);
+               lt->id.lib= NULL;
+               lt->id.flag= LIB_LOCAL;
+               new_id(&bmain->latt, (ID *)lt, NULL);
        }
        else if(local && lib) {
                Lattice *ltn= copy_lattice(lt);