* scene.object.context and scene.object.selected had broken get_item 
funcs so scene.object.context[i]  returned the wrong object.
* aligning the view to an object (numpad*key), did not disable the 
ortho view grid.
* long standing problem where opening a relative image would fail with 
no message. BLI_convertstringcode was returning a path with /../../'s 
that need to be cleaned before the path could be read, the path was also 
invalid from unix shell so its not a blender path reading problem.
This commit is contained in:
Campbell Barton 2008-05-30 01:59:15 +00:00
parent 6af06ecdd2
commit da2d4904af
3 changed files with 23 additions and 7 deletions

@ -1166,6 +1166,7 @@ int BLI_convertstringcode(char *path, const char *basepath)
MEM_freeN(filepart);
}
BLI_cleanup_file(NULL, tmp);
strcpy(path, tmp);
#ifdef WIN32

@ -1355,16 +1355,29 @@ static PyObject *SceneObSeq_item( BPy_SceneObSeq * self, int i )
for (base= scene->base.first; base && i!=index; base= base->next, index++) {}
/* selected */
else if (self->mode==EXPP_OBSEQ_SELECTED) {
for (base= scene->base.first; base && i!=index; base= base->next)
if (base->flag & SELECT)
index++;
for (base= scene->base.first; base; base= base->next) {
if (base->flag & SELECT) {
if (i==index) {
break;
} else {
index++;
}
}
}
}
/* context */
else if (self->mode==EXPP_OBSEQ_CONTEXT) {
if (G.vd)
for (base= scene->base.first; base && i!=index; base= base->next)
if TESTBASE(base)
index++;
if (G.vd) {
for (base= scene->base.first; base; base= base->next) {
if (TESTBASE(base)) {
if (i==index) {
break;
} else {
index++;
}
}
}
}
}
if (!(base))

@ -1448,6 +1448,8 @@ void obmat_to_viewmat(Object *ob, short smooth)
float bmat[4][4];
float tmat[3][3];
G.vd->view= 0; /* dont show the grid */
Mat4CpyMat4(bmat, ob->obmat);
Mat4Ortho(bmat);
Mat4Invert(G.vd->viewmat, bmat);