Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/blenkernel/intern/texture.c')
-rw-r--r--source/blender/blenkernel/intern/texture.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/blenkernel/intern/texture.c b/source/blender/blenkernel/intern/texture.c
index 936381c85cc..bb726887d32 100644
--- a/source/blender/blenkernel/intern/texture.c
+++ b/source/blender/blenkernel/intern/texture.c
@@ -53,6 +53,7 @@
#include "DNA_world_types.h"
#include "DNA_brush_types.h"
#include "DNA_node_types.h"
+#include "DNA_color_types.h"
#include "DNA_scene_types.h"
#include "IMB_imbuf_types.h"
@@ -390,6 +391,17 @@ int do_colorband(ColorBand *coba, float in, float out[4])
return 1; /* OK */
}
+void colorband_table_RGBA(ColorBand *coba, float **array, int *size)
+{
+ int a;
+
+ *size = CM_TABLE+1;
+ *array = MEM_callocN(sizeof(float)*(*size)*4, "ColorBand");
+
+ for(a=0; a<*size; a++)
+ do_colorband(coba, (float)a/(float)CM_TABLE, &(*array)[a*4]);
+}
+
/* ******************* TEX ************************ */
void free_texture(Tex *tex)