Diego Borghetti 2007-06-18 18:30:15 +00:00
parent 1347491e32
commit 5898cd391b
5 changed files with 50 additions and 15 deletions

View File

@ -252,17 +252,17 @@ static int isffmpeg (char *filename) {
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");
if(UTIL_DEBUG) fprintf(stderr, "isffmpeg: av_open_input_file failed\n");
return 0;
}
if(av_find_stream_info(pFormatCtx)<0) {
fprintf(stderr, "isffmpeg: av_find_stream_info failed\n");
if(UTIL_DEBUG) fprintf(stderr, "isffmpeg: av_find_stream_info failed\n");
av_close_input_file(pFormatCtx);
return 0;
}
dump_format(pFormatCtx, 0, filename, 0);
if(UTIL_DEBUG) dump_format(pFormatCtx, 0, filename, 0);
/* Find the first video stream */
@ -309,19 +309,33 @@ int imb_get_anim_type(char * name) {
if(UTIL_DEBUG) printf("in getanimtype: %s\n", name);
#ifdef WITH_FFMPEG
#ifndef _WIN32
# ifdef WITH_FFMPEG
/* stat test below fails on large files > 4GB */
if (isffmpeg(name)) return (ANIM_FFMPEG);
#endif
# endif
if (ib_stat(name,&st) == -1) return(0);
if (((st.st_mode) & S_IFMT) != S_IFREG) return(0);
if (isavi(name)) return (ANIM_AVI);
if (ismovie(name)) return (ANIM_MOVIE);
#ifdef WITH_QUICKTIME
# ifdef WITH_QUICKTIME
if (isqtime(name)) return (ANIM_QTIME);
# endif
#else
if (ib_stat(name,&st) == -1) return(0);
if (((st.st_mode) & S_IFMT) != S_IFREG) return(0);
if (isavi(name)) return (ANIM_AVI);
if (ismovie(name)) return (ANIM_MOVIE);
# ifdef WITH_QUICKTIME
if (isqtime(name)) return (ANIM_QTIME);
# endif
# ifdef WITH_FFMPEG
if (isffmpeg(name)) return (ANIM_FFMPEG);
# endif
#endif
type = IMB_ispic(name);
if (type == ANIM) return (ANIM_ANIM5);

View File

@ -498,7 +498,7 @@ class RenderData:
def setOversamplingLevel(level):
"""
Set the edge color for toon shading.
Set the level of over-sampling (anti-aliasing).
@type level: int
@param level: can be either 5, 8, 11, or 16
"""

View File

@ -2500,11 +2500,22 @@ static void object_softbodies__enable(void *ob_v, void *arg2)
allqueue(REDRAWBUTSEDIT, 0);
}
static int _can_softbodies_at_all(Object *ob)
{
// list of Yes
if ((ob->type==OB_MESH)
|| (ob->type==OB_CURVE)
|| (ob->type==OB_LATTICE)
|| (ob->type==OB_SURF)
) return 1;
// else deny
return 0;
}
static void object_softbodies_II(Object *ob)
{
uiBlock *block;
static int val;
if(!_can_softbodies_at_all(ob)) return;
block= uiNewBlock(&curarea->uiblocks, "object_softbodies_II", UI_EMBOSS, UI_HELV, curarea->win);
uiNewPanelTabbed("Soft Body", "Physics");
if(uiNewPanel(curarea, block, "Soft Body Collision", "Physics", 651, 0, 318, 204)==0) return;
@ -2583,9 +2594,9 @@ static void object_softbodies(Object *ob)
uiBlock *block;
static int val;
uiBut *but;
if(!_can_softbodies_at_all(ob)) return;
block= uiNewBlock(&curarea->uiblocks, "object_softbodies", UI_EMBOSS, UI_HELV, curarea->win);
if(uiNewPanel(curarea, block, "Soft Body", "Physics", 640, 0, 318, 204)==0) return;
uiSetButLock(object_data_is_libdata(ob), ERROR_LIBDATA_MESSAGE);
val = modifiers_isSoftbodyEnabled(ob);

View File

@ -52,6 +52,7 @@
#include "BKE_key.h"
#include "BKE_mesh.h"
#include "BKE_modifier.h"
#include "BKE_object.h"
#include "BIF_editmesh.h"
#include "BIF_screen.h"
@ -1205,6 +1206,7 @@ void multires_level_to_mesh(Object *ob, Mesh *me, const int render)
/* friendly check for background render */
if(G.background==0) {
object_handle_update(ob);
countall();
if(G.vd && G.vd->depths) G.vd->depths->damaged= 1;

View File

@ -697,11 +697,13 @@ static void draw_manipulator_axes(int colcode, int flagx, int flagy, int flagz)
/* only called while G.moving */
static void draw_manipulator_rotate_ghost(float mat[][4], int drawflags)
{
GLUquadricObj *qobj= gluNewQuadric();
GLUquadricObj *qobj;
float size, phi, startphi, vec[3], svec[3], matt[4][4], cross[3], tmat[3][3];
int arcs= (G.rt!=2);
glDisable(GL_DEPTH_TEST);
qobj= gluNewQuadric();
gluQuadricDrawStyle(qobj, GLU_FILL);
glColor4ub(0,0,0,64);
@ -832,7 +834,7 @@ static void draw_manipulator_rotate_ghost(float mat[][4], int drawflags)
static void draw_manipulator_rotate(float mat[][4], int moving, int drawflags, int combo)
{
GLUquadricObj *qobj= gluNewQuadric();
GLUquadricObj *qobj;
double plane[4];
float size, vec[3], unitmat[4][4];
float cywid= 0.33f*0.01f*(float)U.tw_handlesize;
@ -849,6 +851,8 @@ static void draw_manipulator_rotate(float mat[][4], int moving, int drawflags, i
/* Init stuff */
glDisable(GL_DEPTH_TEST);
Mat4One(unitmat);
qobj= gluNewQuadric();
gluQuadricDrawStyle(qobj, GLU_FILL);
/* prepare for screen aligned draw */
@ -1153,7 +1157,7 @@ static void draw_cylinder(GLUquadricObj *qobj, float len, float width)
static void draw_manipulator_translate(float mat[][4], int moving, int drawflags, int combo, int colcode)
{
GLUquadricObj *qobj = gluNewQuadric();
GLUquadricObj *qobj;
float cylen= 0.01f*(float)U.tw_handlesize;
float cywid= 0.25f*cylen, dz, size;
float unitmat[4][4];
@ -1163,6 +1167,8 @@ static void draw_manipulator_translate(float mat[][4], int moving, int drawflags
if(moving) glTranslatef(Trans.vec[0], Trans.vec[1], Trans.vec[2]);
glDisable(GL_DEPTH_TEST);
qobj= gluNewQuadric();
gluQuadricDrawStyle(qobj, GLU_FILL);
/* center circle, do not add to selection when shift is pressed (planar constraint) */
@ -1225,19 +1231,21 @@ static void draw_manipulator_translate(float mat[][4], int moving, int drawflags
static void draw_manipulator_rotate_cyl(float mat[][4], int moving, int drawflags, int combo, int colcode)
{
GLUquadricObj *qobj = gluNewQuadric();
GLUquadricObj *qobj;
float size;
float cylen= 0.01f*(float)U.tw_handlesize;
float cywid= 0.25f*cylen;
/* when called while moving in mixed mode, do not draw when... */
if((drawflags & MAN_ROT_C)==0) return;
/* prepare for screen aligned draw */
glPushMatrix();
size= screen_aligned(mat);
glDisable(GL_DEPTH_TEST);
qobj= gluNewQuadric();
/* Screen aligned view rot circle */
if(drawflags & MAN_ROT_V) {