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-01-19 14:24:42 +0300
committerCampbell Barton <ideasman42@gmail.com>2010-01-19 14:24:42 +0300
commited578c27c821a146ca684137d5eb1ac986858599 (patch)
treef37c1fa2db3dc71ef611ccc8f231867430112be7 /source/blender/editors/interface/interface.c
parent59bcf6cf4f3655a997d923d969d72b3b5a5d5841 (diff)
patch [#20690] Cut Linking for Logic Bricks
from Dalai Felinto (dfelinto) cutting kinks now works the same as in the node editor.
Diffstat (limited to 'source/blender/editors/interface/interface.c')
-rw-r--r--source/blender/editors/interface/interface.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/source/blender/editors/interface/interface.c b/source/blender/editors/interface/interface.c
index 72502dd018f..48fd23ad0e7 100644
--- a/source/blender/editors/interface/interface.c
+++ b/source/blender/editors/interface/interface.c
@@ -942,7 +942,42 @@ void uiBlockClearButLock(uiBlock *block)
/* *************************************************************** */
+void ui_delete_linkline(uiLinkLine *line, uiBut *but)
+{
+ uiLink *link;
+ int a, b;
+
+ BLI_remlink(&but->link->lines, line);
+
+ link= line->from->link;
+
+ /* are there more pointers allowed? */
+ if(link->ppoin) {
+
+ if(*(link->totlink)==1) {
+ *(link->totlink)= 0;
+ MEM_freeN(*(link->ppoin));
+ *(link->ppoin)= NULL;
+ }
+ else {
+ b= 0;
+ for(a=0; a< (*(link->totlink)); a++) {
+
+ if( (*(link->ppoin))[a] != line->to->poin ) {
+ (*(link->ppoin))[b]= (*(link->ppoin))[a];
+ b++;
+ }
+ }
+ (*(link->totlink))--;
+ }
+ }
+ else {
+ *(link->poin)= NULL;
+ }
+ MEM_freeN(line);
+ //REDRAW
+}
/* XXX 2.50 no links supported yet */
#if 0
static void ui_delete_active_linkline(uiBlock *block)