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:
authorCampbell Barton <ideasman42@gmail.com>2010-02-23 18:34:02 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-02-23 18:34:02 +0300
commit9e2e528c36c4e01ff2fd88250d81d32733e675eb (patch)
treea0c5472124943ee50b67dad8aacd0898d947402a /source/blender/editors/interface
parent78bb45931ca6dbb51833e44efe99ed7ed2240412 (diff)
- finally a way to force removal of images (Shift+Click on the X)
- generic modal operator now works with int's
Diffstat (limited to 'source/blender/editors/interface')
-rw-r--r--source/blender/editors/interface/interface_templates.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/editors/interface/interface_templates.c b/source/blender/editors/interface/interface_templates.c
index 0c44b15296a..e2804efe040 100644
--- a/source/blender/editors/interface/interface_templates.c
+++ b/source/blender/editors/interface/interface_templates.c
@@ -284,6 +284,10 @@ static void template_id_cb(bContext *C, void *arg_litem, void *arg_event)
memset(&idptr, 0, sizeof(idptr));
RNA_property_pointer_set(&template->ptr, template->prop, idptr);
RNA_property_update(C, &template->ptr, template->prop);
+
+ if(id && CTX_wm_window(C)->eventstate->shift) /* useful hidden functionality, */
+ id->us= 0;
+
break;
case UI_ID_FAKE_USER:
if(id) {
@@ -450,7 +454,7 @@ static void template_ID(bContext *C, uiLayout *layout, TemplateID *template, Str
but= uiDefIconButO(block, BUT, unlinkop, WM_OP_INVOKE_REGION_WIN, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL);
}
else {
- but= uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, NULL);
+ but= uiDefIconBut(block, BUT, 0, ICON_X, 0, 0, UI_UNIT_X, UI_UNIT_Y, NULL, 0, 0, 0, 0, "Unlink datablock, Shift + Click to force removal on save");
uiButSetNFunc(but, template_id_cb, MEM_dupallocN(template), SET_INT_IN_POINTER(UI_ID_DELETE));
if(RNA_property_flag(template->prop) & PROP_NEVER_NULL)