[Bf-blender-cvs] [b16e6bb] soc-2013-paint: Minor changes. Still not managed to make update correct.

Antony Riakiotakis noreply at git.blender.org
Wed Apr 23 23:26:12 CEST 2014


Commit: b16e6bbee05aac05536c2a9349f06f1068e3bc63
Author: Antony Riakiotakis
Date:   Thu Apr 24 00:25:56 2014 +0300
https://developer.blender.org/rBb16e6bbee05aac05536c2a9349f06f1068e3bc63

Minor changes. Still not managed to make update correct.

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

M	source/blender/editors/sculpt_paint/paint_image.c
M	source/blender/editors/sculpt_paint/paint_image_proj.c
M	source/blender/editors/sculpt_paint/paint_intern.h

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

diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index a1347af..a61acb8 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -377,10 +377,9 @@ void ED_image_undo_restore(bContext *C, ListBase *lb)
 			ibuf->userflags |= IB_MIPMAP_INVALID;  /* force mipmap recreatiom */
 		ibuf->userflags |= IB_DISPLAY_BUFFER_INVALID;
 
-		IMB_partial_display_buffer_update_delayed(ibuf, tile->x * IMAPAINT_TILE_SIZE, tile->y * IMAPAINT_TILE_SIZE,
-		                                          (tile->x + 1) * IMAPAINT_TILE_SIZE, (tile->y + 1) * IMAPAINT_TILE_SIZE);
-		BKE_image_release_ibuf(ima, ibuf, NULL);
 		DAG_id_tag_update(&ima->id, 0);
+
+		BKE_image_release_ibuf(ima, ibuf, NULL);
 	}
 
 	IMB_freeImBuf(tmpibuf);
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 3c8f814..c54f7e0 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -4837,8 +4837,6 @@ bool proj_paint_add_slot(bContext *C, int type, Material *ma)
 			char imagename[FILE_MAX];
 			char name[TEXNAME_MAX];
 			Main *bmain = CTX_data_main(C);
-			PointerRNA ptr, idptr;
-			PropertyRNA *prop;
 			Image *ima;
 
 			/* get the name of the texture layer type */
@@ -4860,18 +4858,6 @@ bool proj_paint_add_slot(bContext *C, int type, Material *ma)
 
 				ima = mtex->tex->ima = BKE_image_add_generated(bmain, width, height, imagename, 32, type == MAP_NORM, IMA_GENTYPE_BLANK, color);
 
-				uiIDContextProperty(C, &ptr, &prop);
-
-				if (prop) {
-					/* when creating new ID blocks, use is already 1, but RNA
-					 * pointer se also increases user, so this compensates it */
-					ima->id.us--;
-
-					RNA_id_pointer_create(&ima->id, &idptr);
-					RNA_property_pointer_set(&ptr, prop, idptr);
-					RNA_property_update(C, &ptr, prop);
-				}
-
 				refresh_texpaint_image_cache(ma);
 				BKE_image_signal(ima, NULL, IMA_SIGNAL_USER_NEW_IMAGE);
 				WM_event_add_notifier(C, NC_TEXTURE | NA_ADDED, mtex->tex);
diff --git a/source/blender/editors/sculpt_paint/paint_intern.h b/source/blender/editors/sculpt_paint/paint_intern.h
index 403cc62..7af490e 100644
--- a/source/blender/editors/sculpt_paint/paint_intern.h
+++ b/source/blender/editors/sculpt_paint/paint_intern.h
@@ -163,7 +163,7 @@ void paint_2d_bucket_fill(const struct bContext *C, float color[3], struct Brush
 void paint_2d_gradient_fill (const struct bContext *C, struct Brush *br, float mouse_init[2], float mouse_final[2], void *ps);
 void *paint_proj_new_stroke(struct bContext *C, struct Object *ob, const float mouse[2], int mode);
 void paint_proj_stroke(const struct bContext *C, void *ps, const float prevmval_i[2], const float mval_i[2], float pressure, float distance, float size);
-void paint_proj_redraw(const bContext *C, void *pps, bool final);
+void paint_proj_redraw(const struct bContext *C, void *pps, bool final);
 void paint_proj_stroke_done(void *ps);
 void paint_proj_mesh_data_ensure(bContext *C, struct Object *ob);
 bool proj_paint_add_slot(bContext *C, int type, struct Material *ma);




More information about the Bf-blender-cvs mailing list