[Bf-blender-cvs] [67559e31239] soc-2019-bevel-profiles: Profile orientation regularization works in weld case. More work distinguishing profile path from curvemapping
Hans Goudey
noreply at git.blender.org
Wed Jun 12 15:46:34 CEST 2019
Commit: 67559e31239570d838427cf8c93d61879eb80aa8
Author: Hans Goudey
Date: Mon Jun 10 23:04:30 2019 -0400
Branches: soc-2019-bevel-profiles
https://developer.blender.org/rB67559e31239570d838427cf8c93d61879eb80aa8
Profile orientation regularization works in weld case. More work distinguishing profile path from curvemapping
===================================================================
M source/blender/blenkernel/BKE_profile_path.h
M source/blender/blenkernel/intern/colortools.c
M source/blender/blenkernel/intern/profile_path.c
M source/blender/bmesh/operators/bmo_bevel.c
M source/blender/bmesh/tools/bmesh_bevel.c
M source/blender/modifiers/intern/MOD_bevel.c
===================================================================
diff --git a/source/blender/blenkernel/BKE_profile_path.h b/source/blender/blenkernel/BKE_profile_path.h
index a0816244661..f7fbb499c71 100644
--- a/source/blender/blenkernel/BKE_profile_path.h
+++ b/source/blender/blenkernel/BKE_profile_path.h
@@ -16,56 +16,51 @@
* The Original Code is Copyright (C) 2006 Blender Foundation.
* All rights reserved.
*/
-#ifndef __BKE_COLORTOOLS_H__
-#define __BKE_COLORTOOLS_H__
+#ifdef __NO_NO_NO__
+#define __NO_NO_NO_
+//#ifndef __BKE_PROFILEPATH_H__
+//#define __BKE_PROFILEPATH_H__
/** \file
* \ingroup bke
*/
-struct ColorManagedColorspaceSettings;
-struct ColorManagedDisplaySettings;
-struct ColorManagedViewSettings;
struct CurveMap;
struct CurveMapPoint;
struct CurveMapping;
-struct Histogram;
-struct ImBuf;
-struct Scopes;
-struct rctf;
-void curvemapping_set_defaults(
+void profilepath_set_defaults(
struct CurveMapping *cumap, int tot, float minx, float miny, float maxx, float maxy);
-struct CurveMapping *curvemapping_add(int tot, float minx, float miny, float maxx, float maxy);
-void curvemapping_free_data(struct CurveMapping *cumap);
-void curvemapping_free(struct CurveMapping *cumap);
-void curvemapping_copy_data(struct CurveMapping *target, const struct CurveMapping *cumap);
-struct CurveMapping *curvemapping_copy(const struct CurveMapping *cumap);
-void curvemapping_set_black_white_ex(const float black[3], const float white[3], float r_bwmul[3]);
-void curvemapping_set_black_white(struct CurveMapping *cumap,
+struct CurveMapping *profilepath_add(int tot, float minx, float miny, float maxx, float maxy);
+void profilepath_free_data(struct CurveMapping *cumap);
+void profilepath_free(struct CurveMapping *cumap);
+void profilepath_copy_data(struct CurveMapping *target, const struct CurveMapping *cumap);
+struct CurveMapping *profilepath_copy(const struct CurveMapping *cumap);
+void profilepath_set_black_white_ex(const float black[3], const float white[3], float r_bwmul[3]);
+void profilepath_set_black_white(struct CurveMapping *cumap,
const float black[3],
const float white[3]);
/* Used for a path where the curve isn't necessarily a function. */
/* Initialized with the number of segments to fill the table with */
-void curvemapping_path_initialize(
+void profilepath_initialize(
struct CurveMapping *cumap,
int nsegments); // HANS-TODO: Hmm, this assumes there is only one curve
/* Evaluates along the length of the path rather than with X coord */
-void curvemapping_path_evaluate(const struct CurveMapping *cumap,
+void profilepath_evaluate(const struct CurveMapping *cumap,
int segment,
float *x_out,
float *y_out);
/* Length portion is the fraction of the total path length where we want the location */
-void curvemap_path_evaluate(const struct CurveMap *cuma,
+void profile_evaluate(const struct CurveMap *cuma,
float length_portion,
float *x_out,
float *y_out);
/* Need to find the total length of the curve to sample a portion of it */
-float curvemap_path_total_length(const struct CurveMap *cuma);
+float profile_total_length(const struct CurveMap *cuma);
/* Distance in 2D to the next point */
-float curvemap_path_linear_distance_to_next_point(const struct CurveMap *cuma, int i);
+float profile_linear_distance_to_next_point(const struct CurveMap *cuma, int i);
enum {
CURVEMAP_SLOPE_NEGATIVE = 0,
@@ -73,85 +68,24 @@ enum {
CURVEMAP_SLOPE_POS_NEG = 2,
};
-void curvemap_reset(struct CurveMap *cuma, const struct rctf *clipr, int preset, int slope);
-void curvemap_remove(struct CurveMap *cuma, const short flag);
-bool curvemap_remove_point(struct CurveMap *cuma, struct CurveMapPoint *cmp);
+void profile_reset(struct CurveMap *cuma, const struct rctf *clipr, int preset, int slope);
+void profile_remove(struct CurveMap *cuma, const short flag);
+bool profile_remove_point(struct CurveMap *cuma, struct CurveMapPoint *cmp);
struct CurveMapPoint *curvemap_insert(struct CurveMap *cuma, float x, float y);
-void curvemap_handle_set(struct CurveMap *cuma, int type);
+void profile_handle_set(struct CurveMap *cuma, int type);
-void curvemapping_changed(struct CurveMapping *cumap, const bool rem_doubles);
-void curvemapping_changed_all(struct CurveMapping *cumap);
+void profilepath_changed(struct CurveMapping *cumap, const bool rem_doubles);
+void profilepath_changed_all(struct CurveMapping *cumap);
/* call before _all_ evaluation functions */
-void curvemapping_initialize(struct CurveMapping *cumap);
+void profilepath_initialize2(struct CurveMapping *cumap);
/* keep these (const CurveMap) - to help with thread safety */
/* single curve, no table check */
-float curvemap_evaluateF(const struct CurveMap *cuma, float value);
+float profile_evaluateF(const struct CurveMap *cuma, float value);
/* single curve, with table check */
-float curvemapping_evaluateF(const struct CurveMapping *cumap, int cur, float value);
-void curvemapping_evaluate3F(const struct CurveMapping *cumap,
- float vecout[3],
- const float vecin[3]);
-void curvemapping_evaluateRGBF(const struct CurveMapping *cumap,
- float vecout[3],
- const float vecin[3]);
-void curvemapping_evaluate_premulRGB(const struct CurveMapping *cumap,
- unsigned char vecout_byte[3],
- const unsigned char vecin_byte[3]);
-void curvemapping_evaluate_premulRGBF_ex(const struct CurveMapping *cumap,
- float vecout[3],
- const float vecin[3],
- const float black[3],
- const float bwmul[3]);
-void curvemapping_evaluate_premulRGBF(const struct CurveMapping *cumap,
- float vecout[3],
- const float vecin[3]);
-int curvemapping_RGBA_does_something(const struct CurveMapping *cumap);
-void curvemapping_table_RGBA(const struct CurveMapping *cumap, float **array, int *size);
-
+float profilepath_evaluateF(const struct CurveMapping *cumap, int cur, float value);
/* non-const, these modify the curve */
-void curvemapping_premultiply(struct CurveMapping *cumap, int restore);
-
-void BKE_histogram_update_sample_line(struct Histogram *hist,
- struct ImBuf *ibuf,
- const struct ColorManagedViewSettings *view_settings,
- const struct ColorManagedDisplaySettings *display_settings);
-void scopes_update(struct Scopes *scopes,
- struct ImBuf *ibuf,
- const struct ColorManagedViewSettings *view_settings,
- const struct ColorManagedDisplaySettings *display_settings);
-void scopes_free(struct Scopes *scopes);
-void scopes_new(struct Scopes *scopes);
-
-void BKE_color_managed_display_settings_init(struct ColorManagedDisplaySettings *settings);
-void BKE_color_managed_display_settings_copy(struct ColorManagedDisplaySettings *new_settings,
- const struct ColorManagedDisplaySettings *settings);
-
-/* Initialize view settings to be best suitable for render type of viewing.
- * This will use default view transform from the OCIO configuration if none
- * is specified. */
-void BKE_color_managed_view_settings_init_render(
- struct ColorManagedViewSettings *settings,
- const struct ColorManagedDisplaySettings *display_settings,
- const char *view_transform);
-
-/* Initialize view settings which are best suitable for viewing non-render
- * images. For example,s movie clips while tracking. */
-void BKE_color_managed_view_settings_init_default(
- struct ColorManagedViewSettings *settings,
- const struct ColorManagedDisplaySettings *display_settings);
-
-void BKE_color_managed_view_settings_copy(struct ColorManagedViewSettings *new_settings,
- const struct ColorManagedViewSettings *settings);
-void BKE_color_managed_view_settings_free(struct ColorManagedViewSettings *settings);
+void profilepath_premultiply(struct CurveMapping *cumap, int restore);
-void BKE_color_managed_colorspace_settings_init(
- struct ColorManagedColorspaceSettings *colorspace_settings);
-void BKE_color_managed_colorspace_settings_copy(
- struct ColorManagedColorspaceSettings *colorspace_settings,
- const struct ColorManagedColorspaceSettings *settings);
-bool BKE_color_managed_colorspace_settings_equals(
- const struct ColorManagedColorspaceSettings *settings1,
- const struct ColorManagedColorspaceSettings *settings2);
#endif
diff --git a/source/blender/blenkernel/intern/colortools.c b/source/blender/blenkernel/intern/colortools.c
index 6802dae780b..be50f0a500b 100644
--- a/source/blender/blenkernel/intern/colortools.c
+++ b/source/blender/blenkernel/intern/colortools.c
@@ -904,8 +904,7 @@ void curvemapping_changed(CurveMapping *cumap, const bool rem_doubles)
}
}
- /* HANS-TODO: Reenable this for other curves! */
- /* qsort(cmp, cuma->totpoint, sizeof(CurveMapPoint), sort_curvepoints); */
+// qsort(cmp, cuma->totpoint, sizeof(CurveMapPoint), sort_curvepoints);
/* remove doubles, threshold set on 1% of default range */
if (rem_doubles && cuma->totpoint > 2) {
diff --git a/source/blender/blenkernel/intern/profile_path.c b/source/blender/blenkernel/intern/profile_path.c
index 4b73cd60f60..89ea709ef98 100644
--- a/source/blender/blenkernel/intern/profile_path.c
+++ b/source/blender/blenkernel/intern/profile_path.c
@@ -44,11 +44,7 @@
#include "IMB_colormanagement.h"
#include "IMB_imbuf_types.h"
-/* ********************************* color curve ********************* */
-
-/* ***************** operations on full struct ************* */
-
-void curvemapping_set_defaults(
+void profilepath_set_defaults(
CurveMapping *cuma
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-blender-cvs
mailing list