Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Ewering <blender@instinctive.de>2006-04-04 13:14:07 +0400
committerAlexander Ewering <blender@instinctive.de>2006-04-04 13:14:07 +0400
commit3be66f6d8ddf9e4661fb35530887f98536158241 (patch)
tree7eaf8a86e7dc1b8d5fa6a78d793e7a0ed650282f
parentb6c3f3f3527407f81eb8098aabcedf2e0355db8b (diff)
New option for convert-menu font->curve: "Curve (Single filling group)".
Since the text-object remake, it was not possible anymore to 'cut out' text from, say, a box made by a polycurve, by converting text to curve and then joining - only the first character would be cut out. This is because of the filling groups (nu/dl->charidx) I introduced for getting the vast speedup and the possibility of overlapping characters. The new convert menu option now assigns filling group 0 to all of the nurbs generated. Maybe filling groups should be exposed in the UI in general for curves - there are various occasions where they are useful. (Hint to the UI mafia! ;)
-rw-r--r--source/blender/src/editobject.c71
1 files changed, 38 insertions, 33 deletions
diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c
index a7626da621d..85979160986 100644
--- a/source/blender/src/editobject.c
+++ b/source/blender/src/editobject.c
@@ -2245,6 +2245,7 @@ void convertmenu(void)
Base *base, *basen, *basact, *basedel=NULL;
Object *obact, *ob, *ob1;
Curve *cu;
+ Nurb *nu;
MetaBall *mb;
Mesh *me;
DispList *dl;
@@ -2260,7 +2261,7 @@ void convertmenu(void)
basact= BASACT; /* will be restored */
if(obact->type==OB_FONT) {
- nr= pupmenu("Convert Font to%t|Curve");
+ nr= pupmenu("Convert Font to%t|Curve%x1|Curve (Single filling group)%x2");
if(nr>0) ok= 1;
}
else if(obact->type==OB_MBALL) {
@@ -2340,41 +2341,45 @@ void convertmenu(void)
}
}
else if(ob->type==OB_FONT) {
- if(nr==1) {
-
- ob->flag |= OB_DONE;
-
- ob->type= OB_CURVE;
- cu= ob->data;
-
- if(cu->vfont) {
- cu->vfont->id.us--;
- cu->vfont= 0;
- }
- if(cu->vfontb) {
- cu->vfontb->id.us--;
- cu->vfontb= 0;
- }
- if(cu->vfonti) {
- cu->vfonti->id.us--;
- cu->vfonti= 0;
- }
- if(cu->vfontbi) {
- cu->vfontbi->id.us--;
- cu->vfontbi= 0;
- }
- /* other users */
- if(cu->id.us>1) {
- ob1= G.main->object.first;
- while(ob1) {
- if(ob1->data==cu) {
- ob1->type= OB_CURVE;
- ob1->recalc |= OB_RECALC;
- }
- ob1= ob1->id.next;
+ ob->flag |= OB_DONE;
+
+ ob->type= OB_CURVE;
+ cu= ob->data;
+
+ if(cu->vfont) {
+ cu->vfont->id.us--;
+ cu->vfont= 0;
+ }
+ if(cu->vfontb) {
+ cu->vfontb->id.us--;
+ cu->vfontb= 0;
+ }
+ if(cu->vfonti) {
+ cu->vfonti->id.us--;
+ cu->vfonti= 0;
+ }
+ if(cu->vfontbi) {
+ cu->vfontbi->id.us--;
+ cu->vfontbi= 0;
+ }
+ /* other users */
+ if(cu->id.us>1) {
+ ob1= G.main->object.first;
+ while(ob1) {
+ if(ob1->data==cu) {
+ ob1->type= OB_CURVE;
+ ob1->recalc |= OB_RECALC;
}
+ ob1= ob1->id.next;
}
}
+ if (nr==2) {
+ nu= cu->nurb.first;
+ while(nu) {
+ nu->charidx= 0;
+ nu= nu->next;
+ }
+ }
}
else if ELEM(ob->type, OB_CURVE, OB_SURF) {
if(nr==1) {