From 0e0b3d6e1a004e019358aa7f0a46cf8ad89c58a4 Mon Sep 17 00:00:00 2001 From: Nate Rupsis Date: Thu, 3 Nov 2022 09:17:16 -0500 Subject: adding defaults for NLA Action scale and repeat Differential Revision: https://developer.blender.org/D16379 --- source/blender/makesrna/intern/rna_nla.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/makesrna/intern/rna_nla.c') diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c index 524e3134f9c..4412dcee4c1 100644 --- a/source/blender/makesrna/intern/rna_nla.c +++ b/source/blender/makesrna/intern/rna_nla.c @@ -822,6 +822,7 @@ static void rna_def_nlastrip(BlenderRNA *brna) RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_repeat_set", NULL); /* these limits have currently be chosen arbitrarily, but could be extended * (minimum should still be > 0 though) if needed... */ + RNA_def_property_float_default(prop, 1.0); RNA_def_property_range(prop, 0.1f, 1000.0f); RNA_def_property_ui_text(prop, "Repeat", "Number of times to repeat the action range"); RNA_def_property_update( @@ -832,6 +833,7 @@ static void rna_def_nlastrip(BlenderRNA *brna) RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_scale_set", NULL); /* these limits can be extended, but beyond this, we can get some crazy+annoying bugs * due to numeric errors */ + RNA_def_property_float_default(prop, 1.0); RNA_def_property_range(prop, 0.0001f, 1000.0f); RNA_def_property_ui_text(prop, "Scale", "Scaling factor for action"); RNA_def_property_update( -- cgit v1.2.3 From 838d20b990ea97cc97d7a5a39baac824dd479a0e Mon Sep 17 00:00:00 2001 From: Nate Rupsis Date: Thu, 3 Nov 2022 10:38:35 -0500 Subject: make float value explicit --- source/blender/makesrna/intern/rna_nla.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/makesrna/intern/rna_nla.c') diff --git a/source/blender/makesrna/intern/rna_nla.c b/source/blender/makesrna/intern/rna_nla.c index 4412dcee4c1..de033408170 100644 --- a/source/blender/makesrna/intern/rna_nla.c +++ b/source/blender/makesrna/intern/rna_nla.c @@ -822,7 +822,7 @@ static void rna_def_nlastrip(BlenderRNA *brna) RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_repeat_set", NULL); /* these limits have currently be chosen arbitrarily, but could be extended * (minimum should still be > 0 though) if needed... */ - RNA_def_property_float_default(prop, 1.0); + RNA_def_property_float_default(prop, 1.0f); RNA_def_property_range(prop, 0.1f, 1000.0f); RNA_def_property_ui_text(prop, "Repeat", "Number of times to repeat the action range"); RNA_def_property_update( @@ -833,7 +833,7 @@ static void rna_def_nlastrip(BlenderRNA *brna) RNA_def_property_float_funcs(prop, NULL, "rna_NlaStrip_scale_set", NULL); /* these limits can be extended, but beyond this, we can get some crazy+annoying bugs * due to numeric errors */ - RNA_def_property_float_default(prop, 1.0); + RNA_def_property_float_default(prop, 1.0f); RNA_def_property_range(prop, 0.0001f, 1000.0f); RNA_def_property_ui_text(prop, "Scale", "Scaling factor for action"); RNA_def_property_update( -- cgit v1.2.3