forked from bartvdbraak/blender
Cycles: fix msvc compile warning, patch by Jason Wilkins.
This commit is contained in:
parent
4a90339519
commit
6cb896ff0a
@ -101,9 +101,9 @@ ustring Attribute::standard_name(Attribute::Standard std)
|
|||||||
|
|
||||||
/* Attribute Set */
|
/* Attribute Set */
|
||||||
|
|
||||||
AttributeSet::AttributeSet(Mesh *mesh_)
|
AttributeSet::AttributeSet()
|
||||||
{
|
{
|
||||||
mesh = mesh_;
|
mesh = NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
AttributeSet::~AttributeSet()
|
AttributeSet::~AttributeSet()
|
||||||
@ -133,6 +133,7 @@ Attribute *AttributeSet::add(ustring name, TypeDesc type, Attribute::Element ele
|
|||||||
else if(element == Attribute::CORNER)
|
else if(element == Attribute::CORNER)
|
||||||
attr->set(name, type, element);
|
attr->set(name, type, element);
|
||||||
|
|
||||||
|
if(mesh)
|
||||||
attr->reserve(mesh->verts.size(), mesh->triangles.size());
|
attr->reserve(mesh->verts.size(), mesh->triangles.size());
|
||||||
|
|
||||||
return attr;
|
return attr;
|
||||||
|
@ -94,7 +94,7 @@ public:
|
|||||||
Mesh *mesh;
|
Mesh *mesh;
|
||||||
list<Attribute> attributes;
|
list<Attribute> attributes;
|
||||||
|
|
||||||
AttributeSet(Mesh *mesh);
|
AttributeSet();
|
||||||
~AttributeSet();
|
~AttributeSet();
|
||||||
|
|
||||||
Attribute *add(ustring name, TypeDesc type, Attribute::Element element);
|
Attribute *add(ustring name, TypeDesc type, Attribute::Element element);
|
||||||
|
@ -38,7 +38,6 @@ CCL_NAMESPACE_BEGIN
|
|||||||
/* Mesh */
|
/* Mesh */
|
||||||
|
|
||||||
Mesh::Mesh()
|
Mesh::Mesh()
|
||||||
: attributes(this)
|
|
||||||
{
|
{
|
||||||
need_update = true;
|
need_update = true;
|
||||||
transform_applied = false;
|
transform_applied = false;
|
||||||
@ -49,6 +48,8 @@ Mesh::Mesh()
|
|||||||
|
|
||||||
tri_offset = 0;
|
tri_offset = 0;
|
||||||
vert_offset = 0;
|
vert_offset = 0;
|
||||||
|
|
||||||
|
attributes.mesh = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
Mesh::~Mesh()
|
Mesh::~Mesh()
|
||||||
|
Loading…
Reference in New Issue
Block a user