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/blenkernel/intern/object.c')
-rw-r--r--source/blender/blenkernel/intern/object.c25
1 files changed, 15 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/object.c b/source/blender/blenkernel/intern/object.c
index 45d9d144f55..0694bde7b91 100644
--- a/source/blender/blenkernel/intern/object.c
+++ b/source/blender/blenkernel/intern/object.c
@@ -312,6 +312,11 @@ void BKE_object_free_derived_caches(Object *ob)
if (ob->curve_cache) {
BKE_displist_free(&ob->curve_cache->disp);
+ BLI_freelistN(&ob->curve_cache->bev);
+ if (ob->curve_cache->path) {
+ free_path(ob->curve_cache->path);
+ ob->curve_cache->path = NULL;
+ }
}
}
@@ -942,7 +947,7 @@ Object *BKE_object_add_only_object(Main *bmain, int type, const char *name)
ob->empty_drawtype = OB_PLAINAXES;
ob->empty_drawsize = 1.0;
- if (type == OB_CAMERA || type == OB_LAMP || type == OB_SPEAKER) {
+ if (ELEM3(type, OB_LAMP, OB_CAMERA, OB_SPEAKER)) {
ob->trackflag = OB_NEGZ;
ob->upflag = OB_POSY;
}
@@ -2411,7 +2416,7 @@ void BKE_object_minmax(Object *ob, float min_r[3], float max_r[3], const bool us
BoundBox bb;
float vec[3];
int a;
- bool change = false;
+ bool changed = false;
switch (ob->type) {
case OB_CURVE:
@@ -2424,7 +2429,7 @@ void BKE_object_minmax(Object *ob, float min_r[3], float max_r[3], const bool us
mul_m4_v3(ob->obmat, bb.vec[a]);
minmax_v3v3_v3(min_r, max_r, bb.vec[a]);
}
- change = TRUE;
+ changed = true;
break;
}
case OB_LATTICE:
@@ -2441,7 +2446,7 @@ void BKE_object_minmax(Object *ob, float min_r[3], float max_r[3], const bool us
}
}
}
- change = TRUE;
+ changed = true;
break;
}
case OB_ARMATURE:
@@ -2459,7 +2464,7 @@ void BKE_object_minmax(Object *ob, float min_r[3], float max_r[3], const bool us
mul_v3_m4v3(vec, ob->obmat, pchan->pose_tail);
minmax_v3v3_v3(min_r, max_r, vec);
- change = TRUE;
+ changed = true;
}
}
}
@@ -2476,7 +2481,7 @@ void BKE_object_minmax(Object *ob, float min_r[3], float max_r[3], const bool us
mul_m4_v3(ob->obmat, bb.vec[a]);
minmax_v3v3_v3(min_r, max_r, bb.vec[a]);
}
- change = TRUE;
+ changed = true;
}
break;
}
@@ -2484,8 +2489,8 @@ void BKE_object_minmax(Object *ob, float min_r[3], float max_r[3], const bool us
{
float ob_min[3], ob_max[3];
- change = BKE_mball_minmax_ex(ob->data, ob_min, ob_max, ob->obmat, 0);
- if (change) {
+ changed = BKE_mball_minmax_ex(ob->data, ob_min, ob_max, ob->obmat, 0);
+ if (changed) {
minmax_v3v3_v3(min_r, max_r, ob_min);
minmax_v3v3_v3(min_r, max_r, ob_max);
}
@@ -2493,7 +2498,7 @@ void BKE_object_minmax(Object *ob, float min_r[3], float max_r[3], const bool us
}
}
- if (change == FALSE) {
+ if (changed == false) {
float size[3];
copy_v3_v3(size, ob->size);
@@ -2539,7 +2544,7 @@ bool BKE_object_minmax_dupli(Scene *scene, Object *ob, float r_min[3], float r_m
minmax_v3v3_v3(r_min, r_max, vec);
}
- ok = TRUE;
+ ok = true;
}
}
}