Updates for the Cycle Hair UI. With the following changes

- Removed the cycles subdivision and interpolation of hairkeys.
- Removed the parent settings.
- Removed all of the advanced settings and presets.
- This simplifies the UI to a few settings for the primitive type and a shape mode.
This commit is contained in:
Stuart Broadfoot
2013-08-18 13:41:53 +00:00
parent 19d3e230e6
commit 2fd11a6617
10 changed files with 189 additions and 593 deletions

View File

@@ -147,8 +147,6 @@ const char *Attribute::standard_name(AttributeStandard std)
return "motion_post";
else if(std == ATTR_STD_PARTICLE)
return "particle";
else if(std == ATTR_STD_CURVE_TANGENT)
return "curve_tangent";
else if(std == ATTR_STD_CURVE_INTERCEPT)
return "curve_intercept";
@@ -277,9 +275,6 @@ Attribute *AttributeSet::add(AttributeStandard std, ustring name)
case ATTR_STD_MOTION_POST:
attr = add(name, TypeDesc::TypePoint, ATTR_ELEMENT_CURVE_KEY);
break;
case ATTR_STD_CURVE_TANGENT:
attr = add(name, TypeDesc::TypeVector, ATTR_ELEMENT_CURVE_KEY);
break;
case ATTR_STD_CURVE_INTERCEPT:
attr = add(name, TypeDesc::TypeFloat, ATTR_ELEMENT_CURVE_KEY);
break;

View File

@@ -80,27 +80,21 @@ void curvebounds(float *lower, float *upper, float3 *p, int dim)
CurveSystemManager::CurveSystemManager()
{
primitive = CURVE_LINE_SEGMENTS;
curve_shape = CURVE_THICK;
line_method = CURVE_CORRECTED;
interpolation = CURVE_CARDINAL;
triangle_method = CURVE_CAMERA_TRIANGLES;
resolution = 3;
segments = 1;
subdivisions = 3;
normalmix = 1.0f;
encasing_ratio = 1.01f;
minimum_width = 0.0f;
maximum_width = 0.0f;
use_curves = true;
use_smooth = true;
use_parents = false;
use_encasing = true;
use_backfacing = false;
use_joined = false;
use_tangent_normal = false;
use_tangent_normal_geometry = false;
use_tangent_normal_correction = false;
need_update = true;
need_mesh_update = false;
@@ -138,18 +132,13 @@ void CurveSystemManager::device_update(Device *device, DeviceScene *dscene, Scen
if(use_tangent_normal)
kcurve->curveflags |= CURVE_KN_TANGENTGNORMAL;
if(use_tangent_normal_correction)
kcurve->curveflags |= CURVE_KN_NORMALCORRECTION;
if(use_tangent_normal_geometry)
kcurve->curveflags |= CURVE_KN_TRUETANGENTGNORMAL;
if(use_joined)
kcurve->curveflags |= CURVE_KN_CURVEDATA;
if(use_backfacing)
kcurve->curveflags |= CURVE_KN_BACKFACING;
if(use_encasing)
kcurve->curveflags |= CURVE_KN_ENCLOSEFILTER;
kcurve->normalmix = normalmix;
kcurve->encasing_ratio = encasing_ratio;
kcurve->minimum_width = minimum_width;
kcurve->maximum_width = maximum_width;
@@ -168,39 +157,29 @@ void CurveSystemManager::device_free(Device *device, DeviceScene *dscene)
bool CurveSystemManager::modified(const CurveSystemManager& CurveSystemManager)
{
return !(line_method == CurveSystemManager.line_method &&
interpolation == CurveSystemManager.interpolation &&
return !(curve_shape == CurveSystemManager.curve_shape &&
line_method == CurveSystemManager.line_method &&
primitive == CurveSystemManager.primitive &&
use_encasing == CurveSystemManager.use_encasing &&
use_tangent_normal == CurveSystemManager.use_tangent_normal &&
use_tangent_normal_correction == CurveSystemManager.use_tangent_normal_correction &&
use_tangent_normal_geometry == CurveSystemManager.use_tangent_normal_geometry &&
encasing_ratio == CurveSystemManager.encasing_ratio &&
minimum_width == CurveSystemManager.minimum_width &&
maximum_width == CurveSystemManager.maximum_width &&
use_backfacing == CurveSystemManager.use_backfacing &&
normalmix == CurveSystemManager.normalmix &&
use_smooth == CurveSystemManager.use_smooth &&
triangle_method == CurveSystemManager.triangle_method &&
resolution == CurveSystemManager.resolution &&
use_curves == CurveSystemManager.use_curves &&
use_joined == CurveSystemManager.use_joined &&
segments == CurveSystemManager.segments &&
use_parents == CurveSystemManager.use_parents &&
subdivisions == CurveSystemManager.subdivisions);
}
bool CurveSystemManager::modified_mesh(const CurveSystemManager& CurveSystemManager)
{
return !(primitive == CurveSystemManager.primitive &&
interpolation == CurveSystemManager.interpolation &&
use_parents == CurveSystemManager.use_parents &&
use_smooth == CurveSystemManager.use_smooth &&
curve_shape == CurveSystemManager.curve_shape &&
triangle_method == CurveSystemManager.triangle_method &&
resolution == CurveSystemManager.resolution &&
use_curves == CurveSystemManager.use_curves &&
use_joined == CurveSystemManager.use_joined &&
segments == CurveSystemManager.segments);
use_curves == CurveSystemManager.use_curves);
}
void CurveSystemManager::tag_update(Scene *scene)

View File

@@ -48,9 +48,13 @@ typedef enum curve_primitives {
CURVE_RIBBONS
} curve_primitives;
typedef enum curve_shape {
CURVE_RIBBON,
CURVE_THICK
} curve_shape;
typedef enum curve_triangles {
CURVE_CAMERA_TRIANGLES,
CURVE_RIBBON_TRIANGLES,
CURVE_TESSELATED_TRIANGLES
} curve_triangles;
@@ -99,27 +103,21 @@ class CurveSystemManager {
public:
int primitive;
int curve_shape;
int line_method;
int interpolation;
int triangle_method;
int resolution;
int segments;
int subdivisions;
float normalmix;
float encasing_ratio;
float minimum_width;
float maximum_width;
bool use_curves;
bool use_smooth;
bool use_parents;
bool use_encasing;
bool use_backfacing;
bool use_tangent_normal;
bool use_tangent_normal_correction;
bool use_tangent_normal_geometry;
bool use_joined;
bool need_update;
bool need_mesh_update;