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:
Diffstat (limited to 'source/blender/modifiers/intern/MOD_cast.c')
-rw-r--r--source/blender/modifiers/intern/MOD_cast.c34
1 files changed, 11 insertions, 23 deletions
diff --git a/source/blender/modifiers/intern/MOD_cast.c b/source/blender/modifiers/intern/MOD_cast.c
index 59ffe11d614..f408a22aadf 100644
--- a/source/blender/modifiers/intern/MOD_cast.c
+++ b/source/blender/modifiers/intern/MOD_cast.c
@@ -1,6 +1,4 @@
/*
- * ***** BEGIN GPL LICENSE BLOCK *****
- *
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
@@ -17,29 +15,20 @@
*
* The Original Code is Copyright (C) 2005 by the Blender Foundation.
* All rights reserved.
- *
- * Contributor(s): Daniel Dunbar
- * Ton Roosendaal,
- * Ben Batt,
- * Brecht Van Lommel,
- * Campbell Barton
- *
- * ***** END GPL LICENSE BLOCK *****
- *
*/
-/** \file blender/modifiers/intern/MOD_cast.c
- * \ingroup modifiers
+/** \file
+ * \ingroup modifiers
*/
-#include "DNA_mesh_types.h"
-#include "DNA_meshdata_types.h"
-#include "DNA_object_types.h"
+#include "BLI_utildefines.h"
#include "BLI_math.h"
-#include "BLI_utildefines.h"
+#include "DNA_mesh_types.h"
+#include "DNA_meshdata_types.h"
+#include "DNA_object_types.h"
#include "BKE_deform.h"
#include "BKE_editmesh.h"
@@ -77,15 +66,14 @@ static bool isDisabled(const struct Scene *UNUSED(scene), ModifierData *md, bool
return false;
}
-static CustomDataMask requiredDataMask(Object *UNUSED(ob), ModifierData *md)
+static void requiredDataMask(Object *UNUSED(ob), ModifierData *md, CustomData_MeshMasks *r_cddata_masks)
{
CastModifierData *cmd = (CastModifierData *)md;
- CustomDataMask dataMask = 0;
/* ask for vertexgroups if we need them */
- if (cmd->defgrp_name[0]) dataMask |= CD_MASK_MDEFORMVERT;
-
- return dataMask;
+ if (cmd->defgrp_name[0] != '\0') {
+ r_cddata_masks->vmask |= CD_MASK_MDEFORMVERT;
+ }
}
static void foreachObjectLink(
@@ -102,7 +90,7 @@ static void updateDepsgraph(ModifierData *md, const ModifierUpdateDepsgraphConte
CastModifierData *cmd = (CastModifierData *)md;
if (cmd->object != NULL) {
DEG_add_object_relation(ctx->node, cmd->object, DEG_OB_COMP_TRANSFORM, "Cast Modifier");
- DEG_add_object_relation(ctx->node, ctx->object, DEG_OB_COMP_TRANSFORM, "Cast Modifier");
+ DEG_add_modifier_to_transform_relation(ctx->node, "Cast Modifier");
}
}