[Bf-blender-cvs] [eba31d3] soc-2013-paint: Take care of more review points.

Antony Riakiotakis noreply at git.blender.org
Fri Jul 11 14:59:35 CEST 2014


Commit: eba31d3211d896686993524669f4389d4b28d127
Author: Antony Riakiotakis
Date:   Fri Jul 11 15:59:19 2014 +0300
https://developer.blender.org/rBeba31d3211d896686993524669f4389d4b28d127

Take care of more review points.

===================================================================

M	source/blender/blenkernel/BKE_library.h
M	source/blender/blenkernel/BKE_material.h
M	source/blender/blenlib/BLI_math_vector.h
M	source/blender/blenlib/intern/math_color_blend_inline.c
M	source/blender/blenlib/intern/math_vector_inline.c
M	source/blender/blenloader/intern/versioning_270.c

===================================================================

diff --git a/source/blender/blenkernel/BKE_library.h b/source/blender/blenkernel/BKE_library.h
index 0372931..0c7af12 100644
--- a/source/blender/blenkernel/BKE_library.h
+++ b/source/blender/blenkernel/BKE_library.h
@@ -71,7 +71,7 @@ void id_clear_lib_data(struct Main *bmain, struct ID *id);
 
 struct ListBase *which_libbase(struct Main *mainlib, short type);
 
-#define MAX_LIBARRAY    41
+#define MAX_LIBARRAY    43
 int set_listbasepointers(struct Main *main, struct ListBase **lb);
 
 void BKE_libblock_free(struct Main *bmain, void *idv);
diff --git a/source/blender/blenkernel/BKE_material.h b/source/blender/blenkernel/BKE_material.h
index 420db38..1764c52 100644
--- a/source/blender/blenkernel/BKE_material.h
+++ b/source/blender/blenkernel/BKE_material.h
@@ -43,8 +43,6 @@ struct Object;
 struct Mesh;
 struct MTFace;
 struct Scene;
-struct Image;
-struct MTex;
 
 /* materials */
 
diff --git a/source/blender/blenlib/BLI_math_vector.h b/source/blender/blenlib/BLI_math_vector.h
index feaf485..1191301 100644
--- a/source/blender/blenlib/BLI_math_vector.h
+++ b/source/blender/blenlib/BLI_math_vector.h
@@ -65,7 +65,6 @@ MINLINE void swap_v4_v4(float a[4], float b[4]);
 MINLINE void copy_v2_v2_char(char r[2], const char a[2]);
 MINLINE void copy_v3_v3_char(char r[3], const char a[3]);
 MINLINE void copy_v4_v4_char(char r[4], const char a[4]);
-MINLINE void copy_v4_v4_uchar(unsigned char r[4], const unsigned char a[4]);
 
 /* short */
 MINLINE void copy_v2_v2_short(short r[2], const short a[2]);
diff --git a/source/blender/blenlib/intern/math_color_blend_inline.c b/source/blender/blenlib/intern/math_color_blend_inline.c
index 901076e..1985e06 100644
--- a/source/blender/blenlib/intern/math_color_blend_inline.c
+++ b/source/blender/blenlib/intern/math_color_blend_inline.c
@@ -72,7 +72,7 @@ MINLINE void blend_color_mix_byte(unsigned char dst[4], const unsigned char src1
 	}
 	else {
 		/* no op */
-		copy_v4_v4_uchar(dst, src1);
+		copy_v4_v4_char((char *)dst, (char *)src1);
 	}
 }
 
@@ -94,7 +94,7 @@ MINLINE void blend_color_add_byte(unsigned char dst[4], const unsigned char src1
 	}
 	else {
 		/* no op */
-		copy_v4_v4_uchar(dst, src1);
+		copy_v4_v4_char((char *)dst, (char *)src1);
 	}
 }
 
@@ -116,7 +116,7 @@ MINLINE void blend_color_sub_byte(unsigned char dst[4], const unsigned char src1
 	}
 	else {
 		/* no op */
-		copy_v4_v4_uchar(dst, src1);
+		copy_v4_v4_char((char *)dst, (char *)src1);
 	}
 }
 
@@ -139,7 +139,7 @@ MINLINE void blend_color_mul_byte(unsigned char dst[4], const unsigned char src1
 	}
 	else {
 		/* no op */
-		copy_v4_v4_uchar(dst, src1);
+		copy_v4_v4_char((char *)dst, (char *)src1);
 	}
 }
 
@@ -162,7 +162,7 @@ MINLINE void blend_color_lighten_byte(unsigned char dst[4], const unsigned char
 	}
 	else {
 		/* no op */
-		copy_v4_v4_uchar(dst, src1);
+		copy_v4_v4_char((char *)dst, (char *)src1);
 	}
 }
 
@@ -185,7 +185,7 @@ MINLINE void blend_color_darken_byte(unsigned char dst[4], const unsigned char s
 	}
 	else {
 		/* no op */
-		copy_v4_v4_uchar(dst, src1);
+		copy_v4_v4_char((char *)dst, (char *)src1);
 	}
 }
 
@@ -202,7 +202,7 @@ MINLINE void blend_color_erase_alpha_byte(unsigned char dst[4], const unsigned c
 	}
 	else {
 		/* no op */
-		copy_v4_v4_uchar(dst, src1);
+		copy_v4_v4_char((char *)dst, (char *)src1);
 	}
 }
 
@@ -219,7 +219,7 @@ MINLINE void blend_color_add_alpha_byte(unsigned char dst[4], const unsigned cha
 	}
 	else {
 		/* no op */
-		copy_v4_v4_uchar(dst, src1);
+		copy_v4_v4_char((char *)dst, (char *)src1);
 	}
 }
 
@@ -262,7 +262,7 @@ MINLINE void blend_color_overlay_byte(unsigned char dst[4], unsigned const char
 	}
 	else {
 		/* no op */
-		copy_v4_v4_uchar(dst, src1);
+		copy_v4_v4_char((char *)dst, (char *)src1);
 	}
 }
 
@@ -299,7 +299,7 @@ MINLINE void blend_color_hardlight_byte(unsigned char dst[4], unsigned const cha
 	}
 	else {
 		/* no op */
-		copy_v4_v4_uchar(dst, src1);
+		copy_v4_v4_char((char *)dst, (char *)src1);
 	}
 }
 
@@ -341,7 +341,7 @@ MINLINE void blend_color_burn_byte(unsigned char dst[4], unsigned const char src
 	}
 	else {
 		/* no op */
-		copy_v4_v4_uchar(dst, src1);
+		copy_v4_v4_char((char *)dst, (char *)src1);
 	}
 }
 
@@ -367,7 +367,7 @@ MINLINE void blend_color_linearburn_byte(unsigned char dst[4], unsigned const ch
 	}
 	else {
 		/* no op */
-		copy_v4_v4_uchar(dst, src1);
+		copy_v4_v4_char((char *)dst, (char *)src1);
 	}
 }
 
@@ -396,7 +396,7 @@ MINLINE void blend_color_dodge_byte(unsigned char dst[4], unsigned const char sr
 	}
 	else {
 		/* no op */
-		copy_v4_v4_uchar(dst, src1);
+		copy_v4_v4_char((char *)dst, (char *)src1);
 	}
 }
 
@@ -421,7 +421,7 @@ MINLINE void blend_color_screen_byte(unsigned char dst[4], unsigned const char s
 	}
 	else {
 		/* no op */
-		copy_v4_v4_uchar(dst, src1);
+		copy_v4_v4_char((char *)dst, (char *)src1);
 	}
 }
 
@@ -444,7 +444,7 @@ MINLINE void blend_color_softlight_byte(unsigned char dst[4], unsigned const cha
 	}
 	else {
 		/* no op */
-		copy_v4_v4_uchar(dst, src1);
+		copy_v4_v4_char((char *)dst, (char *)src1);
 	}
 }
 
@@ -494,7 +494,7 @@ MINLINE void blend_color_pinlight_byte(unsigned char dst[4], unsigned const char
 	}
 	else {
 		/* no op */
-		copy_v4_v4_uchar(dst, src1);
+		copy_v4_v4_char((char *)dst, (char *)src1);
 	}
 }
 
@@ -541,7 +541,7 @@ MINLINE void blend_color_linearlight_byte(unsigned char dst[4], unsigned const c
 	}
 	else {
 		/* no op */
-		copy_v4_v4_uchar(dst, src1);
+		copy_v4_v4_char((char *)dst, (char *)src1);
 	}
 }
 
@@ -600,7 +600,7 @@ MINLINE void blend_color_vividlight_byte(unsigned char dst[4], unsigned const ch
 	}
 	else {
 		/* no op */
-		copy_v4_v4_uchar(dst, src1);
+		copy_v4_v4_char((char *)dst, (char *)src1);
 	}
 }
 
@@ -627,7 +627,7 @@ MINLINE void blend_color_difference_byte(unsigned char dst[4], unsigned const ch
 	}
 	else {
 		/* no op */
-		copy_v4_v4_uchar(dst, src1);
+		copy_v4_v4_char((char *)dst, (char *)src1);
 	}
 }
 
@@ -649,7 +649,7 @@ MINLINE void blend_color_exclusion_byte(unsigned char dst[4], unsigned const cha
 	}
 	else {
 		/* no op */
-		copy_v4_v4_uchar(dst, src1);
+		copy_v4_v4_char((char *)dst, (char *)src1);
 	}
 }
 
@@ -676,7 +676,7 @@ MINLINE void blend_color_color_byte(unsigned char dst[4], unsigned const char sr
 	}
 	else {
 		/* no op */
-		copy_v4_v4_uchar(dst, src1);
+		copy_v4_v4_char((char *)dst, (char *)src1);
 	}
 }
 
@@ -702,7 +702,7 @@ MINLINE void blend_color_hue_byte(unsigned char dst[4], unsigned const char src1
 	}
 	else {
 		/* no op */
-		copy_v4_v4_uchar(dst, src1);
+		copy_v4_v4_char((char *)dst, (char *)src1);
 	}
 
 }
@@ -730,7 +730,7 @@ MINLINE void blend_color_saturation_byte(unsigned char dst[4], unsigned const ch
 	}
 	else {
 		/* no op */
-		copy_v4_v4_uchar(dst, src1);
+		copy_v4_v4_char((char *)dst, (char *)src1);
 	}
 }
 
@@ -757,7 +757,7 @@ MINLINE void blend_color_luminosity_byte(unsigned char dst[4], unsigned const ch
 	}
 	else {
 		/* no op */
-		copy_v4_v4_uchar(dst, src1);
+		copy_v4_v4_char((char *)dst, (char *)src1);
 	}
 
 }
@@ -777,7 +777,7 @@ MINLINE void blend_color_interpolate_byte(unsigned char dst[4], const unsigned c
 		dst[3] = (unsigned char)divide_round_i(tmp, 255);
 	}
 	else {
-		copy_v4_v4_uchar(dst, src1);
+		copy_v4_v4_char((char *)dst, (char *)src1);
 	}
 }
 
diff --git a/source/blender/blenlib/intern/math_vector_inline.c b/source/blender/blenlib/intern/math_vector_inline.c
index f27c631..8d1f8f4 100644
--- a/source/blender/blenlib/intern/math_vector_inline.c
+++ b/source/blender/blenlib/intern/math_vector_inline.c
@@ -119,14 +119,6 @@ MINLINE void copy_v4_v4_char(char r[4], const char a[4])
 	r[3] = a[3];
 }
 
-MINLINE void copy_v4_v4_uchar(unsigned char r[4], const unsigned char a[4])
-{
-	r[0] = a[0];
-	r[1] = a[1];
-	r[2] = a[2];
-	r[3] = a[3];
-}
-
 /* short */
 MINLINE void zero_v3_int(int r[3])
 {
diff --git a/source/blender/blenloader/intern/versioning_270.c b/source/blender/blenloader/intern/versioning_270.c
index 23ec677..df6e6ef 100644
--- a/source/blender/blenloader/intern/versioning_270.c
+++ b/source/blender/blenloader/intern/versioning_270.c
@@ -308,6 +308,13 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
 				mat->line_col[3] = mat->alpha;
 			}
 		}
+
+		if (!DNA_struct_elem_find(fd->filesdna, "RenderData", "int", "preview_start_resolution")) {
+			Scene *scene;
+			for (scene = main->scene.first; scene; scene = scene->id.next) {
+				scene->r.preview_start_resolution = 64;
+			}
+		}
 	}
 
 	if (!MAIN_VERSION_ATLEAST(main, 271, 2)) {
@@ -317,11 +324,4 @@ void blo_do_versions_270(FileData *fd, Library *UNUSED(lib), Main *main)
 			sce->toolsettings->imapaint.slot_yresolution_default = 1024;
 		}
 	}
-
-	if (!DNA_struct_elem_find(fd->filesdna, "RenderData", "int", "preview_start_resolution")) {
-		Scene *scene;
-		for (scene = main->scene.first; scene; scene = scene->id.next) {
-			scene->r.preview_start_resolution = 64;
-		}
-	}
 }




More information about the Bf-blender-cvs mailing list