Cycles: add support for motion blurring of fluid meshes.
Reviewed By: brecht Differential Revision: https://developer.blender.org/D2063
This commit is contained in:
@@ -204,18 +204,6 @@ static char *rna_FluidSettings_path(PointerRNA *ptr)
|
||||
return BLI_sprintfN("modifiers[\"%s\"].settings", name_esc);
|
||||
}
|
||||
|
||||
static void rna_FluidMeshVertex_data_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
|
||||
{
|
||||
FluidsimSettings *fss = (FluidsimSettings *)ptr->data;
|
||||
rna_iterator_array_begin(iter, fss->meshVelocities, sizeof(float) * 3, fss->totvert, 0, NULL);
|
||||
}
|
||||
|
||||
static int rna_FluidMeshVertex_data_length(PointerRNA *ptr)
|
||||
{
|
||||
FluidsimSettings *fss = (FluidsimSettings *)ptr->data;
|
||||
return fss->totvert;
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
static void rna_def_fluidsim_slip(StructRNA *srna)
|
||||
@@ -251,9 +239,8 @@ static void rna_def_fluid_mesh_vertices(BlenderRNA *brna)
|
||||
StructRNA *srna;
|
||||
PropertyRNA *prop;
|
||||
|
||||
srna = RNA_def_struct(brna, "FluidMeshVertex", NULL);
|
||||
RNA_def_struct_sdna(srna, "FluidVertexVelocity");
|
||||
RNA_def_struct_ui_text(srna, "Fluid Mesh Vertex", "Vertex of a simulated fluid mesh");
|
||||
srna = RNA_def_struct(brna, "FluidVertexVelocity", NULL);
|
||||
RNA_def_struct_ui_text(srna, "Fluid Mesh Velocity", "Velocity of a simulated fluid mesh");
|
||||
RNA_def_struct_ui_icon(srna, ICON_VERTEXSEL);
|
||||
|
||||
prop = RNA_def_property(srna, "velocity", PROP_FLOAT, PROP_VELOCITY);
|
||||
@@ -442,11 +429,10 @@ static void rna_def_fluidsim_domain(BlenderRNA *brna)
|
||||
|
||||
/* simulated fluid mesh data */
|
||||
prop = RNA_def_property(srna, "fluid_mesh_vertices", PROP_COLLECTION, PROP_NONE);
|
||||
RNA_def_property_struct_type(prop, "FluidMeshVertex");
|
||||
RNA_def_property_collection_sdna(prop, NULL, "meshVelocities", "totvert");
|
||||
RNA_def_property_struct_type(prop, "FluidVertexVelocity");
|
||||
RNA_def_property_ui_text(prop, "Fluid Mesh Vertices", "Vertices of the fluid mesh generated by simulation");
|
||||
RNA_def_property_collection_funcs(prop, "rna_FluidMeshVertex_data_begin", "rna_iterator_array_next",
|
||||
"rna_iterator_array_end", "rna_iterator_array_get",
|
||||
"rna_FluidMeshVertex_data_length", NULL, NULL, NULL);
|
||||
|
||||
rna_def_fluid_mesh_vertices(brna);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user