Cleanup: do not pass class member to class methods
This commit is contained in:
parent
00f218602d
commit
9c8382e618
@ -1420,13 +1420,13 @@ void AlembicProcedural::generate(Scene *scene, Progress &progress)
|
||||
}
|
||||
|
||||
if (object->schema_type == AlembicObject::POLY_MESH) {
|
||||
read_mesh(scene, object, frame_time, progress);
|
||||
read_mesh(object, frame_time, progress);
|
||||
}
|
||||
else if (object->schema_type == AlembicObject::CURVES) {
|
||||
read_curves(scene, object, frame_time, progress);
|
||||
read_curves(object, frame_time, progress);
|
||||
}
|
||||
else if (object->schema_type == AlembicObject::SUBD) {
|
||||
read_subd(scene, object, frame_time, progress);
|
||||
read_subd(object, frame_time, progress);
|
||||
}
|
||||
|
||||
object->clear_modified();
|
||||
@ -1515,8 +1515,7 @@ void AlembicProcedural::load_objects(Progress &progress)
|
||||
}
|
||||
}
|
||||
|
||||
void AlembicProcedural::read_mesh(Scene *scene,
|
||||
AlembicObject *abc_object,
|
||||
void AlembicProcedural::read_mesh(AlembicObject *abc_object,
|
||||
Abc::chrono_t frame_time,
|
||||
Progress &progress)
|
||||
{
|
||||
@ -1579,7 +1578,7 @@ void AlembicProcedural::read_mesh(Scene *scene,
|
||||
|
||||
/* we don't yet support arbitrary attributes, for now add vertex
|
||||
* coordinates as generated coordinates if requested */
|
||||
if (mesh->need_attribute(scene, ATTR_STD_GENERATED)) {
|
||||
if (mesh->need_attribute(scene_, ATTR_STD_GENERATED)) {
|
||||
Attribute *attr = mesh->attributes.add(ATTR_STD_GENERATED);
|
||||
memcpy(
|
||||
attr->data_float3(), mesh->get_verts().data(), sizeof(float3) * mesh->get_verts().size());
|
||||
@ -1587,12 +1586,11 @@ void AlembicProcedural::read_mesh(Scene *scene,
|
||||
|
||||
if (mesh->is_modified()) {
|
||||
bool need_rebuild = mesh->triangles_is_modified();
|
||||
mesh->tag_update(scene, need_rebuild);
|
||||
mesh->tag_update(scene_, need_rebuild);
|
||||
}
|
||||
}
|
||||
|
||||
void AlembicProcedural::read_subd(Scene *scene,
|
||||
AlembicObject *abc_object,
|
||||
void AlembicProcedural::read_subd(AlembicObject *abc_object,
|
||||
Abc::chrono_t frame_time,
|
||||
Progress &progress)
|
||||
{
|
||||
@ -1683,7 +1681,7 @@ void AlembicProcedural::read_subd(Scene *scene,
|
||||
|
||||
/* we don't yet support arbitrary attributes, for now add vertex
|
||||
* coordinates as generated coordinates if requested */
|
||||
if (mesh->need_attribute(scene, ATTR_STD_GENERATED)) {
|
||||
if (mesh->need_attribute(scene_, ATTR_STD_GENERATED)) {
|
||||
Attribute *attr = mesh->attributes.add(ATTR_STD_GENERATED);
|
||||
memcpy(
|
||||
attr->data_float3(), mesh->get_verts().data(), sizeof(float3) * mesh->get_verts().size());
|
||||
@ -1697,12 +1695,11 @@ void AlembicProcedural::read_subd(Scene *scene,
|
||||
(mesh->subd_start_corner_is_modified()) ||
|
||||
(mesh->subd_face_corners_is_modified());
|
||||
|
||||
mesh->tag_update(scene, need_rebuild);
|
||||
mesh->tag_update(scene_, need_rebuild);
|
||||
}
|
||||
}
|
||||
|
||||
void AlembicProcedural::read_curves(Scene *scene,
|
||||
AlembicObject *abc_object,
|
||||
void AlembicProcedural::read_curves(AlembicObject *abc_object,
|
||||
Abc::chrono_t frame_time,
|
||||
Progress &progress)
|
||||
{
|
||||
@ -1746,7 +1743,7 @@ void AlembicProcedural::read_curves(Scene *scene,
|
||||
|
||||
/* we don't yet support arbitrary attributes, for now add first keys as generated coordinates if
|
||||
* requested */
|
||||
if (hair->need_attribute(scene, ATTR_STD_GENERATED)) {
|
||||
if (hair->need_attribute(scene_, ATTR_STD_GENERATED)) {
|
||||
Attribute *attr_generated = hair->attributes.add(ATTR_STD_GENERATED);
|
||||
float3 *generated = attr_generated->data_float3();
|
||||
|
||||
@ -1756,7 +1753,7 @@ void AlembicProcedural::read_curves(Scene *scene,
|
||||
}
|
||||
|
||||
const bool rebuild = (hair->curve_keys_is_modified() || hair->curve_radius_is_modified());
|
||||
hair->tag_update(scene, rebuild);
|
||||
hair->tag_update(scene_, rebuild);
|
||||
}
|
||||
|
||||
void AlembicProcedural::walk_hierarchy(
|
||||
|
@ -396,22 +396,19 @@ class AlembicProcedural : public Procedural {
|
||||
|
||||
/* Read the data for an IPolyMesh at the specified frame_time. Creates corresponding Geometry and
|
||||
* Object Nodes in the Cycles scene if none exist yet. */
|
||||
void read_mesh(Scene *scene,
|
||||
AlembicObject *abc_object,
|
||||
void read_mesh(AlembicObject *abc_object,
|
||||
Alembic::AbcGeom::Abc::chrono_t frame_time,
|
||||
Progress &progress);
|
||||
|
||||
/* Read the data for an ICurves at the specified frame_time. Creates corresponding Geometry and
|
||||
* Object Nodes in the Cycles scene if none exist yet. */
|
||||
void read_curves(Scene *scene,
|
||||
AlembicObject *abc_object,
|
||||
void read_curves(AlembicObject *abc_object,
|
||||
Alembic::AbcGeom::Abc::chrono_t frame_time,
|
||||
Progress &progress);
|
||||
|
||||
/* Read the data for an ISubD at the specified frame_time. Creates corresponding Geometry and
|
||||
* Object Nodes in the Cycles scene if none exist yet. */
|
||||
void read_subd(Scene *scene,
|
||||
AlembicObject *abc_object,
|
||||
void read_subd(AlembicObject *abc_object,
|
||||
Alembic::AbcGeom::Abc::chrono_t frame_time,
|
||||
Progress &progress);
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user