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:
authorHans Goudey <h.goudey@me.com>2020-09-16 18:20:38 +0300
committerHans Goudey <h.goudey@me.com>2020-09-16 18:20:38 +0300
commit60fa80de0b2c7138fc86b8b688f22a9d2623e8ed (patch)
tree44d7acc6bf5022866f5369a0151c513d4dfd957e /source/blender/makesdna/DNA_curve_types.h
parent365271a5886e1678b41e636581616446766b5f85 (diff)
Curves: Add custom profile bevel support
This adds support for the same custom bevel profile widget used in the bevel tool and modifier to the geometry generation for curves. This is expecially useful for text and 2D curves with extrusion, as it works much better than a weld & bevel modifier combination. It can also be useful for adding quick detail to pipe-like objects. The curve holds the CurveProfile struct and a new "Bevel Mode" property decides which type of bevel to build, round, object, or custom profile. Although curves can already use another curve to make the bevel geometry, this is a quicker way, and it also defines the profile of just one corner of the bevel, so it isn't redundant. It's also nice to have the same custom profile functionality wherever there is bevel. Differential Revision: https://developer.blender.org/D8402
Diffstat (limited to 'source/blender/makesdna/DNA_curve_types.h')
-rw-r--r--source/blender/makesdna/DNA_curve_types.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_curve_types.h b/source/blender/makesdna/DNA_curve_types.h
index 8d5b5602c2e..2f362034b78 100644
--- a/source/blender/makesdna/DNA_curve_types.h
+++ b/source/blender/makesdna/DNA_curve_types.h
@@ -31,6 +31,7 @@
#define MAXTEXTBOX 256 /* used in readfile.c and editfont.c */
struct AnimData;
+struct CurveProfile;
struct EditFont;
struct GHash;
struct Ipo;
@@ -232,6 +233,8 @@ typedef struct Curve {
struct Key *key;
struct Material **mat;
+ struct CurveProfile *bevel_profile;
+
/* texture space, copied as one block in editobject.c */
float loc[3];
float size[3];
@@ -261,7 +264,8 @@ typedef struct Curve {
char overflow;
char spacemode, align_y;
- char _pad[3];
+ char bevel_mode;
+ char _pad[2];
/* font part */
short lines;
@@ -385,6 +389,13 @@ enum {
CU_ALIGN_Y_BOTTOM = 4,
};
+/* Curve.bevel_mode */
+enum {
+ CU_BEV_MODE_ROUND = 0,
+ CU_BEV_MODE_OBJECT = 1,
+ CU_BEV_MODE_CURVE_PROFILE = 2,
+};
+
/* Curve.overflow. */
enum {
CU_OVERFLOW_NONE = 0,