diff options
author | Matt Ebb <matt@mke3.net> | 2005-10-03 18:44:48 +0400 |
---|---|---|
committer | Matt Ebb <matt@mke3.net> | 2005-10-03 18:44:48 +0400 |
commit | 2e8d8f6b8f4b4294b4b7b4f47d931f4b0d29db4c (patch) | |
tree | 1c094b1c7eb9fdbe46f0d1e0880c9490507bb0a4 /source | |
parent | bec1e2572052e711b0785bb63f306dc961c77239 (diff) |
* Added copying curve resolution settings to the copy attributes (ctrl c) menu
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/src/editobject.c | 23 | ||||
-rw-r--r-- | source/blender/src/header_view3d.c | 3 |
2 files changed, 26 insertions, 0 deletions
diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c index 78405942ae6..ea748e63713 100644 --- a/source/blender/src/editobject.c +++ b/source/blender/src/editobject.c @@ -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; diff --git a/source/blender/src/header_view3d.c b/source/blender/src/header_view3d.c index fa966d79fab..370c51b9a22 100644 --- a/source/blender/src/header_view3d.c +++ b/source/blender/src/header_view3d.c @@ -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) { |