diff options
author | Ton Roosendaal <ton@blender.org> | 2009-06-24 21:22:22 +0400 |
---|---|---|
committer | Ton Roosendaal <ton@blender.org> | 2009-06-24 21:22:22 +0400 |
commit | ee9c260c385d41ec45e67450a59ad7788084aa90 (patch) | |
tree | d2ec77d668aee1bf232a206e06b38f9efb287793 | |
parent | 627abe0acf2b52d06fc26e93462f5261cf508879 (diff) |
2.5
- Added ND_SHADING notifier on linking materials, so it gives
refreshes in UI
- Removed reduntant debug prints
Crucial fixes in other code while checking warnings;
- Particle buttons were assigned to short, whilst data was int
- Filesel border select used float rect API, on an int rect.
8 files changed, 17 insertions, 9 deletions
diff --git a/source/blender/editors/interface/interface_handlers.c b/source/blender/editors/interface/interface_handlers.c index bdbfce782b6..2382af53a11 100644 --- a/source/blender/editors/interface/interface_handlers.c +++ b/source/blender/editors/interface/interface_handlers.c @@ -1438,7 +1438,6 @@ static void ui_do_but_textedit(bContext *C, uiBlock *block, uiBut *but, uiHandle } } else if(inbox) { - printf("release inside \n"); button_activate_state(C, but, BUTTON_STATE_EXIT); retval= WM_UI_HANDLER_BREAK; } diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c index 3856a0577fa..c919d9c3119 100644 --- a/source/blender/editors/interface/interface_templates.c +++ b/source/blender/editors/interface/interface_templates.c @@ -27,9 +27,12 @@ #include "MEM_guardedalloc.h" +#include "DNA_screen_types.h" + #include "BLI_string.h" #include "BKE_context.h" +#include "BKE_icons.h" #include "BKE_library.h" #include "BKE_utildefines.h" diff --git a/source/blender/editors/physics/ed_pointcache.c b/source/blender/editors/physics/ed_pointcache.c index e47f44c5c1a..3374e05883c 100644 --- a/source/blender/editors/physics/ed_pointcache.c +++ b/source/blender/editors/physics/ed_pointcache.c @@ -83,7 +83,7 @@ static int ptcache_bake_all_exec(bContext *C, wmOperator *op) baker.render = 0; baker.break_test = cache_break_test; baker.break_data = NULL; - baker.progressbar = WM_timecursor; + baker.progressbar = (void (*)(void *, int))WM_timecursor; baker.progresscontext = CTX_wm_window(C); BKE_ptcache_make_cache(&baker); @@ -170,7 +170,7 @@ static int ptcache_bake_particle_system_exec(bContext *C, wmOperator *op) baker.render = 0; baker.break_test = cache_break_test; baker.break_data = NULL; - baker.progressbar = WM_timecursor; + baker.progressbar = (void (*)(void *, int))WM_timecursor; baker.progresscontext = CTX_wm_window(C); BKE_ptcache_make_cache(&baker); diff --git a/source/blender/editors/space_buttons/space_buttons.c b/source/blender/editors/space_buttons/space_buttons.c index 0e444d7f0b7..483a1dc6100 100644 --- a/source/blender/editors/space_buttons/space_buttons.c +++ b/source/blender/editors/space_buttons/space_buttons.c @@ -343,6 +343,11 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn) case ND_GEOM_SELECT: ED_area_tag_redraw(sa); break; + case ND_SHADING: + case ND_SHADING_DRAW: + /* currently works by redraws... if preview is set, it (re)starts job */ + sbuts->preview= 1; + break; } break; case NC_MATERIAL: @@ -353,7 +358,6 @@ static void buttons_area_listener(ScrArea *sa, wmNotifier *wmn) case ND_SHADING_DRAW: /* currently works by redraws... if preview is set, it (re)starts job */ sbuts->preview= 1; - printf("shader notifier \n"); break; } break; diff --git a/source/blender/editors/space_file/file_ops.c b/source/blender/editors/space_file/file_ops.c index 0c6cadc05c1..ab02147d020 100644 --- a/source/blender/editors/space_file/file_ops.c +++ b/source/blender/editors/space_file/file_ops.c @@ -190,7 +190,7 @@ static int file_border_select_exec(bContext *C, wmOperator *op) rect.xmax= RNA_int_get(op->ptr, "xmax"); rect.ymax= RNA_int_get(op->ptr, "ymax"); - BLI_isect_rctf(&(ar->v2d.mask), &rect, &rect); + BLI_isect_rcti(&(ar->v2d.mask), &rect, &rect); file_select(sfile, ar, &rect, val ); WM_event_add_notifier(C, NC_WINDOW, NULL); diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index d57fc7f90bc..479d9cabc55 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -159,7 +159,7 @@ float file_string_width(const char* str) { uiStyle *style= U.uistyles.first; uiStyleFontSet(&style->widget); - return BLF_width(str); + return BLF_width((char *)str); } float file_font_pointsize() diff --git a/source/blender/editors/space_view3d/view3d_header.c b/source/blender/editors/space_view3d/view3d_header.c index 13ebeb05a5b..79ea90864f3 100644 --- a/source/blender/editors/space_view3d/view3d_header.c +++ b/source/blender/editors/space_view3d/view3d_header.c @@ -5513,11 +5513,11 @@ void view3d_header_buttons(const bContext *C, ARegion *ar) } else if(G.f & G_PARTICLEEDIT) { uiBlockBeginAlign(block); - uiDefIconButBitS(block, TOG, SCE_SELECT_PATH, B_SEL_PATH, ICON_EDGESEL, xco,yco,XIC,YIC, &ts->particle.selectmode, 1.0, 0.0, 0, 0, "Path edit mode"); + uiDefIconButBitI(block, TOG, SCE_SELECT_PATH, B_SEL_PATH, ICON_EDGESEL, xco,yco,XIC,YIC, &ts->particle.selectmode, 1.0, 0.0, 0, 0, "Path edit mode"); xco+= XIC; - uiDefIconButBitS(block, TOG, SCE_SELECT_POINT, B_SEL_POINT, ICON_VERTEXSEL, xco,yco,XIC,YIC, &ts->particle.selectmode, 1.0, 0.0, 0, 0, "Point select mode"); + uiDefIconButBitI(block, TOG, SCE_SELECT_POINT, B_SEL_POINT, ICON_VERTEXSEL, xco,yco,XIC,YIC, &ts->particle.selectmode, 1.0, 0.0, 0, 0, "Point select mode"); xco+= XIC; - uiDefIconButBitS(block, TOG, SCE_SELECT_END, B_SEL_END, ICON_FACESEL, xco,yco,XIC,YIC, &ts->particle.selectmode, 1.0, 0.0, 0, 0, "Tip select mode"); + uiDefIconButBitI(block, TOG, SCE_SELECT_END, B_SEL_END, ICON_FACESEL, xco,yco,XIC,YIC, &ts->particle.selectmode, 1.0, 0.0, 0, 0, "Tip select mode"); xco+= XIC; uiBlockEndAlign(block); diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c index 9e8dbbb12b3..3721c7d4ccb 100644 --- a/source/blender/makesrna/intern/rna_object.c +++ b/source/blender/makesrna/intern/rna_object.c @@ -409,11 +409,13 @@ static void rna_def_material_slot(BlenderRNA *brna) RNA_def_property_flag(prop, PROP_EDITABLE); RNA_def_property_pointer_funcs(prop, "rna_MaterialSlot_material_get", "rna_MaterialSlot_material_set", NULL); RNA_def_property_ui_text(prop, "Material", "Material datablock used by this material slot."); + RNA_def_property_update(prop, NC_OBJECT|ND_SHADING, "rna_Object_update"); prop= RNA_def_property(srna, "link", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, link_items); RNA_def_property_enum_funcs(prop, "rna_MaterialSlot_link_get", "rna_MaterialSlot_link_set", NULL); RNA_def_property_ui_text(prop, "Link", "Link material to object or the object's data."); + RNA_def_property_update(prop, NC_OBJECT|ND_SHADING, "rna_Object_update"); prop= RNA_def_property(srna, "name", PROP_STRING, PROP_NONE); RNA_def_property_string_funcs(prop, "rna_MaterialSlot_name_get", "rna_MaterialSlot_name_length", NULL); |