Revision: 43135
          
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=43135
Author:   psy-fi
Date:     2012-01-04 17:33:47 +0000 (Wed, 04 Jan 2012)
Log Message:
-----------
More cleanup from reviewers' remarks

Modified Paths:
--------------
    
branches/soc-2011-onion-uv-tools/release/scripts/startup/bl_ui/space_view3d_toolbar.py
    branches/soc-2011-onion-uv-tools/source/blender/gpu/intern/gpu_draw.c
    
branches/soc-2011-onion-uv-tools/source/blender/makesrna/intern/rna_sculpt_paint.c

Modified: 
branches/soc-2011-onion-uv-tools/release/scripts/startup/bl_ui/space_view3d_toolbar.py
===================================================================
--- 
branches/soc-2011-onion-uv-tools/release/scripts/startup/bl_ui/space_view3d_toolbar.py
      2012-01-04 17:20:08 UTC (rev 43134)
+++ 
branches/soc-2011-onion-uv-tools/release/scripts/startup/bl_ui/space_view3d_toolbar.py
      2012-01-04 17:33:47 UTC (rev 43135)
@@ -1039,8 +1039,6 @@
         col.operator("object.vertex_group_clean", text="Clean")
         col.operator("object.vertex_group_levels", text="Levels")
         col.operator("object.vertex_group_fix", text="Fix Deforms")
-        row = col.row(align=True)
-        row.prop(ipaint, "screen_grab_size", text="")
 
 
 class VIEW3D_PT_tools_weightpaint_options(View3DPanel, Panel):

Modified: branches/soc-2011-onion-uv-tools/source/blender/gpu/intern/gpu_draw.c
===================================================================
--- branches/soc-2011-onion-uv-tools/source/blender/gpu/intern/gpu_draw.c       
2012-01-04 17:20:08 UTC (rev 43134)
+++ branches/soc-2011-onion-uv-tools/source/blender/gpu/intern/gpu_draw.c       
2012-01-04 17:33:47 UTC (rev 43135)
@@ -417,7 +417,7 @@
        float *srgb_frect = NULL;
        short texwindx, texwindy, texwinsx, texwinsy;
        /* flag to determine whether high resolution format is used */
-       int useHighPrecisionTex = FALSE, doColorConversion = FALSE;
+       int use_high_bit_depth = FALSE, do_color_correction = FALSE;
 
        /* initialize tile mode and number of repeats */
        GTS.ima = ima;
@@ -470,12 +470,14 @@
        if (ibuf->rect_float){
                if(U.high_bit_depth_tex)
                {
-                       /* Use high precision textures. This is relatively 
harmless because OpenGL gives us
+                       /* use high precision textures. This is relatively 
harmless because OpenGL gives us
                           a high precision format only if it is available */
-                       useHighPrecisionTex = TRUE;
+                       use_high_bit_depth = TRUE;
                }
+
+               /* TODO unneeded when float images are correctly treated as 
linear always */
                if(ibuf->profile == IB_PROFILE_LINEAR_RGB){
-                       doColorConversion = TRUE;
+                       do_color_correction = TRUE;
                }
 
                if(ibuf->rect==NULL){
@@ -516,9 +518,8 @@
                        tpx= texwindx;
                        tpy= texwindy;
 
-                       if(useHighPrecisionTex){
-                               /* We may also need a color corrected float 
image. Dithering will not apply since it's high precision */
-                               if(doColorConversion){
+                       if(use_high_bit_depth){
+                               if(do_color_correction){
                                        srgb_frect = 
MEM_mallocN(ibuf->x*ibuf->y*sizeof(float)*4, "floar_buf_col_cor");
                                        
//IMB_float_color_corrected_from_float_rect(ibuf, srgb_frect);
                                        IMB_buffer_float_from_float(srgb_frect, 
ibuf->rect_float,
@@ -541,9 +542,8 @@
                        tpx= ibuf->x;
                        tpy= ibuf->y;
                        rect= ibuf->rect;
-                       if(useHighPrecisionTex){
-                               /* We may also need a color corrected float 
image. Dithering will not apply since it's high precision */
-                               if(doColorConversion){
+                       if(use_high_bit_depth){
+                               if(do_color_correction){
                                        frect = srgb_frect = 
MEM_mallocN(ibuf->x*ibuf->y*sizeof(*srgb_frect)*4, "floar_buf_col_cor");
                                        IMB_buffer_float_from_float(srgb_frect, 
ibuf->rect_float,
                                                        ibuf->channels, 
IB_PROFILE_SRGB, ibuf->profile, 0,
@@ -566,7 +566,7 @@
 
        /* for tiles, copy only part of image into buffer */
        if (GTS.tilemode) {
-               if(useHighPrecisionTex){
+               if(use_high_bit_depth){
                        ftilerect= MEM_mallocN(rectw*recth*sizeof(*ftilerect), 
"tilerect");
 
                        for (y=0; y<recth; y++) {
@@ -597,12 +597,12 @@
                rectw= smaller_pow2_limit(rectw);
                recth= smaller_pow2_limit(recth);
                
-               if(useHighPrecisionTex)
+               if(use_high_bit_depth)
                {
                        fscalerect= 
MEM_mallocN(rectw*recth*sizeof(*fscalerect)*4, "fscalerect");
                        gluScaleImage(GL_RGBA, tpx, tpy, GL_FLOAT, frect, 
rectw, recth, GL_FLOAT, fscalerect);
-                       /* Or frect will refer to ibuf->rect_float. We don't 
want to free that */
-                       if(doColorConversion)
+                       /* frect will refer to ibuf->rect_float when not color 
converting. We don't want to free that */
+                       if(do_color_correction)
                                MEM_freeN(frect);
                        frect = fscalerect;
                }
@@ -619,7 +619,7 @@
        glBindTexture( GL_TEXTURE_2D, *bind);
 
        if (!(gpu_get_mipmap() && mipmap)) {
-               if(useHighPrecisionTex)
+               if(use_high_bit_depth)
                        glTexImage2D(GL_TEXTURE_2D, 0,  GL_RGBA16,  rectw, 
recth, 0, GL_RGBA, GL_FLOAT, frect);                 
                else
                        glTexImage2D(GL_TEXTURE_2D, 0,  GL_RGBA,  rectw, recth, 
0, GL_RGBA, GL_UNSIGNED_BYTE, rect);
@@ -627,7 +627,7 @@
                glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, 
gpu_get_mipmap_filter(1));
        }
        else {
-               if(useHighPrecisionTex)
+               if(use_high_bit_depth)
                        gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA16, rectw, 
recth, GL_RGBA, GL_FLOAT, frect);
                else
                        gluBuild2DMipmaps(GL_TEXTURE_2D, GL_RGBA, rectw, recth, 
GL_RGBA, GL_UNSIGNED_BYTE, rect);
@@ -772,8 +772,7 @@
                glGetIntegerv(GL_UNPACK_SKIP_PIXELS, &skip_pixels);
                glGetIntegerv(GL_UNPACK_SKIP_ROWS, &skip_rows);
 
-               /* if color correction is needed, we must update the part that 
needs updating.
-                * If using high bit depth textures, no dithering is needed, 
same as on initialization */
+               /* if color correction is needed, we must update the part that 
needs updating. */
                if (ibuf->rect_float && (!U.high_bit_depth_tex || 
(ibuf->profile == IB_PROFILE_LINEAR_RGB))){
                        float *buffer = (float 
*)MEM_mallocN(w*h*sizeof(float)*4, "temp_texpaint_float_buf");
                        IMB_partial_rect_from_float(ibuf, buffer, x, y, w, h);

Modified: 
branches/soc-2011-onion-uv-tools/source/blender/makesrna/intern/rna_sculpt_paint.c
===================================================================
--- 
branches/soc-2011-onion-uv-tools/source/blender/makesrna/intern/rna_sculpt_paint.c
  2012-01-04 17:20:08 UTC (rev 43134)
+++ 
branches/soc-2011-onion-uv-tools/source/blender/makesrna/intern/rna_sculpt_paint.c
  2012-01-04 17:33:47 UTC (rev 43135)
@@ -27,8 +27,6 @@
 
 #include <stdlib.h>
 
-#include <GL/glew.h>
-
 #include "RNA_define.h"
 
 #include "rna_internal.h"
@@ -57,15 +55,11 @@
 #include "MEM_guardedalloc.h"
 
 #include "BKE_context.h"
-#include "BKE_image.h"
 #include "BKE_pointcache.h"
 #include "BKE_particle.h"
 #include "BKE_depsgraph.h"
 
-#include "IMB_imbuf_types.h"
-
 #include "ED_particle.h"
-#include "ED_sculpt.h"
 
 static EnumPropertyItem particle_edit_disconnected_hair_brush_items[] = {
        {PE_BRUSH_NONE, "NONE", 0, "None", "Don't use any brush"},

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to