diff options
author | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2021-03-07 19:22:00 +0300 |
---|---|---|
committer | Kévin Dietrich <kevin.dietrich@mailoo.org> | 2021-03-07 19:22:00 +0300 |
commit | 9c8382e6186b519429e4dee8870265351810bc99 (patch) | |
tree | f8a97cdd65b8057b77e917c26b8513e9567007b2 /intern/cycles | |
parent | 00f218602d52defee624e9853b03431d732649fa (diff) |
Cleanup: do not pass class member to class methods
Diffstat (limited to 'intern/cycles')
-rw-r--r-- | intern/cycles/render/alembic.cpp | 27 | ||||
-rw-r--r-- | intern/cycles/render/alembic.h | 9 |
2 files changed, 15 insertions, 21 deletions
diff --git a/intern/cycles/render/alembic.cpp b/intern/cycles/render/alembic.cpp index 9c73fb05405..468ebf7140f 100644 --- a/intern/cycles/render/alembic.cpp +++ b/intern/cycles/render/alembic.cpp @@ -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( diff --git a/intern/cycles/render/alembic.h b/intern/cycles/render/alembic.h index a00343c5225..587843201ce 100644 --- a/intern/cycles/render/alembic.h +++ b/intern/cycles/render/alembic.h @@ -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); }; |