Page MenuHome

patchfile.diff

File Metadata

Author
fred van der essen (efbie)
Created
Nov 13 2013, 1:08 PM

patchfile.diff

? blender-fred/tools/Blender.pyc
? blender-fred/tools/__init__.pyc
? blender-fred/tools/bcolors.pyc
? blender-fred/tools/btools.pyc
Index: blender-fred/source/blender/blenkernel/intern/material.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/blenkernel/intern/material.c,v
retrieving revision 1.37
diff -u -r1.37 material.c
--- blender-fred/source/blender/blenkernel/intern/material.c 17 Feb 2006 15:44:46 -0000 1.37
+++ blender-fred/source/blender/blenkernel/intern/material.c 21 Feb 2006 00:16:44 -0000
@@ -48,6 +48,7 @@
#include "DNA_texture_types.h"
#include "BLI_blenlib.h"
+#include "BLI_arithb.h"
#include "BKE_bad_level_calls.h"
#include "BKE_blender.h"
@@ -888,7 +889,94 @@
tmp= fac*col[2];
if(tmp > *b) *b= tmp;
}
- break;
+ break;
+ case MA_RAMP_DODGE:
+ tmp = 1.0 - fac*col[0];
+ if(tmp == 0.0)
+ *r = 1.0;
+ else if ((*r = (*r) / tmp)> 1.0)
+ *r = 1.0;
+ if(g) {
+ tmp = 1.0 - fac*col[1];
+ if(tmp == 0.0)
+ *g = 1.0;
+ else if ((*g = (*g) / tmp) > 1.0)
+ *g = 1.0;
+
+ tmp = 1.0 - fac*col[2];
+ if(tmp == 0.0)
+ *b = 1.0;
+ else if ((*b = (*b) / tmp) > 1.0)
+ *b = 1.0;
+ }
+ break;
+ case MA_RAMP_BURN:
+
+ tmp = facm + fac*col[0];
+
+ if(tmp == 0.0)
+ *r = 0.0;
+ else if (( (*r) = (1.0 - (1.0 - (*r)) / tmp )) < 0.0 )
+ *r = 0.0;
+ if(g) {
+ tmp = facm + fac*col[1];
+ if(tmp == 0.0)
+ *g = 0.0;
+ else if (( (*g) = (1.0 - (1.0 - (*g)) / tmp )) < 0.0 )
+ *g = 0.0;
+
+ tmp = facm + fac*col[2];
+ if(tmp == 0.0)
+ *b = 0.0;
+ else if (( (*b) = (1.0 - (1.0 - (*b)) / tmp )) < 0.0 )
+ *b = 0.0;
+ }
+ break;
+ case MA_RAMP_HUE:
+ if(g){
+ float rH,rS,rV;
+ float colH,colS,colV;
+ float tmpr,tmpg,tmpb;
+ rgb_to_hsv(*r,*g,*b,&rH,&rS,&rV);
+ rgb_to_hsv(col[0],col[1],col[2],&colH,&colS,&colV);
+ hsv_to_rgb( colH , rS, rV, &tmpr, &tmpg, &tmpb);
+ *r = facm*(*r) + fac*tmpr;
+ *g = facm*(*g) + fac*tmpg;
+ *b = facm*(*b) + fac*tmpb;
+
+ }
+ break;
+ case MA_RAMP_SAT:
+ if(g){
+ float rH,rS,rV;
+ float colH,colS,colV;
+ rgb_to_hsv(*r,*g,*b,&rH,&rS,&rV);
+ rgb_to_hsv(col[0],col[1],col[2],&colH,&colS,&colV);
+ hsv_to_rgb( rH, (facm*rS +fac*colS), rV, r, g, b);
+ }
+ break;
+ case MA_RAMP_VAL:
+ if(g){
+ float rH,rS,rV;
+ float colH,colS,colV;
+ rgb_to_hsv(*r,*g,*b,&rH,&rS,&rV);
+ rgb_to_hsv(col[0],col[1],col[2],&colH,&colS,&colV);
+ hsv_to_rgb( rH, rS, (facm*rV +fac*colV), r, g, b);
+ }
+ break;
+ case MA_RAMP_COLOR:
+ if(g){
+ float rH,rS,rV;
+ float colH,colS,colV;
+ float tmpr,tmpg,tmpb;
+ rgb_to_hsv(*r,*g,*b,&rH,&rS,&rV);
+ rgb_to_hsv(col[0],col[1],col[2],&colH,&colS,&colV);
+ hsv_to_rgb( colH, colS, rV, &tmpr, &tmpg, &tmpb);
+ *r = facm*(*r) + fac*tmpr;
+ *g = facm*(*g) + fac*tmpg;
+ *b = facm*(*b) + fac*tmpb;
+ }
+ break;
}
}
Index: blender-fred/source/blender/makesdna/DNA_material_types.h
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/makesdna/DNA_material_types.h,v
retrieving revision 1.37
diff -u -r1.37 DNA_material_types.h
--- blender-fred/source/blender/makesdna/DNA_material_types.h 14 Feb 2006 18:41:34 -0000 1.37
+++ blender-fred/source/blender/makesdna/DNA_material_types.h 21 Feb 2006 00:16:45 -0000
@@ -200,6 +200,12 @@
#define MA_RAMP_DARK 7
#define MA_RAMP_LIGHT 8
#define MA_RAMP_OVERLAY 9
+#define MA_RAMP_DODGE 10
+#define MA_RAMP_BURN 11
+#define MA_RAMP_HUE 12
+#define MA_RAMP_SAT 13
+#define MA_RAMP_VAL 14
+#define MA_RAMP_COLOR 15
/* texco */
#define TEXCO_ORCO 1
Index: blender-fred/source/blender/src/buttons_shading.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/buttons_shading.c,v
retrieving revision 1.171
diff -u -r1.171 buttons_shading.c
--- blender-fred/source/blender/src/buttons_shading.c 19 Feb 2006 18:41:32 -0000 1.171
+++ blender-fred/source/blender/src/buttons_shading.c 21 Feb 2006 00:16:52 -0000
@@ -3018,7 +3018,7 @@
uiDefBut(block, LABEL, 0, "Factor",190,30,120,20, NULL, 0, 0, 0, 0, "");
uiBlockBeginAlign(block);
uiDefButC(block, MENU, B_MATPRV, "Shader %x0|Energy %x1|Normal %x2|Result %x3",10,10,90,20, inputc, 0, 0, 0, 0, "Input for Ramp");
- uiDefButC(block, MENU, B_MATPRV, "Mix %x0|Add %x1|Subtract %x3|Multiply %x2|Screen %x4|Overlay %x9|Divide %x5|Difference %x6|Darken %x7|Lighten %x8",110,10,90,20, methodc, 0, 0, 0, 0, "Blending method for Ramp (uses alpha in Colorband)");
+ uiDefButC(block, MENU, B_MATPRV, "Mix %x0|Add %x1|Subtract %x3|Multiply %x2|Screen %x4|Overlay %x9|Divide %x5|Difference %x6|Darken %x7|Lighten %x8|Dodge %x10|Burn %x11|Color %x15|Lightness %14|Saturation %13|Hue %12",110,10,90,20, methodc, 0, 0, 0, 0, "Blending method for Ramp (uses alpha in Colorband)");
uiDefButF(block, NUMSLI, B_MATPRV, "", 190,10,120,20, facp, 0.0, 1.0, 100, 0, "Blending factor (also uses alpha in Colorband)");
}
}
Index: blender-fred/source/blender/src/drawnode.c
===================================================================
RCS file: /cvsroot/bf-blender/blender/source/blender/src/drawnode.c,v
retrieving revision 1.19
diff -u -r1.19 drawnode.c
--- blender-fred/source/blender/src/drawnode.c 19 Feb 2006 14:55:16 -0000 1.19
+++ blender-fred/source/blender/src/drawnode.c 21 Feb 2006 00:16:55 -0000
@@ -270,7 +270,7 @@
uiBut *bt;
/* blend type */
- bt=uiDefButS(block, MENU, B_NODE_EXEC+node->nr, "Mix %x0|Add %x1|Subtract %x3|Multiply %x2|Screen %x4|Overlay %x9|Divide %x5|Difference %x6|Darken %x7|Lighten %x8",
+ bt=uiDefButS(block, MENU, B_NODE_EXEC+node->nr, "Mix %x0|Add %x1|Subtract %x3|Multiply %x2|Screen %x4|Overlay %x9|Divide %x5|Difference %x6|Darken %x7|Lighten %x8|Acrylic %x10|Dodge %x10|Burn %x11|Color %x15|Lightness %x14|Saturation %x13|Hue %x12",
butr->xmin, butr->ymin, butr->xmax-butr->xmin, 20,
&node->custom1, 0, 0, 0, 0, "");
uiButSetFunc(bt, node_but_title_cb, node, bt);

Event Timeline