svn merge ^/trunk/blender -r48967:48970
This commit is contained in:
@@ -64,6 +64,9 @@ void BKE_mask_layer_copy_list(struct ListBase *masklayers_new, struct ListBase *
|
||||
/* splines */
|
||||
struct MaskSpline *BKE_mask_spline_add(struct MaskLayer *masklay);
|
||||
|
||||
int BKE_mask_spline_resolution(struct MaskSpline *spline, int width, int height);
|
||||
int BKE_mask_spline_feather_resolution(struct MaskSpline *spline, int width, int height);
|
||||
|
||||
int BKE_mask_spline_differentiate_calc_total(const struct MaskSpline *spline, const int resol);
|
||||
|
||||
float (*BKE_mask_spline_differentiate(struct MaskSpline *spline, int *tot_diff_point))[2];
|
||||
|
||||
@@ -261,7 +261,7 @@ MaskSpline *BKE_mask_spline_add(MaskLayer *masklay)
|
||||
return spline;
|
||||
}
|
||||
|
||||
static int BKE_mask_spline_resolution(MaskSpline *spline, int width, int height)
|
||||
int BKE_mask_spline_resolution(MaskSpline *spline, int width, int height)
|
||||
{
|
||||
float max_segment = 0.01f;
|
||||
int i, resol = 1;
|
||||
@@ -299,7 +299,7 @@ static int BKE_mask_spline_resolution(MaskSpline *spline, int width, int height)
|
||||
return resol;
|
||||
}
|
||||
|
||||
static int BKE_mask_spline_feather_resolution(MaskSpline *spline, int width, int height)
|
||||
int BKE_mask_spline_feather_resolution(MaskSpline *spline, int width, int height)
|
||||
{
|
||||
const float max_segment = 0.005;
|
||||
int resol = BKE_mask_spline_resolution(spline, width, height);
|
||||
|
||||
@@ -471,7 +471,6 @@ void BKE_maskrasterize_handle_init(MaskRasterHandle *mr_handle, struct Mask *mas
|
||||
const short do_feather)
|
||||
{
|
||||
const rctf default_bounds = {0.0f, 1.0f, 0.0f, 1.0f};
|
||||
const int resol = SPLINE_RESOL; /* TODO: real size */
|
||||
const float pixel_size = 1.0f / MIN2(width, height);
|
||||
|
||||
const float zvec[3] = {0.0f, 0.0f, 1.0f};
|
||||
@@ -522,6 +521,10 @@ void BKE_maskrasterize_handle_init(MaskRasterHandle *mr_handle, struct Mask *mas
|
||||
float (*diff_feather_points)[2];
|
||||
int tot_diff_feather_points;
|
||||
|
||||
const int resol_a = BKE_mask_spline_resolution(spline, width, height) / 4;
|
||||
const int resol_b = BKE_mask_spline_feather_resolution(spline, width, height) / 4;
|
||||
const int resol = CLAMPIS(MAX2(resol_a, resol_b), 4, 512);
|
||||
|
||||
diff_points = BKE_mask_spline_differentiate_with_resolution_ex(
|
||||
spline, resol, &tot_diff_point);
|
||||
|
||||
|
||||
@@ -2242,13 +2242,13 @@ static void list_item_row(bContext *C, uiLayout *layout, PointerRNA *ptr, Pointe
|
||||
}
|
||||
}
|
||||
else if (itemptr->type == &RNA_MaskLayer) {
|
||||
split = uiLayoutSplit(sub, 0.5f, FALSE);
|
||||
split = uiLayoutRow(sub, FALSE);
|
||||
|
||||
uiItemL(split, name, icon);
|
||||
|
||||
uiBlockSetEmboss(block, UI_EMBOSSN);
|
||||
row = uiLayoutRow(split, TRUE);
|
||||
// uiItemR(row, itemptr, "alpha", 0, "", ICON_NONE); // enable when used
|
||||
uiItemR(row, itemptr, "alpha", 0, "", ICON_NONE); // enable when used
|
||||
uiItemR(row, itemptr, "hide", 0, "", 0);
|
||||
uiItemR(row, itemptr, "hide_select", 0, "", 0);
|
||||
uiItemR(row, itemptr, "hide_render", 0, "", 0);
|
||||
|
||||
Reference in New Issue
Block a user