2.5: Fixes

* Disable shaded mode for now, it cause too many crashes combined
  with preview render, will be fixed properly later.
* Make 3d view toolbar region a bit wider. Ideally this would not
  be needed, but the sculpt/paint buttons just don't fit otherwise.
* Revert change to icon/text spacing in buttons, it breaks text
  editing and clipping. Will properly fix this later so changing
  the spacing can be done centrally.
* Fix for grease pencil simplify stroke python error. Now button
  is hidden (as in 2.4), but still available through outliner.
* Fix for memory leak in UI code, when using ctrl+Q menu.
* Fix submenu > icon being drawn on some buttons where it was not
  needed.
This commit is contained in:
2009-08-10 20:57:12 +00:00
parent 24b7d90e95
commit 8dd523a154
8 changed files with 18 additions and 11 deletions

View File

@@ -335,7 +335,7 @@ class INFO_PT_edit(bpy.types.Panel):
colsplitcol.itemR(edit, "grease_pencil_manhattan_distance", text="Manhattan Distance")
colsplitcol.itemR(edit, "grease_pencil_euclidean_distance", text="Euclidean Distance")
colsplitcol.itemR(edit, "grease_pencil_smooth_stroke", text="Smooth Stroke")
colsplitcol.itemR(edit, "grease_pencil_simplify_stroke", text="Simplify Stroke")
# colsplitcol.itemR(edit, "grease_pencil_simplify_stroke", text="Simplify Stroke")
colsplitcol.itemR(edit, "grease_pencil_eraser_radius", text="Eraser Radius")

View File

@@ -315,6 +315,9 @@ static void init_fastshade_shadeinput(Render *re)
static Render *fastshade_get_render(Scene *scene)
{
// XXX 2.5: this crashes combined with previewrender
// due to global R so disabled for now
#if 0
/* XXX ugly global still, but we can't do preview while rendering */
if(G.rendering==0) {
@@ -326,6 +329,7 @@ static Render *fastshade_get_render(Scene *scene)
}
return re;
}
#endif
return NULL;
}

View File

@@ -2953,7 +2953,6 @@ uiBut *uiDefIconBlockBut(uiBlock *block, uiBlockCreateFunc func, void *arg, int
but->flag|= UI_HAS_ICON;
but->flag|= UI_ICON_LEFT;
but->flag|= UI_ICON_SUBMENU;
but->block_create_func= func;
ui_check_but(but);

View File

@@ -315,6 +315,7 @@ static void ui_apply_autokey_undo(bContext *C, uiBut *but)
static void ui_apply_but_funcs_after(bContext *C)
{
uiAfterFunc *afterf, after;
PointerRNA opptr;
ListBase funcs;
/* copy to avoid recursive calls */
@@ -328,13 +329,18 @@ static void ui_apply_but_funcs_after(bContext *C)
if(after.context)
CTX_store_set(C, after.context);
if(after.optype)
WM_operator_name_call(C, after.optype->idname, after.opcontext, after.opptr);
if(after.opptr) {
WM_operator_properties_free(after.opptr);
/* free in advance to avoid leak on exit */
opptr= *after.opptr,
MEM_freeN(after.opptr);
}
if(after.optype)
WM_operator_name_call(C, after.optype->idname, after.opcontext, (after.opptr)? &opptr: NULL);
if(after.opptr)
WM_operator_properties_free(&opptr);
if(after.rnapoin.data)
RNA_property_update(C, &after.rnapoin, after.rnaprop);

View File

@@ -222,9 +222,9 @@ static int ui_text_icon_width(uiLayout *layout, char *name, int icon)
if(icon && !name[0])
return UI_UNIT_X; /* icon only */
else if(icon)
return (variable)? UI_GetStringWidth(name) + 4 + UI_UNIT_X: 10*UI_UNIT_X; /* icon + text */
return (variable)? UI_GetStringWidth(name) + 10 + UI_UNIT_X: 10*UI_UNIT_X; /* icon + text */
else
return (variable)? UI_GetStringWidth(name) + 4 + UI_UNIT_X: 10*UI_UNIT_X; /* text only */
return (variable)? UI_GetStringWidth(name) + 10 + UI_UNIT_X: 10*UI_UNIT_X; /* text only */
}
static void ui_item_size(uiItem *item, int *r_w, int *r_h)

View File

@@ -889,7 +889,7 @@ static void widget_draw_text_icon(uiFontStyle *fstyle, uiWidgetColors *wcol, uiB
rect->xmin += UI_icon_get_width(but->icon+but->iconadd);
if(but->editstr || (but->flag & UI_TEXT_LEFT))
rect->xmin += 10;
rect->xmin += 5;
}
else if((but->flag & UI_TEXT_LEFT))
rect->xmin += 5;

View File

@@ -889,7 +889,7 @@ void ED_spacetype_view3d(void)
/* regions: tool(bar) */
art= MEM_callocN(sizeof(ARegionType), "spacetype view3d region");
art->regionid = RGN_TYPE_TOOLS;
art->minsizex= 120; // XXX
art->minsizex= 160; // XXX
art->minsizey= 50; // XXX
art->keymapflag= ED_KEYMAP_UI|ED_KEYMAP_FRAMES;
art->listener= view3d_buttons_area_listener;

View File

@@ -1826,11 +1826,9 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "gp_settings", GP_PAINT_DOSMOOTH);
RNA_def_property_ui_text(prop, "Grease Pencil Smooth Stroke", "Smooth the final stroke.");
#if 0
prop= RNA_def_property(srna, "grease_pencil_simplify_stroke", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "gp_settings", GP_PAINT_DOSIMPLIFY);
RNA_def_property_ui_text(prop, "Grease Pencil Simplify Stroke", "Simplify the final stroke.");
#endif
prop= RNA_def_property(srna, "grease_pencil_eraser_radius", PROP_INT, PROP_NONE);
RNA_def_property_int_sdna(prop, NULL, "gp_eraser");