forked from bartvdbraak/blender
#3706 (patch tracker)
- Adds missing ipos for texture * color, contrast, brightness - Adds IKey menu in the texture subcontext #3711 (bug tracker) - report and patch for missing blend types Halo and Radial Patches by Levon Hudson
This commit is contained in:
parent
50e26b7637
commit
b0d0c87a1f
@ -126,7 +126,9 @@ int te_ar[TE_TOTIPO] ={
|
|||||||
|
|
||||||
TE_MG_TYP, TE_MGH, TE_MG_LAC, TE_MG_OCT, TE_MG_OFF, TE_MG_GAIN,
|
TE_MG_TYP, TE_MGH, TE_MG_LAC, TE_MG_OCT, TE_MG_OFF, TE_MG_GAIN,
|
||||||
|
|
||||||
TE_N_BAS1, TE_N_BAS2
|
TE_N_BAS1, TE_N_BAS2,
|
||||||
|
|
||||||
|
TE_COL_R, TE_COL_G, TE_COL_B, TE_BRIGHT, TE_CONTRA
|
||||||
};
|
};
|
||||||
|
|
||||||
int seq_ar[SEQ_TOTIPO]= {
|
int seq_ar[SEQ_TOTIPO]= {
|
||||||
@ -1068,6 +1070,17 @@ static void *give_tex_poin(Tex *tex, int adrcode, int *type )
|
|||||||
poin= &(tex->noisebasis); *type= IPO_SHORT; break;
|
poin= &(tex->noisebasis); *type= IPO_SHORT; break;
|
||||||
case TE_N_BAS2:
|
case TE_N_BAS2:
|
||||||
poin= &(tex->noisebasis2); *type= IPO_SHORT; break;
|
poin= &(tex->noisebasis2); *type= IPO_SHORT; break;
|
||||||
|
case TE_COL_R:
|
||||||
|
poin= &(tex->rfac); break;
|
||||||
|
case TE_COL_G:
|
||||||
|
poin= &(tex->gfac); break;
|
||||||
|
case TE_COL_B:
|
||||||
|
poin= &(tex->bfac); break;
|
||||||
|
case TE_BRIGHT:
|
||||||
|
poin= &(tex->bright); break;
|
||||||
|
case TE_CONTRA:
|
||||||
|
poin= &(tex->contrast); break;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return poin;
|
return poin;
|
||||||
@ -1576,7 +1589,7 @@ void set_icu_vars(IpoCurve *icu)
|
|||||||
case TE_MG_TYP:
|
case TE_MG_TYP:
|
||||||
icu->vartype= IPO_SHORT;
|
icu->vartype= IPO_SHORT;
|
||||||
icu->ipo= IPO_CONST;
|
icu->ipo= IPO_CONST;
|
||||||
icu->ymax= 4.0; break;
|
icu->ymax= 6.0; break;
|
||||||
case TE_MGH:
|
case TE_MGH:
|
||||||
icu->ymin= 0.0001;
|
icu->ymin= 0.0001;
|
||||||
icu->ymax= 2.0; break;
|
icu->ymax= 2.0; break;
|
||||||
@ -1591,6 +1604,17 @@ void set_icu_vars(IpoCurve *icu)
|
|||||||
icu->vartype= IPO_SHORT;
|
icu->vartype= IPO_SHORT;
|
||||||
icu->ipo= IPO_CONST;
|
icu->ipo= IPO_CONST;
|
||||||
icu->ymax= 8.0; break;
|
icu->ymax= 8.0; break;
|
||||||
|
case TE_COL_R:
|
||||||
|
icu->ymax= 0.0; break;
|
||||||
|
case TE_COL_G:
|
||||||
|
icu->ymax= 2.0; break;
|
||||||
|
case TE_COL_B:
|
||||||
|
icu->ymax= 2.0; break;
|
||||||
|
case TE_BRIGHT:
|
||||||
|
icu->ymax= 2.0; break;
|
||||||
|
case TE_CONTRA:
|
||||||
|
icu->ymax= 5.0; break;
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if(icu->blocktype==ID_SEQ) {
|
else if(icu->blocktype==ID_SEQ) {
|
||||||
|
@ -171,8 +171,8 @@ typedef short IPO_Channel;
|
|||||||
|
|
||||||
/* ******************** */
|
/* ******************** */
|
||||||
|
|
||||||
#define TE_TOTIPO 21
|
#define TE_TOTIPO 26
|
||||||
#define TE_TOTNAM 21
|
#define TE_TOTNAM 26
|
||||||
|
|
||||||
#define TE_NSIZE 1
|
#define TE_NSIZE 1
|
||||||
#define TE_NDEPTH 2
|
#define TE_NDEPTH 2
|
||||||
@ -200,6 +200,12 @@ typedef short IPO_Channel;
|
|||||||
#define TE_N_BAS1 20
|
#define TE_N_BAS1 20
|
||||||
#define TE_N_BAS2 21
|
#define TE_N_BAS2 21
|
||||||
|
|
||||||
|
#define TE_COL_R 22
|
||||||
|
#define TE_COL_G 23
|
||||||
|
#define TE_COL_B 24
|
||||||
|
#define TE_BRIGHT 25
|
||||||
|
#define TE_CONTRA 26
|
||||||
|
|
||||||
/* ******************** */
|
/* ******************** */
|
||||||
|
|
||||||
#define SEQ_TOTIPO 1
|
#define SEQ_TOTIPO 1
|
||||||
|
@ -587,7 +587,7 @@ static void make_mat_editipo(SpaceIpo *si)
|
|||||||
static void make_texture_editipo(SpaceIpo *si)
|
static void make_texture_editipo(SpaceIpo *si)
|
||||||
{
|
{
|
||||||
EditIpo *ei;
|
EditIpo *ei;
|
||||||
int a;
|
int a, len;
|
||||||
char *name;
|
char *name;
|
||||||
|
|
||||||
if(si->from==0) return;
|
if(si->from==0) return;
|
||||||
@ -603,6 +603,12 @@ static void make_texture_editipo(SpaceIpo *si)
|
|||||||
|
|
||||||
ei->col= ipo_rainbow(a, TE_TOTIPO);
|
ei->col= ipo_rainbow(a, TE_TOTIPO);
|
||||||
|
|
||||||
|
len= strlen(ei->name);
|
||||||
|
if(len) {
|
||||||
|
if( ei->name[ len-1 ]=='R') ei->col= 0x5050FF;
|
||||||
|
else if( ei->name[ len-1 ]=='G') ei->col= 0x50FF50;
|
||||||
|
else if( ei->name[ len-1 ]=='B') ei->col= 0xFF7050;
|
||||||
|
}
|
||||||
ei->icu= find_ipocurve(si->ipo, ei->adrcode);
|
ei->icu= find_ipocurve(si->ipo, ei->adrcode);
|
||||||
if(ei->icu) {
|
if(ei->icu) {
|
||||||
ei->flag= ei->icu->flag;
|
ei->flag= ei->icu->flag;
|
||||||
@ -2097,6 +2103,7 @@ void common_insertkey(void)
|
|||||||
IpoCurve *icu;
|
IpoCurve *icu;
|
||||||
World *wo;
|
World *wo;
|
||||||
Lamp *la;
|
Lamp *la;
|
||||||
|
Tex *te;
|
||||||
int tlay, map, event;
|
int tlay, map, event;
|
||||||
char menustr[256];
|
char menustr[256];
|
||||||
|
|
||||||
@ -2249,6 +2256,85 @@ void common_insertkey(void)
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
else if(tab==TAB_SHADING_TEX) {
|
||||||
|
id= G.buts->lockpoin;
|
||||||
|
te= G.buts->lockpoin;
|
||||||
|
if(id) {
|
||||||
|
event= pupmenu("Insert Key %t|Cloud%x0|Mable%x1|Stucci%x2|Wood%x3|Magic%x4|Blend%x5|Musgrave%x6|Voronoi%x7|Distnoise%x8|ColourFilter%x9");
|
||||||
|
if(event== -1) return;
|
||||||
|
|
||||||
|
if(event==0) {
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_NSIZE);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_NDEPTH);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_NTYPE);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_MG_TYP);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_N_BAS1);
|
||||||
|
}
|
||||||
|
if(event==1) {
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_NSIZE);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_NDEPTH);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_NTYPE);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_TURB);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_MG_TYP);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_N_BAS1);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_N_BAS2);
|
||||||
|
}
|
||||||
|
if(event==2) {
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_NSIZE);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_NTYPE);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_TURB);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_MG_TYP);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_N_BAS1);
|
||||||
|
}
|
||||||
|
if(event==3) {
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_NSIZE);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_NTYPE);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_TURB);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_MG_TYP);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_N_BAS1);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_N_BAS2);
|
||||||
|
}
|
||||||
|
if(event==4) {
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_NDEPTH);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_TURB);
|
||||||
|
}
|
||||||
|
if(event==5) {
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_MG_TYP);
|
||||||
|
}
|
||||||
|
if(event==6) {
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_MG_TYP);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_MGH);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_MG_LAC);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_MG_OCT);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_MG_OFF);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_MG_GAIN);
|
||||||
|
}
|
||||||
|
if(event==7) {
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_VNW1);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_VNW2);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_VNW3);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_VNW4);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_VNMEXP);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_VN_DISTM);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_VN_COLT);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_ISCA);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_NSIZE);
|
||||||
|
}
|
||||||
|
if(event==8) {
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_MG_OCT);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_MG_OFF);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_MG_GAIN);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_DISTA);
|
||||||
|
}
|
||||||
|
if(event==9) {
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_COL_R);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_COL_G);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_COL_B);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_BRIGHT);
|
||||||
|
insertkey(id, ID_TE, NULL, NULL, TE_CONTRA);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else if(G.buts->mainb==CONTEXT_OBJECT) {
|
else if(G.buts->mainb==CONTEXT_OBJECT) {
|
||||||
ob= OBACT;
|
ob= OBACT;
|
||||||
@ -4462,5 +4548,3 @@ void move_to_frame(void)
|
|||||||
}
|
}
|
||||||
BIF_undo_push("Set frame to selected Ipo vertex");
|
BIF_undo_push("Set frame to selected Ipo vertex");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ char *mtex_ic_names[TEX_TOTNAM] = { "OfsX", "OfsY", "OfsZ", "SizeX", "SizeY", "S
|
|||||||
char *tex_ic_names[TE_TOTNAM] = { "NSize", "NDepth", "NType", "Turb", "Vnw1", "Vnw2",
|
char *tex_ic_names[TE_TOTNAM] = { "NSize", "NDepth", "NType", "Turb", "Vnw1", "Vnw2",
|
||||||
"Vnw3", "Vnw4", "MinkMExp", "DistM", "ColT", "iScale",
|
"Vnw3", "Vnw4", "MinkMExp", "DistM", "ColT", "iScale",
|
||||||
"DistA", "MgType", "MgH", "Lacu", "Oct", "MgOff",
|
"DistA", "MgType", "MgH", "Lacu", "Oct", "MgOff",
|
||||||
"MgGain", "NBase1", "NBase2" };
|
"MgGain", "NBase1", "NBase2", "ColR", "ColG", "ColB", "Bright", "Contras"};
|
||||||
char *ma_ic_names[MA_TOTNAM] = { "R", "G", "B", "SpecR", "SpecG", "SpecB", "MirR",
|
char *ma_ic_names[MA_TOTNAM] = { "R", "G", "B", "SpecR", "SpecG", "SpecB", "MirR",
|
||||||
"MirG", "MirB", "Ref", "Alpha", "Emit", "Amb", "Spec",
|
"MirG", "MirB", "Ref", "Alpha", "Emit", "Amb", "Spec",
|
||||||
"Hard", "SpTra", "Ior", "Mode", "HaSize", "Translu",
|
"Hard", "SpTra", "Ior", "Mode", "HaSize", "Translu",
|
||||||
@ -133,7 +133,7 @@ char *getname_ob_ei(int nr, int colipo)
|
|||||||
|
|
||||||
char *getname_tex_ei(int nr)
|
char *getname_tex_ei(int nr)
|
||||||
{
|
{
|
||||||
if(nr>=TE_NSIZE && nr<=TE_N_BAS2) return tex_ic_names[nr-1];
|
if(nr>=TE_NSIZE && nr<=TE_CONTRA) return tex_ic_names[nr-1];
|
||||||
|
|
||||||
return ic_name_empty[0];
|
return ic_name_empty[0];
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user