diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-01-31 17:44:13 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2013-01-31 17:44:13 +0400 |
commit | ba7e37c2b6ea87c08dac697257360edcea2ae8f4 (patch) | |
tree | b1e35b011cf08ed242dae158c63f1acd039bd10e /source/blender | |
parent | 122a2084b5c056befb6627a1d12ee337f0fe07fe (diff) |
Fix #33874: active UV map chooser in uv editor should not have X button as you
can't not have an active UV map.
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/interface/interface_layout.c | 6 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_mesh.c | 6 |
2 files changed, 8 insertions, 4 deletions
diff --git a/source/blender/editors/interface/interface_layout.c b/source/blender/editors/interface/interface_layout.c index 10375824518..487277ed0a9 100644 --- a/source/blender/editors/interface/interface_layout.c +++ b/source/blender/editors/interface/interface_layout.c @@ -1393,7 +1393,11 @@ void ui_but_add_search(uiBut *but, PointerRNA *ptr, PropertyRNA *prop, PointerRN /* turn button into search button */ if (searchprop) { - but->type = SEARCH_MENU_UNLINK; + if(RNA_property_flag(prop) & PROP_NEVER_UNLINK) + but->type = SEARCH_MENU; + else + but->type = SEARCH_MENU_UNLINK; + but->hardmax = MAX2(but->hardmax, 256.0f); but->rnasearchpoin = *searchptr; but->rnasearchprop = searchprop; diff --git a/source/blender/makesrna/intern/rna_mesh.c b/source/blender/makesrna/intern/rna_mesh.c index 025279b3836..4b4006f0012 100644 --- a/source/blender/makesrna/intern/rna_mesh.c +++ b/source/blender/makesrna/intern/rna_mesh.c @@ -2422,7 +2422,7 @@ static void rna_def_loop_colors(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_struct_type(prop, "MeshLoopColorLayer"); RNA_def_property_pointer_funcs(prop, "rna_Mesh_vertex_color_active_get", "rna_Mesh_vertex_color_active_set", NULL, NULL); - RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK); RNA_def_property_ui_text(prop, "Active Vertex Color Layer", "Active vertex color layer"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); @@ -2450,7 +2450,7 @@ static void rna_def_uv_layers(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_struct_type(prop, "MeshUVLoopLayer"); RNA_def_property_pointer_funcs(prop, "rna_Mesh_uv_layer_active_get", "rna_Mesh_uv_layer_active_set", NULL, NULL); - RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK); RNA_def_property_ui_text(prop, "Active UV loop layer", "Active UV loop layer"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); @@ -2600,7 +2600,7 @@ static void rna_def_uv_textures(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_struct_type(prop, "MeshTexturePolyLayer"); RNA_def_property_pointer_funcs(prop, "rna_Mesh_uv_texture_active_get", "rna_Mesh_uv_texture_active_set", NULL, NULL); - RNA_def_property_flag(prop, PROP_EDITABLE); + RNA_def_property_flag(prop, PROP_EDITABLE | PROP_NEVER_UNLINK); RNA_def_property_ui_text(prop, "Active UV Map", "Active UV Map"); RNA_def_property_update(prop, 0, "rna_Mesh_update_data"); |