Page MenuHome

quick_hack_curve_extrude.diff

Authored By
Justin Dailey (dail)
Nov 13 2013, 4:21 PM
Size
1 KB
Subscribers
None

quick_hack_curve_extrude.diff

Index: source/blender/editors/curve/editcurve.c
===================================================================
--- source/blender/editors/curve/editcurve.c (revision 45048)
+++ source/blender/editors/curve/editcurve.c (working copy)
@@ -4334,6 +4334,7 @@
EditNurb *editnurb= cu->editnurb;
Nurb *nu, *newnu= NULL;
BezTriple *bezt, *newbezt = NULL;
+ eBezTriple_Handle prev_type= HD_AUTO;
BPoint *bp, *newbp = NULL;
float imat[4][4], temp[3];
int ok= 0;
@@ -4428,7 +4429,8 @@
newbezt+= nu->pntsu;
BEZ_SEL(newbezt);
cu->lastsel= newbezt;
- newbezt->h2= newbezt->h1;
+ prev_type= newbezt->h1; // get previous handle type
+ newbezt->h2= newbezt->h1= HD_AUTO; // set to auto to update nicely
bezt= nu->bezt+nu->pntsu-1;
ok= 1;
}
@@ -4440,7 +4442,8 @@
*newbezt= *bezt;
BEZ_SEL(newbezt);
cu->lastsel= newbezt;
- newbezt->h2= newbezt->h1;
+ prev_type= newbezt->h1; // get previous handle type
+ newbezt->h2= newbezt->h1= HD_AUTO; // set to auto to update nicely
copy_v3_v3(temp, bezt->vec[1]);
MEM_freeN(nu->bezt);
nu->bezt= newbezt;
@@ -4565,7 +4568,11 @@
WM_event_add_notifier(C, NC_GEOM|ND_DATA, obedit->data);
DAG_id_tag_update(obedit->data, 0);
-
+
+ // set back to previous handle type
+ if(nu->type == CU_BEZIER)
+ newbezt->h2= newbezt->h1= prev_type;
+
return OPERATOR_FINISHED;
}

File Metadata

Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
5f/98/759030b83140c8413e61b026f475

Event Timeline