Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2009-08-25 08:32:40 +0400
committerJoshua Leung <aligorith@gmail.com>2009-08-25 08:32:40 +0400
commit33343fced5d7be2585228300392bfb3adde7ff2e (patch)
tree3873803e72eb9888b562971ff94506ea7b9d3cff /source/blender/editors/interface/interface_utils.c
parente80ac54a22214a8ecc499aa70f59bb61fcba4fa3 (diff)
2.5 - Action Editor
New Actions can now be added again from the Action Editor. There are no guarantees that this works totally safely yet (reference counting may be quite off), so you've been warned.
Diffstat (limited to 'source/blender/editors/interface/interface_utils.c')
-rw-r--r--source/blender/editors/interface/interface_utils.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index b5cfbe19466..997ac8b78c6 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -444,6 +444,20 @@ int uiDefIDPoinButs(uiBlock *block, Main *bmain, ID *parid, ID *id, int id_code,
uiBlockClearButLock(block);
}
+ /* add button */
+ if(events & UI_ID_ADD_NEW) {
+ uiBlockSetButLock(block, (events & UI_ID_PIN) && *pin_p, "Can't unlink pinned data");
+ if(parid && parid->lib);
+ else {
+ dup_params= MEM_dupallocN(params);
+ but= uiDefIconBut(block, BUT, 0, ICON_ZOOMIN, x,y,DEF_ICON_BUT_WIDTH,DEF_BUT_HEIGHT, &dup_params->browsenr, params->browsenr, 32767.0, 0, 0, "Add new data block");
+ uiButSetNFunc(but, idpoin_cb, MEM_dupallocN(params), SET_INT_IN_POINTER(UI_ID_ADD_NEW));
+ x+= DEF_ICON_BUT_WIDTH;
+ }
+
+ uiBlockClearButLock(block);
+ }
+
/* delete button */
if(events & UI_ID_DELETE) {
uiBlockSetButLock(block, (events & UI_ID_PIN) && *pin_p, "Can't unlink pinned data");