[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [56581] trunk/blender/source/blender/ editors/interface/interface_templates.c: Fix for #35253, Cannot animate X, Y, Z values in nodes with vector sub-menu.
Lukas Toenne
lukas.toenne at googlemail.com
Wed May 8 16:18:09 CEST 2013
Revision: 56581
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=56581
Author: lukastoenne
Date: 2013-05-08 14:18:09 +0000 (Wed, 08 May 2013)
Log Message:
-----------
Fix for #35253, Cannot animate X, Y, Z values in nodes with vector sub-menu. The "component menu" template used for these socket buttons opens a popup, but this ui function does not support RNA info directly. Setting the uiBut rna pointer directly solves it.
Modified Paths:
--------------
trunk/blender/source/blender/editors/interface/interface_templates.c
Modified: trunk/blender/source/blender/editors/interface/interface_templates.c
===================================================================
--- trunk/blender/source/blender/editors/interface/interface_templates.c 2013-05-08 14:08:37 UTC (rev 56580)
+++ trunk/blender/source/blender/editors/interface/interface_templates.c 2013-05-08 14:18:09 UTC (rev 56581)
@@ -3115,6 +3115,7 @@
{
ComponentMenuArgs *args = MEM_callocN(sizeof(ComponentMenuArgs), "component menu template args");
uiBlock *block;
+ uiBut *but;
args->ptr = *ptr;
BLI_strncpy(args->propname, propname, sizeof(args->propname));
@@ -3122,7 +3123,11 @@
block = uiLayoutGetBlock(layout);
uiBlockBeginAlign(block);
- uiDefBlockButN(block, component_menu, args, name, 0, 0, UI_UNIT_X * 6, UI_UNIT_Y, "");
+ but = uiDefBlockButN(block, component_menu, args, name, 0, 0, UI_UNIT_X * 6, UI_UNIT_Y, "");
+ /* set rna directly, uiDefBlockButN doesn't do this */
+ but->rnapoin = *ptr;
+ but->rnaprop = RNA_struct_find_property(ptr, propname);
+ but->rnaindex = 0;
uiBlockEndAlign(block);
}
More information about the Bf-blender-cvs
mailing list