Cycles: Add AttributeDescriptor

Adds a descriptor for attributes that can easily be passed around and extended
to contain more data. Will be used for attributes on subdivision meshes.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2110
This commit is contained in:
Mai Lavelle
2016-07-01 17:36:27 -04:00
parent 734e0aca38
commit cd809b95d8
16 changed files with 249 additions and 254 deletions

View File

@@ -517,16 +517,19 @@ AttributeRequest::AttributeRequest(ustring name_)
std = ATTR_STD_NONE;
triangle_type = TypeDesc::TypeFloat;
triangle_element = ATTR_ELEMENT_NONE;
triangle_offset = 0;
triangle_desc.element = ATTR_ELEMENT_NONE;
triangle_desc.offset = 0;
triangle_desc.type = NODE_ATTR_FLOAT;
curve_type = TypeDesc::TypeFloat;
curve_element = ATTR_ELEMENT_NONE;
curve_offset = 0;
curve_desc.element = ATTR_ELEMENT_NONE;
curve_desc.offset = 0;
curve_desc.type = NODE_ATTR_FLOAT;
subd_type = TypeDesc::TypeFloat;
subd_element = ATTR_ELEMENT_NONE;
subd_offset = 0;
subd_desc.element = ATTR_ELEMENT_NONE;
subd_desc.offset = 0;
subd_desc.type = NODE_ATTR_FLOAT;
}
AttributeRequest::AttributeRequest(AttributeStandard std_)
@@ -535,16 +538,19 @@ AttributeRequest::AttributeRequest(AttributeStandard std_)
std = std_;
triangle_type = TypeDesc::TypeFloat;
triangle_element = ATTR_ELEMENT_NONE;
triangle_offset = 0;
triangle_desc.element = ATTR_ELEMENT_NONE;
triangle_desc.offset = 0;
triangle_desc.type = NODE_ATTR_FLOAT;
curve_type = TypeDesc::TypeFloat;
curve_element = ATTR_ELEMENT_NONE;
curve_offset = 0;
curve_desc.element = ATTR_ELEMENT_NONE;
curve_desc.offset = 0;
curve_desc.type = NODE_ATTR_FLOAT;
subd_type = TypeDesc::TypeFloat;
subd_element = ATTR_ELEMENT_NONE;
subd_offset = 0;
subd_desc.element = ATTR_ELEMENT_NONE;
subd_desc.offset = 0;
subd_desc.type = NODE_ATTR_FLOAT;
}
/* AttributeRequestSet */