Cycles: Implement index output for hair node
[blender.git] / intern / cycles / render / attribute.cpp
index 95e69df68856a6e273e055d714ebe0ff0953c0ee..2d1100c9d8884e62de3f8b0068c06fc42ea47213 100644 (file)
@@ -267,6 +267,8 @@ const char *Attribute::standard_name(AttributeStandard std)
                        return "particle";
                case ATTR_STD_CURVE_INTERCEPT:
                        return "curve_intercept";
+               case ATTR_STD_CURVE_INDEX:
+                       return "curve_index";
                case ATTR_STD_PTEX_FACE_ID:
                        return "ptex_face_id";
                case ATTR_STD_PTEX_UV:
@@ -451,6 +453,9 @@ Attribute *AttributeSet::add(AttributeStandard std, ustring name)
                        case ATTR_STD_CURVE_INTERCEPT:
                                attr = add(name, TypeDesc::TypeFloat, ATTR_ELEMENT_CURVE_KEY);
                                break;
+                       case ATTR_STD_CURVE_INDEX:
+                               attr = add(name, TypeDesc::TypeFloat, ATTR_ELEMENT_CURVE);
+                               break;
                        case ATTR_STD_GENERATED_TRANSFORM:
                                attr = add(name, TypeDesc::TypeMatrix, ATTR_ELEMENT_MESH);
                                break;