[Bf-blender-cvs] [17e266cd55e] master: Cleanup: make paint_init_pivot an api method.

Joseph Eagar noreply at git.blender.org
Sun Dec 18 16:22:19 CET 2022


Commit: 17e266cd55ea58bd82094c3874254748a6d199be
Author: Joseph Eagar
Date:   Sun Dec 18 07:20:12 2022 -0800
Branches: master
https://developer.blender.org/rB17e266cd55ea58bd82094c3874254748a6d199be

Cleanup: make paint_init_pivot an api method.

I had forgotten about curves sculpt mode when I wrote
this function. It just initializes the viewport
pivot point to the evaluated object bounding box.
Should be used inside the mode entry function.

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

M	source/blender/editors/sculpt_paint/paint_image.cc
M	source/blender/editors/sculpt_paint/paint_intern.h

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

diff --git a/source/blender/editors/sculpt_paint/paint_image.cc b/source/blender/editors/sculpt_paint/paint_image.cc
index 1ab364c4877..a57287b924b 100644
--- a/source/blender/editors/sculpt_paint/paint_image.cc
+++ b/source/blender/editors/sculpt_paint/paint_image.cc
@@ -759,7 +759,7 @@ void PAINT_OT_sample_color(wmOperatorType *ot)
 
 /******************** texture paint toggle operator ********************/
 
-static void paint_init_pivot(Object *ob, Scene *scene)
+void paint_init_pivot(Object *ob, Scene *scene)
 {
   UnifiedPaintSettings *ups = &scene->toolsettings->unified_paint_settings;
 
diff --git a/source/blender/editors/sculpt_paint/paint_intern.h b/source/blender/editors/sculpt_paint/paint_intern.h
index 8a2c6955679..a3449e52225 100644
--- a/source/blender/editors/sculpt_paint/paint_intern.h
+++ b/source/blender/editors/sculpt_paint/paint_intern.h
@@ -517,6 +517,9 @@ enum eBlurKernelType;
 BlurKernel *paint_new_blur_kernel(struct Brush *br, bool proj);
 void paint_delete_blur_kernel(BlurKernel *);
 
+/* Initialize viewport pivot from evaulated bounding box center of ob. */
+void paint_init_pivot(struct Object *ob, struct Scene *scene);
+
 /* paint curve defines */
 #define PAINT_CURVE_NUM_SEGMENTS 40



More information about the Bf-blender-cvs mailing list