LAST of the c code comment translations... hooray!
Might be possible I mised an .h or so, just notify me in that case.
This commit is contained in:
parent
53999bd80b
commit
9174db096b
@ -3,8 +3,8 @@
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Contact: blender@blender.nl
|
||||
* Information: http://www.blender.nl
|
||||
* Contact: info@blender.org
|
||||
* Information: http://www.blender.org
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
@ -3,8 +3,8 @@
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Contact: blender@blender.nl
|
||||
* Information: http://www.blender.nl
|
||||
* Contact: info@blender.org
|
||||
* Information: http://www.blender.org
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
@ -3,8 +3,8 @@
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Contact: blender@blender.nl
|
||||
* Information: http://www.blender.nl
|
||||
* Contact: info@blender.org
|
||||
* Information: http://www.blender.org
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
@ -3,8 +3,8 @@
|
||||
*
|
||||
* All rights reserved.
|
||||
*
|
||||
* Contact: blender@blender.nl
|
||||
* Information: http://www.blender.nl
|
||||
* Contact: info@blender.org
|
||||
* Information: http://www.blender.org
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
|
@ -47,9 +47,7 @@
|
||||
* change to a function. - zr
|
||||
*/
|
||||
|
||||
/* Mij afspraak is cpack een getal dat als 0xFFaa66 of zo kan worden
|
||||
* uitgedrukt. Is dus gevoelig voor endian. Met deze define wordt het
|
||||
* altijd goed afgebeeld
|
||||
/*
|
||||
*
|
||||
* This define converts a numerical value to the equivalent 24-bit
|
||||
* colour, while not being endian-sensitive. On little-endians, this
|
||||
|
@ -30,13 +30,13 @@
|
||||
* ***** END GPL/BL DUAL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
/* TBOXX: breedte in pixels */
|
||||
/* TBOXX: width in pixels */
|
||||
#define TBOXXL 80
|
||||
#define TBOXXR 170
|
||||
#define TBOXX (TBOXXL+TBOXXR)
|
||||
/* TBOXEL: aantal elementen onder elkaar */
|
||||
/* TBOXEL: amount of element vertically */
|
||||
#define TBOXEL 14
|
||||
/* TBOXH: hoogte van 1 element */
|
||||
/* TBOXH: height of 1 element */
|
||||
#define TBOXH 20
|
||||
#define TBOXY TBOXH*TBOXEL
|
||||
|
||||
|
@ -42,12 +42,12 @@
|
||||
#define MAXFLOAT ((float)3.40282347e+38)
|
||||
#endif
|
||||
|
||||
#include <float.h> /* deze moet een keer naar de blender.h */
|
||||
#include <float.h>
|
||||
|
||||
|
||||
|
||||
|
||||
/* **************** ALGEMEEN ********************* */
|
||||
/* **************** GENERAL ********************* */
|
||||
|
||||
#define VECCOPY(v1,v2) {*(v1)= *(v2); *(v1+1)= *(v2+1); *(v1+2)= *(v2+2);}
|
||||
#define QUATCOPY(v1,v2) {*(v1)= *(v2); *(v1+1)= *(v2+1); *(v1+2)= *(v2+2); *(v1+3)= *(v2+3);}
|
||||
@ -134,7 +134,7 @@
|
||||
#define FNT_HAEBERLI 2
|
||||
|
||||
|
||||
/* isect en scanfill */
|
||||
/* isect and scanfill */
|
||||
#define COMPLIMIT 0.0003
|
||||
|
||||
|
||||
@ -142,7 +142,7 @@
|
||||
|
||||
|
||||
#define MAXLAMP 256
|
||||
/* max lengte material array, 16 vanwege bitjes in matfrom */
|
||||
/* max length material array, 16 because of bits in matfrom */
|
||||
#define MAXPICKBUF 2000
|
||||
#define MAXSEQ 32
|
||||
/* in Image struct */
|
||||
@ -182,7 +182,7 @@
|
||||
#define B_TEXALONE 47
|
||||
#define B_MESHALONE 48
|
||||
#define B_CURVEALONE 49
|
||||
/* EVENT < 50: alone's en locals */
|
||||
/* EVENT < 50: alones en locals */
|
||||
|
||||
#define B_KEEPDATA 60
|
||||
#define B_CONSOLETOG 61
|
||||
@ -226,7 +226,7 @@
|
||||
/* VIEW3D: 100 */
|
||||
#define B_HOME 101
|
||||
#define B_LAY 102
|
||||
/* pasop: codes 102-132 in gebuik voor layers */
|
||||
/* watch: codes 102-132 in in use for layers */
|
||||
#define B_AUTOKEY 139
|
||||
#define B_SCENELOCK 140
|
||||
#define B_LOCALVIEW 141
|
||||
@ -266,7 +266,7 @@
|
||||
#define B_NEWOOPS 253
|
||||
|
||||
/* INFO: 300 */
|
||||
/* pas op: ook in filesel.c en editobject.c */
|
||||
/* watch: also in filesel.c and editobject.c */
|
||||
#define B_INFOSCR 301
|
||||
#define B_INFODELSCR 302
|
||||
#define B_INFOSCE 304
|
||||
@ -318,7 +318,7 @@
|
||||
#define B_MESHTYPE 405
|
||||
|
||||
/* IMASEL: 450 */
|
||||
/* in de imasel.h */
|
||||
/* in imasel.h */
|
||||
|
||||
/* TEXT: 500 */
|
||||
#define B_TEXTBROWSE 501
|
||||
|
@ -91,7 +91,7 @@
|
||||
|
||||
#include "blendef.h"
|
||||
#include "mydevice.h"
|
||||
#include "interface.h" /* MAART: for button types, pupmenu */
|
||||
#include "interface.h" /* for button types, pupmenu */
|
||||
|
||||
Sequence *last_seq=0;
|
||||
char last_imagename[80]= "/";
|
||||
@ -103,7 +103,7 @@ char last_imagename[80]= "/";
|
||||
static int test_overlap_seq(Sequence *);
|
||||
static void shuffle_seq(Sequence *);
|
||||
|
||||
static void change_plugin_seq(char *str) /* aangeroepen vanuit fileselect */
|
||||
static void change_plugin_seq(char *str) /* called from fileselect */
|
||||
{
|
||||
/* extern Sequence *last_seq; already done few lines before !!!*/
|
||||
|
||||
@ -171,7 +171,7 @@ Sequence *find_nearest_seq(int *hand)
|
||||
|
||||
if(seq->type < SEQ_EFFECT) {
|
||||
if( seq->handsize+seq->startdisp >=x ) {
|
||||
/* binnen de driehoek? */
|
||||
/* within triangle? */
|
||||
facx= (x-seq->startdisp)/seq->handsize;
|
||||
if( (y - (int)y) <0.5) {
|
||||
facy= (y - 0.2 - (int)y)/0.3;
|
||||
@ -184,7 +184,7 @@ Sequence *find_nearest_seq(int *hand)
|
||||
|
||||
}
|
||||
else if( -seq->handsize+seq->enddisp <=x ) {
|
||||
/* binnen de driehoek? */
|
||||
/* within triangle? */
|
||||
facx= 1.0 - (seq->enddisp-x)/seq->handsize;
|
||||
if( (y - (int)y) <0.5) {
|
||||
facy= (y - 0.2 - (int)y)/0.3;
|
||||
@ -207,7 +207,7 @@ Sequence *find_nearest_seq(int *hand)
|
||||
|
||||
void clear_last_seq(void)
|
||||
{
|
||||
/* vanuit (bijv) ipo: als ie veranderd is, ook meteen de effecten metzelfde ipo */
|
||||
/* from (example) ipo: when it is changed, also do effects with same ipo */
|
||||
Sequence *seq;
|
||||
Editing *ed;
|
||||
StripElem *se;
|
||||
@ -554,15 +554,15 @@ static void add_image_strips(char *name)
|
||||
|
||||
deselect_all_seq();
|
||||
|
||||
/* is voor restore windowmatrices */
|
||||
/* restore windowmatrices */
|
||||
areawinset(curarea->win);
|
||||
drawseqspace(curarea, curarea->spacedata.first);
|
||||
|
||||
/* sfile zoeken */
|
||||
/* search sfile */
|
||||
sfile= scrarea_find_space_of_type(curarea, SPACE_FILE);
|
||||
if(sfile==0) return;
|
||||
|
||||
/* waar komen ze */
|
||||
/* where will it be */
|
||||
getmouseco_areawin(mval);
|
||||
areamouseco_to_ipoco(G.v2d, mval, &x, &y);
|
||||
cfra= (int)(x+0.5);
|
||||
@ -570,7 +570,7 @@ static void add_image_strips(char *name)
|
||||
|
||||
waitcursor(1);
|
||||
|
||||
/* ook inhoud van geselecteerde directories lezen */
|
||||
/* also read contents of directories */
|
||||
files= sfile->filelist;
|
||||
totfile= sfile->totfile;
|
||||
sfile->filelist= 0;
|
||||
@ -583,7 +583,7 @@ static void add_image_strips(char *name)
|
||||
strcat(sfile->dir,"/");
|
||||
read_dir(sfile);
|
||||
|
||||
/* selecteer alles */
|
||||
/* select all */
|
||||
swapselect_file(sfile);
|
||||
|
||||
if ( sfile_to_sequence(sfile, cfra, machine, 0) ) machine++;
|
||||
@ -596,7 +596,7 @@ static void add_image_strips(char *name)
|
||||
sfile->filelist= files;
|
||||
sfile->totfile= totfile;
|
||||
|
||||
/* directory zelf lezen */
|
||||
/* read directory itself */
|
||||
sfile_to_sequence(sfile, cfra, machine, 1);
|
||||
|
||||
waitcursor(0);
|
||||
@ -614,15 +614,15 @@ static void add_movie_strip(char *name)
|
||||
|
||||
deselect_all_seq();
|
||||
|
||||
/* is voor restore windowmatrices */
|
||||
/* restore windowmatrices */
|
||||
areawinset(curarea->win);
|
||||
drawseqspace(curarea, curarea->spacedata.first);
|
||||
|
||||
/* sfile zoeken */
|
||||
/* search sfile */
|
||||
sfile= scrarea_find_space_of_type(curarea, SPACE_FILE);
|
||||
if(sfile==0) return;
|
||||
|
||||
/* waar komen ze */
|
||||
/* where will it be */
|
||||
getmouseco_areawin(mval);
|
||||
areamouseco_to_ipoco(G.v2d, mval, &x, &y);
|
||||
cfra= (int)(x+0.5);
|
||||
@ -630,7 +630,7 @@ static void add_movie_strip(char *name)
|
||||
|
||||
waitcursor(1);
|
||||
|
||||
/* directory zelf lezen */
|
||||
/* read directory itself */
|
||||
sfile_to_mv_sequence(sfile, cfra, machine);
|
||||
|
||||
waitcursor(0);
|
||||
@ -648,9 +648,9 @@ static void reload_image_strip(char *name)
|
||||
ed= G.scene->ed;
|
||||
|
||||
if(last_seq==0 || last_seq->type!=SEQ_IMAGE) return;
|
||||
seqact= last_seq; /* last_seq verandert in alloc_sequence */
|
||||
seqact= last_seq; /* last_seq changes in alloc_sequence */
|
||||
|
||||
/* sfile zoeken */
|
||||
/* search sfile */
|
||||
sfile= scrarea_find_space_of_type(curarea, SPACE_FILE);
|
||||
if(sfile==0) return;
|
||||
|
||||
@ -712,9 +712,9 @@ static int add_seq_effect(int type)
|
||||
if(G.scene->ed==0) return 0;
|
||||
ed= G.scene->ed;
|
||||
|
||||
/* behalve de last_seq moet er nog een of twee geselecteerde seq zijn */
|
||||
/* apart from last_seq there have to be 2 selected sequences */
|
||||
seq1= seq3= 0;
|
||||
seq2= last_seq; /* last_seq verandert bij alloc_seq! */
|
||||
seq2= last_seq; /* last_seq changes with alloc_seq! */
|
||||
seq= ed->seqbasep->first;
|
||||
while(seq) {
|
||||
if(seq->flag & SELECT) {
|
||||
@ -730,7 +730,7 @@ static int add_seq_effect(int type)
|
||||
seq= seq->next;
|
||||
}
|
||||
|
||||
if(type==10) { /* plugin: minimaal 1 select */
|
||||
if(type==10) { /* plugin: minimal 1 select */
|
||||
if(seq2==0) {
|
||||
error("Need minimum one active sequence");
|
||||
return 0;
|
||||
@ -748,7 +748,7 @@ static int add_seq_effect(int type)
|
||||
|
||||
deselect_all_seq();
|
||||
|
||||
/* waar komt ie (cfra is eigenlijk niet nodig) */
|
||||
/* where will it be (cfra is not realy needed) */
|
||||
getmouseco_areawin(mval);
|
||||
areamouseco_to_ipoco(G.v2d, mval, &x, &y);
|
||||
cfra= (int)(x+0.5);
|
||||
@ -777,12 +777,11 @@ static int add_seq_effect(int type)
|
||||
return 1;
|
||||
}
|
||||
|
||||
static void load_plugin_seq(char *str) /* aangeroepen vanuit fileselect */
|
||||
static void load_plugin_seq(char *str) /* called from fileselect */
|
||||
{
|
||||
/* extern Sequence *last_seq; already present in this file... */
|
||||
Editing *ed;
|
||||
|
||||
add_seq_effect(10); /* deze zet last_seq */
|
||||
add_seq_effect(10); /* this sets last_seq */
|
||||
|
||||
free_plugin_seq(last_seq->plugin);
|
||||
|
||||
@ -833,7 +832,7 @@ void add_sequence(int type)
|
||||
activate_fileselect(FILE_SPECIAL, "SELECT MOVIE", last_imagename, add_movie_strip);
|
||||
break;
|
||||
case 101:
|
||||
/* nieuwe menu: */
|
||||
/* new menu: */
|
||||
IDnames_to_pupstring(&str, NULL, NULL, &G.main->scene, (ID *)G.scene, &nr);
|
||||
|
||||
event= pupmenu(str);
|
||||
@ -850,7 +849,7 @@ void add_sequence(int type)
|
||||
|
||||
deselect_all_seq();
|
||||
|
||||
/* waar komt ie ? */
|
||||
/* where ? */
|
||||
getmouseco_areawin(mval);
|
||||
areamouseco_to_ipoco(G.v2d, mval, &x, &y);
|
||||
cfra= (int)(x+0.5);
|
||||
@ -914,9 +913,9 @@ void change_sequence(void)
|
||||
else if(event==11) {
|
||||
activate_fileselect(FILE_SPECIAL, "SELECT PLUGIN", U.plugseqdir, change_plugin_seq);
|
||||
}
|
||||
else if(event==12); /* recalculate: alleen new_stripdata */
|
||||
else if(event==12); /* recalculate: only new_stripdata */
|
||||
else {
|
||||
/* voor zekerheid plugin vrijgeven */
|
||||
/* to be sure, free plugin */
|
||||
free_plugin_seq(last_seq->plugin);
|
||||
last_seq->plugin= 0;
|
||||
last_seq->type= event_to_efftype(event);
|
||||
@ -999,7 +998,7 @@ void del_seq(void)
|
||||
|
||||
recurs_del_seq(ed->seqbasep);
|
||||
|
||||
/* effecten testen */
|
||||
/* test effects */
|
||||
doit= 1;
|
||||
while(doit) {
|
||||
doit= 0;
|
||||
@ -1018,17 +1017,17 @@ void del_seq(void)
|
||||
}
|
||||
}
|
||||
|
||||
/* lengtes en zo updaten */
|
||||
/* updates lengths etc */
|
||||
seq= ed->seqbasep->first;
|
||||
while(seq) {
|
||||
calc_sequence(seq);
|
||||
seq= seq->next;
|
||||
}
|
||||
|
||||
/* parent meta's vrijgeven */
|
||||
/* free parent metas */
|
||||
ms= ed->metastack.last;
|
||||
while(ms) {
|
||||
ms->parseq->strip->len= 0; /* forceer nieuwe alloc */
|
||||
ms->parseq->strip->len= 0; /* force new alloc */
|
||||
calc_sequence(ms->parseq);
|
||||
ms= ms->prev;
|
||||
}
|
||||
@ -1088,7 +1087,7 @@ static void recurs_dupli_seq(ListBase *old, ListBase *new)
|
||||
|
||||
if(seqn->len>0) {
|
||||
seqn->strip->stripdata= MEM_callocN(seq->len*sizeof(StripElem), "stripelem");
|
||||
/* kopie eerste elem */
|
||||
/* copy first elem */
|
||||
*seqn->strip->stripdata= *seq->strip->stripdata;
|
||||
se= seqn->strip->stripdata;
|
||||
a= seq->len;
|
||||
@ -1165,7 +1164,7 @@ int insert_gap(int gap, int cfra)
|
||||
Editing *ed;
|
||||
int done=0;
|
||||
|
||||
/* alle strips >= cfra opschuiven */
|
||||
/* all strips >= cfra are shifted */
|
||||
ed= G.scene->ed;
|
||||
if(ed==0) return 0;
|
||||
|
||||
@ -1185,10 +1184,9 @@ void touch_seq_files(void)
|
||||
{
|
||||
Sequence *seq;
|
||||
Editing *ed;
|
||||
/* int done=0; */
|
||||
char str[256];
|
||||
|
||||
/* alle strips movies touchen */
|
||||
/* touch all strips with movies */
|
||||
ed= G.scene->ed;
|
||||
if(ed==0) return;
|
||||
|
||||
@ -1216,7 +1214,6 @@ void set_filter_seq(void)
|
||||
{
|
||||
Sequence *seq;
|
||||
Editing *ed;
|
||||
/* int done=0; */
|
||||
|
||||
ed= G.scene->ed;
|
||||
if(ed==0) return;
|
||||
@ -1273,7 +1270,7 @@ void make_meta(void)
|
||||
ed= G.scene->ed;
|
||||
if(ed==0) return;
|
||||
|
||||
/* is er wel meer dan 1 select */
|
||||
/* is there more than 1 select */
|
||||
tot= 0;
|
||||
seq= ed->seqbasep->first;
|
||||
while(seq) {
|
||||
@ -1284,7 +1281,7 @@ void make_meta(void)
|
||||
|
||||
if(okee("Make Meta")==0) return;
|
||||
|
||||
/* samenhang testen */
|
||||
/* test relationships */
|
||||
seq= ed->seqbasep->first;
|
||||
while(seq) {
|
||||
if(seq->flag & SELECT) {
|
||||
@ -1307,7 +1304,7 @@ void make_meta(void)
|
||||
return;
|
||||
}
|
||||
|
||||
/* alle select uit hoofdlijst halen en in meta stoppen */
|
||||
/* remove all selected from main list, and put in meta */
|
||||
|
||||
seqm= alloc_sequence(1, 1);
|
||||
seqm->type= SEQ_META;
|
||||
@ -1355,7 +1352,7 @@ void un_meta(void)
|
||||
BLI_remlink(ed->seqbasep, last_seq);
|
||||
free_sequence(last_seq);
|
||||
|
||||
/* effecten testen */
|
||||
/* test effects */
|
||||
doit= 1;
|
||||
while(doit) {
|
||||
doit= 0;
|
||||
@ -1375,7 +1372,7 @@ void un_meta(void)
|
||||
}
|
||||
|
||||
|
||||
/* testen op effects en overlap */
|
||||
/* test for effects and overlap */
|
||||
WHILE_SEQ(ed->seqbasep) {
|
||||
if(seq->flag & SELECT) {
|
||||
seq->flag &= ~SEQ_OVERLAP;
|
||||
@ -1406,10 +1403,10 @@ static void exit_meta(void)
|
||||
|
||||
ed->seqbasep= ms->oldbasep;
|
||||
|
||||
/* de hele meta herberekenen */
|
||||
/* recalc entire meta */
|
||||
set_meta_stripdata(ms->parseq);
|
||||
|
||||
/* allemaal herberekenen: de meta kan effecten eraan hebben hangen */
|
||||
/* recalc all: the meta can have effects connected to it */
|
||||
seq= ed->seqbasep->first;
|
||||
while(seq) {
|
||||
calc_sequence(seq);
|
||||
@ -1471,9 +1468,9 @@ void transform_seq(int mode)
|
||||
short mval[2], val, xo, yo, xn, yn;
|
||||
char str[32];
|
||||
|
||||
if(mode!='g') return; /* vanuit gesture */
|
||||
if(mode!='g') return; /* from gesture */
|
||||
|
||||
/* welke seqs doen mee */
|
||||
/* which seqs are involved */
|
||||
ed= G.scene->ed;
|
||||
if(ed==0) return;
|
||||
|
||||
@ -1610,7 +1607,7 @@ void transform_seq(int mode)
|
||||
xo= mval[0];
|
||||
yo= mval[1];
|
||||
|
||||
/* testen op effect en overlap */
|
||||
/* test for effect and overlap */
|
||||
|
||||
WHILE_SEQ(ed->seqbasep) {
|
||||
if(seq->flag & SELECT) {
|
||||
@ -1683,7 +1680,7 @@ void transform_seq(int mode)
|
||||
}
|
||||
else {
|
||||
|
||||
/* images, effecten en overlap */
|
||||
/* images, effects and overlap */
|
||||
WHILE_SEQ(ed->seqbasep) {
|
||||
if(seq->type == SEQ_META) {
|
||||
calc_sequence(seq);
|
||||
@ -1699,7 +1696,7 @@ void transform_seq(int mode)
|
||||
}
|
||||
END_SEQ
|
||||
|
||||
/* als laatste: */
|
||||
/* as last: */
|
||||
sort_seq();
|
||||
}
|
||||
|
||||
@ -1741,7 +1738,7 @@ void clever_numbuts_seq(void)
|
||||
|
||||
add_numbut(0, TEX, "Name:", 0.0, 21.0, last_seq->name+2, 0);
|
||||
add_numbut(1, TOG|SHO|BIT|4, "FilterY", 0.0, 1.0, &last_seq->flag, 0);
|
||||
/* waarschuwing: alleen een enkele bitjes-button mogelijk: er wordt op kopiedata gewerkt! */
|
||||
/* warning: only a single bit-button possible: we work at copied data! */
|
||||
add_numbut(2, NUM|FLO, "Mul", 0.01, 5.0, &last_seq->mul, 0);
|
||||
|
||||
if( do_clever_numbuts("Movie", 3, REDRAW) ) {
|
||||
@ -1779,7 +1776,7 @@ void seq_snapmenu(void)
|
||||
|
||||
/* problem: contents of meta's are all shifted to the same position... */
|
||||
|
||||
/* ook meta's aflopen */
|
||||
/* also check metas */
|
||||
WHILE_SEQ(ed->seqbasep) {
|
||||
if(seq->flag & SELECT) {
|
||||
if(seq->type<SEQ_EFFECT) seq->start= CFRA-seq->startofs+seq->startstill;
|
||||
@ -1789,7 +1786,7 @@ void seq_snapmenu(void)
|
||||
END_SEQ
|
||||
|
||||
|
||||
/* testen op effects en overlap */
|
||||
/* test for effects and overlap */
|
||||
WHILE_SEQ(ed->seqbasep) {
|
||||
if(seq->flag & SELECT) {
|
||||
seq->flag &= ~SEQ_OVERLAP;
|
||||
@ -1805,7 +1802,7 @@ void seq_snapmenu(void)
|
||||
}
|
||||
END_SEQ;
|
||||
|
||||
/* als laatste: */
|
||||
/* as last: */
|
||||
sort_seq();
|
||||
|
||||
allqueue(REDRAWSEQ, 0);
|
||||
|
@ -219,7 +219,7 @@ static void be_square_tface_uv(Mesh *me)
|
||||
MFace *mface;
|
||||
int a;
|
||||
|
||||
/* als 1 punt select: doit (met het select punt) */
|
||||
/* if 1 vertex selected: doit (with the selected vertex) */
|
||||
for(a=me->totface, mface= me->mface, tface= me->tface; a>0; a--, tface++, mface++) {
|
||||
if(mface->v4) {
|
||||
if(tface->flag & TF_SELECT) {
|
||||
@ -323,7 +323,7 @@ void transform_tface_uv(int mode)
|
||||
else {
|
||||
xim= yim= 256;
|
||||
}
|
||||
/* welke vertices doen mee */
|
||||
/* which vertices are involved */
|
||||
|
||||
for(a=me->totface, tface= me->tface, mface= me->mface; a>0; a--, tface++, mface++) {
|
||||
if((tface->flag & TF_SELECT) && mface->v3) {
|
||||
|
@ -124,20 +124,20 @@ static char interpret_move(short mcord[][2], int count)
|
||||
|
||||
if (count <= 10) return ('g');
|
||||
|
||||
/* van short naar float (tekenen is met shorts) */
|
||||
/* from short to float (drawing is with shorts) */
|
||||
for(j=0; j<count; j++) {
|
||||
mouse[j][0]= mcord[j][0];
|
||||
mouse[j][1]= mcord[j][1];
|
||||
}
|
||||
|
||||
/* nieuwe opzet:
|
||||
/* new method:
|
||||
*
|
||||
* vanuit eindpunten middelpunt met maximale afstand berekenen
|
||||
* aan de hand van de hoek wordt s / g / r bepaald
|
||||
* starting from end points, calculate centre with maximum distance
|
||||
* dependant at the angle s / g / r is defined
|
||||
*/
|
||||
|
||||
|
||||
/* filteren */
|
||||
/* filter */
|
||||
|
||||
for( j = 3 ; j > 0; j--){
|
||||
x1 = mouse[1][0];
|
||||
@ -152,7 +152,7 @@ static char interpret_move(short mcord[][2], int count)
|
||||
}
|
||||
}
|
||||
|
||||
/* maak directions overzicht */
|
||||
/* make overview of directions */
|
||||
for (i = 0; i <= count - 2; i++){
|
||||
x1 = mouse[i][0] - mouse[i + 1][0];
|
||||
y1 = mouse[i][1] - mouse[i + 1][1];
|
||||
@ -172,7 +172,7 @@ static char interpret_move(short mcord[][2], int count)
|
||||
}
|
||||
}
|
||||
|
||||
/* alle kruisjes naar rechts halen */
|
||||
/* move all crosses to the right */
|
||||
for (i = 7; i>=0 ; i--){
|
||||
if (dir & 128) dir = (dir << 1) + 1;
|
||||
else break;
|
||||
@ -183,9 +183,9 @@ static char interpret_move(short mcord[][2], int count)
|
||||
else break;
|
||||
}
|
||||
|
||||
/* theorie zegt: 1 richting: rechte lijn
|
||||
* meer aaneengesloten richtingen: cirkel
|
||||
* onderbroken en minstens 1 bit gezet in hoogste 4 bits: size
|
||||
/* in theory: 1 direction: straight line
|
||||
* multiple sequential directions: circle
|
||||
* non-sequential, and 1 bit set in upper 4 bits: size
|
||||
*/
|
||||
switch(dir){
|
||||
case 1:
|
||||
@ -218,7 +218,7 @@ static char interpret_move(short mcord[][2], int count)
|
||||
return ('r');
|
||||
break;
|
||||
default:
|
||||
/* bij size moeten minstens een van de hogere bits gezet zijn */
|
||||
/* for size at least one of the higher bits has to be set */
|
||||
if (dir < 16) return ('r');
|
||||
else return ('s');
|
||||
}
|
||||
@ -234,7 +234,7 @@ int gesture(void)
|
||||
short mval[2], val;
|
||||
|
||||
glDrawBuffer(GL_FRONT);
|
||||
persp(0); /* heeft ortho op pixelnivo */
|
||||
persp(0); /* ortho at pixel level */
|
||||
|
||||
getmouseco_areawin(mval);
|
||||
|
||||
@ -378,7 +378,7 @@ void deselectall(void) /* is toggle */
|
||||
|
||||
}
|
||||
|
||||
static void deselectall_ex(Base *b) /* ALLES deselect behalve b */
|
||||
static void deselectall_ex(Base *b) /* deselect all except b */
|
||||
{
|
||||
Base *base;
|
||||
|
||||
@ -389,7 +389,7 @@ static void deselectall_ex(Base *b) /* ALLES deselect behalve b */
|
||||
|
||||
base->flag &= ~SELECT;
|
||||
base->object->flag= base->flag;
|
||||
draw_object_ext(base); /* deze test op layer */
|
||||
draw_object_ext(base); /* this test for layer */
|
||||
}
|
||||
}
|
||||
base= base->next;
|
||||
@ -430,7 +430,7 @@ static unsigned int samplerect(unsigned int *buf, int size, unsigned int dontdo)
|
||||
for(b=0;b<tel;b++) {
|
||||
|
||||
if(*buf && *buf<=maxob && *buf!=dontdo) return *buf;
|
||||
if( *buf==dontdo ) retval= dontdo; /* als alleen kleur dontdo aanwezig is, wel dontdo teruggeven */
|
||||
if( *buf==dontdo ) retval= dontdo; /* if only color dontdo is available, still return dontdo */
|
||||
|
||||
buf+= (dirvec[rc][0]+dirvec[rc][1]);
|
||||
|
||||
@ -450,12 +450,12 @@ void set_active_base(Base *base)
|
||||
|
||||
BASACT= base;
|
||||
|
||||
/* signalen naar buttons */
|
||||
/* signals to buttons */
|
||||
redraw_test_buttons(base);
|
||||
|
||||
set_active_group();
|
||||
|
||||
/* signaal naar ipo */
|
||||
/* signal to ipo */
|
||||
|
||||
if (base) {
|
||||
allqueue(REDRAWIPO, base->object->ipowin);
|
||||
@ -487,7 +487,7 @@ void mouse_select(void)
|
||||
int temp, a, dist=100;
|
||||
short hits, mval[2];
|
||||
|
||||
/* iedere keer lijst starten vanuit basact */
|
||||
/* always start list from basact */
|
||||
startbase= FIRSTBASE;
|
||||
if(BASACT && BASACT->next) startbase= BASACT->next;
|
||||
|
||||
@ -514,8 +514,8 @@ void mouse_select(void)
|
||||
if(base==0) base= FIRSTBASE;
|
||||
if(base==startbase) break;
|
||||
}
|
||||
|
||||
/* volledige redraw als */
|
||||
|
||||
/* complete redraw when: */
|
||||
if(G.f & (G_VERTEXPAINT+G_FACESELECT+G_TEXTUREPAINT+G_WEIGHTPAINT)) allqueue(REDRAWVIEW3D, 0);
|
||||
|
||||
}
|
||||
@ -544,7 +544,7 @@ void mouse_select(void)
|
||||
|
||||
if(basact) {
|
||||
if(G.obedit) {
|
||||
/* alleen select doen */
|
||||
/* only do select */
|
||||
deselectall_ex(BASACT);
|
||||
basact->flag |= SELECT;
|
||||
draw_object_ext(basact);
|
||||
@ -781,10 +781,6 @@ void borderselect(void)
|
||||
}
|
||||
}
|
||||
|
||||
/* XXX, are all these really needed?
|
||||
* I just copied them from the G.obpose
|
||||
* OB_ARMATURE section above. - zr
|
||||
*/
|
||||
allqueue(REDRAWBUTSEDIT, 0);
|
||||
allqueue(REDRAWBUTSCONSTRAINT, 0);
|
||||
allqueue(REDRAWACTION, 0);
|
||||
@ -836,11 +832,11 @@ void borderselect(void)
|
||||
}
|
||||
allqueue(REDRAWDATASELECT, 0);
|
||||
|
||||
/* i.v.m. backbufprojektie */
|
||||
/* because backbuf drawing */
|
||||
tel= 1;
|
||||
base= FIRSTBASE;
|
||||
while(base) {
|
||||
/* elke base ivm meerdere windows */
|
||||
/* each base because of multiple windows */
|
||||
base->selcol = ((tel & 0xF00)<<12)
|
||||
+ ((tel & 0xF0)<<8)
|
||||
+ ((tel & 0xF)<<4);
|
||||
@ -893,7 +889,7 @@ void mesh_selectionCB(int selecting, Object *editobj, short *mval, float rad)
|
||||
}
|
||||
else {
|
||||
if(selecting!=LEFTMOUSE) tekenvertices_ext(0);
|
||||
/* altijd geselecteerde vertices tekenen */
|
||||
/* always draw selected vertices */
|
||||
tekenvertices_ext(1);
|
||||
}
|
||||
}
|
||||
@ -1037,7 +1033,7 @@ void circle_select(void)
|
||||
|
||||
while(TRUE) {
|
||||
|
||||
/* als een renderwindow open is en de muis gaat erin */
|
||||
/* when a renderwindow is open and mouse enters it (activates sometimes) */
|
||||
|
||||
mywinset(curarea->win);
|
||||
|
||||
@ -1076,7 +1072,7 @@ void circle_select(void)
|
||||
}
|
||||
else {
|
||||
if(selecting!=LEFTMOUSE) tekenvertices_ext(0);
|
||||
/* altijd geselecteerde vertices tekenen */
|
||||
/* always draw selected vertices */
|
||||
tekenvertices_ext(1);
|
||||
}
|
||||
}
|
||||
@ -1191,7 +1187,7 @@ void circle_select(void)
|
||||
}
|
||||
}
|
||||
|
||||
/* cirkel wissen */
|
||||
/* clear circle */
|
||||
draw_sel_circle(0, mvalo, 0, rad, 1);
|
||||
|
||||
countall();
|
||||
@ -1283,7 +1279,7 @@ void fly(void)
|
||||
}
|
||||
if(loop==0) break;
|
||||
|
||||
/* dvec bepalen */
|
||||
/* define dvec */
|
||||
val= mval[0]-cent[0];
|
||||
if(val>20) val-= 20; else if(val< -20) val+= 20; else val= 0;
|
||||
dvec[0]= 0.000001*val*val;
|
||||
@ -1306,7 +1302,7 @@ void fly(void)
|
||||
|
||||
Mat3CpyMat4(mat, G.vd->viewinv);
|
||||
Mat3MulVecfl(mat, dvec);
|
||||
quat= vectoquat(dvec, 5, 1); /* track en upflag, niet die van de base: cameraview-berekening gebruikt ze niet */
|
||||
quat= vectoquat(dvec, 5, 1); /* track and upflag, not from the base: camera view calculation does not use that */
|
||||
|
||||
QuatToEul(quat, G.vd->camera->rot);
|
||||
|
||||
|
@ -294,7 +294,7 @@ static int compare_name(const void *a1, const void *a2)
|
||||
{
|
||||
const struct direntry *entry1=a1, *entry2=a2;
|
||||
|
||||
/* type is gelijk aan stat.st_mode */
|
||||
/* type is is equal to stat.st_mode */
|
||||
|
||||
if (S_ISDIR(entry1->type)){
|
||||
if (S_ISDIR(entry2->type)==0) return (-1);
|
||||
@ -315,7 +315,7 @@ static int compare_date(const void *a1, const void *a2)
|
||||
{
|
||||
const struct direntry *entry1=a1, *entry2=a2;
|
||||
|
||||
/* type is gelijk aan stat.st_mode */
|
||||
/* type is equal to stat.st_mode */
|
||||
|
||||
if (S_ISDIR(entry1->type)){
|
||||
if (S_ISDIR(entry2->type)==0) return (-1);
|
||||
@ -343,7 +343,7 @@ static int compare_size(const void *a1, const void *a2)
|
||||
{
|
||||
const struct direntry *entry1=a1, *entry2=a2;
|
||||
|
||||
/* type is gelijk aan stat.st_mode */
|
||||
/* type is equal to stat.st_mode */
|
||||
|
||||
if (S_ISDIR(entry1->type)){
|
||||
if (S_ISDIR(entry2->type)==0) return (-1);
|
||||
@ -396,7 +396,7 @@ void filesel_statistics(SpaceFile *sfile, int *totfile, int *selfile, float *tot
|
||||
}
|
||||
}
|
||||
|
||||
/* *************** HULPFUNKTIES ******************* */
|
||||
/* *************** HELP FUNCTIONS ******************* */
|
||||
|
||||
/* This is a really ugly function... its purpose is to
|
||||
* take the space file name and clean it up, replacing
|
||||
@ -413,7 +413,7 @@ void checkdir(char *dir)
|
||||
strcpy(dir, tmp);
|
||||
|
||||
#ifdef WIN32
|
||||
if(dir[0]=='.') { /* komt voor, o.a. bij FILE_MAIN */
|
||||
if(dir[0]=='.') { /* happens for example in FILE_MAIN */
|
||||
dir[0]= '\\';
|
||||
dir[1]= 0;
|
||||
return;
|
||||
@ -439,7 +439,7 @@ void checkdir(char *dir)
|
||||
strcpy(start,eind);
|
||||
}
|
||||
|
||||
if(a = strlen(dir)){ /* eerst alle '\\' weghalen aan het eind */
|
||||
if(a = strlen(dir)){ /* remove the '\\' at the end */
|
||||
while(a>0 && dir[a-1] == '\\'){
|
||||
a--;
|
||||
dir[a] = 0;
|
||||
@ -448,7 +448,7 @@ void checkdir(char *dir)
|
||||
|
||||
strcat(dir, "\\");
|
||||
#else
|
||||
if(dir[0]=='.') { /* komt voor, o.a. bij FILE_MAIN */
|
||||
if(dir[0]=='.') { /* happens, for example in FILE_MAIN */
|
||||
dir[0]= '/';
|
||||
dir[1]= 0;
|
||||
return;
|
||||
@ -474,7 +474,7 @@ void checkdir(char *dir)
|
||||
strcpy(start,eind);
|
||||
}
|
||||
|
||||
if( (a = strlen(dir)) ){ /* eerst alle '/' weghalen aan het eind */
|
||||
if( (a = strlen(dir)) ){ /* remove all '/' at the end */
|
||||
while(dir[a-1] == '/'){
|
||||
a--;
|
||||
dir[a] = 0;
|
||||
@ -495,7 +495,7 @@ void test_flags_file(SpaceFile *sfile)
|
||||
|
||||
for(num=0; num<sfile->totfile; num++, file++) {
|
||||
file->flags= 0;
|
||||
file->type= file->s.st_mode; /* restore het geknoei van hieronder */
|
||||
file->type= file->s.st_mode; /* restore the mess below */
|
||||
|
||||
/* Don't check extensions for directories */
|
||||
if (file->type&S_IFDIR)
|
||||
@ -633,7 +633,7 @@ void read_dir(SpaceFile *sfile)
|
||||
int num, len;
|
||||
char wdir[FILE_MAXDIR];
|
||||
|
||||
/* sfile->act wordt gebruikt o.a. bij databrowse: dubbele namen van library objecten */
|
||||
/* sfile->act is used for example in databrowse: double names of library objects */
|
||||
sfile->act= -1;
|
||||
|
||||
if(sfile->type==FILE_MAIN) {
|
||||
@ -714,20 +714,20 @@ void parent(SpaceFile *sfile)
|
||||
short a;
|
||||
char *dir;
|
||||
|
||||
/* als databrowse: geen parent */
|
||||
/* if databrowse: no parent */
|
||||
if(sfile->type==FILE_MAIN && sfile->returnfunc) return;
|
||||
|
||||
dir= sfile->dir;
|
||||
|
||||
#ifdef WIN32
|
||||
if(a = strlen(dir)) { /* eerst alle '/' weghalen aan het eind */
|
||||
if(a = strlen(dir)) { /* remove all '/' at the end */
|
||||
while(dir[a-1] == '\\') {
|
||||
a--;
|
||||
dir[a] = 0;
|
||||
if (a<=0) break;
|
||||
}
|
||||
}
|
||||
if(a = strlen(dir)) { /* daarna alles weghalen tot aan '/' */
|
||||
if(a = strlen(dir)) { /* then remove all until '/' */
|
||||
while(dir[a-1] != '\\') {
|
||||
a--;
|
||||
dir[a] = 0;
|
||||
@ -739,14 +739,14 @@ void parent(SpaceFile *sfile)
|
||||
}
|
||||
else if(sfile->type!=FILE_MAIN) strcpy(dir,"\\");
|
||||
#else
|
||||
if( (a = strlen(dir)) ) { /* eerst alle '/' weghalen aan het eind */
|
||||
if( (a = strlen(dir)) ) { /* remove all '/' at the end */
|
||||
while(dir[a-1] == '/') {
|
||||
a--;
|
||||
dir[a] = 0;
|
||||
if (a<=0) break;
|
||||
}
|
||||
}
|
||||
if( (a = strlen(dir)) ) { /* daarna alles weghalen tot aan '/' */
|
||||
if( (a = strlen(dir)) ) { /* then remove until '/' */
|
||||
while(dir[a-1] != '/') {
|
||||
a--;
|
||||
dir[a] = 0;
|
||||
@ -829,7 +829,7 @@ static void calc_file_rcts(SpaceFile *sfile)
|
||||
filebuty2= filebuty1+FILESELHEAD/2 -6;
|
||||
|
||||
|
||||
/* aantal kolommen */
|
||||
/* amount of collums */
|
||||
len= sfile->maxnamelen+25;
|
||||
|
||||
if(sfile->type==FILE_MAIN) len+= 100;
|
||||
@ -998,12 +998,12 @@ static void printregel(SpaceFile *sfile, struct direntry *files, int x, int y)
|
||||
|
||||
static int calc_filesel_regel(SpaceFile *sfile, int nr, int *valx, int *valy)
|
||||
{
|
||||
/* sco van de de regel */
|
||||
/* get screen coordinate of a 'regel', dutch for line */
|
||||
int val, coll;
|
||||
|
||||
nr-= sfile->ofs;
|
||||
|
||||
/* aantal regels in de hoogte */
|
||||
/* amount of lines */
|
||||
val= (textrct.ymax-textrct.ymin)/FILESEL_DY;
|
||||
coll= nr/val;
|
||||
nr -= coll*val;
|
||||
@ -1088,11 +1088,11 @@ static void draw_filetext(SpaceFile *sfile)
|
||||
if(textrct.ymin+10 >= textrct.ymax) return;
|
||||
|
||||
|
||||
/* kader */
|
||||
/* box */
|
||||
cpack(0x717171);
|
||||
glRecti(textrct.xmin, textrct.ymin, textrct.xmax, textrct.ymax);
|
||||
|
||||
/* kolommen */
|
||||
/* collums */
|
||||
x= textrct.xmin+collumwidth;
|
||||
for(a=1; a<sfile->collums; a++, x+= collumwidth) {
|
||||
cpack(0x303030);
|
||||
@ -1103,7 +1103,7 @@ static void draw_filetext(SpaceFile *sfile)
|
||||
|
||||
if(sfile->filelist==0) return;
|
||||
|
||||
/* test: als muis niet in area staat: de HILITE wissen */
|
||||
/* test: if mouse is not in area: clear HILITE */
|
||||
getmouseco_areawin(mval);
|
||||
|
||||
if(mval[0]<0 || mval[0]>curarea->winx) {
|
||||
@ -1119,7 +1119,7 @@ static void draw_filetext(SpaceFile *sfile)
|
||||
printregel(sfile, files, x, y);
|
||||
}
|
||||
|
||||
/* wissen tekenfoutjes, tekst teveel aan de rechterkant: */
|
||||
/* clear drawing errors, with text at the right hand side: */
|
||||
uiEmboss(textrct.xmin, textrct.ymin, textrct.xmax, textrct.ymax, 1);
|
||||
|
||||
glColor3f(.5625, .5625, .5625);
|
||||
@ -1146,7 +1146,7 @@ void drawfilespace(ScrArea *sa, void *spacedata)
|
||||
|
||||
calc_file_rcts(sfile);
|
||||
|
||||
/* act berekenen */
|
||||
/* calculate act */
|
||||
getmouseco_areawin(mval);
|
||||
act= find_active_file(sfile, mval[0], mval[1]);
|
||||
if(act>=0 && act<sfile->totfile)
|
||||
@ -1184,7 +1184,7 @@ void drawfilespace(ScrArea *sa, void *spacedata)
|
||||
draw_filescroll(sfile);
|
||||
draw_filetext(sfile);
|
||||
|
||||
/* andere diskfree etc ? */
|
||||
/* others diskfree etc ? */
|
||||
scrarea_queue_headredraw(curarea);
|
||||
|
||||
uiDrawBlock(block);
|
||||
@ -1199,7 +1199,7 @@ static void do_filescroll(SpaceFile *sfile)
|
||||
calc_file_rcts(sfile);
|
||||
|
||||
filescrollselect= 1;
|
||||
/* voor mooiigheid */
|
||||
/* for beauty */
|
||||
|
||||
glDrawBuffer(GL_FRONT);
|
||||
draw_filescroll(sfile);
|
||||
@ -1233,7 +1233,7 @@ static void do_filescroll(SpaceFile *sfile)
|
||||
}
|
||||
filescrollselect= 0;
|
||||
|
||||
/* voor mooiigheid */
|
||||
/* for beauty */
|
||||
glDrawBuffer(GL_FRONT);
|
||||
draw_filescroll(sfile);
|
||||
glDrawBuffer(GL_BACK);
|
||||
@ -1272,7 +1272,7 @@ void activate_fileselect(int type, char *title, char *file, void (*func)(char *)
|
||||
newspace(curarea, SPACE_FILE);
|
||||
scrarea_queue_winredraw(curarea);
|
||||
|
||||
/* is misschien dubbelop, voor geval area al SPACE_FILE is met andere filename */
|
||||
/* sometime double, when area already is SPACE_FILE with a different file name */
|
||||
addqueue(curarea->headwin, CHANGED, 1);
|
||||
|
||||
|
||||
@ -1284,7 +1284,7 @@ void activate_fileselect(int type, char *title, char *file, void (*func)(char *)
|
||||
sfile->returnfunc= func;
|
||||
sfile->type= type;
|
||||
sfile->ofs= 0;
|
||||
/* sfile->act wordt gebruikt bij databrowse: dubbele namen van library objecten */
|
||||
/* sfile->act is used for databrowse: double names of library objects */
|
||||
sfile->act= -1;
|
||||
|
||||
if(BLI_convertstringcode(name, G.sce, G.scene->r.cfra)) sfile->flag |= FILE_STRINGCODE;
|
||||
@ -1301,7 +1301,7 @@ void activate_fileselect(int type, char *title, char *file, void (*func)(char *)
|
||||
strcat(sfile->dir, "/");
|
||||
}
|
||||
|
||||
/* alles vrijgeven */
|
||||
/* free all */
|
||||
if(sfile->libfiledata) BLO_blendhandle_close(sfile->libfiledata);
|
||||
sfile->libfiledata= 0;
|
||||
|
||||
@ -1310,7 +1310,7 @@ void activate_fileselect(int type, char *title, char *file, void (*func)(char *)
|
||||
else if(type==FILE_LOADLIB) {
|
||||
strcpy(sfile->dir, name);
|
||||
if( is_a_library(sfile, temp, group) ) {
|
||||
/* dit geval is om een reload van library-filelist te veroorzaken */
|
||||
/* to force a reload of the library-filelist */
|
||||
if(sfile->libfiledata==0) {
|
||||
freefilelist(sfile);
|
||||
}
|
||||
@ -1322,9 +1322,9 @@ void activate_fileselect(int type, char *title, char *file, void (*func)(char *)
|
||||
}
|
||||
}
|
||||
else { /* FILE_BLENDER */
|
||||
split_sfile(sfile, name); /* test ook de filelist */
|
||||
split_sfile(sfile, name); /* test filelist too */
|
||||
|
||||
/* vrijgeven: filelist en libfiledata kloppen niet meer */
|
||||
/* free: filelist and libfiledata became incorrect */
|
||||
if(sfile->libfiledata) BLO_blendhandle_close(sfile->libfiledata);
|
||||
sfile->libfiledata= 0;
|
||||
}
|
||||
@ -1342,7 +1342,7 @@ void activate_imageselect(int type, char *title, char *file, void (*func)(char *
|
||||
|
||||
newspace(curarea, SPACE_IMASEL);
|
||||
|
||||
/* is misschien dubbelop, voor geval area al SPACE_FILE is met andere filename */
|
||||
/* sometimes double, when area is already SPACE_FILE with a different file name */
|
||||
addqueue(curarea->headwin, CHANGED, 1);
|
||||
addqueue(curarea->win, CHANGED, 1);
|
||||
|
||||
@ -1427,7 +1427,7 @@ static int getotherdir(void)
|
||||
if(sa!=curarea) {
|
||||
if(sa->spacetype==SPACE_FILE) {
|
||||
|
||||
/* al een gevonden */
|
||||
/* already found one */
|
||||
if(sfile) return 0;
|
||||
|
||||
sfile= sa->spacedata.first;
|
||||
@ -1449,7 +1449,7 @@ static void reread_other_fs(void)
|
||||
{
|
||||
SpaceFile *sfile;
|
||||
|
||||
/* oppassen: alleen aanroepen als getotherdir goed is afgelopen */
|
||||
/* watch it: only call when getotherdir returned OK */
|
||||
|
||||
sfile= otherarea->spacedata.first;
|
||||
freefilelist(sfile);
|
||||
@ -1459,7 +1459,7 @@ static void reread_other_fs(void)
|
||||
|
||||
void free_filesel_spec(char *dir)
|
||||
{
|
||||
/* alle filesels met 'dir' worden vrijgegeven */
|
||||
/* all filesels with 'dir' are freed */
|
||||
bScreen *sc;
|
||||
|
||||
sc= G.main->screen.first;
|
||||
@ -1576,7 +1576,7 @@ static void do_filesel_buttons(short event, SpaceFile *sfile)
|
||||
else if(event== 3) {
|
||||
char *selected= fsmenu_get_entry(sfile->menu-1);
|
||||
|
||||
/* welke string */
|
||||
/* which string */
|
||||
if (selected) {
|
||||
strcpy(sfile->dir, selected);
|
||||
BLI_make_exist(sfile->dir);
|
||||
@ -1761,7 +1761,7 @@ static void fs_fake_users(SpaceFile *sfile)
|
||||
ID *id;
|
||||
int a;
|
||||
|
||||
/* alleen bij F4 DATABROWSE */
|
||||
/* only for F4 DATABROWSE */
|
||||
if(sfile->returnfunc) return;
|
||||
|
||||
for(a=0; a<sfile->totfile; a++) {
|
||||
@ -1811,7 +1811,7 @@ void winqreadfilespace(ScrArea *sa, void *spacedata, BWinEvent *evt)
|
||||
sfile= curarea->spacedata.first;
|
||||
if(sfile==0) return;
|
||||
if(sfile->filelist==0) {
|
||||
/* wel buttons doen */
|
||||
/* but do buttons */
|
||||
if(val && event==LEFTMOUSE) {
|
||||
/* FrontbufferButs(TRUE); */
|
||||
/* event= DoButtons(); */
|
||||
@ -1826,7 +1826,7 @@ void winqreadfilespace(ScrArea *sa, void *spacedata, BWinEvent *evt)
|
||||
calc_file_rcts(sfile);
|
||||
getmouseco_areawin(mval);
|
||||
|
||||
/* om hangen te voorkomen */
|
||||
/* prevent looping */
|
||||
if(selecting && !(get_mbut() & R_MOUSE)) selecting= 0;
|
||||
|
||||
if(val) {
|
||||
@ -1860,7 +1860,7 @@ void winqreadfilespace(ScrArea *sa, void *spacedata, BWinEvent *evt)
|
||||
}
|
||||
else if(mval[0]>textrct.xmin && mval[0]<textrct.xmax && mval[1]>textrct.ymin && mval[1]<textrct.ymax) {
|
||||
|
||||
/* sfile->act wordt gebruikt bij databrowse: dubbelenamen van library objecten */
|
||||
/* sfile->act is used in databrowse: double names of library objects */
|
||||
|
||||
sfile->act= act= find_active_file(sfile, mval[0], mval[1]);
|
||||
|
||||
@ -1886,7 +1886,7 @@ void winqreadfilespace(ScrArea *sa, void *spacedata, BWinEvent *evt)
|
||||
/* FrontbufferButs(TRUE); */
|
||||
/* event= DoButtons(); */
|
||||
/* FrontbufferButs(FALSE); */
|
||||
/* NIET de headerbuttons! */
|
||||
/* NOT the headerbuttons! */
|
||||
/* if(event) do_filesel_buttons(event, sfile); */
|
||||
}
|
||||
break;
|
||||
@ -1960,7 +1960,7 @@ void winqreadfilespace(ScrArea *sa, void *spacedata, BWinEvent *evt)
|
||||
databrowse_replace(sfile, groupname_to_code(sfile->dir));
|
||||
break;
|
||||
}
|
||||
/* doorgeven */
|
||||
/* pass */
|
||||
case MKEY:
|
||||
if(sfile->type==FILE_MAIN) break;
|
||||
|
||||
@ -2030,7 +2030,7 @@ void winqreadfilespace(ScrArea *sa, void *spacedata, BWinEvent *evt)
|
||||
databrowse_replace(sfile, groupname_to_code(sfile->dir));
|
||||
break;
|
||||
}
|
||||
/* doorgeven aan TKEY! */
|
||||
/* pass to TKEY! */
|
||||
|
||||
case TKEY:
|
||||
if(sfile->type==FILE_MAIN) break;
|
||||
@ -2043,7 +2043,7 @@ void winqreadfilespace(ScrArea *sa, void *spacedata, BWinEvent *evt)
|
||||
if(event==TKEY) sprintf(str, "Touch");
|
||||
else if(event==RKEY) sprintf(str, "Remove from %s", sfile->dir);
|
||||
|
||||
qual= G.qual; /* want na okee() heb je de shift losgelaten */
|
||||
qual= G.qual; /* because after okee() you released the SHIFT */
|
||||
if (!okee(str)) break;
|
||||
|
||||
for (i = 0; i <sfile->totfile; i++) {
|
||||
@ -2176,8 +2176,8 @@ static int groupname_to_code(char *group)
|
||||
|
||||
static int is_a_library(SpaceFile *sfile, char *dir, char *group)
|
||||
{
|
||||
/* return ok als een blenderfile, in dir staat de filename,
|
||||
* in group het type libdata
|
||||
/* return ok when a blenderfile, in dir is the filename,
|
||||
* in group the type of libdata
|
||||
*/
|
||||
int len;
|
||||
char *fd;
|
||||
@ -2226,7 +2226,7 @@ static void do_library_append(SpaceFile *sfile)
|
||||
|
||||
BLO_library_append(sfile, dir, idcode);
|
||||
|
||||
/* DISPLISTEN */
|
||||
/* DISPLISTS */
|
||||
ob= G.main->object.first;
|
||||
set_displist_onlyzero(1);
|
||||
while(ob) {
|
||||
@ -2245,7 +2245,7 @@ static void do_library_append(SpaceFile *sfile)
|
||||
}
|
||||
set_displist_onlyzero(0);
|
||||
|
||||
/* in sfile->dir staat de HELE libnaam */
|
||||
/* in sfile->dir is the whole lib name */
|
||||
strcpy(G.lib, sfile->dir);
|
||||
|
||||
if((sfile->flag & FILE_LINK)==0) all_local();
|
||||
@ -2258,17 +2258,17 @@ static void library_to_filelist(SpaceFile *sfile)
|
||||
int ok, i, nnames, idcode;
|
||||
LinkNode *l, *names;
|
||||
|
||||
/* name testen */
|
||||
/* name test */
|
||||
ok= is_a_library(sfile, dir, group);
|
||||
if (!ok) {
|
||||
/* vrijgeven */
|
||||
/* free */
|
||||
if(sfile->libfiledata) BLO_blendhandle_close(sfile->libfiledata);
|
||||
sfile->libfiledata= 0;
|
||||
return;
|
||||
}
|
||||
|
||||
/* en daar gaat ie */
|
||||
/* voorlopig alleen filedata inlezen als libfiledata==0 */
|
||||
/* there we go */
|
||||
/* for the time being only read filedata when libfiledata==0 */
|
||||
if (sfile->libfiledata==0) {
|
||||
sfile->libfiledata= BLO_blendhandle_from_file(dir);
|
||||
if(sfile->libfiledata==0) return;
|
||||
@ -2320,7 +2320,7 @@ static void filesel_select_objects(SpaceFile *sfile)
|
||||
Scene *sce;
|
||||
int a;
|
||||
|
||||
/* alleen bij F4 DATABROWSE */
|
||||
/* only when F4 DATABROWSE */
|
||||
if(sfile->returnfunc) return;
|
||||
|
||||
if( strcmp(sfile->dir, "Object/")==0 ) {
|
||||
@ -2360,7 +2360,7 @@ static void active_file_object(SpaceFile *sfile)
|
||||
{
|
||||
Object *ob;
|
||||
|
||||
/* alleen bij F4 DATABROWSE */
|
||||
/* only when F4 DATABROWSE */
|
||||
if(sfile->returnfunc) return;
|
||||
|
||||
if( strcmp(sfile->dir, "Object/")==0 ) {
|
||||
@ -2398,7 +2398,7 @@ void main_to_filelist(SpaceFile *sfile)
|
||||
|
||||
if( sfile->dir[0]==0) {
|
||||
|
||||
/* directories maken */
|
||||
/* make directories */
|
||||
sfile->totfile= 22;
|
||||
sfile->filelist= (struct direntry *)malloc(sfile->totfile * sizeof(struct direntry));
|
||||
|
||||
@ -2433,7 +2433,7 @@ void main_to_filelist(SpaceFile *sfile)
|
||||
}
|
||||
else {
|
||||
|
||||
/* files maken */
|
||||
/* make files */
|
||||
idcode= groupname_to_code(sfile->dir);
|
||||
|
||||
lb= wich_libbase(G.main, idcode );
|
||||
@ -2512,7 +2512,7 @@ void main_to_filelist(SpaceFile *sfile)
|
||||
id= id->next;
|
||||
}
|
||||
|
||||
/* alleen qsort van libraryblokken */
|
||||
/* only qsort of libraryblokken */
|
||||
if(totlib>1) {
|
||||
qsort(firstlib, totlib, sizeof(struct direntry), compare_name);
|
||||
}
|
||||
|
@ -98,7 +98,7 @@ void sdrawXORline4(int nr, int x0, int y0, int x1, int y1)
|
||||
static short old[4][2][2];
|
||||
static char flags[4]= {0, 0, 0, 0};
|
||||
|
||||
/* automatische onthoud, max 4 lijnen */
|
||||
/* with builtin memory, max 4 lines */
|
||||
|
||||
set_inverted_drawing(1);
|
||||
|
||||
|
@ -211,8 +211,8 @@ static int std_libbuttons(uiBlock *block,
|
||||
extern char versionstr[]; /* from blender.c */
|
||||
/* extern void add_text_fs(char *file); *//* from text.c, BIF_text.h*/
|
||||
|
||||
/* LET OP: alle headerbuttons voor zelfde window steeds zelfde naam
|
||||
* event B_REDR is standaard redraw
|
||||
/* WATCH IT: always give all headerbuttons for same window the same name
|
||||
* event B_REDR is a standard redraw
|
||||
*
|
||||
*/
|
||||
|
||||
@ -292,7 +292,7 @@ static int std_libbuttons(uiBlock *block, int xco, int pin, short *pinpoin, int
|
||||
if(browse) {
|
||||
if(id==0) {
|
||||
idwasnul= 1;
|
||||
/* alleen de browse button */
|
||||
/* only the browse button */
|
||||
ob= OBACT;
|
||||
if(curarea->spacetype==SPACE_IMAGE) {
|
||||
id= G.main->image.first;
|
||||
@ -308,7 +308,7 @@ static int std_libbuttons(uiBlock *block, int xco, int pin, short *pinpoin, int
|
||||
}
|
||||
else if(curarea->spacetype==SPACE_IPO) {
|
||||
id= G.main->ipo.first;
|
||||
/* testen op ipotype */
|
||||
/* test for ipotype */
|
||||
while(id) {
|
||||
ipo= (Ipo *)id;
|
||||
if(G.sipo->blocktype==ipo->blocktype) break;
|
||||
@ -634,7 +634,7 @@ void do_global_buttons(unsigned short event)
|
||||
|
||||
ob= OBACT;
|
||||
|
||||
id= 0; /* id op nul voor texbrowse */
|
||||
id= 0; /* id at null for texbrowse */
|
||||
|
||||
|
||||
switch(event) {
|
||||
@ -822,7 +822,7 @@ void do_global_buttons(unsigned short event)
|
||||
}
|
||||
else { /* from lamp */
|
||||
la= ob->data;
|
||||
if(la && ob->type==OB_LAMP) { /* voor zekerheid */
|
||||
if(la && ob->type==OB_LAMP) { /* to be sure */
|
||||
mtex= la->mtex[ la->texact ];
|
||||
if(mtex) {
|
||||
if(mtex->tex) mtex->tex->id.us--;
|
||||
@ -1142,7 +1142,7 @@ void do_global_buttons(unsigned short event)
|
||||
}
|
||||
|
||||
if(G.buts->menunr < 0) break;
|
||||
/* geen lock */
|
||||
/* no lock */
|
||||
|
||||
wrld= G.scene->world;
|
||||
nr= 1;
|
||||
@ -1241,7 +1241,7 @@ void do_global_buttons(unsigned short event)
|
||||
}
|
||||
break;
|
||||
case B_LAMPBROWSE:
|
||||
/* geen lock */
|
||||
/* no lock */
|
||||
if(ob==0) return;
|
||||
if(ob->type!=OB_LAMP) return;
|
||||
|
||||
@ -1263,7 +1263,7 @@ void do_global_buttons(unsigned short event)
|
||||
nr++;
|
||||
idtest= idtest->next;
|
||||
}
|
||||
if(idtest==0) { /* geen new lamp */
|
||||
if(idtest==0) { /* no new lamp */
|
||||
return;
|
||||
}
|
||||
if(idtest!=id) {
|
||||
@ -1386,7 +1386,7 @@ void do_global_buttons(unsigned short event)
|
||||
case B_NEWSPACE:
|
||||
newspace(curarea, curarea->butspacetype);
|
||||
break;
|
||||
case B_LOADTEMP: /* is button uit space.c */
|
||||
case B_LOADTEMP: /* is button from space.c */
|
||||
BIF_read_autosavefile();
|
||||
break;
|
||||
|
||||
@ -1394,13 +1394,13 @@ void do_global_buttons(unsigned short event)
|
||||
allqueue(REDRAWINFO, 0);
|
||||
// BIF_printf("userpref %d\n", U.userpref);
|
||||
break;
|
||||
case B_DRAWINFO: /* is button uit space.c *info* */
|
||||
case B_DRAWINFO: /* is button from space.c *info* */
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
break;
|
||||
|
||||
/* Fileselect windows for user preferences file paths */
|
||||
|
||||
case B_FONTDIRFILESEL: /* is button uit space.c *info* */
|
||||
case B_FONTDIRFILESEL: /* is button from space.c *info* */
|
||||
if(curarea->spacetype==SPACE_INFO) {
|
||||
sa= closest_bigger_area();
|
||||
areawinset(sa->win);
|
||||
@ -1409,7 +1409,7 @@ void do_global_buttons(unsigned short event)
|
||||
activate_fileselect(FILE_SPECIAL, "SELECT FONT PATH", U.fontdir, filesel_u_fontdir);
|
||||
break;
|
||||
|
||||
case B_TEXTUDIRFILESEL: /* is button uit space.c *info* */
|
||||
case B_TEXTUDIRFILESEL: /* is button from space.c *info* */
|
||||
if(curarea->spacetype==SPACE_INFO) {
|
||||
sa= closest_bigger_area();
|
||||
areawinset(sa->win);
|
||||
@ -1418,7 +1418,7 @@ void do_global_buttons(unsigned short event)
|
||||
activate_fileselect(FILE_SPECIAL, "SELECT TEXTURE PATH", U.textudir, filesel_u_textudir);
|
||||
break;
|
||||
|
||||
case B_PLUGTEXDIRFILESEL: /* is button uit space.c *info* */
|
||||
case B_PLUGTEXDIRFILESEL: /* is button form space.c *info* */
|
||||
if(curarea->spacetype==SPACE_INFO) {
|
||||
sa= closest_bigger_area();
|
||||
areawinset(sa->win);
|
||||
@ -1427,7 +1427,7 @@ void do_global_buttons(unsigned short event)
|
||||
activate_fileselect(FILE_SPECIAL, "SELECT TEX PLUGIN PATH", U.plugtexdir, filesel_u_plugtexdir);
|
||||
break;
|
||||
|
||||
case B_PLUGSEQDIRFILESEL: /* is button uit space.c *info* */
|
||||
case B_PLUGSEQDIRFILESEL: /* is button from space.c *info* */
|
||||
if(curarea->spacetype==SPACE_INFO) {
|
||||
sa= closest_bigger_area();
|
||||
areawinset(sa->win);
|
||||
@ -1436,7 +1436,7 @@ void do_global_buttons(unsigned short event)
|
||||
activate_fileselect(FILE_SPECIAL, "SELECT SEQ PLUGIN PATH", U.plugseqdir, filesel_u_plugseqdir);
|
||||
break;
|
||||
|
||||
case B_RENDERDIRFILESEL: /* is button uit space.c *info* */
|
||||
case B_RENDERDIRFILESEL: /* is button from space.c *info* */
|
||||
if(curarea->spacetype==SPACE_INFO) {
|
||||
sa= closest_bigger_area();
|
||||
areawinset(sa->win);
|
||||
@ -1445,7 +1445,7 @@ void do_global_buttons(unsigned short event)
|
||||
activate_fileselect(FILE_SPECIAL, "SELECT RENDER PATH", U.renderdir, filesel_u_renderdir);
|
||||
break;
|
||||
|
||||
case B_PYTHONDIRFILESEL: /* is button uit space.c *info* */
|
||||
case B_PYTHONDIRFILESEL: /* is button from space.c *info* */
|
||||
if(curarea->spacetype==SPACE_INFO) {
|
||||
sa= closest_bigger_area();
|
||||
areawinset(sa->win);
|
||||
@ -1454,7 +1454,7 @@ void do_global_buttons(unsigned short event)
|
||||
activate_fileselect(FILE_SPECIAL, "SELECT SCRIPT PATH", U.pythondir, filesel_u_pythondir);
|
||||
break;
|
||||
|
||||
case B_SOUNDDIRFILESEL: /* is button uit space.c *info* */
|
||||
case B_SOUNDDIRFILESEL: /* is button from space.c *info* */
|
||||
if(curarea->spacetype==SPACE_INFO) {
|
||||
sa= closest_bigger_area();
|
||||
areawinset(sa->win);
|
||||
@ -1463,7 +1463,7 @@ void do_global_buttons(unsigned short event)
|
||||
activate_fileselect(FILE_SPECIAL, "SELECT SOUND PATH", U.sounddir, filesel_u_sounddir);
|
||||
break;
|
||||
|
||||
case B_TEMPDIRFILESEL: /* is button uit space.c *info* */
|
||||
case B_TEMPDIRFILESEL: /* is button from space.c *info* */
|
||||
if(curarea->spacetype==SPACE_INFO) {
|
||||
sa= closest_bigger_area();
|
||||
areawinset(sa->win);
|
||||
@ -1476,7 +1476,7 @@ void do_global_buttons(unsigned short event)
|
||||
|
||||
|
||||
#ifdef INTERNATIONAL
|
||||
case B_LOADUIFONT: /* is button uit space.c *info* */
|
||||
case B_LOADUIFONT: /* is button from space.c *info* */
|
||||
if(curarea->spacetype==SPACE_INFO) {
|
||||
sa= closest_bigger_area();
|
||||
areawinset(sa->win);
|
||||
@ -1485,21 +1485,21 @@ void do_global_buttons(unsigned short event)
|
||||
activate_fileselect(FILE_SPECIAL, "LOAD UI FONT", buf, set_interface_font);
|
||||
break;
|
||||
|
||||
case B_SETLANGUAGE: /* is button uit space.c *info* */
|
||||
case B_SETLANGUAGE: /* is button from space.c *info* */
|
||||
lang_setlanguage();
|
||||
allqueue(REDRAWALL, 0);
|
||||
break;
|
||||
|
||||
case B_SETFONTSIZE: /* is button uit space.c *info* */
|
||||
case B_SETFONTSIZE: /* is button from space.c *info* */
|
||||
FTF_SetSize(U.fontsize);
|
||||
allqueue(REDRAWALL, 0);
|
||||
break;
|
||||
|
||||
case B_SETTRANSBUTS: /* is button uit space.c *info* */
|
||||
case B_SETTRANSBUTS: /* is button from space.c *info* */
|
||||
allqueue(REDRAWALL, 0);
|
||||
break;
|
||||
|
||||
case B_SETENCODING: /* is button uit space.c *info* */
|
||||
case B_SETENCODING: /* is button from space.c *info* */
|
||||
lang_setencoding();
|
||||
allqueue(REDRAWALL, 0);
|
||||
break;
|
||||
@ -1519,12 +1519,12 @@ void do_global_buttons(unsigned short event)
|
||||
if (OBACT && OBACT->type==OB_MBALL)
|
||||
makeDispList(OBACT);
|
||||
|
||||
/* redraw omdat naam veranderd is: nieuwe pup */
|
||||
/* redraw because name has changed: new pup */
|
||||
scrarea_queue_headredraw(curarea);
|
||||
allqueue(REDRAWBUTSHEAD, 0);
|
||||
allqueue(REDRAWINFO, 1);
|
||||
allqueue(REDRAWOOPS, 1);
|
||||
/* naam scene ook in set PUPmenu */
|
||||
/* name scene also in set PUPmenu */
|
||||
if ELEM(curarea->spacetype, SPACE_BUTS, SPACE_INFO) allqueue(REDRAWBUTSALL, 0);
|
||||
|
||||
allqueue(REDRAWHEADERS, 0);
|
||||
@ -1572,8 +1572,8 @@ void do_global_buttons2(short event)
|
||||
ID *idfrom;
|
||||
bAction *act;
|
||||
|
||||
/* algemeen: Single User mag als from==LOCAL
|
||||
* Make Local mag als (from==LOCAL && id==LIB)
|
||||
/* general: Single User is allowed when from==LOCAL
|
||||
* Make Local is allowed when (from==LOCAL && id==LIB)
|
||||
*/
|
||||
|
||||
ob= OBACT;
|
||||
@ -2024,9 +2024,9 @@ int buttons_do_unpack()
|
||||
|
||||
Scene *copy_scene(Scene *sce, int level)
|
||||
{
|
||||
/* level 0: alle objects shared
|
||||
* level 1: alle objectdata shared
|
||||
* level 2: volledige kopie
|
||||
/* level 0: al objects shared
|
||||
* level 1: al object-data shared
|
||||
* level 2: full copy
|
||||
*/
|
||||
Scene *scen;
|
||||
Base *base, *obase;
|
||||
@ -2127,22 +2127,22 @@ void do_info_buttons(unsigned short event)
|
||||
nr++;
|
||||
sc= sc->id.next;
|
||||
}
|
||||
/* laatste item: NEW SCREEN */
|
||||
/* last item: NEW SCREEN */
|
||||
if(sc==0) {
|
||||
duplicate_screen();
|
||||
}
|
||||
break;
|
||||
case B_INFODELSCR:
|
||||
/* dit event alleen met buttons doen, zodoende nooit vanuit full aanroepbaar */
|
||||
/* do this event only with buttons, so it can never be called with full-window */
|
||||
|
||||
if(G.curscreen->id.prev) sc= G.curscreen->id.prev;
|
||||
else if(G.curscreen->id.next) sc= G.curscreen->id.next;
|
||||
else return;
|
||||
if(okee("Delete current screen")) {
|
||||
/* vind nieuwe G.curscreen */
|
||||
/* find new G.curscreen */
|
||||
|
||||
oldscreen= G.curscreen;
|
||||
setscreen(sc); /* deze test of sc een full heeft */
|
||||
setscreen(sc); /* this test if sc has a full */
|
||||
unlink_screen(oldscreen);
|
||||
free_libblock(&G.main->screen, oldscreen);
|
||||
}
|
||||
@ -2175,7 +2175,7 @@ void do_info_buttons(unsigned short event)
|
||||
nr++;
|
||||
sce= sce->id.next;
|
||||
}
|
||||
/* laatste item: NEW SCENE */
|
||||
/* last item: NEW SCENE */
|
||||
if(sce==0) {
|
||||
nr= pupmenu("Add scene%t|Empty|Link Objects|Link ObData|Full Copy");
|
||||
if(nr<= 0) return;
|
||||
@ -2196,17 +2196,17 @@ void do_info_buttons(unsigned short event)
|
||||
else return;
|
||||
if(okee("Delete current scene")) {
|
||||
|
||||
/* alle sets aflopen */
|
||||
/* check all sets */
|
||||
sce1= G.main->scene.first;
|
||||
while(sce1) {
|
||||
if(sce1->set == G.scene) sce1->set= 0;
|
||||
sce1= sce1->id.next;
|
||||
}
|
||||
|
||||
/* alle sequences aflopen */
|
||||
/* check all sequences */
|
||||
clear_scene_in_allseqs(G.scene);
|
||||
|
||||
/* alle schermen */
|
||||
/* al screens */
|
||||
sc= G.main->screen.first;
|
||||
while(sc) {
|
||||
if(sc->scene == G.scene) sc->scene= sce;
|
||||
@ -3294,7 +3294,7 @@ static void info_text(int x, int y)
|
||||
fac3 = 0.9;
|
||||
} else {
|
||||
hsize = 124;
|
||||
/* promise! Never change these lines again! */
|
||||
/* promise! Never change these lines again! (zr & ton did!) */
|
||||
fac1= fabs(hashvectf[ 2*G.version+4]);
|
||||
fac2= 0.5+0.1*hashvectf[ G.version+3];
|
||||
fac3= 0.7;
|
||||
@ -3385,7 +3385,7 @@ void info_buttons(void)
|
||||
uiDefIconBut(block, LABEL, 0, ICON_PUBLISHER, xco+125, 0,XIC,YIC, 0, 0, 0, 0, 0, "");
|
||||
uiBlockSetEmboss(block, UI_EMBOSSX);
|
||||
|
||||
/* altijd als laatste doen */
|
||||
/* always do as last */
|
||||
curarea->headbutlen= xco+2*XIC;
|
||||
|
||||
if(curarea->headbutlen + 4*XIC < curarea->winx) {
|
||||
@ -3447,7 +3447,7 @@ void seq_buttons()
|
||||
/* IMAGE */
|
||||
uiDefIconButS(block, TOG, B_REDR, ICON_IMAGE_COL, xco+=XIC,0,XIC,YIC, &sseq->mainb, 0, 0, 0, 0, "Toggles image display");
|
||||
|
||||
/* ZOOM en BORDER */
|
||||
/* ZOOM and BORDER */
|
||||
xco+= XIC;
|
||||
uiDefIconButI(block, TOG, B_VIEW2DZOOM, ICON_VIEWZOOM, xco+=XIC,0,XIC,YIC, &viewmovetemp, 0, 0, 0, 0, "Zoom view (CTRL+MiddleMouse)");
|
||||
uiDefIconBut(block, BUT, B_IPOBORDER, ICON_BORDERMOVE, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Zoom view to area");
|
||||
@ -3466,7 +3466,7 @@ void do_view3d_buttons(short event)
|
||||
{
|
||||
int bit;
|
||||
|
||||
/* pas op: als curarea->win niet bestaat, afvangen als direkt tekenroutines worden aangeroepen */
|
||||
/* watch it: if curarea->win does not exist, check that when calling direct drawing routines */
|
||||
|
||||
switch(event) {
|
||||
case B_HOME:
|
||||
@ -3475,7 +3475,7 @@ void do_view3d_buttons(short event)
|
||||
case B_SCENELOCK:
|
||||
if(G.vd->scenelock) {
|
||||
G.vd->lay= G.scene->lay;
|
||||
/* layact zoeken */
|
||||
/* seek for layact */
|
||||
bit= 0;
|
||||
while(bit<32) {
|
||||
if(G.vd->lay & (1<<bit)) {
|
||||
@ -3662,7 +3662,7 @@ void do_view3d_buttons(short event)
|
||||
if(event>=B_LAY && event<B_LAY+31) {
|
||||
if(G.vd->lay!=0 && (G.qual & LR_SHIFTKEY)) {
|
||||
|
||||
/* wel actieve layer zoeken */
|
||||
/* but do find active layer */
|
||||
|
||||
bit= event-B_LAY;
|
||||
if( G.vd->lay & (1<<bit)) G.vd->layact= 1<<bit;
|
||||
@ -3727,10 +3727,10 @@ void do_layer_buttons(short event)
|
||||
}
|
||||
do_view3d_buttons(event+B_LAY);
|
||||
}
|
||||
/* redraw lijkt dubbelop: wordt in queue netjes afgehandeld */
|
||||
/* redraw seems double: but the queue nicely handles that */
|
||||
scrarea_queue_headredraw(curarea);
|
||||
|
||||
if(curarea->spacetype==SPACE_OOPS) allqueue(REDRAWVIEW3D, 1); /* 1==ook headwin */
|
||||
if(curarea->spacetype==SPACE_OOPS) allqueue(REDRAWVIEW3D, 1); /* 1==also do headwin */
|
||||
|
||||
}
|
||||
|
||||
@ -3904,7 +3904,7 @@ void view3d_buttons(void)
|
||||
uiDefIconButS(block, ICONROW, B_PERSP, ICON_ORTHO, xco+=XIC,0,XIC,YIC, &(G.vd->persp), 0.0, 2.0, 0, 0, "Perspective mode (NumPad 5, Numpad 0)");
|
||||
|
||||
xco+= XIC/2;
|
||||
/* AANZICHT */
|
||||
/* VIEW */
|
||||
|
||||
if(G.vd->view==7) G.vd->viewbut= 1;
|
||||
else if(G.vd->view==1) G.vd->viewbut= 2;
|
||||
@ -4053,7 +4053,7 @@ void do_ipo_buttons(short event)
|
||||
v2d->tot.xmax= EFRA;
|
||||
}
|
||||
|
||||
/* beetje uitzoomen */
|
||||
/* zoom out a bit */
|
||||
dx= 0.10*(v2d->tot.xmax-v2d->tot.xmin);
|
||||
dy= 0.10*(v2d->tot.ymax-v2d->tot.ymin);
|
||||
|
||||
@ -4114,7 +4114,7 @@ void do_ipo_buttons(short event)
|
||||
|
||||
break;
|
||||
case B_IPOSHOWKEY:
|
||||
/* waarde omkeren vanwege winqread */
|
||||
/* reverse value because of winqread */
|
||||
G.sipo->showkey= 1-G.sipo->showkey;
|
||||
ipo_toggle_showkey();
|
||||
scrarea_queue_headredraw(curarea);
|
||||
@ -4145,7 +4145,7 @@ void ipo_buttons(void)
|
||||
curarea->butspacetype= SPACE_IPO;
|
||||
uiDefIconButC(block, ICONROW,B_NEWSPACE, ICON_VIEW3D, 6,0,XIC,YIC, &(curarea->butspacetype), 1.0, SPACEICONMAX, 0, 0, "Current window type ");
|
||||
|
||||
test_editipo(); /* test of huidige editipo klopt, make_editipo zet de v2d->cur */
|
||||
test_editipo(); /* test if current editipo is OK, make_editipo sets v2d->cur */
|
||||
|
||||
/* FULL WINDOW en HOME */
|
||||
xco= 25;
|
||||
@ -4243,7 +4243,7 @@ void ipo_buttons(void)
|
||||
/* draw LOCK */
|
||||
uiDefIconButS(block, ICONTOG, 1, ICON_UNLOCKED, xco+=XIC,0,XIC,YIC, &(G.sipo->lock), 0, 0, 0, 0, "Lock redraw of other windows while editing");
|
||||
|
||||
/* altijd als laatste doen */
|
||||
/* always do as last */
|
||||
curarea->headbutlen= xco+2*XIC;
|
||||
|
||||
uiDrawBlock(block);
|
||||
@ -4313,7 +4313,7 @@ void do_buts_buttons(short event)
|
||||
case B_MATPASTE:
|
||||
if(matcopied && G.buts->lockpoin) {
|
||||
ma= G.buts->lockpoin;
|
||||
/* vrijgeven huidige mat */
|
||||
/* free current mat */
|
||||
for(a=0; a<8; a++) {
|
||||
mtex= ma->mtex[a];
|
||||
if(mtex && mtex->tex) mtex->tex->id.us--;
|
||||
@ -4529,7 +4529,7 @@ void buts_buttons(void)
|
||||
/* HOME */
|
||||
uiDefIconBut(block, BUT, B_BUTSHOME, ICON_HOME, xco+=XIC,0,XIC,YIC, 0, 0, 0, 0, 0, "Home (HOMEKEY)");
|
||||
|
||||
/* keuzemenu */
|
||||
/* choice menu */
|
||||
xco+= 2*XIC;
|
||||
uiDefIconButS(block, ROW, B_REDR, ICON_EYE, xco+=XIC, 0, 30, YIC, &(G.buts->mainb), 1.0, (float)BUTS_VIEW, 0, 0, "View buttons");
|
||||
uiDefIconButS(block, ROW, B_BUTSPREVIEW, ICON_LAMP, xco+=30, 0, 30, YIC, &(G.buts->mainb), 1.0, (float)BUTS_LAMP, 0, 0, "Lamp buttons (F4)");
|
||||
@ -4714,7 +4714,7 @@ void buts_buttons(void)
|
||||
|
||||
G.buts->mainbo= G.buts->mainb;
|
||||
|
||||
/* altijd als laatste doen */
|
||||
/* always do as last */
|
||||
uiDrawBlock(block);
|
||||
curarea->headbutlen= xco;
|
||||
}
|
||||
@ -4799,7 +4799,7 @@ void file_buttons(void)
|
||||
glRasterPos2i(xco, 5);
|
||||
BMF_DrawString(uiBlockGetCurFont(block), naam);
|
||||
}
|
||||
/* altijd als laatste doen */
|
||||
/* always do as last */
|
||||
curarea->headbutlen= xco+2*XIC;
|
||||
|
||||
uiDrawBlock(block);
|
||||
@ -4864,7 +4864,7 @@ void oops_buttons(void)
|
||||
uiDefIconBut(block, BUT, B_OOPSHOME, ICON_HOME, (short)(xco+=XIC),0,XIC,YIC, 0, 0, 0, 0, 0, "Home (HOMEKEY)");
|
||||
xco+= XIC;
|
||||
|
||||
/* ZOOM en BORDER */
|
||||
/* ZOOM and BORDER */
|
||||
xco+= XIC;
|
||||
uiDefIconButI(block, TOG, B_VIEW2DZOOM, ICON_VIEWZOOM, (short)(xco+=XIC),0,XIC,YIC, &viewmovetemp, 0, 0, 0, 0, "Zoom view (CTRL+MiddleMouse)");
|
||||
uiDefIconBut(block, BUT, B_IPOBORDER, ICON_BORDERMOVE, (short)(xco+=XIC),0,XIC,YIC, 0, 0, 0, 0, 0, "Zoom view to area");
|
||||
@ -4885,7 +4885,7 @@ void oops_buttons(void)
|
||||
uiDefIconButS(block, TOG|BIT|12, B_NEWOOPS, ICON_IMAGE_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Display Image data");
|
||||
uiDefIconButS(block, TOG|BIT|11, B_NEWOOPS, ICON_LIBRARY_HLT, (short)(xco+=XIC),0,XIC,YIC, &soops->visiflag, 0, 0, 0, 0, "Display Library data");
|
||||
|
||||
/* naam */
|
||||
/* name */
|
||||
if(G.soops->lockpoin) {
|
||||
oops= G.soops->lockpoin;
|
||||
if(oops->type==ID_LI) strcpy(naam, ((Library *)oops->id)->name);
|
||||
@ -4897,7 +4897,7 @@ void oops_buttons(void)
|
||||
|
||||
}
|
||||
|
||||
/* altijd als laatste doen */
|
||||
/* always do as last */
|
||||
curarea->headbutlen= xco+2*XIC;
|
||||
|
||||
uiDrawBlock(block);
|
||||
@ -5214,7 +5214,7 @@ void do_sound_buttons(unsigned short event)
|
||||
idtest= idtest->next;
|
||||
}
|
||||
|
||||
if(idtest==0) { /* geen new */
|
||||
if(idtest==0) { /* no new */
|
||||
return;
|
||||
}
|
||||
|
||||
@ -5330,7 +5330,7 @@ void sound_buttons(void)
|
||||
/* ******************** SOUND ********************** */
|
||||
/* ******************** IMAGE ********************** */
|
||||
|
||||
void load_space_image(char *str) /* aangeroepen vanuit fileselect */
|
||||
void load_space_image(char *str) /* called from fileselect */
|
||||
{
|
||||
Image *ima=0;
|
||||
|
||||
@ -5344,7 +5344,7 @@ void load_space_image(char *str) /* aangeroepen vanuit fileselect */
|
||||
|
||||
G.sima->image= ima;
|
||||
|
||||
free_image_buffers(ima); /* forceer opnieuw inlezen */
|
||||
free_image_buffers(ima); /* force read again */
|
||||
ima->ok= 1;
|
||||
image_changed(G.sima, 0);
|
||||
|
||||
@ -5388,7 +5388,7 @@ void image_replace(Image *old, Image *new)
|
||||
else error("Nothing replaced");
|
||||
}
|
||||
|
||||
void replace_space_image(char *str) /* aangeroepen vanuit fileselect */
|
||||
void replace_space_image(char *str) /* called from fileselect */
|
||||
{
|
||||
Image *ima=0;
|
||||
|
||||
@ -5406,9 +5406,9 @@ void replace_space_image(char *str) /* aangeroepen vanuit fileselect */
|
||||
|
||||
G.sima->image= ima;
|
||||
|
||||
free_image_buffers(ima); /* forceer opnieuw inlezen */
|
||||
free_image_buffers(ima); /* force read again */
|
||||
ima->ok= 1;
|
||||
/* replace kent ook toe: */
|
||||
/* replace also assigns: */
|
||||
image_changed(G.sima, 0);
|
||||
|
||||
}
|
||||
@ -5478,7 +5478,7 @@ void do_image_buttons(unsigned short event)
|
||||
nr++;
|
||||
idtest= idtest->next;
|
||||
}
|
||||
if(idtest==0) { /* geen new */
|
||||
if(idtest==0) { /* no new */
|
||||
return;
|
||||
}
|
||||
|
||||
@ -5487,7 +5487,7 @@ void do_image_buttons(unsigned short event)
|
||||
if(idtest->us==0) idtest->us= 1;
|
||||
allqueue(REDRAWIMAGE, 0);
|
||||
}
|
||||
image_changed(G.sima, 0); /* ook als image gelijk is: assign! 0==geen tileflag */
|
||||
image_changed(G.sima, 0); /* also when image is the same: assign! 0==no tileflag */
|
||||
|
||||
break;
|
||||
case B_SIMAGELOAD:
|
||||
@ -5523,7 +5523,7 @@ void do_image_buttons(unsigned short event)
|
||||
break;
|
||||
|
||||
case B_SIMAGEDRAW1:
|
||||
image_changed(G.sima, 2); /* 2: alleen tileflag */
|
||||
image_changed(G.sima, 2); /* 2: only tileflag */
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
allqueue(REDRAWIMAGE, 0);
|
||||
break;
|
||||
@ -5743,9 +5743,9 @@ void imasel_buttons(void)
|
||||
uiDefIconButS(block, TOG|BIT|0, B_REDR, ICON_BPIBFOLDERGREY, xco+=XIC,0,XIC,YIC, &simasel->mode, 0, 0, 0, 0, "");/* dir */
|
||||
uiDefIconButS(block, TOG|BIT|1, B_REDR, ICON_INFO, xco+=XIC,0,XIC,YIC, &simasel->mode, 0, 0, 0, 0, "");/* info */
|
||||
uiDefIconButS(block, TOG|BIT|2, B_REDR, ICON_IMAGE_COL, xco+=XIC,0,XIC,YIC, &simasel->mode, 0, 0, 0, 0, "");/* image */
|
||||
uiDefIconButS(block, TOG|BIT|3, B_REDR, ICON_MAGNIFY, xco+=XIC,0,XIC,YIC, &simasel->mode, 0, 0, 0, 0, "");/* loep */
|
||||
uiDefIconButS(block, TOG|BIT|3, B_REDR, ICON_MAGNIFY, xco+=XIC,0,XIC,YIC, &simasel->mode, 0, 0, 0, 0, "");/* magnify */
|
||||
|
||||
/* altijd als laatste doen */
|
||||
/* always do as last */
|
||||
curarea->headbutlen= xco+2*XIC;
|
||||
|
||||
uiDrawBlock(block);
|
||||
@ -5753,7 +5753,7 @@ void imasel_buttons(void)
|
||||
|
||||
/* ********************** IMASEL ****************************** */
|
||||
|
||||
/* ******************** ALGEMEEN ********************** */
|
||||
/* ******************** GENERAL ********************** */
|
||||
|
||||
void do_headerbuttons(short event)
|
||||
{
|
||||
|
@ -550,7 +550,7 @@ void get_next_image(SpaceImaSel *simasel)
|
||||
|
||||
IMB_converttocmap(ibuf);
|
||||
|
||||
/* copy ibuf->rect naar ima->pict_rect */
|
||||
/* copy ibuf->rect to ima->pict_rect */
|
||||
size = ima->dw * ima->dh; if (size > 3968) size = 3968;
|
||||
longtochar(ima->pict_rect, ibuf->rect, size);
|
||||
|
||||
@ -901,8 +901,8 @@ void change_imadir(SpaceImaSel *simasel)
|
||||
void check_imasel_copy(SpaceImaSel *simasel)
|
||||
{
|
||||
|
||||
/* LET OP: wordt ook gebruikt bij inlezen blender file */
|
||||
/* dingen op nul zetten, opnieuw malloccen etc */
|
||||
/* WATCH IT: also used when reading blender file */
|
||||
/* initialize stuff, malloc, etc */
|
||||
simasel->first_sel_ima = 0;
|
||||
simasel->hilite_ima = 0;
|
||||
simasel->firstdir = 0;
|
||||
@ -916,7 +916,7 @@ void check_imasel_copy(SpaceImaSel *simasel)
|
||||
|
||||
void free_imasel(SpaceImaSel *simasel)
|
||||
{
|
||||
/* NIET de imasel zelf vrijgeven */
|
||||
/* do not free imasel itself */
|
||||
|
||||
clear_ima_dir(simasel);
|
||||
IMB_freeImBuf(simasel->cmap);
|
||||
|
@ -288,7 +288,7 @@ static uiSaveUnder *ui_save_under(int x, int y, int sx, int sy)
|
||||
/* ************* DRAW ************** */
|
||||
|
||||
|
||||
static void ui_graphics_to_window(int win, float *x, float *y) /* voor rectwrite b.v. */
|
||||
static void ui_graphics_to_window(int win, float *x, float *y) /* for rectwrite */
|
||||
{
|
||||
float gx, gy;
|
||||
int sx, sy;
|
||||
@ -305,7 +305,7 @@ static void ui_graphics_to_window(int win, float *x, float *y) /* voor rectwrite
|
||||
|
||||
|
||||
|
||||
static void ui_window_to_graphics(int win, float *x, float *y) /* voor muiscursor b.v. */
|
||||
static void ui_window_to_graphics(int win, float *x, float *y) /* for mouse cursor */
|
||||
{
|
||||
float a, b, c, d, e, f, px, py;
|
||||
int getsizex, getsizey;
|
||||
@ -343,7 +343,7 @@ static uiSaveUnder *ui_bgnpupdraw(int startx, int starty, int endx, int endy, in
|
||||
|
||||
mywinset(G.curscreen->mainwin);
|
||||
|
||||
/* pietsje groter, 1 pixel aan de rand */
|
||||
/* tinsy bit larger, 1 pixel on the edge */
|
||||
|
||||
glReadBuffer(GL_FRONT);
|
||||
glDrawBuffer(GL_FRONT);
|
||||
@ -650,7 +650,7 @@ static void ui_emboss_slider(uiBut *but, float fac)
|
||||
glColor3ub(0,0,0);
|
||||
ui_draw_outlineX(but->x1+1, but->y1+1, but->x2-1, but->y2-1, but->aspect);
|
||||
|
||||
/* het blokje */
|
||||
/* the box */
|
||||
if(but->flag & UI_SELECT) BIF_set_color(but->col, COLORSHADE_LIGHT);
|
||||
else BIF_set_color(but->col, COLORSHADE_GREY);
|
||||
glRects(but->x1+fac, but->y1+1, but->x1+fac+h, but->y2-1);
|
||||
@ -886,7 +886,7 @@ static void ui_draw_but(uiBut *but)
|
||||
case ICONROW:
|
||||
ui_draw_but_BUT(but);
|
||||
|
||||
/* teken pijltjes, icon is standaard RGB */
|
||||
/* draw arriws, icon is standard RGB */
|
||||
a= (but->y1+but->y2)/2;
|
||||
|
||||
glColor3ub(0,0,0);
|
||||
@ -909,7 +909,7 @@ static void ui_draw_but(uiBut *but)
|
||||
|
||||
ui_draw_but_BUT(but);
|
||||
|
||||
/* als er ruimte is: teken symbooltje */
|
||||
/* when sufficient space: darw symbols */
|
||||
if(but->strwidth+10 < but->x2-but->x1) {
|
||||
int h;
|
||||
|
||||
@ -929,7 +929,7 @@ static void ui_draw_but(uiBut *but)
|
||||
|
||||
ui_draw_but_BUT(but);
|
||||
|
||||
/* de slider */
|
||||
/* the slider */
|
||||
|
||||
x1= but->x1; x2= but->x2;
|
||||
y1= but->y1; y2= but->y2;
|
||||
@ -2229,7 +2229,7 @@ static int ui_do_but_SLI(uiBut *but)
|
||||
ui_check_but(but);
|
||||
ui_draw_but(but);
|
||||
|
||||
if(but->a1) { /* colornummer */
|
||||
if(but->a1) { /* color number */
|
||||
uiBut *bt= but->prev;
|
||||
while(bt) {
|
||||
if(bt->retval == but->a1) ui_draw_but(bt);
|
||||
@ -2253,7 +2253,7 @@ static int ui_do_but_SLI(uiBut *but)
|
||||
}
|
||||
|
||||
|
||||
if(temp!=32767 && pos==0) { /* plus 1 of min 1 */
|
||||
if(temp!=32767 && pos==0) { /* plus 1 or minus 1 */
|
||||
|
||||
if( but->type==SLI) f= (float)(mval[0]-but->x1)/(but->x2-but->x1-h);
|
||||
else f= (float)(mval[0]- (but->x1+but->x2)/2)/( (but->x2-but->x1)/2 - h);
|
||||
@ -2286,8 +2286,8 @@ static int ui_do_but_SLI(uiBut *but)
|
||||
static int ui_do_but_NUMSLI(uiBut *but)
|
||||
{
|
||||
short mval[2];
|
||||
|
||||
/* eerste bepalen of het slider is of textbut */
|
||||
|
||||
/* first define if it's a slider or textbut */
|
||||
uiGetMouse(mywinget(), mval);
|
||||
|
||||
if(mval[0]>= -6+(but->x1+but->x2)/2 ) { /* slider */
|
||||
@ -2631,7 +2631,7 @@ static int ui_do_button(uiBlock *block, uiBut *but, uiEvent *uevent)
|
||||
}
|
||||
}
|
||||
else {
|
||||
if( but->pointype ) { /* er is pointer nodig */
|
||||
if( but->pointype ) { /* er there a pointer needed */
|
||||
if(but->poin==0 ) {
|
||||
printf("DoButton pointer error: %s\n",but->str);
|
||||
return 0;
|
||||
@ -3098,7 +3098,7 @@ static uiSaveUnder *ui_draw_but_tip(uiBut *but)
|
||||
glColor3ub(0xD0, 0xD0, 0xC0);
|
||||
glRectf(x1, y1, x2, y2);
|
||||
|
||||
/* below */
|
||||
/* bottom */
|
||||
glColor3ub(0,0,0);
|
||||
fdrawline(x1, y1, x2, y1);
|
||||
/* right */
|
||||
@ -3318,7 +3318,7 @@ static void ui_set_but_val(uiBut *but, double value)
|
||||
if(but->pointype==0) return;
|
||||
poin= but->poin;
|
||||
|
||||
/* value is een hsvwaarde: omzetten naar de rgb */
|
||||
/* value is a hsv value: convert to rgb */
|
||||
if( but->type==HSVSLI ) {
|
||||
float h, s, v, *fp= (float *)but->poin;
|
||||
|
||||
@ -3622,9 +3622,9 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, char *str, short
|
||||
uiBut *but;
|
||||
short slen;
|
||||
|
||||
if(type & BUTPOIN) { /* er is pointer nodig */
|
||||
if(type & BUTPOIN) { /* a pointer is required */
|
||||
if(poin==0) {
|
||||
/* als pointer nul is wordt button gewist en niet gedefinieerd */
|
||||
/* if pointer is zero, button is removed and not drawn */
|
||||
BIF_set_color(block->col, COLORSHADE_MEDIUM);
|
||||
glRects(x1, y1, x1+x2, y1+y2);
|
||||
return NULL;
|
||||
@ -3693,7 +3693,7 @@ static uiBut *ui_def_but(uiBlock *block, int type, int retval, char *str, short
|
||||
|
||||
but->pos= -1; /* cursor invisible */
|
||||
|
||||
if(but->type==NUM) { /* spatie toevoegen achter naam */
|
||||
if(but->type==NUM) { /* add a space to name */
|
||||
slen= strlen(but->str);
|
||||
if(slen>0 && slen<UI_MAX_NAME_STR-2) {
|
||||
if(but->str[slen-1]!=' ') {
|
||||
|
@ -28,9 +28,11 @@
|
||||
* Contributor(s): none yet.
|
||||
*
|
||||
* ***** END GPL/BL DUAL LICENSE BLOCK *****
|
||||
* vervanging voor een aantal fie's zoals swinopen, winset, (zie onder)
|
||||
* dit alles omdat GL en X te traag zijn
|
||||
* feb: Opengl en toch maar naar X!
|
||||
*
|
||||
*
|
||||
* for compatibility with old iris code, replacement of swinopen, winset, etc
|
||||
* btw: subwindows in X are way too slow, tried it, and choose for my own system... (ton)
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
@ -110,8 +112,6 @@ void mywindow_init_mainwin(Window *win, int orx, int ory, int sizex, int sizey)
|
||||
|
||||
/* XXXXXXXXXXXXXXXX very hacky, not allowed to release
|
||||
* again after 2.24
|
||||
*
|
||||
* Nah ha! And you thought you'd be in business that long!
|
||||
*/
|
||||
void mywindow_build_and_set_renderwin(void)
|
||||
{
|
||||
@ -405,7 +405,7 @@ void mywinclose(int winid)
|
||||
if (curswin==winid) curswin= 0;
|
||||
}
|
||||
|
||||
void mywinposition(int winid, int xmin, int xmax, int ymin, int ymax) /* let op: andere syntax */
|
||||
void mywinposition(int winid, int xmin, int xmax, int ymin, int ymax) /* watch: syntax differs from iris */
|
||||
{
|
||||
bWindow *win= bwin_from_winid(winid);
|
||||
|
||||
@ -564,7 +564,7 @@ void myswapbuffers(void)
|
||||
}
|
||||
|
||||
|
||||
/* *********************** PATTERNS ENZO ***************** */
|
||||
/* *********************** PATTERNS ETC ***************** */
|
||||
|
||||
void setlinestyle(int nr)
|
||||
{
|
||||
@ -610,7 +610,7 @@ void my_get_frontbuffer_image(int x, int y, int sx, int sy)
|
||||
}
|
||||
|
||||
#ifdef WIN32
|
||||
/* ander coordinatensysteem! */
|
||||
/* different coord system! */
|
||||
y= (G.curscreen->sizey-y);
|
||||
|
||||
if(curswin>3) {
|
||||
|
@ -93,11 +93,11 @@ Oops *find_oops(ID *id)
|
||||
{
|
||||
Oops *oops;
|
||||
|
||||
/* op zoek naar een oops met dit ID */
|
||||
/* searching for an oops with this ID */
|
||||
oops= G.soops->oops.first;
|
||||
while(oops) {
|
||||
if(oops->id == id) {
|
||||
/* deze fout kwam een keer voor. beveiliging kan geen kwaad */
|
||||
/* this error once happened. securing it doesnt harm */
|
||||
if(oops->type != GS(id->name)) oops->id= 0;
|
||||
else break;
|
||||
}
|
||||
@ -108,7 +108,7 @@ Oops *find_oops(ID *id)
|
||||
|
||||
int test_oops(Oops *oops)
|
||||
{
|
||||
/* test of de eigen ID block nog bestaat */
|
||||
/* test if own ID block still exists */
|
||||
ListBase *lb;
|
||||
ID *id;
|
||||
|
||||
@ -129,7 +129,7 @@ int test_oops(Oops *oops)
|
||||
|
||||
void test_oopslinko(OopsLink *ol)
|
||||
{
|
||||
/* test of links bestaan */
|
||||
/* test if links exist */
|
||||
Oops *oops;
|
||||
ListBase *lb;
|
||||
ID *id, *from;
|
||||
@ -149,11 +149,11 @@ void test_oopslinko(OopsLink *ol)
|
||||
}
|
||||
|
||||
if(id==0) {
|
||||
/* ID bestaat niet meer */
|
||||
/* ID does not exist anymore */
|
||||
*ol->idfrom= 0;
|
||||
}
|
||||
else {
|
||||
/* op zoek naar een oops met dit ID */
|
||||
/* search for oops with this ID */
|
||||
oops= G.soops->oops.first;
|
||||
while(oops) {
|
||||
if(oops->id == id) break;
|
||||
@ -166,7 +166,7 @@ void test_oopslinko(OopsLink *ol)
|
||||
|
||||
void test_oopslink(OopsLink *ol)
|
||||
{
|
||||
/* test of links bestaan */
|
||||
/* test if links exist */
|
||||
Oops *oops;
|
||||
ID *from;
|
||||
|
||||
@ -177,7 +177,7 @@ void test_oopslink(OopsLink *ol)
|
||||
|
||||
if(from==0) return;
|
||||
|
||||
/* op zoek naar een oops met dit ID */
|
||||
/* search for oops with this ID */
|
||||
oops= G.soops->oops.first;
|
||||
while(oops) {
|
||||
if(oops->id == from) break;
|
||||
@ -195,7 +195,7 @@ OopsLink *add_oopslink(char *name, Oops *oops, short type, void *from, float xof
|
||||
|
||||
if(G.soops==0) return NULL;
|
||||
|
||||
/* testen offie al bestaat: een andere manier mag ook (linkbuffer) */
|
||||
/* testing if it exsists: */
|
||||
/* ol= oops->link.first; */
|
||||
/* while(ol) { */
|
||||
/* if(ol->idfrom == from) { */
|
||||
@ -210,7 +210,7 @@ OopsLink *add_oopslink(char *name, Oops *oops, short type, void *from, float xof
|
||||
|
||||
if(* ((int *)from) == 0) return NULL;
|
||||
|
||||
/* nieuwe maken */
|
||||
/* make new */
|
||||
ol= MEM_callocN(sizeof(OopsLink), "oopslink");
|
||||
|
||||
BLI_addtail(&oops->link, ol);
|
||||
@ -236,7 +236,7 @@ int oops_test_overlap(Oops *test)
|
||||
|
||||
oops= G.soops->oops.first;
|
||||
while(oops) {
|
||||
if(oops!=test) { /* niet op hide testen: is slechts tijdelijke flag */
|
||||
if(oops!=test) { /* do net test for hide: is only a temporal flag */
|
||||
|
||||
ro.xmin= oops->x;
|
||||
ro.xmax= (float)(oops->x+OOPSX);
|
||||
@ -264,7 +264,7 @@ int oops_test_overlaphide(Oops *test)
|
||||
|
||||
oops= G.soops->oops.first;
|
||||
while(oops) {
|
||||
if(oops->hide==0 && oops!=test) { /* wel op hide testen, niet gebruiken tijdens build_oops */
|
||||
if(oops->hide==0 && oops!=test) { /* do test for hide, but not use it during build_oops */
|
||||
|
||||
ro.xmin= oops->x;
|
||||
ro.xmax= (float)(oops->x+OOPSX);
|
||||
@ -320,7 +320,7 @@ void shuffle_oops()
|
||||
int go= 1, tot=0, dir=1, type1, type2;
|
||||
|
||||
|
||||
/* we nemen twee oopsen, berkekenen de 'beauty' en de verwisselde beauty */
|
||||
/* we take two oopses, calc the 'beauty' and the exchanged beauty */
|
||||
|
||||
if(G.soops==0) return;
|
||||
|
||||
@ -328,9 +328,9 @@ void shuffle_oops()
|
||||
|
||||
waitcursor(1);
|
||||
|
||||
/* om de zaak 100% OK en snel te doen: voegen tijdelijk
|
||||
* aan de ooplinklijst - per oops - de 'from' links ook in.
|
||||
* Wel weer vrijgeven!
|
||||
/* to make it 100% OK and fast: temporal insert
|
||||
* to the ooplinklist - per oops - the 'from' links.
|
||||
* Don't forget to free!
|
||||
*/
|
||||
|
||||
oops= G.soops->oops.first;
|
||||
@ -360,7 +360,7 @@ void shuffle_oops()
|
||||
while(oops) {
|
||||
|
||||
if(oops->link.first && oops->hide==0 && (oops->flag & SELECT)) {
|
||||
/* vind een goed verwisselbaar paar */
|
||||
/* find a good exchangable pair */
|
||||
olen= oopslink_totlen(oops);
|
||||
|
||||
if(dir) o2= oops->prev;
|
||||
@ -407,7 +407,7 @@ void shuffle_oops()
|
||||
}
|
||||
waitcursor(0);
|
||||
|
||||
/* from links vrijgeven */
|
||||
/* free the from links */
|
||||
oops= G.soops->oops.first;
|
||||
while(oops) {
|
||||
if(oops->hide==0) {
|
||||
@ -554,7 +554,7 @@ void new_oops_location(Oops *new)
|
||||
|
||||
correct_oops_y(new);
|
||||
|
||||
/* vanuit centrum vrije plek vinden */
|
||||
/* find from center free location */
|
||||
dirvec[cnt & 3][0]= 1.2*OOPSX;
|
||||
dirvec[cnt & 3][1]= 0;
|
||||
cnt++;
|
||||
@ -621,7 +621,7 @@ void new_oops_location(Oops *new)
|
||||
}
|
||||
|
||||
|
||||
void free_oops(Oops *oops) /* ook oops zelf */
|
||||
void free_oops(Oops *oops) /* also oops itself */
|
||||
{
|
||||
BLI_freelistN(&oops->link);
|
||||
MEM_freeN(oops);
|
||||
@ -754,7 +754,7 @@ Oops *add_test_oops(void *id) /* incl links */
|
||||
|
||||
if(id==0) return NULL;
|
||||
|
||||
/* eerst test ofie al bestaat */
|
||||
/* test if it exists */
|
||||
oops= find_oops(id);
|
||||
|
||||
if(oops) {
|
||||
@ -788,7 +788,7 @@ Oops *add_test_oops(void *id) /* incl links */
|
||||
add_mball_oopslinks((MetaBall *)id, oops, G.soops->visiflag);
|
||||
break;
|
||||
case ID_LA:
|
||||
/* textures nog doen */
|
||||
/* still do textures */
|
||||
la= (Lamp *)id;
|
||||
if(la->ipo) if(G.soops->visiflag & OOPS_IP) add_oopslink("ipo", oops, ID_IP, &la->ipo, OOPSX, (float)(0.3*OOPSY));
|
||||
break;
|
||||
@ -827,7 +827,7 @@ void build_oops()
|
||||
Object *ob;
|
||||
short a, type;
|
||||
|
||||
/* altijd alles bouwen! */
|
||||
/* always build it all! */
|
||||
|
||||
if(G.soops==0) return;
|
||||
|
||||
@ -837,14 +837,14 @@ void build_oops()
|
||||
oops->hide= 1;
|
||||
oops->flag &= ~OOPS_REFER;
|
||||
|
||||
BLI_freelistN(&oops->link); /* veel veiliger */
|
||||
BLI_freelistN(&oops->link); /* much safer */
|
||||
|
||||
oops= oops->next;
|
||||
}
|
||||
|
||||
/* oopsen maken,is ook testen of ie al bestaat */
|
||||
/* make oops, includes testing for existance */
|
||||
|
||||
/* altijd */
|
||||
/* awlays */
|
||||
if(G.soops->visiflag & OOPS_LI) {
|
||||
Library *li= G.main->library.first;
|
||||
while(li) {
|
||||
@ -853,7 +853,7 @@ void build_oops()
|
||||
}
|
||||
}
|
||||
|
||||
/* rest op twee manieren: of alles (OOPS_SCE) of alleen gebruikt in deze scene */
|
||||
/* the rest in 2 ways: or everything (OOPS_SCE) or only the ones in this scene */
|
||||
|
||||
if(G.soops->visiflag & OOPS_SCE) {
|
||||
Scene *sce= G.main->scene.first;
|
||||
@ -947,7 +947,7 @@ void build_oops()
|
||||
}
|
||||
else {
|
||||
|
||||
/* alleen blokken uit huidige scene */
|
||||
/* only blocks from this scene */
|
||||
|
||||
base= FIRSTBASE;
|
||||
while(base) {
|
||||
@ -1031,7 +1031,7 @@ void build_oops()
|
||||
|
||||
|
||||
|
||||
/* links testen */
|
||||
/* test links */
|
||||
oops= G.soops->oops.first;
|
||||
while(oops) {
|
||||
if(oops->hide==0) {
|
||||
|
@ -707,7 +707,7 @@ void playanim(int argc, char **argv)
|
||||
pupdate_time();
|
||||
|
||||
if (picture && next) {
|
||||
/* altijd minstens 1 stap zetten */
|
||||
/* always at least set one step */
|
||||
while (picture){
|
||||
if (next < 0) picture = picture->prev;
|
||||
else picture = picture->next;
|
||||
|
@ -267,7 +267,7 @@ static void display_pr_scanline(unsigned int *rect, int recty)
|
||||
|
||||
rect+= (recty-2)*PR_RECTX;
|
||||
|
||||
/* iets meer uitvergroten in y om GL/mesa bugje te verhelpen */
|
||||
/* enlarge a bit in the y direction, to avoid GL/mesa bug */
|
||||
glPixelZoom(pr_facx, pr_facy);
|
||||
|
||||
glRasterPos2f( (float)PR_XMIN+0.5, 1.0+(float)PR_YMIN + (recty*PR_FACY) );
|
||||
@ -404,7 +404,7 @@ static void lamp_preview_pixel(LampRen *la, int x, int y, char *rect)
|
||||
else {
|
||||
t= inpr-t;
|
||||
if(t<la->spotbl && la->spotbl!=0.0) {
|
||||
/* zachte gebied */
|
||||
/* soft area */
|
||||
i= t/la->spotbl;
|
||||
t= i*i;
|
||||
i= t*i;
|
||||
@ -540,7 +540,7 @@ static void texture_preview_pixel(Tex *tex, int x, int y, char *rect)
|
||||
texvec[0]= 0.5+v1*x;
|
||||
texvec[1]= 0.5+v1*y;
|
||||
|
||||
/* geen coordmapping, uitzondering: repeat */
|
||||
/* no coordinate mapping, exception: repeat */
|
||||
if(tex->xrepeat>1) {
|
||||
texvec[0] *= tex->xrepeat;
|
||||
if(texvec[0]>1.0) texvec[0] -= (int)(texvec[0]);
|
||||
@ -585,7 +585,7 @@ static void texture_preview_pixel(Tex *tex, int x, int y, char *rect)
|
||||
texvec[2]= 0.0;
|
||||
}
|
||||
|
||||
/* geeft geen Tin terug */
|
||||
/* does not return Tin */
|
||||
if(tex->type==TEX_STUCCI) {
|
||||
tex->nor= R.vn;
|
||||
R.vn[0]= 1.0;
|
||||
@ -659,7 +659,7 @@ static void shade_preview_pixel(float *vec,
|
||||
|
||||
R.refcol[0]= R.refcol[1]= R.refcol[2]= R.refcol[3]= 0.0;
|
||||
|
||||
/* texture afhandeling */
|
||||
/* texture handling */
|
||||
if(mat->texco) {
|
||||
|
||||
VECCOPY(R.lo, vec);
|
||||
@ -838,7 +838,7 @@ void BIF_previewrender(SpaceButs *sbuts)
|
||||
if ELEM4(sbuts->mainb, BUTS_MAT, BUTS_TEX, BUTS_LAMP, BUTS_WORLD);
|
||||
else return;
|
||||
|
||||
har.flarec= 0; /* verderop test op postrender flare */
|
||||
har.flarec= 0; /* below is a test for postrender flare */
|
||||
|
||||
if(qtest()) {
|
||||
addafterqueue(curarea->win, RENDERPREVIEW, 1);
|
||||
@ -895,12 +895,12 @@ void BIF_previewrender(SpaceButs *sbuts)
|
||||
if(ob==0 || ob->type!=OB_LAMP) return;
|
||||
la= ob->data;
|
||||
init_render_world();
|
||||
init_render_textures(); /* ze mogen niet twee keer!! (brightness) */
|
||||
init_render_textures(); /* do not do it twice!! (brightness) */
|
||||
R.totlamp= 0;
|
||||
RE_add_render_lamp(ob, 0); /* 0=no shadbuf */
|
||||
lar= R.la[0];
|
||||
|
||||
/* uitzonderingen: */
|
||||
/* exceptions: */
|
||||
lar->spottexfac= 1.0;
|
||||
lar->spotsi= cos( M_PI/3.0 );
|
||||
lar->spotbl= (1.0-lar->spotsi)*la->spotblend;
|
||||
|
@ -668,7 +668,7 @@ static void do_render(View3D *ogl_render_view3d, int anim, int force_dispwin)
|
||||
|
||||
G.afbreek= 0;
|
||||
if(G.obedit && !(G.scene->r.scemode & R_OGL)) {
|
||||
exit_editmode(0); /* 0 = geen freedata */
|
||||
exit_editmode(0); /* 0 = no free data */
|
||||
}
|
||||
|
||||
if(anim) {
|
||||
|
@ -111,7 +111,7 @@ void write_screendump(char *name)
|
||||
|
||||
void BIF_screendump(void)
|
||||
{
|
||||
/* dump pakken van frontbuffer */
|
||||
/* get dump from frontbuffer */
|
||||
int x=0, y=0;
|
||||
char imstr[32];
|
||||
|
||||
@ -147,7 +147,7 @@ void BIF_screendump(void)
|
||||
glReadBuffer(GL_FRONT);
|
||||
glReadPixels(x, y, dumpsx, dumpsy, GL_RGBA, GL_UNSIGNED_BYTE, dumprect);
|
||||
|
||||
/* filesel openen */
|
||||
/* open filesel */
|
||||
|
||||
activate_fileselect(FILE_SPECIAL, imstr, G.ima, write_screendump);
|
||||
}
|
||||
|
@ -70,21 +70,21 @@
|
||||
#include "BSE_headerbuttons.h"
|
||||
#include "BSE_sequence.h"
|
||||
|
||||
#include "interface.h" /* MAART: for INT and FLO types */
|
||||
#include "interface.h" /* for INT and FLO types */
|
||||
#include "blendef.h"
|
||||
#include "render.h"
|
||||
|
||||
Sequence *seq_arr[MAXSEQ+1];
|
||||
int seqrectx, seqrecty;
|
||||
|
||||
/* Alle support voor plugin sequences: */
|
||||
/* support for plugin sequences: */
|
||||
|
||||
void open_plugin_seq(PluginSeq *pis, char *seqname)
|
||||
{
|
||||
int (*version)();
|
||||
char *cp;
|
||||
|
||||
/* voor zekerheid: (hier wordt op getest) */
|
||||
/* to be sure: (is tested for) */
|
||||
pis->doit= 0;
|
||||
pis->pname= 0;
|
||||
pis->varstr= 0;
|
||||
@ -158,7 +158,7 @@ PluginSeq *add_plugin_seq(char *str, char *seqname)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* default waardes */
|
||||
/* default values */
|
||||
varstr= pis->varstr;
|
||||
for(a=0; a<pis->vars; a++, varstr++) {
|
||||
if( (varstr->type & FLO)==FLO)
|
||||
@ -175,7 +175,7 @@ void free_plugin_seq(PluginSeq *pis)
|
||||
|
||||
if(pis==0) return;
|
||||
|
||||
/* geen PIL_dynlib_close: dezelfde plugin kan meerdere keren geopend zijn: 1 handle */
|
||||
/* no PIL_dynlib_close: same plugin can be opened multiple times with 1 handle */
|
||||
MEM_freeN(pis);
|
||||
}
|
||||
|
||||
@ -306,23 +306,23 @@ void calc_sequence(Sequence *seq)
|
||||
Sequence *seqm;
|
||||
int min, max;
|
||||
|
||||
/* eerst recursief alle meta's aflopen */
|
||||
/* check all metas recursively */
|
||||
seqm= seq->seqbase.first;
|
||||
while(seqm) {
|
||||
if(seqm->seqbase.first) calc_sequence(seqm);
|
||||
seqm= seqm->next;
|
||||
}
|
||||
|
||||
/* effecten: en meta automatische start en end */
|
||||
/* effects and meta: automatic start and end */
|
||||
|
||||
if(seq->type & SEQ_EFFECT) {
|
||||
/* pointers */
|
||||
if(seq->seq2==0) seq->seq2= seq->seq1;
|
||||
if(seq->seq3==0) seq->seq3= seq->seq1;
|
||||
|
||||
/* effecten gaan van seq1 -> seq2: testen */
|
||||
/* effecten go from seq1 -> seq2: test */
|
||||
|
||||
/* we nemen de grootste start en de kleinste eind */
|
||||
/* we take the largest start and smallest end */
|
||||
|
||||
// seq->start= seq->startdisp= MAX2(seq->seq1->startdisp, seq->seq2->startdisp);
|
||||
// seq->enddisp= MIN2(seq->seq1->enddisp, seq->seq2->enddisp);
|
||||
@ -375,7 +375,7 @@ void calc_sequence(Sequence *seq)
|
||||
|
||||
void sort_seq()
|
||||
{
|
||||
/* alle strips in soort bij elkaar en op volgorde van machine */
|
||||
/* all strips together per kind, and in order of y location ("machine") */
|
||||
ListBase seqbase, effbase;
|
||||
Editing *ed;
|
||||
Sequence *seq, *seqt;
|
||||
@ -424,7 +424,7 @@ void clear_scene_in_allseqs(Scene *sce)
|
||||
Editing *ed;
|
||||
Sequence *seq;
|
||||
|
||||
/* als er een scene delete is: alle seqs testen */
|
||||
/* when a scene is deleted: test all seqs */
|
||||
|
||||
sce1= G.main->scene.first;
|
||||
while(sce1) {
|
||||
@ -464,7 +464,7 @@ void do_alphaover_effect(float facf0, float facf1, int x, int y, unsigned int *r
|
||||
x= xo;
|
||||
while(x--) {
|
||||
|
||||
/* rt = rt1 over rt2 (alpha van rt1) */
|
||||
/* rt = rt1 over rt2 (alpha from rt1) */
|
||||
|
||||
fac= fac2;
|
||||
mfac= 256 - ( (fac2*rt1[3])>>8 );
|
||||
@ -529,10 +529,10 @@ void do_alphaunder_effect(float facf0, float facf1, int x, int y, unsigned int *
|
||||
x= xo;
|
||||
while(x--) {
|
||||
|
||||
/* rt = rt1 under rt2 (alpha van rt2) */
|
||||
/* rt = rt1 under rt2 (alpha from rt2) */
|
||||
|
||||
/* deze ingewikkelde optimalisering is omdat
|
||||
* de 'skybuf' ingecrosst kan worden
|
||||
/* this complex optimalisation is because the
|
||||
* 'skybuf' can be crossed in
|
||||
*/
|
||||
if(rt2[3]==0 && fac2==256) *( (unsigned int *)rt) = *( (unsigned int *)rt1);
|
||||
else if(rt2[3]==255) *( (unsigned int *)rt) = *( (unsigned int *)rt2);
|
||||
@ -818,7 +818,7 @@ void do_drop_effect(float facf0, float facf1, int x, int y, unsigned int *rect2i
|
||||
memcpy(out, rt1, sizeof(int)*YOFF*width);
|
||||
}
|
||||
|
||||
/* L E T O P: rect2 en rect1 omgekeerd */
|
||||
/* WATCH: rect2 and rect1 reversed */
|
||||
void do_drop_effect2(float facf0, float facf1, int x, int y, unsigned int *rect2, unsigned int *rect1, unsigned int *out)
|
||||
{
|
||||
int col, xo, yo, temp, fac1, fac3;
|
||||
@ -923,7 +923,7 @@ void do_mul_effect(float facf0, float facf1, int x, int y, unsigned int *rect1,
|
||||
fac1= (int)(256.0*facf0);
|
||||
fac3= (int)(256.0*facf1);
|
||||
|
||||
/* formule:
|
||||
/* formula:
|
||||
* fac*(a*b) + (1-fac)*a => fac*a*(b-1)+a
|
||||
*/
|
||||
|
||||
@ -1005,7 +1005,7 @@ void do_effect(int cfra, Sequence *seq, StripElem *se)
|
||||
return;
|
||||
}
|
||||
|
||||
/* als metastrip: andere se's */
|
||||
/* if metastrip: other se's */
|
||||
if(se->se1->ok==2) se1= se->se1->se1;
|
||||
else se1= se->se1;
|
||||
|
||||
@ -1152,7 +1152,7 @@ void set_meta_stripdata(Sequence *seqm)
|
||||
StripElem *se;
|
||||
int a, cfra, b;
|
||||
|
||||
/* zet alle ->se1 pointers in stripdata, dan kan daar de ibuf uitgelezen */
|
||||
/* sets all ->se1 pointers in stripdata, to read the ibuf from it */
|
||||
|
||||
ed= G.scene->ed;
|
||||
if(ed==0) return;
|
||||
@ -1165,7 +1165,7 @@ void set_meta_stripdata(Sequence *seqm)
|
||||
cfra= a+seqm->start;
|
||||
if(evaluate_seq_frame(cfra)) {
|
||||
|
||||
/* we nemen de hoogste effectstrip of de laagste imagestrip/metastrip */
|
||||
/* we take the upper effect strip or the lowest imagestrip/metastrip */
|
||||
seqim= seqeff= 0;
|
||||
|
||||
for(b=1; b<MAXSEQ; b++) {
|
||||
@ -1197,7 +1197,7 @@ void set_meta_stripdata(Sequence *seqm)
|
||||
|
||||
|
||||
|
||||
/* HULPFUNKTIES VOOR GIVE_IBUF_SEQ */
|
||||
/* HELP FUNCTIONS FOR GIVE_IBUF_SEQ */
|
||||
|
||||
void do_seq_count_cfra(ListBase *seqbase, int *totseq, int cfra)
|
||||
{
|
||||
@ -1232,7 +1232,7 @@ void do_build_seqar_cfra(ListBase *seqbase, Sequence ***seqar, int cfra)
|
||||
seq= seqbase->first;
|
||||
while(seq) {
|
||||
|
||||
/* op nul zetten ivm free_imbuf_seq... */
|
||||
/* set at zero because free_imbuf_seq... */
|
||||
seq->curelem= 0;
|
||||
|
||||
if(seq->startdisp <=cfra && seq->enddisp > cfra) {
|
||||
@ -1258,7 +1258,7 @@ void do_build_seqar_cfra(ListBase *seqbase, Sequence ***seqar, int cfra)
|
||||
}
|
||||
else if(seq->type & SEQ_EFFECT) {
|
||||
|
||||
/* testen of image te klein is: opnieuw maken */
|
||||
/* test if image is too small: reload */
|
||||
if(se->ibuf) {
|
||||
if(se->ibuf->x < seqrectx || se->ibuf->y < seqrecty) {
|
||||
IMB_freeImBuf(se->ibuf);
|
||||
@ -1266,7 +1266,7 @@ void do_build_seqar_cfra(ListBase *seqbase, Sequence ***seqar, int cfra)
|
||||
}
|
||||
}
|
||||
|
||||
/* moet het effect (opnieuw) berekend? */
|
||||
/* does the effect should be recalculated? */
|
||||
|
||||
if(se->ibuf==0 || (se->se1 != seq->seq1->curelem) || (se->se2 != seq->seq2->curelem) || (se->se3 != seq->seq3->curelem)) {
|
||||
se->se1= seq->seq1->curelem;
|
||||
@ -1278,7 +1278,7 @@ void do_build_seqar_cfra(ListBase *seqbase, Sequence ***seqar, int cfra)
|
||||
do_effect(cfra, seq, se);
|
||||
}
|
||||
|
||||
/* size testen */
|
||||
/* test size */
|
||||
if(se->ibuf) {
|
||||
if(se->ibuf->x != seqrectx || se->ibuf->y != seqrecty ) {
|
||||
if(G.scene->r.mode & R_OSA)
|
||||
@ -1291,7 +1291,7 @@ void do_build_seqar_cfra(ListBase *seqbase, Sequence ***seqar, int cfra)
|
||||
else if(seq->type < SEQ_EFFECT) {
|
||||
|
||||
if(se->ibuf) {
|
||||
/* testen of image te klein is: opnieuw laden */
|
||||
/* test if image too small: reload */
|
||||
if(se->ibuf->x < seqrectx || se->ibuf->y < seqrecty) {
|
||||
IMB_freeImBuf(se->ibuf);
|
||||
se->ibuf= 0;
|
||||
@ -1302,7 +1302,7 @@ void do_build_seqar_cfra(ListBase *seqbase, Sequence ***seqar, int cfra)
|
||||
if(seq->type==SEQ_IMAGE) {
|
||||
if(se->ok && se->ibuf==0) {
|
||||
|
||||
/* als playanim of render: geen waitcursor doen */
|
||||
/* if playanim or render: no waitcursor */
|
||||
if((G.f & G_PLAYANIM)==0) waitcursor(1);
|
||||
|
||||
strcpy(name, seq->strip->dir);
|
||||
@ -1323,7 +1323,7 @@ void do_build_seqar_cfra(ListBase *seqbase, Sequence ***seqar, int cfra)
|
||||
else if(seq->type==SEQ_MOVIE) {
|
||||
if(se->ok && se->ibuf==0) {
|
||||
|
||||
/* als playanim of render: geen waitcursor doen */
|
||||
/* if playanim r render: no waitcursor */
|
||||
if((G.f & G_PLAYANIM)==0) waitcursor(1);
|
||||
|
||||
if(seq->anim==0) {
|
||||
@ -1355,17 +1355,17 @@ void do_build_seqar_cfra(ListBase *seqbase, Sequence ***seqar, int cfra)
|
||||
oldsce= G.scene;
|
||||
set_scene_bg(seq->scene);
|
||||
|
||||
/* oneindige lus voorkomen */
|
||||
/* prevent eternal loop */
|
||||
doseq= G.scene->r.scemode & R_DOSEQ;
|
||||
G.scene->r.scemode &= ~R_DOSEQ;
|
||||
|
||||
/* vanalles bewaren */
|
||||
/* store stuffies */
|
||||
oldcfra= CFRA; CFRA= seq->sfra + se->nr;
|
||||
waitcursor(1);
|
||||
|
||||
rectot= R.rectot; R.rectot= 0;
|
||||
oldx= R.rectx; oldy= R.recty;
|
||||
/* dit is nodig omdat de huidige 3D window niet de layers mag leveren, alsof het background render is */
|
||||
/* needed because current 3D window cannot define the layers, like in a background render */
|
||||
vd= G.vd;
|
||||
G.vd= 0;
|
||||
|
||||
@ -1408,7 +1408,7 @@ void do_build_seqar_cfra(ListBase *seqbase, Sequence ***seqar, int cfra)
|
||||
R.r.imtype= G.scene->r.imtype;
|
||||
}
|
||||
|
||||
/* size testen */
|
||||
/* size test */
|
||||
if(se->ibuf) {
|
||||
if(se->ibuf->x != seqrectx || se->ibuf->y != seqrecty ) {
|
||||
|
||||
@ -1448,9 +1448,9 @@ ImBuf *give_ibuf_seq(int cfra)
|
||||
StripElem *se;
|
||||
int seqnr, totseq;
|
||||
|
||||
/* we maken recursief een 'stack' van sequences, deze is ook
|
||||
* gesorteerd en kan gewoon doorlopen worden.
|
||||
* Deze methode is vooral ontwikkeld voor stills voor en achter meta's
|
||||
/* we make recursively a 'stack' of sequences, these are
|
||||
* sorted nicely as well.
|
||||
* this method has been developed especially for stills before or after metas
|
||||
*/
|
||||
|
||||
totseq= 0;
|
||||
@ -1465,10 +1465,10 @@ ImBuf *give_ibuf_seq(int cfra)
|
||||
seqrecty= (G.scene->r.size*G.scene->r.ysch)/100;
|
||||
|
||||
|
||||
/* tseqar is nodig omdat in do_build_... de pointer verandert */
|
||||
/* tseqar is neede because in do_build_... the pointer changes */
|
||||
seqar= tseqar= MEM_callocN(sizeof(void *)*totseq, "seqar");
|
||||
|
||||
/* deze fie laadt en maakt ook de ibufs */
|
||||
/* this call loads and makes the ibufs */
|
||||
do_build_seqar_cfra(ed->seqbasep, &seqar, cfra);
|
||||
seqar= tseqar;
|
||||
|
||||
@ -1479,7 +1479,7 @@ ImBuf *give_ibuf_seq(int cfra)
|
||||
if(se) {
|
||||
if(seq->type==SEQ_META) {
|
||||
|
||||
/* onderste strip! */
|
||||
/* bottom strip! */
|
||||
if(seqfirst==0) seqfirst= seq;
|
||||
else if(seqfirst->depth > seq->depth) seqfirst= seq;
|
||||
else if(seqfirst->machine > seq->machine) seqfirst= seq;
|
||||
@ -1487,7 +1487,7 @@ ImBuf *give_ibuf_seq(int cfra)
|
||||
}
|
||||
else if(seq->type & SEQ_EFFECT) {
|
||||
|
||||
/* bovenste strip! */
|
||||
/* top strip! */
|
||||
if(seqfirst==0) seqfirst= seq;
|
||||
else if(seqfirst->depth > seq->depth) seqfirst= seq;
|
||||
else if(seqfirst->machine < seq->machine) seqfirst= seq;
|
||||
@ -1496,7 +1496,7 @@ ImBuf *give_ibuf_seq(int cfra)
|
||||
}
|
||||
else if(seq->type < SEQ_EFFECT) { /* images */
|
||||
|
||||
/* onderste strip! zodat je bovenin altijd hulptroep kan bewaren */
|
||||
/* bottom strip! a feature that allows you to store junk in locations above */
|
||||
|
||||
if(seqfirst==0) seqfirst= seq;
|
||||
else if(seqfirst->depth > seq->depth) seqfirst= seq;
|
||||
@ -1630,7 +1630,7 @@ void do_render_seq()
|
||||
/* static ImBuf *lastibuf=0; */
|
||||
ImBuf *ibuf;
|
||||
|
||||
/* plaatje in R.rectot kopieeren */
|
||||
/* copy image into R.rectot */
|
||||
|
||||
G.f |= G_PLAYANIM; /* waitcursor patch */
|
||||
|
||||
|
@ -28,7 +28,9 @@
|
||||
* Contributor(s): none yet.
|
||||
*
|
||||
* ***** END GPL/BL DUAL LICENSE BLOCK *****
|
||||
* - hier het initialiseren en vrijgeven van SPACE data
|
||||
*
|
||||
*
|
||||
* - here initialize and free and handling SPACE data
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
@ -161,7 +163,7 @@ void copy_view3d_lock(short val)
|
||||
bScreen *sc;
|
||||
int bit;
|
||||
|
||||
/* van G.scene naar andere views kopieeren */
|
||||
/* from G.scene copy to the other views */
|
||||
sc= G.main->screen.first;
|
||||
|
||||
while(sc) {
|
||||
@ -211,7 +213,7 @@ void handle_view3d_lock()
|
||||
if (G.vd != NULL) {
|
||||
if(G.vd->localview==0 && G.vd->scenelock && curarea->spacetype==SPACE_VIEW3D) {
|
||||
|
||||
/* naar scene kopieeren */
|
||||
/* copy to scene */
|
||||
G.scene->lay= G.vd->lay;
|
||||
G.scene->camera= G.vd->camera;
|
||||
|
||||
@ -386,7 +388,7 @@ void start_game(void)
|
||||
|
||||
static void changeview3dspace(ScrArea *sa, void *spacedata)
|
||||
{
|
||||
setwinmatrixview3d(0); /* 0= geen pick rect */
|
||||
setwinmatrixview3d(0); /* 0= no pick rect */
|
||||
}
|
||||
|
||||
/* Callable from editmode and faceselect mode from the
|
||||
@ -438,7 +440,7 @@ void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
|
||||
float *curs;
|
||||
int doredraw= 0, pupval;
|
||||
|
||||
if(curarea->win==0) return; /* hier komtie vanuit sa->headqread() */
|
||||
if(curarea->win==0) return; /* when it comes from sa->headqread() */
|
||||
if(event==MOUSEY) return;
|
||||
|
||||
if(val) {
|
||||
@ -1062,7 +1064,7 @@ void initview3d(ScrArea *sa)
|
||||
View3D *vd;
|
||||
|
||||
vd= MEM_callocN(sizeof(View3D), "initview3d");
|
||||
BLI_addhead(&sa->spacedata, vd); /* addhead! niet addtail */
|
||||
BLI_addhead(&sa->spacedata, vd); /* addhead! not addtail */
|
||||
|
||||
vd->spacetype= SPACE_VIEW3D;
|
||||
vd->viewquat[0]= 1.0;
|
||||
@ -1770,7 +1772,7 @@ void winqreadbutspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
|
||||
|
||||
void set_rects_butspace(SpaceButs *buts)
|
||||
{
|
||||
/* buts space loopt van (0,0) tot (1280, 228) */
|
||||
/* buts space goes from (0,0) to (1280, 228) */
|
||||
|
||||
buts->v2d.tot.xmin= 0.0;
|
||||
buts->v2d.tot.ymin= 0.0;
|
||||
@ -1811,7 +1813,7 @@ void init_butspace(ScrArea *sa)
|
||||
buts->spacetype= SPACE_BUTS;
|
||||
buts->scaflag= BUTS_SENS_LINK|BUTS_SENS_ACT|BUTS_CONT_ACT|BUTS_ACT_ACT|BUTS_ACT_LINK;
|
||||
|
||||
/* set_rects doet alleen defaults, zodat na het filezen de cur niet verandert */
|
||||
/* set_rects only does defaults, so after reading a file the cur has not changed */
|
||||
set_rects_butspace(buts);
|
||||
buts->v2d.cur= buts->v2d.tot;
|
||||
}
|
||||
@ -1821,10 +1823,10 @@ void extern_set_butspace(int fkey)
|
||||
ScrArea *sa;
|
||||
SpaceButs *sbuts;
|
||||
|
||||
/* als een ftoets ingedrukt: de dichtsbijzijnde buttonwindow wordt gezet */
|
||||
/* when a f-key pressed: closest button window is initialized */
|
||||
if(curarea->spacetype==SPACE_BUTS) sa= curarea;
|
||||
else {
|
||||
/* area vinden */
|
||||
/* find area */
|
||||
sa= G.curscreen->areabase.first;
|
||||
while(sa) {
|
||||
if(sa->spacetype==SPACE_BUTS) break;
|
||||
@ -2030,7 +2032,7 @@ void init_seqspace(ScrArea *sa)
|
||||
sseq->spacetype= SPACE_SEQ;
|
||||
sseq->zoom= 1;
|
||||
|
||||
/* seq space loopt van (0,8) tot (250, 0) */
|
||||
/* seq space goes from (0,8) to (250, 0) */
|
||||
|
||||
sseq->v2d.tot.xmin= 0.0;
|
||||
sseq->v2d.tot.ymin= 0.0;
|
||||
@ -2189,7 +2191,7 @@ void init_soundspace(ScrArea *sa)
|
||||
|
||||
ssound->spacetype= SPACE_SOUND;
|
||||
|
||||
/* sound space loopt van (0,8) tot (250, 0) */
|
||||
/* sound space goes from (0,8) to (250, 0) */
|
||||
|
||||
ssound->v2d.tot.xmin= -4.0;
|
||||
ssound->v2d.tot.ymin= -4.0;
|
||||
@ -2262,7 +2264,7 @@ void winqreadimagespace(ScrArea *sa, void *spacedata, BWinEvent *evt)
|
||||
}
|
||||
|
||||
brush = IMG_BrushCreate(Gvp.size, Gvp.size, Gvp.r, Gvp.g, Gvp.b, Gvp.a);
|
||||
/* MAART: skipx is not set most of the times. Make a guess. */
|
||||
/* skipx is not set most of the times. Make a guess. */
|
||||
rowBytes = sima->image->ibuf->skipx ? sima->image->ibuf->skipx : sima->image->ibuf->x * 4;
|
||||
canvas = IMG_CanvasCreateFromPtr(sima->image->ibuf->rect, sima->image->ibuf->x, sima->image->ibuf->y, rowBytes);
|
||||
|
||||
@ -2375,7 +2377,7 @@ extern void drawimaselspace(ScrArea *sa, void *spacedata);
|
||||
extern void winqreadimaselspace(struct ScrArea *sa, void *spacedata, struct BWinEvent *evt);
|
||||
|
||||
|
||||
/* alles naar imasel.c */
|
||||
/* everything to imasel.c */
|
||||
|
||||
|
||||
/* ******************** SPACE: OOPS ********************** */
|
||||
@ -2599,7 +2601,7 @@ void newspace(ScrArea *sa, int type)
|
||||
}
|
||||
|
||||
|
||||
/* uitzondering: filespace */
|
||||
/* exception: filespace */
|
||||
if(curarea->spacetype==SPACE_FILE) {
|
||||
SpaceFile *sfile= curarea->spacedata.first;
|
||||
|
||||
@ -2613,7 +2615,7 @@ void newspace(ScrArea *sa, int type)
|
||||
sfile->title[0]= 0;
|
||||
if(sfile->filelist) test_flags_file(sfile);
|
||||
}
|
||||
/* uitzondering: imasel space */
|
||||
/* exception: imasel space */
|
||||
else if(curarea->spacetype==SPACE_IMASEL) {
|
||||
SpaceImaSel *simasel= curarea->spacedata.first;
|
||||
simasel->returnfunc= 0;
|
||||
@ -2681,7 +2683,7 @@ void duplicatespacelist(ScrArea *newarea, ListBase *lb1, ListBase *lb2)
|
||||
|
||||
duplicatelist(lb1, lb2);
|
||||
|
||||
/* lb1 is kopie van lb2, van lb2 geven we de filelist vrij */
|
||||
/* lb1 is kopie from lb2, from lb2 we free the file list */
|
||||
|
||||
sl= lb2->first;
|
||||
while(sl) {
|
||||
@ -2736,7 +2738,7 @@ void duplicatespacelist(ScrArea *newarea, ListBase *lb1, ListBase *lb2)
|
||||
sl= sl->next;
|
||||
}
|
||||
|
||||
/* nog een keer: van oude View3D de localview restoren (ivm full) */
|
||||
/* again: from old View3D restore localview (because full) */
|
||||
sl= lb2->first;
|
||||
while(sl) {
|
||||
if(sl->spacetype==SPACE_VIEW3D) {
|
||||
@ -2752,7 +2754,7 @@ void duplicatespacelist(ScrArea *newarea, ListBase *lb1, ListBase *lb2)
|
||||
}
|
||||
}
|
||||
|
||||
/* wordt overal aangeroepen */
|
||||
/* is called everywhere in blender */
|
||||
void allqueue(unsigned short event, short val)
|
||||
{
|
||||
ScrArea *sa;
|
||||
@ -3056,7 +3058,7 @@ void allspace(unsigned short event, short val)
|
||||
|
||||
void force_draw()
|
||||
{
|
||||
/* alle area's die (ongeveer) zelfde laten zien als curarea */
|
||||
/* draws alle areas that something identical to curarea */
|
||||
ScrArea *tempsa, *sa;
|
||||
|
||||
scrarea_do_windraw(curarea);
|
||||
@ -3094,7 +3096,7 @@ void force_draw()
|
||||
|
||||
void force_draw_plus(int type)
|
||||
{
|
||||
/* alle area's die (ongeveer) zelfde laten zien als curarea EN areas van 'type' */
|
||||
/* draws all areas that show something like curarea AND areas of 'type' */
|
||||
ScrArea *tempsa, *sa;
|
||||
|
||||
scrarea_do_windraw(curarea);
|
||||
@ -3117,7 +3119,7 @@ void force_draw_plus(int type)
|
||||
|
||||
void force_draw_all(void)
|
||||
{
|
||||
/* alle area's die (ongeveer) zelfde laten zien als curarea EN areas van 'type' */
|
||||
/* redraws all */
|
||||
ScrArea *tempsa, *sa;
|
||||
|
||||
drawscreen();
|
||||
|
@ -30,6 +30,15 @@
|
||||
* ***** END GPL/BL DUAL LICENSE BLOCK *****
|
||||
*/
|
||||
|
||||
|
||||
/* HRMS!!... blender has its own swapbuffers method. for sgi only that worked pretty nice.
|
||||
* but with porting to linux and win, with mesa and opengl variations, it all grow
|
||||
* out of control.
|
||||
* with the introduction of Ghost (2002) we really should bring this back to a single
|
||||
* method again. (ton)
|
||||
*/
|
||||
|
||||
|
||||
#include <stdlib.h>
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
@ -89,9 +98,9 @@ static void screen_swapbuffers_REDRAW(bScreen *sc)
|
||||
ScrArea *sa;
|
||||
int doswap= 0, swap;
|
||||
|
||||
/* dit is een nieuwe implementatie: uitsluitend met redraws en normale swapbuffer */
|
||||
/* a new implementation: only using redraws and a normal swapbuffer */
|
||||
|
||||
/* allemaal front ok? */
|
||||
/* all areas front ok? */
|
||||
sa= sc->areabase.first;
|
||||
while(sa) {
|
||||
if(sa->win && (sa->win_swap & WIN_FRONT_OK)==0) break;
|
||||
@ -123,7 +132,7 @@ static void screen_swapbuffers_REDRAW(bScreen *sc)
|
||||
sa= sa->next;
|
||||
}
|
||||
|
||||
/* de hele backbuffer moet nu OK zijn */
|
||||
/* the whole backbuffer should now be ok */
|
||||
if(doswap) {
|
||||
myswapbuffers();
|
||||
}
|
||||
@ -179,10 +188,10 @@ static void screen_swapbuffers_DEBUG_SWAP(bScreen *sc)
|
||||
{
|
||||
ScrArea *sa;
|
||||
int doswap= 0, swap;
|
||||
|
||||
/* dit is een nieuwe implementatie: uitsluitend met redraws en normale swapbuffer */
|
||||
|
||||
/* allemaal front ok? */
|
||||
/* a new implementation: only using redraws and a normal swapbuffer */
|
||||
|
||||
/* all areas front ok? */
|
||||
sa= sc->areabase.first;
|
||||
while(sa) {
|
||||
if(sa->win && (sa->win_swap & WIN_FRONT_OK)==0) break;
|
||||
@ -219,7 +228,6 @@ static void screen_swapbuffers_DEBUG_SWAP(bScreen *sc)
|
||||
sa= sa->next;
|
||||
}
|
||||
|
||||
/* de hele backbuffer moet nu OK zijn */
|
||||
if(doswap) {
|
||||
myswapbuffers();
|
||||
}
|
||||
|
@ -28,7 +28,11 @@
|
||||
* Contributor(s): none yet.
|
||||
*
|
||||
* ***** END GPL/BL DUAL LICENSE BLOCK *****
|
||||
* Algemene toetsen, bijzondere in de space.c
|
||||
|
||||
*
|
||||
*
|
||||
* General blender hot keys (toets = dutch), special hotkeys are in space.c
|
||||
*
|
||||
*/
|
||||
|
||||
#include <string.h>
|
||||
@ -108,7 +112,7 @@ void schrijfplaatje(char *name);
|
||||
|
||||
void write_imag(char *name)
|
||||
{
|
||||
/* vanuit filesel */
|
||||
/* from file select */
|
||||
char str[256];
|
||||
|
||||
strcpy(str, name);
|
||||
@ -126,25 +130,24 @@ void write_imag(char *name)
|
||||
}
|
||||
}
|
||||
|
||||
/* ripped from render module */
|
||||
/* void schrijfplaatje(char *name); */
|
||||
|
||||
|
||||
/* From matrix.h: it's really a [4][4]! */
|
||||
/* originally in initrender... maybe add fileControl thingy? */
|
||||
|
||||
/* should be called write_image(char *name) :-) */
|
||||
void schrijfplaatje(char *name)
|
||||
{
|
||||
struct ImBuf *ibuf=0;
|
||||
unsigned int *temprect=0;
|
||||
char str[FILE_MAXDIR+FILE_MAXFILE];
|
||||
|
||||
/* Staat RGBA aan? Zo ja: gebruik alphakanaal voor kleur 0 */
|
||||
/* has RGBA been set? If so: use alpha channel for color zero */
|
||||
IMB_alpha_to_col0(FALSE);
|
||||
|
||||
if(R.r.planes == 32) {
|
||||
/* alles met minder dan 50 % alpha -> col 0 */
|
||||
/* everything with less than 50 % alpha -> col 0 */
|
||||
if(R.r.alphamode == R_ALPHAKEY) IMB_alpha_to_col0(2);
|
||||
/* uitsluitend met 0 alpha -> col 0 */
|
||||
/* only when 0 alpha -> col 0 */
|
||||
else IMB_alpha_to_col0(1);
|
||||
}
|
||||
|
||||
@ -197,7 +200,7 @@ void schrijfplaatje(char *name)
|
||||
ibuf->ftype= RAWTGA;
|
||||
}
|
||||
else if(R.r.imtype==R_HAMX) {
|
||||
/* kopie maken */
|
||||
/* make copy */
|
||||
temprect= MEM_dupallocN(R.rectot);
|
||||
ibuf->ftype= AN_hamx;
|
||||
}
|
||||
@ -287,7 +290,7 @@ void persptoetsen(unsigned short event)
|
||||
if(G.vd->persp>=2) G.vd->persp= perspo;
|
||||
}
|
||||
else if(event==PADMINUS) {
|
||||
/* deze min en max staan ook in viewmove() */
|
||||
/* this min and max is also in viewmove() */
|
||||
if(G.vd->persp==2) {
|
||||
G.vd->camzoom-= 10;
|
||||
if(G.vd->camzoom<-30) G.vd->camzoom= -30;
|
||||
@ -341,7 +344,7 @@ void persptoetsen(unsigned short event)
|
||||
if(G.vd->persp>=2) G.vd->persp= perspo;
|
||||
}
|
||||
else if(event==PADMINUS) {
|
||||
/* deze min en max staan ook in viewmove() */
|
||||
/* this min and max is also in viewmove() */
|
||||
if(G.vd->persp==2) {
|
||||
G.vd->camzoom= MAX2(-30, G.vd->camzoom-5);
|
||||
}
|
||||
@ -402,7 +405,7 @@ void persptoetsen(unsigned short event)
|
||||
}
|
||||
else if(G.vd->persp<2) {
|
||||
if(event==PAD4 || event==PAD6) {
|
||||
/* z-as */
|
||||
/* z-axis */
|
||||
phi= (float)(M_PI/24.0);
|
||||
if(event==PAD6) phi= -phi;
|
||||
si= (float)sin(phi);
|
||||
@ -414,7 +417,7 @@ void persptoetsen(unsigned short event)
|
||||
}
|
||||
if(event==PAD2 || event==PAD8) {
|
||||
|
||||
/* liggende as */
|
||||
/* horizontal axis */
|
||||
VECCOPY(q1+1, G.vd->viewinv[0]);
|
||||
|
||||
Normalise(q1+1);
|
||||
@ -502,9 +505,8 @@ void BIF_save_rendered_image(void)
|
||||
|
||||
int blenderqread(unsigned short event, short val)
|
||||
{
|
||||
/* hier alle algemene toetsafhandelingen (niet screen/window/space) */
|
||||
/* return 0: niet aan andere queue's doorgeven */
|
||||
/* extern char videosc_dir[]; */
|
||||
/* here do the general keys handling (not screen/window/space) */
|
||||
/* return 0: do not pass on to the other queues */
|
||||
extern int textediting;
|
||||
ScrArea *sa;
|
||||
Object *ob;
|
||||
@ -672,7 +674,7 @@ int blenderqread(unsigned short event, short val)
|
||||
if(curarea->spacetype==SPACE_IPO) set_editflag_editipo();
|
||||
else if(curarea->spacetype==SPACE_SEQ) enter_meta();
|
||||
else if(G.vd) {
|
||||
/* ook als Alt-E */
|
||||
/* also when Alt-E */
|
||||
if(G.obedit==0) enter_editmode();
|
||||
else exit_editmode(1);
|
||||
}
|
||||
|
@ -101,23 +101,12 @@
|
||||
#include "interface.h"
|
||||
#include "render.h"
|
||||
|
||||
/* ******** NOTES *********** *****************************
|
||||
|
||||
- Toolbox items zelf invullen
|
||||
- de colormap kleuren staan met comments in de bgntoolbox()
|
||||
- de funktie extern_qread eventueel vervangen
|
||||
- let op de benaming van bijzondere toetsen (NumL etc)
|
||||
- meelinken: Button.c, ivm rawcodes
|
||||
|
||||
***************************** *****************************
|
||||
*/
|
||||
|
||||
|
||||
static int tbx1, tbx2, tby1, tby2, tbfontyofs, tbmain=0;
|
||||
static int tbmemx=TBOXX/2, tbmemy=(TBOXEL-0.5)*TBOXH, tboldwin, addmode= 0;
|
||||
static int oldcursor;
|
||||
|
||||
/* variabelen per item */
|
||||
/* variables per item */
|
||||
static char *tbstr, *tbstr1, *keystr;
|
||||
static void (*tbfunc)(int);
|
||||
static int tbval;
|
||||
@ -159,7 +148,7 @@ void tboxSetCallback(Tbox_callbackfunc f)
|
||||
|
||||
void tbox_setinfo(int x, int y)
|
||||
{
|
||||
/* afhankelijk van tbmain worden vars gezet */
|
||||
/* dependant of tbmain vars are set */
|
||||
tbstr= 0;
|
||||
tbstr1= 0;
|
||||
tbfunc= 0;
|
||||
@ -497,7 +486,7 @@ void bgnpupdraw(int startx, int starty, int endx, int endy)
|
||||
|
||||
mywinset(G.curscreen->mainwin);
|
||||
|
||||
/* pietsje groter, 1 pixel aan de rand */
|
||||
/* tinsy bit larger, 1 pixel on the rand */
|
||||
|
||||
glReadBuffer(GL_FRONT);
|
||||
glDrawBuffer(GL_FRONT);
|
||||
@ -509,7 +498,7 @@ void bgnpupdraw(int startx, int starty, int endx, int endy)
|
||||
oldcursor= get_cursor();
|
||||
set_cursor(CURSOR_STD);
|
||||
|
||||
tbfontyofs= (TBOXH-11)/2 +2; /* toolbox, hier stond ooit getheigh */
|
||||
tbfontyofs= (TBOXH-11)/2 +2; /* for toolbox */
|
||||
}
|
||||
|
||||
void endpupdraw(void)
|
||||
@ -569,8 +558,8 @@ void asciitoraw(int ch, unsigned short *event, unsigned short *qual)
|
||||
|
||||
void tbox_execute(void)
|
||||
{
|
||||
/* als tbfunc: functie aanroepen */
|
||||
/* als tbstr1 is een string: value tbval in queue stopen */
|
||||
/* if tbfunc: call function */
|
||||
/* if tbstr1 is a string: put value tbval in queue */
|
||||
unsigned short event=0;
|
||||
unsigned short qual1=0, qual2=0;
|
||||
|
||||
@ -811,7 +800,7 @@ void tbox_drawelem_text(x, y, type)
|
||||
glColor3ub(240, 240, 240);
|
||||
}
|
||||
|
||||
/* tekst */
|
||||
/* text */
|
||||
tbox_setinfo(x, y);
|
||||
if(tbstr && tbstr[0]) {
|
||||
len1= 5+BMF_GetStringWidth(G.font, tbstr);
|
||||
@ -883,7 +872,7 @@ void drawtoolbox(void)
|
||||
|
||||
tbox_getactive(&actx, &acty);
|
||||
|
||||
/* de background */
|
||||
/* background */
|
||||
for(x=0; x<2; x++) {
|
||||
|
||||
for(y=0; y<TBOXEL; y++) {
|
||||
@ -901,7 +890,7 @@ void drawtoolbox(void)
|
||||
}
|
||||
}
|
||||
|
||||
/* de text */
|
||||
/* text */
|
||||
for(x=0; x<2; x++) {
|
||||
|
||||
for(y=0; y<TBOXEL; y++) {
|
||||
@ -935,7 +924,7 @@ void toolbox(void)
|
||||
drawtoolbox();
|
||||
|
||||
/*
|
||||
* De aktieve window wordt in queue terug gestopt.
|
||||
* The active window will be put back in the queue.
|
||||
*/
|
||||
|
||||
while(1) {
|
||||
@ -965,7 +954,7 @@ void toolbox(void)
|
||||
}
|
||||
break;
|
||||
case ESCKEY:
|
||||
/* altkeys: om conflicten met overdraw en stow/push/pop te voorkomen */
|
||||
/* alt keys: to prevent conflicts with over-draw and stow/push/pop at sgis */
|
||||
#ifndef MAART
|
||||
/* Temporary for making screen dumps (Alt+PrtSc) */
|
||||
case LEFTALTKEY:
|
||||
@ -981,7 +970,7 @@ void toolbox(void)
|
||||
|
||||
tbox_getactive(&actx, &acty);
|
||||
|
||||
/* muisafhandeling en redraw */
|
||||
/* mouse handling and redraw */
|
||||
if(xo!=actx || yo!=acty) {
|
||||
if(actx==0) {
|
||||
if (acty==0) addmode=0;
|
||||
@ -1077,7 +1066,7 @@ int saveover(char *file)
|
||||
return (!BLI_exists(file) || confirm("SAVE OVER", file));
|
||||
}
|
||||
|
||||
/* ****************** EXTRAATJE **************** */
|
||||
/* ****************** EXTRA STUFF **************** */
|
||||
|
||||
short button(short *var, short min, short max, char *str)
|
||||
{
|
||||
@ -1276,7 +1265,7 @@ int do_clever_numbuts(char *name, int tot, int winevent)
|
||||
sizex= 235;
|
||||
sizey= 30+20*(tot+1);
|
||||
|
||||
/* midden */
|
||||
/* center */
|
||||
if(mval[0]<sizex/2) mval[0]=sizex/2;
|
||||
if(mval[1]<sizey/2) mval[1]=sizey/2;
|
||||
if(mval[0]>G.curscreen->sizex -sizex/2) mval[0]= G.curscreen->sizex -sizex/2;
|
||||
@ -1290,8 +1279,8 @@ int do_clever_numbuts(char *name, int tot, int winevent)
|
||||
block= uiNewBlock(&listb, "numbuts", UI_EMBOSSX, UI_HELV, G.curscreen->mainwin);
|
||||
uiBlockSetFlag(block, UI_BLOCK_LOOP|UI_BLOCK_REDRAW|UI_BLOCK_RET_1|UI_BLOCK_ENTER_OK);
|
||||
|
||||
/* LET OP: TEX BUTTON UITZONDERING */
|
||||
/* WAARSCHUWING: ALLEEN EEN ENKELE BITJES-BUTTON MOGELIJK: ER WORDT OP KOPIEDATA GEWERKT! */
|
||||
/* WATCH IT: TEX BUTTON EXCEPTION */
|
||||
/* WARNING: ONLY A SINGLE BIT-BUTTON POSSIBLE: WE WORK AT COPIED DATA! */
|
||||
|
||||
uiDefBut(block, LABEL, 0, name, (short)(x1+15), (short)(y2-35), (short)(sizex-60), 19, 0, 1.0, 0.0, 0, 0, "");
|
||||
|
||||
@ -1363,7 +1352,7 @@ void add_numbut(int nr, int type, char *str, float min, float max, void *poin, c
|
||||
strcpy(numbuts[nr].tip, "");
|
||||
|
||||
|
||||
/* LET OP: TEX BUTTON UITZONDERING */
|
||||
/*WATCH: TEX BUTTON EXCEPTION */
|
||||
|
||||
numbpoin[nr]= poin;
|
||||
|
||||
|
@ -135,7 +135,7 @@ void BIF_read_file(char *name)
|
||||
extern char datatoc_splash_jpg[];
|
||||
extern int datatoc_splash_jpg_size;
|
||||
char infostring[400];
|
||||
//hier misschien?
|
||||
//here?
|
||||
//sound_end_all_sounds();
|
||||
|
||||
// first try to read exotic file formats...
|
||||
@ -152,7 +152,7 @@ void BIF_read_file(char *name)
|
||||
|
||||
sound_initialize_sounds();
|
||||
|
||||
winqueue_break= 1; /* overal uit queue's gaan */
|
||||
winqueue_break= 1; /* leave queues everywhere */
|
||||
|
||||
}
|
||||
|
||||
@ -163,7 +163,7 @@ int BIF_read_homefile(void)
|
||||
int success;
|
||||
|
||||
BLI_make_file_string(G.sce, tstr, home, ".B.blend");
|
||||
strcpy(scestr, G.sce); /* even bewaren */
|
||||
strcpy(scestr, G.sce); /* temporal store */
|
||||
if (BLI_exists(tstr)) {
|
||||
success = BKE_read_file(tstr, NULL);
|
||||
} else {
|
||||
@ -177,9 +177,6 @@ int BIF_read_homefile(void)
|
||||
/* disable autoplay in .B.blend... */
|
||||
G.fileflags &= ~G_FILE_AUTOPLAY;
|
||||
|
||||
/* holobutton */
|
||||
if (strcmp(G.scene->r.ftype, "*@&#")==0) G.special1= G_HOLO;
|
||||
|
||||
if (BLI_streq(U.tempdir, "/")) {
|
||||
char *tmp= getenv("TEMP");
|
||||
|
||||
@ -222,7 +219,7 @@ void BIF_read_autosavefile(void)
|
||||
char tstr[FILE_MAXDIR+FILE_MAXFILE], scestr[FILE_MAXDIR];
|
||||
int save_over;
|
||||
|
||||
strcpy(scestr, G.sce); /* even bewaren */
|
||||
strcpy(scestr, G.sce); /* temporal store */
|
||||
|
||||
get_autosave_location(tstr);
|
||||
|
||||
@ -322,7 +319,7 @@ static void do_history(char *name)
|
||||
hisnr--;
|
||||
}
|
||||
|
||||
/* lijkt dubbelop: maar deze is nodig als hisnr==1 */
|
||||
/* is needed when hisnr==1 */
|
||||
sprintf(tempname1, "%s%d", name, hisnr);
|
||||
|
||||
if(BLI_rename(name, tempname1))
|
||||
@ -358,7 +355,7 @@ void BIF_write_file(char *target)
|
||||
waitcursor(1);
|
||||
|
||||
if(G.obedit) {
|
||||
exit_editmode(0); /* 0 = geen freedata */
|
||||
exit_editmode(0); /* 0 = no free data */
|
||||
}
|
||||
if (G.fileflags & G_AUTOPACK) {
|
||||
packAll();
|
||||
@ -368,7 +365,7 @@ void BIF_write_file(char *target)
|
||||
|
||||
if (BLO_write_file(di, G.fileflags, &err)) {
|
||||
strcpy(G.sce, di);
|
||||
strcpy(G.main->name, di); /* is gegarandeerd current file */
|
||||
strcpy(G.main->name, di); /* is guarenteed current file */
|
||||
|
||||
G.save_over = 1;
|
||||
|
||||
@ -441,8 +438,6 @@ static void initbuttons(void)
|
||||
G.fonts= BMF_GetFont(BMF_kHelvetica10);
|
||||
G.fontss= BMF_GetFont(BMF_kHelveticaBold8);
|
||||
|
||||
/* IKONEN INLADEN */
|
||||
|
||||
clear_matcopybuf();
|
||||
}
|
||||
|
||||
@ -450,13 +445,11 @@ void BIF_init(void)
|
||||
{
|
||||
BKE_font_register_builtin(datatoc_Bfont, datatoc_Bfont_size);
|
||||
|
||||
initscreen(); /* voor (visuele) snelheid, dit eerst, dan setscreen */
|
||||
initscreen(); /* for (visuele) speed, this first, then setscreen */
|
||||
initbuttons();
|
||||
init_draw_rects(); /* drawobject.c */
|
||||
init_gl_stuff(); /* drawview.c */
|
||||
|
||||
/* if (I_AM_PUBLISHER) checkhome(); */
|
||||
|
||||
BIF_read_homefile();
|
||||
|
||||
readBlog();
|
||||
@ -492,14 +485,14 @@ void exit_usiblender(void)
|
||||
free_editArmature();
|
||||
free_posebuf();
|
||||
|
||||
free_blender(); /* blender.c, doet hele library */
|
||||
free_blender(); /* blender.c, does entire library */
|
||||
free_hashedgetab();
|
||||
free_matcopybuf();
|
||||
free_ipocopybuf();
|
||||
freefastshade();
|
||||
free_vertexpaint();
|
||||
|
||||
/* editnurb kan blijven bestaan buiten editmode */
|
||||
/* editnurb can remain to exist outside editmode */
|
||||
freeNurblist(&editNurb);
|
||||
|
||||
fsmenu_free();
|
||||
|
@ -87,7 +87,6 @@ void persp3d(View3D *v3d, int a)
|
||||
{
|
||||
ScrArea *area= v3d->area;
|
||||
|
||||
/* oppasen met optimaliseren: dan laatste mode in area bewaren */
|
||||
/* only 3D windows */
|
||||
if(a== 0) {
|
||||
bwin_get_winmatrix(area->win, area->winmat);
|
||||
@ -126,7 +125,6 @@ void persp_general(int a)
|
||||
|
||||
void persp(int a)
|
||||
{
|
||||
/* oppasen met optimaliseren: dan laatste mode in area bewaren */
|
||||
/* only 3D windows */
|
||||
|
||||
if(curarea->spacetype!=SPACE_VIEW3D) persp_general(a);
|
||||
@ -156,7 +154,7 @@ void initgrabz(float x, float y, float z)
|
||||
|
||||
void window_to_3d(float *vec, short mx, short my)
|
||||
{
|
||||
/* altijd initzgrab aanroepen */
|
||||
/* always call initzgrab */
|
||||
float dx, dy;
|
||||
float fmx, fmy, winx, winy;
|
||||
|
||||
@ -176,7 +174,7 @@ void window_to_3d(float *vec, short mx, short my)
|
||||
vec[2]= (G.vd->persinv[0][2]*dx + G.vd->persinv[1][2]*dy);
|
||||
}
|
||||
|
||||
void project_short(float *vec, short *adr) /* clipt */
|
||||
void project_short(float *vec, short *adr) /* clips */
|
||||
{
|
||||
float fx, fy, vec4[4];
|
||||
|
||||
@ -228,7 +226,7 @@ void project_short_noclip(float *vec, short *adr)
|
||||
|
||||
int boundbox_clip(float obmat[][4], BoundBox *bb)
|
||||
{
|
||||
/* return 1: afbeelden */
|
||||
/* return 1: draw */
|
||||
|
||||
float mat[4][4];
|
||||
float vec[4], min, max;
|
||||
@ -325,7 +323,7 @@ void sdrawbox(short x1, short y1, short x2, short y2)
|
||||
glEnd();
|
||||
}
|
||||
|
||||
/* trackball: deze is t.o.v. een 100% bol formule wel zo mooi */
|
||||
/* trackball: better one than a full spherical solution */
|
||||
|
||||
void calctrackballvecfirst(rcti *area, short *mval, float *vec)
|
||||
{
|
||||
@ -333,7 +331,7 @@ void calctrackballvecfirst(rcti *area, short *mval, float *vec)
|
||||
|
||||
radius= TRACKBALLSIZE;
|
||||
|
||||
/* x en y normaliseren */
|
||||
/* normalise x and y */
|
||||
x= (area->xmax + area->xmin)/2 -mval[0];
|
||||
x/= (float)((area->xmax - area->xmin)/2);
|
||||
y= (area->ymax + area->ymin)/2 -mval[1];
|
||||
@ -350,7 +348,7 @@ void calctrackballvecfirst(rcti *area, short *mval, float *vec)
|
||||
|
||||
vec[0]= x;
|
||||
vec[1]= y;
|
||||
vec[2]= -z; /* jawel! */
|
||||
vec[2]= -z; /* yah yah! */
|
||||
|
||||
if( fabs(vec[2])>fabs(vec[1]) && fabs(vec[2])>fabs(vec[0]) ) {
|
||||
vec[0]= 0.0;
|
||||
@ -392,7 +390,7 @@ void calctrackballvec(rcti *area, short *mval, float *vec)
|
||||
|
||||
vec[0]= x;
|
||||
vec[1]= y;
|
||||
vec[2]= -z; /* jawel! */
|
||||
vec[2]= -z; /* yah yah! */
|
||||
|
||||
}
|
||||
|
||||
@ -410,7 +408,7 @@ void viewmove(int mode)
|
||||
initgrabz(-G.vd->ofs[0], -G.vd->ofs[1], -G.vd->ofs[2]);
|
||||
|
||||
QUATCOPY(oldquat, G.vd->viewquat);
|
||||
getmouseco_sc(mvalo); /* werk met screencoordinaten ivm trackball functie */
|
||||
getmouseco_sc(mvalo); /* work with screen coordinates because of trackball function */
|
||||
calctrackballvec(&curarea->winrct, mvalo, firstvec);
|
||||
|
||||
/* cumultime(0); */
|
||||
@ -422,9 +420,9 @@ void viewmove(int mode)
|
||||
|
||||
if(firsttime) {
|
||||
firsttime= 0;
|
||||
/* wordt hier geroteerd, gezoomd of transleerd */
|
||||
/* are we translating, rotating or zooming? */
|
||||
if(mode==0) {
|
||||
if(G.vd->view!=0) scrarea_queue_headredraw(curarea); /* voor button */
|
||||
if(G.vd->view!=0) scrarea_queue_headredraw(curarea); /*for button */
|
||||
G.vd->view= 0;
|
||||
}
|
||||
|
||||
@ -436,7 +434,7 @@ void viewmove(int mode)
|
||||
}
|
||||
|
||||
|
||||
if(mode==0) { /* viewroteer */
|
||||
if(mode==0) { /* view rotate */
|
||||
|
||||
if(U.flag & TRACKBALL) {
|
||||
calctrackballvec(&curarea->winrct, mval, newvec);
|
||||
@ -463,7 +461,7 @@ void viewmove(int mode)
|
||||
}
|
||||
}
|
||||
else {
|
||||
/* roteren om z-as (x beweging) en liggende as (y) */
|
||||
/* roteren around z-axis (x moves) and horizontal axis (y) */
|
||||
|
||||
phi= 2*(mval[0]-mvalo[0]);
|
||||
phi/= (float)curarea->winx;
|
||||
@ -472,7 +470,7 @@ void viewmove(int mode)
|
||||
q1[1]= q1[2]= 0.0;
|
||||
q1[3]= si;
|
||||
|
||||
/* liggende as */
|
||||
/* horizontal axis */
|
||||
VECCOPY(q2+1, G.vd->viewinv[0]);
|
||||
Normalise(q2+1);
|
||||
phi= (mvalo[1]-mval[1]);
|
||||
@ -507,11 +505,11 @@ void viewmove(int mode)
|
||||
else if(mode==2) {
|
||||
G.vd->dist*= 1.0+(float)(mvalo[0]-mval[0]+mvalo[1]-mval[1])/1000.0;
|
||||
|
||||
/* deze limits ook in toets.c */
|
||||
/* these limits are in toets.c too */
|
||||
if(G.vd->dist<0.001*G.vd->grid) G.vd->dist= 0.001*G.vd->grid;
|
||||
if(G.vd->dist>10.0*G.vd->far) G.vd->dist=10.0*G.vd->far;
|
||||
|
||||
mval[1]= mvalo[1]; /* blijft ie zoomen */
|
||||
mval[1]= mvalo[1]; /* keeps zooming that way */
|
||||
mval[0]= mvalo[0];
|
||||
}
|
||||
|
||||
@ -526,7 +524,7 @@ void viewmove(int mode)
|
||||
}
|
||||
else BIF_wait_for_statechange();
|
||||
|
||||
/* dit moet onderaan, anders pakt de get_mbut het niet op de PC... */
|
||||
/* this in the end, otherwise get_mbut does not work on a PC... */
|
||||
if( !(get_mbut() & (L_MOUSE|M_MOUSE))) break;
|
||||
}
|
||||
|
||||
@ -535,7 +533,7 @@ void viewmove(int mode)
|
||||
|
||||
short v3d_windowmode=0;
|
||||
|
||||
void setwinmatrixview3d(rctf *rect) /* rect: voor picking */
|
||||
void setwinmatrixview3d(rctf *rect) /* rect: for picking */
|
||||
{
|
||||
Camera *cam=0;
|
||||
float d, near, far, winx = 0.0, winy = 0.0;
|
||||
@ -613,7 +611,7 @@ void setwinmatrixview3d(rctf *rect) /* rect: voor picking */
|
||||
|
||||
if(G.vd->persp==2 && (G.special1 & G_HOLO)) {
|
||||
if(cam && (cam->flag & CAM_HOLO2)) {
|
||||
tfac= fac/4.0; /* de fac is 1280/640 gecorr voor obszoom */
|
||||
tfac= fac/4.0; /* the fac is 1280/640 corrected for obszoom */
|
||||
|
||||
if(cam->netend==0.0) cam->netend= EFRA;
|
||||
fac= (G.scene->r.cfra-1.0)/(cam->netend)-0.5;
|
||||
@ -676,7 +674,7 @@ void obmat_to_viewmat(Object *ob)
|
||||
Mat4Ortho(bmat);
|
||||
Mat4Invert(G.vd->viewmat, bmat);
|
||||
|
||||
/* viewquat berekenen, o.a. voor add object */
|
||||
/* view quat calculation, needed for add object */
|
||||
Mat3CpyMat4(tmat, G.vd->viewmat);
|
||||
Mat3ToQuat(tmat, G.vd->viewquat);
|
||||
}
|
||||
@ -685,7 +683,6 @@ void obmat_to_viewmat(Object *ob)
|
||||
void setviewmatrixview3d()
|
||||
{
|
||||
Camera *cam;
|
||||
/* float bepaalphitheta(); */
|
||||
|
||||
if(G.special1 & G_HOLO) RE_holoview();
|
||||
|
||||
@ -745,7 +742,7 @@ short selectprojektie(unsigned int *buffer, short x1, short y1, short x2, short
|
||||
|
||||
glSelectBuffer( MAXPICKBUF, buffer);
|
||||
glRenderMode(GL_SELECT);
|
||||
glInitNames(); /* deze twee fies zijn waarvoor? Anders werkt het niet */
|
||||
glInitNames(); /* these two calls whatfor? It doesnt work otherwise */
|
||||
glPushName(-1);
|
||||
code= 1;
|
||||
|
||||
@ -767,7 +764,7 @@ short selectprojektie(unsigned int *buffer, short x1, short y1, short x2, short
|
||||
base= base->next;
|
||||
}
|
||||
}
|
||||
glPopName(); /* zie boven (pushname) */
|
||||
glPopName(); /* see above (pushname) */
|
||||
hits= glRenderMode(GL_RENDER);
|
||||
if(hits<0) error("Too many objects in selectbuf");
|
||||
|
||||
@ -797,8 +794,8 @@ unsigned int free_localbit()
|
||||
|
||||
lay= 0;
|
||||
|
||||
/* soms kunnen we een localview kwijtrijaken: als een area gesloten wordt */
|
||||
/* alle area's aflopen: welke localviews zijn in gebruik */
|
||||
/* sometimes we loose a localview: when an area is closed */
|
||||
/* check all areas: which localviews are in use? */
|
||||
sc= G.main->screen.first;
|
||||
while(sc) {
|
||||
sa= sc->areabase.first;
|
||||
@ -901,7 +898,7 @@ void initlocalview()
|
||||
scrarea_queue_winredraw(curarea);
|
||||
}
|
||||
else {
|
||||
/* flags wissen */
|
||||
/* clear flags */
|
||||
base= FIRSTBASE;
|
||||
while(base) {
|
||||
if( base->lay & locallay ) {
|
||||
@ -918,7 +915,7 @@ void initlocalview()
|
||||
}
|
||||
}
|
||||
|
||||
void centreview() /* localview zonder local! */
|
||||
void centreview() /* like a localview without local! */
|
||||
{
|
||||
Base *base;
|
||||
float size, min[3], max[3], afm[3];
|
||||
@ -1011,7 +1008,7 @@ void endlocalview(ScrArea *sa)
|
||||
v3d->localvd= 0;
|
||||
v3d->localview= 0;
|
||||
|
||||
/* als in ander window de layers zijn veranderd */
|
||||
/* for when in other window the layers have changed */
|
||||
if(v3d->scenelock) v3d->lay= G.scene->lay;
|
||||
|
||||
base= FIRSTBASE;
|
||||
@ -1026,7 +1023,7 @@ void endlocalview(ScrArea *sa)
|
||||
}
|
||||
|
||||
countall();
|
||||
allqueue(REDRAWVIEW3D, 0); /* ivm select */
|
||||
allqueue(REDRAWVIEW3D, 0); /* because of select */
|
||||
|
||||
}
|
||||
}
|
||||
|
@ -110,8 +110,8 @@ MDeformVert *wpaintundobuf=NULL;
|
||||
/* Function prototypes */
|
||||
int calc_vp_alpha_dl(DispList *disp, MVert *mvert, int vert, short *mval);
|
||||
|
||||
/* in tegenstelling tot cpack teken kleuren, zijn de MCOL kleuren (vpaint kleuren) per byte!
|
||||
en dus endian ongevoelig. Mcol = ABGR!!! Oppassen met cpack functies */
|
||||
/* in contradiction to cpack drawing colors, the MCOL colors (vpaint colors) are per byte!
|
||||
so not endian sensitive. Mcol = ABGR!!! so be cautious with cpack calls */
|
||||
|
||||
unsigned int rgba_to_mcol(float r, float g, float b, float a)
|
||||
{
|
||||
@ -145,8 +145,8 @@ unsigned int vpaint_get_current_col(void)
|
||||
|
||||
void do_shared_vertexcol(Mesh *me)
|
||||
{
|
||||
/* als geen mcol: niet doen */
|
||||
/* als tface: alleen de betreffende vlakken, anders alles */
|
||||
/* if no mcol: do not do */
|
||||
/* if tface: only the involved faces, otherwise all */
|
||||
MFace *mface;
|
||||
TFace *tface;
|
||||
int a;
|
||||
@ -559,7 +559,7 @@ static unsigned int mcol_mul(unsigned int col1, unsigned int col2, int fac)
|
||||
cp2= (char *)&col2;
|
||||
cp= (char *)&col;
|
||||
|
||||
/* eerstmullen, dan fac blenden */
|
||||
/* first mul, then blend the fac */
|
||||
cp[0]= 255;
|
||||
cp[1]= (mfac*cp1[1] + fac*((cp2[1]*cp1[1])>>8) )>>8;
|
||||
cp[2]= (mfac*cp1[2] + fac*((cp2[2]*cp1[2])>>8) )>>8;
|
||||
@ -789,12 +789,12 @@ void weight_paint(void)
|
||||
|
||||
// if(me->tface==NULL && me->mcol==NULL) return;
|
||||
|
||||
/* imat voor normalen */
|
||||
/* imat for normals */
|
||||
Mat4MulMat4(mat, ob->obmat, G.vd->viewmat);
|
||||
Mat4Invert(imat, mat);
|
||||
Mat3CpyMat4(vpimat, imat);
|
||||
|
||||
/* projektiematrix laden */
|
||||
/* load projection matrix */
|
||||
mymultmatrix(ob->obmat);
|
||||
mygetsingmatrix(mat);
|
||||
myloadmatrix(G.vd->viewmat);
|
||||
@ -819,7 +819,7 @@ void weight_paint(void)
|
||||
|
||||
firsttime= 0;
|
||||
|
||||
/* welke vlakken doen mee */
|
||||
/* which faces are involved */
|
||||
if(Gvp.flag & VP_AREA) {
|
||||
totindex= sample_backbuf_area(mval[0], mval[1]);
|
||||
}
|
||||
@ -914,7 +914,7 @@ void weight_paint(void)
|
||||
me->mcol= 0;
|
||||
}
|
||||
|
||||
/* cirkel wissen */
|
||||
/* clear circle */
|
||||
draw_sel_circle(0, mvalo, 0, Gvp.size, 1);
|
||||
|
||||
makeDispList(ob);
|
||||
@ -948,12 +948,12 @@ void vertex_paint()
|
||||
|
||||
if(me->tface==NULL && me->mcol==NULL) return;
|
||||
|
||||
/* imat voor normalen */
|
||||
/* imat for normals */
|
||||
Mat4MulMat4(mat, ob->obmat, G.vd->viewmat);
|
||||
Mat4Invert(imat, mat);
|
||||
Mat3CpyMat4(vpimat, imat);
|
||||
|
||||
/* projektiematrix laden */
|
||||
/* load projection matrix */
|
||||
mymultmatrix(ob->obmat);
|
||||
mygetsingmatrix(mat);
|
||||
myloadmatrix(G.vd->viewmat);
|
||||
@ -979,7 +979,7 @@ void vertex_paint()
|
||||
|
||||
firsttime= 0;
|
||||
|
||||
/* welke vlakken doen mee */
|
||||
/* which faces are involved */
|
||||
if(Gvp.flag & VP_AREA) {
|
||||
totindex= sample_backbuf_area(mval[0], mval[1]);
|
||||
}
|
||||
@ -1087,7 +1087,7 @@ void vertex_paint()
|
||||
me->mcol= 0;
|
||||
}
|
||||
|
||||
/* cirkel wissen */
|
||||
/* clear circle */
|
||||
draw_sel_circle(0, mvalo, 0, Gvp.size, 1);
|
||||
|
||||
allqueue(REDRAWVIEW3D, 0);
|
||||
@ -1121,7 +1121,7 @@ void set_wpaint(void) /* toggle */
|
||||
setcursor_space(SPACE_VIEW3D, CURSOR_VPAINT);
|
||||
}
|
||||
else {
|
||||
freefastshade(); /* voor zekerheid */
|
||||
freefastshade(); /* to be sure */
|
||||
if (ob)
|
||||
makeDispList(ob);
|
||||
if(!(G.f & G_FACESELECT))
|
||||
@ -1165,7 +1165,7 @@ void set_vpaint(void) /* toggle */
|
||||
setcursor_space(SPACE_VIEW3D, CURSOR_VPAINT);
|
||||
}
|
||||
else {
|
||||
freefastshade(); /* voor zekerheid */
|
||||
freefastshade(); /* to be sure */
|
||||
if (ob) makeDispList(ob);
|
||||
if((G.f & G_FACESELECT)==0) setcursor_space(SPACE_VIEW3D, CURSOR_STD);
|
||||
}
|
||||
|
@ -237,7 +237,7 @@ int main(int argc, char **argv)
|
||||
syshandle = SYS_GetSystem();
|
||||
GEN_init_messaging_system();
|
||||
|
||||
/* eerste testen op background */
|
||||
/* first test for background */
|
||||
G.f |= G_SCENESCRIPT; /* scenescript always set! */
|
||||
for(a=1; a<argc; a++) {
|
||||
|
||||
@ -298,10 +298,10 @@ int main(int argc, char **argv)
|
||||
}
|
||||
|
||||
#ifdef __sgi
|
||||
setuid(getuid()); /* einde superuser */
|
||||
setuid(getuid()); /* end superuser */
|
||||
#endif
|
||||
|
||||
RE_init_render_data(); /* moet vooraan staan ivm R.winpos uit defaultfile */
|
||||
RE_init_render_data(); /* must be called here because R.winpos from default file */
|
||||
|
||||
if(G.background==0) {
|
||||
for(a=1; a<argc; a++) {
|
||||
@ -409,7 +409,7 @@ int main(int argc, char **argv)
|
||||
G.have_quicktime = TRUE;
|
||||
#endif /* WITH_QUICKTIME */
|
||||
|
||||
/* OK we zijn er klaar voor */
|
||||
/* OK we are ready for it */
|
||||
|
||||
for(a=1; a<argc; a++) {
|
||||
if (G.afbreek==1) break;
|
||||
|
Loading…
Reference in New Issue
Block a user