Object: Move Switch Active Objects to experimental

The operator has some problems with Undo, so better put it in
experimental for now.

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D9007
This commit is contained in:
Pablo Dobarro 2020-09-25 02:47:01 +02:00
parent 0106e17f07
commit c79b913624
4 changed files with 12 additions and 2 deletions

View File

@ -2183,6 +2183,7 @@ class USERPREF_PT_experimental_new_features(ExperimentalPanel, Panel):
({"property": "use_new_particle_system"}, "T73324"),
({"property": "use_sculpt_vertex_colors"}, "T71947"),
({"property": "use_tools_missing_icons"}, "T80331"),
({"property": "use_switch_object_operator"}, "T80402"),
),
)

View File

@ -408,6 +408,11 @@ bool ED_object_mode_generic_has_data(struct Depsgraph *depsgraph, struct Object
static bool object_switch_object_poll(bContext *C)
{
if (!U.experimental.use_switch_object_operator) {
return false;
}
if (!CTX_wm_region_view3d(C)) {
return false;
}

View File

@ -629,8 +629,7 @@ typedef struct UserDef_Experimental {
char use_sculpt_vertex_colors;
char use_image_editor_legacy_drawing;
char use_tools_missing_icons;
/** `makesdna` does not allow empty structs. */
char _pad[1];
char use_switch_object_operator;
} UserDef_Experimental;
#define USER_EXPERIMENTAL_TEST(userdef, member) \

View File

@ -6158,6 +6158,11 @@ static void rna_def_userdef_experimental(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "use_sculpt_vertex_colors", 1);
RNA_def_property_ui_text(prop, "Sculpt Vertex Colors", "Use the new Vertex Painting system");
prop = RNA_def_property(srna, "use_switch_object_operator", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_switch_object_operator", 1);
RNA_def_property_ui_text(
prop, "Switch Object Operator", "Enable the operator to switch objects by pressing D");
prop = RNA_def_property(srna, "use_image_editor_legacy_drawing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "use_image_editor_legacy_drawing", 1);
RNA_def_property_ui_text(