Cycles / Hair: Further cleanup of UI and internals.

* UI: Remove deprecated condition (CURVE_RIBBONS) and hide backface property, when it's hardcoded in C (Curve/Line segments && Ribbons).

* Remove "use_tangent_normal" and "CURVE_KN_TANGENTGNORMAL" as its unused (follow up for last commit).
This commit is contained in:
Thomas Dinges 2013-12-26 03:25:13 +01:00
parent db8293d456
commit 03fed41e59
5 changed files with 6 additions and 15 deletions

@ -1172,13 +1172,12 @@ class CyclesRender_PT_CurveRendering(CyclesButtonsPanel, Panel):
layout.prop(ccscene, "primitive", text="Primitive")
layout.prop(ccscene, "shape", text="Shape")
if ccscene.primitive == 'TRIANGLES':
if ccscene.shape == 'THICK':
layout.prop(ccscene, "resolution", text="Resolution")
elif ccscene.primitive == 'LINE_SEGMENTS':
layout.prop(ccscene, "cull_backfacing", text="Cull back-faces")
elif ccscene.primitive in {'CURVE_SEGMENTS', 'CURVE_RIBBONS'}:
if (ccscene.primitive in {'CURVE_SEGMENTS', 'LINE_SEGMENTS'} and ccscene.shape == 'RIBBONS') == False:
layout.prop(ccscene, "cull_backfacing", text="Cull back-faces")
if ccscene.primitive == 'TRIANGLES' and ccscene.shape == 'THICK':
layout.prop(ccscene, "resolution", text="Resolution")
elif ccscene.primitive == 'CURVE_SEGMENTS':
layout.prop(ccscene, "subdivisions", text="Curve subdivisions")
row = layout.row()

@ -710,13 +710,11 @@ void BlenderSync::sync_curve_settings()
curve_system_manager->line_method = CURVE_UNCORRECTED;
curve_system_manager->use_encasing = true;
curve_system_manager->use_backfacing = false;
curve_system_manager->use_tangent_normal = true;
curve_system_manager->use_tangent_normal_geometry = true;
}
else if(curve_system_manager->primitive == CURVE_LINE_SEGMENTS && curve_system_manager->curve_shape == CURVE_THICK) {
curve_system_manager->line_method = CURVE_ACCURATE;
curve_system_manager->use_encasing = false;
curve_system_manager->use_tangent_normal = false;
curve_system_manager->use_tangent_normal_geometry = false;
}
else if(curve_system_manager->primitive == CURVE_SEGMENTS && curve_system_manager->curve_shape == CURVE_RIBBON) {

@ -792,8 +792,7 @@ typedef enum CurveFlag {
CURVE_KN_ACCURATE = 8, /* use accurate intersections test? */
CURVE_KN_INTERSECTCORRECTION = 16, /* correct for width after determing closest midpoint? */
CURVE_KN_TRUETANGENTGNORMAL = 32, /* use tangent normal for geometry? */
CURVE_KN_TANGENTGNORMAL = 64, /* use tangent normal for shader? */
CURVE_KN_RIBBONS = 128, /* use flat curve ribbons */
CURVE_KN_RIBBONS = 64, /* use flat curve ribbons */
} CurveFlag;
typedef struct KernelCurves {

@ -92,7 +92,6 @@ CurveSystemManager::CurveSystemManager()
use_curves = true;
use_encasing = true;
use_backfacing = false;
use_tangent_normal = false;
use_tangent_normal_geometry = false;
need_update = true;
@ -127,8 +126,6 @@ void CurveSystemManager::device_update(Device *device, DeviceScene *dscene, Scen
else if(line_method == CURVE_CORRECTED)
kcurve->curveflags |= CURVE_KN_INTERSECTCORRECTION;
if(use_tangent_normal)
kcurve->curveflags |= CURVE_KN_TANGENTGNORMAL;
if(use_tangent_normal_geometry)
kcurve->curveflags |= CURVE_KN_TRUETANGENTGNORMAL;
if(use_backfacing)
@ -158,7 +155,6 @@ bool CurveSystemManager::modified(const CurveSystemManager& CurveSystemManager)
line_method == CurveSystemManager.line_method &&
primitive == CurveSystemManager.primitive &&
use_encasing == CurveSystemManager.use_encasing &&
use_tangent_normal == CurveSystemManager.use_tangent_normal &&
use_tangent_normal_geometry == CurveSystemManager.use_tangent_normal_geometry &&
encasing_ratio == CurveSystemManager.encasing_ratio &&
minimum_width == CurveSystemManager.minimum_width &&

@ -97,7 +97,6 @@ public:
bool use_curves;
bool use_encasing;
bool use_backfacing;
bool use_tangent_normal;
bool use_tangent_normal_geometry;
bool need_update;