Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrecht Van Lommel <brecht>2021-09-09 18:22:20 +0300
committerBrecht Van Lommel <brecht@blender.org>2021-09-10 17:48:30 +0300
commit128eb6cbe928e58dfee1c64f340fd8d663134c26 (patch)
tree68c510ccb7bc3b60af06462392ec46da5baf53a6 /source/blender/io/alembic/exporter/abc_writer_mesh.h
parent42215d7cb8797ba5b631b9df93d07e895c4b1dda (diff)
Modifiers: export motion blur velocity through attribute
Previously fluid simulation and Alembic modifiers had a dedicated function to query the velocity for motion blur. Now use a more generic system where those modifiers output a velocity attribute. Advantages: * Geometry and particle nodes can output velocity through the same mechanism, or read the attribute coming from earlier modifiers. * The velocity can be preserved through modifiers like subdivision surface or auto smooth. * USD and Alembic previously only output velocity from fluid simulation, now they work with velocity from other sources too. * Simplifies the code for renderers like Cycles and exporters like Alembic and USD. This breaks compatibility: * External renderers and exporters accessing these velocities through the Python API now need to use the attribute instead. * Existing modifier node setups that create an attribute named "velocity" will render differently with motion blur. Differential Revision: https://developer.blender.org/D12305
Diffstat (limited to 'source/blender/io/alembic/exporter/abc_writer_mesh.h')
-rw-r--r--source/blender/io/alembic/exporter/abc_writer_mesh.h5
1 files changed, 1 insertions, 4 deletions
diff --git a/source/blender/io/alembic/exporter/abc_writer_mesh.h b/source/blender/io/alembic/exporter/abc_writer_mesh.h
index 0e1792b9dab..fb8a01a3bbf 100644
--- a/source/blender/io/alembic/exporter/abc_writer_mesh.h
+++ b/source/blender/io/alembic/exporter/abc_writer_mesh.h
@@ -45,7 +45,6 @@ class ABCGenericMeshWriter : public ABCAbstractWriter {
* exported object. */
bool is_subd_;
ModifierData *subsurf_modifier_;
- ModifierData *liquid_sim_modifier_;
CDStreamConfig m_custom_data_config;
@@ -70,10 +69,8 @@ class ABCGenericMeshWriter : public ABCAbstractWriter {
void write_subd(HierarchyContext &context, Mesh *mesh);
template<typename Schema> void write_face_sets(Object *object, Mesh *mesh, Schema &schema);
- ModifierData *get_liquid_sim_modifier(Scene *scene_eval, Object *ob_eval);
-
void write_arb_geo_params(Mesh *me);
- void get_velocities(Mesh *mesh, std::vector<Imath::V3f> &vels);
+ bool get_velocities(Mesh *mesh, std::vector<Imath::V3f> &vels);
void get_geo_groups(Object *object,
Mesh *mesh,
std::map<std::string, std::vector<int32_t>> &geo_groups);