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:
authorKévin Dietrich <kevin.dietrich@mailoo.org>2016-07-16 19:56:59 +0300
committerBrecht Van Lommel <brechtvanlommel@gmail.com>2016-07-18 23:40:08 +0300
commit10b0e33de1b9b57693ebcec7d503d3b204043f56 (patch)
tree7851232b17d632a72ee9516b4808f87f3432ad3d /intern/cycles/blender/blender_util.h
parent20ec6bc166e31449cce48a5a658f26caf96f71fa (diff)
Cycles: add support for motion blurring of fluid meshes.
Reviewed By: brecht Differential Revision: https://developer.blender.org/D2063
Diffstat (limited to 'intern/cycles/blender/blender_util.h')
-rw-r--r--intern/cycles/blender/blender_util.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/intern/cycles/blender/blender_util.h b/intern/cycles/blender/blender_util.h
index 2510cebcdc0..188d23d0c59 100644
--- a/intern/cycles/blender/blender_util.h
+++ b/intern/cycles/blender/blender_util.h
@@ -519,6 +519,23 @@ static inline BL::SmokeDomainSettings object_smoke_domain_find(BL::Object& b_ob)
return BL::SmokeDomainSettings(PointerRNA_NULL);
}
+static inline BL::DomainFluidSettings object_fluid_domain_find(BL::Object b_ob)
+{
+ BL::Object::modifiers_iterator b_mod;
+
+ for(b_ob.modifiers.begin(b_mod); b_mod != b_ob.modifiers.end(); ++b_mod) {
+ if(b_mod->is_a(&RNA_FluidSimulationModifier)) {
+ BL::FluidSimulationModifier b_fmd(*b_mod);
+ BL::FluidSettings fss = b_fmd.settings();
+
+ if(fss.type() == BL::FluidSettings::type_DOMAIN)
+ return (BL::DomainFluidSettings)b_fmd.settings();
+ }
+ }
+
+ return BL::DomainFluidSettings(PointerRNA_NULL);
+}
+
/* ID Map
*
* Utility class to keep in sync with blender data.