You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2026-01-05 19:31:35 +00:00
Use get_slicec instead of get_slice for single character splitters
This commit is contained in:
@@ -1812,9 +1812,9 @@ void Collada::_parse_animation(XMLParser &p_parser) {
|
||||
track.target = target.get_slicec('/', 0);
|
||||
track.param = target.get_slicec('/', 1);
|
||||
if (track.param.contains_char('.')) {
|
||||
track.component = track.param.get_slice(".", 1).to_upper();
|
||||
track.component = track.param.get_slicec('.', 1).to_upper();
|
||||
}
|
||||
track.param = track.param.get_slice(".", 0);
|
||||
track.param = track.param.get_slicec('.', 0);
|
||||
if (names.size() > 1 && track.component.is_empty()) {
|
||||
//this is a guess because the collada spec is ambiguous here...
|
||||
//i suppose if you have many names (outputs) you can't use a component and i should abide to that.
|
||||
@@ -2347,9 +2347,9 @@ Error Collada::load(const String &p_path, int p_flags) {
|
||||
{
|
||||
//version
|
||||
String version = parser.get_named_attribute_value("version");
|
||||
state.version.major = version.get_slice(".", 0).to_int();
|
||||
state.version.minor = version.get_slice(".", 1).to_int();
|
||||
state.version.rev = version.get_slice(".", 2).to_int();
|
||||
state.version.major = version.get_slicec('.', 0).to_int();
|
||||
state.version.minor = version.get_slicec('.', 1).to_int();
|
||||
state.version.rev = version.get_slicec('.', 2).to_int();
|
||||
COLLADA_PRINT("Collada VERSION: " + version);
|
||||
}
|
||||
|
||||
|
||||
@@ -2211,7 +2211,7 @@ bool ResourceImporterScene::get_internal_option_visibility(InternalImportCategor
|
||||
}
|
||||
if (p_option.begins_with("slice_")) {
|
||||
int max_slice = p_options["slices/amount"];
|
||||
int slice = p_option.get_slice("_", 1).to_int() - 1;
|
||||
int slice = p_option.get_slicec('_', 1).to_int() - 1;
|
||||
if (slice >= max_slice) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user