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:
authorCampbell Barton <ideasman42@gmail.com>2012-08-21 18:43:51 +0400
committerCampbell Barton <ideasman42@gmail.com>2012-08-21 18:43:51 +0400
commit8bd7c3fba2749fdf2b16c4f32abf1a35692bc5bb (patch)
treeec5506895139ed6a09921c60eaf61bd8eb7f2226 /source/blender/makesrna
parent809fce9d00ecf8eea2c3d2ea52c3de2ec2ede1ee (diff)
change curve evaluation functions never to modify curve data (ensures thread safety), now initializations has to be done outside evaluation.
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r--source/blender/makesrna/intern/rna_color.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index 5dafe77f9c1..0bd42c2f5a0 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -337,6 +337,12 @@ static void rna_Scopes_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Pointer
s->ok = 0;
}
+/* this function only exists because #curvemap_evaluateF uses a 'const' qualifier */
+float rna_CurveMap_evaluateF(struct CurveMap *cuma, float value)
+{
+ return curvemap_evaluateF(cuma, value);
+}
+
#else
static void rna_def_curvemappoint(BlenderRNA *brna)
@@ -419,7 +425,7 @@ static void rna_def_curvemap(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Points", "");
rna_def_curvemap_points_api(brna, prop);
- func = RNA_def_function(srna, "evaluate", "curvemap_evaluateF");
+ func = RNA_def_function(srna, "evaluate", "rna_CurveMap_evaluateF");
RNA_def_function_ui_description(func, "Evaluate curve at given location");
parm = RNA_def_float(func, "position", 0.0f, -FLT_MAX, FLT_MAX, "Position", "Position to evaluate curve at", -FLT_MAX, FLT_MAX);
RNA_def_property_flag(parm, PROP_REQUIRED);