GooEngine: Option to disable Material Icon rendering
This commit is contained in:
@@ -2600,6 +2600,7 @@ class USERPREF_PT_experimental_debugging(ExperimentalPanel, Panel):
|
||||
({"property": "use_asset_indexing"}, None),
|
||||
({"property": "use_viewport_debug"}, None),
|
||||
({"property": "use_eevee_debug"}, None),
|
||||
({"property": "disable_material_icon"}, None),
|
||||
),
|
||||
)
|
||||
|
||||
|
||||
@@ -1445,6 +1445,11 @@ static void icon_set_image(const bContext *C,
|
||||
enum eIconSizes size,
|
||||
const bool use_job)
|
||||
{
|
||||
if (U.experimental.disable_material_icon && GS(id->name) == ID_MA) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
if (!prv_img) {
|
||||
if (G.debug & G_DEBUG) {
|
||||
printf("%s: no preview image for this ID: %s\n", __func__, id->name);
|
||||
|
||||
@@ -696,6 +696,7 @@ typedef struct UserDef_Experimental {
|
||||
char no_asset_indexing;
|
||||
char use_viewport_debug;
|
||||
char use_all_linked_data_direct;
|
||||
char disable_material_icon;
|
||||
char SANITIZE_AFTER_HERE;
|
||||
/* The following options are automatically sanitized (set to 0)
|
||||
* when the release cycle is not alpha. */
|
||||
@@ -712,7 +713,7 @@ typedef struct UserDef_Experimental {
|
||||
char use_shader_node_previews;
|
||||
char use_extension_repos;
|
||||
|
||||
char _pad[3];
|
||||
char _pad[1];
|
||||
/** `makesdna` does not allow empty structs. */
|
||||
} UserDef_Experimental;
|
||||
|
||||
|
||||
@@ -7018,6 +7018,15 @@ static void rna_def_userdef_experimental(BlenderRNA *brna)
|
||||
"reduces execution time and memory usage)");
|
||||
RNA_def_property_update(prop, 0, "rna_userdef_update");
|
||||
|
||||
prop = RNA_def_property(srna, "disable_material_icon", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, NULL, "disable_material_icon", 1);
|
||||
RNA_def_property_ui_text(
|
||||
prop,
|
||||
"Disable Material Icon Rendering",
|
||||
"If true, Material Preview Icons will NOT be rendered. "
|
||||
"This can prevent stuttering from opening the material ID menu");
|
||||
|
||||
|
||||
prop = RNA_def_property(srna, "use_new_curves_tools", PROP_BOOLEAN, PROP_NONE);
|
||||
RNA_def_property_boolean_sdna(prop, nullptr, "use_new_curves_tools", 1);
|
||||
RNA_def_property_ui_text(
|
||||
|
||||
Reference in New Issue
Block a user