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:
authorSergey Sharybin <sergey.vfx@gmail.com>2020-03-19 12:32:16 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2020-03-19 12:33:51 +0300
commitb49dbb635af74db5359cfc6c14a00ef397725968 (patch)
tree5a3dca9f5fb359ca0c79742ab799f8b1d745b7b5 /source/blender/blenkernel/BKE_subdiv.h
parent53674fb255d92da4b18fa844130a58ea9b57ff9d (diff)
Subdiv: Make Blender crease to OSD sharpness reusable
Makes it so conversion is centralized in a single place. We might consider removing any conversion, passing value as-is which will be easier for I/O scripts to match crease. The downside of that would be loose of control range in certain qualities and values of crease. There shouldn't be any functional changes in this commit.
Diffstat (limited to 'source/blender/blenkernel/BKE_subdiv.h')
-rw-r--r--source/blender/blenkernel/BKE_subdiv.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/blender/blenkernel/BKE_subdiv.h b/source/blender/blenkernel/BKE_subdiv.h
index 7f4fe1c7673..3b342402ecb 100644
--- a/source/blender/blenkernel/BKE_subdiv.h
+++ b/source/blender/blenkernel/BKE_subdiv.h
@@ -287,6 +287,10 @@ BLI_INLINE int BKE_subdiv_rotate_quad_to_corner(const float quad_u,
BLI_INLINE void BKE_subdiv_rotate_grid_to_quad(
const int corner, const float grid_u, const float grid_v, float *r_quad_u, float *r_quad_v);
+/* Convert Blender edge crease value to OpenSubdiv sharpness. */
+BLI_INLINE float BKE_subdiv_edge_crease_to_sharpness_f(float edge_crease);
+BLI_INLINE float BKE_subdiv_edge_crease_to_sharpness_char(char edge_crease);
+
#ifdef __cplusplus
}
#endif