Code clean-up: used copy_m4_m4() and unit_m4() instead of verbose loops.
authorTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sat, 2 Mar 2013 23:17:35 +0000 (23:17 +0000)
committerTamito Kajiyama <rd6t-kjym@asahi-net.or.jp>
Sat, 2 Mar 2013 23:17:35 +0000 (23:17 +0000)
Based on review comment from Campbell.

source/blender/freestyle/intern/blender_interface/FRS_freestyle.cpp

index c5a3642e2c6a4dc82bb49fa523cd067eac173c9c..fdff9db3d60d858c8d4ebd0afaf9eb82b28e065b 100644 (file)
@@ -194,15 +194,9 @@ static void init_camera(Render *re)
        freestyle_viewpoint[1] = 0.0;
        freestyle_viewpoint[2] = 0.0;
 
-       for (int i = 0; i < 4; i++) {
-               for (int j = 0; j < 4; j++)
-                       freestyle_mv[i][j] = (i == j) ? 1.0 : 0.0;
-       }
+       unit_m4(freestyle_mv);
 
-       for (int i = 0; i < 4; i++) {
-               for (int j = 0; j < 4; j++)
-                       freestyle_proj[i][j] = re->winmat[i][j];
-       }
+       copy_m4_m4(freestyle_proj, re->winmat);
 
 #if 0
        print_m4("mv", freestyle_mv);