Merged changes in the trunk up to revision 30952.
[blender-staging.git] / source / blender / blenkernel / intern / library.c
index ef47c8c35b75047e881e83c5c8d223f1369daaf5..967cd5f452089f22d3db19fb9949c7cd8269b78b 100644 (file)
@@ -265,7 +265,8 @@ int id_copy(ID *id, ID **newid, int test)
                        if(!test) *newid= (ID*)copy_texture((Tex*)id);
                        return 1;
                case ID_IM:
                        if(!test) *newid= (ID*)copy_texture((Tex*)id);
                        return 1;
                case ID_IM:
-                       return 0; /* not implemented */
+                       if(!test) *newid= (ID*)copy_image((Image*)id);
+                       return 1;
                case ID_WV:
                        return 0; /* deprecated */
                case ID_LT:
                case ID_WV:
                        return 0; /* deprecated */
                case ID_LT:
@@ -1407,3 +1408,12 @@ void rename_id(ID *id, char *name)
        
        new_id(lb, id, name);                           
 }
        
        new_id(lb, id, name);                           
 }
+
+void name_uiprefix_id(char *name, ID *id)
+{
+       name[0] = id->lib ? 'L':' ';
+       name[1] = id->flag & LIB_FAKEUSER ? 'F':' ';
+       name[2] = ' ';
+
+       strcpy(name+3, id->name+2);
+}