[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [54233] trunk/blender/source/blender: Fix #33874: active UV map chooser in uv editor should not have X button as you

Brecht Van Lommel brechtvanlommel at pandora.be
Thu Jan 31 14:44:14 CET 2013


Revision: 54233
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=54233
Author:   blendix
Date:     2013-01-31 13:44:13 +0000 (Thu, 31 Jan 2013)
Log Message:
-----------
Fix #33874: active UV map chooser in uv editor should not have X button as you
can't not have an active UV map.

Modified Paths:
--------------
    trunk/blender/source/blender/editors/interface/interface_layout.c
    trunk/blender/source/blender/makesrna/intern/rna_mesh.c

Modified: trunk/blender/source/blender/editors/interface/interface_layout.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_layout.c	2013-01-31 13:44:03 UTC (rev 54232)
+++ trunk/blender/source/blender/editors/interface/interface_layout.c	2013-01-31 13:44:13 UTC (rev 54233)
@@ -1393,7 +1393,11 @@
 
 	/* 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;

Modified: trunk/blender/source/blender/makesrna/intern/rna_mesh.c
===================================================================
--- trunk/blender/source/blender/makesrna/intern/rna_mesh.c	2013-01-31 13:44:03 UTC (rev 54232)
+++ trunk/blender/source/blender/makesrna/intern/rna_mesh.c	2013-01-31 13:44:13 UTC (rev 54233)
@@ -2422,7 +2422,7 @@
 	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 @@
 	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 @@
 	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");
 




More information about the Bf-blender-cvs mailing list