diff options
author | Kent Mein <mein@cs.umn.edu> | 2002-12-06 22:48:37 +0300 |
---|---|---|
committer | Kent Mein <mein@cs.umn.edu> | 2002-12-06 22:48:37 +0300 |
commit | cd4a60f5362b951826de8fc4218d30969c38095c (patch) | |
tree | e699411275651bd998a7ec5673116cb5c4218a2d /source | |
parent | fd05cdbaad4058520759478794a37a6204e8f0a3 (diff) |
sgefants patch to remove the License Key stuff.
(I noticed its not completely gone yet from the blender/source dir)
But its a big step in the right direction if it doesn't enable
all of the functionatlity already...
(Using cscope for LICENSE_KEY_VALID still turns up some stuff)
Kent
--
mein@cs.umn.edu
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/blenloader/intern/writefile.c | 4 | ||||
-rw-r--r-- | source/blender/imbuf/IMB_imbuf.h | 10 | ||||
-rw-r--r-- | source/blender/imbuf/intern/writeimage.c | 8 | ||||
-rw-r--r-- | source/blender/src/buttons.c | 52 | ||||
-rw-r--r-- | source/blender/src/cre/license_key.c | 2 | ||||
-rw-r--r-- | source/blender/src/editnla.c | 1906 | ||||
-rw-r--r-- | source/blender/src/editobject.c | 7 | ||||
-rw-r--r-- | source/blender/src/editsca.c | 46 | ||||
-rw-r--r-- | source/blender/src/editscreen.c | 12 | ||||
-rw-r--r-- | source/blender/src/editsound.c | 43 | ||||
-rw-r--r-- | source/blender/src/headerbuttons.c | 50 | ||||
-rw-r--r-- | source/blender/src/pub/license_key.c | 4 | ||||
-rw-r--r-- | source/blender/src/toets.c | 7 | ||||
-rw-r--r-- | source/blender/src/usiblender.c | 9 | ||||
-rw-r--r-- | source/blender/src/writeimage.c | 3 | ||||
-rw-r--r-- | source/creator/creator.c | 2 |
16 files changed, 988 insertions, 1177 deletions
diff --git a/source/blender/blenloader/intern/writefile.c b/source/blender/blenloader/intern/writefile.c index 68084bd533e..310c97fe319 100644 --- a/source/blender/blenloader/intern/writefile.c +++ b/source/blender/blenloader/intern/writefile.c @@ -219,8 +219,6 @@ static void writedata_free(WriteData *wd) struct streamGlueControlStruct *Global_streamGlueControl; int mywfile; -#include "license_key.h" - /** * Low level WRITE(2) wrapper that buffers data * @param adr Pointer to new chunk of data @@ -264,7 +262,7 @@ bgnwrite( int file, int write_flags) { - int is_publisher= ((write_flags & (G_FILE_COMPRESS | G_FILE_LOCK | G_FILE_SIGN | G_FILE_PUBLISH)) && LICENSE_KEY_VALID); + int is_publisher= (write_flags & (G_FILE_COMPRESS | G_FILE_LOCK | G_FILE_SIGN | G_FILE_PUBLISH)); WriteData *wd= writedata_new(file, is_publisher); if (is_publisher) { diff --git a/source/blender/imbuf/IMB_imbuf.h b/source/blender/imbuf/IMB_imbuf.h index ea293e66289..fa59e55d333 100644 --- a/source/blender/imbuf/IMB_imbuf.h +++ b/source/blender/imbuf/IMB_imbuf.h @@ -312,19 +312,9 @@ struct ImBuf *IMB_scalefastImBuf(struct ImBuf *ibuf, short newx, short newy); short IMB_saveiff(struct ImBuf *ibuf,char *naam,int flags); /** - * This function pointer needs to be initialized to enable - * png writing from the ImBuf library. - * - * @attention Defined in writeimage.c - * @attention See also IMB_png_encode() - */ -extern short (*IMB_fp_png_encode)(struct ImBuf *ibuf, int file, int flags); - -/** * Encodes a png image from an ImBuf * * @attention Defined in png_encode.c - * @attention See also IMB_fp_png_encode */ short IMB_png_encode(struct ImBuf *ibuf, int file, int flags); diff --git a/source/blender/imbuf/intern/writeimage.c b/source/blender/imbuf/intern/writeimage.c index 015a062f1cf..49d827fcce5 100644 --- a/source/blender/imbuf/intern/writeimage.c +++ b/source/blender/imbuf/intern/writeimage.c @@ -58,10 +58,8 @@ #endif -short (*IMB_fp_png_encode)(struct ImBuf *ibuf, int file, int flags) = 0; - short IMB_saveiff(struct ImBuf *ibuf,char *naam,int flags) -{ +{ short ok=TRUE,delpl=FALSE; int file = -1; @@ -81,8 +79,8 @@ short IMB_saveiff(struct ImBuf *ibuf,char *naam,int flags) } } - if (IS_png(ibuf) && IMB_fp_png_encode) { - ok = IMB_fp_png_encode(ibuf,file,flags); + if (IS_png(ibuf)) { + ok = IMB_png_encode(ibuf,file,flags); if (ok) { close (file); return (ok); diff --git a/source/blender/src/buttons.c b/source/blender/src/buttons.c index 92ad8d7e8e3..5b21be626a2 100644 --- a/source/blender/src/buttons.c +++ b/source/blender/src/buttons.c @@ -151,9 +151,6 @@ #include "BIF_writeimage.h" #include "BIF_writeavicodec.h" -#include "license_key.h" -extern int LICENSE_KEY_VALID; - /* 'old' stuff": defines and types ------------------------------------- */ #include "blendef.h" #include "interface.h" @@ -4694,7 +4691,7 @@ void soundbuts(void) uiDefButI(block, TOG|BIT|SOUND_FLAGS_LOOP_BIT, B_SOUND_REDRAW, "Loop", xco, yco, 95, 24, &sound->flags, 0.0, 0.0, 0, 0,"Toggle between looping on/off"); - if (sound->flags & SOUND_FLAGS_LOOP && LICENSE_KEY_VALID) + if (sound->flags & SOUND_FLAGS_LOOP) { xco += 100; uiDefButI(block, TOG|BIT|SOUND_FLAGS_BIDIRECTIONAL_LOOP_BIT, B_SOUND_REDRAW, "Ping Pong", @@ -6270,43 +6267,28 @@ static char *imagetype_pup(void) strcat(formatstring, "|%s %%x%d"); // add space for Movie #endif - if (LICENSE_KEY_VALID) { - strcat(formatstring, "|%s %%x%d"); // add space for PNG + strcat(formatstring, "|%s %%x%d"); // add space for PNG #ifdef _WIN32 - strcat(formatstring, "|%s %%x%d"); // add space for AVI Codec + strcat(formatstring, "|%s %%x%d"); // add space for AVI Codec #endif - sprintf(string, formatstring, - "AVI Raw", R_AVIRAW, - "AVI Jpeg", R_AVIJPEG, + sprintf(string, formatstring, + "AVI Raw", R_AVIRAW, + "AVI Jpeg", R_AVIJPEG, #ifdef _WIN32 - "AVI Codec", R_AVICODEC, + "AVI Codec", R_AVICODEC, #endif - "Targa", R_TARGA, - "Targa Raw", R_RAWTGA, - "PNG", R_PNG, - "Jpeg", R_JPEG90, - "HamX", R_HAMX, - "Iris", R_IRIS, - "Iris + Zbuffer", R_IRIZ, - "Ftype", R_FTYPE, - "Movie", R_MOVIE - ); - } else { - sprintf(string, formatstring, - "AVI Raw", R_AVIRAW, - "AVI Jpeg", R_AVIJPEG, - "Targa", R_TARGA, - "Targa Raw", R_RAWTGA, - "Jpeg", R_JPEG90, - "HamX", R_HAMX, - "Iris", R_IRIS, - "Iris + Zbuffer", R_IRIZ, - "Ftype", R_FTYPE, - "Movie", R_MOVIE - ); - } + "Targa", R_TARGA, + "Targa Raw", R_RAWTGA, + "PNG", R_PNG, + "Jpeg", R_JPEG90, + "HamX", R_HAMX, + "Iris", R_IRIS, + "Iris + Zbuffer", R_IRIZ, + "Ftype", R_FTYPE, + "Movie", R_MOVIE + ); return (string); } diff --git a/source/blender/src/cre/license_key.c b/source/blender/src/cre/license_key.c index f6a56d0f14e..a5b4f015499 100644 --- a/source/blender/src/cre/license_key.c +++ b/source/blender/src/cre/license_key.c @@ -190,7 +190,7 @@ void create_key_name(char * keyname) void checkhome() { initprot(); // initialize module and function tables - IMB_fp_png_encode = IMB_png_encode; + } void SHOW_LICENSE_KEY(void) diff --git a/source/blender/src/editnla.c b/source/blender/src/editnla.c index 86ee77a960b..57862d864c7 100644 --- a/source/blender/src/editnla.c +++ b/source/blender/src/editnla.c @@ -81,8 +81,6 @@ #include "blendef.h" #include "mydevice.h" #include "blendertimer.h" -#include "license_key.h" -#include "keyed_functions.h" #ifdef HAVE_CONFIG_H #include <config.h> @@ -136,138 +134,76 @@ int calc_memleak (void* ptr){ event = params->event; val = params->val; - if (LICENSE_KEY_VALID){ - if(curarea->win==0) return 0; + if(curarea->win==0) return 0; + + if (!snla) + return 0; + + if(val) { + if( uiDoBlocks(&curarea->uiblocks, event)!=UI_NOTHING ) event= 0; - if (!snla) - return 0; + getmouseco_areawin(mval); - if(val) { - if( uiDoBlocks(&curarea->uiblocks, event)!=UI_NOTHING ) event= 0; - - getmouseco_areawin(mval); - - switch(event) { - case UI_BUT_EVENT: - do_blenderbuttons(val); - break; - case HOMEKEY: - do_nla_buttons(B_NLAHOME); - break; - case DKEY: - if (G.qual & LR_SHIFTKEY && mval[0]>=NLAWIDTH){ - duplicate_nlachannel_keys(); - update_for_newframe(); - } - break; - case DELKEY: - case XKEY: - if (mval[0]>=NLAWIDTH) - delete_nlachannel_keys (); - else - delete_nlachannels(); - update_for_newframe(); - break; - case GKEY: - if (mval[0]>=NLAWIDTH) - transform_nlachannel_keys ('g'); - update_for_newframe(); - break; - case SKEY: - if (mval[0]>=NLAWIDTH) - transform_nlachannel_keys ('s'); + switch(event) { + case UI_BUT_EVENT: + do_blenderbuttons(val); + break; + case HOMEKEY: + do_nla_buttons(B_NLAHOME); + break; + case DKEY: + if (G.qual & LR_SHIFTKEY && mval[0]>=NLAWIDTH){ + duplicate_nlachannel_keys(); update_for_newframe(); - break; - case BKEY: - borderselect_nla(); - break; - case CKEY: - convert_nla(mval); - break; - - case AKEY: - if (G.qual & LR_SHIFTKEY){ - add_nlablock(mval); - allqueue (REDRAWNLA, 0); - allqueue (REDRAWVIEW3D, 0); - } - else{ - if (mval[0]>=NLAWIDTH) - deselect_nlachannel_keys(1); - else{ - deselect_nlachannels(1); - allqueue (REDRAWVIEW3D, 0); - } - allqueue (REDRAWNLA, 0); - allqueue (REDRAWIPO, 0); - } - break; - case RIGHTMOUSE: - if (mval[0]>=NLAWIDTH) - mouse_nla(); - else - mouse_nlachannels(mval); - break; - case LEFTMOUSE: - if (mval[0]>NLAWIDTH){ - do { - getmouseco_areawin(mval); - - areamouseco_to_ipoco(G.v2d, mval, &dx, &dy); - - cfra= (int)dx; - if(cfra< 1) cfra= 1; - - if( cfra!=CFRA ) { - CFRA= cfra; - update_for_newframe(); - force_draw_plus(SPACE_VIEW3D); - force_draw_plus(SPACE_IPO); - } - - } while(get_mbut()&L_MOUSE); - } - - break; - case MIDDLEMOUSE: - view2dmove(); /* in drawipo.c */ - break; } - } - - if(doredraw) scrarea_queue_winredraw(curarea); - } - return 0; -} - -void winqreadnlaspace(unsigned short event, short val, char ascii) -{ - NlaParam param; - Base *base; - bActionStrip *strip, *next; - short mval[2]; - float dx, dy; - int cfra; - - param.event = event; - param.val = val; - param.snla = curarea->spacedata.first; - - - /* Call the protected (&obfuscated) eventloop function */ - if (KEY_NLA_EVENT){ - KEY_NLA_EVENT(¶m); - } - else{ - getmouseco_areawin(mval); - switch(event) { + break; + case DELKEY: + case XKEY: + if (mval[0]>=NLAWIDTH) + delete_nlachannel_keys (); + else + delete_nlachannels(); + update_for_newframe(); + break; case GKEY: + if (mval[0]>=NLAWIDTH) + transform_nlachannel_keys ('g'); + update_for_newframe(); + break; case SKEY: - case AKEY: + if (mval[0]>=NLAWIDTH) + transform_nlachannel_keys ('s'); + update_for_newframe(); + break; + case BKEY: + borderselect_nla(); + break; case CKEY: - case NKEY: + convert_nla(mval); + break; + + case AKEY: + if (G.qual & LR_SHIFTKEY){ + add_nlablock(mval); + allqueue (REDRAWNLA, 0); + allqueue (REDRAWVIEW3D, 0); + } + else{ + if (mval[0]>=NLAWIDTH) + deselect_nlachannel_keys(1); + else{ + deselect_nlachannels(1); + allqueue (REDRAWVIEW3D, 0); + } + allqueue (REDRAWNLA, 0); + allqueue (REDRAWIPO, 0); + } + break; case RIGHTMOUSE: - notice ("NLA window editing only available in Blender Publisher"); + if (mval[0]>=NLAWIDTH) + mouse_nla(); + else + mouse_nlachannels(mval); break; case LEFTMOUSE: if (mval[0]>NLAWIDTH){ @@ -293,24 +229,29 @@ void winqreadnlaspace(unsigned short event, short val, char ascii) case MIDDLEMOUSE: view2dmove(); /* in drawipo.c */ break; - case DELKEY: - case XKEY: - if (okee ("This will remove all NLA information from all objects!")){ - for (base = G.scene->base.first; base; base=base->next){ - for (strip=base->object->nlastrips.first; strip; strip=next){ - next=strip->next; - free_actionstrip(strip); - BLI_freelinkN(&base->object->nlastrips, strip); - } - } - update_for_newframe(); - } - break; - - default: - break; } } + + if(doredraw) scrarea_queue_winredraw(curarea); + return 0; +} + +void winqreadnlaspace(unsigned short event, short val, char ascii) +{ + NlaParam param; + Base *base; + bActionStrip *strip, *next; + short mval[2]; + float dx, dy; + int cfra; + + param.event = event; + param.val = val; + param.snla = curarea->spacedata.first; + + + /* Call the protected (&obfuscated) eventloop function */ + calc_memleak(¶m); /* enable NLA */ } static void convert_nla(short mval[2]) @@ -321,76 +262,74 @@ static void convert_nla(short mval[2]) float x,y; int sel=0; bActionStrip *strip, *nstrip; - if (LICENSE_KEY_VALID){ - /* Find out what strip we're over */ - ymax = count_nla_levels() * (NLACHANNELSKIP+NLACHANNELHEIGHT); - areamouseco_to_ipoco(G.v2d, mval, &x, &y); - - for (base=G.scene->base.first; base; base=base->next){ - if (nla_filter(base, 0)){ - /* Check object ipo */ + /* Find out what strip we're over */ + ymax = count_nla_levels() * (NLACHANNELSKIP+NLACHANNELHEIGHT); + areamouseco_to_ipoco(G.v2d, mval, &x, &y); + + for (base=G.scene->base.first; base; base=base->next){ + if (nla_filter(base, 0)){ + /* Check object ipo */ + ymin=ymax-(NLACHANNELSKIP+NLACHANNELHEIGHT); + if (y>=ymin && y<=ymax) + break; + ymax=ymin; + + if (base->object->type==OB_ARMATURE){ + /* Check action ipo */ ymin=ymax-(NLACHANNELSKIP+NLACHANNELHEIGHT); if (y>=ymin && y<=ymax) break; ymax=ymin; - if (base->object->type==OB_ARMATURE){ - /* Check action ipo */ + /* Check nlastrips */ + for (strip=base->object->nlastrips.first; strip; strip=strip->next){ ymin=ymax-(NLACHANNELSKIP+NLACHANNELHEIGHT); - if (y>=ymin && y<=ymax) + if (y>=ymin && y<=ymax){ + sel = 1; break; - ymax=ymin; - - /* Check nlastrips */ - for (strip=base->object->nlastrips.first; strip; strip=strip->next){ - ymin=ymax-(NLACHANNELSKIP+NLACHANNELHEIGHT); - if (y>=ymin && y<=ymax){ - sel = 1; - break; - } - ymax=ymin; } - if (sel) - break; + ymax=ymin; } + if (sel) + break; } } - - if (!base) - return; - - if (base->object->type==OB_ARMATURE){ - event = pupmenu("Convert%t|Action to NLAstrip%x1"); - switch (event){ - case 1: - if (base->object->action){ - /* Make new actionstrip */ - nstrip = MEM_callocN(sizeof(bActionStrip), "bActionStrip"); - - deselect_nlachannel_keys(0); - - /* Link the action to the nstrip */ - nstrip->act = base->object->action; - nstrip->actstart = calc_action_start(base->object->action); /* MAKE THIS THE FIRST FRAME OF THE ACTION */ - nstrip->actend = calc_action_end(base->object->action); - nstrip->start = nstrip->actstart; - nstrip->end = nstrip->actend; - nstrip->flag = ACTSTRIP_SELECT; - nstrip->repeat = 1.0; - - BLI_addtail(&base->object->nlastrips, nstrip); - - /* Unlink action */ - base->object->action = NULL; - - allqueue (REDRAWNLA, 0); - } + } + + if (!base) + return; + + if (base->object->type==OB_ARMATURE){ + event = pupmenu("Convert%t|Action to NLAstrip%x1"); + switch (event){ + case 1: + if (base->object->action){ + /* Make new actionstrip */ + nstrip = MEM_callocN(sizeof(bActionStrip), "bActionStrip"); + deselect_nlachannel_keys(0); - break; - default: - break; + /* Link the action to the nstrip */ + nstrip->act = base->object->action; + nstrip->actstart = calc_action_start(base->object->action); /* MAKE THIS THE FIRST FRAME OF THE ACTION */ + nstrip->actend = calc_action_end(base->object->action); + nstrip->start = nstrip->actstart; + nstrip->end = nstrip->actend; + nstrip->flag = ACTSTRIP_SELECT; + nstrip->repeat = 1.0; + + BLI_addtail(&base->object->nlastrips, nstrip); + + /* Unlink action */ + base->object->action = NULL; + + allqueue (REDRAWNLA, 0); } + + + break; + default: + break; } } } @@ -409,89 +348,87 @@ static void add_nlablock(short mval[2]) short nr; int cur; - if (LICENSE_KEY_VALID){ - areamouseco_to_ipoco(G.v2d, mval, &x, &y); - - mval[0]-=7; - areamouseco_to_ipoco(G.v2d, mval, &rectf.xmin, &rectf.ymin); - - mval[0]+=14; - areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax); - - ymax = count_nla_levels(); - ymax*=(NLACHANNELHEIGHT + NLACHANNELSKIP); - - for (base=G.scene->base.first; base; base=base->next){ - /* Handle object ipo selection */ - if (nla_filter(base, 0)){ - - /* STUPID STUPID STUPID */ - ymin=ymax-(NLACHANNELHEIGHT+NLACHANNELSKIP); - - /* Handle object ipos */ - if (base->object->type==OB_ARMATURE){ - if (!((ymax < rectf.ymin) || (ymin > rectf.ymax))) - break; - } - + areamouseco_to_ipoco(G.v2d, mval, &x, &y); + + mval[0]-=7; + areamouseco_to_ipoco(G.v2d, mval, &rectf.xmin, &rectf.ymin); + + mval[0]+=14; + areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax); + + ymax = count_nla_levels(); + ymax*=(NLACHANNELHEIGHT + NLACHANNELSKIP); + + for (base=G.scene->base.first; base; base=base->next){ + /* Handle object ipo selection */ + if (nla_filter(base, 0)){ + + /* STUPID STUPID STUPID */ + ymin=ymax-(NLACHANNELHEIGHT+NLACHANNELSKIP); + + /* Handle object ipos */ + if (base->object->type==OB_ARMATURE){ + if (!((ymax < rectf.ymin) || (ymin > rectf.ymax))) + break; + } + + ymax=ymin; + + /* Handle action ipos & Action strips */ + if (base->object->type==OB_ARMATURE){ + ymin=ymax-(NLACHANNELHEIGHT+NLACHANNELSKIP)*(BLI_countlist(&base->object->nlastrips) + 1); + if (!((ymax < rectf.ymin) || (ymin > rectf.ymax))) + break; ymax=ymin; - /* Handle action ipos & Action strips */ - if (base->object->type==OB_ARMATURE){ - ymin=ymax-(NLACHANNELHEIGHT+NLACHANNELSKIP)*(BLI_countlist(&base->object->nlastrips) + 1); - if (!((ymax < rectf.ymin) || (ymin > rectf.ymax))) - break; - ymax=ymin; - - - } - } - } - - /* Make sure we have an armature */ - if (!base){ - error ("Not an armature!"); - return; + + } } - - /* Popup action menu */ - IDnames_to_pupstring(&str, "Add action", NULL, &G.main->action, (ID *)G.scene, &nr); + } + + /* Make sure we have an armature */ + if (!base){ + error ("Not an armature!"); + return; + } + + /* Popup action menu */ + IDnames_to_pupstring(&str, "Add action", NULL, &G.main->action, (ID *)G.scene, &nr); - event = pupmenu(str); - - if (event!=-1){ - for (cur = 1, act=G.main->action.first; act; act=act->id.next, cur++){ - if (cur==event){ - break; - } + event = pupmenu(str); + + if (event!=-1){ + for (cur = 1, act=G.main->action.first; act; act=act->id.next, cur++){ + if (cur==event){ + break; } } - - MEM_freeN(str); - - /* Bail out if no action was chosen */ - if (!act){ - return; - } - - /* Initialize the new action block */ - strip = MEM_callocN(sizeof(bActionStrip), "bActionStrip"); - - deselect_nlachannel_keys(0); - - /* Link the action to the strip */ - strip->act = act; - strip->actstart = 1.0; - strip->actend = calc_action_end(act); - strip->start = G.scene->r.cfra; /* Should be mval[0] */ - strip->end = strip->start + (strip->actend-strip->actstart); - strip->flag = ACTSTRIP_SELECT; - strip->repeat = 1.0; - - act->id.us++; - - BLI_addtail(&base->object->nlastrips, strip); } + + MEM_freeN(str); + + /* Bail out if no action was chosen */ + if (!act){ + return; + } + + /* Initialize the new action block */ + strip = MEM_callocN(sizeof(bActionStrip), "bActionStrip"); + + deselect_nlachannel_keys(0); + + /* Link the action to the strip */ + strip->act = act; + strip->actstart = 1.0; + strip->actend = calc_action_end(act); + strip->start = G.scene->r.cfra; /* Should be mval[0] */ + strip->end = strip->start + (strip->actend-strip->actstart); + strip->flag = ACTSTRIP_SELECT; + strip->repeat = 1.0; + + act->id.us++; + + BLI_addtail(&base->object->nlastrips, strip); } static void mouse_nlachannels(short mval[2]) @@ -665,94 +602,92 @@ static void deselect_nlachannel_keys (int test) bConstraintChannel *conchan; /* Determine if this is selection or deselection */ - if (LICENSE_KEY_VALID){ - if (test){ - for (base=G.scene->base.first; base && sel; base=base->next){ - - /* Test object ipos */ - if (is_ipo_key_selected(base->object->ipo)){ - sel = 0; - break; + if (test){ + for (base=G.scene->base.first; base && sel; base=base->next){ + + /* Test object ipos */ + if (is_ipo_key_selected(base->object->ipo)){ + sel = 0; + break; + } + + /* Test object constraint ipos */ + if (sel){ + for (conchan=base->object->constraintChannels.first; conchan; conchan=conchan->next){ + if (is_ipo_key_selected(conchan->ipo)){ + sel=0; + break; + } } - - /* Test object constraint ipos */ - if (sel){ - for (conchan=base->object->constraintChannels.first; conchan; conchan=conchan->next){ - if (is_ipo_key_selected(conchan->ipo)){ + } + + /* Test action ipos */ + if (sel){ + if (base->object->type==OB_ARMATURE && base->object->action){ + for (chan=base->object->action->chanbase.first; chan; chan=chan->next){ + if (is_ipo_key_selected(chan->ipo)){ sel=0; break; } - } - } - - /* Test action ipos */ - if (sel){ - if (base->object->type==OB_ARMATURE && base->object->action){ - for (chan=base->object->action->chanbase.first; chan; chan=chan->next){ - if (is_ipo_key_selected(chan->ipo)){ - sel=0; - break; - } - /* Test action constraints */ - if (sel){ - for (conchan=chan->constraintChannels.first; conchan; conchan=conchan->next){ - if (is_ipo_key_selected(conchan->ipo)){ - sel=0; - break; - } + /* Test action constraints */ + if (sel){ + for (conchan=chan->constraintChannels.first; conchan; conchan=conchan->next){ + if (is_ipo_key_selected(conchan->ipo)){ + sel=0; + break; } } } } } - - /* Test NLA strips */ - if (sel){ - if (base->object->type==OB_ARMATURE){ - for (strip=base->object->nlastrips.first; strip; strip=strip->next){ - if (strip->flag & ACTSTRIP_SELECT){ - sel = 0; - break; - } + } + + /* Test NLA strips */ + if (sel){ + if (base->object->type==OB_ARMATURE){ + for (strip=base->object->nlastrips.first; strip; strip=strip->next){ + if (strip->flag & ACTSTRIP_SELECT){ + sel = 0; + break; } } } } } - else - sel=0; - - - /* Set the flags */ - for (base=G.scene->base.first; base; base=base->next){ - /* Set the object ipos */ - set_ipo_key_selection(base->object->ipo, sel); + } + else + sel=0; + + + /* Set the flags */ + for (base=G.scene->base.first; base; base=base->next){ + /* Set the object ipos */ + set_ipo_key_selection(base->object->ipo, sel); - - /* Set the object constraint ipos */ - for (conchan=base->object->constraintChannels.first; conchan; conchan=conchan->next){ - set_ipo_key_selection(conchan->ipo, sel); - } + + /* Set the object constraint ipos */ + for (conchan=base->object->constraintChannels.first; conchan; conchan=conchan->next){ + set_ipo_key_selection(conchan->ipo, sel); + } - /* Set the action ipos */ - if (base->object->type==OB_ARMATURE && base->object->action){ - for (chan=base->object->action->chanbase.first; chan; chan=chan->next){ - set_ipo_key_selection(chan->ipo, sel); - /* Set the action constraint ipos */ - for (conchan=chan->constraintChannels.first; conchan; conchan=conchan->next) - set_ipo_key_selection(conchan->ipo, sel); - } + /* Set the action ipos */ + if (base->object->type==OB_ARMATURE && base->object->action){ + for (chan=base->object->action->chanbase.first; chan; chan=chan->next){ + set_ipo_key_selection(chan->ipo, sel); + /* Set the action constraint ipos */ + for (conchan=chan->constraintChannels.first; conchan; conchan=conchan->next) + set_ipo_key_selection(conchan->ipo, sel); } - - /* Set the nlastrips */ - if (base->object->type==OB_ARMATURE){ - for (strip=base->object->nlastrips.first; strip; strip=strip->next){ - if (sel) - strip->flag |= ACTSTRIP_SELECT; - else - strip->flag &= ~ACTSTRIP_SELECT; - } + } + + /* Set the nlastrips */ + if (base->object->type==OB_ARMATURE){ + for (strip=base->object->nlastrips.first; strip; strip=strip->next){ + if (sel) + strip->flag |= ACTSTRIP_SELECT; + else + strip->flag &= ~ACTSTRIP_SELECT; } } } @@ -779,214 +714,213 @@ static void transform_nlachannel_keys(char mode) bActionStrip *strip; bConstraintChannel *conchan; - if (LICENSE_KEY_VALID){ - /* Ensure that partial selections result in beztriple selections */ - for (base=G.scene->base.first; base; base=base->next){ + /* Ensure that partial selections result in beztriple selections */ + for (base=G.scene->base.first; base; base=base->next){ - /* Check object ipos */ - tvtot+=fullselect_ipo_keys(base->object->ipo); - - /* Check object constraint ipos */ - for(conchan=base->object->constraintChannels.first; conchan; conchan=conchan->next) - tvtot+=fullselect_ipo_keys(conchan->ipo); - - /* Check action ipos */ - if (base->object->type == OB_ARMATURE && base->object->action){ - for (chan=base->object->action->chanbase.first; chan; chan=chan->next){ - tvtot+=fullselect_ipo_keys(chan->ipo); - - /* Check action constraint ipos */ - for (conchan=chan->constraintChannels.first; conchan; conchan=conchan->next) - tvtot+=fullselect_ipo_keys(conchan->ipo); - } - + /* Check object ipos */ + tvtot+=fullselect_ipo_keys(base->object->ipo); + + /* Check object constraint ipos */ + for(conchan=base->object->constraintChannels.first; conchan; conchan=conchan->next) + tvtot+=fullselect_ipo_keys(conchan->ipo); + + /* Check action ipos */ + if (base->object->type == OB_ARMATURE && base->object->action){ + for (chan=base->object->action->chanbase.first; chan; chan=chan->next){ + tvtot+=fullselect_ipo_keys(chan->ipo); + + /* Check action constraint ipos */ + for (conchan=chan->constraintChannels.first; conchan; conchan=conchan->next) + tvtot+=fullselect_ipo_keys(conchan->ipo); } + + } - /* Check nlastrips */ - if (base->object->type==OB_ARMATURE){ - for (strip=base->object->nlastrips.first; strip; strip=strip->next){ - if (strip->flag & ACTSTRIP_SELECT) - tvtot+=2; - } + /* Check nlastrips */ + if (base->object->type==OB_ARMATURE){ + for (strip=base->object->nlastrips.first; strip; strip=strip->next){ + if (strip->flag & ACTSTRIP_SELECT) + tvtot+=2; } } - - /* If nothing is selected, bail out */ - if (!tvtot) - return; - - - /* Build the transvert structure */ - tv = MEM_callocN (sizeof(TransVert) * tvtot, "transVert"); - tvtot=0; - for (base=G.scene->base.first; base; base=base->next){ - /* Manipulate object ipos */ - tvtot=add_trans_ipo_keys(base->object->ipo, tv, tvtot); + } + + /* If nothing is selected, bail out */ + if (!tvtot) + return; + + + /* Build the transvert structure */ + tv = MEM_callocN (sizeof(TransVert) * tvtot, "transVert"); + tvtot=0; + for (base=G.scene->base.first; base; base=base->next){ + /* Manipulate object ipos */ + tvtot=add_trans_ipo_keys(base->object->ipo, tv, tvtot); - /* Manipulate object constraint ipos */ - for (conchan=base->object->constraintChannels.first; conchan; conchan=conchan->next) - tvtot=add_trans_ipo_keys(conchan->ipo, tv, tvtot); + /* Manipulate object constraint ipos */ + for (conchan=base->object->constraintChannels.first; conchan; conchan=conchan->next) + tvtot=add_trans_ipo_keys(conchan->ipo, tv, tvtot); - /* Manipulate action ipos */ - if (base->object->type==OB_ARMATURE && base->object->action){ - for (chan=base->object->action->chanbase.first; chan; chan=chan->next){ - tvtot=add_trans_ipo_keys(chan->ipo, tv, tvtot); + /* Manipulate action ipos */ + if (base->object->type==OB_ARMATURE && base->object->action){ + for (chan=base->object->action->chanbase.first; chan; chan=chan->next){ + tvtot=add_trans_ipo_keys(chan->ipo, tv, tvtot); - /* Manipulate action constraint ipos */ - for (conchan=chan->constraintChannels.first; conchan; conchan=conchan->next) - tvtot=add_trans_ipo_keys(conchan->ipo, tv, tvtot); - } + /* Manipulate action constraint ipos */ + for (conchan=chan->constraintChannels.first; conchan; conchan=conchan->next) + tvtot=add_trans_ipo_keys(conchan->ipo, tv, tvtot); } + } - /* Manipulate nlastrips */ - for (strip=base->object->nlastrips.first; strip; strip=strip->next){ - if (strip->flag & ACTSTRIP_SELECT){ - tv[tvtot+0].val=&strip->start; - tv[tvtot+1].val=&strip->end; - - tv[tvtot+0].oldval = strip->start; - tv[tvtot+1].oldval = strip->end; - - tvtot+=2; - } + /* Manipulate nlastrips */ + for (strip=base->object->nlastrips.first; strip; strip=strip->next){ + if (strip->flag & ACTSTRIP_SELECT){ + tv[tvtot+0].val=&strip->start; + tv[tvtot+1].val=&strip->end; + + tv[tvtot+0].oldval = strip->start; + tv[tvtot+1].oldval = strip->end; + + tvtot+=2; + } + } + } + + /* Do the event loop */ + // cent[0] = curarea->winx + (G.snla->v2d.hor.xmax)/2; + // cent[1] = curarea->winy + (G.snla->v2d.hor.ymax)/2; + + // areamouseco_to_ipoco(cent, &cenf[0], &cenf[1]); + + getmouseco_areawin (mvals); + areamouseco_to_ipoco(G.v2d, mvals, &sval[0], &sval[1]); + + startx=sval[0]; + while (loop) { + /* Get the input */ + /* If we're cancelling, reset transformations */ + /* Else calc new transformation */ + /* Perform the transformations */ + while (qtest()) { + short val; + unsigned short event= extern_qread(&val); + + if (val) { + switch (event) { + case LEFTMOUSE: + case SPACEKEY: + case RETKEY: + loop=0; + break; + case XKEY: + break; + case ESCKEY: + case RIGHTMOUSE: + cancel=1; + loop=0; + break; + default: + arrows_move_cursor(event); + break; + }; } } - /* Do the event loop */ - // cent[0] = curarea->winx + (G.snla->v2d.hor.xmax)/2; - // cent[1] = curarea->winy + (G.snla->v2d.hor.ymax)/2; - - // areamouseco_to_ipoco(cent, &cenf[0], &cenf[1]); - - getmouseco_areawin (mvals); - areamouseco_to_ipoco(G.v2d, mvals, &sval[0], &sval[1]); - - startx=sval[0]; - while (loop) { - /* Get the input */ - /* If we're cancelling, reset transformations */ - /* Else calc new transformation */ - /* Perform the transformations */ - while (qtest()) { - short val; - unsigned short event= extern_qread(&val); - - if (val) { - switch (event) { - case LEFTMOUSE: - case SPACEKEY: - case RETKEY: - loop=0; - break; - case XKEY: - break; - case ESCKEY: - case RIGHTMOUSE: - cancel=1; - loop=0; - break; - default: - arrows_move_cursor(event); - break; - }; + if (cancel) { + for (i=0; i<tvtot; i++) { + if (tv[i].loc){ + tv[i].loc[0]=tv[i].oldloc[0]; + tv[i].loc[1]=tv[i].oldloc[1]; } + if (tv[i].val) + tv[i].val[0]=tv[i].oldval; } + } + else { + getmouseco_areawin (mvalc); + areamouseco_to_ipoco(G.v2d, mvalc, &cval[0], &cval[1]); - if (cancel) { - for (i=0; i<tvtot; i++) { - if (tv[i].loc){ + if (!firsttime && lastcval[0]==cval[0] && lastcval[1]==cval[1]) { + PIL_sleep_ms(1); + } + else { + for (i=0; i<tvtot; i++){ + if (tv[i].loc) tv[i].loc[0]=tv[i].oldloc[0]; - tv[i].loc[1]=tv[i].oldloc[1]; - } if (tv[i].val) tv[i].val[0]=tv[i].oldval; - } - } - else { - getmouseco_areawin (mvalc); - areamouseco_to_ipoco(G.v2d, mvalc, &cval[0], &cval[1]); - - if (!firsttime && lastcval[0]==cval[0] && lastcval[1]==cval[1]) { - PIL_sleep_ms(1); - } - else { - for (i=0; i<tvtot; i++){ + + switch (mode){ + case 'g': + deltax = cval[0]-sval[0]; + fac= deltax; + + apply_keyb_grid(&fac, 0.0F, 1.0F, 0.1F, U.flag & AUTOGRABGRID); + if (tv[i].loc) - tv[i].loc[0]=tv[i].oldloc[0]; + tv[i].loc[0]+=fac; if (tv[i].val) - tv[i].val[0]=tv[i].oldval; + tv[i].val[0]+=fac; + break; + case 's': + startx=mvals[0]-(NLAWIDTH/2+(curarea->winrct.xmax-curarea->winrct.xmin)/2); + deltax=mvalc[0]-(NLAWIDTH/2+(curarea->winrct.xmax-curarea->winrct.xmin)/2); + fac= (float)fabs(deltax/startx); - switch (mode){ - case 'g': - deltax = cval[0]-sval[0]; - fac= deltax; - - apply_keyb_grid(&fac, 0.0F, 1.0F, 0.1F, U.flag & AUTOGRABGRID); - - if (tv[i].loc) - tv[i].loc[0]+=fac; - if (tv[i].val) - tv[i].val[0]+=fac; - break; - case 's': - startx=mvals[0]-(NLAWIDTH/2+(curarea->winrct.xmax-curarea->winrct.xmin)/2); - deltax=mvalc[0]-(NLAWIDTH/2+(curarea->winrct.xmax-curarea->winrct.xmin)/2); - fac= (float)fabs(deltax/startx); - - apply_keyb_grid(&fac, 0.0F, 0.2F, 0.1F, U.flag & AUTOSIZEGRID); - - if (invert){ - if (i % 03 == 0){ - memcpy (tv[i].loc, tv[i].oldloc, sizeof(tv[i+2].oldloc)); - } - if (i % 03 == 2){ - memcpy (tv[i].loc, tv[i].oldloc, sizeof(tv[i-2].oldloc)); - } - - fac*=-1; - } - startx= (G.scene->r.cfra); - - if (tv[i].loc){ - tv[i].loc[0]-= startx; - tv[i].loc[0]*=fac; - tv[i].loc[0]+= startx; + apply_keyb_grid(&fac, 0.0F, 0.2F, 0.1F, U.flag & AUTOSIZEGRID); + + if (invert){ + if (i % 03 == 0){ + memcpy (tv[i].loc, tv[i].oldloc, sizeof(tv[i+2].oldloc)); } - if (tv[i].val){ - tv[i].val[0]-= startx; - tv[i].val[0]*=fac; - tv[i].val[0]+= startx; + if (i % 03 == 2){ + memcpy (tv[i].loc, tv[i].oldloc, sizeof(tv[i-2].oldloc)); } - break; + fac*=-1; } + startx= (G.scene->r.cfra); + + if (tv[i].loc){ + tv[i].loc[0]-= startx; + tv[i].loc[0]*=fac; + tv[i].loc[0]+= startx; + } + if (tv[i].val){ + tv[i].val[0]-= startx; + tv[i].val[0]*=fac; + tv[i].val[0]+= startx; + } + + break; } } - - if (mode=='s'){ - sprintf(str, "sizeX: %.3f", fac); - headerprint(str); - } - else if (mode=='g'){ - sprintf(str, "deltaX: %.3f", fac); - headerprint(str); - } - - if (G.snla->lock){ - allqueue (REDRAWVIEW3D, 0); - allqueue (REDRAWNLA, 0); - allqueue (REDRAWIPO, 0); - force_draw_all(); - } - else { - addqueue (curarea->win, REDRAWALL, 0); - force_draw (); - } } - lastcval[0]= cval[0]; - lastcval[1]= cval[1]; - firsttime= 0; + if (mode=='s'){ + sprintf(str, "sizeX: %.3f", fac); + headerprint(str); + } + else if (mode=='g'){ + sprintf(str, "deltaX: %.3f", fac); + headerprint(str); + } + + if (G.snla->lock){ + allqueue (REDRAWVIEW3D, 0); + allqueue (REDRAWNLA, 0); + allqueue (REDRAWIPO, 0); + force_draw_all(); + } + else { + addqueue (curarea->win, REDRAWALL, 0); + force_draw (); + } + } + + lastcval[0]= cval[0]; + lastcval[1]= cval[1]; + firsttime= 0; } allspace(REMAKEALLIPO, 0); @@ -994,7 +928,6 @@ static void transform_nlachannel_keys(char mode) allqueue (REDRAWNLA, 0); allqueue (REDRAWIPO, 0); MEM_freeN (tv); - } } static void delete_nlachannel_keys(void) @@ -1004,46 +937,44 @@ static void delete_nlachannel_keys(void) bConstraintChannel *conchan; bActionStrip *strip, *nextstrip; - if (LICENSE_KEY_VALID){ - if (!okee("Erase selected keys")) - return; - - for (base = G.scene->base.first; base; base=base->next){ + if (!okee("Erase selected keys")) + return; + + for (base = G.scene->base.first; base; base=base->next){ - /* Delete object ipos */ - delete_ipo_keys(base->object->ipo); - - /* Delete object constraint keys */ - for(conchan=base->object->constraintChannels.first; conchan; conchan=conchan->next) - delete_ipo_keys(conchan->ipo); + /* Delete object ipos */ + delete_ipo_keys(base->object->ipo); + + /* Delete object constraint keys */ + for(conchan=base->object->constraintChannels.first; conchan; conchan=conchan->next) + delete_ipo_keys(conchan->ipo); - /* Delete NLA strips */ - if (base->object->type==OB_ARMATURE){ - for (strip = base->object->nlastrips.first; strip; strip=nextstrip){ - nextstrip=strip->next; - if (strip->flag & ACTSTRIP_SELECT){ - free_actionstrip(strip); - BLI_remlink(&base->object->nlastrips, strip); - MEM_freeN(strip); - } - } - } - - /* Delete action ipos */ - if (base->object->type==OB_ARMATURE && base->object->action){ - for (chan=base->object->action->chanbase.first; chan; chan=chan->next){ - delete_ipo_keys(chan->ipo); - /* Delete action constraint keys */ - for(conchan=chan->constraintChannels.first; conchan; conchan=conchan->next) - delete_ipo_keys(conchan->ipo); + /* Delete NLA strips */ + if (base->object->type==OB_ARMATURE){ + for (strip = base->object->nlastrips.first; strip; strip=nextstrip){ + nextstrip=strip->next; + if (strip->flag & ACTSTRIP_SELECT){ + free_actionstrip(strip); + BLI_remlink(&base->object->nlastrips, strip); + MEM_freeN(strip); } } } - allspace(REMAKEALLIPO, 0); - allqueue(REDRAWNLA, 0); - allqueue(REDRAWIPO, 0); + /* Delete action ipos */ + if (base->object->type==OB_ARMATURE && base->object->action){ + for (chan=base->object->action->chanbase.first; chan; chan=chan->next){ + delete_ipo_keys(chan->ipo); + /* Delete action constraint keys */ + for(conchan=chan->constraintChannels.first; conchan; conchan=conchan->next) + delete_ipo_keys(conchan->ipo); + } + } } + + allspace(REMAKEALLIPO, 0); + allqueue(REDRAWNLA, 0); + allqueue(REDRAWIPO, 0); } static void duplicate_nlachannel_keys(void) @@ -1052,50 +983,48 @@ static void duplicate_nlachannel_keys(void) bActionChannel *chan; bConstraintChannel *conchan; bActionStrip *strip, *laststrip; - if (LICENSE_KEY_VALID){ + + /* Find selected items */ + for (base = G.scene->base.first; base; base=base->next){ + /* Duplicate object keys */ + duplicate_ipo_keys(base->object->ipo); - /* Find selected items */ - for (base = G.scene->base.first; base; base=base->next){ - /* Duplicate object keys */ - duplicate_ipo_keys(base->object->ipo); - - /* Duplicate object constraint keys */ - for(conchan=base->object->constraintChannels.first; conchan; conchan=conchan->next) - duplicate_ipo_keys(conchan->ipo); + /* Duplicate object constraint keys */ + for(conchan=base->object->constraintChannels.first; conchan; conchan=conchan->next) + duplicate_ipo_keys(conchan->ipo); - /* Duplicate nla strips */ - if (base->object->type == OB_ARMATURE){ - laststrip = base->object->nlastrips.last; - for (strip=base->object->nlastrips.first; strip; strip=strip->next){ - if (strip->flag & ACTSTRIP_SELECT){ - bActionStrip *newstrip; - - copy_actionstrip(&newstrip, &strip); - - BLI_addtail(&base->object->nlastrips, newstrip); - - strip->flag &= ~ACTSTRIP_SELECT; - newstrip->flag |= ACTSTRIP_SELECT; - - } - if (strip==laststrip) - break; - } - } - - /* Duplicate actionchannel keys */ - if (base->object->type == OB_ARMATURE && base->object->action){ - for (chan=base->object->action->chanbase.first; chan; chan=chan->next){ - duplicate_ipo_keys(chan->ipo); - /* Duplicate action constraint keys */ - for(conchan=chan->constraintChannels.first; conchan; conchan=conchan->next) - duplicate_ipo_keys(conchan->ipo); + /* Duplicate nla strips */ + if (base->object->type == OB_ARMATURE){ + laststrip = base->object->nlastrips.last; + for (strip=base->object->nlastrips.first; strip; strip=strip->next){ + if (strip->flag & ACTSTRIP_SELECT){ + bActionStrip *newstrip; + + copy_actionstrip(&newstrip, &strip); + + BLI_addtail(&base->object->nlastrips, newstrip); + + strip->flag &= ~ACTSTRIP_SELECT; + newstrip->flag |= ACTSTRIP_SELECT; + } + if (strip==laststrip) + break; } } - transform_nlachannel_keys ('g'); + /* Duplicate actionchannel keys */ + if (base->object->type == OB_ARMATURE && base->object->action){ + for (chan=base->object->action->chanbase.first; chan; chan=chan->next){ + duplicate_ipo_keys(chan->ipo); + /* Duplicate action constraint keys */ + for(conchan=chan->constraintChannels.first; conchan; conchan=conchan->next) + duplicate_ipo_keys(conchan->ipo); + } + } } + + transform_nlachannel_keys ('g'); } static void borderselect_nla(void) @@ -1109,80 +1038,78 @@ static void borderselect_nla(void) bActionStrip *strip; bConstraintChannel *conchan; - if (LICENSE_KEY_VALID){ - val= get_border (&rect, 3); + val= get_border (&rect, 3); + + if (val){ + mval[0]= rect.xmin; + mval[1]= rect.ymin+2; + areamouseco_to_ipoco(G.v2d, mval, &rectf.xmin, &rectf.ymin); + mval[0]= rect.xmax; + mval[1]= rect.ymax-2; + areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax); - if (val){ - mval[0]= rect.xmin; - mval[1]= rect.ymin+2; - areamouseco_to_ipoco(G.v2d, mval, &rectf.xmin, &rectf.ymin); - mval[0]= rect.xmax; - mval[1]= rect.ymax-2; - areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax); - - ymax = count_nla_levels(); - ymax*= (NLACHANNELHEIGHT+NLACHANNELSKIP); - - for (base=G.scene->base.first; base; base=base->next){ - /* Check object ipos */ - if (nla_filter(base, 0)){ + ymax = count_nla_levels(); + ymax*= (NLACHANNELHEIGHT+NLACHANNELSKIP); + + for (base=G.scene->base.first; base; base=base->next){ + /* Check object ipos */ + if (nla_filter(base, 0)){ + ymin=ymax-(NLACHANNELHEIGHT+NLACHANNELSKIP); + if (base->object->ipo){ + if (!((ymax < rectf.ymin) || (ymin > rectf.ymax))) + borderselect_ipo_key(base->object->ipo, rectf.xmin, rectf.xmax, val); + } + ymax=ymin; + + /* Check object constraint ipos */ + for (conchan=base->object->constraintChannels.first; conchan; conchan=conchan->next){ ymin=ymax-(NLACHANNELHEIGHT+NLACHANNELSKIP); - if (base->object->ipo){ - if (!((ymax < rectf.ymin) || (ymin > rectf.ymax))) - borderselect_ipo_key(base->object->ipo, rectf.xmin, rectf.xmax, val); - } + if (!((ymax < rectf.ymin) || (ymin > rectf.ymax))) + borderselect_ipo_key(conchan->ipo, rectf.xmin, rectf.xmax, val); ymax=ymin; + } - /* Check object constraint ipos */ - for (conchan=base->object->constraintChannels.first; conchan; conchan=conchan->next){ - ymin=ymax-(NLACHANNELHEIGHT+NLACHANNELSKIP); - if (!((ymax < rectf.ymin) || (ymin > rectf.ymax))) - borderselect_ipo_key(conchan->ipo, rectf.xmin, rectf.xmax, val); - ymax=ymin; + /* Check action ipos */ + if (ACTIVE_ARMATURE(base)){ + ymin=ymax-(NLACHANNELHEIGHT+NLACHANNELSKIP); + if (base->object->action){ + bActionChannel *chan; + + if (!((ymax < rectf.ymin) || (ymin > rectf.ymax))){ + for (chan=base->object->action->chanbase.first; chan; chan=chan->next){ + borderselect_ipo_key(chan->ipo, rectf.xmin, rectf.xmax, val); + /* Check action constraint ipos */ + for (conchan=chan->constraintChannels.first; conchan; conchan=conchan->next) + borderselect_ipo_key(conchan->ipo, rectf.xmin, rectf.xmax, val); + } + } } - - /* Check action ipos */ - if (ACTIVE_ARMATURE(base)){ + ymax=ymin; + } /* End of if armature */ + + /* Skip nlastrips */ + if (base->object->type==OB_ARMATURE){ + for (strip=base->object->nlastrips.first; strip; strip=strip->next){ ymin=ymax-(NLACHANNELHEIGHT+NLACHANNELSKIP); - if (base->object->action){ - bActionChannel *chan; - - if (!((ymax < rectf.ymin) || (ymin > rectf.ymax))){ - for (chan=base->object->action->chanbase.first; chan; chan=chan->next){ - borderselect_ipo_key(chan->ipo, rectf.xmin, rectf.xmax, val); - /* Check action constraint ipos */ - for (conchan=chan->constraintChannels.first; conchan; conchan=conchan->next) - borderselect_ipo_key(conchan->ipo, rectf.xmin, rectf.xmax, val); - } + // + if (!((ymax < rectf.ymin) || (ymin > rectf.ymax))){ + if (!((rectf.xmax<strip->start) || (rectf.xmin>strip->end))){ + if (val==1) + strip->flag |= ACTSTRIP_SELECT; + else + strip->flag &= ~ACTSTRIP_SELECT; } } + ymax=ymin; - } /* End of if armature */ - - /* Skip nlastrips */ - if (base->object->type==OB_ARMATURE){ - for (strip=base->object->nlastrips.first; strip; strip=strip->next){ - ymin=ymax-(NLACHANNELHEIGHT+NLACHANNELSKIP); - // - if (!((ymax < rectf.ymin) || (ymin > rectf.ymax))){ - if (!((rectf.xmax<strip->start) || (rectf.xmin>strip->end))){ - if (val==1) - strip->flag |= ACTSTRIP_SELECT; - else - strip->flag &= ~ACTSTRIP_SELECT; - } - } - - ymax=ymin; - } } - - } /* End of object filter */ - } - allqueue(REDRAWNLA, 0); - allqueue(REDRAWACTION, 0); - allqueue(REDRAWIPO, 0); - } + } + + } /* End of object filter */ + } + allqueue(REDRAWNLA, 0); + allqueue(REDRAWACTION, 0); + allqueue(REDRAWIPO, 0); } } @@ -1197,71 +1124,68 @@ static void mouse_nla(void) bActionStrip *rstrip; bConstraintChannel *conchan; - if (LICENSE_KEY_VALID){ - getmouseco_areawin (mval); - - /* Try object ipo selection */ - base=get_nearest_nlachannel_ob_key(&selx, &sel); - if (base){ - if (!(G.qual & LR_SHIFTKEY)){ - deselect_nlachannel_keys(0); - sel = 0; - } - - select_ipo_key(base->object->ipo, selx, sel); - - /* Try object constraint selection */ - for (conchan=base->object->constraintChannels.first; conchan; conchan=conchan->next) - select_ipo_key(conchan->ipo, selx, sel); - - - allqueue(REDRAWIPO, 0); - allqueue(REDRAWVIEW3D, 0); - allqueue(REDRAWNLA, 0); - return; + getmouseco_areawin (mval); + + /* Try object ipo selection */ + base=get_nearest_nlachannel_ob_key(&selx, &sel); + if (base){ + if (!(G.qual & LR_SHIFTKEY)){ + deselect_nlachannel_keys(0); + sel = 0; } + + select_ipo_key(base->object->ipo, selx, sel); + + /* Try object constraint selection */ + for (conchan=base->object->constraintChannels.first; conchan; conchan=conchan->next) + select_ipo_key(conchan->ipo, selx, sel); + + + allqueue(REDRAWIPO, 0); + allqueue(REDRAWVIEW3D, 0); + allqueue(REDRAWNLA, 0); + return; + } - /* Try action ipo selection */ - act=get_nearest_nlachannel_ac_key(&selx, &sel); - if (act){ - if (!(G.qual & LR_SHIFTKEY)){ - deselect_nlachannel_keys(0); - sel = 0; - } - - for (chan=act->chanbase.first; chan; chan=chan->next){ - select_ipo_key(chan->ipo, selx, sel); - /* Try action constraint selection */ - for (conchan=chan->constraintChannels.first; conchan; conchan=conchan->next) - select_ipo_key(conchan->ipo, selx, sel); - } - - allqueue(REDRAWIPO, 0); - allqueue(REDRAWVIEW3D, 0); - allqueue(REDRAWNLA, 0); - return; + /* Try action ipo selection */ + act=get_nearest_nlachannel_ac_key(&selx, &sel); + if (act){ + if (!(G.qual & LR_SHIFTKEY)){ + deselect_nlachannel_keys(0); + sel = 0; } - /* Try nla strip selection */ - base=get_nearest_nlastrip(&rstrip, &sel); - if (base){ - if (!(G.qual & LR_SHIFTKEY)){ - deselect_nlachannel_keys(0); - sel = 0; - } - - if (sel) - rstrip->flag &= ~ACTSTRIP_SELECT; - else - rstrip->flag |= ACTSTRIP_SELECT; - - allqueue(REDRAWIPO, 0); - allqueue(REDRAWVIEW3D, 0); - allqueue(REDRAWNLA, 0); - return; - + for (chan=act->chanbase.first; chan; chan=chan->next){ + select_ipo_key(chan->ipo, selx, sel); + /* Try action constraint selection */ + for (conchan=chan->constraintChannels.first; conchan; conchan=conchan->next) + select_ipo_key(conchan->ipo, selx, sel); } + allqueue(REDRAWIPO, 0); + allqueue(REDRAWVIEW3D, 0); + allqueue(REDRAWNLA, 0); + return; + } + + /* Try nla strip selection */ + base=get_nearest_nlastrip(&rstrip, &sel); + if (base){ + if (!(G.qual & LR_SHIFTKEY)){ + deselect_nlachannel_keys(0); + sel = 0; + } + + if (sel) + rstrip->flag &= ~ACTSTRIP_SELECT; + else + rstrip->flag |= ACTSTRIP_SELECT; + + allqueue(REDRAWIPO, 0); + allqueue(REDRAWVIEW3D, 0); + allqueue(REDRAWNLA, 0); + return; + } } @@ -1277,64 +1201,60 @@ static Base *get_nearest_nlastrip (bActionStrip **rstrip, short *sel) float ymin, ymax; bActionStrip *strip, *firststrip, *foundstrip; - if (LICENSE_KEY_VALID){ - getmouseco_areawin (mval); - - mval[0]-=7; - areamouseco_to_ipoco(G.v2d, mval, &rectf.xmin, &rectf.ymin); - - mval[0]+=14; - areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax); - - ymax = count_nla_levels(); - ymax*=(NLACHANNELHEIGHT + NLACHANNELSKIP); - - for (base = G.scene->base.first; base; base=base->next){ - if (nla_filter(base, 0)){ - /* Skip object ipos */ - // if (base->object->ipo) - ymax-=(NLACHANNELHEIGHT+NLACHANNELSKIP); + getmouseco_areawin (mval); + + mval[0]-=7; + areamouseco_to_ipoco(G.v2d, mval, &rectf.xmin, &rectf.ymin); + + mval[0]+=14; + areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax); + + ymax = count_nla_levels(); + ymax*=(NLACHANNELHEIGHT + NLACHANNELSKIP); + + for (base = G.scene->base.first; base; base=base->next){ + if (nla_filter(base, 0)){ + /* Skip object ipos */ + // if (base->object->ipo) + ymax-=(NLACHANNELHEIGHT+NLACHANNELSKIP); + + if (base->object->type==OB_ARMATURE){ + /* Skip action ipos */ + if (base->object->action) + ymax-=(NLACHANNELHEIGHT+NLACHANNELSKIP); - if (base->object->type==OB_ARMATURE){ - /* Skip action ipos */ - if (base->object->action) - ymax-=(NLACHANNELHEIGHT+NLACHANNELSKIP); - - for (strip=base->object->nlastrips.first; strip; strip=strip->next){ - ymin=ymax-(NLACHANNELHEIGHT+NLACHANNELSKIP); - /* Do Ytest */ - if (!((ymax < rectf.ymin) || (ymin > rectf.ymax))){ - /* Do XTest */ - if (!((rectf.xmax<strip->start) || (rectf.xmin>strip->end))){ - if (!firstbase){ - firstbase=base; - firststrip=strip; - *sel = strip->flag & ACTSTRIP_SELECT; - } - - if (strip->flag & ACTSTRIP_SELECT){ - if (!foundsel){ - foundsel=1; - foundstrip = strip; - } - } - else if (foundsel && strip != foundstrip){ - *rstrip=strip; - *sel = 0; - return base; + for (strip=base->object->nlastrips.first; strip; strip=strip->next){ + ymin=ymax-(NLACHANNELHEIGHT+NLACHANNELSKIP); + /* Do Ytest */ + if (!((ymax < rectf.ymin) || (ymin > rectf.ymax))){ + /* Do XTest */ + if (!((rectf.xmax<strip->start) || (rectf.xmin>strip->end))){ + if (!firstbase){ + firstbase=base; + firststrip=strip; + *sel = strip->flag & ACTSTRIP_SELECT; + } + + if (strip->flag & ACTSTRIP_SELECT){ + if (!foundsel){ + foundsel=1; + foundstrip = strip; } } + else if (foundsel && strip != foundstrip){ + *rstrip=strip; + *sel = 0; + return base; + } } - ymax=ymin; } + ymax=ymin; } } } - *rstrip=firststrip; - return firstbase; } - else - return NULL; + *rstrip=firststrip; + return firstbase; } static Base *get_nearest_nlachannel_ob_key (float *index, short *sel) @@ -1350,104 +1270,100 @@ static Base *get_nearest_nlachannel_ob_key (float *index, short *sel) float ymin, ymax; rctf rectf; - if (LICENSE_KEY_VALID){ - *index=0; - - getmouseco_areawin (mval); - - mval[0]-=7; - areamouseco_to_ipoco(G.v2d, mval, &rectf.xmin, &rectf.ymin); - - mval[0]+=14; - areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax); - - ymax = count_nla_levels(); - - ymax*=(NLACHANNELHEIGHT + NLACHANNELSKIP); - - *sel=0; - - for (base=G.scene->base.first; base; base=base->next){ - /* Handle object ipo selection */ - if (nla_filter(base, 0)){ - ymin=ymax-(NLACHANNELHEIGHT+NLACHANNELSKIP); - if (base->object->ipo){ - if (!((ymax < rectf.ymin) || (ymin > rectf.ymax))){ - for (icu=base->object->ipo->curve.first; icu; icu=icu->next){ - for (i=0; i<icu->totvert; i++){ - if (icu->bezt[i].vec[1][0] > rectf.xmin && icu->bezt[i].vec[1][0] <= rectf.xmax ){ - if (!firstbase){ - firstbase=base; - firstvert=icu->bezt[i].vec[1][0]; - *sel = icu->bezt[i].f2 & 1; - } - - if (icu->bezt[i].f2 & 1){ - if (!foundsel){ - foundsel=1; - foundx = icu->bezt[i].vec[1][0]; - } - } - else if (foundsel && icu->bezt[i].vec[1][0] != foundx){ - *index=icu->bezt[i].vec[1][0]; - *sel = 0; - return base; + *index=0; + + getmouseco_areawin (mval); + + mval[0]-=7; + areamouseco_to_ipoco(G.v2d, mval, &rectf.xmin, &rectf.ymin); + + mval[0]+=14; + areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax); + + ymax = count_nla_levels(); + + ymax*=(NLACHANNELHEIGHT + NLACHANNELSKIP); + + *sel=0; + + for (base=G.scene->base.first; base; base=base->next){ + /* Handle object ipo selection */ + if (nla_filter(base, 0)){ + ymin=ymax-(NLACHANNELHEIGHT+NLACHANNELSKIP); + if (base->object->ipo){ + if (!((ymax < rectf.ymin) || (ymin > rectf.ymax))){ + for (icu=base->object->ipo->curve.first; icu; icu=icu->next){ + for (i=0; i<icu->totvert; i++){ + if (icu->bezt[i].vec[1][0] > rectf.xmin && icu->bezt[i].vec[1][0] <= rectf.xmax ){ + if (!firstbase){ + firstbase=base; + firstvert=icu->bezt[i].vec[1][0]; + *sel = icu->bezt[i].f2 & 1; + } + + if (icu->bezt[i].f2 & 1){ + if (!foundsel){ + foundsel=1; + foundx = icu->bezt[i].vec[1][0]; } } + else if (foundsel && icu->bezt[i].vec[1][0] != foundx){ + *index=icu->bezt[i].vec[1][0]; + *sel = 0; + return base; + } } } } } - - ymax=ymin; + } + + ymax=ymin; - /* Handle object constraint ipos */ - for (conchan=base->object->constraintChannels.first; conchan; conchan=conchan->next){ - ymin=ymax-(NLACHANNELHEIGHT+NLACHANNELSKIP); - if (!((ymax < rectf.ymin) || (ymin > rectf.ymax))){ - for (icu=conchan->ipo->curve.first; icu; icu=icu->next){ - for (i=0; i<icu->totvert; i++){ - if (icu->bezt[i].vec[1][0] > rectf.xmin && icu->bezt[i].vec[1][0] <= rectf.xmax ){ - if (!firstbase){ - firstbase=base; - firstvert=icu->bezt[i].vec[1][0]; - *sel = icu->bezt[i].f2 & 1; - } - - if (icu->bezt[i].f2 & 1){ - if (!foundsel){ - foundsel=1; - foundx = icu->bezt[i].vec[1][0]; - } - } - else if (foundsel && icu->bezt[i].vec[1][0] != foundx){ - *index=icu->bezt[i].vec[1][0]; - *sel = 0; - return base; + /* Handle object constraint ipos */ + for (conchan=base->object->constraintChannels.first; conchan; conchan=conchan->next){ + ymin=ymax-(NLACHANNELHEIGHT+NLACHANNELSKIP); + if (!((ymax < rectf.ymin) || (ymin > rectf.ymax))){ + for (icu=conchan->ipo->curve.first; icu; icu=icu->next){ + for (i=0; i<icu->totvert; i++){ + if (icu->bezt[i].vec[1][0] > rectf.xmin && icu->bezt[i].vec[1][0] <= rectf.xmax ){ + if (!firstbase){ + firstbase=base; + firstvert=icu->bezt[i].vec[1][0]; + *sel = icu->bezt[i].f2 & 1; + } + + if (icu->bezt[i].f2 & 1){ + if (!foundsel){ + foundsel=1; + foundx = icu->bezt[i].vec[1][0]; } } + else if (foundsel && icu->bezt[i].vec[1][0] != foundx){ + *index=icu->bezt[i].vec[1][0]; + *sel = 0; + return base; + } } } } - ymax=ymin; } + ymax=ymin; + } - /* Skip action ipos */ - if (ACTIVE_ARMATURE(base)){ - ymax-=(NLACHANNELHEIGHT+NLACHANNELSKIP); - } - /* Skip nlastrips */ - if (base->object->type==OB_ARMATURE){ - ymax-=(NLACHANNELHEIGHT+NLACHANNELSKIP)*BLI_countlist(&base->object->nlastrips); - } + /* Skip action ipos */ + if (ACTIVE_ARMATURE(base)){ + ymax-=(NLACHANNELHEIGHT+NLACHANNELSKIP); } - } - - *index=firstvert; - return firstbase; - } - else - return NULL; + /* Skip nlastrips */ + if (base->object->type==OB_ARMATURE){ + ymax-=(NLACHANNELHEIGHT+NLACHANNELSKIP)*BLI_countlist(&base->object->nlastrips); + } + } + } + + *index=firstvert; + return firstbase; } static bAction *get_nearest_nlachannel_ac_key (float *index, short *sel) @@ -1464,108 +1380,104 @@ static bAction *get_nearest_nlachannel_ac_key (float *index, short *sel) bActionChannel *chan; bConstraintChannel *conchan; - if (LICENSE_KEY_VALID){ - *index=0; - - getmouseco_areawin (mval); - - mval[0]-=7; - areamouseco_to_ipoco(G.v2d, mval, &rectf.xmin, &rectf.ymin); - - mval[0]+=14; - areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax); - - ymax = count_nla_levels(); - - ymax*=(NLACHANNELHEIGHT + NLACHANNELSKIP); - - *sel=0; - - for (base=G.scene->base.first; base; base=base->next){ - /* Handle object ipo selection */ - if (nla_filter(base, 0)){ - /* Skip object ipo */ + *index=0; + + getmouseco_areawin (mval); + + mval[0]-=7; + areamouseco_to_ipoco(G.v2d, mval, &rectf.xmin, &rectf.ymin); + + mval[0]+=14; + areamouseco_to_ipoco(G.v2d, mval, &rectf.xmax, &rectf.ymax); + + ymax = count_nla_levels(); + + ymax*=(NLACHANNELHEIGHT + NLACHANNELSKIP); + + *sel=0; + + for (base=G.scene->base.first; base; base=base->next){ + /* Handle object ipo selection */ + if (nla_filter(base, 0)){ + /* Skip object ipo */ + ymin=ymax-(NLACHANNELHEIGHT+NLACHANNELSKIP); + ymax=ymin; + + /* Handle action ipos */ + if (ACTIVE_ARMATURE(base)){ ymin=ymax-(NLACHANNELHEIGHT+NLACHANNELSKIP); - ymax=ymin; - - /* Handle action ipos */ - if (ACTIVE_ARMATURE(base)){ - ymin=ymax-(NLACHANNELHEIGHT+NLACHANNELSKIP); - if (!((ymax < rectf.ymin) || (ymin > rectf.ymax))){ - for (chan=base->object->action->chanbase.first; chan; chan=chan->next){ - for (icu=chan->ipo->curve.first; icu; icu=icu->next){ - for (i=0; i<icu->totvert; i++){ - if (icu->bezt[i].vec[1][0] > rectf.xmin && icu->bezt[i].vec[1][0] <= rectf.xmax ){ - if (!firstact){ - firstact=base->object->action; - firstvert=icu->bezt[i].vec[1][0]; - *sel = icu->bezt[i].f2 & 1; - } - - if (icu->bezt[i].f2 & 1){ - if (!foundsel){ - foundsel=1; - foundx = icu->bezt[i].vec[1][0]; - } - } - else if (foundsel && icu->bezt[i].vec[1][0] != foundx){ - *index=icu->bezt[i].vec[1][0]; - *sel = 0; - return base->object->action; + if (!((ymax < rectf.ymin) || (ymin > rectf.ymax))){ + for (chan=base->object->action->chanbase.first; chan; chan=chan->next){ + for (icu=chan->ipo->curve.first; icu; icu=icu->next){ + for (i=0; i<icu->totvert; i++){ + if (icu->bezt[i].vec[1][0] > rectf.xmin && icu->bezt[i].vec[1][0] <= rectf.xmax ){ + if (!firstact){ + firstact=base->object->action; + firstvert=icu->bezt[i].vec[1][0]; + *sel = icu->bezt[i].f2 & 1; + } + + if (icu->bezt[i].f2 & 1){ + if (!foundsel){ + foundsel=1; + foundx = icu->bezt[i].vec[1][0]; } } + else if (foundsel && icu->bezt[i].vec[1][0] != foundx){ + *index=icu->bezt[i].vec[1][0]; + *sel = 0; + return base->object->action; + } } } - - - for (conchan=chan->constraintChannels.first; conchan; conchan=conchan->next){ - ymin=ymax-(NLACHANNELHEIGHT+NLACHANNELSKIP); - if (!((ymax < rectf.ymin) || (ymin > rectf.ymax))){ - for (icu=conchan->ipo->curve.first; icu; icu=icu->next){ - for (i=0; i<icu->totvert; i++){ - if (icu->bezt[i].vec[1][0] > rectf.xmin && icu->bezt[i].vec[1][0] <= rectf.xmax ){ - if (!firstact){ - firstact=base->object->action; - firstvert=icu->bezt[i].vec[1][0]; - *sel = icu->bezt[i].f2 & 1; - } - - if (icu->bezt[i].f2 & 1){ - if (!foundsel){ - foundsel=1; - foundx = icu->bezt[i].vec[1][0]; - } - } - else if (foundsel && icu->bezt[i].vec[1][0] != foundx){ - *index=icu->bezt[i].vec[1][0]; - *sel = 0; - return base->object->action; + } + + + for (conchan=chan->constraintChannels.first; conchan; conchan=conchan->next){ + ymin=ymax-(NLACHANNELHEIGHT+NLACHANNELSKIP); + if (!((ymax < rectf.ymin) || (ymin > rectf.ymax))){ + for (icu=conchan->ipo->curve.first; icu; icu=icu->next){ + for (i=0; i<icu->totvert; i++){ + if (icu->bezt[i].vec[1][0] > rectf.xmin && icu->bezt[i].vec[1][0] <= rectf.xmax ){ + if (!firstact){ + firstact=base->object->action; + firstvert=icu->bezt[i].vec[1][0]; + *sel = icu->bezt[i].f2 & 1; + } + + if (icu->bezt[i].f2 & 1){ + if (!foundsel){ + foundsel=1; + foundx = icu->bezt[i].vec[1][0]; } } + else if (foundsel && icu->bezt[i].vec[1][0] != foundx){ + *index=icu->bezt[i].vec[1][0]; + *sel = 0; + return base->object->action; + } } } } - ymax=ymin; } - - + ymax=ymin; } - } - ymax=ymin; - } - - /* Skip nlastrips */ - if (base->object->type==OB_ARMATURE){ - ymax-=(NLACHANNELHEIGHT+NLACHANNELSKIP)*BLI_countlist(&base->object->nlastrips); - } + + + } + } + ymax=ymin; } - } - - *index=firstvert; - return firstact; - } - else - return NULL; + + /* Skip nlastrips */ + if (base->object->type==OB_ARMATURE){ + ymax-=(NLACHANNELHEIGHT+NLACHANNELSKIP)*BLI_countlist(&base->object->nlastrips); + } + } + } + + *index=firstvert; + return firstact; } static bActionStrip *get_active_nlastrip(void) @@ -1574,85 +1486,79 @@ static bActionStrip *get_active_nlastrip(void) Base *base; bActionStrip *strip; - if (LICENSE_KEY_VALID){ - for (base=G.scene->base.first; base; base=base->next){ - if (nla_filter(base, 0) && base->object->type==OB_ARMATURE){ - for (strip=base->object->nlastrips.first; strip; strip=strip->next){ - if (strip->flag & ACTSTRIP_SELECT) - return strip; - } + for (base=G.scene->base.first; base; base=base->next){ + if (nla_filter(base, 0) && base->object->type==OB_ARMATURE){ + for (strip=base->object->nlastrips.first; strip; strip=strip->next){ + if (strip->flag & ACTSTRIP_SELECT) + return strip; } } - - return NULL; } - else - return NULL; + + return NULL; } void clever_numbuts_nla(void){ bActionStrip *strip; int but=0; - if (LICENSE_KEY_VALID){ - /* Determine if an nla strip has been selected */ - strip = get_active_nlastrip(); - if (!strip) - return; + /* Determine if an nla strip has been selected */ + strip = get_active_nlastrip(); + if (!strip) + return; + + add_numbut(but++, LABEL, "Timeline Range:", 1.0, 18000.0, 0, 0); + add_numbut(but++, NUM|FLO, "Strip Start:", 1.0, 18000.0, &strip->start, "First frame in the timeline"); + add_numbut(but++, NUM|FLO, "Strip End:", 1.0, 18000.0, &strip->end, "Last frame in the timeline"); + add_numbut(but++, LABEL, "Action Range:", 1.0, 18000.0, 0, 0); + add_numbut(but++, NUM|FLO, "Action Start:", 1.0, 18000.0, &strip->actstart, "First frame of the action to map to the playrange"); + add_numbut(but++, NUM|FLO, "Action End:", 1.0, 18000.0, &strip->actend, "Last frame of the action to map to the playrange"); + add_numbut(but++, LABEL, "Blending:", 1.0, 18000.0, 0, 0); + add_numbut(but++, NUM|FLO, "Blendin:", 0.0, 18000.0, &strip->blendin, "Number of frames of ease-in"); + add_numbut(but++, NUM|FLO, "Blendout:", 0.0, 18000.0, &strip->blendout, "Number of frames of ease-out"); + add_numbut(but++, LABEL, "Options:", 1.0, 18000.0, 0, 0); + add_numbut(but++, NUM|FLO, "Repeat:", 0.0001, 18000.0, &strip->repeat, "Number of times the action should repeat"); + add_numbut(but++, NUM|FLO, "Stride:", 0.0001, 1000.0, &strip->stridelen, "Distance covered by one complete cycle of the action specified in the Action Range"); + { + /* STUPID HACK BECAUSE NUMBUTS ARE BROKEN WITH MULTIPLE TOGGLES */ + short hold= (strip->flag & ACTSTRIP_HOLDLASTFRAME) ? 1 : 0; + short frompath=(strip->flag & ACTSTRIP_USESTRIDE) ? 1 : 0; + + add_numbut(but++, TOG|SHO, "Use Path", 0, 0, &frompath, "Plays action based on position on path & stride length. Only valid for armatures that are parented to a path"); + add_numbut(but++, TOG|SHO, "Hold", 0, 0, &hold, "Toggles whether or not to continue displaying the last frame past the end of the strip"); + add_numbut(but++, TOG|SHO, "Add", 0, 0, &strip->mode, "Toggles additive blending mode"); + + do_clever_numbuts("Action", but, REDRAW); - add_numbut(but++, LABEL, "Timeline Range:", 1.0, 18000.0, 0, 0); - add_numbut(but++, NUM|FLO, "Strip Start:", 1.0, 18000.0, &strip->start, "First frame in the timeline"); - add_numbut(but++, NUM|FLO, "Strip End:", 1.0, 18000.0, &strip->end, "Last frame in the timeline"); - add_numbut(but++, LABEL, "Action Range:", 1.0, 18000.0, 0, 0); - add_numbut(but++, NUM|FLO, "Action Start:", 1.0, 18000.0, &strip->actstart, "First frame of the action to map to the playrange"); - add_numbut(but++, NUM|FLO, "Action End:", 1.0, 18000.0, &strip->actend, "Last frame of the action to map to the playrange"); - add_numbut(but++, LABEL, "Blending:", 1.0, 18000.0, 0, 0); - add_numbut(but++, NUM|FLO, "Blendin:", 0.0, 18000.0, &strip->blendin, "Number of frames of ease-in"); - add_numbut(but++, NUM|FLO, "Blendout:", 0.0, 18000.0, &strip->blendout, "Number of frames of ease-out"); - add_numbut(but++, LABEL, "Options:", 1.0, 18000.0, 0, 0); - add_numbut(but++, NUM|FLO, "Repeat:", 0.0001, 18000.0, &strip->repeat, "Number of times the action should repeat"); - add_numbut(but++, NUM|FLO, "Stride:", 0.0001, 1000.0, &strip->stridelen, "Distance covered by one complete cycle of the action specified in the Action Range"); - { - /* STUPID HACK BECAUSE NUMBUTS ARE BROKEN WITH MULTIPLE TOGGLES */ - short hold= (strip->flag & ACTSTRIP_HOLDLASTFRAME) ? 1 : 0; - short frompath=(strip->flag & ACTSTRIP_USESTRIDE) ? 1 : 0; - - add_numbut(but++, TOG|SHO, "Use Path", 0, 0, &frompath, "Plays action based on position on path & stride length. Only valid for armatures that are parented to a path"); - add_numbut(but++, TOG|SHO, "Hold", 0, 0, &hold, "Toggles whether or not to continue displaying the last frame past the end of the strip"); - add_numbut(but++, TOG|SHO, "Add", 0, 0, &strip->mode, "Toggles additive blending mode"); - - do_clever_numbuts("Action", but, REDRAW); - - /* STUPID HACK BECAUSE NUMBUTS ARE BROKEN WITH MULTIPLE TOGGLES */ - if (hold) strip->flag |= ACTSTRIP_HOLDLASTFRAME; - else strip->flag &= ~ACTSTRIP_HOLDLASTFRAME; + /* STUPID HACK BECAUSE NUMBUTS ARE BROKEN WITH MULTIPLE TOGGLES */ + if (hold) strip->flag |= ACTSTRIP_HOLDLASTFRAME; + else strip->flag &= ~ACTSTRIP_HOLDLASTFRAME; - if (frompath) strip->flag |= ACTSTRIP_USESTRIDE; - else strip->flag &= ~ACTSTRIP_USESTRIDE; - - } + if (frompath) strip->flag |= ACTSTRIP_USESTRIDE; + else strip->flag &= ~ACTSTRIP_USESTRIDE; + + } - if (strip->end<strip->start) - strip->end=strip->start; - + if (strip->end<strip->start) + strip->end=strip->start; - if (strip->blendin>(strip->end-strip->start)) - strip->blendin = strip->end-strip->start; - if (strip->blendout>(strip->end-strip->start)) - strip->blendout = strip->end-strip->start; + if (strip->blendin>(strip->end-strip->start)) + strip->blendin = strip->end-strip->start; - if (strip->blendin > (strip->end-strip->start-strip->blendout)) - strip->blendin = (strip->end-strip->start-strip->blendout); + if (strip->blendout>(strip->end-strip->start)) + strip->blendout = strip->end-strip->start; - if (strip->blendout > (strip->end-strip->start-strip->blendin)) - strip->blendout = (strip->end-strip->start-strip->blendin); - - - update_for_newframe(); - allqueue (REDRAWNLA, 0); - allqueue (REDRAWVIEW3D, 0); - } + if (strip->blendin > (strip->end-strip->start-strip->blendout)) + strip->blendin = (strip->end-strip->start-strip->blendout); + + if (strip->blendout > (strip->end-strip->start-strip->blendin)) + strip->blendout = (strip->end-strip->start-strip->blendin); + + + update_for_newframe(); + allqueue (REDRAWNLA, 0); + allqueue (REDRAWVIEW3D, 0); } static void deselect_nlachannels(int test){ diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c index ab8216a0ce3..4040b1dd5c0 100644 --- a/source/blender/src/editobject.c +++ b/source/blender/src/editobject.c @@ -158,9 +158,6 @@ #include "DNA_armature_types.h" #include "BIF_poseobject.h" - -#include "license_key.h" // For functions behind the key - /* extern Lattice *copy_lattice(Lattice *lt); */ extern ListBase editNurb; extern ListBase editelems; @@ -1456,8 +1453,8 @@ void special_editmenu(void) // Get the active object mesh. Mesh *me= get_mesh(OBACT); - // If the active object is a mesh and license key valid.. - if(me && LICENSE_KEY_VALID) { + // If the active object is a mesh... + if (me) { // Bring up a little menu with the boolean operation choices on. nr= pupmenu("Boolean %t|Intersect%x1|Union%x2|Difference%x3"); diff --git a/source/blender/src/editsca.c b/source/blender/src/editsca.c index 1b515b73762..44429f2a190 100644 --- a/source/blender/src/editsca.c +++ b/source/blender/src/editsca.c @@ -88,9 +88,6 @@ #include "interface.h" #include "nla.h" /* For __NLA : Important, do not remove */ -#include "license_key.h" -extern int LICENSE_KEY_VALID; - #define B_DIFF 1 #define B_ADD_PROP 2701 #define B_CHANGE_PROP 2702 @@ -694,39 +691,20 @@ static char *actuator_name(int type) static char *actuator_pup(Object *owner) { - if (LICENSE_KEY_VALID) - { - switch (owner->type) - { - case OB_ARMATURE: - return "Actuators %t|Action %x15|Motion %x0|Constraint %x9|Ipo %x1" - "|Camera %x3|Sound %x5|Property %x6|Edit Object %x10" - "|Scene %x11|Random %x13|Message %x14|CD %x16|Game %x17" - "|Visibility %x18"; - break; - default: - return "Actuators %t|Motion %x0|Constraint %x9|Ipo %x1" - "|Camera %x3|Sound %x5|Property %x6|Edit Object %x10" - "|Scene %x11|Random %x13|Message %x14|CD %x16|Game %x17" - "|Visibility %x18"; - } - } - else + switch (owner->type) { - switch (owner->type) - { - case OB_ARMATURE: - return "Actuators %t|Action %x15|Motion %x0|Constraint %x9|Ipo %x1" - "|Camera %x3|Sound %x5|Property %x6|Edit Object %x10" - "|Scene %x11|Random %x13|Message %x14|Visibility %x18"; - break; - default: - return "Actuators %t|Motion %x0|Constraint %x9|Ipo %x1" - "|Camera %x3|Sound %x5|Property %x6|Edit Object %x10" - "|Scene %x11|Random %x13|Message %x14|Visibility %x18"; - } + case OB_ARMATURE: + return "Actuators %t|Action %x15|Motion %x0|Constraint %x9|Ipo %x1" + "|Camera %x3|Sound %x5|Property %x6|Edit Object %x10" + "|Scene %x11|Random %x13|Message %x14|CD %x16|Game %x17" + "|Visibility %x18"; + break; + default: + return "Actuators %t|Motion %x0|Constraint %x9|Ipo %x1" + "|Camera %x3|Sound %x5|Property %x6|Edit Object %x10" + "|Scene %x11|Random %x13|Message %x14|CD %x16|Game %x17" + "|Visibility %x18"; } - } diff --git a/source/blender/src/editscreen.c b/source/blender/src/editscreen.c index f0b476e326a..1c4a4676041 100644 --- a/source/blender/src/editscreen.c +++ b/source/blender/src/editscreen.c @@ -96,7 +96,6 @@ #include "BSE_headerbuttons.h" #include "BSE_view.h" -#include "license_key.h" #include "interface.h" #include "mydevice.h" #include "blendef.h" @@ -1076,15 +1075,8 @@ void screenmain(void) if (! ((G.main->versionfile >= G.version) || G.save_over)) { - if (LICENSE_KEY_VALID) { - splash((void *)datatoc_ton, - datatoc_tonize, - NULL); - } else { - splash((void *)datatoc_splash_jpg, - datatoc_splash_jpg_size, - NULL); - } + splash((void *)datatoc_ton, + datatoc_tonize, NULL); } } firsttime = 0; diff --git a/source/blender/src/editsound.c b/source/blender/src/editsound.c index 219c52010c4..d4cc52bcb8f 100644 --- a/source/blender/src/editsound.c +++ b/source/blender/src/editsound.c @@ -81,10 +81,6 @@ #include "SYS_System.h" -#include "license_key.h" - -extern int LICENSE_KEY_VALID; - /* this might move to the external header */ void* sound_get_libraryinterface(void); @@ -471,37 +467,32 @@ int sound_get_filetype_from_header(bSound* sound, PackedFile* pf) #ifdef USE_FMOD { /* and only valid publishers may use compressed wav */ - if (LICENSE_KEY_VALID) + switch (shortbuf) { - switch (shortbuf) - { - case SND_WAVE_FORMAT_ADPCM: - case SND_WAVE_FORMAT_ALAW: - case SND_WAVE_FORMAT_MULAW: - case SND_WAVE_FORMAT_DIALOGIC_OKI_ADPCM: - case SND_WAVE_FORMAT_CONTROL_RES_VQLPC: - case SND_WAVE_FORMAT_GSM_610: - case SND_WAVE_FORMAT_MPEG3: - filetype = SAMPLE_WAV; - break; - default: + case SND_WAVE_FORMAT_ADPCM: + case SND_WAVE_FORMAT_ALAW: + case SND_WAVE_FORMAT_MULAW: + case SND_WAVE_FORMAT_DIALOGIC_OKI_ADPCM: + case SND_WAVE_FORMAT_CONTROL_RES_VQLPC: + case SND_WAVE_FORMAT_GSM_610: + case SND_WAVE_FORMAT_MPEG3: + filetype = SAMPLE_WAV; + break; + default: #endif - { - filetype = SAMPLE_INVALID; - if (G.f & G_DEBUG) printf("Unsupported wav compression\n"); - } + { + filetype = SAMPLE_INVALID; + if (G.f & G_DEBUG) printf("Unsupported wav compression\n"); } -#ifdef USE_FMOD } +#ifdef USE_FMOD } } - /* only valid publishers may use ogg vorbis */ - else if (!memcmp(buffer, "OggS", 4) && LICENSE_KEY_VALID) + else if (!memcmp(buffer, "OggS", 4)) { filetype = SAMPLE_OGG_VORBIS; } - /* only valid publishers may use mp3 */ - else if (((!memcmp(buffer, "ID3", 3)) || (!memcmp(buffer, "ÿû", 2))) && LICENSE_KEY_VALID) + else if ((!memcmp(buffer, "ID3", 3)) || (!memcmp(buffer, "ÿû", 2))) { filetype = SAMPLE_MP3; } diff --git a/source/blender/src/headerbuttons.c b/source/blender/src/headerbuttons.c index 02077d21664..74b01bef6d8 100644 --- a/source/blender/src/headerbuttons.c +++ b/source/blender/src/headerbuttons.c @@ -174,11 +174,6 @@ #include "TPT_DependKludge.h" -/* these are needed to hide functions behind function tables, - which are initialized by the python key code */ -#include "keyed_functions.h" -#include "license_key.h" - /* local (?) functions */ void do_file_buttons(short event); void do_text_buttons(unsigned short event); @@ -206,7 +201,6 @@ static void test_idbutton_cb(void *namev, void *arg2_unused) #include "SYS_System.h" -#include "license_key.h" static int std_libbuttons(uiBlock *block, int xco, int pin, short *pinpoin, int browse, ID *id, ID *parid, @@ -1292,11 +1286,7 @@ void do_global_buttons(unsigned short event) SYS_WriteCommandLineInt(SYS_GetSystem(), "noaudio", (U.gameflags & USERDEF_DISABLE_SOUND)); break; case B_SHOWSPLASH: - if ((LICENSE_KEY_VALID) && ((G.qual & LR_SHIFTKEY) == 0)) { - SHOW_LICENSE_KEY(); - } else { - show_splash(); - } + show_splash(); break; case B_MIPMAPCHANGED: set_mipmap(!(U.gameflags & USERDEF_DISABLE_SOUND)); @@ -2145,27 +2135,27 @@ int make_beautiful_animation(void *vp) return 0; } +/* int make_nice_software(void) { Fptr f = KEY_RETURN_TRUE; if (f) return f(0); else return 0; } +*/ static void write_runtime_check_dynamic(char *str) { - Fptr f = KEY_WRITE_RUNTIME; struct twostrings twostrings; twostrings.outname = str; twostrings.exename = "blenderdynplayer.exe"; - if (f) f((void *) &twostrings); + make_beautiful_animation((void *) &twostrings); } static void write_runtime_check(char *str) { - Fptr f = KEY_WRITE_RUNTIME; struct twostrings twostrings; char player[128]; @@ -2182,7 +2172,7 @@ static void write_runtime_check(char *str) strcat(player, ".app"); #endif - if (f) f((void *) &twostrings); + make_beautiful_animation((void *) &twostrings); } /* end keyed functions */ @@ -2247,6 +2237,7 @@ static void do_info_filemenu(void *arg, int event) case 9: write_videoscape_fs(); break; +/* case 20: strcpy(dir, G.sce); activate_fileselect(FILE_SPECIAL, "INSTALL LICENSE KEY", dir, loadKeyboard); @@ -2254,6 +2245,7 @@ static void do_info_filemenu(void *arg, int event) case 21: SHOW_LICENSE_KEY(); break; +*/ case 22: activate_fileselect(FILE_SPECIAL, "WRITE RUNTIME", "", write_runtime_check); break; @@ -2307,9 +2299,10 @@ static uiBlock *info_file_optionsmenu(void *arg_unused) /* flags are case-values */ uiDefBut(block, BUTM, 1, "Compress File", xco, yco-=20, 100, 19, NULL, 0.0, 0.0, 0, G_FILE_COMPRESS_BIT, "Use file compression"); +/* uiDefBut(block, BUTM, 1, "Sign File", xco, yco-=20, 100, 19, NULL, 0.0, 0.0, 0, G_FILE_SIGN_BIT, "Add signature to file"); uiDefBut(block, BUTM, 1, "Lock File", xco, yco-=20, 100, 19, NULL, 0.0, 0.0, 0, G_FILE_LOCK_BIT, "Protect the file from editing by others"); - +*/ /* Toggle buttons */ yco= 0; @@ -2318,9 +2311,10 @@ static uiBlock *info_file_optionsmenu(void *arg_unused) uiBlockSetButmFunc(block, NULL, NULL); /* flags are defines */ uiDefIconButI(block, ICONTOG|BIT|G_FILE_COMPRESS_BIT, 0, ICON_CHECKBOX_DEHLT, xco, yco-=20, 19, 19, &G.fileflags, 0.0, 0.0, 0, 0, ""); +/* uiDefIconButI(block, ICONTOG|BIT|G_FILE_SIGN_BIT, 0, ICON_CHECKBOX_DEHLT, xco, yco-=20, 19, 19, &G.fileflags, 0.0, 0.0, 0, 0, ""); uiDefIconButI(block, ICONTOG|BIT|G_FILE_LOCK_BIT, 0, ICON_CHECKBOX_DEHLT, xco, yco-=20, 19, 19, &G.fileflags, 0.0, 0.0, 0, 0, ""); - +*/ uiBlockSetDirection(block, UI_RIGHT); return block; @@ -2410,17 +2404,15 @@ static uiBlock *info_filemenu(void *arg_unused) uiDefBut(block, BUTM, 1, "Save As|F2", 0, xco-=20, 160, 19, NULL, 0.0, 0.0, 1, 4, "Save to a new file"); uiDefBut(block, BUTM, 1, "Save|Ctrl W", 0, xco-=20, 160, 19, NULL, 0.0, 0.0, 1, 5, "Save to the current file"); - if (LICENSE_KEY_VALID && make_nice_software()) { - uiDefBlockBut(block, info_file_optionsmenu, NULL, "File options|>>", 0, xco-=20, 160, 19, "Click to open the File Options menu"); + uiDefBlockBut(block, info_file_optionsmenu, NULL, "File options|>>", 0, xco-=20, 160, 19, "Click to open the File Options menu"); - uiDefBut(block, SEPR, 0, "", 0, xco-=6, 160, 6, NULL, 0.0, 0.0, 0, 0, ""); + uiDefBut(block, SEPR, 0, "", 0, xco-=6, 160, 6, NULL, 0.0, 0.0, 0, 0, ""); - uiDefBut(block, BUTM, 1, "Save Runtime", 0, xco-=20, 160, 19, NULL, 0.0, 0.0, 1, 22, "Create a runtime executable with the current project"); + uiDefBut(block, BUTM, 1, "Save Runtime", 0, xco-=20, 160, 19, NULL, 0.0, 0.0, 1, 22, "Create a runtime executable with the current project"); #ifdef _WIN32 - uiDefBut(block, BUTM, 1, "Save dynamic Runtime", 0, xco-=20, 160, 19, NULL, 0.0, 0.0, 1, 23, "Create a dynamic runtime executable with the current project (requieres extenal python20.dll)"); + uiDefBut(block, BUTM, 1, "Save dynamic Runtime", 0, xco-=20, 160, 19, NULL, 0.0, 0.0, 1, 23, "Create a dynamic runtime executable with the current project (requieres extenal python20.dll)"); #endif - uiDefBlockBut(block, info_runtime_optionsmenu, NULL, "Runtime options|>>", 0, xco-=20, 160, 19, "Click to open the File Options menu"); - } + uiDefBlockBut(block, info_runtime_optionsmenu, NULL, "Runtime options|>>", 0, xco-=20, 160, 19, "Click to open the File Options menu"); uiDefBut(block, SEPR, 0, "", 0, xco-=6, 160, 6, NULL, 0.0, 0.0, 0, 0, ""); uiDefBut(block, BUTM, 1, "Save Image|F3", 0, xco-=20, 160, 19, NULL, 0.0, 0.0, 1, 6, "Save the image in the render buffer to a file"); @@ -2429,6 +2421,7 @@ static uiBlock *info_filemenu(void *arg_unused) uiDefBut(block, BUTM, 1, "Save VideoScape|Alt W", 0, xco-=20, 160, 19, NULL, 0.0, 0.0, 1, 9, "Save the current scene to a file in VideoScape format"); + /* if (LICENSE_KEY_VALID) { uiDefBut(block, SEPR, 0, "", 0, xco-=6, 160, 6, NULL, 0.0, 0.0, 1, 0, ""); uiDefBut(block, BUTM, 1, "Show License Key", 0, xco-=20, 140, 19, NULL, 0.0, 0.0, 1, 21, "Show the personal information stored in your Blender License Key"); @@ -2438,6 +2431,7 @@ static uiBlock *info_filemenu(void *arg_unused) uiDefBut(block, BUTM, 1, "Install License Key", 0, xco-=20, 140, 19, NULL, 0.0, 0.0, 1, 20, "Install your Blender License Key"); uiDefIconBut(block, BUTM, 1, ICON_PUBLISHER, 141,xco, 19, 19, NULL, 0.0, 0.0, 1, 20, "Install your Blender License Key"); } + */ uiDefBut(block, SEPR, 0, "", 0, xco-=6, 160, 6, NULL, 0.0, 0.0, 1, 0, ""); @@ -3202,11 +3196,9 @@ void info_buttons(void) uiDefIconBut(block, BUT, B_SHOWSPLASH, ICON_BLENDER, xco+1, 0,XIC,YIC, 0, 0, 0, 0, 0, ""); uiBlockSetEmboss(block, UI_EMBOSSX); - if (LICENSE_KEY_VALID) { - uiBlockSetEmboss(block, UI_EMBOSSN); - uiDefIconBut(block, LABEL, 0, ICON_PUBLISHER, xco+125, 0,XIC,YIC, 0, 0, 0, 0, 0, ""); - uiBlockSetEmboss(block, UI_EMBOSSX); - } + uiBlockSetEmboss(block, UI_EMBOSSN); + uiDefIconBut(block, LABEL, 0, ICON_PUBLISHER, xco+125, 0,XIC,YIC, 0, 0, 0, 0, 0, ""); + uiBlockSetEmboss(block, UI_EMBOSSX); /* altijd als laatste doen */ curarea->headbutlen= xco+2*XIC; diff --git a/source/blender/src/pub/license_key.c b/source/blender/src/pub/license_key.c index 44ad7514515..de8caee1b01 100644 --- a/source/blender/src/pub/license_key.c +++ b/source/blender/src/pub/license_key.c @@ -48,7 +48,7 @@ #include <config.h> #endif -int LICENSE_KEY_VALID = FALSE; +int LICENSE_KEY_VALID = TRUE; int I_AM_PUBLISHER = TRUE; static UserStruct User; @@ -330,8 +330,6 @@ void checkhome() // other initialization code - // enable png writing in the ImBuf library - IMB_fp_png_encode = IMB_png_encode; } } diff --git a/source/blender/src/toets.c b/source/blender/src/toets.c index c442060fb84..4eee6bd8e3e 100644 --- a/source/blender/src/toets.c +++ b/source/blender/src/toets.c @@ -98,7 +98,6 @@ #include "IMB_imbuf_types.h" #include "mydevice.h" -#include "license_key.h" #include "BIF_poseobject.h" @@ -189,7 +188,7 @@ void schrijfplaatje(char *name) else printf("no zbuf\n"); } } - else if((R.r.imtype==R_PNG) && (LICENSE_KEY_VALID)) { + else if(R.r.imtype==R_PNG) { ibuf->ftype= PNG; } else if((R.r.imtype==R_TARGA) || (R.r.imtype==R_PNG)) { @@ -454,9 +453,7 @@ int save_image_filesel_str(char *str) { switch(G.scene->r.imtype) { case R_PNG: - if (LICENSE_KEY_VALID) { - strcpy(str, "SAVE PNG"); return 1; - } + strcpy(str, "SAVE PNG"); return 1; case R_TARGA: strcpy(str, "SAVE TARGA"); return 1; case R_RAWTGA: diff --git a/source/blender/src/usiblender.c b/source/blender/src/usiblender.c index 40ee8ac1a6c..8c44ddc126c 100644 --- a/source/blender/src/usiblender.c +++ b/source/blender/src/usiblender.c @@ -109,7 +109,6 @@ #include "interface.h" #include "radio.h" #include "render.h" -#include "license_key.h" #include "datatoc.h" #include "SYS_System.h" @@ -138,11 +137,7 @@ void BIF_read_file(char *name) info = BLO_getSignerInfo(); if (BLO_isValidSignerInfo(info)) { sprintf(infostring, "File signed by: %s // %s", info->name, info->email); - if (LICENSE_KEY_VALID) { - splash((void *)datatoc_ton, datatoc_tonize, infostring); - } else { - splash((void *)datatoc_splash_jpg, datatoc_splash_jpg_size, infostring); - } + splash((void *)datatoc_ton, datatoc_tonize, infostring); } BLO_clrSignerInfo(info); @@ -451,7 +446,7 @@ void BIF_init(void) init_draw_rects(); /* drawobject.c */ init_gl_stuff(); /* drawview.c */ - if (I_AM_PUBLISHER) checkhome(); + /* if (I_AM_PUBLISHER) checkhome(); */ BIF_read_homefile(); diff --git a/source/blender/src/writeimage.c b/source/blender/src/writeimage.c index b2c224c2f3a..42ac7ae8e45 100644 --- a/source/blender/src/writeimage.c +++ b/source/blender/src/writeimage.c @@ -36,7 +36,6 @@ #include "DNA_texture_types.h" // EnvMap{} #include "DNA_image_types.h" // Image{} #include "render.h" -#include "license_key.h" // LICENSE_KEY_VALID #include "BKE_utildefines.h" // ELEM #include "BIF_writeimage.h" @@ -51,7 +50,7 @@ int BIF_write_ibuf(ImBuf *ibuf, char *name) /* to be used for e.g. envmap, not rendered images */ if(R.r.imtype== R_IRIS) ibuf->ftype= IMAGIC; - else if ((R.r.imtype==R_PNG) && (LICENSE_KEY_VALID)) { + else if ((R.r.imtype==R_PNG)) { ibuf->ftype= PNG; } else if ((R.r.imtype==R_TARGA) || (R.r.imtype==R_PNG)) { diff --git a/source/creator/creator.c b/source/creator/creator.c index 9abf046b6cf..880f07ff8c1 100644 --- a/source/creator/creator.c +++ b/source/creator/creator.c @@ -84,8 +84,6 @@ #include "render.h" #include "nla.h" -#include "license_key.h" - /* for passing information between creator and gameengine */ #include "SYS_System.h" |