[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [60100] branches/soc-2013-ui_replay/source /blender/editors: Fixes a small bug whereby an RNA pointer was improperly created.

Vincent Akkermans vincent at ack-err.net
Fri Sep 13 11:07:40 CEST 2013


Revision: 60100
          http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=60100
Author:   ack-err
Date:     2013-09-13 09:07:40 +0000 (Fri, 13 Sep 2013)
Log Message:
-----------
Fixes a small bug whereby an RNA pointer was improperly created. Also removes the option to remove a button from a non-custom panel that was erroneously shown.

Modified Paths:
--------------
    branches/soc-2013-ui_replay/source/blender/editors/interface/interface_handlers.c
    branches/soc-2013-ui_replay/source/blender/editors/screen/area.c

Modified: branches/soc-2013-ui_replay/source/blender/editors/interface/interface_handlers.c
===================================================================
--- branches/soc-2013-ui_replay/source/blender/editors/interface/interface_handlers.c	2013-09-13 08:45:20 UTC (rev 60099)
+++ branches/soc-2013-ui_replay/source/blender/editors/interface/interface_handlers.c	2013-09-13 09:07:40 UTC (rev 60100)
@@ -5381,7 +5381,7 @@
 			Panel *pa = but->block->panel;
 			
 			/* Remove the operator from the custom enclosure */
-			if (ar->regiontype == RGN_TYPE_TOOLS) {
+			if (ar->regiontype == RGN_TYPE_TOOLS && pa && pa->flag & PNL_CUSTOM_PANEL) {
 				opp_but = uiDefIconTextBut(block, BUT, 0, ICON_NONE,
 										   CTX_IFACE_(BLF_I18NCONTEXT_OPERATOR_DEFAULT, "Remove From Panel"),
 										   0, 0, w, UI_UNIT_Y, NULL, 0, 0, 0, 0, "");

Modified: branches/soc-2013-ui_replay/source/blender/editors/screen/area.c
===================================================================
--- branches/soc-2013-ui_replay/source/blender/editors/screen/area.c	2013-09-13 08:45:20 UTC (rev 60099)
+++ branches/soc-2013-ui_replay/source/blender/editors/screen/area.c	2013-09-13 09:07:40 UTC (rev 60100)
@@ -1886,8 +1886,10 @@
 				wmOperatorType *ot = WM_operatortype_find(oli->optype_idname, TRUE);
 				int icon = ICON_NONE;
 				PointerRNA ptr;
+
+				WM_operator_properties_create_ptr(&ptr, ot);
+				ptr.data = oli->properties;
 				
-				RNA_pointer_create(NULL, &RNA_Operator, oli->properties, &ptr);
 				icon = ot->icon ? ot->icon(C, &ptr) : ot->default_icon;
 				
 				if (icon != ICON_NONE)




More information about the Bf-blender-cvs mailing list