mirror of
https://github.com/godotengine/godot.git
synced 2024-11-25 21:52:51 +00:00
Make sure variant parser actually writes floats when float property is requested, closes #3301
This commit is contained in:
parent
6c8cf30697
commit
cc34e0dee9
@ -1801,7 +1801,10 @@ Error VariantWriter::write(const Variant& p_variant, StoreStringFunc p_store_str
|
||||
} break;
|
||||
case Variant::REAL: {
|
||||
|
||||
p_store_string_func(p_store_string_ud, rtoss(p_variant.operator real_t()) );
|
||||
String s = rtoss(p_variant.operator real_t());
|
||||
if (s.find(".")==-1 && s.find("e")==-1)
|
||||
s+=".0";
|
||||
p_store_string_func(p_store_string_ud, s );
|
||||
} break;
|
||||
case Variant::STRING: {
|
||||
|
||||
|
@ -1702,7 +1702,7 @@ bool AnimationKeyEditor::_edit_if_single_selection() {
|
||||
|
||||
if (selection.size()==0) {
|
||||
curve_edit->set_mode(AnimationCurveEdit::MODE_DISABLED);
|
||||
print_line("disable");
|
||||
//print_line("disable");
|
||||
} else {
|
||||
|
||||
curve_edit->set_mode(AnimationCurveEdit::MODE_MULTIPLE);
|
||||
@ -1713,13 +1713,13 @@ bool AnimationKeyEditor::_edit_if_single_selection() {
|
||||
|
||||
curve_edit->set_multiple(animation->track_get_key_transition(E->key().track,E->key().key));
|
||||
}
|
||||
print_line("multiple");
|
||||
//print_line("multiple");
|
||||
|
||||
}
|
||||
return false;
|
||||
}
|
||||
curve_edit->set_mode(AnimationCurveEdit::MODE_SINGLE);
|
||||
print_line("regular");
|
||||
//print_line("regular");
|
||||
|
||||
int idx = selection.front()->key().track;
|
||||
int key = selection.front()->key().key;
|
||||
|
Loading…
Reference in New Issue
Block a user