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/curve.c')
-rw-r--r--source/blender/blenkernel/intern/curve.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/curve.c b/source/blender/blenkernel/intern/curve.c
index 1a30e85c5c4..841bd635acf 100644
--- a/source/blender/blenkernel/intern/curve.c
+++ b/source/blender/blenkernel/intern/curve.c
@@ -45,6 +45,7 @@
#include "DNA_key_types.h"
#include "DNA_scene_types.h"
#include "DNA_vfont_types.h"
+#include "DNA_object_types.h"
#include "BKE_animsys.h"
#include "BKE_anim.h"
@@ -126,7 +127,7 @@ Curve *add_curve(char *name, int type)
cu= alloc_libblock(&G.main->curve, ID_CU, name);
cu->size[0]= cu->size[1]= cu->size[2]= 1.0;
- cu->flag= CU_FRONT|CU_BACK|CU_PATH_RADIUS;
+ cu->flag= CU_FRONT|CU_BACK|CU_DEFORM_BOUNDS_OFF|CU_PATH_RADIUS;
cu->pathlen= 100;
cu->resolu= cu->resolv= 12;
cu->width= 1.0;
@@ -1221,6 +1222,8 @@ void makebevelcurve(Scene *scene, Object *ob, ListBase *disp, int forRender)
// XXX if( ob == obedit && ob->type == OB_FONT ) return;
if(cu->bevobj) {
+ if (cu->bevobj->type!=OB_CURVE) return;
+
bevcu= cu->bevobj->data;
if(bevcu->ext1==0.0 && bevcu->ext2==0.0) {
ListBase bevdisp= {NULL, NULL};
@@ -3105,13 +3108,11 @@ ListBase *BKE_curve_nurbs(Curve *cu)
/* basic vertex data functions */
-int curve_bounds(Curve *cu, float min[3], float max[3])
+int minmax_curve(Curve *cu, float min[3], float max[3])
{
ListBase *nurb_lb= BKE_curve_nurbs(cu);
Nurb *nu;
- INIT_MINMAX(min, max);
-
for(nu= nurb_lb->first; nu; nu= nu->next)
minmaxNurb(nu, min, max);
@@ -3157,8 +3158,8 @@ int curve_center_median(Curve *cu, float cent[3])
int curve_center_bounds(Curve *cu, float cent[3])
{
float min[3], max[3];
-
- if(curve_bounds(cu, min, max)) {
+ INIT_MINMAX(min, max);
+ if(minmax_curve(cu, min, max)) {
mid_v3_v3v3(cent, min, max);
return 1;
}