diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index cad8d3b0861..9d86b86a47f 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -409,8 +409,9 @@ static void setup_app_data(BlendFileData *bfd, char *filename) /* there's an onload scriptlink to execute in screenmain */ mainqenter(ONLOAD_SCRIPT, 1); } - - strcpy(G.sce, filename); + if (G.sce != filename) /* these are the same at times, should never copy to the same location */ + strcpy(G.sce, filename); + strcpy(G.main->name, filename); /* is guaranteed current file */ MEM_freeN(bfd); diff --git a/source/blender/src/transform_conversions.c b/source/blender/src/transform_conversions.c index 3e1f08c82a3..1b644b8342e 100644 --- a/source/blender/src/transform_conversions.c +++ b/source/blender/src/transform_conversions.c @@ -1137,10 +1137,15 @@ static void createTransCurveVerts(TransInfo *t) if((nu->type & 7)==CU_BEZIER) { for(a=0, bezt= nu->bezt; apntsu; a++, bezt++) { if(bezt->hide==0) { - if(bezt->f1 & 1) countsel++; - if(bezt->f2 & 1) countsel++; - if(bezt->f3 & 1) countsel++; - if(propmode) count+= 3; + if (G.f & G_HIDDENHANDLES) { + if(bezt->f2 & 1) countsel+=3; + if(propmode) count+= 3; + } else { + if(bezt->f1 & 1) countsel++; + if(bezt->f2 & 1) countsel++; + if(bezt->f3 & 1) countsel++; + if(propmode) count+= 3; + } } } } @@ -1170,11 +1175,15 @@ static void createTransCurveVerts(TransInfo *t) head = tail = td; for(a=0, bezt= nu->bezt; apntsu; a++, bezt++) { if(bezt->hide==0) { - if(propmode || (bezt->f1 & 1)) { + + if( propmode || + ((bezt->f2 & 1) && (G.f & G_HIDDENHANDLES)) || + ((bezt->f1 & 1) && (G.f & G_HIDDENHANDLES)==0) + ) { VECCOPY(td->iloc, bezt->vec[0]); td->loc= bezt->vec[0]; VECCOPY(td->center, bezt->vec[1]); - if(bezt->f1 & 1) td->flag= TD_SELECTED; + if(bezt->f1 & 1 || G.f & G_HIDDENHANDLES) td->flag= TD_SELECTED; else td->flag= 0; td->ext = NULL; td->tdi = NULL; @@ -1187,7 +1196,8 @@ static void createTransCurveVerts(TransInfo *t) count++; tail++; } - /* THIS IS THE CV, the other two are handles */ + + /* This is the Curve Point, the other two are handles */ if(propmode || (bezt->f2 & 1)) { VECCOPY(td->iloc, bezt->vec[1]); td->loc= bezt->vec[1]; @@ -1197,12 +1207,14 @@ static void createTransCurveVerts(TransInfo *t) td->ext = NULL; td->tdi = NULL; - if (t->mode==TFM_CURVE_SHRINKFATTEN) { + if (t->mode==TFM_CURVE_SHRINKFATTEN) { /* || t->mode==TFM_RESIZE) {*/ /* TODO - make points scale */ td->val = &(bezt->radius); td->ival = bezt->radius; - } else { + } else if (t->mode==TFM_TILT) { td->val = &(bezt->alfa); td->ival = bezt->alfa; + } else { + td->val = NULL; } Mat3CpyMat3(td->smtx, smtx); @@ -1212,11 +1224,14 @@ static void createTransCurveVerts(TransInfo *t) count++; tail++; } - if(propmode || (bezt->f3 & 1)) { + if( propmode || + ((bezt->f1 & 1) && (G.f & G_HIDDENHANDLES)) || + ((bezt->f3 & 1) && (G.f & G_HIDDENHANDLES)==0) + ) { VECCOPY(td->iloc, bezt->vec[2]); td->loc= bezt->vec[2]; VECCOPY(td->center, bezt->vec[1]); - if(bezt->f3 & 1) td->flag= TD_SELECTED; + if(bezt->f3 & 1 || (G.f & G_HIDDENHANDLES)) td->flag= TD_SELECTED; else td->flag= 0; td->ext = NULL; td->tdi = NULL; @@ -1252,7 +1267,7 @@ static void createTransCurveVerts(TransInfo *t) td->ext = NULL; td->tdi = NULL; - if (t->mode==TFM_CURVE_SHRINKFATTEN) { + if (t->mode==TFM_CURVE_SHRINKFATTEN || t->mode==TFM_RESIZE) { td->val = &(bp->radius); td->ival = bp->radius; } else {