Disallow fill caps for curves without bevel object.

It's getting complicated to detect which part of curve is actually a
cap in cases like extruded 2d curve with non-zero depth.
This commit is contained in:
Sergey Sharybin 2012-02-02 19:20:51 +00:00
parent 1471a1983c
commit 3b3d811bf0
Notes: blender-bot 2023-02-14 06:32:27 +01:00
Referenced by issue #68814, Curve -> Bevel -> Fill caps greyed out unless bevel curve selected
2 changed files with 5 additions and 2 deletions

View File

@ -112,7 +112,6 @@ class DATA_PT_shape_curve(CurveButtonsPanel, Panel):
sub.active = (curve.dimensions == '2D' or (curve.bevel_object is None and curve.dimensions == '3D'))
sub.prop(curve, "fill_mode", text="")
col.prop(curve, "use_fill_deform")
col.prop(curve, "use_fill_caps")
class DATA_PT_curve_texture_space(CurveButtonsPanel, Panel):
@ -166,6 +165,10 @@ class DATA_PT_geometry_curve(CurveButtonsPanel, Panel):
col.label(text="Bevel Object:")
col.prop(curve, "bevel_object", text="")
row = col.row()
row.active = curve.bevel_object != None
row.prop(curve, "use_fill_caps")
class DATA_PT_pathanim(CurveButtonsPanelCurve, Panel):
bl_label = "Path Animation"

View File

@ -1360,7 +1360,7 @@ static void do_makeDispListCurveTypes(Scene *scene, Object *ob, ListBase *dispba
/* rotate bevel piece and write in data */
rotateBevelPiece(cu, bevp, dlb, widfac, fac, &data);
if (cu->flag & CU_FILL_CAPS) {
if (cu->bevobj && (cu->flag & CU_FILL_CAPS)) {
if (a == 0)
fillBevelCap(cu, nu, bevp, dlb, fac, widfac, &bottom_capbase);
else if (a == bl->nr - 1)