diff options
author | Campbell Barton <ideasman42@gmail.com> | 2017-07-28 23:44:04 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2017-07-28 23:44:04 +0300 |
commit | 0e26707bce243daece1c699c223d5f26d7d45e48 (patch) | |
tree | 466bf7be78afa4d0e7f44a2b1f8206c91506f27d /source | |
parent | c558763ef562d407384dba37ffab612099df4916 (diff) | |
parent | 214bbd4c027518c24bcd8e7eaf5226453e2e978c (diff) |
Merge branch 'master' into blender2.8
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/editors/interface/resources.c | 16 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 7 | ||||
-rw-r--r-- | source/blender/makesdna/DNA_userdef_types.h | 26 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_userdef.c | 5 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_rna_driver.c | 10 | ||||
-rw-r--r-- | source/blender/windowmanager/intern/wm_event_system.c | 7 |
6 files changed, 46 insertions, 25 deletions
diff --git a/source/blender/editors/interface/resources.c b/source/blender/editors/interface/resources.c index b1343ce489b..274429d5390 100644 --- a/source/blender/editors/interface/resources.c +++ b/source/blender/editors/interface/resources.c @@ -2915,17 +2915,17 @@ void init_userdef_do_versions(void) if (!USER_VERSION_ATLEAST(278, 6)) { /* Clear preference flags for re-use. */ U.flag &= ~( - (1 << 1) | (1 << 2) | (1 << 3) | - (1 << 6) | (1 << 7) | - (1 << 9) | (1 << 10)); + USER_FLAG_DEPRECATED_1 | USER_FLAG_DEPRECATED_2 | USER_FLAG_DEPRECATED_3 | + USER_FLAG_DEPRECATED_6 | USER_FLAG_DEPRECATED_7 | + USER_FLAG_DEPRECATED_9 | USER_FLAG_DEPRECATED_10); U.uiflag &= ~( - (1 << 7)); + USER_UIFLAG_DEPRECATED_7); U.transopts &= ~( - (1 << 2) | (1 << 3) | (1 << 4) | - (1 << 7)); + USER_TR_DEPRECATED_2 | USER_TR_DEPRECATED_3 | USER_TR_DEPRECATED_4 | + USER_TR_DEPRECATED_6 | USER_TR_DEPRECATED_7); U.gameflags &= ~( - (1 << 0) | (1 << 1) | - (1 << 3) | (1 << 4)); + USER_GL_RENDER_DEPRECATED_0 | USER_GL_RENDER_DEPRECATED_1 | + USER_GL_RENDER_DEPRECATED_3 | USER_GL_RENDER_DEPRECATED_4); U.uiflag |= USER_LOCK_CURSOR_ADJUST; } diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index 922e72467f2..ac1c16f1d76 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -4669,8 +4669,11 @@ static bool sculpt_stroke_test_start(bContext *C, struct wmOperator *op, const float mouse[2]) { /* Don't start the stroke until mouse goes over the mesh. - * note: mouse will only be null when re-executing the saved stroke. */ - if (!mouse || over_mesh(C, op, mouse[0], mouse[1])) { + * note: mouse will only be null when re-executing the saved stroke. + * We have exception for 'exec' strokes since they may not set 'mouse', only 'location', see: T52195. */ + if (((op->flag & OP_IS_INVOKE) == 0) || + (mouse == NULL) || over_mesh(C, op, mouse[0], mouse[1])) + { Object *ob = CTX_data_active_object(C); SculptSession *ss = ob->sculpt; Sculpt *sd = CTX_data_tool_settings(C)->sculpt; diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index e2eb1364be2..4aba028fbd6 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -601,12 +601,16 @@ typedef enum eUserPref_Section { /* UserDef.flag */ typedef enum eUserPref_Flag { USER_AUTOSAVE = (1 << 0), - /* 1..3 */ + USER_FLAG_DEPRECATED_1 = (1 << 1), /* cleared */ + USER_FLAG_DEPRECATED_2 = (1 << 2), /* cleared */ + USER_FLAG_DEPRECATED_3 = (1 << 3), /* cleared */ /* USER_SCENEGLOBAL = (1 << 4), deprecated */ USER_TRACKBALL = (1 << 5), - /* 6..7 */ + USER_FLAG_DEPRECATED_6 = (1 << 6), /* cleared */ + USER_FLAG_DEPRECATED_7 = (1 << 7), /* cleared */ USER_MAT_ON_OB = (1 << 8), - /* 9..10 */ + USER_FLAG_DEPRECATED_9 = (1 << 9), /* cleared */ + USER_FLAG_DEPRECATED_10 = (1 << 10), /* cleared */ USER_TOOLTIPS = (1 << 11), USER_TWOBUTTONMOUSE = (1 << 12), USER_NONUMPAD = (1 << 13), @@ -663,7 +667,7 @@ typedef enum eUserpref_UI_Flag { USER_DRAWVIEWINFO = (1 << 4), USER_PLAINMENUS = (1 << 5), USER_LOCK_CURSOR_ADJUST = (1 << 6), - /* flag 7 is free */ + USER_UIFLAG_DEPRECATED_7 = (1 << 7), /* cleared */ USER_ALLWINCODECS = (1 << 8), USER_MENUOPENAUTO = (1 << 9), USER_ZBUF_CURSOR = (1 << 10), @@ -736,10 +740,12 @@ typedef enum eAutokey_Flag { typedef enum eUserpref_Translation_Flags { USER_TR_TOOLTIPS = (1 << 0), USER_TR_IFACE = (1 << 1), - /* 2..4 */ + USER_TR_DEPRECATED_2 = (1 << 2), /* cleared */ + USER_TR_DEPRECATED_3 = (1 << 3), /* cleared */ + USER_TR_DEPRECATED_4 = (1 << 4), /* cleared */ USER_DOTRANSLATE = (1 << 5), - USER_USETEXTUREFONT = (1 << 6), - /* 7 */ + USER_TR_DEPRECATED_6 = (1 << 6), /* cleared */ + USER_TR_DEPRECATED_7 = (1 << 7), /* cleared */ USER_TR_NEWDATANAME = (1 << 8), } eUserpref_Translation_Flags; @@ -761,7 +767,11 @@ typedef enum eDupli_ID_Flags { /* UserDef.gameflags */ typedef enum eOpenGL_RenderingOptions { - USER_DISABLE_MIPMAP = (1 << 2), + USER_GL_RENDER_DEPRECATED_0 = (1 << 0), + USER_GL_RENDER_DEPRECATED_1 = (1 << 1), + USER_DISABLE_MIPMAP = (1 << 2), + USER_GL_RENDER_DEPRECATED_3 = (1 << 3), + USER_GL_RENDER_DEPRECATED_4 = (1 << 4), } eOpenGL_RenderingOptions; /* selection method for opengl gpu_select_method */ diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c index 6ba5fe4fabf..0a4e69934b7 100644 --- a/source/blender/makesrna/intern/rna_userdef.c +++ b/source/blender/makesrna/intern/rna_userdef.c @@ -3983,11 +3983,6 @@ static void rna_def_userdef_system(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Translate New Names", "Translate new data names (when adding/creating some)"); RNA_def_property_update(prop, 0, "rna_userdef_update"); - prop = RNA_def_property(srna, "use_textured_fonts", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "transopts", USER_USETEXTUREFONT); - RNA_def_property_ui_text(prop, "Textured Fonts", "Use textures for drawing international fonts"); - RNA_def_property_update(prop, 0, "rna_userdef_update"); - /* System & OpenGL */ prop = RNA_def_property(srna, "solid_lights", PROP_COLLECTION, PROP_NONE); diff --git a/source/blender/python/intern/bpy_rna_driver.c b/source/blender/python/intern/bpy_rna_driver.c index b4c0de51c04..1135ba121e3 100644 --- a/source/blender/python/intern/bpy_rna_driver.c +++ b/source/blender/python/intern/bpy_rna_driver.c @@ -63,7 +63,15 @@ PyObject *pyrna_driver_get_variable_value( } else { /* object & property */ - driver_arg = pyrna_prop_to_py(&ptr, prop); + PropertyType type = RNA_property_type(prop); + if (type == PROP_ENUM) { + /* Note that enum's are converted to strings by default, + * we want to avoid that, see: T52213 */ + driver_arg = PyLong_FromLong(RNA_property_enum_get(&ptr, prop)); + } + else { + driver_arg = pyrna_prop_to_py(&ptr, prop); + } } } else { diff --git a/source/blender/windowmanager/intern/wm_event_system.c b/source/blender/windowmanager/intern/wm_event_system.c index 739f05ee9a1..b1e4b6a1d86 100644 --- a/source/blender/windowmanager/intern/wm_event_system.c +++ b/source/blender/windowmanager/intern/wm_event_system.c @@ -1118,6 +1118,9 @@ bool WM_operator_last_properties_store(wmOperator *UNUSED(op)) #endif +/** + * Also used for exec when 'event' is NULL. + */ static int wm_operator_invoke( bContext *C, wmOperatorType *ot, wmEvent *event, PointerRNA *properties, ReportList *reports, const bool poll_only) @@ -1133,7 +1136,9 @@ static int wm_operator_invoke( wmOperator *op = wm_operator_create(wm, ot, properties, reports); /* if reports == NULL, they'll be initialized */ const bool is_nested_call = (wm->op_undo_depth != 0); - op->flag |= OP_IS_INVOKE; + if (event != NULL) { + op->flag |= OP_IS_INVOKE; + } /* initialize setting from previous run */ if (!is_nested_call) { /* not called by py script */ |