Cycles / Hair: Further cleanup of UI and internals.
authorThomas Dinges <blender@dingto.org>
Thu, 26 Dec 2013 02:25:13 +0000 (03:25 +0100)
committerThomas Dinges <blender@dingto.org>
Thu, 26 Dec 2013 02:25:30 +0000 (03:25 +0100)
* 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).

intern/cycles/blender/addon/ui.py
intern/cycles/blender/blender_curves.cpp
intern/cycles/kernel/kernel_types.h
intern/cycles/render/curves.cpp
intern/cycles/render/curves.h

index 8f81e93f7c8dc4358089a59088f48521aa919ffb..83483cbcae982ce7e1ffc604f87b2c227b79e299 100644 (file)
@@ -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()
index d13c532533e00372445ce728fd02a7f3db4686e1..7e8eb3aa374ccfeca63b6c77eafbfa33ae49b4ea 100644 (file)
@@ -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) {
index fb63ebb2e7a380053c796babbb069c5db07cc945..9b1893e8baa6877d80c6fd6bd3c52ddd5385aa6c 100644 (file)
@@ -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 {
index 4e7f598751e08f0b43b0de80f3dd3f9217491f97..574ad4f6ca00d635417045d0c9009b88558c73fa 100644 (file)
@@ -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 &&
index 0759d495561d99ed47b694fcac4b32029d1949fd..8020a93e77e160a28d7411ffae9b7258dd57b571 100644 (file)
@@ -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;