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:
authorSybren A. Stüvel <sybren@stuvel.eu>2018-04-25 17:47:52 +0300
committerSybren A. Stüvel <sybren@stuvel.eu>2018-05-01 19:02:17 +0300
commit2d6620a100e2e6e1835359688f4135771f660de1 (patch)
tree7e2b3c1ee3ecc4d801204f6f91570c3ffa16ec81 /source/blender/modifiers/intern/MOD_util.c
parent1553f6b656feed517023dbc07e8c07637732b746 (diff)
Modifiers: Array DerivedMesh → Mesh
Diffstat (limited to 'source/blender/modifiers/intern/MOD_util.c')
-rw-r--r--source/blender/modifiers/intern/MOD_util.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/source/blender/modifiers/intern/MOD_util.c b/source/blender/modifiers/intern/MOD_util.c
index 79992e4868f..e59d7200880 100644
--- a/source/blender/modifiers/intern/MOD_util.c
+++ b/source/blender/modifiers/intern/MOD_util.c
@@ -218,6 +218,21 @@ DerivedMesh *get_dm_for_modifier(Object *ob, ModifierApplyFlag flag)
}
}
+/* Get evaluated mesh for other object, which is used as an operand for the modifier,
+ * i.e. second operand for boolean modifier.
+ */
+Mesh *get_mesh_eval_for_modifier(Object *ob, ModifierApplyFlag flag)
+{
+ if (flag & MOD_APPLY_RENDER) {
+ /* TODO(sergey): Use proper derived render in the future. */
+ return ob->mesh_evaluated;
+ }
+ else {
+ return ob->mesh_evaluated;
+ }
+}
+
+
void modifier_get_vgroup(Object *ob, DerivedMesh *dm, const char *name, MDeformVert **dvert, int *defgrp_index)
{
*defgrp_index = defgroup_name_index(ob, name);