branches/2-44-stable
Merge from trunk: revision 10778:10779 (Bugfix #6714) Link: http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=10779 revision 10783:10784 drawmesh.c - change from mal_CanDo that makes lighting work the same as in blender 2.44. header_view3d.c - smoothview wasnt working with the camera menu Link: http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=10784 revision 10794:10795 Made it that hidden bones should arnt selected armature and posemode Link: http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=10795 revision 10797:10798 Fix for a crash in Blender.Mesh Link: http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=10798
This commit is contained in:
parent
6fc5b3cbb5
commit
1347491e32
|
@ -808,6 +808,7 @@ void mball_to_mesh(ListBase *lb, Mesh *me)
|
|||
}
|
||||
}
|
||||
|
||||
/* this may fail replacing ob->data, be sure to check ob->type */
|
||||
void nurbs_to_mesh(Object *ob)
|
||||
{
|
||||
Object *ob1;
|
||||
|
@ -847,7 +848,8 @@ void nurbs_to_mesh(Object *ob)
|
|||
dl= dl->next;
|
||||
}
|
||||
if(totvert==0) {
|
||||
error("can't convert");
|
||||
/* error("can't convert"); */
|
||||
/* Make Sure you check ob->data is a curve */
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -242,6 +242,15 @@ static int isffmpeg (char *filename) {
|
|||
|
||||
do_init_ffmpeg();
|
||||
|
||||
if( BLI_testextensie(filename, ".swf") ||
|
||||
BLI_testextensie(filename, ".jpg") ||
|
||||
BLI_testextensie(filename, ".png") ||
|
||||
BLI_testextensie(filename, ".tga") ||
|
||||
BLI_testextensie(filename, ".bmp") ||
|
||||
BLI_testextensie(filename, ".exr") ||
|
||||
BLI_testextensie(filename, ".cin") ||
|
||||
BLI_testextensie(filename, ".wav")) return 0;
|
||||
|
||||
if(av_open_input_file(&pFormatCtx, filename, NULL, 0, NULL)!=0) {
|
||||
fprintf(stderr, "isffmpeg: av_open_input_file failed\n");
|
||||
return 0;
|
||||
|
@ -266,8 +275,10 @@ static int isffmpeg (char *filename) {
|
|||
break;
|
||||
}
|
||||
|
||||
if(videoStream==-1)
|
||||
if(videoStream==-1) {
|
||||
av_close_input_file(pFormatCtx);
|
||||
return 0;
|
||||
}
|
||||
|
||||
pCodecCtx = get_codec_from_stream(pFormatCtx->streams[videoStream]);
|
||||
|
||||
|
|
|
@ -5671,6 +5671,10 @@ static PyObject *Mesh_getFromObject( BPy_Mesh * self, PyObject * args )
|
|||
nurbs_to_mesh( tmpobj );
|
||||
tmpmesh = tmpobj->data;
|
||||
free_libblock_us( &G.main->object, tmpobj );
|
||||
|
||||
if (ob->type != OB_MESH)
|
||||
return EXPP_ReturnPyObjError( PyExc_RuntimeError,
|
||||
"cant convert curve to mesh. Does the curve have any segments?" );
|
||||
break;
|
||||
case OB_MBALL:
|
||||
/* metaballs don't have modifiers, so just convert to mesh */
|
||||
|
|
|
@ -1021,7 +1021,7 @@ void draw_tface_mesh(Object *ob, Mesh *me, int dt)
|
|||
g_draw_tface_mesh_ob = ob;
|
||||
g_draw_tface_mesh_istex = istex;
|
||||
memcpy(g_draw_tface_mesh_obcol, obcol, sizeof(obcol));
|
||||
set_draw_settings_cached(1, 0, 0, 1, 0, 0, 0);
|
||||
set_draw_settings_cached(1, 0, 0, g_draw_tface_mesh_islight, 0, 0, 0);
|
||||
|
||||
if(dt > OB_SOLID || g_draw_tface_mesh_islight==-1) {
|
||||
bProperty *prop = get_property(ob, "Text");
|
||||
|
|
|
@ -1234,15 +1234,15 @@ void deselectall_armature(int toggle, int doundo)
|
|||
sel=0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
// }
|
||||
// }
|
||||
}
|
||||
}
|
||||
else sel= toggle;
|
||||
|
||||
/* Set the flags */
|
||||
for (eBone=G.edbo.first;eBone;eBone=eBone->next){
|
||||
if (sel==1) {
|
||||
if(arm->layer & eBone->layer) {
|
||||
if(arm->layer & eBone->layer && (eBone->flag & BONE_HIDDEN_A)==0) {
|
||||
eBone->flag |= (BONE_SELECTED | BONE_TIPSEL | BONE_ROOTSEL);
|
||||
if(eBone->parent)
|
||||
eBone->parent->flag |= (BONE_TIPSEL);
|
||||
|
@ -2158,7 +2158,7 @@ void deselectall_posearmature (Object *ob, int test, int doundo)
|
|||
/* Determine if we're selecting or deselecting */
|
||||
if (test==1) {
|
||||
for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next)
|
||||
if(pchan->bone->layer & arm->layer)
|
||||
if(pchan->bone->layer & arm->layer && !(pchan->bone->flag & BONE_HIDDEN_P))
|
||||
if(pchan->bone->flag & BONE_SELECTED)
|
||||
break;
|
||||
|
||||
|
@ -2170,7 +2170,7 @@ void deselectall_posearmature (Object *ob, int test, int doundo)
|
|||
|
||||
/* Set the flags accordingly */
|
||||
for(pchan= ob->pose->chanbase.first; pchan; pchan= pchan->next) {
|
||||
if(pchan->bone->layer & arm->layer) {
|
||||
if(pchan->bone->layer & arm->layer && !(pchan->bone->flag & BONE_HIDDEN_P)) {
|
||||
if(selectmode==0) pchan->bone->flag &= ~(BONE_SELECTED|BONE_TIPSEL|BONE_ROOTSEL|BONE_ACTIVE);
|
||||
else if(selectmode==1) pchan->bone->flag |= BONE_SELECTED;
|
||||
else pchan->bone->flag &= ~BONE_ACTIVE;
|
||||
|
|
|
@ -2527,8 +2527,11 @@ static void curvetomesh(Object *ob)
|
|||
if(dl==0) makeDispListCurveTypes(ob, 0); /* force creation */
|
||||
|
||||
nurbs_to_mesh(ob); /* also does users */
|
||||
|
||||
object_free_modifiers(ob);
|
||||
if (ob->type != OB_MESH) {
|
||||
error("can't convert curve to mesh");
|
||||
} else {
|
||||
object_free_modifiers(ob);
|
||||
}
|
||||
}
|
||||
|
||||
void convertmenu(void)
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
#include "DNA_view3d_types.h"
|
||||
#include "DNA_text_types.h" /* for space handlers */
|
||||
#include "DNA_texture_types.h"
|
||||
#include "DNA_userdef_types.h" /* U.smooth_viewtx */
|
||||
|
||||
#include "BKE_action.h"
|
||||
#include "BKE_curve.h"
|
||||
|
@ -70,6 +71,7 @@
|
|||
#include "BKE_library.h"
|
||||
#include "BKE_main.h"
|
||||
#include "BKE_mesh.h"
|
||||
#include "BKE_utildefines.h" /* for VECCOPY */
|
||||
|
||||
#ifdef WITH_VERSE
|
||||
#include "BKE_verse.h"
|
||||
|
@ -213,11 +215,35 @@ static void do_view3d_view_camerasmenu(void *arg, int event)
|
|||
i++;
|
||||
|
||||
if (event==i) {
|
||||
G.vd->camera= base->object;
|
||||
handle_view3d_lock();
|
||||
|
||||
G.vd->persp= 2;
|
||||
G.vd->view= 0;
|
||||
if (G.vd->camera == base->object && G.vd->persp==2)
|
||||
return;
|
||||
|
||||
if (U.smooth_viewtx) {
|
||||
/* move 3d view to camera view */
|
||||
float orig_ofs[3], orig_lens = G.vd->lens;
|
||||
VECCOPY(orig_ofs, G.vd->ofs);
|
||||
|
||||
if (G.vd->camera && G.vd->persp==2)
|
||||
view_settings_from_ob(G.vd->camera, G.vd->ofs, G.vd->viewquat, &G.vd->dist, &G.vd->lens);
|
||||
|
||||
G.vd->camera = base->object;
|
||||
handle_view3d_lock();
|
||||
G.vd->persp= 2;
|
||||
G.vd->view= 0;
|
||||
|
||||
smooth_view_to_camera(G.vd);
|
||||
|
||||
/* restore values */
|
||||
VECCOPY(G.vd->ofs, orig_ofs);
|
||||
G.vd->lens = orig_lens;
|
||||
} else {
|
||||
G.vd->camera= base->object;
|
||||
handle_view3d_lock();
|
||||
G.vd->persp= 2;
|
||||
G.vd->view= 0;
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue