Merged changes in the trunk up to revision 52191.

Conflicts resolved:
source/blender/makesdna/DNA_scene_types.h
This commit is contained in:
Tamito Kajiyama
2012-11-14 02:01:02 +00:00
115 changed files with 1964 additions and 646 deletions

View File

@@ -545,7 +545,7 @@ static wmKeyMap *wm_keymap_patch_update(ListBase *lb, wmKeyMap *defaultmap, wmKe
/* copy new keymap from an existing one */
if (usermap && !(usermap->flag & KEYMAP_DIFF)) {
/* for compatibiltiy with old user preferences with non-diff
/* for compatibility with old user preferences with non-diff
* keymaps we override the original entirely */
wmKeyMapItem *kmi, *orig_kmi;

View File

@@ -624,7 +624,7 @@ void WM_operator_properties_sanitize(PointerRNA *ptr, const short no_context)
/** set all props to their default,
* \param do_update Only update un-initialized props.
*
* \note, theres nothing spesific to operators here.
* \note, theres nothing specific to operators here.
* this could be made a general function.
*/
int WM_operator_properties_default(PointerRNA *ptr, const int do_update)
@@ -1186,6 +1186,8 @@ static void wm_operator_ui_popup_ok(struct bContext *C, void *arg, int retval)
if (op && retval > 0)
WM_operator_call(C, op);
MEM_freeN(data);
}
int WM_operator_ui_popup(bContext *C, wmOperator *op, int width, int height)
@@ -1280,6 +1282,31 @@ static void WM_OT_debug_menu(wmOperatorType *ot)
RNA_def_int(ot->srna, "debug_value", 0, SHRT_MIN, SHRT_MAX, "Debug Value", "", -10000, 10000);
}
/* ***************** Operator defaults ************************* */
static int wm_operator_defaults_exec(bContext *C, wmOperator *op)
{
PointerRNA ptr = CTX_data_pointer_get_type(C, "active_operator", &RNA_Operator);
if (!ptr.data) {
BKE_report(op->reports, RPT_ERROR, "No operator in context");
return OPERATOR_CANCELLED;
}
WM_operator_properties_reset((wmOperator *)ptr.data);
return OPERATOR_FINISHED;
}
/* used by operator preset menu. pre-2.65 this was a 'Reset' button */
static void WM_OT_operator_defaults(wmOperatorType *ot)
{
ot->name = "Restore Defaults";
ot->idname = "WM_OT_operator_defaults";
ot->description = "Set the active operator to its default values";
ot->exec = wm_operator_defaults_exec;
ot->flag = OPTYPE_INTERNAL;
}
/* ***************** Splash Screen ************************* */
@@ -3748,6 +3775,7 @@ void wm_operatortype_init(void)
WM_operatortype_append(WM_OT_memory_statistics);
WM_operatortype_append(WM_OT_dependency_relations);
WM_operatortype_append(WM_OT_debug_menu);
WM_operatortype_append(WM_OT_operator_defaults);
WM_operatortype_append(WM_OT_splash);
WM_operatortype_append(WM_OT_search_menu);
WM_operatortype_append(WM_OT_call_menu);

View File

@@ -351,7 +351,7 @@ static void wm_window_add_ghostwindow(const char *title, wmWindow *win)
(GHOST_TWindowState)win->windowstate,
GHOST_kDrawingContextTypeOpenGL,
0 /* no stereo */,
multisamples /* AA */);
multisamples /* AA */);
if (ghostwin) {
/* needed so we can detect the graphics card below */