* Added copying curve resolution settings to the copy attributes (ctrl c) menu

This commit is contained in:
Matt Ebb
2005-10-03 14:44:48 +00:00
parent bec1e25720
commit 2e8d8f6b8f
2 changed files with 26 additions and 0 deletions

View File

@@ -2618,6 +2618,10 @@ void copy_attr_menu()
if(ob->type == OB_FONT) strcat(str, "|Font Settings%x18|Bevel Settings%x19");
if(ob->type == OB_CURVE) strcat(str, "|Bevel Settings%x19");
if((ob->type == OB_FONT) || (ob->type == OB_CURVE)) {
strcat(str, "|Curve Resolution%x25");
}
if(ob->type==OB_MESH){
strcat(str, "|Subdiv%x21");
@@ -2642,6 +2646,7 @@ void copy_attr(short event)
Object *ob, *obt;
Base *base;
Curve *cu, *cu1;
Nurb *nu;
void *poin1, *poin2=0;
if(G.scene->id.lib) return;
@@ -2781,6 +2786,24 @@ void copy_attr(short event)
base->object->recalc |= OB_RECALC_DATA;
}
}
else if(event==25) { /* curve resolution */
if ELEM(base->object->type, OB_CURVE, OB_FONT) {
cu= ob->data;
cu1= base->object->data;
cu1->resolu= cu->resolu;
nu= cu1->nurb.first;
while(nu) {
nu->resolu= cu1->resolu;
nu= nu->next;
}
base->object->recalc |= OB_RECALC_DATA;
}
}
else if(event==20) { /* particle settings */
PartEff *pa1, *pa2;
char *p1, *p2;

View File

@@ -1735,6 +1735,7 @@ static void do_view3d_edit_object_copyattrmenu(void *arg, int event)
case 22:
case 23:
case 24:
case 25:
copy_attr((short)event);
break;
}
@@ -1781,9 +1782,11 @@ static uiBlock *view3d_edit_object_copyattrmenu(void *arg_unused)
if(ob->type == OB_FONT) {
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Font Settings|Ctrl C, 18", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 18, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Bevel Settings|Ctrl C, 19", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 19, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Curve Resolution|Ctrl C, 20", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 25, "");
}
if(ob->type == OB_CURVE) {
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Bevel Settings|Ctrl C, 19", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 19, "");
uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Curve Resolution|Ctrl C, 20", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 25, "");
}
if(ob->type==OB_MESH) {