diff options
Diffstat (limited to 'intern/cycles/render/attribute.cpp')
-rw-r--r-- | intern/cycles/render/attribute.cpp | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/intern/cycles/render/attribute.cpp b/intern/cycles/render/attribute.cpp index 37b98909d78..cdef1036647 100644 --- a/intern/cycles/render/attribute.cpp +++ b/intern/cycles/render/attribute.cpp @@ -167,62 +167,62 @@ size_t Attribute::element_size(Geometry *geom, AttributePrimitive prim) const size = 1; break; case ATTR_ELEMENT_VERTEX: - if (geom->geometry_type == Geometry::MESH || geom->geometry_type == Geometry::VOLUME) { + if (geom->type == Geometry::MESH || geom->type == Geometry::VOLUME) { Mesh *mesh = static_cast<Mesh *>(geom); - size = mesh->get_verts().size() + mesh->get_num_ngons(); + size = mesh->verts.size() + mesh->num_ngons; if (prim == ATTR_PRIM_SUBD) { - size -= mesh->get_num_subd_verts(); + size -= mesh->num_subd_verts; } } break; case ATTR_ELEMENT_VERTEX_MOTION: - if (geom->geometry_type == Geometry::MESH) { + if (geom->type == Geometry::MESH) { Mesh *mesh = static_cast<Mesh *>(geom); - size = (mesh->get_verts().size() + mesh->get_num_ngons()) * (mesh->get_motion_steps() - 1); + size = (mesh->verts.size() + mesh->num_ngons) * (mesh->motion_steps - 1); if (prim == ATTR_PRIM_SUBD) { - size -= mesh->get_num_subd_verts() * (mesh->get_motion_steps() - 1); + size -= mesh->num_subd_verts * (mesh->motion_steps - 1); } } break; case ATTR_ELEMENT_FACE: - if (geom->geometry_type == Geometry::MESH || geom->geometry_type == Geometry::VOLUME) { + if (geom->type == Geometry::MESH || geom->type == Geometry::VOLUME) { Mesh *mesh = static_cast<Mesh *>(geom); if (prim == ATTR_PRIM_GEOMETRY) { size = mesh->num_triangles(); } else { - size = mesh->get_num_subd_faces() + mesh->get_num_ngons(); + size = mesh->subd_faces.size() + mesh->num_ngons; } } break; case ATTR_ELEMENT_CORNER: case ATTR_ELEMENT_CORNER_BYTE: - if (geom->geometry_type == Geometry::MESH) { + if (geom->type == Geometry::MESH) { Mesh *mesh = static_cast<Mesh *>(geom); if (prim == ATTR_PRIM_GEOMETRY) { size = mesh->num_triangles() * 3; } else { - size = mesh->get_subd_face_corners().size() + mesh->get_num_ngons(); + size = mesh->subd_face_corners.size() + mesh->num_ngons; } } break; case ATTR_ELEMENT_CURVE: - if (geom->geometry_type == Geometry::HAIR) { + if (geom->type == Geometry::HAIR) { Hair *hair = static_cast<Hair *>(geom); size = hair->num_curves(); } break; case ATTR_ELEMENT_CURVE_KEY: - if (geom->geometry_type == Geometry::HAIR) { + if (geom->type == Geometry::HAIR) { Hair *hair = static_cast<Hair *>(geom); - size = hair->get_curve_keys().size(); + size = hair->curve_keys.size(); } break; case ATTR_ELEMENT_CURVE_KEY_MOTION: - if (geom->geometry_type == Geometry::HAIR) { + if (geom->type == Geometry::HAIR) { Hair *hair = static_cast<Hair *>(geom); - size = hair->get_curve_keys().size() * (hair->get_motion_steps() - 1); + size = hair->curve_keys.size() * (hair->motion_steps - 1); } break; default: @@ -445,7 +445,7 @@ Attribute *AttributeSet::add(AttributeStandard std, ustring name) if (name == ustring()) name = Attribute::standard_name(std); - if (geometry->geometry_type == Geometry::MESH) { + if (geometry->type == Geometry::MESH) { switch (std) { case ATTR_STD_VERTEX_NORMAL: attr = add(name, TypeDesc::TypeNormal, ATTR_ELEMENT_VERTEX); @@ -496,7 +496,7 @@ Attribute *AttributeSet::add(AttributeStandard std, ustring name) break; } } - else if (geometry->geometry_type == Geometry::VOLUME) { + else if (geometry->type == Geometry::VOLUME) { switch (std) { case ATTR_STD_VERTEX_NORMAL: attr = add(name, TypeDesc::TypeNormal, ATTR_ELEMENT_VERTEX); @@ -521,7 +521,7 @@ Attribute *AttributeSet::add(AttributeStandard std, ustring name) break; } } - else if (geometry->geometry_type == Geometry::HAIR) { + else if (geometry->type == Geometry::HAIR) { switch (std) { case ATTR_STD_UV: attr = add(name, TypeFloat2, ATTR_ELEMENT_CURVE); |