1
1

Compare commits

...

71 Commits

Author SHA1 Message Date
59908f5eb7 Merge remote-tracking branch 'origin/master' into gsoc2016-improved_extrusion 2017-07-26 11:25:24 +01:00
595f2ca2e0 Curves: Extend and batch extend operators
Renamed "Extend" to "Intersect" and "Batch Extend" to "Extend".
2017-07-26 11:23:41 +01:00
1296a30a24 Merge remote-tracking branch 'origin/master' into gsoc2016-improved_extrusion 2017-04-11 10:40:31 +01:00
27db9d43f6 Merge remote-tracking branch 'origin/master' into gsoc2016-improved_extrusion
Conflicts:
	release/datafiles/locale
	release/scripts/addons
	release/scripts/addons_contrib
2017-02-01 12:04:18 +00:00
34f3fd1001 Merge remote-tracking branch 'origin/master' into gsoc2016-improved_extrusion 2017-01-03 21:38:51 +00:00
3cb4d8d03c Curves: Chamfer and fillet operators
Fixed some inconsistency on user interaction:

 - Chamfer and fillet only enter modal when the selected handle is vector type
 - Commented all the tools implemented from the Specials menu. They were not being called on modal.
2017-01-03 21:23:45 +00:00
c939bd1b3e Update submodules. 2016-12-14 21:49:10 +00:00
e96e67ad77 Curves: Some tweaks to the work that was concluded during GSoC 2016
If this has not yet been committed:

- Fixed some bugs with the fillet and chamfer operators (filleting and chamfering first and last handles).
- Fixed user interaction with fillet and chamfer.
2016-12-14 21:37:51 +00:00
d4eb10ecc6 Curves: Fillet and chamfer operator
Refactored the fillet and chamfer operators. Fixed user interaction for MOUSEMOVE event for fillet operator. Numinput still needs to be checked.
2016-10-05 14:05:51 +01:00
7fb1b6a10f Curves: GSoC 2016 - Bezier curve improvements
Added docstrings to all functions.
2016-08-19 23:54:28 +01:00
1471cfdba8 Curves: Keymaps
Added keymaps for extend, batch extend, trim, offset, fillet and chamfer tools.
2016-08-18 19:08:48 +01:00
cc7bda9dcc Merge remote-tracking branch 'origin/master' into gsoc2016-improved_extrusion 2016-08-17 22:34:34 +01:00
5b31c6abc9 Curves: fillet and chamfer operator
The modal operators for the fillet and chamfer operators are now 90% complete.
On the chamfer operator, an option is needed to handle angle numinput. It would also be nice to have some sort of circular input for the angle (currently it is linked to the x variation of the cursor position).
For fillet, there is some kind of bug that corrupts curve data.

Due to the above mentioned reasons, modal operators are still commented.
2016-08-17 22:24:23 +01:00
d85b6d6db0 Curves: Chamfer and offset operators
Offset operator: Fixed it to work with vector and free handles.

Chamfer: The operator now preserves all settings from the handles it is modifying (radius, tilt, weight, handle type, etc...).
2016-08-16 00:02:34 +01:00
87f5e0cb95 Curves: Offset operator
Offset now works with auto, align and vector type handles.
2016-08-15 14:54:45 +01:00
b5a77c60a0 Curves: fillet and chamfer
Added support to fillet and chamfer cyclic splines.
Occasionaly, with no apparent reason, the following assertion fails

blender-build/blender/source/blender/blenlib/intern/BLI_ghash.c:458, ghash_insert_ex(), at '(gh->flag & GHASH_FLAG_ALLOW_DUPES) || (BLI_ghash_haskey(gh, key) == 0)
2016-08-15 13:10:06 +01:00
64110dece3 Curves: Fillet and chamfer
Fixed a calculation error in the fillet operator. Limited the chamfer algorithm to just run on the points inbetween the first and the last handles, since it makes no sense to chamfer the start of a line. This brings a problem with cyclic splines though, which will be addressed in a later commit.
2016-08-14 17:09:38 +01:00
c5794b4f08 Curves: Fillet and chamfer operator
Replaced calls to memcpy with BezTriples with calls to ED_curve_beztcpy, to prevent errors.
2016-08-14 16:30:29 +01:00
7088a7d88d Curves: Operator's interface
Added interface options to call all operators. They are available on the tool shelf, under Curve Tools->Modelling, and on the Edit Curve Specials menu.
2016-08-14 16:03:07 +01:00
505cd1865e Curves: Offset operator
Added support for collinear handles and cyclic splines.
Changed the way offset direction is corrected. Previously, the code checked for intersections between the offset spline and the original one. I replaced this with vector calculus.
2016-08-14 15:25:38 +01:00
276ee0b8ac Merge remote-tracking branch 'origin/master' into gsoc2016-improved_extrusion 2016-08-12 22:57:32 +01:00
5a305e2dd0 Curves: Extend and Trim tools
Some code refactoring. Added radius, tilt and weight interpolation for the extend and trim tools.
2016-08-12 20:18:40 +01:00
88da231cc6 Curves: Extend, Batch Extend and Offset operators
Fixed a bug in the Extend operator. Refactored the Extend operator. Refactored the Batch Extend operator to make use of the existing Extend operator.

Started working on a fix for collinear handles on the offset operator. Current changes are ineffective.
2016-08-12 17:05:17 +01:00
7d7cdb5348 Curves: Extend and Batch Extend operator
Fixed a few bugs on the Extend operator.
Fixed memory leaks on the Batch Extend operator.
2016-08-11 23:20:25 +01:00
8708e50bed Curves: Offset operator
Fully implemented the modal operator for the offset tool. Also fixed a few bugs.There is still a bug when calculating the correct offset direction. If the distance is sufficiently high, or if the curve is too tight on a few places, the reverse_offset function returns true even though that is not what we want. Passing in a different BezTriple offset by a precision distance (such as 10e-5) should fix it, though attempts at this have proved unsuccessful.

Regarding editmesh_bevel.c, fixed a trailing whitespace that I found by chance.
2016-08-07 22:31:50 +01:00
325e62e705 Curves: Trim operator
Fixed the radius = 0 bug, which resulted in no bevel. Canged the way the new BezTriples were filled in, in order to preserve all the previous properties.
2016-08-06 12:34:00 +01:00
c6200a6c67 Curves: Extend and Trim operator
Extend operator: fixed memory related issues
Trim operator: idem, and some bugs
2016-08-03 17:27:46 +01:00
26cdda907b Curves: Fillet operator
Forget the last one. This commit contains a formal mathematical fillet operator.
2016-08-01 13:10:35 +01:00
96af6e19ab Curves: Fillet operator
Implemented a fillet operator. This operator is everything but mathematically correct (to get a radius 1 fillet, you need to input radius 1.73; endpoints do not match), but it achieves a nice visual result.
2016-08-01 12:59:22 +01:00
046bdb5216 Curves: Offset and Chamfer operator
Commented out the mouse functionality. Code for handling keyboard input needs to be added. Once it is added, the invoke and modal functions are ready to go.
2016-07-31 17:45:12 +01:00
7a96eef2de Curves: Chamfer
Implemented the chamfer operator for one selected vertex and with parameters controlled through the Tool Shelf.
2016-07-30 20:58:34 +01:00
5d403a6dc3 Merge remote-tracking branch 'origin/master' into gsoc2016-improved_extrusion 2016-07-30 15:41:24 +01:00
3a9d719df8 Curves: Offset operator
Added support for mouse interaction with the offset operator.
Fixed a memory leak in the get_intersections function.
2016-07-30 15:27:28 +01:00
ea311fc394 Curves: Batch extend operator
Concluded the implementation of the Batch extend operator.
Though some code was reused from the Extend operator, the main algorithm is different.
2016-07-29 23:30:10 +01:00
7563bd3727 Curves: Batch extend operator
Started the implementation of the batch extend operator. Faulty memory handling on the Extend operator is currently causing it to fail.
2016-07-29 00:24:21 +01:00
ea1752cae1 Curves: Offset operator
The operator works if there are no inflection points. Function "reverse_offset" will fix that once complete.
2016-07-27 00:00:38 +01:00
c0d2f8e9a3 Curves: Offset operator 2016-07-25 23:57:01 +01:00
b15cbe09a7 Curves: Trim operator
Fixed a few memory issues.
2016-07-25 00:00:38 +01:00
81d71c464a Curves: Offset operator
Started the implementation of the offset operator.
Added interface options for both the Trim and the Offset operator.
2016-07-24 01:07:08 +01:00
66c25206f1 Curves: Trim operator
Concluded the implementation of the trim operator.
2016-07-23 00:30:07 +01:00
432e811eac Curves: Trim operator
The trim operator works fine in 1/3 cases.
2016-07-21 22:43:21 +01:00
fb53418939 Curves: Trim operator
Fixed all memory leaks. There are a few occurences of the error
Memoryblock free: pointer not in memlist
2016-07-20 23:29:12 +01:00
315b45c7aa Merge remote-tracking branch 'origin/master' into gsoc2016-improved_extrusion 2016-07-19 23:12:27 +01:00
82d2de2cef Curves: Trim operator
Fixed memory leaks (WIP).
2016-07-19 23:11:56 +01:00
6178bdef4a Curves: Trim operator
Fixed memory leaks. There are still many. Heap becomes corrupted very easily.
DO NOT CALL TRIM OPERATOR unless for debugging purposes.
2016-07-06 23:11:31 +01:00
a68c51dc85 Curves: Trim operator
Fixed a few bugs on the trim operator
2016-07-05 20:47:05 +01:00
1e13232b72 Merge remote-tracking branch 'origin/master' into gsoc2016-improved_extrusion 2016-07-04 18:13:13 +01:00
af2d1c69d3 Curves: Trim operator
Concluded the implementation of the operator. There is a bug with the chop function.
2016-07-04 18:11:51 +01:00
3f21e4a322 Curves: Trim tool
Fixed an issue with ratio_to_segment.
2016-07-01 17:20:37 +01:00
72e084d082 Merge remote-tracking branch 'origin/master' into gsoc2016-improved_extrusion 2016-06-30 00:39:40 +01:00
39efb16bdf Curves: Trim operator
Implemented a helper functions. Furthered the implementation of the exec function.
2016-06-30 00:36:27 +01:00
171905cc37 Curves: Trim operator
Continued the implementation of the main function. Implemented two helper functions.
2016-06-28 20:40:43 +01:00
c9c7524b12 Curves: Trim operator
Concluded the implementation of the spline_X_shape function.
Advanced the implementation of the operator's main function.
2016-06-27 23:39:50 +01:00
e1dc0ed47c Merge remote-tracking branch 'origin/master' into gsoc2016-improved_extrusion 2016-06-25 23:30:09 +01:00
2548ca35e2 Curves: Extend tool/ Trim tool
Extend tool: fixed a few bugs, as described by dphantom in
http://blenderartists.org/forum/showthread.php?397450-GSoC-2016-Improvements-to-Bezier-Curves&p=3066750&viewfull=1#post3066750

Trim tool: Implemented spline_X_shape (helper function)
2016-06-25 23:27:33 +01:00
2ac3bc6b1b Curves: Extend tool
Fixed a bug with memory that was generating wrong results.
This commit also contains some of the code for the Trim tool, though most of it is commented out.
2016-06-22 21:10:46 +01:00
d78e1d11da Merge remote-tracking branch 'origin/master' into gsoc2016-improved_extrusion 2016-06-22 21:05:14 +01:00
8cfa42dcd6 Merge remote-tracking branch 'origin/master' into gsoc2016-improved_extrusion 2016-06-20 19:39:52 +01:00
4daf1c17e4 Curve: Concluded the implementation of the Extend operator
This commit contains the full implementation of the Extend operator, plus helper functions.
2016-06-19 13:59:14 +01:00
96ffed6b2b Curves: Extend curve operator
Implements the "get_intersections" function, which calculates intersections between straigth lines and Bezier curves.
2016-06-14 11:29:31 +01:00
ad56b6a5db Merge remote-tracking branch 'origin/master' into gsoc2016-improved_extrusion 2016-06-13 13:03:25 +01:00
1905f2986c Merge remote-tracking branch 'origin/master' into gsoc2016-improved_extrusion 2016-06-13 10:59:21 +01:00
e7aab09236 Merge remote-tracking branch 'origin/master' into gsoc2016-improved_extrusion 2016-06-12 15:22:42 +01:00
9bc9b7ec4b Merge remote-tracking branch 'origin/master' into gsoc2016-improved_extrusion 2016-06-11 17:10:03 +01:00
04ec948d47 Curves: Auxiliary functions for the Extend operator
This commit contains part of the foundations for the Bezier curve Extend operator. This implementation is based on an addon created previously by a Blender user.

Some of the implemented functions may have use outside of the scope of the Extend operator. Therefore, they may be relocated and renamed in a future commit.
2016-06-11 17:05:01 +01:00
389c5306dc Merge remote-tracking branch 'origin/master' into gsoc2016-improved_extrusion 2016-06-03 22:16:42 +01:00
1d32aa2b7f Curves: Improved Bezier Curve Extrusion
After implementing the changes suggested, backwards compatibility was broken. In order to fix that, the whole feature had to be reimplemented, replacing the symmetric extrusion option (which has been the default until now in Blender) with an unidirectional extrude one.
2016-06-03 22:09:08 +01:00
a768fd17e0 Curves: Improved Bezier curve extrusion
This commit incorporates the changes that were suggested in Revision D2017.

The code was made clearer (unnecessary negations were removed) and whitespace was fixed.

This commit was amended to due to some whitespace being left behind.
2016-05-23 20:12:16 +01:00
9733d8416f Improved Bezier curve extrusion
This patch attempts to solve the issues with D1841.

Category: Improved Bezier Curve Extrusion

This feature allows the user to have more control over the extrusion of Bezier
curves. This is done by making possible unidirectional extrusion.

On a code level, the curve.c file in blenkernel was modified to take into
account these options while generating the extruded object.

The feature stops working with non-zero bevel.

Merge remote-tracking branch 'origin/master' into gsoc2016-improved_extrusion

Category: Improved Bezier curve extrusion with non-zero bevel

On a previous commit, the Bezier curve extrusion was improved. However, when
non-zero bevel values were set, the new extrusion options stopped having effect.
This commit fixes that.

On a code level, the code used for extrusion and for bevel is a duplicate.
On the first commit only the extrusion code was modified. On this commit,
the bevel code was modified in the same way, to take into account the improved
extrusion options.

Differential Revision: https://developer.blender.org/D2017
2016-05-20 20:32:39 +01:00
4db2343dce Merge remote-tracking branch 'origin/master' into gsoc2016-improved_extrusion 2016-05-19 11:10:41 +01:00
01f92861d8 Category: Improved Bezier Curve Extrusion
This feature allows the user to have more control over the extrusion of Bezier
curves. This is done by making possible unidirectional extrusion.

On a code level, the curve.c file in blenkernel was modified to take into
account these options while generating the extruded object.

The feature stops working with non-zero bevel.
2016-05-19 11:00:10 +01:00
11 changed files with 2589 additions and 13 deletions

View File

@@ -172,6 +172,11 @@ class DATA_PT_geometry_curve(CurveButtonsPanelCurve, Panel):
col.label(text="Modification:")
col.prop(curve, "offset")
col.prop(curve, "extrude")
sub = col.row()
sub.prop(curve, "extrude_bezier_unidirectional")
sub = col.row()
sub.active = curve.extrude_bezier_unidirectional is True
sub.prop(curve, "reverse_direction")
col.label(text="Taper Object:")
col.prop(curve, "taper_object", text="")

View File

@@ -2789,6 +2789,18 @@ class VIEW3D_MT_edit_curve_specials(Menu):
layout.operator("curve.smooth_radius")
layout.operator("curve.smooth_tilt")
# layout.separator()
#
# layout.operator("curve.extend_curve")
# layout.operator("curve.batch_extend")
# layout.operator("curve.trim_curve")
# layout.operator("curve.offset_curve")
#
# layout.separator()
#
# layout.operator("curve.curve_chamfer")
# layout.operator("curve.curve_fillet")
class VIEW3D_MT_edit_curve_delete(Menu):
bl_label = "Delete"

View File

@@ -541,6 +541,13 @@ class VIEW3D_PT_tools_curveedit(View3DPanel, Panel):
col.operator("curve.subdivide")
col.operator("curve.smooth")
col.operator("transform.vertex_random")
col.operator("curve.extend_curve")
col.operator("curve.batch_extend")
col.operator("curve.trim_curve")
col.operator("curve.offset_curve")
row = col.row(align=True)
row.operator("curve.curve_chamfer")
row.operator("curve.curve_fillet")
class VIEW3D_PT_tools_add_curve_edit(View3DPanel, Panel):

View File

@@ -1718,7 +1718,7 @@ float *BKE_curve_make_orco(Scene *scene, Object *ob, int *r_numVerts)
}
/* ***************** BEVEL ****************** */
/* ***************** BEVEL/EXTRUDE ****************** */
void BKE_curve_bevel_make(Scene *scene, Object *ob, ListBase *disp,
const bool for_render, const bool use_render_resolution)
@@ -1785,7 +1785,7 @@ void BKE_curve_bevel_make(Scene *scene, Object *ob, ListBase *disp,
else if (cu->ext1 == 0.0f && cu->ext2 == 0.0f) {
/* pass */
}
else if (cu->ext2 == 0.0f) {
else if (cu->ext2 == 0.0f) { /* Extrude Bezier curve. Zero bevel. */
dl = MEM_callocN(sizeof(DispList), "makebevelcurve2");
dl->verts = MEM_mallocN(2 * sizeof(float[3]), "makebevelcurve2");
BLI_addtail(disp, dl);
@@ -1793,12 +1793,23 @@ void BKE_curve_bevel_make(Scene *scene, Object *ob, ListBase *disp,
dl->parts = 1;
dl->flag = DL_FRONT_CURVE | DL_BACK_CURVE;
dl->nr = 2;
fp = dl->verts;
fp[0] = fp[1] = 0.0;
fp = dl->verts;
fp[0] = fp[1] = 0.0;
fp[2] = -cu->ext1;
fp[3] = fp[4] = 0.0;
fp[5] = cu->ext1;
if (cu->flag & CU_EXTRUDE_REV && cu->flag & CU_UNI_EXTRUDE) { /* if user wants to extrude in the negative direction */
fp[2] = 0.0;
fp[5] = -cu->ext1;
}
else if (cu->flag & CU_UNI_EXTRUDE) { /* simple Bezier curve extrusion by the specified amount in the positive local z direction */
fp[2] = cu->ext1;
fp[5] = 0.0;
}
else { /* extrusion in both directions */
fp[2] = -cu->ext1;
fp[5] = cu->ext1;
}
fp[3] = fp[4] = 0.0;
}
else if ( (cu->flag & (CU_FRONT | CU_BACK)) == 0 && cu->ext1 == 0.0f) { // we make a full round bevel in that case
nr = 4 + 2 * cu->bevresol;
@@ -1824,7 +1835,7 @@ void BKE_curve_bevel_make(Scene *scene, Object *ob, ListBase *disp,
fp += 3;
}
}
else {
else { /* bevel with non-zero extrusion */
short dnr;
/* bevel now in three parts, for proper vertex normals */
@@ -1851,7 +1862,17 @@ void BKE_curve_bevel_make(Scene *scene, Object *ob, ListBase *disp,
for (a = 0; a < nr; a++) {
fp[0] = 0.0;
fp[1] = (float)(cosf(angle) * (cu->ext2));
fp[2] = (float)(sinf(angle) * (cu->ext2)) - cu->ext1;
fp[2] = (float)(sinf(angle) * (cu->ext2));
if (cu->flag & CU_EXTRUDE_REV && cu->flag & CU_UNI_EXTRUDE) { /* if user wants to extrude in the negative direction */
fp[2] -= cu->ext1;
}
else if (cu->flag & CU_UNI_EXTRUDE) { /* simple Bezier curve extrusion by the specified amount in the positive local z direction */
fp[2] -= 0.0;
}
else { /* extrusion in both directions */
fp[2] -= cu->ext1;
}
angle += dangle;
fp += 3;
}
@@ -1874,6 +1895,19 @@ void BKE_curve_bevel_make(Scene *scene, Object *ob, ListBase *disp,
fp[4] = cu->ext2;
fp[5] = cu->ext1;
if (cu->flag & CU_EXTRUDE_REV && cu->flag & CU_UNI_EXTRUDE) { /* if user wants to extrude in the negative direction */
fp[2] = 0.0;
fp[5] = -cu->ext1;
}
else if (cu->flag & CU_UNI_EXTRUDE) { /* simple Bezier curve extrusion by the specified amount in the positive local z direction */
fp[2] = cu->ext1;
fp[5] = 0.0;
}
else { /* extrusion in both directions */
fp[2] = -cu->ext1;
fp[5] = cu->ext1;
}
if ( (cu->flag & (CU_FRONT | CU_BACK)) == 0) {
dl = MEM_dupallocN(dl);
dl->verts = MEM_dupallocN(dl->verts);
@@ -1884,6 +1918,19 @@ void BKE_curve_bevel_make(Scene *scene, Object *ob, ListBase *disp,
fp[2] = -fp[2];
fp[4] = -fp[4];
fp[5] = -fp[5];
if (cu->flag & CU_EXTRUDE_REV && cu->flag & CU_UNI_EXTRUDE) { /* if user wants to extrude in the negative direction */
fp[2] = 0.0;
fp[5] = -cu->ext1;
}
else if (cu->flag & CU_UNI_EXTRUDE) { /* simple Bezier curve extrusion by the specified amount in the positive local z direction */
fp[2] = cu->ext1;
fp[5] = 0.0;
}
else { /* extrusion in both directions */
fp[2] = -fp[2];
fp[5] = -fp[5];
}
}
}
@@ -1909,7 +1956,17 @@ void BKE_curve_bevel_make(Scene *scene, Object *ob, ListBase *disp,
for (a = 0; a < nr; a++) {
fp[0] = 0.0;
fp[1] = (float)(cosf(angle) * (cu->ext2));
fp[2] = (float)(sinf(angle) * (cu->ext2)) + cu->ext1;
fp[2] = (float)(sinf(angle) * (cu->ext2));
if (cu->flag & CU_EXTRUDE_REV && cu->flag & CU_UNI_EXTRUDE) { /* if user wants to extrude in the negative direction */
fp[2] += 0.0;
}
else if (cu->flag & CU_UNI_EXTRUDE) { /* simple Bezier curve extrusion by the specified amount in the positive local z direction */
fp[2] += cu->ext1;
}
else { /* extrusion in both directions */
fp[2] += cu->ext1;
}
angle += dangle;
fp += 3;
}

View File

@@ -128,6 +128,13 @@ void CURVE_OT_cyclic_toggle(struct wmOperatorType *ot);
void CURVE_OT_match_texture_space(struct wmOperatorType *ot);
void CURVE_OT_extend_curve(struct wmOperatorType *ot);
void CURVE_OT_trim_curve(struct wmOperatorType *ot);
void CURVE_OT_offset_curve(struct wmOperatorType *ot);
void CURVE_OT_batch_extend(struct wmOperatorType *ot);
void CURVE_OT_curve_chamfer(struct wmOperatorType *ot);
void CURVE_OT_curve_fillet(struct wmOperatorType *ot);
bool ED_curve_pick_vert(
struct ViewContext *vc, short sel, const int mval[2],
struct Nurb **r_nurb, struct BezTriple **r_bezt, struct BPoint **r_bp, short *r_handle);

View File

@@ -139,6 +139,12 @@ void ED_operatortypes_curve(void)
WM_operatortype_append(CURVE_OT_draw);
WM_operatortype_append(CURVE_OT_extrude);
WM_operatortype_append(CURVE_OT_cyclic_toggle);
WM_operatortype_append(CURVE_OT_extend_curve);
WM_operatortype_append(CURVE_OT_trim_curve);
WM_operatortype_append(CURVE_OT_offset_curve);
WM_operatortype_append(CURVE_OT_batch_extend);
WM_operatortype_append(CURVE_OT_curve_chamfer);
WM_operatortype_append(CURVE_OT_curve_fillet);
WM_operatortype_append(CURVE_OT_match_texture_space);
}
@@ -264,6 +270,13 @@ void ED_keymap_curve(wmKeyConfig *keyconf)
WM_keymap_add_item(keymap, "CURVE_OT_make_segment", FKEY, KM_PRESS, 0, 0);
WM_keymap_add_item(keymap, "CURVE_OT_cyclic_toggle", CKEY, KM_PRESS, KM_ALT, 0);
WM_keymap_add_item(keymap, "CURVE_OT_extend_curve", EKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_item(keymap, "CURVE_OT_batch_extend", EKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
WM_keymap_add_item(keymap, "CURVE_OT_trim_curve", TKEY, KM_PRESS, KM_CTRL | KM_SHIFT, 0);
WM_keymap_add_item(keymap, "CURVE_OT_offset_curve", OKEY, KM_PRESS, KM_SHIFT, 0);
WM_keymap_add_item(keymap, "CURVE_OT_curve_chamfer", CKEY, KM_PRESS, KM_SHIFT | KM_CTRL, 0);
WM_keymap_add_item(keymap, "CURVE_OT_curve_fillet", FKEY, KM_PRESS, KM_CTRL, 0);
WM_keymap_add_menu(keymap, "VIEW3D_MT_edit_curve_delete", XKEY, KM_PRESS, 0, 0);
WM_keymap_add_menu(keymap, "VIEW3D_MT_edit_curve_delete", DELKEY, KM_PRESS, 0, 0);

File diff suppressed because it is too large Load Diff

View File

@@ -80,7 +80,7 @@ typedef struct {
BMEditMesh *em;
float initial_length[NUM_VALUE_KINDS];
float scale[NUM_VALUE_KINDS];
NumInput num_input[NUM_VALUE_KINDS];
NumInput num_input[NUM_VALUE_KINDS];
float shift_value[NUM_VALUE_KINDS]; /* The current value when shift is pressed. Negative when shift not active. */
bool is_modal;

View File

@@ -302,6 +302,8 @@ enum {
CU_DEFORM_FILL = 1 << 13, /* fill 2d curve after deformation */
CU_FILL_CAPS = 1 << 14, /* fill bevel caps */
CU_MAP_TAPER = 1 << 15, /* map taper object to beveled area */
CU_UNI_EXTRUDE = 1 << 16, /* in case the user wants the Bezier curve to be extruded in only one direction */
CU_EXTRUDE_REV = 1 << 17 /* equivalent to a negative extrude */
};
/* Curve.twist_mode */

View File

@@ -1530,6 +1530,16 @@ static void rna_def_curve(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_MAP_TAPER);
RNA_def_property_ui_text(prop, "Map Taper", "Map effect of taper object on actually beveled curve");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop = RNA_def_property(srna, "extrude_bezier_unidirectional", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_UNI_EXTRUDE);
RNA_def_property_ui_text(prop, "Unidirectional Extrude", "Extrude the Bezier curve only in one direction");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
prop = RNA_def_property(srna, "reverse_direction", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", CU_EXTRUDE_REV);
RNA_def_property_ui_text(prop, "Reverse Extrude Direction", "Extrude the Bezier curve in the negative direction");
RNA_def_property_update(prop, 0, "rna_Curve_update_data");
/* texture space */
prop = RNA_def_property(srna, "use_auto_texspace", PROP_BOOLEAN, PROP_NONE);