Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAntony Riakiotakis <kalast@gmail.com>2013-04-12 21:21:31 +0400
committerAntony Riakiotakis <kalast@gmail.com>2013-04-12 21:21:31 +0400
commita305452275207a555d2812c3a5ea6647f0f594e4 (patch)
tree991400d761e7895e84841bfe63c5b9f71078dc9e /source/blender/editors/sculpt_paint/sculpt_uv.c
parent8f658d42643b5edb03d4ae16ca8f9f611b1fbf74 (diff)
Paint refactoring commit, non-disruptive (in theory :p)
* Fix precision overflow issue with overlay previews, * Expose alpha mask mapping to UI (still not functional but coming soon). * More overlay refactoring: Overlay now does minimal checking for texture refresh. Instead, we now have invalidation flags to set an aspect of the brush overlay as invalid. This is necessary because this way we will be able to separate and preview different brush attributes on the overlays, using different textures: These attributes/aspects are: Primary texture (main texture for sculpt, vertex, imapaint) Secondary texture (mask/alpha texture for imapaint) Cursor texture (cursor texture. It involves brush strength and curves) Modified the relevant RNA property update functions and C update callback functions to call the relevant cursor invalidation functions instead of checking every frame for multiple properties. Properties that affect this are: Image changes, if image is used by current brush, Texture slot changes, similarly Curve changes, Object mode change invalidates the cursor Paint tool change invalidates the cursor. These changes give slightly more invalidation cases than simply comparing the relevant properties each frame, but these do not occur in performance critical moments and it's a much more elegant system than adding more variables to check per frame each time we add something on the system.
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt_uv.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_uv.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt_uv.c b/source/blender/editors/sculpt_paint/sculpt_uv.c
index 7cdfb6d22b2..5f1a86fe70c 100644
--- a/source/blender/editors/sculpt_paint/sculpt_uv.c
+++ b/source/blender/editors/sculpt_paint/sculpt_uv.c
@@ -152,7 +152,7 @@ static Brush *uv_sculpt_brush(bContext *C)
if (!settings->uvsculpt)
return NULL;
- return paint_brush(&settings->uvsculpt->paint);
+ return BKE_paint_brush(&settings->uvsculpt->paint);
}
@@ -226,7 +226,7 @@ static void HC_relaxation_iteration_uv(BMEditMesh *em, UvSculptData *sculptdata,
float diff[2];
int i;
float radius_root = sqrt(radius);
- Brush *brush = paint_brush(sculptdata->uvsculpt);
+ Brush *brush = BKE_paint_brush(sculptdata->uvsculpt);
tmp_uvdata = (Temp_UVData *)MEM_callocN(sculptdata->totalUniqueUvs * sizeof(Temp_UVData), "Temporal data");
@@ -298,7 +298,7 @@ static void laplacian_relaxation_iteration_uv(BMEditMesh *em, UvSculptData *scul
float diff[2];
int i;
float radius_root = sqrt(radius);
- Brush *brush = paint_brush(sculptdata->uvsculpt);
+ Brush *brush = BKE_paint_brush(sculptdata->uvsculpt);
tmp_uvdata = (Temp_UVData *)MEM_callocN(sculptdata->totalUniqueUvs * sizeof(Temp_UVData), "Temporal data");
@@ -370,7 +370,7 @@ static void uv_sculpt_stroke_apply(bContext *C, wmOperator *op, const wmEvent *e
int width, height;
float aspectRatio;
float alpha, zoomx, zoomy;
- Brush *brush = paint_brush(sculptdata->uvsculpt);
+ Brush *brush = BKE_paint_brush(sculptdata->uvsculpt);
ToolSettings *toolsettings = CTX_data_tool_settings(C);
tool = sculptdata->tool;
invert = sculptdata->invert ? -1 : 1;
@@ -740,7 +740,7 @@ static UvSculptData *uv_sculpt_stroke_init(bContext *C, wmOperator *op, const wm
int width, height;
float aspectRatio;
float alpha, zoomx, zoomy;
- Brush *brush = paint_brush(sculptdata->uvsculpt);
+ Brush *brush = BKE_paint_brush(sculptdata->uvsculpt);
alpha = BKE_brush_alpha_get(scene, brush);