Revision: 29851 http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29851 Author: blendix Date: 2010-07-01 18:17:57 +0200 (Thu, 01 Jul 2010)
Log Message: ----------- Render Branch: svn merge https://svn.blender.org/svnroot/bf-blender/trunk/blender -r29826:29850 Modified Paths: -------------- branches/render25/CMakeLists.txt branches/render25/release/scripts/ui/properties_physics_common.py branches/render25/source/blender/blenlib/intern/bpath.c branches/render25/source/blender/blenlib/intern/pbvh.c branches/render25/source/blender/editors/render/render_opengl.c branches/render25/source/blender/editors/space_sequencer/sequencer_add.c branches/render25/source/blender/gpu/intern/gpu_buffers.c branches/render25/source/blender/makesdna/DNA_sequence_types.h branches/render25/source/blender/makesrna/rna_cleanup/rna_cleaner.py branches/render25/source/blender/render/CMakeLists.txt Modified: branches/render25/CMakeLists.txt =================================================================== --- branches/render25/CMakeLists.txt 2010-07-01 15:12:10 UTC (rev 29850) +++ branches/render25/CMakeLists.txt 2010-07-01 16:17:57 UTC (rev 29851) @@ -304,6 +304,10 @@ SET(PLATFORM_CFLAGS "-pipe -fPIC -funsigned-char -fno-strict-aliasing -Wno-char-subscripts") + IF(WITH_RAYOPTIMIZATION) + SET(PLATFORM_CFLAGS " -msse ${PLATFORM_CFLAGS}") + ENDIF(WITH_RAYOPTIMIZATION) + SET(PLATFORM_LINKFLAGS "-pthread") # Better warnings Modified: branches/render25/release/scripts/ui/properties_physics_common.py =================================================================== --- branches/render25/release/scripts/ui/properties_physics_common.py 2010-07-01 15:12:10 UTC (rev 29850) +++ branches/render25/release/scripts/ui/properties_physics_common.py 2010-07-01 16:17:57 UTC (rev 29851) @@ -38,7 +38,7 @@ col.operator("ptcache.remove", icon='ZOOMOUT', text="") row = layout.row() - if cachetype in {'PSYS', 'HAIR'}: + if cachetype in {'PSYS', 'HAIR', 'SMOKE'}: row.prop(cache, "external") if cache.external: Modified: branches/render25/source/blender/blenlib/intern/bpath.c =================================================================== --- branches/render25/source/blender/blenlib/intern/bpath.c 2010-07-01 15:12:10 UTC (rev 29850) +++ branches/render25/source/blender/blenlib/intern/bpath.c 2010-07-01 16:17:57 UTC (rev 29851) @@ -62,10 +62,7 @@ /* for sequence */ //XXX #include "BSE_sequence.h" //XXX define below from BSE_sequence.h - otherwise potentially odd behaviour -#define SEQ_HAS_PATH(_seq) ( (_seq)->type==SEQ_MOVIE || (_seq)->type==SEQ_IMAGE || (_seq)->type==SEQ_SOUND ) - - #define FILE_MAX 240 /* TODO - BPATH_PLUGIN, BPATH_SEQ */ Modified: branches/render25/source/blender/blenlib/intern/pbvh.c =================================================================== --- branches/render25/source/blender/blenlib/intern/pbvh.c 2010-07-01 15:12:10 UTC (rev 29850) +++ branches/render25/source/blender/blenlib/intern/pbvh.c 2010-07-01 16:17:57 UTC (rev 29851) @@ -30,6 +30,7 @@ #include "BKE_DerivedMesh.h" #include "BKE_mesh.h" /* for mesh_calc_normals */ +#include "BKE_global.h" /* for mesh_calc_normals */ #include "gpu_buffers.h" @@ -350,12 +351,14 @@ if(node->face_vert_indices[i] < 0) node->face_vert_indices[i]= -node->face_vert_indices[i] + node->uniq_verts - 1; - node->draw_buffers = - GPU_build_mesh_buffers(map, bvh->verts, bvh->faces, + if(!G.background) { + node->draw_buffers = + GPU_build_mesh_buffers(map, bvh->verts, bvh->faces, node->prim_indices, node->totprim, node->vert_indices, node->uniq_verts, node->uniq_verts + node->face_verts); + } node->flag |= PBVH_UpdateDrawBuffers; @@ -364,10 +367,11 @@ static void build_grids_leaf_node(PBVH *bvh, PBVHNode *node) { - node->draw_buffers = - GPU_build_grid_buffers(bvh->grids, node->prim_indices, + if(!G.background) { + node->draw_buffers = + GPU_build_grid_buffers(bvh->grids, node->prim_indices, node->totprim, bvh->gridsize); - + } node->flag |= PBVH_UpdateDrawBuffers; } Modified: branches/render25/source/blender/editors/render/render_opengl.c =================================================================== --- branches/render25/source/blender/editors/render/render_opengl.c 2010-07-01 15:12:10 UTC (rev 29850) +++ branches/render25/source/blender/editors/render/render_opengl.c 2010-07-01 16:17:57 UTC (rev 29851) @@ -233,7 +233,7 @@ rr= RE_AcquireResultWrite(oglrender->re); if(rr->rectf==NULL) - rr->rectf= MEM_mallocN(sizeof(float)*4*sizex*sizey, "32 bits rects"); + rr->rectf= MEM_callocN(sizeof(float)*4*sizex*sizey, "screen_opengl_render_init rect"); RE_ReleaseResult(oglrender->re); return 1; @@ -402,10 +402,11 @@ return OPERATOR_RUNNING_MODAL; } + /* run first because screen_opengl_render_anim_step can free oglrender */ + WM_event_add_notifier(C, NC_SCENE|ND_RENDER_RESULT, oglrender->scene); + ret= screen_opengl_render_anim_step(C, op); - WM_event_add_notifier(C, NC_SCENE|ND_RENDER_RESULT, oglrender->scene); - /* stop at the end or on error */ if(ret == 0) { return OPERATOR_FINISHED; Modified: branches/render25/source/blender/editors/space_sequencer/sequencer_add.c =================================================================== --- branches/render25/source/blender/editors/space_sequencer/sequencer_add.c 2010-07-01 15:12:10 UTC (rev 29850) +++ branches/render25/source/blender/editors/space_sequencer/sequencer_add.c 2010-07-01 16:17:57 UTC (rev 29851) @@ -121,7 +121,18 @@ if ((flag & SEQPROP_ENDFRAME) && RNA_property_is_set(op->ptr, "frame_end")==0) RNA_int_set(op->ptr, "frame_end", (int)mval_v2d[0] + 25); // XXX arbitary but ok for now. - + + if(RNA_struct_find_property(op->ptr, "filepath")) { + Scene *scene= CTX_data_scene(C); + Sequence *last_seq= seq_active_get(scene); + if(last_seq && last_seq->strip && SEQ_HAS_PATH(last_seq)) { + RNA_string_set(op->ptr, "filepath", last_seq->strip->dir); + } + // // TODO + // else { + // RNA_string_set(op->ptr, "filepath", ed->act_imagedir); + // } + } } static void seq_load_operator_info(SeqLoadInfo *seq_load, wmOperator *op) @@ -318,7 +329,10 @@ RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS); sequencer_generic_invoke_xy__internal(C, op, event, 0); - return WM_operator_filesel(C, op, event); + + WM_event_add_fileselect(C, op); + return OPERATOR_RUNNING_MODAL; + //return sequencer_add_movie_strip_exec(C, op); } @@ -363,7 +377,10 @@ RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS); sequencer_generic_invoke_xy__internal(C, op, event, 0); - return WM_operator_filesel(C, op, event); + + WM_event_add_fileselect(C, op); + return OPERATOR_RUNNING_MODAL; + //return sequencer_add_sound_strip_exec(C, op); } @@ -457,7 +474,10 @@ RNA_boolean_set(op->ptr, "relative_path", U.flag & USER_RELPATHS); sequencer_generic_invoke_xy__internal(C, op, event, SEQPROP_ENDFRAME); - return WM_operator_filesel(C, op, event); + + WM_event_add_fileselect(C, op); + return OPERATOR_RUNNING_MODAL; + //return sequencer_add_image_strip_exec(C, op); } Modified: branches/render25/source/blender/gpu/intern/gpu_buffers.c =================================================================== --- branches/render25/source/blender/gpu/intern/gpu_buffers.c 2010-07-01 15:12:10 UTC (rev 29850) +++ branches/render25/source/blender/gpu/intern/gpu_buffers.c 2010-07-01 16:17:57 UTC (rev 29851) @@ -459,7 +459,7 @@ for(i = 0, tottri = 0; i < totface; ++i) tottri += mface[face_indices[i]].v4 ? 2 : 1; - if(GL_ARB_vertex_buffer_object) + if(GL_ARB_vertex_buffer_object && !(U.gameflags & USER_DISABLE_VBO)) glGenBuffersARB(1, &buffers->index_buf); if(buffers->index_buf) { @@ -586,7 +586,7 @@ totquad= (gridsize-1)*(gridsize-1)*totgrid; /* Generate index buffer object */ - if(GL_ARB_vertex_buffer_object) + if(GL_ARB_vertex_buffer_object && !(U.gameflags & USER_DISABLE_VBO)) glGenBuffersARB(1, &buffers->index_buf); if(buffers->index_buf) { Modified: branches/render25/source/blender/makesdna/DNA_sequence_types.h =================================================================== --- branches/render25/source/blender/makesdna/DNA_sequence_types.h 2010-07-01 15:12:10 UTC (rev 29850) +++ branches/render25/source/blender/makesdna/DNA_sequence_types.h 2010-07-01 16:17:57 UTC (rev 29851) @@ -324,5 +324,7 @@ otherwise, you can't really blend, right :) !) */ +#define SEQ_HAS_PATH(_seq) ( (_seq)->type==SEQ_MOVIE || (_seq)->type==SEQ_IMAGE || (_seq)->type==SEQ_SOUND ) + #endif Modified: branches/render25/source/blender/makesrna/rna_cleanup/rna_cleaner.py =================================================================== --- branches/render25/source/blender/makesrna/rna_cleanup/rna_cleaner.py 2010-07-01 15:12:10 UTC (rev 29850) +++ branches/render25/source/blender/makesrna/rna_cleanup/rna_cleaner.py 2010-07-01 16:17:57 UTC (rev 29851) @@ -55,22 +55,22 @@ # Usage if len(sys.argv)==1 or len(sys.argv)>3: usage() - if sys.argv[1]!= '-h': - input_filename = sys.argv[1] - else: + if sys.argv[1] == '-h': help() - if not (input_filename[-4:] == '.txt' or input_filename[-3:] == '.py'): + elif not (sys.argv[1][-4:] == '.txt' or sys.argv[1][-3:] == '.py'): print ('\nBad input file extension... exiting.') usage() - if len(sys.argv)==2: - order_priority = default_sort_choice - print ('\nSecond parameter missing: choosing to order by %s.' % font_bold(order_priority)) + else: + inputfile = sys.argv[1] + if len(sys.argv) == 2: + sort_priority = default_sort_choice + print ('\nSecond parameter missing: choosing to order by %s.' % font_bold(sort_priority)) elif len(sys.argv)==3: - order_priority = sys.argv[2] - if order_priority not in sort_choices: - print('\nWrong order_priority... exiting.') + sort_priority = sys.argv[2] + if sort_priority not in sort_choices: + print('\nWrong sort_priority... exiting.') usage() - return (input_filename, order_priority) + return (inputfile, sort_priority) def check_prefix(prop): @@ -163,11 +163,11 @@ rna_api = __import__(input_filename[:-3]).rna_api props_length_max = [0 for i in rna_api[0]] # this way if the vector will take more elements we are safe - for props in rna_api: + for index,props in enumerate(rna_api): [comment, changed, bclass, bfrom, bto, kwcheck, btype, description] = props kwcheck = check_prefix(bto) # keyword-check changed = check_if_changed(bfrom, bto) # changed? - props=[comment, changed, bclass, bfrom, bto, kwcheck, btype, description] + rna_api[index] = [comment, changed, bclass, bfrom, bto, kwcheck, btype, description] props_length = list(map(len,props)) # lengths props_length_max = list(map(max,zip(props_length_max,props_length))) # max lengths return (rna_api,props_length_max) @@ -198,14 +198,7 @@ return props_list -def write_files(props_list, props_length_max): - """ - Writes in 3 files: - * output_filename_txt: formatted as txt input file - * output_filename_py: formatted for readability (could be worked on) @@ Diff output truncated at 10240 characters. @@ _______________________________________________ Bf-blender-cvs mailing list Bf-blender-cvs@blender.org http://lists.blender.org/mailman/listinfo/bf-blender-cvs