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')
-rw-r--r--source/blender/modifiers/intern/MOD_armature.c7
-rw-r--r--source/blender/modifiers/intern/MOD_hook.c12
-rw-r--r--source/blender/modifiers/intern/MOD_warp.c12
-rw-r--r--source/blender/modifiers/intern/MOD_weightvg_util.c4
-rw-r--r--source/blender/modifiers/intern/MOD_weightvgedit.c8
5 files changed, 24 insertions, 19 deletions
diff --git a/source/blender/modifiers/intern/MOD_armature.c b/source/blender/modifiers/intern/MOD_armature.c
index 72215659915..7ae5fda7111 100644
--- a/source/blender/modifiers/intern/MOD_armature.c
+++ b/source/blender/modifiers/intern/MOD_armature.c
@@ -79,7 +79,12 @@ static bool isDisabled(const struct Scene *UNUSED(scene),
{
ArmatureModifierData *amd = (ArmatureModifierData *)md;
- return !amd->object;
+ /* The object type check is only needed here in case we have a placeholder
+ * object assigned (because the library containing the armature is missing).
+ *
+ * In other cases it should be impossible.
+ */
+ return !amd->object || amd->object->type != OB_ARMATURE;
}
static void foreachObjectLink(ModifierData *md, Object *ob, ObjectWalkFunc walk, void *userData)
diff --git a/source/blender/modifiers/intern/MOD_hook.c b/source/blender/modifiers/intern/MOD_hook.c
index c12fb9c1bd8..2f902db9340 100644
--- a/source/blender/modifiers/intern/MOD_hook.c
+++ b/source/blender/modifiers/intern/MOD_hook.c
@@ -49,7 +49,7 @@ static void initData(ModifierData *md)
HookModifierData *hmd = (HookModifierData *)md;
hmd->force = 1.0;
- hmd->curfalloff = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
+ hmd->curfalloff = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
hmd->falloff_type = eHook_Falloff_Smooth;
hmd->flag = 0;
}
@@ -61,7 +61,7 @@ static void copyData(const ModifierData *md, ModifierData *target, const int fla
modifier_copyData_generic(md, target, flag);
- thmd->curfalloff = curvemapping_copy(hmd->curfalloff);
+ thmd->curfalloff = BKE_curvemapping_copy(hmd->curfalloff);
thmd->indexar = MEM_dupallocN(hmd->indexar);
}
@@ -88,7 +88,7 @@ static void freeData(ModifierData *md)
{
HookModifierData *hmd = (HookModifierData *)md;
- curvemapping_free(hmd->curfalloff);
+ BKE_curvemapping_free(hmd->curfalloff);
MEM_SAFE_FREE(hmd->indexar);
}
@@ -174,7 +174,7 @@ static float hook_falloff(const struct HookData_cb *hd, const float len_sq)
break;
#endif
case eHook_Falloff_Curve:
- fac = curvemapping_evaluateF(hd->curfalloff, 0, fac);
+ fac = BKE_curvemapping_evaluateF(hd->curfalloff, 0, fac);
break;
case eHook_Falloff_Sharp:
fac = fac * fac;
@@ -262,11 +262,11 @@ static void deformVerts_do(HookModifierData *hmd,
if (hmd->curfalloff == NULL) {
/* should never happen, but bad lib linking could cause it */
- hmd->curfalloff = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
+ hmd->curfalloff = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
}
if (hmd->curfalloff) {
- curvemapping_initialize(hmd->curfalloff);
+ BKE_curvemapping_initialize(hmd->curfalloff);
}
/* Generic data needed for applying per-vertex calculations (initialize all members) */
diff --git a/source/blender/modifiers/intern/MOD_warp.c b/source/blender/modifiers/intern/MOD_warp.c
index 6441ab69391..7155498c942 100644
--- a/source/blender/modifiers/intern/MOD_warp.c
+++ b/source/blender/modifiers/intern/MOD_warp.c
@@ -50,7 +50,7 @@ static void initData(ModifierData *md)
{
WarpModifierData *wmd = (WarpModifierData *)md;
- wmd->curfalloff = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
+ wmd->curfalloff = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
wmd->texture = NULL;
wmd->strength = 1.0f;
wmd->falloff_radius = 1.0f;
@@ -65,7 +65,7 @@ static void copyData(const ModifierData *md, ModifierData *target, const int fla
modifier_copyData_generic(md, target, flag);
- twmd->curfalloff = curvemapping_copy(wmd->curfalloff);
+ twmd->curfalloff = BKE_curvemapping_copy(wmd->curfalloff);
}
static void requiredDataMask(Object *UNUSED(ob),
@@ -100,7 +100,7 @@ static bool dependsOnTime(ModifierData *md)
static void freeData(ModifierData *md)
{
WarpModifierData *wmd = (WarpModifierData *)md;
- curvemapping_free(wmd->curfalloff);
+ BKE_curvemapping_free(wmd->curfalloff);
}
static bool isDisabled(const struct Scene *UNUSED(scene),
@@ -188,11 +188,11 @@ static void warpModifier_do(WarpModifierData *wmd,
}
if (wmd->curfalloff == NULL) { /* should never happen, but bad lib linking could cause it */
- wmd->curfalloff = curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
+ wmd->curfalloff = BKE_curvemapping_add(1, 0.0f, 0.0f, 1.0f, 1.0f);
}
if (wmd->curfalloff) {
- curvemapping_initialize(wmd->curfalloff);
+ BKE_curvemapping_initialize(wmd->curfalloff);
}
invert_m4_m4(obinv, ob->obmat);
@@ -247,7 +247,7 @@ static void warpModifier_do(WarpModifierData *wmd,
fac = 1.0f;
break;
case eWarp_Falloff_Curve:
- fac = curvemapping_evaluateF(wmd->curfalloff, 0, fac);
+ fac = BKE_curvemapping_evaluateF(wmd->curfalloff, 0, fac);
break;
case eWarp_Falloff_Sharp:
fac = fac * fac;
diff --git a/source/blender/modifiers/intern/MOD_weightvg_util.c b/source/blender/modifiers/intern/MOD_weightvg_util.c
index 61872cbe464..486d5c90bef 100644
--- a/source/blender/modifiers/intern/MOD_weightvg_util.c
+++ b/source/blender/modifiers/intern/MOD_weightvg_util.c
@@ -72,7 +72,7 @@ void weightvg_do_map(int num, float *new_w, short falloff_type, CurveMapping *cm
}
if (cmap && falloff_type == MOD_WVG_MAPPING_CURVE) {
- curvemapping_initialize(cmap);
+ BKE_curvemapping_initialize(cmap);
}
/* Map each weight (vertex) to its new value, accordingly to the chosen mode. */
@@ -83,7 +83,7 @@ void weightvg_do_map(int num, float *new_w, short falloff_type, CurveMapping *cm
/* Closely matches PROP_SMOOTH and similar. */
switch (falloff_type) {
case MOD_WVG_MAPPING_CURVE:
- fac = curvemapping_evaluateF(cmap, 0, fac);
+ fac = BKE_curvemapping_evaluateF(cmap, 0, fac);
break;
case MOD_WVG_MAPPING_SHARP:
fac = fac * fac;
diff --git a/source/blender/modifiers/intern/MOD_weightvgedit.c b/source/blender/modifiers/intern/MOD_weightvgedit.c
index 207c5851602..045ba78fab5 100644
--- a/source/blender/modifiers/intern/MOD_weightvgedit.c
+++ b/source/blender/modifiers/intern/MOD_weightvgedit.c
@@ -57,8 +57,8 @@ static void initData(ModifierData *md)
wmd->falloff_type = MOD_WVG_MAPPING_NONE;
wmd->default_weight = 0.0f;
- wmd->cmap_curve = curvemapping_add(1, 0.0, 0.0, 1.0, 1.0);
- curvemapping_initialize(wmd->cmap_curve);
+ wmd->cmap_curve = BKE_curvemapping_add(1, 0.0, 0.0, 1.0, 1.0);
+ BKE_curvemapping_initialize(wmd->cmap_curve);
wmd->rem_threshold = 0.01f;
wmd->add_threshold = 0.01f;
@@ -71,7 +71,7 @@ static void initData(ModifierData *md)
static void freeData(ModifierData *md)
{
WeightVGEditModifierData *wmd = (WeightVGEditModifierData *)md;
- curvemapping_free(wmd->cmap_curve);
+ BKE_curvemapping_free(wmd->cmap_curve);
}
static void copyData(const ModifierData *md, ModifierData *target, const int flag)
@@ -81,7 +81,7 @@ static void copyData(const ModifierData *md, ModifierData *target, const int fla
modifier_copyData_generic(md, target, flag);
- twmd->cmap_curve = curvemapping_copy(wmd->cmap_curve);
+ twmd->cmap_curve = BKE_curvemapping_copy(wmd->cmap_curve);
}
static void requiredDataMask(Object *UNUSED(ob),