[Bf-blender-cvs] [5dc0639] soc-2013-paint: Use BKE_texpaint_ prefix

Campbell Barton noreply at git.blender.org
Sat Jul 12 12:45:13 CEST 2014


Commit: 5dc0639d6bee134137a4a935a68bc4a12d021b4c
Author: Campbell Barton
Date:   Sat Jul 12 19:50:45 2014 +1000
https://developer.blender.org/rB5dc0639d6bee134137a4a935a68bc4a12d021b4c

Use BKE_texpaint_ prefix

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

M	source/blender/blenkernel/BKE_material.h
M	source/blender/blenkernel/intern/depsgraph.c
M	source/blender/blenkernel/intern/material.c
M	source/blender/editors/render/render_update.c
M	source/blender/editors/sculpt_paint/paint_image.c
M	source/blender/editors/sculpt_paint/paint_image_proj.c

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

diff --git a/source/blender/blenkernel/BKE_material.h b/source/blender/blenkernel/BKE_material.h
index 1764c52..e69299a 100644
--- a/source/blender/blenkernel/BKE_material.h
+++ b/source/blender/blenkernel/BKE_material.h
@@ -86,9 +86,9 @@ short find_material_index(struct Object *ob, struct Material *ma);
 bool object_add_material_slot(struct Object *ob);
 bool object_remove_material_slot(struct Object *ob);
 
-void BKE_refresh_texpaint_slot_cache(struct Material *ma, bool use_nodes);
-void BKE_refresh_object_texpaint_slots(struct Object *ob, bool use_nodes);
-void BKE_clear_texpaint_slots(struct Material *ma);
+void BKE_texpaint_slot_refresh_cache(struct Material *ma, bool use_nodes);
+void BKE_texpaint_slots_refresh_object(struct Object *ob, bool use_nodes);
+void BKE_texpaint_slots_clear(struct Material *ma);
 
 /* rna api */
 void BKE_material_resize_id(struct ID *id, short totcol, bool do_id_user);
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index f9e1a2c..059b4bb 100644
--- a/source/blender/blenkernel/intern/depsgraph.c
+++ b/source/blender/blenkernel/intern/depsgraph.c
@@ -2477,7 +2477,7 @@ static void dag_id_flush_update(Main *bmain, Scene *sce, ID *id)
 			for (obt = bmain->object.first; obt; obt = obt->id.next) {
 				if (obt->mode & OB_MODE_TEXTURE_PAINT) {
 					obt->recalc |= OB_RECALC_DATA;
-					BKE_refresh_object_texpaint_slots(obt, new_shading_nodes);
+					BKE_texpaint_slots_refresh_object(obt, new_shading_nodes);
 					lib_id_recalc_data_tag(bmain, &obt->id);
 				}
 			}
diff --git a/source/blender/blenkernel/intern/material.c b/source/blender/blenkernel/intern/material.c
index 6137e4c..e76a80d 100644
--- a/source/blender/blenkernel/intern/material.c
+++ b/source/blender/blenkernel/intern/material.c
@@ -1306,7 +1306,7 @@ bool object_remove_material_slot(Object *ob)
 	return true;
 }
 
-void BKE_clear_texpaint_slots(struct Material *ma)
+void BKE_texpaint_slots_clear(struct Material *ma)
 {
 
 	if (ma->texpaintslot) {
@@ -1326,7 +1326,7 @@ static bool get_mtex_slot_valid_texpaint(struct MTex *mtex)
 	        mtex->tex->ima);
 }
 
-void BKE_refresh_texpaint_slot_cache(Material *ma, bool use_nodes)
+void BKE_texpaint_slot_refresh_cache(Material *ma, bool use_nodes)
 {
 	MTex **mtex;
 	short count = 0;
@@ -1404,16 +1404,13 @@ void BKE_refresh_texpaint_slot_cache(Material *ma, bool use_nodes)
 	return;
 }
 
-void BKE_refresh_object_texpaint_slots(struct Object *ob, bool use_nodes)
+void BKE_texpaint_slots_refresh_object(struct Object *ob, bool use_nodes)
 {
 	int i;
 
-	if (!ob)
-		return;
-
 	for (i = 1; i < ob->totcol + 1; i++) {
 		Material *ma = give_current_material(ob, i);
-		BKE_refresh_texpaint_slot_cache(ma, use_nodes);
+		BKE_texpaint_slot_refresh_cache(ma, use_nodes);
 	}
 }
 
diff --git a/source/blender/editors/render/render_update.c b/source/blender/editors/render/render_update.c
index c37d208..f11af9b 100644
--- a/source/blender/editors/render/render_update.c
+++ b/source/blender/editors/render/render_update.c
@@ -178,7 +178,7 @@ void ED_render_engine_changed(Main *bmain)
 
 	/* reset texture painting */
 	for (ma = bmain->mat.first; ma; ma = ma->id.next) {
-		BKE_clear_texpaint_slots(ma);
+		BKE_texpaint_slots_clear(ma);
 	}
 }
 
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index e033223..abd1871 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -1450,7 +1450,7 @@ static int texture_paint_toggle_exec(bContext *C, wmOperator *op)
 		bool use_nodes = BKE_scene_use_new_shading_nodes(scene);
 		/* This has to stay here to regenerate the texture paint
 		 * cache in case we are loading a file */
-		BKE_refresh_object_texpaint_slots(ob, use_nodes);
+		BKE_texpaint_slots_refresh_object(ob, use_nodes);
 
 		paint_proj_mesh_data_ensure(C, ob, op);
 
diff --git a/source/blender/editors/sculpt_paint/paint_image_proj.c b/source/blender/editors/sculpt_paint/paint_image_proj.c
index 80c4d45..eca1d92 100644
--- a/source/blender/editors/sculpt_paint/paint_image_proj.c
+++ b/source/blender/editors/sculpt_paint/paint_image_proj.c
@@ -4889,7 +4889,7 @@ bool proj_paint_add_slot(bContext *C, int type, Material *ma)
 					ima = mtex->tex->ima = BKE_image_add_generated(bmain, width, height, imagename, 32, use_float,
 					                                               IMA_GENTYPE_BLANK, color);
 
-					BKE_refresh_texpaint_slot_cache(ma, false);
+					BKE_texpaint_slot_refresh_cache(ma, false);
 					BKE_image_signal(ima, NULL, IMA_SIGNAL_USER_NEW_IMAGE);
 					WM_event_add_notifier(C, NC_TEXTURE | NA_ADDED, mtex->tex);
 					WM_event_add_notifier(C, NC_IMAGE | NA_ADDED, ima);




More information about the Bf-blender-cvs mailing list