Two-in-one commit:

- Proxy Armature: armature layer (visible bones) is now saved in proxy, so
  on file reload the layer settings are restored

- bugreport: disabling subsurf (for view) didn't change the total amounts
  in header.
This commit is contained in:
Ton Roosendaal
2006-11-29 21:59:19 +00:00
parent 5a3959e54b
commit e82f7818fc
4 changed files with 10 additions and 5 deletions

View File

@@ -148,7 +148,7 @@ void test_actionpoin_but(char *name, ID **idpp)
id= G.main->action.first;
while(id) {
if( strcmp(name, id->name+2)==0 ) {
id_lib_extern(id); /* checks lib data, sets correct flag for saving then */
id_us_plus(id);
*idpp= id;
return;
}

View File

@@ -3172,6 +3172,9 @@ static void editing_panel_armature_type(Object *ob, bArmature *arm)
but= uiDefButBitS(block, BUT_TOGDUAL, 1<<a, REDRAWVIEW3D, "", 18+a*dx, 123, dx, 15, &arm->layer, 0, 0, 0, 0, "");
uiButSetFunc(but, armature_layer_cb, &arm->layer, (void *)(1<<a));
}
/* quite bad here, but I don't know a better place for copy... */
if(ob->pose)
ob->pose->proxy_layer= arm->layer;
uiBlockBeginAlign(block);
uiDefButI(block, ROW, REDRAWVIEW3D, "Octahedron", 10, 100,90,20, &arm->drawtype, 0, ARM_OCTA, 0, 0, "Draw bones as octahedra");

View File

@@ -519,12 +519,12 @@ static void count_object(Object *ob, int sel, int totob)
ModifierData *md = modifiers_findByType(ob, eModifierType_Subsurf);
int totvert, totface;
subsurf= 1;
if (md) {
SubsurfModifierData *smd = (SubsurfModifierData*) md;
subsurf= 1<<(2*smd->levels);
if(smd->modifier.mode & eModifierMode_Realtime)
subsurf= 1<<(2*smd->levels);
}
else subsurf= 1;
totvert= subsurf*me->totvert*totob;
totface= subsurf*me->totface*totob;
@@ -731,7 +731,7 @@ void countall()
if(base->flag & SELECT) G.totobjsel++;
if(ob->parent && (ob->parent->transflag & OB_DUPLIVERTS)) {
if(ob->parent && (ob->parent->transflag & (OB_DUPLIVERTS|OB_DUPLIFACES))) {
int tot= count_duplilist(ob->parent);
G.totobj+=tot;
count_object(ob, base->flag & SELECT, tot);

View File

@@ -917,6 +917,8 @@ void pose_movetolayer(void)
if( movetolayer_short_buts(&lay, "Armature Layers")==0 ) return;
if(lay==0) return;
arm->layer= lay;
if(ob->pose)
ob->pose->proxy_layer= lay;
allqueue(REDRAWVIEW3D, 0);
allqueue(REDRAWACTION, 0);