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:
authorPatrick Busch <Xylvier>2021-03-02 22:13:36 +0300
committerHans Goudey <h.goudey@me.com>2021-03-02 22:13:36 +0300
commit3eb8307160e327f64593d218125d02289285aa17 (patch)
tree67a536f8ccc390d3936e5edef5239f27e58cbb3d /source/blender/makesrna/intern/rna_color.c
parent85421c4fab029ccb0747338715b95910e82229f9 (diff)
Python API: Expose CurveMapping Reset View function
The Python API for the curve mapping widget offers the `update` function, but no way to reset the view to the clipping rectangle. This commit adds a blenkernel function for this operation, and exposes it to the CurvMapping RNA API. This allows addons to display a more user-friendly view of the data in this widget. Differential Revision: https://developer.blender.org/D10561
Diffstat (limited to 'source/blender/makesrna/intern/rna_color.c')
-rw-r--r--source/blender/makesrna/intern/rna_color.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index 9770ffca5b8..206ebc2cb14 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -896,6 +896,9 @@ static void rna_def_curvemapping(BlenderRNA *brna)
func = RNA_def_function(srna, "update", "BKE_curvemapping_changed_all");
RNA_def_function_ui_description(func, "Update curve mapping after making changes");
+ func = RNA_def_function(srna, "reset_view", "BKE_curvemapping_reset_view");
+ RNA_def_function_ui_description(func, "Reset the curve mapping grid to its clipping size");
+
func = RNA_def_function(srna, "initialize", "rna_CurveMap_initialize");
RNA_def_function_ui_description(func, "Initialize curve");