From 99ee18c684da65ba774175c0b57a086e8222464a Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 9 May 2011 10:03:06 +0000 Subject: Fix for memory leak caused by re-making mipmaps Problem was caused by different limits for "last" mipmap: it was 1x1 for mkaing mipmaps and 2x2 for re-making. 2x2 should be enough for mipmap. --- source/blender/imbuf/intern/filter.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/blender/imbuf/intern/filter.c b/source/blender/imbuf/intern/filter.c index 2821ba2a361..16fb1fdf4aa 100644 --- a/source/blender/imbuf/intern/filter.c +++ b/source/blender/imbuf/intern/filter.c @@ -437,7 +437,7 @@ void IMB_makemipmap(ImBuf *ibuf, int use_filter) hbuf= ibuf->mipmap[curmap]; hbuf->miplevel= curmap+1; - if(!hbuf || (hbuf->x == 1 && hbuf->y == 1)) + if(!hbuf || (hbuf->x <= 2 && hbuf->y <= 2)) break; curmap++; -- cgit v1.2.3 From 88a13d73958c050bde4364b115faddfe26b0d47c Mon Sep 17 00:00:00 2001 From: "M.G. Kishalmi" Date: Mon, 9 May 2011 12:46:59 +0000 Subject: fixed scrolling lists with the mousewheel for some X11 windowmanagers. some WMs not only send 'crossing' events when really moving from one window to another, but also when mousewheeling. distinguishing those events 'mode' property fixed this. brecht++ for figuring out the details. --- intern/ghost/intern/GHOST_SystemX11.cpp | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp b/intern/ghost/intern/GHOST_SystemX11.cpp index 378bc6b90be..b44f2b18225 100644 --- a/intern/ghost/intern/GHOST_SystemX11.cpp +++ b/intern/ghost/intern/GHOST_SystemX11.cpp @@ -700,19 +700,24 @@ GHOST_SystemX11::processEvent(XEvent *xe) case EnterNotify: case LeaveNotify: { - // XCrossingEvents pointer leave enter window. - // also do cursor move here, MotionNotify only - // happens when motion starts & ends inside window + /* XCrossingEvents pointer leave enter window. + also do cursor move here, MotionNotify only + happens when motion starts & ends inside window. + we only do moves when the crossing mode is 'normal' + (really crossing between windows) since some windowmanagers + also send grab/ungrab crossings for mousewheel events. + */ XCrossingEvent &xce = xe->xcrossing; - - g_event = new - GHOST_EventCursor( - getMilliSeconds(), - GHOST_kEventCursorMove, - window, - xce.x_root, - xce.y_root - ); + if( xce.mode == NotifyNormal ) { + g_event = new + GHOST_EventCursor( + getMilliSeconds(), + GHOST_kEventCursorMove, + window, + xce.x_root, + xce.y_root + ); + } break; } case MapNotify: -- cgit v1.2.3 From 18e9d9c3e2a489b200b1344acd09947f3c772715 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 9 May 2011 13:13:16 +0000 Subject: Recreate mipmaps after undo in image editor --- source/blender/editors/sculpt_paint/paint_image.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c index 29bcb191b46..cb807117198 100644 --- a/source/blender/editors/sculpt_paint/paint_image.c +++ b/source/blender/editors/sculpt_paint/paint_image.c @@ -440,6 +440,8 @@ static void image_undo_restore(bContext *C, ListBase *lb) GPU_free_image(ima); /* force OpenGL reload */ if(ibuf->rect_float) ibuf->userflags |= IB_RECT_INVALID; /* force recreate of char rect */ + if(ibuf->mipmap[0]) + ibuf->userflags |= IB_MIPMAP_INVALID; /* force mipmap recreatiom */ } -- cgit v1.2.3 From 1e0c3d315b8b5db4b5d594c05c7b1b92d5bf967a Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 9 May 2011 14:41:44 +0000 Subject: minor cleanup, no functional changes. --- CMakeLists.txt | 2 +- intern/ghost/CMakeLists.txt | 2 +- source/blender/CMakeLists.txt | 3 +- source/blender/blenfont/CMakeLists.txt | 2 +- source/blender/blenkernel/CMakeLists.txt | 4 +-- source/blender/editors/include/ED_image.h | 3 -- source/blender/editors/render/CMakeLists.txt | 2 +- source/blender/gpu/CMakeLists.txt | 2 +- source/blender/makesrna/intern/CMakeLists.txt | 2 +- source/blender/python/intern/bpy_operator_wrap.c | 1 - source/creator/CMakeLists.txt | 36 ++++++++++++------------ 11 files changed, 27 insertions(+), 32 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index a3baf582b9f..03f62a07563 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -870,7 +870,7 @@ elseif(APPLE) set(GETTEXT_LIB intl iconv) set(GETTEXT_LIBPATH ${GETTEXT}/lib) endif() - + if(WITH_FFTW3) set(FFTW3 ${LIBDIR}/fftw3) set(FFTW3_INC ${FFTW3}/include) diff --git a/intern/ghost/CMakeLists.txt b/intern/ghost/CMakeLists.txt index 0d7a64ddfa9..d42be400dff 100644 --- a/intern/ghost/CMakeLists.txt +++ b/intern/ghost/CMakeLists.txt @@ -29,7 +29,7 @@ set(INC ../string ../../source/blender/imbuf ../../source/blender/makesdna - ${GLEW_INCLUDE_PATH} + ${GLEW_INCLUDE_PATH} ) set(SRC diff --git a/source/blender/CMakeLists.txt b/source/blender/CMakeLists.txt index 263d81fab0a..af1fb3565f6 100644 --- a/source/blender/CMakeLists.txt +++ b/source/blender/CMakeLists.txt @@ -123,6 +123,5 @@ if(WITH_PYTHON) endif() if(WITH_OPENCOLLADA) - add_subdirectory(collada) + add_subdirectory(collada) endif() - diff --git a/source/blender/blenfont/CMakeLists.txt b/source/blender/blenfont/CMakeLists.txt index 15fbfaa2de2..48ee4aed033 100644 --- a/source/blender/blenfont/CMakeLists.txt +++ b/source/blender/blenfont/CMakeLists.txt @@ -29,7 +29,7 @@ set(INC ../editors/include ../blenkernel ../../../intern/guardedalloc - ${GLEW_INCLUDE_PATH} + ${GLEW_INCLUDE_PATH} ${FREETYPE_INCLUDE_DIRS} ) diff --git a/source/blender/blenkernel/CMakeLists.txt b/source/blender/blenkernel/CMakeLists.txt index c6df694f61e..b7976c404ae 100644 --- a/source/blender/blenkernel/CMakeLists.txt +++ b/source/blender/blenkernel/CMakeLists.txt @@ -53,7 +53,7 @@ set(INC ../../../intern/opennl/extern ../../../intern/smoke/extern ../../../intern/mikktspace - ../../../source/blender/windowmanager # XXX - BAD LEVEL CALL WM_api.h + ../../../source/blender/windowmanager # XXX - BAD LEVEL CALL WM_api.h ${GLEW_INCLUDE_PATH} ${ZLIB_INCLUDE_DIRS} ) @@ -314,7 +314,7 @@ if(WITH_LZMA) endif() if(MSVC) - set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX") + set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /WX") endif() blender_add_lib(bf_blenkernel "${SRC}" "${INC}") diff --git a/source/blender/editors/include/ED_image.h b/source/blender/editors/include/ED_image.h index 2c866495503..cfe9ea53d9a 100644 --- a/source/blender/editors/include/ED_image.h +++ b/source/blender/editors/include/ED_image.h @@ -68,8 +68,5 @@ int ED_space_image_show_uvshadow(struct SpaceImage *sima, struct Object *obedit) /* UI level image (texture) updating... render calls own stuff (too) */ void ED_image_update_frame(const struct Main *mainp, int cfra); -/* image_render.c, export for screen_ops.c, render operator */ -void ED_space_image_output(struct bContext *C); - #endif /* ED_IMAGE_H */ diff --git a/source/blender/editors/render/CMakeLists.txt b/source/blender/editors/render/CMakeLists.txt index 16cfca8dadb..b8102ba37a1 100644 --- a/source/blender/editors/render/CMakeLists.txt +++ b/source/blender/editors/render/CMakeLists.txt @@ -32,7 +32,7 @@ set(INC ../../render/extern/include ../../windowmanager ../../../../intern/guardedalloc - ${GLEW_INCLUDE_PATH} + ${GLEW_INCLUDE_PATH} ) set(SRC diff --git a/source/blender/gpu/CMakeLists.txt b/source/blender/gpu/CMakeLists.txt index fc7e3408683..d6e2b56c065 100644 --- a/source/blender/gpu/CMakeLists.txt +++ b/source/blender/gpu/CMakeLists.txt @@ -34,7 +34,7 @@ set(INC ../makesrna ../../../intern/guardedalloc ../../../intern/smoke/extern - ${GLEW_INCLUDE_PATH} + ${GLEW_INCLUDE_PATH} ) set(SRC diff --git a/source/blender/makesrna/intern/CMakeLists.txt b/source/blender/makesrna/intern/CMakeLists.txt index 9cafca3532f..350ca9f6bae 100644 --- a/source/blender/makesrna/intern/CMakeLists.txt +++ b/source/blender/makesrna/intern/CMakeLists.txt @@ -222,7 +222,7 @@ blender_include_dirs( ../../../../intern/audaspace/intern ../../../../intern/guardedalloc ../../../../intern/memutil - ${GLEW_INCLUDE_PATH} + ${GLEW_INCLUDE_PATH} ) add_executable(makesrna ${SRC} ${SRC_RNA_INC} ${SRC_DNA_INC}) diff --git a/source/blender/python/intern/bpy_operator_wrap.c b/source/blender/python/intern/bpy_operator_wrap.c index e1ef8aa49c1..de29cb2aeac 100644 --- a/source/blender/python/intern/bpy_operator_wrap.c +++ b/source/blender/python/intern/bpy_operator_wrap.c @@ -1,4 +1,3 @@ - /* * $Id$ * diff --git a/source/creator/CMakeLists.txt b/source/creator/CMakeLists.txt index b39393bc8b7..d3df5e094c3 100644 --- a/source/creator/CMakeLists.txt +++ b/source/creator/CMakeLists.txt @@ -191,10 +191,10 @@ if(WITH_PYTHON_MODULE) set_target_properties( blender PROPERTIES - PREFIX "" - OUTPUT_NAME bpy - LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/ - RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/ # only needed on windows + PREFIX "" + OUTPUT_NAME bpy + LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/ + RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin/ # only needed on windows ) if(WIN32) @@ -202,7 +202,7 @@ if(WITH_PYTHON_MODULE) set_target_properties( blender PROPERTIES - SUFFIX ".pyd" + SUFFIX ".pyd" ) endif() @@ -574,19 +574,19 @@ elseif(WIN32) endif() endif() - if(NOT CMAKE_CL_64) + if(NOT CMAKE_CL_64) install( FILES - ${LIBDIR}/thumbhandler/lib/BlendThumb.dll - DESTINATION ${TARGETDIR}/ - ) - else() + ${LIBDIR}/thumbhandler/lib/BlendThumb.dll + DESTINATION ${TARGETDIR}/ + ) + else() install( FILES - ${LIBDIR}/thumbhandler/lib/BlendThumb64.dll - DESTINATION ${TARGETDIR}/ - ) - endif() + ${LIBDIR}/thumbhandler/lib/BlendThumb64.dll + DESTINATION ${TARGETDIR}/ + ) + endif() elseif(APPLE) set(SOURCEDIR ${CMAKE_SOURCE_DIR}/source/darwin/blender.app) @@ -811,13 +811,13 @@ endif() bf_intern_mikktspace ) - if(WITH_MOD_CLOTH_ELTOPO) + if(WITH_MOD_CLOTH_ELTOPO) list(APPEND BLENDER_SORTED_LIBS extern_eltopo) - endif() + endif() - if(WITH_BUILTIN_GLEW) + if(WITH_BUILTIN_GLEW) list(APPEND BLENDER_SORTED_LIBS extern_glew) - endif() + endif() if(WITH_BINRELOC) list(APPEND BLENDER_SORTED_LIBS extern_binreloc) -- cgit v1.2.3 From 885141c9dec9828172471b0e58dc4d975d250a04 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 9 May 2011 16:31:54 +0000 Subject: patch [#21740] Image support for Empty Objects from Andy Braham (andybraham) This adds support for empties to reference images and draw in the 3D view. Modifications from the original patch. - use an empty draw 'image' type - use image aspect ratio for non-square-pixels - when the image is not found, still draw the frame. --- .../scripts/startup/bl_ui/properties_data_empty.py | 11 ++ source/blender/editors/space_view3d/drawobject.c | 111 ++++++++++++++++++++- source/blender/makesdna/DNA_object_types.h | 4 + source/blender/makesrna/intern/rna_object.c | 33 ++++-- source/blender/makesrna/intern/rna_ui_api.c | 2 +- 5 files changed, 146 insertions(+), 15 deletions(-) diff --git a/release/scripts/startup/bl_ui/properties_data_empty.py b/release/scripts/startup/bl_ui/properties_data_empty.py index e46cd1270ad..80f83e7fabe 100644 --- a/release/scripts/startup/bl_ui/properties_data_empty.py +++ b/release/scripts/startup/bl_ui/properties_data_empty.py @@ -39,6 +39,17 @@ class DATA_PT_empty(DataButtonsPanel, bpy.types.Panel): ob = context.object layout.prop(ob, "empty_draw_type", text="Display") + + if ob.empty_draw_type == 'IMAGE': + # layout.template_image(ob, "data", None) + layout.template_ID(ob, "data", open="image.open", unlink="image.unlink") + + row = layout.row(align = True) + row.prop(ob, "color", text="Transparency", index=3, slider=True) + row = layout.row(align = True) + row.prop(ob, "empty_image_offset", text="Offset X", index=0) + row.prop(ob, "empty_image_offset", text="Offset Y", index=1) + layout.prop(ob, "empty_draw_size", text="Size") if __name__ == "__main__": # only for live edit. diff --git a/source/blender/editors/space_view3d/drawobject.c b/source/blender/editors/space_view3d/drawobject.c index a3a139181d5..ba30aecc9ab 100644 --- a/source/blender/editors/space_view3d/drawobject.c +++ b/source/blender/editors/space_view3d/drawobject.c @@ -46,6 +46,7 @@ #include "DNA_scene_types.h" #include "DNA_smoke_types.h" #include "DNA_world_types.h" +#include "DNA_armature_types.h" #include "BLI_blenlib.h" #include "BLI_math.h" @@ -76,6 +77,9 @@ #include "smoke_API.h" +#include "IMB_imbuf.h" +#include "IMB_imbuf_types.h" + #include "BIF_gl.h" #include "BIF_glutil.h" @@ -515,6 +519,96 @@ void drawaxes(float size, char drawtype) } } + +/* Function to draw an Image on a empty Object */ +static void draw_empty_image(Object *ob) +{ + Image *ima = (Image*)ob->data; + ImBuf *ibuf = ima ? BKE_image_get_ibuf(ima, NULL) : NULL; + + float scale, ofs_x, ofs_y, sca_x, sca_y; + int ima_x, ima_y; + + if(ibuf && (ibuf->rect == NULL) && (ibuf->rect_float != NULL)) { + IMB_rect_from_float(ibuf); + } + + /* Get the buffer dimensions so we can fallback to fake ones */ + if(ibuf && ibuf->rect) { + ima_x= ibuf->x; + ima_y= ibuf->y; + } + else { + ima_x= 1; + ima_y= 1; + } + + /* Get the image aspect even if the buffer is invalid */ + if(ima) { + if(ima->aspx > ima->aspy) { + sca_x= 1.0f; + sca_y= ima->aspy / ima->aspx; + } + else if(ima->aspx < ima->aspy) { + sca_x= ima->aspx / ima->aspy; + sca_y= 1.0f; + } + else { + sca_x= 1.0f; + sca_y= 1.0f; + } + } + else { + sca_x= 1.0f; + sca_y= 1.0f; + } + + /* Calculate the scale center based on objects origin */ + ofs_x= ob->ima_ofs[0] * ima_x; + ofs_y= ob->ima_ofs[1] * ima_y; + + glMatrixMode(GL_MODELVIEW); + glPushMatrix(); + + /* Make sure we are drawing at the origin */ + glTranslatef(0.0f, 0.0f, 0.0f); + + /* Calculate Image scale */ + scale= (ob->empty_drawsize / (float)MAX2(ima_x * sca_x, ima_y * sca_y)); + + /* Set the object scale */ + glScalef(scale * sca_x, scale * sca_y, 1.0f); + + if(ibuf && ibuf->rect) { + /* Setup GL params */ + glEnable(GL_BLEND); + glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); + + /* Use the object color and alpha */ + glColor4fv(ob->col); + + /* Draw the Image on the screen */ + glaDrawPixelsTex(ofs_x, ofs_y, ima_x, ima_y, GL_UNSIGNED_BYTE, ibuf->rect); + glPixelTransferf(GL_ALPHA_SCALE, 1.0f); + + glDisable(GL_BLEND); + } + + UI_ThemeColor((ob->flag & SELECT) ? TH_SELECT : TH_WIRE); + + /* Calculate the outline vertex positions */ + glBegin(GL_LINE_LOOP); + glVertex2f(ofs_x, ofs_y); + glVertex2f(ofs_x + ima_x, ofs_y); + glVertex2f(ofs_x + ima_x, ofs_y + ima_y); + glVertex2f(ofs_x, ofs_y + ima_y); + glEnd(); + + /* Reset GL settings */ + glMatrixMode(GL_MODELVIEW); + glPopMatrix(); +} + void drawcircball(int mode, const float cent[3], float rad, float tmat[][4]) { float vec[3], vx[3], vy[3]; @@ -5954,8 +6048,14 @@ void draw_object(Scene *scene, ARegion *ar, View3D *v3d, Base *base, int flag) break; } case OB_EMPTY: - if((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) - drawaxes(ob->empty_drawsize, ob->empty_drawtype); + if((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) { + if (ob->empty_drawtype == OB_EMPTY_IMAGE) { + draw_empty_image(ob); + } + else { + drawaxes(ob->empty_drawsize, ob->empty_drawtype); + } + } break; case OB_LAMP: if((v3d->flag2 & V3D_RENDER_OVERRIDE)==0) { @@ -6564,7 +6664,12 @@ void draw_object_instance(Scene *scene, View3D *v3d, RegionView3D *rv3d, Object draw_object_mesh_instance(scene, v3d, rv3d, ob, dt, outline); break; case OB_EMPTY: - drawaxes(ob->empty_drawsize, ob->empty_drawtype); + if (ob->empty_drawtype == OB_EMPTY_IMAGE) { + draw_empty_image(ob); + } + else { + drawaxes(ob->empty_drawsize, ob->empty_drawtype); + } break; } } diff --git a/source/blender/makesdna/DNA_object_types.h b/source/blender/makesdna/DNA_object_types.h index c97a1d8fef5..54a885a0860 100644 --- a/source/blender/makesdna/DNA_object_types.h +++ b/source/blender/makesdna/DNA_object_types.h @@ -259,6 +259,9 @@ typedef struct Object { ListBase gpulamp; /* runtime, for lamps only */ ListBase pc_ids; ListBase *duplilist; /* for temporary dupli list storage, only for use by RNA API */ + + float ima_ofs[2]; /* offset for image empties */ + char pad3[8]; } Object; /* Warning, this is not used anymore because hooks are now modifiers */ @@ -399,6 +402,7 @@ extern Object workob; #define OB_CUBE 5 #define OB_EMPTY_SPHERE 6 #define OB_EMPTY_CONE 7 +#define OB_EMPTY_IMAGE 8 /* boundtype */ #define OB_BOUND_BOX 0 diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 11e7dd81cb6..d5d7f2917b9 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -307,22 +307,26 @@ static void rna_Base_layer_update(Main *bmain, Scene *scene, PointerRNA *ptr) WM_main_add_notifier(NC_SCENE|ND_LAYER_CONTENT, scene); } -static int rna_Object_data_editable(PointerRNA *ptr) -{ - Object *ob= (Object*)ptr->data; - - return (ob->type == OB_EMPTY)? 0: PROP_EDITABLE; -} - static void rna_Object_data_set(PointerRNA *ptr, PointerRNA value) { Object *ob= (Object*)ptr->data; ID *id= value.data; - if(ob->type == OB_EMPTY || id == NULL || ob->mode & OB_MODE_EDIT) + if (id == NULL || ob->mode & OB_MODE_EDIT) return; - - if(ob->type == OB_MESH) { + + if (ob->type == OB_EMPTY) { + if(ob->data) { + id_us_min((ID*)ob->data); + ob->data = NULL; + } + + if (id && GS(id->name) == ID_IM) { + id_us_plus(id); + ob->data = id; + } + } + else if(ob->type == OB_MESH) { set_mesh(ob, (Mesh*)id); } else { @@ -346,6 +350,7 @@ static StructRNA *rna_Object_data_typef(PointerRNA *ptr) Object *ob= (Object*)ptr->data; switch(ob->type) { + case OB_EMPTY: return &RNA_Image; case OB_MESH: return &RNA_Mesh; case OB_CURVE: return &RNA_Curve; case OB_SURF: return &RNA_Curve; @@ -1691,6 +1696,7 @@ static void rna_def_object(BlenderRNA *brna) {OB_CUBE, "CUBE", 0, "Cube", ""}, {OB_EMPTY_SPHERE, "SPHERE", 0, "Sphere", ""}, {OB_EMPTY_CONE, "CONE", 0, "Cone", ""}, + {OB_EMPTY_IMAGE, "IMAGE", 0, "Image", ""}, {0, NULL, 0, NULL, NULL}}; static EnumPropertyItem track_items[] = { @@ -1758,7 +1764,6 @@ static void rna_def_object(BlenderRNA *brna) prop= RNA_def_property(srna, "data", PROP_POINTER, PROP_NONE); RNA_def_property_struct_type(prop, "ID"); RNA_def_property_pointer_funcs(prop, NULL, "rna_Object_data_set", "rna_Object_data_typef", NULL); - RNA_def_property_editable_func(prop, "rna_Object_data_editable"); RNA_def_property_flag(prop, PROP_EDITABLE|PROP_NEVER_UNLINK); RNA_def_property_ui_text(prop, "Data", "Object data"); RNA_def_property_update(prop, 0, "rna_Object_internal_update_data"); @@ -2043,6 +2048,12 @@ static void rna_def_object(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Empty Display Size", "Size of display for empties in the viewport"); RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); + prop= RNA_def_property(srna, "empty_image_offset", PROP_FLOAT, PROP_DISTANCE); + RNA_def_property_float_sdna(prop, NULL, "ima_ofs"); + RNA_def_property_ui_text(prop, "Origin Offset", "Origin offset distance"); + RNA_def_property_ui_range(prop, -FLT_MAX, FLT_MAX, 0.1f, 2); + RNA_def_property_update(prop, NC_OBJECT|ND_DRAW, NULL); + /* render */ prop= RNA_def_property(srna, "pass_index", PROP_INT, PROP_UNSIGNED); RNA_def_property_int_sdna(prop, NULL, "index"); diff --git a/source/blender/makesrna/intern/rna_ui_api.c b/source/blender/makesrna/intern/rna_ui_api.c index ae308b9423f..d4ac9880290 100644 --- a/source/blender/makesrna/intern/rna_ui_api.c +++ b/source/blender/makesrna/intern/rna_ui_api.c @@ -389,7 +389,7 @@ void RNA_api_ui_layout(StructRNA *srna) RNA_def_function_flag(func, FUNC_USE_CONTEXT); api_ui_item_rna_common(func); parm= RNA_def_pointer(func, "image_user", "ImageUser", "", ""); - RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR); + RNA_def_property_flag(parm, PROP_REQUIRED|PROP_RNAPTR|PROP_NEVER_NULL); RNA_def_boolean(func, "compact", 0, "", "Use more compact layout."); func= RNA_def_function(srna, "template_list", "uiTemplateList"); -- cgit v1.2.3 From c87b5f8dfb98cc43a7f12007e6ba2e76cfd0d6f8 Mon Sep 17 00:00:00 2001 From: "Guillermo S. Romero" Date: Mon, 9 May 2011 20:13:48 +0000 Subject: SVN maintenance. --- intern/bsp/test/BSP_GhostTest/BSP_GhostTest.dsp | 252 ++++++++++++------------ intern/bsp/test/BSP_GhostTest/BSP_GhostTest.dsw | 250 +++++++++++------------ intern/smoke/intern/original-main.cpp | 72 +++++++ 3 files changed, 323 insertions(+), 251 deletions(-) create mode 100644 intern/smoke/intern/original-main.cpp diff --git a/intern/bsp/test/BSP_GhostTest/BSP_GhostTest.dsp b/intern/bsp/test/BSP_GhostTest/BSP_GhostTest.dsp index aaa45273845..4474eaa5d90 100644 --- a/intern/bsp/test/BSP_GhostTest/BSP_GhostTest.dsp +++ b/intern/bsp/test/BSP_GhostTest/BSP_GhostTest.dsp @@ -1,126 +1,126 @@ -# Microsoft Developer Studio Project File - Name="BSP_GhostTest" - Package Owner=<4> -# Microsoft Developer Studio Generated Build File, Format Version 6.00 -# ** DO NOT EDIT ** - -# TARGTYPE "Win32 (x86) Console Application" 0x0103 - -CFG=BSP_GhostTest - Win32 Debug -!MESSAGE This is not a valid makefile. To build this project using NMAKE, -!MESSAGE use the Export Makefile command and run -!MESSAGE -!MESSAGE NMAKE /f "BSP_GhostTest.mak". -!MESSAGE -!MESSAGE You can specify a configuration when running NMAKE -!MESSAGE by defining the macro CFG on the command line. For example: -!MESSAGE -!MESSAGE NMAKE /f "BSP_GhostTest.mak" CFG="BSP_GhostTest - Win32 Debug" -!MESSAGE -!MESSAGE Possible choices for configuration are: -!MESSAGE -!MESSAGE "BSP_GhostTest - Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "BSP_GhostTest - Win32 Debug" (based on "Win32 (x86) Console Application") -!MESSAGE - -# Begin Project -# PROP AllowPerConfigDependencies 0 -# PROP Scc_ProjName "" -# PROP Scc_LocalPath "" -CPP=cl.exe -RSC=rc.exe - -!IF "$(CFG)" == "BSP_GhostTest - Win32 Release" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 0 -# PROP BASE Output_Dir "Release" -# PROP BASE Intermediate_Dir "Release" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 0 -# PROP Output_Dir "Release" -# PROP Intermediate_Dir "Release" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD CPP /nologo /G6 /MT /W3 /GX /O2 /Ob2 /I "../../extern/" /I "../../../../lib/windows/string/include" /I "../../../../lib/windows/ghost/include" /I "../../../../lib/windows/moto/include" /I "../../../../lib/windows/memutil/include" /I "../../../../lib/windows/container/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c -# ADD BASE RSC /l 0x413 /d "NDEBUG" -# ADD RSC /l 0x413 /d "NDEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 -# ADD LINK32 glu32.lib opengl32.lib kernel32.lib user32.lib gdi32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\..\lib\windows\glut-3.7\lib\\" - -!ELSEIF "$(CFG)" == "BSP_GhostTest - Win32 Debug" - -# PROP BASE Use_MFC 0 -# PROP BASE Use_Debug_Libraries 1 -# PROP BASE Output_Dir "Debug" -# PROP BASE Intermediate_Dir "Debug" -# PROP BASE Target_Dir "" -# PROP Use_MFC 0 -# PROP Use_Debug_Libraries 1 -# PROP Output_Dir "Debug" -# PROP Intermediate_Dir "Debug" -# PROP Ignore_Export_Lib 0 -# PROP Target_Dir "" -# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../extern/" /I "../../../../lib/windows/string/include" /I "../../../../lib/windows/ghost/include" /I "../../../../lib/windows/moto/include" /I "../../../../lib/windows/memutil/include" /I "../../../../lib/windows/container/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD BASE RSC /l 0x413 /d "_DEBUG" -# ADD RSC /l 0x413 /d "_DEBUG" -BSC32=bscmake.exe -# ADD BASE BSC32 /nologo -# ADD BSC32 /nologo -LINK32=link.exe -# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept -# ADD LINK32 glu32.lib opengl32.lib user32.lib gdi32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\lib\windows\glut-3.7\lib\\" - -!ENDIF - -# Begin Target - -# Name "BSP_GhostTest - Win32 Release" -# Name "BSP_GhostTest - Win32 Debug" -# Begin Source File - -SOURCE=.\BSP_GhostTest3D.cpp -# End Source File -# Begin Source File - -SOURCE=.\BSP_GhostTest3D.h -# End Source File -# Begin Source File - -SOURCE=.\BSP_MeshDrawer.cpp -# End Source File -# Begin Source File - -SOURCE=.\BSP_MeshDrawer.h -# End Source File -# Begin Source File - -SOURCE=.\BSP_PlyLoader.cpp -# End Source File -# Begin Source File - -SOURCE=.\BSP_PlyLoader.h -# End Source File -# Begin Source File - -SOURCE=.\BSP_TMesh.h -# End Source File -# Begin Source File - -SOURCE=.\main.cpp -# End Source File -# Begin Source File - -SOURCE=.\ply.h -# End Source File -# Begin Source File - -SOURCE=.\plyfile.c -# End Source File -# End Target -# End Project +# Microsoft Developer Studio Project File - Name="BSP_GhostTest" - Package Owner=<4> +# Microsoft Developer Studio Generated Build File, Format Version 6.00 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Console Application" 0x0103 + +CFG=BSP_GhostTest - Win32 Debug +!MESSAGE This is not a valid makefile. To build this project using NMAKE, +!MESSAGE use the Export Makefile command and run +!MESSAGE +!MESSAGE NMAKE /f "BSP_GhostTest.mak". +!MESSAGE +!MESSAGE You can specify a configuration when running NMAKE +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "BSP_GhostTest.mak" CFG="BSP_GhostTest - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "BSP_GhostTest - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "BSP_GhostTest - Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE + +# Begin Project +# PROP AllowPerConfigDependencies 0 +# PROP Scc_ProjName "" +# PROP Scc_LocalPath "" +CPP=cl.exe +RSC=rc.exe + +!IF "$(CFG)" == "BSP_GhostTest - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD CPP /nologo /G6 /MT /W3 /GX /O2 /Ob2 /I "../../extern/" /I "../../../../lib/windows/string/include" /I "../../../../lib/windows/ghost/include" /I "../../../../lib/windows/moto/include" /I "../../../../lib/windows/memutil/include" /I "../../../../lib/windows/container/include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c +# ADD BASE RSC /l 0x413 /d "NDEBUG" +# ADD RSC /l 0x413 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 glu32.lib opengl32.lib kernel32.lib user32.lib gdi32.lib /nologo /subsystem:console /machine:I386 /libpath:"..\..\..\..\lib\windows\glut-3.7\lib\\" + +!ELSEIF "$(CFG)" == "BSP_GhostTest - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Ignore_Export_Lib 0 +# PROP Target_Dir "" +# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../../extern/" /I "../../../../lib/windows/string/include" /I "../../../../lib/windows/ghost/include" /I "../../../../lib/windows/moto/include" /I "../../../../lib/windows/memutil/include" /I "../../../../lib/windows/container/include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c +# ADD BASE RSC /l 0x413 /d "_DEBUG" +# ADD RSC /l 0x413 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept +# ADD LINK32 glu32.lib opengl32.lib user32.lib gdi32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept /libpath:"..\..\..\..\lib\windows\glut-3.7\lib\\" + +!ENDIF + +# Begin Target + +# Name "BSP_GhostTest - Win32 Release" +# Name "BSP_GhostTest - Win32 Debug" +# Begin Source File + +SOURCE=.\BSP_GhostTest3D.cpp +# End Source File +# Begin Source File + +SOURCE=.\BSP_GhostTest3D.h +# End Source File +# Begin Source File + +SOURCE=.\BSP_MeshDrawer.cpp +# End Source File +# Begin Source File + +SOURCE=.\BSP_MeshDrawer.h +# End Source File +# Begin Source File + +SOURCE=.\BSP_PlyLoader.cpp +# End Source File +# Begin Source File + +SOURCE=.\BSP_PlyLoader.h +# End Source File +# Begin Source File + +SOURCE=.\BSP_TMesh.h +# End Source File +# Begin Source File + +SOURCE=.\main.cpp +# End Source File +# Begin Source File + +SOURCE=.\ply.h +# End Source File +# Begin Source File + +SOURCE=.\plyfile.c +# End Source File +# End Target +# End Project diff --git a/intern/bsp/test/BSP_GhostTest/BSP_GhostTest.dsw b/intern/bsp/test/BSP_GhostTest/BSP_GhostTest.dsw index 802fba84bef..0d9ca3d2b08 100644 --- a/intern/bsp/test/BSP_GhostTest/BSP_GhostTest.dsw +++ b/intern/bsp/test/BSP_GhostTest/BSP_GhostTest.dsw @@ -1,125 +1,125 @@ -Microsoft Developer Studio Workspace File, Format Version 6.00 -# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! - -############################################################################### - -Project: "BSP_GhostTest"=.\BSP_GhostTest.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name bsplib - End Project Dependency - Begin Project Dependency - Project_Dep_Name ghost - End Project Dependency - Begin Project Dependency - Project_Dep_Name string - End Project Dependency - Begin Project Dependency - Project_Dep_Name MoTo - End Project Dependency -}}} - -############################################################################### - -Project: "MoTo"=..\..\..\moto\make\msvc_6_0\MoTo.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "bsplib"=..\..\make\msvc6_0\bsplib.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name container - End Project Dependency - Begin Project Dependency - Project_Dep_Name memutil - End Project Dependency - Begin Project Dependency - Project_Dep_Name MoTo - End Project Dependency -}}} - -############################################################################### - -Project: "container"=..\..\..\container\make\msvc_6_0\container.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ - Begin Project Dependency - Project_Dep_Name memutil - End Project Dependency -}}} - -############################################################################### - -Project: "ghost"=..\..\..\ghost\make\msvc\ghost.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "memutil"=..\..\..\memutil\make\msvc_60\memutil.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Project: "string"=..\..\..\string\make\msvc_6_0\string.dsp - Package Owner=<4> - -Package=<5> -{{{ -}}} - -Package=<4> -{{{ -}}} - -############################################################################### - -Global: - -Package=<5> -{{{ -}}} - -Package=<3> -{{{ -}}} - -############################################################################### - +Microsoft Developer Studio Workspace File, Format Version 6.00 +# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE! + +############################################################################### + +Project: "BSP_GhostTest"=.\BSP_GhostTest.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name bsplib + End Project Dependency + Begin Project Dependency + Project_Dep_Name ghost + End Project Dependency + Begin Project Dependency + Project_Dep_Name string + End Project Dependency + Begin Project Dependency + Project_Dep_Name MoTo + End Project Dependency +}}} + +############################################################################### + +Project: "MoTo"=..\..\..\moto\make\msvc_6_0\MoTo.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "bsplib"=..\..\make\msvc6_0\bsplib.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name container + End Project Dependency + Begin Project Dependency + Project_Dep_Name memutil + End Project Dependency + Begin Project Dependency + Project_Dep_Name MoTo + End Project Dependency +}}} + +############################################################################### + +Project: "container"=..\..\..\container\make\msvc_6_0\container.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ + Begin Project Dependency + Project_Dep_Name memutil + End Project Dependency +}}} + +############################################################################### + +Project: "ghost"=..\..\..\ghost\make\msvc\ghost.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "memutil"=..\..\..\memutil\make\msvc_60\memutil.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Project: "string"=..\..\..\string\make\msvc_6_0\string.dsp - Package Owner=<4> + +Package=<5> +{{{ +}}} + +Package=<4> +{{{ +}}} + +############################################################################### + +Global: + +Package=<5> +{{{ +}}} + +Package=<3> +{{{ +}}} + +############################################################################### + diff --git a/intern/smoke/intern/original-main.cpp b/intern/smoke/intern/original-main.cpp new file mode 100644 index 00000000000..0cf76e367c3 --- /dev/null +++ b/intern/smoke/intern/original-main.cpp @@ -0,0 +1,72 @@ +////////////////////////////////////////////////////////////////////// +// This file is part of Wavelet Turbulence. +// +// Wavelet Turbulence is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// Wavelet Turbulence is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Wavelet Turbulence. If not, see . +// +// Copyright 2008 Theodore Kim and Nils Thuerey +// +////////////////////////////////////////////////////////////////////// + +#include +#include "FLUID_3D.h" + +using namespace std; + +////////////////////////////////////////////////////////////////////////////// +////////////////////////////////////////////////////////////////////////////// +int main(int argc, char *argv[]) +{ + cout << "=========================================================================" << endl; + cout << " Wavelet Turbulence simulator " << endl; + cout << "=========================================================================" << endl; + cout << " This code is Copyright 2008 Theodore Kim and Nils Thuerey and released" << endl; + cout << " under the GNU public license. For more information see:" << endl << endl; + cout << " http://www.cs.cornell.edu/~tedkim/WTURB" << endl; + cout << "=========================================================================" << endl; + + int xRes = 48; + int yRes = 64; + int zRes = 48; + int amplify = 4; + int totalCells = xRes * yRes * zRes; + int amplifiedCells = totalCells * amplify * amplify * amplify; + + // print out memory requirements + long long int coarseSize = sizeof(float) * totalCells * 22 + + sizeof(unsigned char) * totalCells; + long long int fineSize = sizeof(float) * amplifiedCells * 7 + // big grids + sizeof(float) * totalCells * 8 + // small grids + sizeof(float) * 128 * 128 * 128; // noise tile + long long int totalMB = (coarseSize + fineSize) / 1048576; + cout << " Current coarse resolution: " << xRes << " x " << yRes << " x " << zRes << endl; + cout << " Current amplified resolution: " << xRes * amplify << " x " << yRes * amplify + << " x " << zRes * amplify << endl; + cout << " At least " << totalMB << " MB of RAM needed " << endl; + cout << "=========================================================================" << endl; + cout.flush(); + + // create output directories + system("mkdir original.preview"); + system("mkdir amplified.preview"); + system("mkdir pbrt"); + + FLUID_3D fluid(xRes, yRes, zRes, amplify); + for (int x = 0; x < 300; x++) + { + fluid.addSmokeColumn(); + fluid.step(); + } + + return EXIT_SUCCESS; +} -- cgit v1.2.3 From d143eca2fcbda59e34ac91c1ddaa53b3f15de6e0 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Mon, 9 May 2011 20:14:34 +0000 Subject: Fix #27346: When The FONT object is blank, the dimensions are calculated wong. This commit fixes boundbox for empty curve-typed objects. Because of strange reason (-1,-1,-1) and (1,1,1) was used as boundbox. Now it uses zero-sized boundbox (as it's done for meshes). This commit makes nothig with that single space character text from the report. --- source/blender/blenkernel/intern/displist.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index b5194ca2f89..29b9fd5eab7 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -1973,8 +1973,9 @@ static void boundbox_displist(Object *ob) } if(!doit) { - min[0] = min[1] = min[2] = -1.0f; - max[0] = max[1] = max[2] = 1.0f; + /* there's no geometry in displist, use zero-sized boundbox */ + zero_v3(min); + zero_v3(max); } } -- cgit v1.2.3 From 14c3714b81b0c264ff8e117f0230330cc0514ed2 Mon Sep 17 00:00:00 2001 From: Nathan Letwory Date: Mon, 9 May 2011 21:34:52 +0000 Subject: Revert rename of r36578, breaks scons compile. --- intern/smoke/intern/original-main.cpp | 72 ----------------------------------- 1 file changed, 72 deletions(-) delete mode 100644 intern/smoke/intern/original-main.cpp diff --git a/intern/smoke/intern/original-main.cpp b/intern/smoke/intern/original-main.cpp deleted file mode 100644 index 0cf76e367c3..00000000000 --- a/intern/smoke/intern/original-main.cpp +++ /dev/null @@ -1,72 +0,0 @@ -////////////////////////////////////////////////////////////////////// -// This file is part of Wavelet Turbulence. -// -// Wavelet Turbulence is free software: you can redistribute it and/or modify -// it under the terms of the GNU General Public License as published by -// the Free Software Foundation, either version 3 of the License, or -// (at your option) any later version. -// -// Wavelet Turbulence is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -// GNU General Public License for more details. -// -// You should have received a copy of the GNU General Public License -// along with Wavelet Turbulence. If not, see . -// -// Copyright 2008 Theodore Kim and Nils Thuerey -// -////////////////////////////////////////////////////////////////////// - -#include -#include "FLUID_3D.h" - -using namespace std; - -////////////////////////////////////////////////////////////////////////////// -////////////////////////////////////////////////////////////////////////////// -int main(int argc, char *argv[]) -{ - cout << "=========================================================================" << endl; - cout << " Wavelet Turbulence simulator " << endl; - cout << "=========================================================================" << endl; - cout << " This code is Copyright 2008 Theodore Kim and Nils Thuerey and released" << endl; - cout << " under the GNU public license. For more information see:" << endl << endl; - cout << " http://www.cs.cornell.edu/~tedkim/WTURB" << endl; - cout << "=========================================================================" << endl; - - int xRes = 48; - int yRes = 64; - int zRes = 48; - int amplify = 4; - int totalCells = xRes * yRes * zRes; - int amplifiedCells = totalCells * amplify * amplify * amplify; - - // print out memory requirements - long long int coarseSize = sizeof(float) * totalCells * 22 + - sizeof(unsigned char) * totalCells; - long long int fineSize = sizeof(float) * amplifiedCells * 7 + // big grids - sizeof(float) * totalCells * 8 + // small grids - sizeof(float) * 128 * 128 * 128; // noise tile - long long int totalMB = (coarseSize + fineSize) / 1048576; - cout << " Current coarse resolution: " << xRes << " x " << yRes << " x " << zRes << endl; - cout << " Current amplified resolution: " << xRes * amplify << " x " << yRes * amplify - << " x " << zRes * amplify << endl; - cout << " At least " << totalMB << " MB of RAM needed " << endl; - cout << "=========================================================================" << endl; - cout.flush(); - - // create output directories - system("mkdir original.preview"); - system("mkdir amplified.preview"); - system("mkdir pbrt"); - - FLUID_3D fluid(xRes, yRes, zRes, amplify); - for (int x = 0; x < 300; x++) - { - fluid.addSmokeColumn(); - fluid.step(); - } - - return EXIT_SUCCESS; -} -- cgit v1.2.3