Merge branch 'master' into blender2.8
This commit is contained in:
commit
184ab749c3
|
@ -77,7 +77,7 @@ float BKE_brush_curve_strength_clamped(struct Brush *br, float p, const float le
|
|||
float BKE_brush_curve_strength(const struct Brush *br, float p, const float len);
|
||||
|
||||
/* sampling */
|
||||
float BKE_brush_sample_tex_3D(
|
||||
float BKE_brush_sample_tex_3d(
|
||||
const struct Scene *scene, const struct Brush *br, const float point[3],
|
||||
float rgba[4], const int thread, struct ImagePool *pool);
|
||||
float BKE_brush_sample_masktex(
|
||||
|
|
|
@ -156,7 +156,7 @@ void BKE_nurb_free(struct Nurb *nu);
|
|||
struct Nurb *BKE_nurb_duplicate(const struct Nurb *nu);
|
||||
struct Nurb *BKE_nurb_copy(struct Nurb *src, int pntsu, int pntsv);
|
||||
|
||||
void BKE_nurb_test2D(struct Nurb *nu);
|
||||
void BKE_nurb_test_2d(struct Nurb *nu);
|
||||
void BKE_nurb_minmax(struct Nurb *nu, bool use_radius, float min[3], float max[3]);
|
||||
float BKE_nurb_calc_length(const struct Nurb *nu, int resolution);
|
||||
|
||||
|
|
|
@ -153,7 +153,7 @@ bool BKE_gpencil_stroke_select_check(
|
|||
const struct bGPDstroke *gps);
|
||||
|
||||
struct BoundBox *BKE_gpencil_boundbox_get(struct Object *ob);
|
||||
void BKE_gpencil_centroid_3D(struct bGPdata *gpd, float r_centroid[3]);
|
||||
void BKE_gpencil_centroid_3d(struct bGPdata *gpd, float r_centroid[3]);
|
||||
|
||||
/* vertex groups */
|
||||
void BKE_gpencil_dvert_ensure(struct bGPDstroke *gps);
|
||||
|
|
|
@ -845,7 +845,7 @@ void BKE_brush_curve_preset(Brush *b, eCurveMappingPreset preset)
|
|||
* region space mouse coordinates, or 3d world coordinates for 3D mapping.
|
||||
*
|
||||
* rgba outputs straight alpha. */
|
||||
float BKE_brush_sample_tex_3D(const Scene *scene, const Brush *br,
|
||||
float BKE_brush_sample_tex_3d(const Scene *scene, const Brush *br,
|
||||
const float point[3],
|
||||
float rgba[4], const int thread,
|
||||
struct ImagePool *pool)
|
||||
|
|
|
@ -277,7 +277,7 @@ void BKE_curve_curve_dimension_update(Curve *cu)
|
|||
else {
|
||||
for (; nu; nu = nu->next) {
|
||||
nu->flag |= CU_2D;
|
||||
BKE_nurb_test2D(nu);
|
||||
BKE_nurb_test_2d(nu);
|
||||
|
||||
/* since the handles are moved they need to be auto-located again */
|
||||
if (nu->type == CU_BEZIER)
|
||||
|
@ -549,7 +549,7 @@ void BKE_nurbList_duplicate(ListBase *lb1, const ListBase *lb2)
|
|||
}
|
||||
}
|
||||
|
||||
void BKE_nurb_test2D(Nurb *nu)
|
||||
void BKE_nurb_test_2d(Nurb *nu)
|
||||
{
|
||||
BezTriple *bezt;
|
||||
BPoint *bp;
|
||||
|
|
|
@ -1147,7 +1147,7 @@ bool BKE_gpencil_stroke_select_check(
|
|||
}
|
||||
|
||||
/* compute center of bounding box */
|
||||
void BKE_gpencil_centroid_3D(bGPdata *gpd, float r_centroid[3])
|
||||
void BKE_gpencil_centroid_3d(bGPdata *gpd, float r_centroid[3])
|
||||
{
|
||||
float min[3], max[3], tot[3];
|
||||
|
||||
|
|
|
@ -1261,7 +1261,7 @@ void ED_curve_editnurb_make(Object *obedit)
|
|||
nu = cu->nurb.first;
|
||||
while (nu) {
|
||||
newnu = BKE_nurb_duplicate(nu);
|
||||
BKE_nurb_test2D(newnu); // after join, or any other creation of curve
|
||||
BKE_nurb_test_2d(newnu); // after join, or any other creation of curve
|
||||
BLI_addtail(&editnurb->nurbs, newnu);
|
||||
nu = nu->next;
|
||||
}
|
||||
|
@ -1640,7 +1640,7 @@ void ed_editnurb_translate_flag(ListBase *editnurb, short flag, const float vec[
|
|||
}
|
||||
}
|
||||
|
||||
BKE_nurb_test2D(nu);
|
||||
BKE_nurb_test_2d(nu);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -464,7 +464,7 @@ Nurb *ED_curve_add_nurbs_primitive(bContext *C, Object *obedit, float mat[4][4],
|
|||
cu->actnu = BLI_listbase_count(editnurb);
|
||||
cu->actvert = CU_ACT_NONE;
|
||||
|
||||
BKE_nurb_test2D(nu);
|
||||
BKE_nurb_test_2d(nu);
|
||||
}
|
||||
|
||||
return nu;
|
||||
|
|
|
@ -1100,7 +1100,7 @@ static int object_origin_set_exec(bContext *C, wmOperator *op)
|
|||
if (gpd) {
|
||||
if (centermode == ORIGIN_TO_GEOMETRY) {
|
||||
zero_v3(gpcenter);
|
||||
BKE_gpencil_centroid_3D(gpd, gpcenter);
|
||||
BKE_gpencil_centroid_3d(gpd, gpcenter);
|
||||
add_v3_v3(gpcenter, ob->obmat[3]);
|
||||
}
|
||||
if (centermode == ORIGIN_TO_CURSOR) {
|
||||
|
|
|
@ -410,7 +410,7 @@ static ImBuf *brush_painter_imbuf_new(BrushPainter *painter, int size, float pre
|
|||
|
||||
if (is_texbrush) {
|
||||
brush_imbuf_tex_co(&tex_mapping, x, y, texco);
|
||||
BKE_brush_sample_tex_3D(scene, brush, texco, rgba, thread, pool);
|
||||
BKE_brush_sample_tex_3d(scene, brush, texco, rgba, thread, pool);
|
||||
/* TODO(sergey): Support texture paint color space. */
|
||||
if (!use_float) {
|
||||
IMB_colormanagement_scene_linear_to_display_v3(rgba, display);
|
||||
|
@ -485,7 +485,7 @@ static void brush_painter_imbuf_update(
|
|||
if (!use_texture_old) {
|
||||
if (is_texbrush) {
|
||||
brush_imbuf_tex_co(&tex_mapping, x, y, texco);
|
||||
BKE_brush_sample_tex_3D(scene, brush, texco, rgba, thread, pool);
|
||||
BKE_brush_sample_tex_3d(scene, brush, texco, rgba, thread, pool);
|
||||
/* TODO(sergey): Support texture paint color space. */
|
||||
if (!use_float) {
|
||||
IMB_colormanagement_scene_linear_to_display_v3(rgba, display);
|
||||
|
|
|
@ -4730,7 +4730,7 @@ static void *do_projectpaint_thread(void *ph_v)
|
|||
}
|
||||
|
||||
/* note, for clone and smear, we only use the alpha, could be a special function */
|
||||
BKE_brush_sample_tex_3D(ps->scene, brush, samplecos, texrgba, thread_index, pool);
|
||||
BKE_brush_sample_tex_3d(ps->scene, brush, samplecos, texrgba, thread_index, pool);
|
||||
|
||||
copy_v3_v3(texrgb, texrgba);
|
||||
mask *= texrgba[3];
|
||||
|
|
|
@ -348,7 +348,7 @@ static void tex_color_alpha(
|
|||
const Brush *brush = BKE_paint_brush(&vp->paint);
|
||||
BLI_assert(brush->mtex.tex != NULL);
|
||||
if (brush->mtex.brush_map_mode == MTEX_MAP_MODE_3D) {
|
||||
BKE_brush_sample_tex_3D(vc->scene, brush, co, r_rgba, 0, NULL);
|
||||
BKE_brush_sample_tex_3d(vc->scene, brush, co, r_rgba, 0, NULL);
|
||||
}
|
||||
else {
|
||||
float co_ss[2]; /* screenspace */
|
||||
|
@ -358,7 +358,7 @@ static void tex_color_alpha(
|
|||
V3D_PROJ_TEST_CLIP_BB | V3D_PROJ_TEST_CLIP_NEAR) == V3D_PROJ_RET_OK)
|
||||
{
|
||||
const float co_ss_3d[3] = {co_ss[0], co_ss[1], 0.0f}; /* we need a 3rd empty value */
|
||||
BKE_brush_sample_tex_3D(vc->scene, brush, co_ss_3d, r_rgba, 0, NULL);
|
||||
BKE_brush_sample_tex_3d(vc->scene, brush, co_ss_3d, r_rgba, 0, NULL);
|
||||
}
|
||||
else {
|
||||
zero_v4(r_rgba);
|
||||
|
|
|
@ -1213,7 +1213,7 @@ float tex_strength(SculptSession *ss, const Brush *br,
|
|||
else if (mtex->brush_map_mode == MTEX_MAP_MODE_3D) {
|
||||
/* Get strength by feeding the vertex
|
||||
* location directly into a texture */
|
||||
avg = BKE_brush_sample_tex_3D(scene, br, point, rgba, 0, ss->tex_pool);
|
||||
avg = BKE_brush_sample_tex_3d(scene, br, point, rgba, 0, ss->tex_pool);
|
||||
}
|
||||
else if (ss->texcache) {
|
||||
float symm_point[3], point_2d[2];
|
||||
|
@ -1254,7 +1254,7 @@ float tex_strength(SculptSession *ss, const Brush *br,
|
|||
}
|
||||
else {
|
||||
const float point_3d[3] = {point_2d[0], point_2d[1], 0.0f};
|
||||
avg = BKE_brush_sample_tex_3D(scene, br, point_3d, rgba, 0, ss->tex_pool);
|
||||
avg = BKE_brush_sample_tex_3d(scene, br, point_3d, rgba, 0, ss->tex_pool);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -719,7 +719,7 @@ static void v3d_editvertex_buts(uiLayout *layout, View3D *v3d, Object *ob, float
|
|||
}
|
||||
}
|
||||
}
|
||||
BKE_nurb_test2D(nu);
|
||||
BKE_nurb_test_2d(nu);
|
||||
BKE_nurb_handles_test(nu, true); /* test for bezier too */
|
||||
|
||||
nu = nu->next;
|
||||
|
|
|
@ -784,7 +784,7 @@ static void recalcData_objects(TransInfo *t)
|
|||
else {
|
||||
/* Normal updating */
|
||||
while (nu) {
|
||||
BKE_nurb_test2D(nu);
|
||||
BKE_nurb_test_2d(nu);
|
||||
BKE_nurb_handles_calc(nu);
|
||||
nu = nu->next;
|
||||
}
|
||||
|
|
|
@ -114,7 +114,7 @@ void ED_transverts_update_obedit(TransVertStore *tvs, Object *obedit)
|
|||
}
|
||||
}
|
||||
|
||||
BKE_nurb_test2D(nu);
|
||||
BKE_nurb_test_2d(nu);
|
||||
BKE_nurb_handles_test(nu, true); /* test for bezier too */
|
||||
nu = nu->next;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue