Merged changes from trunk to soc-2008-mxcurioni: svn merge -r 14534:14595 https:...
[blender.git] / source / blender / src / buttons_object.c
index d58a283b6d185144e3a167ec3d3fc30ed82503ea..f9951bbbcb720caae25e5a86ef49ba272e43a794 100644 (file)
@@ -2130,6 +2130,7 @@ void pointcache_bake(PTCacheID *pid, int startframe)
                        BKE_ptcache_id_time(pid, 0.0f, &cstart, &cend, NULL);
 
                        cache->flag &= ~PTCACHE_BAKING;
+
                        BKE_ptcache_id_reset(pid, PTCACHE_RESET_OUTDATED);
                }
                else {
@@ -2512,18 +2513,15 @@ static uiBlock *add_groupmenu(void *arg_unused)
 
        uiDefBut(block, BUTM, B_NOP, "ADD NEW",         0, 20, 160, 19, NULL, 0.0, 0.0, 1, -1, "");
        for(group= G.main->group.first; group; group= group->id.next, index++) {
+               if(group->id.lib) strcpy(str, "L  ");
+               else strcpy(str, "   ");
+               strcat(str, group->id.name+2);
+               uiDefBut(block, BUTM, B_NOP, str,       xco*160, -20*yco, 160, 19, NULL, 0.0, 0.0, 1, index, "");
                
-               /*if(group->id.lib) strcpy(str, "L  ");*/ /* we cant allow adding objects inside linked groups, it wont be saved anyway */
-               if(group->id.lib==0) {
-                       strcpy(str, "   ");
-                       strcat(str, group->id.name+2);
-                       uiDefBut(block, BUTM, B_NOP, str,       xco*160, -20*yco, 160, 19, NULL, 0.0, 0.0, 1, index, "");
-                       
-                       yco++;
-                       if(yco>24) {
-                               yco= 0;
-                               xco++;
-                       }
+               yco++;
+               if(yco>24) {
+                       yco= 0;
+                       xco++;
                }
        }
        
@@ -2592,25 +2590,21 @@ static void object_panel_object(Object *ob)
                        xco= 160;
                        
                        uiBlockBeginAlign(block);
-                       uiSetButLock(GET_INT_FROM_POINTER(group->id.lib), ERROR_LIBDATA_MESSAGE); /* We cant actually use this button */
                        but = uiDefBut(block, TEX, B_IDNAME, "GR:",     10, 120-yco, 150, 20, group->id.name+2, 0.0, 21.0, 0, 0, "Displays Group name. Click to change.");
                        uiButSetFunc(but, test_idbutton_cb, group->id.name, NULL);
-                       uiClearButLock();
                        
                        if(group->id.lib) {
                                but= uiDefIconBut(block, BUT, B_NOP, ICON_PARLIB, 160, 120-yco, 20, 20, NULL, 0.0, 0.0, 0.0, 0.0, "Make Group local");
                                uiButSetFunc(but, group_local, group, NULL);
                                xco= 180;
-                       } else { /* cant remove objects from linked groups */
-                               but = uiDefIconBut(block, BUT, B_NOP, VICON_X, xco, 120-yco, 20, 20, NULL, 0.0, 0.0, 0.0, 0.0, "Remove Group membership");
-                               uiButSetFunc(but, group_ob_rem, group, ob);
                        }
+                       but = uiDefIconBut(block, BUT, B_NOP, VICON_X, xco, 120-yco, 20, 20, NULL, 0.0, 0.0, 0.0, 0.0, "Remove Group membership");
+                       uiButSetFunc(but, group_ob_rem, group, ob);
                        
                        yco+= 20;
                        xco= 10;
                        
                        /* layers */
-                       uiSetButLock(GET_INT_FROM_POINTER(group->id.lib), ERROR_LIBDATA_MESSAGE);
                        uiBlockBeginAlign(block);
                        for(a=0; a<5; a++)
                                uiDefButBitI(block, TOG, 1<<a, REDRAWVIEW3D, "",        (short)(xco+a*(dx/2)), 120-yco, (short)(dx/2), (short)(dy/2), (int *)&(group->layer), 0, 0, 0, 0, "");
@@ -2625,8 +2619,7 @@ static void object_panel_object(Object *ob)
                                uiDefButBitI(block, TOG, 1<<(a+10), REDRAWVIEW3D, "",   (short)(xco+a*(dx/2)), 105-yco, (short)(dx/2), (short)(dy/2), (int *)&(group->layer), 0, 0, 0, 0, "");
                        
                        uiBlockEndAlign(block);
-                       uiClearButLock();
-
+                       
                        yco+= 40;
                }
        }