mirror of
https://github.com/godotengine/godot.git
synced 2024-11-24 13:12:42 +00:00
Style: Set clang-format Standard to Cpp11
For us, it practically only changes the fact that `A<A<int>>` is now used instead of the C++03 compatible `A<A<int> >`. Note: clang-format 10+ changed the `Standard` arguments to fully specified `c++11`, `c++14`, etc. versions, but we can't use `c++17` now if we want to preserve compatibility with clang-format 8 and 9. `Cpp11` is still supported as deprecated alias for `Latest`.
This commit is contained in:
parent
c5d76139dc
commit
cb282c6ef0
@ -112,11 +112,11 @@ UseTab: Always
|
|||||||
---
|
---
|
||||||
### C++ specific config ###
|
### C++ specific config ###
|
||||||
Language: Cpp
|
Language: Cpp
|
||||||
Standard: Cpp03
|
Standard: Cpp11
|
||||||
---
|
---
|
||||||
### ObjC specific config ###
|
### ObjC specific config ###
|
||||||
Language: ObjC
|
Language: ObjC
|
||||||
Standard: Cpp03
|
Standard: Cpp11
|
||||||
ObjCBlockIndentWidth: 4
|
ObjCBlockIndentWidth: 4
|
||||||
# ObjCSpaceAfterProperty: false
|
# ObjCSpaceAfterProperty: false
|
||||||
# ObjCSpaceBeforeProtocolList: true
|
# ObjCSpaceBeforeProtocolList: true
|
||||||
|
@ -964,10 +964,10 @@ void _OS::print_all_textures_by_size() {
|
|||||||
List<_OSCoreBindImg> imgs;
|
List<_OSCoreBindImg> imgs;
|
||||||
int total = 0;
|
int total = 0;
|
||||||
{
|
{
|
||||||
List<Ref<Resource> > rsrc;
|
List<Ref<Resource>> rsrc;
|
||||||
ResourceCache::get_cached_resources(&rsrc);
|
ResourceCache::get_cached_resources(&rsrc);
|
||||||
|
|
||||||
for (List<Ref<Resource> >::Element *E = rsrc.front(); E; E = E->next()) {
|
for (List<Ref<Resource>>::Element *E = rsrc.front(); E; E = E->next()) {
|
||||||
|
|
||||||
if (!E->get()->is_class("ImageTexture"))
|
if (!E->get()->is_class("ImageTexture"))
|
||||||
continue;
|
continue;
|
||||||
@ -998,13 +998,13 @@ void _OS::print_resources_by_type(const Vector<String> &p_types) {
|
|||||||
|
|
||||||
Map<String, int> type_count;
|
Map<String, int> type_count;
|
||||||
|
|
||||||
List<Ref<Resource> > resources;
|
List<Ref<Resource>> resources;
|
||||||
ResourceCache::get_cached_resources(&resources);
|
ResourceCache::get_cached_resources(&resources);
|
||||||
|
|
||||||
List<Ref<Resource> > rsrc;
|
List<Ref<Resource>> rsrc;
|
||||||
ResourceCache::get_cached_resources(&rsrc);
|
ResourceCache::get_cached_resources(&rsrc);
|
||||||
|
|
||||||
for (List<Ref<Resource> >::Element *E = rsrc.front(); E; E = E->next()) {
|
for (List<Ref<Resource>>::Element *E = rsrc.front(); E; E = E->next()) {
|
||||||
|
|
||||||
Ref<Resource> r = E->get();
|
Ref<Resource> r = E->get();
|
||||||
|
|
||||||
@ -1633,7 +1633,7 @@ Vector<Vector3> _Geometry::clip_polygon(const Vector<Vector3> &p_points, const P
|
|||||||
|
|
||||||
Array _Geometry::merge_polygons_2d(const Vector<Vector2> &p_polygon_a, const Vector<Vector2> &p_polygon_b) {
|
Array _Geometry::merge_polygons_2d(const Vector<Vector2> &p_polygon_a, const Vector<Vector2> &p_polygon_b) {
|
||||||
|
|
||||||
Vector<Vector<Point2> > polys = Geometry::merge_polygons_2d(p_polygon_a, p_polygon_b);
|
Vector<Vector<Point2>> polys = Geometry::merge_polygons_2d(p_polygon_a, p_polygon_b);
|
||||||
|
|
||||||
Array ret;
|
Array ret;
|
||||||
|
|
||||||
@ -1645,7 +1645,7 @@ Array _Geometry::merge_polygons_2d(const Vector<Vector2> &p_polygon_a, const Vec
|
|||||||
|
|
||||||
Array _Geometry::clip_polygons_2d(const Vector<Vector2> &p_polygon_a, const Vector<Vector2> &p_polygon_b) {
|
Array _Geometry::clip_polygons_2d(const Vector<Vector2> &p_polygon_a, const Vector<Vector2> &p_polygon_b) {
|
||||||
|
|
||||||
Vector<Vector<Point2> > polys = Geometry::clip_polygons_2d(p_polygon_a, p_polygon_b);
|
Vector<Vector<Point2>> polys = Geometry::clip_polygons_2d(p_polygon_a, p_polygon_b);
|
||||||
|
|
||||||
Array ret;
|
Array ret;
|
||||||
|
|
||||||
@ -1657,7 +1657,7 @@ Array _Geometry::clip_polygons_2d(const Vector<Vector2> &p_polygon_a, const Vect
|
|||||||
|
|
||||||
Array _Geometry::intersect_polygons_2d(const Vector<Vector2> &p_polygon_a, const Vector<Vector2> &p_polygon_b) {
|
Array _Geometry::intersect_polygons_2d(const Vector<Vector2> &p_polygon_a, const Vector<Vector2> &p_polygon_b) {
|
||||||
|
|
||||||
Vector<Vector<Point2> > polys = Geometry::intersect_polygons_2d(p_polygon_a, p_polygon_b);
|
Vector<Vector<Point2>> polys = Geometry::intersect_polygons_2d(p_polygon_a, p_polygon_b);
|
||||||
|
|
||||||
Array ret;
|
Array ret;
|
||||||
|
|
||||||
@ -1669,7 +1669,7 @@ Array _Geometry::intersect_polygons_2d(const Vector<Vector2> &p_polygon_a, const
|
|||||||
|
|
||||||
Array _Geometry::exclude_polygons_2d(const Vector<Vector2> &p_polygon_a, const Vector<Vector2> &p_polygon_b) {
|
Array _Geometry::exclude_polygons_2d(const Vector<Vector2> &p_polygon_a, const Vector<Vector2> &p_polygon_b) {
|
||||||
|
|
||||||
Vector<Vector<Point2> > polys = Geometry::exclude_polygons_2d(p_polygon_a, p_polygon_b);
|
Vector<Vector<Point2>> polys = Geometry::exclude_polygons_2d(p_polygon_a, p_polygon_b);
|
||||||
|
|
||||||
Array ret;
|
Array ret;
|
||||||
|
|
||||||
@ -1681,7 +1681,7 @@ Array _Geometry::exclude_polygons_2d(const Vector<Vector2> &p_polygon_a, const V
|
|||||||
|
|
||||||
Array _Geometry::clip_polyline_with_polygon_2d(const Vector<Vector2> &p_polyline, const Vector<Vector2> &p_polygon) {
|
Array _Geometry::clip_polyline_with_polygon_2d(const Vector<Vector2> &p_polyline, const Vector<Vector2> &p_polygon) {
|
||||||
|
|
||||||
Vector<Vector<Point2> > polys = Geometry::clip_polyline_with_polygon_2d(p_polyline, p_polygon);
|
Vector<Vector<Point2>> polys = Geometry::clip_polyline_with_polygon_2d(p_polyline, p_polygon);
|
||||||
|
|
||||||
Array ret;
|
Array ret;
|
||||||
|
|
||||||
@ -1693,7 +1693,7 @@ Array _Geometry::clip_polyline_with_polygon_2d(const Vector<Vector2> &p_polyline
|
|||||||
|
|
||||||
Array _Geometry::intersect_polyline_with_polygon_2d(const Vector<Vector2> &p_polyline, const Vector<Vector2> &p_polygon) {
|
Array _Geometry::intersect_polyline_with_polygon_2d(const Vector<Vector2> &p_polyline, const Vector<Vector2> &p_polygon) {
|
||||||
|
|
||||||
Vector<Vector<Point2> > polys = Geometry::intersect_polyline_with_polygon_2d(p_polyline, p_polygon);
|
Vector<Vector<Point2>> polys = Geometry::intersect_polyline_with_polygon_2d(p_polyline, p_polygon);
|
||||||
|
|
||||||
Array ret;
|
Array ret;
|
||||||
|
|
||||||
@ -1705,7 +1705,7 @@ Array _Geometry::intersect_polyline_with_polygon_2d(const Vector<Vector2> &p_pol
|
|||||||
|
|
||||||
Array _Geometry::offset_polygon_2d(const Vector<Vector2> &p_polygon, real_t p_delta, PolyJoinType p_join_type) {
|
Array _Geometry::offset_polygon_2d(const Vector<Vector2> &p_polygon, real_t p_delta, PolyJoinType p_join_type) {
|
||||||
|
|
||||||
Vector<Vector<Point2> > polys = Geometry::offset_polygon_2d(p_polygon, p_delta, Geometry::PolyJoinType(p_join_type));
|
Vector<Vector<Point2>> polys = Geometry::offset_polygon_2d(p_polygon, p_delta, Geometry::PolyJoinType(p_join_type));
|
||||||
|
|
||||||
Array ret;
|
Array ret;
|
||||||
|
|
||||||
@ -1717,7 +1717,7 @@ Array _Geometry::offset_polygon_2d(const Vector<Vector2> &p_polygon, real_t p_de
|
|||||||
|
|
||||||
Array _Geometry::offset_polyline_2d(const Vector<Vector2> &p_polygon, real_t p_delta, PolyJoinType p_join_type, PolyEndType p_end_type) {
|
Array _Geometry::offset_polyline_2d(const Vector<Vector2> &p_polygon, real_t p_delta, PolyJoinType p_join_type, PolyEndType p_end_type) {
|
||||||
|
|
||||||
Vector<Vector<Point2> > polys = Geometry::offset_polyline_2d(p_polygon, p_delta, Geometry::PolyJoinType(p_join_type), Geometry::PolyEndType(p_end_type));
|
Vector<Vector<Point2>> polys = Geometry::offset_polyline_2d(p_polygon, p_delta, Geometry::PolyJoinType(p_join_type), Geometry::PolyEndType(p_end_type));
|
||||||
|
|
||||||
Array ret;
|
Array ret;
|
||||||
|
|
||||||
|
@ -1401,7 +1401,7 @@ void ClassDB::get_extensions_for_type(const StringName &p_class, List<String> *p
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
HashMap<StringName, HashMap<StringName, Variant> > ClassDB::default_values;
|
HashMap<StringName, HashMap<StringName, Variant>> ClassDB::default_values;
|
||||||
Set<StringName> ClassDB::default_values_cached;
|
Set<StringName> ClassDB::default_values_cached;
|
||||||
|
|
||||||
Variant ClassDB::class_get_default_property_value(const StringName &p_class, const StringName &p_property, bool *r_valid) {
|
Variant ClassDB::class_get_default_property_value(const StringName &p_class, const StringName &p_property, bool *r_valid) {
|
||||||
|
@ -119,7 +119,7 @@ public:
|
|||||||
void *class_ptr;
|
void *class_ptr;
|
||||||
HashMap<StringName, MethodBind *> method_map;
|
HashMap<StringName, MethodBind *> method_map;
|
||||||
HashMap<StringName, int> constant_map;
|
HashMap<StringName, int> constant_map;
|
||||||
HashMap<StringName, List<StringName> > enum_map;
|
HashMap<StringName, List<StringName>> enum_map;
|
||||||
HashMap<StringName, MethodInfo> signal_map;
|
HashMap<StringName, MethodInfo> signal_map;
|
||||||
List<PropertyInfo> property_list;
|
List<PropertyInfo> property_list;
|
||||||
#ifdef DEBUG_METHODS_ENABLED
|
#ifdef DEBUG_METHODS_ENABLED
|
||||||
@ -160,7 +160,7 @@ public:
|
|||||||
|
|
||||||
static void _add_class2(const StringName &p_class, const StringName &p_inherits);
|
static void _add_class2(const StringName &p_class, const StringName &p_inherits);
|
||||||
|
|
||||||
static HashMap<StringName, HashMap<StringName, Variant> > default_values;
|
static HashMap<StringName, HashMap<StringName, Variant>> default_values;
|
||||||
static Set<StringName> default_values_cached;
|
static Set<StringName> default_values_cached;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -50,8 +50,8 @@ void PHashTranslation::generate(const Ref<Translation> &p_from) {
|
|||||||
|
|
||||||
int size = Math::larger_prime(keys.size());
|
int size = Math::larger_prime(keys.size());
|
||||||
|
|
||||||
Vector<Vector<Pair<int, CharString> > > buckets;
|
Vector<Vector<Pair<int, CharString>>> buckets;
|
||||||
Vector<Map<uint32_t, int> > table;
|
Vector<Map<uint32_t, int>> table;
|
||||||
Vector<uint32_t> hfunc_table;
|
Vector<uint32_t> hfunc_table;
|
||||||
Vector<_PHashTranslationCmp> compressed;
|
Vector<_PHashTranslationCmp> compressed;
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ void PHashTranslation::generate(const Ref<Translation> &p_from) {
|
|||||||
|
|
||||||
for (int i = 0; i < size; i++) {
|
for (int i = 0; i < size; i++) {
|
||||||
|
|
||||||
const Vector<Pair<int, CharString> > &b = buckets[i];
|
const Vector<Pair<int, CharString>> &b = buckets[i];
|
||||||
Map<uint32_t, int> &t = table.write[i];
|
Map<uint32_t, int> &t = table.write[i];
|
||||||
|
|
||||||
if (b.size() == 0)
|
if (b.size() == 0)
|
||||||
|
@ -262,14 +262,14 @@ void LocalDebugger::debug(bool p_can_continue, bool p_is_error_breakpoint) {
|
|||||||
|
|
||||||
if (line.get_slice_count(" ") <= 1) {
|
if (line.get_slice_count(" ") <= 1) {
|
||||||
|
|
||||||
const Map<int, Set<StringName> > &breakpoints = script_debugger->get_breakpoints();
|
const Map<int, Set<StringName>> &breakpoints = script_debugger->get_breakpoints();
|
||||||
if (breakpoints.size() == 0) {
|
if (breakpoints.size() == 0) {
|
||||||
print_line("No Breakpoints.");
|
print_line("No Breakpoints.");
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
print_line("Breakpoint(s): " + itos(breakpoints.size()));
|
print_line("Breakpoint(s): " + itos(breakpoints.size()));
|
||||||
for (Map<int, Set<StringName> >::Element *E = breakpoints.front(); E; E = E->next()) {
|
for (Map<int, Set<StringName>>::Element *E = breakpoints.front(); E; E = E->next()) {
|
||||||
print_line("\t" + String(E->value().front()->get()) + ":" + itos(E->key()));
|
print_line("\t" + String(E->value().front()->get()) + ":" + itos(E->key()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -45,7 +45,7 @@ class ScriptDebugger {
|
|||||||
int depth = -1;
|
int depth = -1;
|
||||||
bool skip_breakpoints = false;
|
bool skip_breakpoints = false;
|
||||||
|
|
||||||
Map<int, Set<StringName> > breakpoints;
|
Map<int, Set<StringName>> breakpoints;
|
||||||
|
|
||||||
ScriptLanguage *break_lang = NULL;
|
ScriptLanguage *break_lang = NULL;
|
||||||
Vector<StackInfo> error_stack_info;
|
Vector<StackInfo> error_stack_info;
|
||||||
@ -67,7 +67,7 @@ public:
|
|||||||
bool is_breakpoint(int p_line, const StringName &p_source) const;
|
bool is_breakpoint(int p_line, const StringName &p_source) const;
|
||||||
bool is_breakpoint_line(int p_line) const;
|
bool is_breakpoint_line(int p_line) const;
|
||||||
void clear_breakpoints();
|
void clear_breakpoints();
|
||||||
const Map<int, Set<StringName> > &get_breakpoints() const { return breakpoints; }
|
const Map<int, Set<StringName>> &get_breakpoints() const { return breakpoints; }
|
||||||
|
|
||||||
void debug(ScriptLanguage *p_lang, bool p_can_continue = true, bool p_is_error_breakpoint = false);
|
void debug(ScriptLanguage *p_lang, bool p_can_continue = true, bool p_is_error_breakpoint = false);
|
||||||
ScriptLanguage *get_break_language() const;
|
ScriptLanguage *get_break_language() const;
|
||||||
|
@ -99,9 +99,9 @@ List<StringName> InputMap::get_actions() const {
|
|||||||
return actions;
|
return actions;
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Ref<InputEvent> >::Element *InputMap::_find_event(Action &p_action, const Ref<InputEvent> &p_event, bool *p_pressed, float *p_strength) const {
|
List<Ref<InputEvent>>::Element *InputMap::_find_event(Action &p_action, const Ref<InputEvent> &p_event, bool *p_pressed, float *p_strength) const {
|
||||||
|
|
||||||
for (List<Ref<InputEvent> >::Element *E = p_action.inputs.front(); E; E = E->next()) {
|
for (List<Ref<InputEvent>>::Element *E = p_action.inputs.front(); E; E = E->next()) {
|
||||||
|
|
||||||
const Ref<InputEvent> e = E->get();
|
const Ref<InputEvent> e = E->get();
|
||||||
|
|
||||||
@ -151,7 +151,7 @@ void InputMap::action_erase_event(const StringName &p_action, const Ref<InputEve
|
|||||||
|
|
||||||
ERR_FAIL_COND_MSG(!input_map.has(p_action), "Request for nonexistent InputMap action '" + String(p_action) + "'.");
|
ERR_FAIL_COND_MSG(!input_map.has(p_action), "Request for nonexistent InputMap action '" + String(p_action) + "'.");
|
||||||
|
|
||||||
List<Ref<InputEvent> >::Element *E = _find_event(input_map[p_action], p_event);
|
List<Ref<InputEvent>>::Element *E = _find_event(input_map[p_action], p_event);
|
||||||
if (E)
|
if (E)
|
||||||
input_map[p_action].inputs.erase(E);
|
input_map[p_action].inputs.erase(E);
|
||||||
}
|
}
|
||||||
@ -166,9 +166,9 @@ void InputMap::action_erase_events(const StringName &p_action) {
|
|||||||
Array InputMap::_get_action_list(const StringName &p_action) {
|
Array InputMap::_get_action_list(const StringName &p_action) {
|
||||||
|
|
||||||
Array ret;
|
Array ret;
|
||||||
const List<Ref<InputEvent> > *al = get_action_list(p_action);
|
const List<Ref<InputEvent>> *al = get_action_list(p_action);
|
||||||
if (al) {
|
if (al) {
|
||||||
for (const List<Ref<InputEvent> >::Element *E = al->front(); E; E = E->next()) {
|
for (const List<Ref<InputEvent>>::Element *E = al->front(); E; E = E->next()) {
|
||||||
|
|
||||||
ret.push_back(E->get());
|
ret.push_back(E->get());
|
||||||
}
|
}
|
||||||
@ -177,7 +177,7 @@ Array InputMap::_get_action_list(const StringName &p_action) {
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
const List<Ref<InputEvent> > *InputMap::get_action_list(const StringName &p_action) {
|
const List<Ref<InputEvent>> *InputMap::get_action_list(const StringName &p_action) {
|
||||||
|
|
||||||
const Map<StringName, Action>::Element *E = input_map.find(p_action);
|
const Map<StringName, Action>::Element *E = input_map.find(p_action);
|
||||||
if (!E)
|
if (!E)
|
||||||
@ -205,7 +205,7 @@ bool InputMap::event_get_action_status(const Ref<InputEvent> &p_event, const Str
|
|||||||
|
|
||||||
bool pressed;
|
bool pressed;
|
||||||
float strength;
|
float strength;
|
||||||
List<Ref<InputEvent> >::Element *event = _find_event(E->get(), p_event, &pressed, &strength);
|
List<Ref<InputEvent>>::Element *event = _find_event(E->get(), p_event, &pressed, &strength);
|
||||||
if (event != NULL) {
|
if (event != NULL) {
|
||||||
if (p_pressed != NULL)
|
if (p_pressed != NULL)
|
||||||
*p_pressed = pressed;
|
*p_pressed = pressed;
|
||||||
|
@ -47,7 +47,7 @@ public:
|
|||||||
struct Action {
|
struct Action {
|
||||||
int id;
|
int id;
|
||||||
float deadzone;
|
float deadzone;
|
||||||
List<Ref<InputEvent> > inputs;
|
List<Ref<InputEvent>> inputs;
|
||||||
};
|
};
|
||||||
|
|
||||||
private:
|
private:
|
||||||
@ -55,7 +55,7 @@ private:
|
|||||||
|
|
||||||
mutable Map<StringName, Action> input_map;
|
mutable Map<StringName, Action> input_map;
|
||||||
|
|
||||||
List<Ref<InputEvent> >::Element *_find_event(Action &p_action, const Ref<InputEvent> &p_event, bool *p_pressed = NULL, float *p_strength = NULL) const;
|
List<Ref<InputEvent>>::Element *_find_event(Action &p_action, const Ref<InputEvent> &p_event, bool *p_pressed = NULL, float *p_strength = NULL) const;
|
||||||
|
|
||||||
Array _get_action_list(const StringName &p_action);
|
Array _get_action_list(const StringName &p_action);
|
||||||
Array _get_actions();
|
Array _get_actions();
|
||||||
@ -77,7 +77,7 @@ public:
|
|||||||
void action_erase_event(const StringName &p_action, const Ref<InputEvent> &p_event);
|
void action_erase_event(const StringName &p_action, const Ref<InputEvent> &p_event);
|
||||||
void action_erase_events(const StringName &p_action);
|
void action_erase_events(const StringName &p_action);
|
||||||
|
|
||||||
const List<Ref<InputEvent> > *get_action_list(const StringName &p_action);
|
const List<Ref<InputEvent>> *get_action_list(const StringName &p_action);
|
||||||
bool event_is_action(const Ref<InputEvent> &p_event, const StringName &p_action) const;
|
bool event_is_action(const Ref<InputEvent> &p_event, const StringName &p_action) const;
|
||||||
bool event_get_action_status(const Ref<InputEvent> &p_event, const StringName &p_action, bool *p_pressed = NULL, float *p_strength = NULL) const;
|
bool event_get_action_status(const Ref<InputEvent> &p_event, const StringName &p_action, bool *p_pressed = NULL, float *p_strength = NULL) const;
|
||||||
|
|
||||||
|
@ -107,7 +107,7 @@ bool ConfigFile::has_section_key(const String &p_section, const String &p_key) c
|
|||||||
|
|
||||||
void ConfigFile::get_sections(List<String> *r_sections) const {
|
void ConfigFile::get_sections(List<String> *r_sections) const {
|
||||||
|
|
||||||
for (OrderedHashMap<String, OrderedHashMap<String, Variant> >::ConstElement E = values.front(); E; E = E.next()) {
|
for (OrderedHashMap<String, OrderedHashMap<String, Variant>>::ConstElement E = values.front(); E; E = E.next()) {
|
||||||
r_sections->push_back(E.key());
|
r_sections->push_back(E.key());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -187,7 +187,7 @@ Error ConfigFile::save_encrypted_pass(const String &p_path, const String &p_pass
|
|||||||
|
|
||||||
Error ConfigFile::_internal_save(FileAccess *file) {
|
Error ConfigFile::_internal_save(FileAccess *file) {
|
||||||
|
|
||||||
for (OrderedHashMap<String, OrderedHashMap<String, Variant> >::Element E = values.front(); E; E = E.next()) {
|
for (OrderedHashMap<String, OrderedHashMap<String, Variant>>::Element E = values.front(); E; E = E.next()) {
|
||||||
|
|
||||||
if (E != values.front())
|
if (E != values.front())
|
||||||
file->store_string("\n");
|
file->store_string("\n");
|
||||||
|
@ -40,7 +40,7 @@ class ConfigFile : public Reference {
|
|||||||
|
|
||||||
GDCLASS(ConfigFile, Reference);
|
GDCLASS(ConfigFile, Reference);
|
||||||
|
|
||||||
OrderedHashMap<String, OrderedHashMap<String, Variant> > values;
|
OrderedHashMap<String, OrderedHashMap<String, Variant>> values;
|
||||||
|
|
||||||
PackedStringArray _get_sections() const;
|
PackedStringArray _get_sections() const;
|
||||||
PackedStringArray _get_section_keys(const String &p_section) const;
|
PackedStringArray _get_section_keys(const String &p_section) const;
|
||||||
|
@ -35,12 +35,12 @@
|
|||||||
#include "core/os/dir_access.h"
|
#include "core/os/dir_access.h"
|
||||||
#include "core/project_settings.h"
|
#include "core/project_settings.h"
|
||||||
|
|
||||||
static Map<String, Vector<uint8_t> > *files = NULL;
|
static Map<String, Vector<uint8_t>> *files = NULL;
|
||||||
|
|
||||||
void FileAccessMemory::register_file(String p_name, Vector<uint8_t> p_data) {
|
void FileAccessMemory::register_file(String p_name, Vector<uint8_t> p_data) {
|
||||||
|
|
||||||
if (!files) {
|
if (!files) {
|
||||||
files = memnew((Map<String, Vector<uint8_t> >));
|
files = memnew((Map<String, Vector<uint8_t>>));
|
||||||
}
|
}
|
||||||
|
|
||||||
String name;
|
String name;
|
||||||
@ -89,7 +89,7 @@ Error FileAccessMemory::_open(const String &p_path, int p_mode_flags) {
|
|||||||
String name = fix_path(p_path);
|
String name = fix_path(p_path);
|
||||||
//name = DirAccess::normalize_path(name);
|
//name = DirAccess::normalize_path(name);
|
||||||
|
|
||||||
Map<String, Vector<uint8_t> >::Element *E = files->find(name);
|
Map<String, Vector<uint8_t>>::Element *E = files->find(name);
|
||||||
ERR_FAIL_COND_V_MSG(!E, ERR_FILE_NOT_FOUND, "Can't find file '" + p_path + "'.");
|
ERR_FAIL_COND_V_MSG(!E, ERR_FILE_NOT_FOUND, "Can't find file '" + p_path + "'.");
|
||||||
|
|
||||||
data = E->get().ptrw();
|
data = E->get().ptrw();
|
||||||
|
@ -350,7 +350,7 @@ Error HTTPClient::poll() {
|
|||||||
handshaking = true;
|
handshaking = true;
|
||||||
} else {
|
} else {
|
||||||
// We are already handshaking, which means we can use your already active SSL connection
|
// We are already handshaking, which means we can use your already active SSL connection
|
||||||
ssl = static_cast<Ref<StreamPeerSSL> >(connection);
|
ssl = static_cast<Ref<StreamPeerSSL>>(connection);
|
||||||
if (ssl.is_null()) {
|
if (ssl.is_null()) {
|
||||||
close();
|
close();
|
||||||
status = STATUS_SSL_HANDSHAKE_ERROR;
|
status = STATUS_SSL_HANDSHAKE_ERROR;
|
||||||
|
@ -362,7 +362,7 @@ Ref<ResourceImporter> ResourceFormatImporter::get_importer_by_name(const String
|
|||||||
return Ref<ResourceImporter>();
|
return Ref<ResourceImporter>();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ResourceFormatImporter::get_importers_for_extension(const String &p_extension, List<Ref<ResourceImporter> > *r_importers) {
|
void ResourceFormatImporter::get_importers_for_extension(const String &p_extension, List<Ref<ResourceImporter>> *r_importers) {
|
||||||
|
|
||||||
for (int i = 0; i < importers.size(); i++) {
|
for (int i = 0; i < importers.size(); i++) {
|
||||||
List<String> local_exts;
|
List<String> local_exts;
|
||||||
@ -423,7 +423,7 @@ bool ResourceFormatImporter::are_import_settings_valid(const String &p_path) con
|
|||||||
|
|
||||||
String ResourceFormatImporter::get_import_settings_hash() const {
|
String ResourceFormatImporter::get_import_settings_hash() const {
|
||||||
|
|
||||||
Vector<Ref<ResourceImporter> > sorted_importers = importers;
|
Vector<Ref<ResourceImporter>> sorted_importers = importers;
|
||||||
|
|
||||||
sorted_importers.sort_custom<SortImporterByName>();
|
sorted_importers.sort_custom<SortImporterByName>();
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ class ResourceFormatImporter : public ResourceFormatLoader {
|
|||||||
bool operator()(const Ref<ResourceImporter> &p_a, const Ref<ResourceImporter> &p_b) const;
|
bool operator()(const Ref<ResourceImporter> &p_a, const Ref<ResourceImporter> &p_b) const;
|
||||||
};
|
};
|
||||||
|
|
||||||
Vector<Ref<ResourceImporter> > importers;
|
Vector<Ref<ResourceImporter>> importers;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static ResourceFormatImporter *get_singleton() { return singleton; }
|
static ResourceFormatImporter *get_singleton() { return singleton; }
|
||||||
@ -83,7 +83,7 @@ public:
|
|||||||
void remove_importer(const Ref<ResourceImporter> &p_importer) { importers.erase(p_importer); }
|
void remove_importer(const Ref<ResourceImporter> &p_importer) { importers.erase(p_importer); }
|
||||||
Ref<ResourceImporter> get_importer_by_name(const String &p_name) const;
|
Ref<ResourceImporter> get_importer_by_name(const String &p_name) const;
|
||||||
Ref<ResourceImporter> get_importer_by_extension(const String &p_extension) const;
|
Ref<ResourceImporter> get_importer_by_extension(const String &p_extension) const;
|
||||||
void get_importers_for_extension(const String &p_extension, List<Ref<ResourceImporter> > *r_importers);
|
void get_importers_for_extension(const String &p_extension, List<Ref<ResourceImporter>> *r_importers);
|
||||||
|
|
||||||
bool are_import_settings_valid(const String &p_path) const;
|
bool are_import_settings_valid(const String &p_path) const;
|
||||||
String get_import_settings_hash() const;
|
String get_import_settings_hash() const;
|
||||||
@ -125,7 +125,7 @@ public:
|
|||||||
|
|
||||||
virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL, Variant *r_metadata = NULL) = 0;
|
virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL, Variant *r_metadata = NULL) = 0;
|
||||||
|
|
||||||
virtual Error import_group_file(const String &p_group_file, const Map<String, Map<StringName, Variant> > &p_source_file_options, const Map<String, String> &p_base_paths) { return ERR_UNAVAILABLE; }
|
virtual Error import_group_file(const String &p_group_file, const Map<String, Map<StringName, Variant>> &p_source_file_options, const Map<String, String> &p_base_paths) { return ERR_UNAVAILABLE; }
|
||||||
virtual bool are_import_settings_valid(const String &p_path) const { return true; }
|
virtual bool are_import_settings_valid(const String &p_path) const { return true; }
|
||||||
virtual String get_import_settings_string() const { return String(); }
|
virtual String get_import_settings_string() const { return String(); }
|
||||||
};
|
};
|
||||||
|
@ -1113,7 +1113,7 @@ void ResourceLoader::add_custom_loaders() {
|
|||||||
|
|
||||||
void ResourceLoader::remove_custom_loaders() {
|
void ResourceLoader::remove_custom_loaders() {
|
||||||
|
|
||||||
Vector<Ref<ResourceFormatLoader> > custom_loaders;
|
Vector<Ref<ResourceFormatLoader>> custom_loaders;
|
||||||
for (int i = 0; i < loader_count; ++i) {
|
for (int i = 0; i < loader_count; ++i) {
|
||||||
if (loader[i]->get_script_instance()) {
|
if (loader[i]->get_script_instance()) {
|
||||||
custom_loaders.push_back(loader[i]);
|
custom_loaders.push_back(loader[i]);
|
||||||
@ -1159,7 +1159,7 @@ int ResourceLoader::thread_suspended_count = 0;
|
|||||||
int ResourceLoader::thread_load_max = 0;
|
int ResourceLoader::thread_load_max = 0;
|
||||||
|
|
||||||
SelfList<Resource>::List ResourceLoader::remapped_list;
|
SelfList<Resource>::List ResourceLoader::remapped_list;
|
||||||
HashMap<String, Vector<String> > ResourceLoader::translation_remaps;
|
HashMap<String, Vector<String>> ResourceLoader::translation_remaps;
|
||||||
HashMap<String, String> ResourceLoader::path_remaps;
|
HashMap<String, String> ResourceLoader::path_remaps;
|
||||||
|
|
||||||
ResourceLoaderImport ResourceLoader::import = NULL;
|
ResourceLoaderImport ResourceLoader::import = NULL;
|
||||||
|
@ -90,7 +90,7 @@ private:
|
|||||||
static void *dep_err_notify_ud;
|
static void *dep_err_notify_ud;
|
||||||
static DependencyErrorNotify dep_err_notify;
|
static DependencyErrorNotify dep_err_notify;
|
||||||
static bool abort_on_missing_resource;
|
static bool abort_on_missing_resource;
|
||||||
static HashMap<String, Vector<String> > translation_remaps;
|
static HashMap<String, Vector<String>> translation_remaps;
|
||||||
static HashMap<String, String> path_remaps;
|
static HashMap<String, String> path_remaps;
|
||||||
|
|
||||||
static String _path_remap(const String &p_path, bool *r_translation_remapped = NULL);
|
static String _path_remap(const String &p_path, bool *r_translation_remapped = NULL);
|
||||||
|
@ -256,7 +256,7 @@ void ResourceSaver::add_custom_savers() {
|
|||||||
|
|
||||||
void ResourceSaver::remove_custom_savers() {
|
void ResourceSaver::remove_custom_savers() {
|
||||||
|
|
||||||
Vector<Ref<ResourceFormatSaver> > custom_savers;
|
Vector<Ref<ResourceFormatSaver>> custom_savers;
|
||||||
for (int i = 0; i < saver_count; ++i) {
|
for (int i = 0; i < saver_count; ++i) {
|
||||||
if (saver[i]->get_script_instance()) {
|
if (saver[i]->get_script_instance()) {
|
||||||
custom_savers.push_back(saver[i]);
|
custom_savers.push_back(saver[i]);
|
||||||
|
@ -576,7 +576,7 @@ public:
|
|||||||
|
|
||||||
void sort() {
|
void sort() {
|
||||||
|
|
||||||
sort_custom<Comparator<T> >();
|
sort_custom<Comparator<T>>();
|
||||||
}
|
}
|
||||||
|
|
||||||
template <class C>
|
template <class C>
|
||||||
@ -657,7 +657,7 @@ public:
|
|||||||
idx++;
|
idx++;
|
||||||
}
|
}
|
||||||
|
|
||||||
SortArray<Element *, AuxiliaryComparator<C> > sort;
|
SortArray<Element *, AuxiliaryComparator<C>> sort;
|
||||||
sort.sort(aux_buffer, s);
|
sort.sort(aux_buffer, s);
|
||||||
|
|
||||||
_data->first = aux_buffer[0];
|
_data->first = aux_buffer[0];
|
||||||
|
@ -214,9 +214,9 @@ static bool _group_face(_FaceClassify *p_faces, int len, int p_index, int p_grou
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector<Vector<Face3> > Geometry::separate_objects(Vector<Face3> p_array) {
|
Vector<Vector<Face3>> Geometry::separate_objects(Vector<Face3> p_array) {
|
||||||
|
|
||||||
Vector<Vector<Face3> > objects;
|
Vector<Vector<Face3>> objects;
|
||||||
|
|
||||||
int len = p_array.size();
|
int len = p_array.size();
|
||||||
|
|
||||||
@ -235,7 +235,7 @@ Vector<Vector<Face3> > Geometry::separate_objects(Vector<Face3> p_array) {
|
|||||||
|
|
||||||
bool error = _connect_faces(_fcptr, len, -1);
|
bool error = _connect_faces(_fcptr, len, -1);
|
||||||
|
|
||||||
ERR_FAIL_COND_V_MSG(error, Vector<Vector<Face3> >(), "Invalid geometry.");
|
ERR_FAIL_COND_V_MSG(error, Vector<Vector<Face3>>(), "Invalid geometry.");
|
||||||
|
|
||||||
// Group connected faces in separate objects.
|
// Group connected faces in separate objects.
|
||||||
|
|
||||||
@ -679,8 +679,8 @@ Vector<Face3> Geometry::wrap_geometry(Vector<Face3> p_array, real_t *p_error) {
|
|||||||
return wrapped_faces;
|
return wrapped_faces;
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector<Vector<Vector2> > Geometry::decompose_polygon_in_convex(Vector<Point2> polygon) {
|
Vector<Vector<Vector2>> Geometry::decompose_polygon_in_convex(Vector<Point2> polygon) {
|
||||||
Vector<Vector<Vector2> > decomp;
|
Vector<Vector<Vector2>> decomp;
|
||||||
List<TriangulatorPoly> in_poly, out_poly;
|
List<TriangulatorPoly> in_poly, out_poly;
|
||||||
|
|
||||||
TriangulatorPoly inp;
|
TriangulatorPoly inp;
|
||||||
@ -1076,7 +1076,7 @@ void Geometry::make_atlas(const Vector<Size2i> &p_rects, Vector<Point2i> &r_resu
|
|||||||
r_size = Size2(results[best].max_w, results[best].max_h);
|
r_size = Size2(results[best].max_w, results[best].max_h);
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector<Vector<Point2> > Geometry::_polypaths_do_operation(PolyBooleanOperation p_op, const Vector<Point2> &p_polypath_a, const Vector<Point2> &p_polypath_b, bool is_a_open) {
|
Vector<Vector<Point2>> Geometry::_polypaths_do_operation(PolyBooleanOperation p_op, const Vector<Point2> &p_polypath_a, const Vector<Point2> &p_polypath_b, bool is_a_open) {
|
||||||
|
|
||||||
using namespace ClipperLib;
|
using namespace ClipperLib;
|
||||||
|
|
||||||
@ -1111,7 +1111,7 @@ Vector<Vector<Point2> > Geometry::_polypaths_do_operation(PolyBooleanOperation p
|
|||||||
clp.Execute(op, paths); // Works on closed polygons only.
|
clp.Execute(op, paths); // Works on closed polygons only.
|
||||||
}
|
}
|
||||||
// Have to scale points down now.
|
// Have to scale points down now.
|
||||||
Vector<Vector<Point2> > polypaths;
|
Vector<Vector<Point2>> polypaths;
|
||||||
|
|
||||||
for (Paths::size_type i = 0; i < paths.size(); ++i) {
|
for (Paths::size_type i = 0; i < paths.size(); ++i) {
|
||||||
Vector<Vector2> polypath;
|
Vector<Vector2> polypath;
|
||||||
@ -1128,7 +1128,7 @@ Vector<Vector<Point2> > Geometry::_polypaths_do_operation(PolyBooleanOperation p
|
|||||||
return polypaths;
|
return polypaths;
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector<Vector<Point2> > Geometry::_polypath_offset(const Vector<Point2> &p_polypath, real_t p_delta, PolyJoinType p_join_type, PolyEndType p_end_type) {
|
Vector<Vector<Point2>> Geometry::_polypath_offset(const Vector<Point2> &p_polypath, real_t p_delta, PolyJoinType p_join_type, PolyEndType p_end_type) {
|
||||||
|
|
||||||
using namespace ClipperLib;
|
using namespace ClipperLib;
|
||||||
|
|
||||||
@ -1162,7 +1162,7 @@ Vector<Vector<Point2> > Geometry::_polypath_offset(const Vector<Point2> &p_polyp
|
|||||||
co.Execute(paths, p_delta * SCALE_FACTOR); // Inflate/deflate.
|
co.Execute(paths, p_delta * SCALE_FACTOR); // Inflate/deflate.
|
||||||
|
|
||||||
// Have to scale points down now.
|
// Have to scale points down now.
|
||||||
Vector<Vector<Point2> > polypaths;
|
Vector<Vector<Point2>> polypaths;
|
||||||
|
|
||||||
for (Paths::size_type i = 0; i < paths.size(); ++i) {
|
for (Paths::size_type i = 0; i < paths.size(); ++i) {
|
||||||
Vector<Vector2> polypath;
|
Vector<Vector2> polypath;
|
||||||
|
@ -790,44 +790,44 @@ public:
|
|||||||
END_ROUND
|
END_ROUND
|
||||||
};
|
};
|
||||||
|
|
||||||
static Vector<Vector<Point2> > merge_polygons_2d(const Vector<Point2> &p_polygon_a, const Vector<Point2> &p_polygon_b) {
|
static Vector<Vector<Point2>> merge_polygons_2d(const Vector<Point2> &p_polygon_a, const Vector<Point2> &p_polygon_b) {
|
||||||
|
|
||||||
return _polypaths_do_operation(OPERATION_UNION, p_polygon_a, p_polygon_b);
|
return _polypaths_do_operation(OPERATION_UNION, p_polygon_a, p_polygon_b);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Vector<Vector<Point2> > clip_polygons_2d(const Vector<Point2> &p_polygon_a, const Vector<Point2> &p_polygon_b) {
|
static Vector<Vector<Point2>> clip_polygons_2d(const Vector<Point2> &p_polygon_a, const Vector<Point2> &p_polygon_b) {
|
||||||
|
|
||||||
return _polypaths_do_operation(OPERATION_DIFFERENCE, p_polygon_a, p_polygon_b);
|
return _polypaths_do_operation(OPERATION_DIFFERENCE, p_polygon_a, p_polygon_b);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Vector<Vector<Point2> > intersect_polygons_2d(const Vector<Point2> &p_polygon_a, const Vector<Point2> &p_polygon_b) {
|
static Vector<Vector<Point2>> intersect_polygons_2d(const Vector<Point2> &p_polygon_a, const Vector<Point2> &p_polygon_b) {
|
||||||
|
|
||||||
return _polypaths_do_operation(OPERATION_INTERSECTION, p_polygon_a, p_polygon_b);
|
return _polypaths_do_operation(OPERATION_INTERSECTION, p_polygon_a, p_polygon_b);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Vector<Vector<Point2> > exclude_polygons_2d(const Vector<Point2> &p_polygon_a, const Vector<Point2> &p_polygon_b) {
|
static Vector<Vector<Point2>> exclude_polygons_2d(const Vector<Point2> &p_polygon_a, const Vector<Point2> &p_polygon_b) {
|
||||||
|
|
||||||
return _polypaths_do_operation(OPERATION_XOR, p_polygon_a, p_polygon_b);
|
return _polypaths_do_operation(OPERATION_XOR, p_polygon_a, p_polygon_b);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Vector<Vector<Point2> > clip_polyline_with_polygon_2d(const Vector<Vector2> &p_polyline, const Vector<Vector2> &p_polygon) {
|
static Vector<Vector<Point2>> clip_polyline_with_polygon_2d(const Vector<Vector2> &p_polyline, const Vector<Vector2> &p_polygon) {
|
||||||
|
|
||||||
return _polypaths_do_operation(OPERATION_DIFFERENCE, p_polyline, p_polygon, true);
|
return _polypaths_do_operation(OPERATION_DIFFERENCE, p_polyline, p_polygon, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Vector<Vector<Point2> > intersect_polyline_with_polygon_2d(const Vector<Vector2> &p_polyline, const Vector<Vector2> &p_polygon) {
|
static Vector<Vector<Point2>> intersect_polyline_with_polygon_2d(const Vector<Vector2> &p_polyline, const Vector<Vector2> &p_polygon) {
|
||||||
|
|
||||||
return _polypaths_do_operation(OPERATION_INTERSECTION, p_polyline, p_polygon, true);
|
return _polypaths_do_operation(OPERATION_INTERSECTION, p_polyline, p_polygon, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Vector<Vector<Point2> > offset_polygon_2d(const Vector<Vector2> &p_polygon, real_t p_delta, PolyJoinType p_join_type) {
|
static Vector<Vector<Point2>> offset_polygon_2d(const Vector<Vector2> &p_polygon, real_t p_delta, PolyJoinType p_join_type) {
|
||||||
|
|
||||||
return _polypath_offset(p_polygon, p_delta, p_join_type, END_POLYGON);
|
return _polypath_offset(p_polygon, p_delta, p_join_type, END_POLYGON);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Vector<Vector<Point2> > offset_polyline_2d(const Vector<Vector2> &p_polygon, real_t p_delta, PolyJoinType p_join_type, PolyEndType p_end_type) {
|
static Vector<Vector<Point2>> offset_polyline_2d(const Vector<Vector2> &p_polygon, real_t p_delta, PolyJoinType p_join_type, PolyEndType p_end_type) {
|
||||||
|
|
||||||
ERR_FAIL_COND_V_MSG(p_end_type == END_POLYGON, Vector<Vector<Point2> >(), "Attempt to offset a polyline like a polygon (use offset_polygon_2d instead).");
|
ERR_FAIL_COND_V_MSG(p_end_type == END_POLYGON, Vector<Vector<Point2>>(), "Attempt to offset a polyline like a polygon (use offset_polygon_2d instead).");
|
||||||
|
|
||||||
return _polypath_offset(p_polygon, p_delta, p_join_type, p_end_type);
|
return _polypath_offset(p_polygon, p_delta, p_join_type, p_end_type);
|
||||||
}
|
}
|
||||||
@ -899,7 +899,7 @@ public:
|
|||||||
return (intersections & 1);
|
return (intersections & 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
static Vector<Vector<Face3> > separate_objects(Vector<Face3> p_array);
|
static Vector<Vector<Face3>> separate_objects(Vector<Face3> p_array);
|
||||||
|
|
||||||
// Create a "wrap" that encloses the given geometry.
|
// Create a "wrap" that encloses the given geometry.
|
||||||
static Vector<Face3> wrap_geometry(Vector<Face3> p_array, real_t *p_error = NULL);
|
static Vector<Face3> wrap_geometry(Vector<Face3> p_array, real_t *p_error = NULL);
|
||||||
@ -1004,7 +1004,7 @@ public:
|
|||||||
H.resize(k);
|
H.resize(k);
|
||||||
return H;
|
return H;
|
||||||
}
|
}
|
||||||
static Vector<Vector<Vector2> > decompose_polygon_in_convex(Vector<Point2> polygon);
|
static Vector<Vector<Vector2>> decompose_polygon_in_convex(Vector<Point2> polygon);
|
||||||
|
|
||||||
static MeshData build_convex_mesh(const Vector<Plane> &p_planes);
|
static MeshData build_convex_mesh(const Vector<Plane> &p_planes);
|
||||||
static Vector<Plane> build_sphere_planes(real_t p_radius, int p_lats, int p_lons, Vector3::Axis p_axis = Vector3::AXIS_Z);
|
static Vector<Plane> build_sphere_planes(real_t p_radius, int p_lats, int p_lons, Vector3::Axis p_axis = Vector3::AXIS_Z);
|
||||||
@ -1015,8 +1015,8 @@ public:
|
|||||||
static void make_atlas(const Vector<Size2i> &p_rects, Vector<Point2i> &r_result, Size2i &r_size);
|
static void make_atlas(const Vector<Size2i> &p_rects, Vector<Point2i> &r_result, Size2i &r_size);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
static Vector<Vector<Point2> > _polypaths_do_operation(PolyBooleanOperation p_op, const Vector<Point2> &p_polypath_a, const Vector<Point2> &p_polypath_b, bool is_a_open = false);
|
static Vector<Vector<Point2>> _polypaths_do_operation(PolyBooleanOperation p_op, const Vector<Point2> &p_polypath_a, const Vector<Point2> &p_polypath_b, bool is_a_open = false);
|
||||||
static Vector<Vector<Point2> > _polypath_offset(const Vector<Point2> &p_polypath, real_t p_delta, PolyJoinType p_join_type, PolyEndType p_end_type);
|
static Vector<Vector<Point2>> _polypath_offset(const Vector<Point2> &p_polypath, real_t p_delta, PolyJoinType p_join_type, PolyEndType p_end_type);
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -192,7 +192,7 @@ struct PtrToArg<ObjectID> {
|
|||||||
|
|
||||||
#define MAKE_VECARG(m_type) \
|
#define MAKE_VECARG(m_type) \
|
||||||
template <> \
|
template <> \
|
||||||
struct PtrToArg<Vector<m_type> > { \
|
struct PtrToArg<Vector<m_type>> { \
|
||||||
_FORCE_INLINE_ static Vector<m_type> convert(const void *p_ptr) { \
|
_FORCE_INLINE_ static Vector<m_type> convert(const void *p_ptr) { \
|
||||||
const Vector<m_type> *dvs = reinterpret_cast<const Vector<m_type> *>(p_ptr); \
|
const Vector<m_type> *dvs = reinterpret_cast<const Vector<m_type> *>(p_ptr); \
|
||||||
Vector<m_type> ret; \
|
Vector<m_type> ret; \
|
||||||
@ -237,7 +237,7 @@ struct PtrToArg<ObjectID> {
|
|||||||
|
|
||||||
#define MAKE_VECARG_ALT(m_type, m_type_alt) \
|
#define MAKE_VECARG_ALT(m_type, m_type_alt) \
|
||||||
template <> \
|
template <> \
|
||||||
struct PtrToArg<Vector<m_type_alt> > { \
|
struct PtrToArg<Vector<m_type_alt>> { \
|
||||||
_FORCE_INLINE_ static Vector<m_type_alt> convert(const void *p_ptr) { \
|
_FORCE_INLINE_ static Vector<m_type_alt> convert(const void *p_ptr) { \
|
||||||
const Vector<m_type> *dvs = reinterpret_cast<const Vector<m_type> *>(p_ptr); \
|
const Vector<m_type> *dvs = reinterpret_cast<const Vector<m_type> *>(p_ptr); \
|
||||||
Vector<m_type_alt> ret; \
|
Vector<m_type_alt> ret; \
|
||||||
@ -293,7 +293,7 @@ MAKE_VECARG_ALT(String, StringName);
|
|||||||
//for stuff that gets converted to Array vectors
|
//for stuff that gets converted to Array vectors
|
||||||
#define MAKE_VECARR(m_type) \
|
#define MAKE_VECARR(m_type) \
|
||||||
template <> \
|
template <> \
|
||||||
struct PtrToArg<Vector<m_type> > { \
|
struct PtrToArg<Vector<m_type>> { \
|
||||||
_FORCE_INLINE_ static Vector<m_type> convert(const void *p_ptr) { \
|
_FORCE_INLINE_ static Vector<m_type> convert(const void *p_ptr) { \
|
||||||
const Array *arr = reinterpret_cast<const Array *>(p_ptr); \
|
const Array *arr = reinterpret_cast<const Array *>(p_ptr); \
|
||||||
Vector<m_type> ret; \
|
Vector<m_type> ret; \
|
||||||
@ -333,7 +333,7 @@ MAKE_VECARR(Plane);
|
|||||||
|
|
||||||
#define MAKE_DVECARR(m_type) \
|
#define MAKE_DVECARR(m_type) \
|
||||||
template <> \
|
template <> \
|
||||||
struct PtrToArg<Vector<m_type> > { \
|
struct PtrToArg<Vector<m_type>> { \
|
||||||
_FORCE_INLINE_ static Vector<m_type> convert(const void *p_ptr) { \
|
_FORCE_INLINE_ static Vector<m_type> convert(const void *p_ptr) { \
|
||||||
const Array *arr = reinterpret_cast<const Array *>(p_ptr); \
|
const Array *arr = reinterpret_cast<const Array *>(p_ptr); \
|
||||||
Vector<m_type> ret; \
|
Vector<m_type> ret; \
|
||||||
@ -402,7 +402,7 @@ MAKE_VECARR(Plane);
|
|||||||
MAKE_STRINGCONV_BY_REFERENCE(IP_Address);
|
MAKE_STRINGCONV_BY_REFERENCE(IP_Address);
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
struct PtrToArg<Vector<Face3> > {
|
struct PtrToArg<Vector<Face3>> {
|
||||||
_FORCE_INLINE_ static Vector<Face3> convert(const void *p_ptr) {
|
_FORCE_INLINE_ static Vector<Face3> convert(const void *p_ptr) {
|
||||||
const Vector<Vector3> *dvs = reinterpret_cast<const Vector<Vector3> *>(p_ptr);
|
const Vector<Vector3> *dvs = reinterpret_cast<const Vector<Vector3> *>(p_ptr);
|
||||||
Vector<Face3> ret;
|
Vector<Face3> ret;
|
||||||
|
@ -48,7 +48,7 @@
|
|||||||
*/
|
*/
|
||||||
template <class TKey, class TValue,
|
template <class TKey, class TValue,
|
||||||
class Hasher = HashMapHasherDefault,
|
class Hasher = HashMapHasherDefault,
|
||||||
class Comparator = HashMapComparatorDefault<TKey> >
|
class Comparator = HashMapComparatorDefault<TKey>>
|
||||||
class OAHashMap {
|
class OAHashMap {
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
*/
|
*/
|
||||||
template <class K, class V, class Hasher = HashMapHasherDefault, class Comparator = HashMapComparatorDefault<K>, uint8_t MIN_HASH_TABLE_POWER = 3, uint8_t RELATIONSHIP = 8>
|
template <class K, class V, class Hasher = HashMapHasherDefault, class Comparator = HashMapComparatorDefault<K>, uint8_t MIN_HASH_TABLE_POWER = 3, uint8_t RELATIONSHIP = 8>
|
||||||
class OrderedHashMap {
|
class OrderedHashMap {
|
||||||
typedef List<Pair<const K *, V> > InternalList;
|
typedef List<Pair<const K *, V>> InternalList;
|
||||||
typedef HashMap<K, typename InternalList::Element *, Hasher, Comparator, MIN_HASH_TABLE_POWER, RELATIONSHIP> InternalMap;
|
typedef HashMap<K, typename InternalList::Element *, Hasher, Comparator, MIN_HASH_TABLE_POWER, RELATIONSHIP> InternalMap;
|
||||||
|
|
||||||
InternalList list;
|
InternalList list;
|
||||||
|
@ -44,7 +44,7 @@ void _global_unlock() {
|
|||||||
|
|
||||||
template class MutexImpl<std::recursive_mutex>;
|
template class MutexImpl<std::recursive_mutex>;
|
||||||
template class MutexImpl<std::mutex>;
|
template class MutexImpl<std::mutex>;
|
||||||
template class MutexLock<MutexImpl<std::recursive_mutex> >;
|
template class MutexLock<MutexImpl<std::recursive_mutex>>;
|
||||||
template class MutexLock<MutexImpl<std::mutex> >;
|
template class MutexLock<MutexImpl<std::mutex>>;
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -76,8 +76,8 @@ using BinaryMutex = MutexImpl<std::mutex>; // Non-recursive, handle with care
|
|||||||
|
|
||||||
extern template class MutexImpl<std::recursive_mutex>;
|
extern template class MutexImpl<std::recursive_mutex>;
|
||||||
extern template class MutexImpl<std::mutex>;
|
extern template class MutexImpl<std::mutex>;
|
||||||
extern template class MutexLock<MutexImpl<std::recursive_mutex> >;
|
extern template class MutexLock<MutexImpl<std::recursive_mutex>>;
|
||||||
extern template class MutexLock<MutexImpl<std::mutex> >;
|
extern template class MutexLock<MutexImpl<std::mutex>>;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
@ -80,7 +80,7 @@ void thread_process_array(uint32_t p_elements, C *p_instance, M p_method, U p_us
|
|||||||
threads.resize(OS::get_singleton()->get_processor_count());
|
threads.resize(OS::get_singleton()->get_processor_count());
|
||||||
|
|
||||||
for (int i = 0; i < threads.size(); i++) {
|
for (int i = 0; i < threads.size(); i++) {
|
||||||
threads.write[i] = Thread::create(process_array_thread<ThreadArrayProcessData<C, U> >, &data);
|
threads.write[i] = Thread::create(process_array_thread<ThreadArrayProcessData<C, U>>, &data);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int i = 0; i < threads.size(); i++) {
|
for (int i = 0; i < threads.size(); i++) {
|
||||||
|
@ -652,7 +652,7 @@ Error ProjectSettings::save() {
|
|||||||
return save_custom(get_resource_path().plus_file("project.godot"));
|
return save_custom(get_resource_path().plus_file("project.godot"));
|
||||||
}
|
}
|
||||||
|
|
||||||
Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<String, List<String> > &props, const CustomMap &p_custom, const String &p_custom_features) {
|
Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<String, List<String>> &props, const CustomMap &p_custom, const String &p_custom_features) {
|
||||||
|
|
||||||
Error err;
|
Error err;
|
||||||
FileAccess *file = FileAccess::open(p_file, FileAccess::WRITE, &err);
|
FileAccess *file = FileAccess::open(p_file, FileAccess::WRITE, &err);
|
||||||
@ -663,7 +663,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str
|
|||||||
|
|
||||||
int count = 0;
|
int count = 0;
|
||||||
|
|
||||||
for (Map<String, List<String> >::Element *E = props.front(); E; E = E->next()) {
|
for (Map<String, List<String>>::Element *E = props.front(); E; E = E->next()) {
|
||||||
|
|
||||||
for (List<String>::Element *F = E->get().front(); F; F = F->next()) {
|
for (List<String>::Element *F = E->get().front(); F; F = F->next()) {
|
||||||
|
|
||||||
@ -700,7 +700,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str
|
|||||||
file->store_32(count); //store how many properties are saved
|
file->store_32(count); //store how many properties are saved
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Map<String, List<String> >::Element *E = props.front(); E; E = E->next()) {
|
for (Map<String, List<String>>::Element *E = props.front(); E; E = E->next()) {
|
||||||
|
|
||||||
for (List<String>::Element *F = E->get().front(); F; F = F->next()) {
|
for (List<String>::Element *F = E->get().front(); F; F = F->next()) {
|
||||||
|
|
||||||
@ -740,7 +740,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
Error ProjectSettings::_save_settings_text(const String &p_file, const Map<String, List<String> > &props, const CustomMap &p_custom, const String &p_custom_features) {
|
Error ProjectSettings::_save_settings_text(const String &p_file, const Map<String, List<String>> &props, const CustomMap &p_custom, const String &p_custom_features) {
|
||||||
|
|
||||||
Error err;
|
Error err;
|
||||||
FileAccess *file = FileAccess::open(p_file, FileAccess::WRITE, &err);
|
FileAccess *file = FileAccess::open(p_file, FileAccess::WRITE, &err);
|
||||||
@ -761,7 +761,7 @@ Error ProjectSettings::_save_settings_text(const String &p_file, const Map<Strin
|
|||||||
file->store_string("custom_features=\"" + p_custom_features + "\"\n");
|
file->store_string("custom_features=\"" + p_custom_features + "\"\n");
|
||||||
file->store_string("\n");
|
file->store_string("\n");
|
||||||
|
|
||||||
for (Map<String, List<String> >::Element *E = props.front(); E; E = E->next()) {
|
for (Map<String, List<String>>::Element *E = props.front(); E; E = E->next()) {
|
||||||
|
|
||||||
if (E != props.front())
|
if (E != props.front())
|
||||||
file->store_string("\n");
|
file->store_string("\n");
|
||||||
@ -838,7 +838,7 @@ Error ProjectSettings::save_custom(const String &p_path, const CustomMap &p_cust
|
|||||||
vclist.insert(vc);
|
vclist.insert(vc);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, List<String> > props;
|
Map<String, List<String>> props;
|
||||||
|
|
||||||
for (Set<_VCSort>::Element *E = vclist.front(); E; E = E->next()) {
|
for (Set<_VCSort>::Element *E = vclist.front(); E; E = E->next()) {
|
||||||
|
|
||||||
|
@ -97,8 +97,8 @@ protected:
|
|||||||
Error _load_settings_binary(const String &p_path);
|
Error _load_settings_binary(const String &p_path);
|
||||||
Error _load_settings_text_or_binary(const String &p_text_path, const String &p_bin_path);
|
Error _load_settings_text_or_binary(const String &p_text_path, const String &p_bin_path);
|
||||||
|
|
||||||
Error _save_settings_text(const String &p_file, const Map<String, List<String> > &props, const CustomMap &p_custom = CustomMap(), const String &p_custom_features = String());
|
Error _save_settings_text(const String &p_file, const Map<String, List<String>> &props, const CustomMap &p_custom = CustomMap(), const String &p_custom_features = String());
|
||||||
Error _save_settings_binary(const String &p_file, const Map<String, List<String> > &props, const CustomMap &p_custom = CustomMap(), const String &p_custom_features = String());
|
Error _save_settings_binary(const String &p_file, const Map<String, List<String>> &props, const CustomMap &p_custom = CustomMap(), const String &p_custom_features = String());
|
||||||
|
|
||||||
Error _save_custom_bnd(const String &p_file);
|
Error _save_custom_bnd(const String &p_file);
|
||||||
|
|
||||||
|
@ -285,7 +285,7 @@ public:
|
|||||||
#ifdef PTRCALL_ENABLED
|
#ifdef PTRCALL_ENABLED
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
struct PtrToArg<Ref<T> > {
|
struct PtrToArg<Ref<T>> {
|
||||||
|
|
||||||
_FORCE_INLINE_ static Ref<T> convert(const void *p_ptr) {
|
_FORCE_INLINE_ static Ref<T> convert(const void *p_ptr) {
|
||||||
|
|
||||||
@ -312,7 +312,7 @@ struct PtrToArg<const Ref<T> &> {
|
|||||||
#ifdef DEBUG_METHODS_ENABLED
|
#ifdef DEBUG_METHODS_ENABLED
|
||||||
|
|
||||||
template <class T>
|
template <class T>
|
||||||
struct GetTypeInfo<Ref<T> > {
|
struct GetTypeInfo<Ref<T>> {
|
||||||
static const Variant::Type VARIANT_TYPE = Variant::OBJECT;
|
static const Variant::Type VARIANT_TYPE = Variant::OBJECT;
|
||||||
static const GodotTypeInfo::Metadata METADATA = GodotTypeInfo::METADATA_NONE;
|
static const GodotTypeInfo::Metadata METADATA = GodotTypeInfo::METADATA_NONE;
|
||||||
|
|
||||||
|
@ -149,7 +149,7 @@ void Resource::reload_from_file() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Ref<Resource> Resource::duplicate_for_local_scene(Node *p_for_scene, Map<Ref<Resource>, Ref<Resource> > &remap_cache) {
|
Ref<Resource> Resource::duplicate_for_local_scene(Node *p_for_scene, Map<Ref<Resource>, Ref<Resource>> &remap_cache) {
|
||||||
|
|
||||||
List<PropertyInfo> plist;
|
List<PropertyInfo> plist;
|
||||||
get_property_list(&plist);
|
get_property_list(&plist);
|
||||||
@ -190,7 +190,7 @@ Ref<Resource> Resource::duplicate_for_local_scene(Node *p_for_scene, Map<Ref<Res
|
|||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Resource::configure_for_local_scene(Node *p_for_scene, Map<Ref<Resource>, Ref<Resource> > &remap_cache) {
|
void Resource::configure_for_local_scene(Node *p_for_scene, Map<Ref<Resource>, Ref<Resource>> &remap_cache) {
|
||||||
|
|
||||||
List<PropertyInfo> plist;
|
List<PropertyInfo> plist;
|
||||||
get_property_list(&plist);
|
get_property_list(&plist);
|
||||||
@ -455,7 +455,7 @@ Resource::~Resource() {
|
|||||||
|
|
||||||
HashMap<String, Resource *> ResourceCache::resources;
|
HashMap<String, Resource *> ResourceCache::resources;
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
HashMap<String, HashMap<String, int> > ResourceCache::resource_path_cache;
|
HashMap<String, HashMap<String, int>> ResourceCache::resource_path_cache;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
RWLock *ResourceCache::lock = NULL;
|
RWLock *ResourceCache::lock = NULL;
|
||||||
@ -512,7 +512,7 @@ Resource *ResourceCache::get(const String &p_path) {
|
|||||||
return *res;
|
return *res;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ResourceCache::get_cached_resources(List<Ref<Resource> > *p_resources) {
|
void ResourceCache::get_cached_resources(List<Ref<Resource>> *p_resources) {
|
||||||
|
|
||||||
lock->read_lock();
|
lock->read_lock();
|
||||||
const String *K = NULL;
|
const String *K = NULL;
|
||||||
|
@ -103,8 +103,8 @@ public:
|
|||||||
int get_subindex() const;
|
int get_subindex() const;
|
||||||
|
|
||||||
virtual Ref<Resource> duplicate(bool p_subresources = false) const;
|
virtual Ref<Resource> duplicate(bool p_subresources = false) const;
|
||||||
Ref<Resource> duplicate_for_local_scene(Node *p_for_scene, Map<Ref<Resource>, Ref<Resource> > &remap_cache);
|
Ref<Resource> duplicate_for_local_scene(Node *p_for_scene, Map<Ref<Resource>, Ref<Resource>> &remap_cache);
|
||||||
void configure_for_local_scene(Node *p_for_scene, Map<Ref<Resource>, Ref<Resource> > &remap_cache);
|
void configure_for_local_scene(Node *p_for_scene, Map<Ref<Resource>, Ref<Resource>> &remap_cache);
|
||||||
|
|
||||||
void set_local_to_scene(bool p_enable);
|
void set_local_to_scene(bool p_enable);
|
||||||
bool is_local_to_scene() const;
|
bool is_local_to_scene() const;
|
||||||
@ -150,7 +150,7 @@ class ResourceCache {
|
|||||||
static RWLock *lock;
|
static RWLock *lock;
|
||||||
static HashMap<String, Resource *> resources;
|
static HashMap<String, Resource *> resources;
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
static HashMap<String, HashMap<String, int> > resource_path_cache; // each tscn has a set of resource paths and IDs
|
static HashMap<String, HashMap<String, int>> resource_path_cache; // each tscn has a set of resource paths and IDs
|
||||||
static RWLock *path_cache_lock;
|
static RWLock *path_cache_lock;
|
||||||
#endif // TOOLS_ENABLED
|
#endif // TOOLS_ENABLED
|
||||||
friend void unregister_core_types();
|
friend void unregister_core_types();
|
||||||
@ -163,7 +163,7 @@ public:
|
|||||||
static bool has(const String &p_path);
|
static bool has(const String &p_path);
|
||||||
static Resource *get(const String &p_path);
|
static Resource *get(const String &p_path);
|
||||||
static void dump(const char *p_file = NULL, bool p_short = false);
|
static void dump(const char *p_file = NULL, bool p_short = false);
|
||||||
static void get_cached_resources(List<Ref<Resource> > *p_resources);
|
static void get_cached_resources(List<Ref<Resource>> *p_resources);
|
||||||
static int get_cached_resource_count();
|
static int get_cached_resource_count();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -284,7 +284,7 @@ void ScriptServer::save_global_classes() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
////////////////////
|
////////////////////
|
||||||
void ScriptInstance::get_property_state(List<Pair<StringName, Variant> > &state) {
|
void ScriptInstance::get_property_state(List<Pair<StringName, Variant>> &state) {
|
||||||
|
|
||||||
List<PropertyInfo> pinfo;
|
List<PropertyInfo> pinfo;
|
||||||
get_property_list(&pinfo);
|
get_property_list(&pinfo);
|
||||||
|
@ -192,7 +192,7 @@ public:
|
|||||||
virtual Variant::Type get_property_type(const StringName &p_name, bool *r_is_valid = NULL) const = 0;
|
virtual Variant::Type get_property_type(const StringName &p_name, bool *r_is_valid = NULL) const = 0;
|
||||||
|
|
||||||
virtual Object *get_owner() { return NULL; }
|
virtual Object *get_owner() { return NULL; }
|
||||||
virtual void get_property_state(List<Pair<StringName, Variant> > &state);
|
virtual void get_property_state(List<Pair<StringName, Variant>> &state);
|
||||||
|
|
||||||
virtual void get_method_list(List<MethodInfo> *p_list) const = 0;
|
virtual void get_method_list(List<MethodInfo> *p_list) const = 0;
|
||||||
virtual bool has_method(const StringName &p_method) const = 0;
|
virtual bool has_method(const StringName &p_method) const = 0;
|
||||||
@ -375,7 +375,7 @@ public:
|
|||||||
|
|
||||||
virtual void get_recognized_extensions(List<String> *p_extensions) const = 0;
|
virtual void get_recognized_extensions(List<String> *p_extensions) const = 0;
|
||||||
virtual void get_public_functions(List<MethodInfo> *p_functions) const = 0;
|
virtual void get_public_functions(List<MethodInfo> *p_functions) const = 0;
|
||||||
virtual void get_public_constants(List<Pair<String, Variant> > *p_constants) const = 0;
|
virtual void get_public_constants(List<Pair<String, Variant>> *p_constants) const = 0;
|
||||||
|
|
||||||
struct ProfilingInfo {
|
struct ProfilingInfo {
|
||||||
StringName signature;
|
StringName signature;
|
||||||
|
@ -995,7 +995,7 @@ String TranslationServer::get_locale_name(const String &p_locale) const {
|
|||||||
|
|
||||||
Array TranslationServer::get_loaded_locales() const {
|
Array TranslationServer::get_loaded_locales() const {
|
||||||
Array locales;
|
Array locales;
|
||||||
for (const Set<Ref<Translation> >::Element *E = translations.front(); E; E = E->next()) {
|
for (const Set<Ref<Translation>>::Element *E = translations.front(); E; E = E->next()) {
|
||||||
|
|
||||||
const Ref<Translation> &t = E->get();
|
const Ref<Translation> &t = E->get();
|
||||||
ERR_FAIL_COND_V(t.is_null(), Array());
|
ERR_FAIL_COND_V(t.is_null(), Array());
|
||||||
@ -1072,7 +1072,7 @@ StringName TranslationServer::translate(const StringName &p_message) const {
|
|||||||
String lang = get_language_code(locale);
|
String lang = get_language_code(locale);
|
||||||
bool near_match = false;
|
bool near_match = false;
|
||||||
|
|
||||||
for (const Set<Ref<Translation> >::Element *E = translations.front(); E; E = E->next()) {
|
for (const Set<Ref<Translation>>::Element *E = translations.front(); E; E = E->next()) {
|
||||||
const Ref<Translation> &t = E->get();
|
const Ref<Translation> &t = E->get();
|
||||||
ERR_FAIL_COND_V(t.is_null(), p_message);
|
ERR_FAIL_COND_V(t.is_null(), p_message);
|
||||||
String l = t->get_locale();
|
String l = t->get_locale();
|
||||||
@ -1105,7 +1105,7 @@ StringName TranslationServer::translate(const StringName &p_message) const {
|
|||||||
String fallback_lang = get_language_code(fallback);
|
String fallback_lang = get_language_code(fallback);
|
||||||
near_match = false;
|
near_match = false;
|
||||||
|
|
||||||
for (const Set<Ref<Translation> >::Element *E = translations.front(); E; E = E->next()) {
|
for (const Set<Ref<Translation>>::Element *E = translations.front(); E; E = E->next()) {
|
||||||
const Ref<Translation> &t = E->get();
|
const Ref<Translation> &t = E->get();
|
||||||
ERR_FAIL_COND_V(t.is_null(), p_message);
|
ERR_FAIL_COND_V(t.is_null(), p_message);
|
||||||
String l = t->get_locale();
|
String l = t->get_locale();
|
||||||
|
@ -71,7 +71,7 @@ class TranslationServer : public Object {
|
|||||||
String locale;
|
String locale;
|
||||||
String fallback;
|
String fallback;
|
||||||
|
|
||||||
Set<Ref<Translation> > translations;
|
Set<Ref<Translation>> translations;
|
||||||
Ref<Translation> tool_translation;
|
Ref<Translation> tool_translation;
|
||||||
|
|
||||||
Map<String, String> locale_name_map;
|
Map<String, String> locale_name_map;
|
||||||
|
@ -201,7 +201,7 @@ struct GetTypeInfo<const Variant &> {
|
|||||||
|
|
||||||
#define MAKE_TEMPLATE_TYPE_INFO(m_template, m_type, m_var_type) \
|
#define MAKE_TEMPLATE_TYPE_INFO(m_template, m_type, m_var_type) \
|
||||||
template <> \
|
template <> \
|
||||||
struct GetTypeInfo<m_template<m_type> > { \
|
struct GetTypeInfo<m_template<m_type>> { \
|
||||||
static const Variant::Type VARIANT_TYPE = m_var_type; \
|
static const Variant::Type VARIANT_TYPE = m_var_type; \
|
||||||
static const GodotTypeInfo::Metadata METADATA = GodotTypeInfo::METADATA_NONE; \
|
static const GodotTypeInfo::Metadata METADATA = GodotTypeInfo::METADATA_NONE; \
|
||||||
static inline PropertyInfo get_class_info() { \
|
static inline PropertyInfo get_class_info() { \
|
||||||
|
@ -2325,31 +2325,31 @@ inline DA _convert_array_from_variant(const Variant &p_variant) {
|
|||||||
return _convert_array<DA, Array>(p_variant.operator Array());
|
return _convert_array<DA, Array>(p_variant.operator Array());
|
||||||
}
|
}
|
||||||
case Variant::PACKED_BYTE_ARRAY: {
|
case Variant::PACKED_BYTE_ARRAY: {
|
||||||
return _convert_array<DA, Vector<uint8_t> >(p_variant.operator Vector<uint8_t>());
|
return _convert_array<DA, Vector<uint8_t>>(p_variant.operator Vector<uint8_t>());
|
||||||
}
|
}
|
||||||
case Variant::PACKED_INT32_ARRAY: {
|
case Variant::PACKED_INT32_ARRAY: {
|
||||||
return _convert_array<DA, Vector<int32_t> >(p_variant.operator Vector<int32_t>());
|
return _convert_array<DA, Vector<int32_t>>(p_variant.operator Vector<int32_t>());
|
||||||
}
|
}
|
||||||
case Variant::PACKED_INT64_ARRAY: {
|
case Variant::PACKED_INT64_ARRAY: {
|
||||||
return _convert_array<DA, Vector<int64_t> >(p_variant.operator Vector<int64_t>());
|
return _convert_array<DA, Vector<int64_t>>(p_variant.operator Vector<int64_t>());
|
||||||
}
|
}
|
||||||
case Variant::PACKED_FLOAT32_ARRAY: {
|
case Variant::PACKED_FLOAT32_ARRAY: {
|
||||||
return _convert_array<DA, Vector<float> >(p_variant.operator Vector<float>());
|
return _convert_array<DA, Vector<float>>(p_variant.operator Vector<float>());
|
||||||
}
|
}
|
||||||
case Variant::PACKED_FLOAT64_ARRAY: {
|
case Variant::PACKED_FLOAT64_ARRAY: {
|
||||||
return _convert_array<DA, Vector<double> >(p_variant.operator Vector<double>());
|
return _convert_array<DA, Vector<double>>(p_variant.operator Vector<double>());
|
||||||
}
|
}
|
||||||
case Variant::PACKED_STRING_ARRAY: {
|
case Variant::PACKED_STRING_ARRAY: {
|
||||||
return _convert_array<DA, Vector<String> >(p_variant.operator Vector<String>());
|
return _convert_array<DA, Vector<String>>(p_variant.operator Vector<String>());
|
||||||
}
|
}
|
||||||
case Variant::PACKED_VECTOR2_ARRAY: {
|
case Variant::PACKED_VECTOR2_ARRAY: {
|
||||||
return _convert_array<DA, Vector<Vector2> >(p_variant.operator Vector<Vector2>());
|
return _convert_array<DA, Vector<Vector2>>(p_variant.operator Vector<Vector2>());
|
||||||
}
|
}
|
||||||
case Variant::PACKED_VECTOR3_ARRAY: {
|
case Variant::PACKED_VECTOR3_ARRAY: {
|
||||||
return _convert_array<DA, Vector<Vector3> >(p_variant.operator Vector<Vector3>());
|
return _convert_array<DA, Vector<Vector3>>(p_variant.operator Vector<Vector3>());
|
||||||
}
|
}
|
||||||
case Variant::PACKED_COLOR_ARRAY: {
|
case Variant::PACKED_COLOR_ARRAY: {
|
||||||
return _convert_array<DA, Vector<Color> >(p_variant.operator Vector<Color>());
|
return _convert_array<DA, Vector<Color>>(p_variant.operator Vector<Color>());
|
||||||
}
|
}
|
||||||
default: {
|
default: {
|
||||||
return DA();
|
return DA();
|
||||||
@ -2370,21 +2370,21 @@ Variant::operator Vector<uint8_t>() const {
|
|||||||
if (type == PACKED_BYTE_ARRAY)
|
if (type == PACKED_BYTE_ARRAY)
|
||||||
return static_cast<PackedArrayRef<uint8_t> *>(_data.packed_array)->array;
|
return static_cast<PackedArrayRef<uint8_t> *>(_data.packed_array)->array;
|
||||||
else
|
else
|
||||||
return _convert_array_from_variant<Vector<uint8_t> >(*this);
|
return _convert_array_from_variant<Vector<uint8_t>>(*this);
|
||||||
}
|
}
|
||||||
Variant::operator Vector<int32_t>() const {
|
Variant::operator Vector<int32_t>() const {
|
||||||
|
|
||||||
if (type == PACKED_INT32_ARRAY)
|
if (type == PACKED_INT32_ARRAY)
|
||||||
return static_cast<PackedArrayRef<int32_t> *>(_data.packed_array)->array;
|
return static_cast<PackedArrayRef<int32_t> *>(_data.packed_array)->array;
|
||||||
else
|
else
|
||||||
return _convert_array_from_variant<Vector<int> >(*this);
|
return _convert_array_from_variant<Vector<int>>(*this);
|
||||||
}
|
}
|
||||||
Variant::operator Vector<int64_t>() const {
|
Variant::operator Vector<int64_t>() const {
|
||||||
|
|
||||||
if (type == PACKED_INT64_ARRAY)
|
if (type == PACKED_INT64_ARRAY)
|
||||||
return static_cast<PackedArrayRef<int64_t> *>(_data.packed_array)->array;
|
return static_cast<PackedArrayRef<int64_t> *>(_data.packed_array)->array;
|
||||||
else
|
else
|
||||||
return _convert_array_from_variant<Vector<int64_t> >(*this);
|
return _convert_array_from_variant<Vector<int64_t>>(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::operator Vector<float>() const {
|
Variant::operator Vector<float>() const {
|
||||||
@ -2392,7 +2392,7 @@ Variant::operator Vector<float>() const {
|
|||||||
if (type == PACKED_FLOAT32_ARRAY)
|
if (type == PACKED_FLOAT32_ARRAY)
|
||||||
return static_cast<PackedArrayRef<float> *>(_data.packed_array)->array;
|
return static_cast<PackedArrayRef<float> *>(_data.packed_array)->array;
|
||||||
else
|
else
|
||||||
return _convert_array_from_variant<Vector<float> >(*this);
|
return _convert_array_from_variant<Vector<float>>(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::operator Vector<double>() const {
|
Variant::operator Vector<double>() const {
|
||||||
@ -2400,7 +2400,7 @@ Variant::operator Vector<double>() const {
|
|||||||
if (type == PACKED_FLOAT64_ARRAY)
|
if (type == PACKED_FLOAT64_ARRAY)
|
||||||
return static_cast<PackedArrayRef<double> *>(_data.packed_array)->array;
|
return static_cast<PackedArrayRef<double> *>(_data.packed_array)->array;
|
||||||
else
|
else
|
||||||
return _convert_array_from_variant<Vector<double> >(*this);
|
return _convert_array_from_variant<Vector<double>>(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::operator Vector<String>() const {
|
Variant::operator Vector<String>() const {
|
||||||
@ -2408,21 +2408,21 @@ Variant::operator Vector<String>() const {
|
|||||||
if (type == PACKED_STRING_ARRAY)
|
if (type == PACKED_STRING_ARRAY)
|
||||||
return static_cast<PackedArrayRef<String> *>(_data.packed_array)->array;
|
return static_cast<PackedArrayRef<String> *>(_data.packed_array)->array;
|
||||||
else
|
else
|
||||||
return _convert_array_from_variant<Vector<String> >(*this);
|
return _convert_array_from_variant<Vector<String>>(*this);
|
||||||
}
|
}
|
||||||
Variant::operator Vector<Vector3>() const {
|
Variant::operator Vector<Vector3>() const {
|
||||||
|
|
||||||
if (type == PACKED_VECTOR3_ARRAY)
|
if (type == PACKED_VECTOR3_ARRAY)
|
||||||
return static_cast<PackedArrayRef<Vector3> *>(_data.packed_array)->array;
|
return static_cast<PackedArrayRef<Vector3> *>(_data.packed_array)->array;
|
||||||
else
|
else
|
||||||
return _convert_array_from_variant<Vector<Vector3> >(*this);
|
return _convert_array_from_variant<Vector<Vector3>>(*this);
|
||||||
}
|
}
|
||||||
Variant::operator Vector<Vector2>() const {
|
Variant::operator Vector<Vector2>() const {
|
||||||
|
|
||||||
if (type == PACKED_VECTOR2_ARRAY)
|
if (type == PACKED_VECTOR2_ARRAY)
|
||||||
return static_cast<PackedArrayRef<Vector2> *>(_data.packed_array)->array;
|
return static_cast<PackedArrayRef<Vector2> *>(_data.packed_array)->array;
|
||||||
else
|
else
|
||||||
return _convert_array_from_variant<Vector<Vector2> >(*this);
|
return _convert_array_from_variant<Vector<Vector2>>(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
Variant::operator Vector<Color>() const {
|
Variant::operator Vector<Color>() const {
|
||||||
@ -2430,7 +2430,7 @@ Variant::operator Vector<Color>() const {
|
|||||||
if (type == PACKED_COLOR_ARRAY)
|
if (type == PACKED_COLOR_ARRAY)
|
||||||
return static_cast<PackedArrayRef<Color> *>(_data.packed_array)->array;
|
return static_cast<PackedArrayRef<Color> *>(_data.packed_array)->array;
|
||||||
else
|
else
|
||||||
return _convert_array_from_variant<Vector<Color> >(*this);
|
return _convert_array_from_variant<Vector<Color>>(*this);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* helpers */
|
/* helpers */
|
||||||
|
@ -103,7 +103,7 @@ public:
|
|||||||
|
|
||||||
void sort() {
|
void sort() {
|
||||||
|
|
||||||
sort_custom<_DefaultComparator<T> >();
|
sort_custom<_DefaultComparator<T>>();
|
||||||
}
|
}
|
||||||
|
|
||||||
void ordered_insert(const T &p_val) {
|
void ordered_insert(const T &p_val) {
|
||||||
|
@ -23,8 +23,7 @@
|
|||||||
<argument index="4" name="tooltip" type="String" default="""">
|
<argument index="4" name="tooltip" type="String" default="""">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
Adds a button with [Texture2D] [code]button[/code] at column [code]column[/code]. The [code]button_idx[/code] index is used to identify the button when calling other methods. If not specified, the next available index is used, which may be retrieved by calling [method get_button_count] immediately after this method. Optionally, the button can be [code]disabled[/code] and have a [code]tooltip
|
Adds a button with [Texture2D] [code]button[/code] at column [code]column[/code]. The [code]button_idx[/code] index is used to identify the button when calling other methods. If not specified, the next available index is used, which may be retrieved by calling [method get_button_count] immediately after this method. Optionally, the button can be [code]disabled[/code] and have a [code]tooltip[/code].
|
||||||
[/code].
|
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="call_recursive" qualifiers="vararg">
|
<method name="call_recursive" qualifiers="vararg">
|
||||||
|
@ -167,7 +167,7 @@ public:
|
|||||||
Vector<uint8_t> index_array;
|
Vector<uint8_t> index_array;
|
||||||
int index_count;
|
int index_count;
|
||||||
AABB aabb;
|
AABB aabb;
|
||||||
Vector<Vector<uint8_t> > blend_shapes;
|
Vector<Vector<uint8_t>> blend_shapes;
|
||||||
Vector<AABB> bone_aabbs;
|
Vector<AABB> bone_aabbs;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -181,8 +181,8 @@ public:
|
|||||||
mutable RID_PtrOwner<DummyMesh> mesh_owner;
|
mutable RID_PtrOwner<DummyMesh> mesh_owner;
|
||||||
|
|
||||||
virtual RID texture_2d_create(const Ref<Image> &p_image) { return RID(); }
|
virtual RID texture_2d_create(const Ref<Image> &p_image) { return RID(); }
|
||||||
virtual RID texture_2d_layered_create(const Vector<Ref<Image> > &p_layers, VS::TextureLayeredType p_layered_type) { return RID(); }
|
virtual RID texture_2d_layered_create(const Vector<Ref<Image>> &p_layers, VS::TextureLayeredType p_layered_type) { return RID(); }
|
||||||
virtual RID texture_3d_create(const Vector<Ref<Image> > &p_slices) { return RID(); }
|
virtual RID texture_3d_create(const Vector<Ref<Image>> &p_slices) { return RID(); }
|
||||||
virtual RID texture_proxy_create(RID p_base) { return RID(); }
|
virtual RID texture_proxy_create(RID p_base) { return RID(); }
|
||||||
|
|
||||||
virtual void texture_2d_update_immediate(RID p_texture, const Ref<Image> &p_image, int p_layer = 0) {}
|
virtual void texture_2d_update_immediate(RID p_texture, const Ref<Image> &p_image, int p_layer = 0) {}
|
||||||
|
@ -2270,7 +2270,7 @@ static Vector<uint8_t> _unpack_half_floats(const Vector<uint8_t> &array, uint32_
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const Vector<uint8_t> &p_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<Vector<uint8_t> > &p_blend_shapes, const Vector<AABB> &p_bone_aabbs) {
|
void RasterizerStorageGLES2::mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const Vector<uint8_t> &p_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<Vector<uint8_t>> &p_blend_shapes, const Vector<AABB> &p_bone_aabbs) {
|
||||||
|
|
||||||
Mesh *mesh = mesh_owner.getornull(p_mesh);
|
Mesh *mesh = mesh_owner.getornull(p_mesh);
|
||||||
ERR_FAIL_COND(!mesh);
|
ERR_FAIL_COND(!mesh);
|
||||||
@ -2737,10 +2737,10 @@ AABB RasterizerStorageGLES2::mesh_surface_get_aabb(RID p_mesh, int p_surface) co
|
|||||||
return mesh->surfaces[p_surface]->aabb;
|
return mesh->surfaces[p_surface]->aabb;
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector<Vector<uint8_t> > RasterizerStorageGLES2::mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const {
|
Vector<Vector<uint8_t>> RasterizerStorageGLES2::mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const {
|
||||||
const Mesh *mesh = mesh_owner.getornull(p_mesh);
|
const Mesh *mesh = mesh_owner.getornull(p_mesh);
|
||||||
ERR_FAIL_COND_V(!mesh, Vector<Vector<uint8_t> >());
|
ERR_FAIL_COND_V(!mesh, Vector<Vector<uint8_t>>());
|
||||||
ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Vector<Vector<uint8_t> >());
|
ERR_FAIL_INDEX_V(p_surface, mesh->surfaces.size(), Vector<Vector<uint8_t>>());
|
||||||
#ifndef TOOLS_ENABLED
|
#ifndef TOOLS_ENABLED
|
||||||
ERR_PRINT("OpenGL ES 2.0 does not allow retrieving mesh array data");
|
ERR_PRINT("OpenGL ES 2.0 does not allow retrieving mesh array data");
|
||||||
#endif
|
#endif
|
||||||
|
@ -275,7 +275,7 @@ public:
|
|||||||
|
|
||||||
RenderTarget *render_target;
|
RenderTarget *render_target;
|
||||||
|
|
||||||
Vector<Ref<Image> > images;
|
Vector<Ref<Image>> images;
|
||||||
|
|
||||||
bool redraw_if_visible;
|
bool redraw_if_visible;
|
||||||
|
|
||||||
@ -541,7 +541,7 @@ public:
|
|||||||
Map<StringName, Variant> params;
|
Map<StringName, Variant> params;
|
||||||
SelfList<Material> list;
|
SelfList<Material> list;
|
||||||
SelfList<Material> dirty_list;
|
SelfList<Material> dirty_list;
|
||||||
Vector<Pair<StringName, RID> > textures;
|
Vector<Pair<StringName, RID>> textures;
|
||||||
float line_width;
|
float line_width;
|
||||||
int render_priority;
|
int render_priority;
|
||||||
|
|
||||||
@ -650,7 +650,7 @@ public:
|
|||||||
|
|
||||||
Vector<uint8_t> data;
|
Vector<uint8_t> data;
|
||||||
Vector<uint8_t> index_data;
|
Vector<uint8_t> index_data;
|
||||||
Vector<Vector<uint8_t> > blend_shape_data;
|
Vector<Vector<uint8_t>> blend_shape_data;
|
||||||
|
|
||||||
int total_data_size;
|
int total_data_size;
|
||||||
|
|
||||||
@ -702,7 +702,7 @@ public:
|
|||||||
|
|
||||||
virtual RID mesh_create();
|
virtual RID mesh_create();
|
||||||
|
|
||||||
virtual void mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const Vector<uint8_t> &p_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<Vector<uint8_t> > &p_blend_shapes = Vector<Vector<uint8_t> >(), const Vector<AABB> &p_bone_aabbs = Vector<AABB>());
|
virtual void mesh_add_surface(RID p_mesh, uint32_t p_format, VS::PrimitiveType p_primitive, const Vector<uint8_t> &p_array, int p_vertex_count, const Vector<uint8_t> &p_index_array, int p_index_count, const AABB &p_aabb, const Vector<Vector<uint8_t>> &p_blend_shapes = Vector<Vector<uint8_t>>(), const Vector<AABB> &p_bone_aabbs = Vector<AABB>());
|
||||||
|
|
||||||
virtual void mesh_set_blend_shape_count(RID p_mesh, int p_amount);
|
virtual void mesh_set_blend_shape_count(RID p_mesh, int p_amount);
|
||||||
virtual int mesh_get_blend_shape_count(RID p_mesh) const;
|
virtual int mesh_get_blend_shape_count(RID p_mesh) const;
|
||||||
@ -725,7 +725,7 @@ public:
|
|||||||
virtual VS::PrimitiveType mesh_surface_get_primitive_type(RID p_mesh, int p_surface) const;
|
virtual VS::PrimitiveType mesh_surface_get_primitive_type(RID p_mesh, int p_surface) const;
|
||||||
|
|
||||||
virtual AABB mesh_surface_get_aabb(RID p_mesh, int p_surface) const;
|
virtual AABB mesh_surface_get_aabb(RID p_mesh, int p_surface) const;
|
||||||
virtual Vector<Vector<uint8_t> > mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const;
|
virtual Vector<Vector<uint8_t>> mesh_surface_get_blend_shapes(RID p_mesh, int p_surface) const;
|
||||||
virtual Vector<AABB> mesh_surface_get_skeleton_aabb(RID p_mesh, int p_surface) const;
|
virtual Vector<AABB> mesh_surface_get_skeleton_aabb(RID p_mesh, int p_surface) const;
|
||||||
|
|
||||||
virtual void mesh_remove_surface(RID p_mesh, int p_surface);
|
virtual void mesh_remove_surface(RID p_mesh, int p_surface);
|
||||||
|
@ -41,7 +41,7 @@ class ShaderCompilerGLES2 {
|
|||||||
public:
|
public:
|
||||||
struct IdentifierActions {
|
struct IdentifierActions {
|
||||||
|
|
||||||
Map<StringName, Pair<int *, int> > render_mode_values;
|
Map<StringName, Pair<int *, int>> render_mode_values;
|
||||||
Map<StringName, bool *> render_mode_flags;
|
Map<StringName, bool *> render_mode_flags;
|
||||||
Map<StringName, bool *> usage_flag_pointers;
|
Map<StringName, bool *> usage_flag_pointers;
|
||||||
Map<StringName, bool *> write_flag_pointers;
|
Map<StringName, bool *> write_flag_pointers;
|
||||||
|
@ -179,7 +179,7 @@ private:
|
|||||||
|
|
||||||
int max_image_units;
|
int max_image_units;
|
||||||
|
|
||||||
Map<StringName, Pair<ShaderLanguage::DataType, Vector<ShaderLanguage::ConstantNode::Value> > > uniform_values;
|
Map<StringName, Pair<ShaderLanguage::DataType, Vector<ShaderLanguage::ConstantNode::Value>>> uniform_values;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
_FORCE_INLINE_ int _get_uniform(int p_which) const;
|
_FORCE_INLINE_ int _get_uniform(int p_which) const;
|
||||||
|
@ -57,7 +57,7 @@ void RenderingDeviceVulkan::_free_dependencies(RID p_id) {
|
|||||||
|
|
||||||
//direct dependencies must be freed
|
//direct dependencies must be freed
|
||||||
|
|
||||||
Map<RID, Set<RID> >::Element *E = dependency_map.find(p_id);
|
Map<RID, Set<RID>>::Element *E = dependency_map.find(p_id);
|
||||||
if (E) {
|
if (E) {
|
||||||
|
|
||||||
while (E->get().size()) {
|
while (E->get().size()) {
|
||||||
@ -72,7 +72,7 @@ void RenderingDeviceVulkan::_free_dependencies(RID p_id) {
|
|||||||
if (E) {
|
if (E) {
|
||||||
|
|
||||||
for (Set<RID>::Element *F = E->get().front(); F; F = F->next()) {
|
for (Set<RID>::Element *F = E->get().front(); F; F = F->next()) {
|
||||||
Map<RID, Set<RID> >::Element *G = dependency_map.find(F->get());
|
Map<RID, Set<RID>>::Element *G = dependency_map.find(F->get());
|
||||||
ERR_CONTINUE(!G);
|
ERR_CONTINUE(!G);
|
||||||
ERR_CONTINUE(!G->get().has(p_id));
|
ERR_CONTINUE(!G->get().has(p_id));
|
||||||
G->get().erase(p_id);
|
G->get().erase(p_id);
|
||||||
@ -1555,7 +1555,7 @@ void RenderingDeviceVulkan::_buffer_memory_barrier(VkBuffer buffer, uint64_t p_f
|
|||||||
/**** TEXTURE ****/
|
/**** TEXTURE ****/
|
||||||
/*****************/
|
/*****************/
|
||||||
|
|
||||||
RID RenderingDeviceVulkan::texture_create(const TextureFormat &p_format, const TextureView &p_view, const Vector<Vector<uint8_t> > &p_data) {
|
RID RenderingDeviceVulkan::texture_create(const TextureFormat &p_format, const TextureView &p_view, const Vector<Vector<uint8_t>> &p_data) {
|
||||||
|
|
||||||
_THREAD_SAFE_METHOD_
|
_THREAD_SAFE_METHOD_
|
||||||
|
|
||||||
@ -3568,8 +3568,8 @@ bool RenderingDeviceVulkan::_uniform_add_binding(Vector<Vector<VkDescriptorSetLa
|
|||||||
RID RenderingDeviceVulkan::shader_create(const Vector<ShaderStageData> &p_stages) {
|
RID RenderingDeviceVulkan::shader_create(const Vector<ShaderStageData> &p_stages) {
|
||||||
|
|
||||||
//descriptor layouts
|
//descriptor layouts
|
||||||
Vector<Vector<VkDescriptorSetLayoutBinding> > set_bindings;
|
Vector<Vector<VkDescriptorSetLayoutBinding>> set_bindings;
|
||||||
Vector<Vector<UniformInfo> > uniform_info;
|
Vector<Vector<UniformInfo>> uniform_info;
|
||||||
Shader::PushConstant push_constant;
|
Shader::PushConstant push_constant;
|
||||||
push_constant.push_constant_size = 0;
|
push_constant.push_constant_size = 0;
|
||||||
push_constant.push_constants_vk_stage = 0;
|
push_constant.push_constants_vk_stage = 0;
|
||||||
@ -4223,9 +4223,9 @@ RID RenderingDeviceVulkan::uniform_set_create(const Vector<Uniform> &p_uniforms,
|
|||||||
DescriptorPoolKey pool_key;
|
DescriptorPoolKey pool_key;
|
||||||
|
|
||||||
//to keep them alive until update call
|
//to keep them alive until update call
|
||||||
List<Vector<VkDescriptorBufferInfo> > buffer_infos;
|
List<Vector<VkDescriptorBufferInfo>> buffer_infos;
|
||||||
List<Vector<VkBufferView> > buffer_views;
|
List<Vector<VkBufferView>> buffer_views;
|
||||||
List<Vector<VkDescriptorImageInfo> > image_infos;
|
List<Vector<VkDescriptorImageInfo>> image_infos;
|
||||||
//used for verification to make sure a uniform set does not use a framebuffer bound texture
|
//used for verification to make sure a uniform set does not use a framebuffer bound texture
|
||||||
Vector<RID> attachable_textures;
|
Vector<RID> attachable_textures;
|
||||||
Vector<Texture *> mutable_sampled_textures;
|
Vector<Texture *> mutable_sampled_textures;
|
||||||
|
@ -98,8 +98,8 @@ class RenderingDeviceVulkan : public RenderingDevice {
|
|||||||
|
|
||||||
VkDevice device;
|
VkDevice device;
|
||||||
|
|
||||||
Map<RID, Set<RID> > dependency_map; //IDs to IDs that depend on it
|
Map<RID, Set<RID>> dependency_map; //IDs to IDs that depend on it
|
||||||
Map<RID, Set<RID> > reverse_dependency_map; //same as above, but in reverse
|
Map<RID, Set<RID>> reverse_dependency_map; //same as above, but in reverse
|
||||||
|
|
||||||
void _add_dependency(RID p_id, RID p_depends_on);
|
void _add_dependency(RID p_id, RID p_depends_on);
|
||||||
void _free_dependencies(RID p_id);
|
void _free_dependencies(RID p_id);
|
||||||
@ -602,7 +602,7 @@ class RenderingDeviceVulkan : public RenderingDevice {
|
|||||||
uint32_t usage;
|
uint32_t usage;
|
||||||
};
|
};
|
||||||
|
|
||||||
Map<DescriptorPoolKey, Set<DescriptorPool *> > descriptor_pools;
|
Map<DescriptorPoolKey, Set<DescriptorPool *>> descriptor_pools;
|
||||||
uint32_t max_descriptors_per_pool;
|
uint32_t max_descriptors_per_pool;
|
||||||
|
|
||||||
DescriptorPool *_descriptor_pool_allocate(const DescriptorPoolKey &p_key);
|
DescriptorPool *_descriptor_pool_allocate(const DescriptorPoolKey &p_key);
|
||||||
@ -968,7 +968,7 @@ class RenderingDeviceVulkan : public RenderingDevice {
|
|||||||
void _free_rids(T &p_owner, const char *p_type);
|
void _free_rids(T &p_owner, const char *p_type);
|
||||||
|
|
||||||
public:
|
public:
|
||||||
virtual RID texture_create(const TextureFormat &p_format, const TextureView &p_view, const Vector<Vector<uint8_t> > &p_data = Vector<Vector<uint8_t> >());
|
virtual RID texture_create(const TextureFormat &p_format, const TextureView &p_view, const Vector<Vector<uint8_t>> &p_data = Vector<Vector<uint8_t>>());
|
||||||
virtual RID texture_create_shared(const TextureView &p_view, RID p_with_texture);
|
virtual RID texture_create_shared(const TextureView &p_view, RID p_with_texture);
|
||||||
|
|
||||||
virtual RID texture_create_shared_from_slice(const TextureView &p_view, RID p_with_texture, uint32_t p_layer, uint32_t p_mipmap, TextureSliceType p_slice_type = TEXTURE_SLICE_2D);
|
virtual RID texture_create_shared_from_slice(const TextureView &p_view, RID p_with_texture, uint32_t p_layer, uint32_t p_mipmap, TextureSliceType p_slice_type = TEXTURE_SLICE_2D);
|
||||||
|
@ -1076,7 +1076,7 @@ void AnimationBezierTrackEdit::duplicate_selection() {
|
|||||||
|
|
||||||
undo_redo->create_action(TTR("Anim Duplicate Keys"));
|
undo_redo->create_action(TTR("Anim Duplicate Keys"));
|
||||||
|
|
||||||
List<Pair<int, float> > new_selection_values;
|
List<Pair<int, float>> new_selection_values;
|
||||||
|
|
||||||
for (Set<int>::Element *E = selection.back(); E; E = E->prev()) {
|
for (Set<int>::Element *E = selection.back(); E; E = E->prev()) {
|
||||||
|
|
||||||
@ -1103,7 +1103,7 @@ void AnimationBezierTrackEdit::duplicate_selection() {
|
|||||||
//reselect duplicated
|
//reselect duplicated
|
||||||
|
|
||||||
selection.clear();
|
selection.clear();
|
||||||
for (List<Pair<int, float> >::Element *E = new_selection_values.front(); E; E = E->next()) {
|
for (List<Pair<int, float>>::Element *E = new_selection_values.front(); E; E = E->next()) {
|
||||||
|
|
||||||
int track = E->get().first;
|
int track = E->get().first;
|
||||||
float time = E->get().second;
|
float time = E->get().second;
|
||||||
|
@ -752,7 +752,7 @@ public:
|
|||||||
if (animation != p_anim)
|
if (animation != p_anim)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
for (Map<int, List<float> >::Element *E = key_ofs_map.front(); E; E = E->next()) {
|
for (Map<int, List<float>>::Element *E = key_ofs_map.front(); E; E = E->next()) {
|
||||||
|
|
||||||
for (List<float>::Element *F = E->value().front(); F; F = F->next()) {
|
for (List<float>::Element *F = E->value().front(); F; F = F->next()) {
|
||||||
|
|
||||||
@ -777,7 +777,7 @@ public:
|
|||||||
|
|
||||||
bool update_obj = false;
|
bool update_obj = false;
|
||||||
bool change_notify_deserved = false;
|
bool change_notify_deserved = false;
|
||||||
for (Map<int, List<float> >::Element *E = key_ofs_map.front(); E; E = E->next()) {
|
for (Map<int, List<float>>::Element *E = key_ofs_map.front(); E; E = E->next()) {
|
||||||
|
|
||||||
int track = E->key();
|
int track = E->key();
|
||||||
for (List<float>::Element *F = E->value().front(); F; F = F->next()) {
|
for (List<float>::Element *F = E->value().front(); F; F = F->next()) {
|
||||||
@ -1060,7 +1060,7 @@ public:
|
|||||||
|
|
||||||
bool _get(const StringName &p_name, Variant &r_ret) const {
|
bool _get(const StringName &p_name, Variant &r_ret) const {
|
||||||
|
|
||||||
for (Map<int, List<float> >::Element *E = key_ofs_map.front(); E; E = E->next()) {
|
for (Map<int, List<float>>::Element *E = key_ofs_map.front(); E; E = E->next()) {
|
||||||
|
|
||||||
int track = E->key();
|
int track = E->key();
|
||||||
for (List<float>::Element *F = E->value().front(); F; F = F->next()) {
|
for (List<float>::Element *F = E->value().front(); F; F = F->next()) {
|
||||||
@ -1208,7 +1208,7 @@ public:
|
|||||||
bool show_time = true;
|
bool show_time = true;
|
||||||
bool same_track_type = true;
|
bool same_track_type = true;
|
||||||
bool same_key_type = true;
|
bool same_key_type = true;
|
||||||
for (Map<int, List<float> >::Element *E = key_ofs_map.front(); E; E = E->next()) {
|
for (Map<int, List<float>>::Element *E = key_ofs_map.front(); E; E = E->next()) {
|
||||||
|
|
||||||
int track = E->key();
|
int track = E->key();
|
||||||
ERR_FAIL_INDEX(track, animation->get_track_count());
|
ERR_FAIL_INDEX(track, animation->get_track_count());
|
||||||
@ -1362,7 +1362,7 @@ public:
|
|||||||
|
|
||||||
Ref<Animation> animation;
|
Ref<Animation> animation;
|
||||||
|
|
||||||
Map<int, List<float> > key_ofs_map;
|
Map<int, List<float>> key_ofs_map;
|
||||||
Map<int, NodePath> base_map;
|
Map<int, NodePath> base_map;
|
||||||
PropertyInfo hint;
|
PropertyInfo hint;
|
||||||
|
|
||||||
@ -4892,7 +4892,7 @@ void AnimationTrackEditor::_update_key_edit() {
|
|||||||
multi_key_edit = memnew(AnimationMultiTrackKeyEdit);
|
multi_key_edit = memnew(AnimationMultiTrackKeyEdit);
|
||||||
multi_key_edit->animation = animation;
|
multi_key_edit->animation = animation;
|
||||||
|
|
||||||
Map<int, List<float> > key_ofs_map;
|
Map<int, List<float>> key_ofs_map;
|
||||||
Map<int, NodePath> base_map;
|
Map<int, NodePath> base_map;
|
||||||
int first_track = -1;
|
int first_track = -1;
|
||||||
for (Map<SelectedKey, KeyInfo>::Element *E = selection.front(); E; E = E->next()) {
|
for (Map<SelectedKey, KeyInfo>::Element *E = selection.front(); E; E = E->next()) {
|
||||||
@ -5186,7 +5186,7 @@ void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) {
|
|||||||
|
|
||||||
undo_redo->create_action(TTR("Anim Duplicate Keys"));
|
undo_redo->create_action(TTR("Anim Duplicate Keys"));
|
||||||
|
|
||||||
List<Pair<int, float> > new_selection_values;
|
List<Pair<int, float>> new_selection_values;
|
||||||
|
|
||||||
for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
|
for (Map<SelectedKey, KeyInfo>::Element *E = selection.back(); E; E = E->prev()) {
|
||||||
|
|
||||||
@ -5224,7 +5224,7 @@ void AnimationTrackEditor::_anim_duplicate_keys(bool transpose) {
|
|||||||
//reselect duplicated
|
//reselect duplicated
|
||||||
|
|
||||||
Map<SelectedKey, KeyInfo> new_selection;
|
Map<SelectedKey, KeyInfo> new_selection;
|
||||||
for (List<Pair<int, float> >::Element *E = new_selection_values.front(); E; E = E->next()) {
|
for (List<Pair<int, float>>::Element *E = new_selection_values.front(); E; E = E->next()) {
|
||||||
|
|
||||||
int track = E->get().first;
|
int track = E->get().first;
|
||||||
float time = E->get().second;
|
float time = E->get().second;
|
||||||
|
@ -430,7 +430,7 @@ class AnimationTrackEditor : public VBoxContainer {
|
|||||||
Rect2 box_select_rect;
|
Rect2 box_select_rect;
|
||||||
void _scroll_input(const Ref<InputEvent> &p_event);
|
void _scroll_input(const Ref<InputEvent> &p_event);
|
||||||
|
|
||||||
Vector<Ref<AnimationTrackEditPlugin> > track_edit_plugins;
|
Vector<Ref<AnimationTrackEditPlugin>> track_edit_plugins;
|
||||||
|
|
||||||
void _cancel_bezier_edit();
|
void _cancel_bezier_edit();
|
||||||
void _bezier_edit(int p_for_track);
|
void _bezier_edit(int p_for_track);
|
||||||
|
@ -1773,12 +1773,12 @@ void Collada::_parse_animation(XMLParser &parser) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, Vector<float> > float_sources;
|
Map<String, Vector<float>> float_sources;
|
||||||
Map<String, Vector<String> > string_sources;
|
Map<String, Vector<String>> string_sources;
|
||||||
Map<String, int> source_strides;
|
Map<String, int> source_strides;
|
||||||
Map<String, Map<String, String> > samplers;
|
Map<String, Map<String, String>> samplers;
|
||||||
Map<String, Vector<String> > source_param_names;
|
Map<String, Vector<String>> source_param_names;
|
||||||
Map<String, Vector<String> > source_param_types;
|
Map<String, Vector<String>> source_param_types;
|
||||||
|
|
||||||
String id = "";
|
String id = "";
|
||||||
if (parser.has_attribute("id"))
|
if (parser.has_attribute("id"))
|
||||||
|
@ -570,8 +570,8 @@ public:
|
|||||||
|
|
||||||
Vector<AnimationClip> animation_clips;
|
Vector<AnimationClip> animation_clips;
|
||||||
Vector<AnimationTrack> animation_tracks;
|
Vector<AnimationTrack> animation_tracks;
|
||||||
Map<String, Vector<int> > referenced_tracks;
|
Map<String, Vector<int>> referenced_tracks;
|
||||||
Map<String, Vector<int> > by_id_tracks;
|
Map<String, Vector<int>> by_id_tracks;
|
||||||
|
|
||||||
float animation_length;
|
float animation_length;
|
||||||
|
|
||||||
|
@ -977,7 +977,7 @@ void ConnectionsDock::update_tree() {
|
|||||||
String descr;
|
String descr;
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
Map<StringName, Map<StringName, String> >::Element *G = descr_cache.find(base);
|
Map<StringName, Map<StringName, String>>::Element *G = descr_cache.find(base);
|
||||||
if (G) {
|
if (G) {
|
||||||
Map<StringName, String>::Element *F = G->get().find(signal_name);
|
Map<StringName, String>::Element *F = G->get().find(signal_name);
|
||||||
if (F) {
|
if (F) {
|
||||||
|
@ -173,7 +173,7 @@ class ConnectionsDock : public VBoxContainer {
|
|||||||
PopupMenu *slot_menu;
|
PopupMenu *slot_menu;
|
||||||
UndoRedo *undo_redo;
|
UndoRedo *undo_redo;
|
||||||
|
|
||||||
Map<StringName, Map<StringName, String> > descr_cache;
|
Map<StringName, Map<StringName, String>> descr_cache;
|
||||||
|
|
||||||
void _make_or_edit_connection();
|
void _make_or_edit_connection();
|
||||||
void _connect(ConnectDialog::ConnectionData cToMake);
|
void _connect(ConnectDialog::ConnectionData cToMake);
|
||||||
|
@ -132,7 +132,7 @@ void EditorDebuggerTree::update_scene_tree(const SceneDebuggerTree *p_tree, int
|
|||||||
const String filter = EditorNode::get_singleton()->get_scene_tree_dock()->get_filter();
|
const String filter = EditorNode::get_singleton()->get_scene_tree_dock()->get_filter();
|
||||||
|
|
||||||
// Nodes are in a flatten list, depth first. Use a stack of parents, avoid recursion.
|
// Nodes are in a flatten list, depth first. Use a stack of parents, avoid recursion.
|
||||||
List<Pair<TreeItem *, int> > parents;
|
List<Pair<TreeItem *, int>> parents;
|
||||||
for (int i = 0; i < p_tree->nodes.size(); i++) {
|
for (int i = 0; i < p_tree->nodes.size(); i++) {
|
||||||
TreeItem *parent = NULL;
|
TreeItem *parent = NULL;
|
||||||
if (parents.size()) { // Find last parent.
|
if (parents.size()) { // Find last parent.
|
||||||
|
@ -611,8 +611,8 @@ bool EditorProfiler::is_profiling() {
|
|||||||
return activate->is_pressed();
|
return activate->is_pressed();
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector<Vector<String> > EditorProfiler::get_data_as_csv() const {
|
Vector<Vector<String>> EditorProfiler::get_data_as_csv() const {
|
||||||
Vector<Vector<String> > res;
|
Vector<Vector<String>> res;
|
||||||
|
|
||||||
if (frame_metrics.empty()) {
|
if (frame_metrics.empty()) {
|
||||||
return res;
|
return res;
|
||||||
|
@ -169,7 +169,7 @@ public:
|
|||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
Vector<Vector<String> > get_data_as_csv() const;
|
Vector<Vector<String>> get_data_as_csv() const;
|
||||||
|
|
||||||
EditorProfiler();
|
EditorProfiler();
|
||||||
};
|
};
|
||||||
|
@ -678,8 +678,8 @@ bool EditorVisualProfiler::is_profiling() {
|
|||||||
return activate->is_pressed();
|
return activate->is_pressed();
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector<Vector<String> > EditorVisualProfiler::get_data_as_csv() const {
|
Vector<Vector<String>> EditorVisualProfiler::get_data_as_csv() const {
|
||||||
Vector<Vector<String> > res;
|
Vector<Vector<String>> res;
|
||||||
#if 0
|
#if 0
|
||||||
if (frame_metrics.empty()) {
|
if (frame_metrics.empty()) {
|
||||||
return res;
|
return res;
|
||||||
|
@ -146,7 +146,7 @@ public:
|
|||||||
|
|
||||||
void clear();
|
void clear();
|
||||||
|
|
||||||
Vector<Vector<String> > get_data_as_csv() const;
|
Vector<Vector<String>> get_data_as_csv() const;
|
||||||
|
|
||||||
EditorVisualProfiler();
|
EditorVisualProfiler();
|
||||||
};
|
};
|
||||||
|
@ -165,7 +165,7 @@ void ScriptEditorDebugger::_file_selected(const String &p_file) {
|
|||||||
file->store_csv_line(line);
|
file->store_csv_line(line);
|
||||||
|
|
||||||
// values
|
// values
|
||||||
List<Vector<float> >::Element *E = perf_history.back();
|
List<Vector<float>>::Element *E = perf_history.back();
|
||||||
while (E) {
|
while (E) {
|
||||||
|
|
||||||
Vector<float> &perf_data = E->get();
|
Vector<float> &perf_data = E->get();
|
||||||
@ -178,7 +178,7 @@ void ScriptEditorDebugger::_file_selected(const String &p_file) {
|
|||||||
}
|
}
|
||||||
file->store_string("\n");
|
file->store_string("\n");
|
||||||
|
|
||||||
Vector<Vector<String> > profiler_data = profiler->get_data_as_csv();
|
Vector<Vector<String>> profiler_data = profiler->get_data_as_csv();
|
||||||
for (int i = 0; i < profiler_data.size(); i++) {
|
for (int i = 0; i < profiler_data.size(); i++) {
|
||||||
file->store_csv_line(profiler_data[i]);
|
file->store_csv_line(profiler_data[i]);
|
||||||
}
|
}
|
||||||
@ -728,7 +728,7 @@ void ScriptEditorDebugger::_performance_draw() {
|
|||||||
float spacing = point_sep / float(cols);
|
float spacing = point_sep / float(cols);
|
||||||
float from = r.size.width;
|
float from = r.size.width;
|
||||||
|
|
||||||
List<Vector<float> >::Element *E = perf_history.front();
|
List<Vector<float>>::Element *E = perf_history.front();
|
||||||
float prev = -1;
|
float prev = -1;
|
||||||
while (from >= 0 && E) {
|
while (from >= 0 && E) {
|
||||||
|
|
||||||
|
@ -109,7 +109,7 @@ private:
|
|||||||
// Each debugger should have it's tree in the future I guess.
|
// Each debugger should have it's tree in the future I guess.
|
||||||
const Tree *editor_remote_tree = NULL;
|
const Tree *editor_remote_tree = NULL;
|
||||||
|
|
||||||
List<Vector<float> > perf_history;
|
List<Vector<float>> perf_history;
|
||||||
Vector<float> perf_max;
|
Vector<float> perf_max;
|
||||||
Vector<TreeItem *> perf_items;
|
Vector<TreeItem *> perf_items;
|
||||||
|
|
||||||
|
@ -63,7 +63,7 @@ void DependencyEditor::_load_pressed(Object *p_item, int p_cell, int p_button) {
|
|||||||
search->popup_centered_ratio(0.65); // So it doesn't completely cover the dialog below it.
|
search->popup_centered_ratio(0.65); // So it doesn't completely cover the dialog below it.
|
||||||
}
|
}
|
||||||
|
|
||||||
void DependencyEditor::_fix_and_find(EditorFileSystemDirectory *efsd, Map<String, Map<String, String> > &candidates) {
|
void DependencyEditor::_fix_and_find(EditorFileSystemDirectory *efsd, Map<String, Map<String, String>> &candidates) {
|
||||||
|
|
||||||
for (int i = 0; i < efsd->get_subdir_count(); i++) {
|
for (int i = 0; i < efsd->get_subdir_count(); i++) {
|
||||||
_fix_and_find(efsd->get_subdir(i), candidates);
|
_fix_and_find(efsd->get_subdir(i), candidates);
|
||||||
@ -124,7 +124,7 @@ void DependencyEditor::_fix_all() {
|
|||||||
if (!EditorFileSystem::get_singleton()->get_filesystem())
|
if (!EditorFileSystem::get_singleton()->get_filesystem())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
Map<String, Map<String, String> > candidates;
|
Map<String, Map<String, String>> candidates;
|
||||||
|
|
||||||
for (List<String>::Element *E = missing.front(); E; E = E->next()) {
|
for (List<String>::Element *E = missing.front(); E; E = E->next()) {
|
||||||
|
|
||||||
@ -140,7 +140,7 @@ void DependencyEditor::_fix_all() {
|
|||||||
|
|
||||||
Map<String, String> remaps;
|
Map<String, String> remaps;
|
||||||
|
|
||||||
for (Map<String, Map<String, String> >::Element *E = candidates.front(); E; E = E->next()) {
|
for (Map<String, Map<String, String>>::Element *E = candidates.front(); E; E = E->next()) {
|
||||||
|
|
||||||
for (Map<String, String>::Element *F = E->get().front(); F; F = F->next()) {
|
for (Map<String, String>::Element *F = E->get().front(); F; F = F->next()) {
|
||||||
|
|
||||||
|
@ -52,7 +52,7 @@ class DependencyEditor : public AcceptDialog {
|
|||||||
String editing;
|
String editing;
|
||||||
List<String> missing;
|
List<String> missing;
|
||||||
|
|
||||||
void _fix_and_find(EditorFileSystemDirectory *efsd, Map<String, Map<String, String> > &candidates);
|
void _fix_and_find(EditorFileSystemDirectory *efsd, Map<String, Map<String, String>> &candidates);
|
||||||
|
|
||||||
void _searched(const String &p_path);
|
void _searched(const String &p_path);
|
||||||
void _load_pressed(Object *p_item, int p_cell, int p_button);
|
void _load_pressed(Object *p_item, int p_cell, int p_button);
|
||||||
|
@ -687,10 +687,10 @@ void DocData::generate(bool p_basic_types) {
|
|||||||
c.methods.push_back(md);
|
c.methods.push_back(md);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Pair<String, Variant> > cinfo;
|
List<Pair<String, Variant>> cinfo;
|
||||||
lang->get_public_constants(&cinfo);
|
lang->get_public_constants(&cinfo);
|
||||||
|
|
||||||
for (List<Pair<String, Variant> >::Element *E = cinfo.front(); E; E = E->next()) {
|
for (List<Pair<String, Variant>>::Element *E = cinfo.front(); E; E = E->next()) {
|
||||||
|
|
||||||
ConstantDoc cd;
|
ConstantDoc cd;
|
||||||
cd.name = E->get().first;
|
cd.name = E->get().first;
|
||||||
|
@ -110,7 +110,7 @@ void EditorAssetInstaller::open(const String &p_path, int p_depth) {
|
|||||||
ret = unzGoToNextFile(pkg);
|
ret = unzGoToNextFile(pkg);
|
||||||
}
|
}
|
||||||
|
|
||||||
Map<String, Ref<Texture2D> > extension_guess;
|
Map<String, Ref<Texture2D>> extension_guess;
|
||||||
{
|
{
|
||||||
extension_guess["png"] = get_icon("ImageTexture", "EditorIcons");
|
extension_guess["png"] = get_icon("ImageTexture", "EditorIcons");
|
||||||
extension_guess["jpg"] = get_icon("ImageTexture", "EditorIcons");
|
extension_guess["jpg"] = get_icon("ImageTexture", "EditorIcons");
|
||||||
|
@ -521,7 +521,7 @@ Object *EditorData::instance_custom_type(const String &p_type, const String &p_i
|
|||||||
|
|
||||||
void EditorData::remove_custom_type(const String &p_type) {
|
void EditorData::remove_custom_type(const String &p_type) {
|
||||||
|
|
||||||
for (Map<String, Vector<CustomType> >::Element *E = custom_types.front(); E; E = E->next()) {
|
for (Map<String, Vector<CustomType>>::Element *E = custom_types.front(); E; E = E->next()) {
|
||||||
|
|
||||||
for (int i = 0; i < E->get().size(); i++) {
|
for (int i = 0; i < E->get().size(); i++) {
|
||||||
if (E->get()[i].name == p_type) {
|
if (E->get()[i].name == p_type) {
|
||||||
|
@ -135,7 +135,7 @@ private:
|
|||||||
String name;
|
String name;
|
||||||
Variant value;
|
Variant value;
|
||||||
};
|
};
|
||||||
Map<String, Vector<CustomType> > custom_types;
|
Map<String, Vector<CustomType>> custom_types;
|
||||||
|
|
||||||
List<PropertyData> clipboard;
|
List<PropertyData> clipboard;
|
||||||
UndoRedo undo_redo;
|
UndoRedo undo_redo;
|
||||||
@ -181,7 +181,7 @@ public:
|
|||||||
void add_custom_type(const String &p_type, const String &p_inherits, const Ref<Script> &p_script, const Ref<Texture2D> &p_icon);
|
void add_custom_type(const String &p_type, const String &p_inherits, const Ref<Script> &p_script, const Ref<Texture2D> &p_icon);
|
||||||
Object *instance_custom_type(const String &p_type, const String &p_inherits);
|
Object *instance_custom_type(const String &p_type, const String &p_inherits);
|
||||||
void remove_custom_type(const String &p_type);
|
void remove_custom_type(const String &p_type);
|
||||||
const Map<String, Vector<CustomType> > &get_custom_types() const { return custom_types; }
|
const Map<String, Vector<CustomType>> &get_custom_types() const { return custom_types; }
|
||||||
|
|
||||||
int add_edited_scene(int p_at_pos);
|
int add_edited_scene(int p_at_pos);
|
||||||
void move_edited_scene_index(int p_idx, int p_to_idx);
|
void move_edited_scene_index(int p_idx, int p_to_idx);
|
||||||
|
@ -664,7 +664,7 @@ EditorExportPlatform::FeatureContainers EditorExportPlatform::get_feature_contai
|
|||||||
|
|
||||||
EditorExportPlatform::ExportNotifier::ExportNotifier(EditorExportPlatform &p_platform, const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) {
|
EditorExportPlatform::ExportNotifier::ExportNotifier(EditorExportPlatform &p_platform, const Ref<EditorExportPreset> &p_preset, bool p_debug, const String &p_path, int p_flags) {
|
||||||
FeatureContainers features = p_platform.get_feature_containers(p_preset);
|
FeatureContainers features = p_platform.get_feature_containers(p_preset);
|
||||||
Vector<Ref<EditorExportPlugin> > export_plugins = EditorExport::get_singleton()->get_export_plugins();
|
Vector<Ref<EditorExportPlugin>> export_plugins = EditorExport::get_singleton()->get_export_plugins();
|
||||||
//initial export plugin callback
|
//initial export plugin callback
|
||||||
for (int i = 0; i < export_plugins.size(); i++) {
|
for (int i = 0; i < export_plugins.size(); i++) {
|
||||||
if (export_plugins[i]->get_script_instance()) { //script based
|
if (export_plugins[i]->get_script_instance()) { //script based
|
||||||
@ -676,7 +676,7 @@ EditorExportPlatform::ExportNotifier::ExportNotifier(EditorExportPlatform &p_pla
|
|||||||
}
|
}
|
||||||
|
|
||||||
EditorExportPlatform::ExportNotifier::~ExportNotifier() {
|
EditorExportPlatform::ExportNotifier::~ExportNotifier() {
|
||||||
Vector<Ref<EditorExportPlugin> > export_plugins = EditorExport::get_singleton()->get_export_plugins();
|
Vector<Ref<EditorExportPlugin>> export_plugins = EditorExport::get_singleton()->get_export_plugins();
|
||||||
for (int i = 0; i < export_plugins.size(); i++) {
|
for (int i = 0; i < export_plugins.size(); i++) {
|
||||||
if (export_plugins[i]->get_script_instance()) {
|
if (export_plugins[i]->get_script_instance()) {
|
||||||
export_plugins.write[i]->_export_end_script();
|
export_plugins.write[i]->_export_end_script();
|
||||||
@ -712,7 +712,7 @@ Error EditorExportPlatform::export_project_files(const Ref<EditorExportPreset> &
|
|||||||
_edit_filter_list(paths, p_preset->get_include_filter(), false);
|
_edit_filter_list(paths, p_preset->get_include_filter(), false);
|
||||||
_edit_filter_list(paths, p_preset->get_exclude_filter(), true);
|
_edit_filter_list(paths, p_preset->get_exclude_filter(), true);
|
||||||
|
|
||||||
Vector<Ref<EditorExportPlugin> > export_plugins = EditorExport::get_singleton()->get_export_plugins();
|
Vector<Ref<EditorExportPlugin>> export_plugins = EditorExport::get_singleton()->get_export_plugins();
|
||||||
for (int i = 0; i < export_plugins.size(); i++) {
|
for (int i = 0; i < export_plugins.size(); i++) {
|
||||||
|
|
||||||
export_plugins.write[i]->set_export_preset(p_preset);
|
export_plugins.write[i]->set_export_preset(p_preset);
|
||||||
@ -1284,7 +1284,7 @@ void EditorExport::remove_export_plugin(const Ref<EditorExportPlugin> &p_plugin)
|
|||||||
export_plugins.erase(p_plugin);
|
export_plugins.erase(p_plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector<Ref<EditorExportPlugin> > EditorExport::get_export_plugins() {
|
Vector<Ref<EditorExportPlugin>> EditorExport::get_export_plugins() {
|
||||||
|
|
||||||
return export_plugins;
|
return export_plugins;
|
||||||
}
|
}
|
||||||
|
@ -347,9 +347,9 @@ public:
|
|||||||
class EditorExport : public Node {
|
class EditorExport : public Node {
|
||||||
GDCLASS(EditorExport, Node);
|
GDCLASS(EditorExport, Node);
|
||||||
|
|
||||||
Vector<Ref<EditorExportPlatform> > export_platforms;
|
Vector<Ref<EditorExportPlatform>> export_platforms;
|
||||||
Vector<Ref<EditorExportPreset> > export_presets;
|
Vector<Ref<EditorExportPreset>> export_presets;
|
||||||
Vector<Ref<EditorExportPlugin> > export_plugins;
|
Vector<Ref<EditorExportPlugin>> export_plugins;
|
||||||
|
|
||||||
Timer *save_timer;
|
Timer *save_timer;
|
||||||
bool block_save;
|
bool block_save;
|
||||||
@ -379,7 +379,7 @@ public:
|
|||||||
|
|
||||||
void add_export_plugin(const Ref<EditorExportPlugin> &p_plugin);
|
void add_export_plugin(const Ref<EditorExportPlugin> &p_plugin);
|
||||||
void remove_export_plugin(const Ref<EditorExportPlugin> &p_plugin);
|
void remove_export_plugin(const Ref<EditorExportPlugin> &p_plugin);
|
||||||
Vector<Ref<EditorExportPlugin> > get_export_plugins();
|
Vector<Ref<EditorExportPlugin>> get_export_plugins();
|
||||||
|
|
||||||
void load_config();
|
void load_config();
|
||||||
|
|
||||||
|
@ -153,7 +153,7 @@ Error EditorFeatureProfile::save_to_file(const String &p_path) {
|
|||||||
|
|
||||||
Array dis_props;
|
Array dis_props;
|
||||||
|
|
||||||
for (Map<StringName, Set<StringName> >::Element *E = disabled_properties.front(); E; E = E->next()) {
|
for (Map<StringName, Set<StringName>>::Element *E = disabled_properties.front(); E; E = E->next()) {
|
||||||
for (Set<StringName>::Element *F = E->get().front(); F; F = F->next()) {
|
for (Set<StringName>::Element *F = E->get().front(); F; F = F->next()) {
|
||||||
dis_props.push_back(String(E->key()) + ":" + String(F->get()));
|
dis_props.push_back(String(E->key()) + ":" + String(F->get()));
|
||||||
}
|
}
|
||||||
|
@ -58,7 +58,7 @@ public:
|
|||||||
private:
|
private:
|
||||||
Set<StringName> disabled_classes;
|
Set<StringName> disabled_classes;
|
||||||
Set<StringName> disabled_editors;
|
Set<StringName> disabled_editors;
|
||||||
Map<StringName, Set<StringName> > disabled_properties;
|
Map<StringName, Set<StringName>> disabled_properties;
|
||||||
|
|
||||||
bool features_disabled[FEATURE_MAX];
|
bool features_disabled[FEATURE_MAX];
|
||||||
static const char *feature_names[FEATURE_MAX];
|
static const char *feature_names[FEATURE_MAX];
|
||||||
|
@ -1558,7 +1558,7 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector
|
|||||||
|
|
||||||
String importer_name;
|
String importer_name;
|
||||||
|
|
||||||
Map<String, Map<StringName, Variant> > source_file_options;
|
Map<String, Map<StringName, Variant>> source_file_options;
|
||||||
Map<String, String> base_paths;
|
Map<String, String> base_paths;
|
||||||
for (int i = 0; i < p_files.size(); i++) {
|
for (int i = 0; i < p_files.size(); i++) {
|
||||||
|
|
||||||
@ -1610,7 +1610,7 @@ Error EditorFileSystem::_reimport_group(const String &p_group_file, const Vector
|
|||||||
Error err = importer->import_group_file(p_group_file, source_file_options, base_paths);
|
Error err = importer->import_group_file(p_group_file, source_file_options, base_paths);
|
||||||
|
|
||||||
//all went well, overwrite config files with proper remaps and md5s
|
//all went well, overwrite config files with proper remaps and md5s
|
||||||
for (Map<String, Map<StringName, Variant> >::Element *E = source_file_options.front(); E; E = E->next()) {
|
for (Map<String, Map<StringName, Variant>>::Element *E = source_file_options.front(); E; E = E->next()) {
|
||||||
|
|
||||||
const String &file = E->key();
|
const String &file = E->key();
|
||||||
String base_path = ResourceFormatImporter::get_singleton()->get_import_base_path(file);
|
String base_path = ResourceFormatImporter::get_singleton()->get_import_base_path(file);
|
||||||
@ -1921,7 +1921,7 @@ void EditorFileSystem::_reimport_file(const String &p_file) {
|
|||||||
EditorResourcePreview::get_singleton()->check_for_invalidation(p_file);
|
EditorResourcePreview::get_singleton()->check_for_invalidation(p_file);
|
||||||
}
|
}
|
||||||
|
|
||||||
void EditorFileSystem::_find_group_files(EditorFileSystemDirectory *efd, Map<String, Vector<String> > &group_files, Set<String> &groups_to_reimport) {
|
void EditorFileSystem::_find_group_files(EditorFileSystemDirectory *efd, Map<String, Vector<String>> &group_files, Set<String> &groups_to_reimport) {
|
||||||
|
|
||||||
int fc = efd->files.size();
|
int fc = efd->files.size();
|
||||||
const EditorFileSystemDirectory::FileInfo *const *files = efd->files.ptr();
|
const EditorFileSystemDirectory::FileInfo *const *files = efd->files.ptr();
|
||||||
@ -1998,9 +1998,9 @@ void EditorFileSystem::reimport_files(const Vector<String> &p_files) {
|
|||||||
//reimport groups
|
//reimport groups
|
||||||
|
|
||||||
if (groups_to_reimport.size()) {
|
if (groups_to_reimport.size()) {
|
||||||
Map<String, Vector<String> > group_files;
|
Map<String, Vector<String>> group_files;
|
||||||
_find_group_files(filesystem, group_files, groups_to_reimport);
|
_find_group_files(filesystem, group_files, groups_to_reimport);
|
||||||
for (Map<String, Vector<String> >::Element *E = group_files.front(); E; E = E->next()) {
|
for (Map<String, Vector<String>>::Element *E = group_files.front(); E; E = E->next()) {
|
||||||
|
|
||||||
Error err = _reimport_group(E->key(), E->get());
|
Error err = _reimport_group(E->key(), E->get());
|
||||||
if (err == OK) {
|
if (err == OK) {
|
||||||
|
@ -240,7 +240,7 @@ class EditorFileSystem : public Node {
|
|||||||
|
|
||||||
bool using_fat32_or_exfat; // Workaround for projects in FAT32 or exFAT filesystem (pendrives, most of the time)
|
bool using_fat32_or_exfat; // Workaround for projects in FAT32 or exFAT filesystem (pendrives, most of the time)
|
||||||
|
|
||||||
void _find_group_files(EditorFileSystemDirectory *efd, Map<String, Vector<String> > &group_files, Set<String> &groups_to_reimport);
|
void _find_group_files(EditorFileSystemDirectory *efd, Map<String, Vector<String>> &group_files, Set<String> &groups_to_reimport);
|
||||||
|
|
||||||
void _move_group_files(EditorFileSystemDirectory *efd, const String &p_group_file, const String &p_new_location);
|
void _move_group_files(EditorFileSystemDirectory *efd, const String &p_group_file, const String &p_new_location);
|
||||||
|
|
||||||
|
@ -812,7 +812,7 @@ void EditorHelp::_update_doc() {
|
|||||||
// Constants and enums
|
// Constants and enums
|
||||||
if (cd.constants.size()) {
|
if (cd.constants.size()) {
|
||||||
|
|
||||||
Map<String, Vector<DocData::ConstantDoc> > enums;
|
Map<String, Vector<DocData::ConstantDoc>> enums;
|
||||||
Vector<DocData::ConstantDoc> constants;
|
Vector<DocData::ConstantDoc> constants;
|
||||||
|
|
||||||
for (int i = 0; i < cd.constants.size(); i++) {
|
for (int i = 0; i < cd.constants.size(); i++) {
|
||||||
@ -842,7 +842,7 @@ void EditorHelp::_update_doc() {
|
|||||||
|
|
||||||
class_desc->add_newline();
|
class_desc->add_newline();
|
||||||
|
|
||||||
for (Map<String, Vector<DocData::ConstantDoc> >::Element *E = enums.front(); E; E = E->next()) {
|
for (Map<String, Vector<DocData::ConstantDoc>>::Element *E = enums.front(); E; E = E->next()) {
|
||||||
|
|
||||||
enum_line[E->key()] = class_desc->get_line_count() - 2;
|
enum_line[E->key()] = class_desc->get_line_count() - 2;
|
||||||
|
|
||||||
@ -1188,7 +1188,7 @@ void EditorHelp::_help_callback(const String &p_topic) {
|
|||||||
if (constant_line.has(name))
|
if (constant_line.has(name))
|
||||||
line = constant_line[name];
|
line = constant_line[name];
|
||||||
else {
|
else {
|
||||||
Map<String, Map<String, int> >::Element *iter = enum_values_line.front();
|
Map<String, Map<String, int>>::Element *iter = enum_values_line.front();
|
||||||
while (true) {
|
while (true) {
|
||||||
if (iter->value().has(name)) {
|
if (iter->value().has(name)) {
|
||||||
line = iter->value()[name];
|
line = iter->value()[name];
|
||||||
@ -1489,8 +1489,8 @@ void EditorHelp::go_to_class(const String &p_class, int p_scroll) {
|
|||||||
_goto_desc(p_class, p_scroll);
|
_goto_desc(p_class, p_scroll);
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector<Pair<String, int> > EditorHelp::get_sections() {
|
Vector<Pair<String, int>> EditorHelp::get_sections() {
|
||||||
Vector<Pair<String, int> > sections;
|
Vector<Pair<String, int>> sections;
|
||||||
|
|
||||||
for (int i = 0; i < section_line.size(); i++) {
|
for (int i = 0; i < section_line.size(); i++) {
|
||||||
sections.push_back(Pair<String, int>(section_line[i].first, i));
|
sections.push_back(Pair<String, int>(section_line[i].first, i));
|
||||||
|
@ -108,14 +108,14 @@ class EditorHelp : public VBoxContainer {
|
|||||||
|
|
||||||
String edited_class;
|
String edited_class;
|
||||||
|
|
||||||
Vector<Pair<String, int> > section_line;
|
Vector<Pair<String, int>> section_line;
|
||||||
Map<String, int> method_line;
|
Map<String, int> method_line;
|
||||||
Map<String, int> signal_line;
|
Map<String, int> signal_line;
|
||||||
Map<String, int> property_line;
|
Map<String, int> property_line;
|
||||||
Map<String, int> theme_property_line;
|
Map<String, int> theme_property_line;
|
||||||
Map<String, int> constant_line;
|
Map<String, int> constant_line;
|
||||||
Map<String, int> enum_line;
|
Map<String, int> enum_line;
|
||||||
Map<String, Map<String, int> > enum_values_line;
|
Map<String, Map<String, int>> enum_values_line;
|
||||||
int description_line;
|
int description_line;
|
||||||
|
|
||||||
RichTextLabel *class_desc;
|
RichTextLabel *class_desc;
|
||||||
@ -175,7 +175,7 @@ public:
|
|||||||
void go_to_help(const String &p_help);
|
void go_to_help(const String &p_help);
|
||||||
void go_to_class(const String &p_class, int p_scroll = 0);
|
void go_to_class(const String &p_class, int p_scroll = 0);
|
||||||
|
|
||||||
Vector<Pair<String, int> > get_sections();
|
Vector<Pair<String, int>> get_sections();
|
||||||
void scroll_to_section(int p_section_index);
|
void scroll_to_section(int p_section_index);
|
||||||
|
|
||||||
void popup_search();
|
void popup_search();
|
||||||
|
@ -1454,7 +1454,7 @@ void EditorInspector::update_tree() {
|
|||||||
if (!object)
|
if (!object)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
List<Ref<EditorInspectorPlugin> > valid_plugins;
|
List<Ref<EditorInspectorPlugin>> valid_plugins;
|
||||||
|
|
||||||
for (int i = inspector_plugin_count - 1; i >= 0; i--) { //start by last, so lastly added can override newly added
|
for (int i = inspector_plugin_count - 1; i >= 0; i--) { //start by last, so lastly added can override newly added
|
||||||
if (!inspector_plugins[i]->can_handle(object))
|
if (!inspector_plugins[i]->can_handle(object))
|
||||||
@ -1490,7 +1490,7 @@ void EditorInspector::update_tree() {
|
|||||||
|
|
||||||
Color sscolor = get_color("prop_subsection", "Editor");
|
Color sscolor = get_color("prop_subsection", "Editor");
|
||||||
|
|
||||||
for (List<Ref<EditorInspectorPlugin> >::Element *E = valid_plugins.front(); E; E = E->next()) {
|
for (List<Ref<EditorInspectorPlugin>>::Element *E = valid_plugins.front(); E; E = E->next()) {
|
||||||
Ref<EditorInspectorPlugin> ped = E->get();
|
Ref<EditorInspectorPlugin> ped = E->get();
|
||||||
ped->parse_begin(object);
|
ped->parse_begin(object);
|
||||||
_parse_added_editors(main_vbox, ped);
|
_parse_added_editors(main_vbox, ped);
|
||||||
@ -1557,7 +1557,7 @@ void EditorInspector::update_tree() {
|
|||||||
category->set_tooltip(p.name + "::" + (class_descr_cache[type2] == "" ? "" : class_descr_cache[type2]));
|
category->set_tooltip(p.name + "::" + (class_descr_cache[type2] == "" ? "" : class_descr_cache[type2]));
|
||||||
}
|
}
|
||||||
|
|
||||||
for (List<Ref<EditorInspectorPlugin> >::Element *E = valid_plugins.front(); E; E = E->next()) {
|
for (List<Ref<EditorInspectorPlugin>>::Element *E = valid_plugins.front(); E; E = E->next()) {
|
||||||
Ref<EditorInspectorPlugin> ped = E->get();
|
Ref<EditorInspectorPlugin> ped = E->get();
|
||||||
ped->parse_category(object, p.name);
|
ped->parse_category(object, p.name);
|
||||||
_parse_added_editors(main_vbox, ped);
|
_parse_added_editors(main_vbox, ped);
|
||||||
@ -1688,7 +1688,7 @@ void EditorInspector::update_tree() {
|
|||||||
String descr;
|
String descr;
|
||||||
bool found = false;
|
bool found = false;
|
||||||
|
|
||||||
Map<StringName, Map<StringName, String> >::Element *E = descr_cache.find(classname);
|
Map<StringName, Map<StringName, String>>::Element *E = descr_cache.find(classname);
|
||||||
if (E) {
|
if (E) {
|
||||||
Map<StringName, String>::Element *F = E->get().find(propname);
|
Map<StringName, String>::Element *F = E->get().find(propname);
|
||||||
if (F) {
|
if (F) {
|
||||||
@ -1719,7 +1719,7 @@ void EditorInspector::update_tree() {
|
|||||||
doc_hint = descr;
|
doc_hint = descr;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (List<Ref<EditorInspectorPlugin> >::Element *E = valid_plugins.front(); E; E = E->next()) {
|
for (List<Ref<EditorInspectorPlugin>>::Element *E = valid_plugins.front(); E; E = E->next()) {
|
||||||
Ref<EditorInspectorPlugin> ped = E->get();
|
Ref<EditorInspectorPlugin> ped = E->get();
|
||||||
bool exclusive = ped->parse_property(object, p.type, p.name, p.hint, p.hint_string, p.usage);
|
bool exclusive = ped->parse_property(object, p.type, p.name, p.hint, p.hint_string, p.usage);
|
||||||
|
|
||||||
@ -1802,7 +1802,7 @@ void EditorInspector::update_tree() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (List<Ref<EditorInspectorPlugin> >::Element *E = valid_plugins.front(); E; E = E->next()) {
|
for (List<Ref<EditorInspectorPlugin>>::Element *E = valid_plugins.front(); E; E = E->next()) {
|
||||||
Ref<EditorInspectorPlugin> ped = E->get();
|
Ref<EditorInspectorPlugin> ped = E->get();
|
||||||
ped->parse_end();
|
ped->parse_end();
|
||||||
_parse_added_editors(main_vbox, ped);
|
_parse_added_editors(main_vbox, ped);
|
||||||
@ -1933,7 +1933,7 @@ void EditorInspector::collapse_all_folding() {
|
|||||||
E->get()->fold();
|
E->get()->fold();
|
||||||
}
|
}
|
||||||
|
|
||||||
for (Map<StringName, List<EditorProperty *> >::Element *F = editor_property_map.front(); F; F = F->next()) {
|
for (Map<StringName, List<EditorProperty *>>::Element *F = editor_property_map.front(); F; F = F->next()) {
|
||||||
for (List<EditorProperty *>::Element *E = F->get().front(); E; E = E->next()) {
|
for (List<EditorProperty *>::Element *E = F->get().front(); E; E = E->next()) {
|
||||||
E->get()->collapse_all_folding();
|
E->get()->collapse_all_folding();
|
||||||
}
|
}
|
||||||
@ -1944,7 +1944,7 @@ void EditorInspector::expand_all_folding() {
|
|||||||
for (List<EditorInspectorSection *>::Element *E = sections.front(); E; E = E->next()) {
|
for (List<EditorInspectorSection *>::Element *E = sections.front(); E; E = E->next()) {
|
||||||
E->get()->unfold();
|
E->get()->unfold();
|
||||||
}
|
}
|
||||||
for (Map<StringName, List<EditorProperty *> >::Element *F = editor_property_map.front(); F; F = F->next()) {
|
for (Map<StringName, List<EditorProperty *>>::Element *F = editor_property_map.front(); F; F = F->next()) {
|
||||||
for (List<EditorProperty *>::Element *E = F->get().front(); E; E = E->next()) {
|
for (List<EditorProperty *>::Element *E = F->get().front(); E; E = E->next()) {
|
||||||
E->get()->expand_all_folding();
|
E->get()->expand_all_folding();
|
||||||
}
|
}
|
||||||
@ -2154,7 +2154,7 @@ void EditorInspector::_property_selected(const String &p_path, int p_focusable)
|
|||||||
property_selected = p_path;
|
property_selected = p_path;
|
||||||
property_focusable = p_focusable;
|
property_focusable = p_focusable;
|
||||||
//deselect the others
|
//deselect the others
|
||||||
for (Map<StringName, List<EditorProperty *> >::Element *F = editor_property_map.front(); F; F = F->next()) {
|
for (Map<StringName, List<EditorProperty *>>::Element *F = editor_property_map.front(); F; F = F->next()) {
|
||||||
if (F->key() == property_selected)
|
if (F->key() == property_selected)
|
||||||
continue;
|
continue;
|
||||||
for (List<EditorProperty *>::Element *E = F->get().front(); E; E = E->next()) {
|
for (List<EditorProperty *>::Element *E = F->get().front(); E; E = E->next()) {
|
||||||
@ -2217,7 +2217,7 @@ void EditorInspector::_notification(int p_what) {
|
|||||||
if (refresh_countdown > 0) {
|
if (refresh_countdown > 0) {
|
||||||
refresh_countdown -= get_process_delta_time();
|
refresh_countdown -= get_process_delta_time();
|
||||||
if (refresh_countdown <= 0) {
|
if (refresh_countdown <= 0) {
|
||||||
for (Map<StringName, List<EditorProperty *> >::Element *F = editor_property_map.front(); F; F = F->next()) {
|
for (Map<StringName, List<EditorProperty *>>::Element *F = editor_property_map.front(); F; F = F->next()) {
|
||||||
for (List<EditorProperty *>::Element *E = F->get().front(); E; E = E->next()) {
|
for (List<EditorProperty *>::Element *E = F->get().front(); E; E = E->next()) {
|
||||||
E->get()->update_property();
|
E->get()->update_property();
|
||||||
E->get()->update_reload_status();
|
E->get()->update_reload_status();
|
||||||
|
@ -261,7 +261,7 @@ class EditorInspector : public ScrollContainer {
|
|||||||
VBoxContainer *main_vbox;
|
VBoxContainer *main_vbox;
|
||||||
|
|
||||||
//map use to cache the instanced editors
|
//map use to cache the instanced editors
|
||||||
Map<StringName, List<EditorProperty *> > editor_property_map;
|
Map<StringName, List<EditorProperty *>> editor_property_map;
|
||||||
List<EditorInspectorSection *> sections;
|
List<EditorInspectorSection *> sections;
|
||||||
Set<StringName> pending;
|
Set<StringName> pending;
|
||||||
|
|
||||||
@ -291,7 +291,7 @@ class EditorInspector : public ScrollContainer {
|
|||||||
int property_focusable;
|
int property_focusable;
|
||||||
int update_scroll_request;
|
int update_scroll_request;
|
||||||
|
|
||||||
Map<StringName, Map<StringName, String> > descr_cache;
|
Map<StringName, Map<StringName, String>> descr_cache;
|
||||||
Map<StringName, String> class_descr_cache;
|
Map<StringName, String> class_descr_cache;
|
||||||
Set<StringName> restart_request_props;
|
Set<StringName> restart_request_props;
|
||||||
|
|
||||||
|
@ -547,7 +547,7 @@ void EditorNode::_on_plugin_ready(Object *p_script, const String &p_activate_nam
|
|||||||
|
|
||||||
void EditorNode::_resources_changed(const Vector<String> &p_resources) {
|
void EditorNode::_resources_changed(const Vector<String> &p_resources) {
|
||||||
|
|
||||||
List<Ref<Resource> > changed;
|
List<Ref<Resource>> changed;
|
||||||
|
|
||||||
int rc = p_resources.size();
|
int rc = p_resources.size();
|
||||||
for (int i = 0; i < rc; i++) {
|
for (int i = 0; i < rc; i++) {
|
||||||
@ -573,7 +573,7 @@ void EditorNode::_resources_changed(const Vector<String> &p_resources) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (changed.size()) {
|
if (changed.size()) {
|
||||||
for (List<Ref<Resource> >::Element *E = changed.front(); E; E = E->next()) {
|
for (List<Ref<Resource>>::Element *E = changed.front(); E; E = E->next()) {
|
||||||
E->get()->reload_from_file();
|
E->get()->reload_from_file();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1210,7 +1210,7 @@ bool EditorNode::_validate_scene_recursive(const String &p_filename, Node *p_nod
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
static bool _find_edited_resources(const Ref<Resource> &p_resource, Set<Ref<Resource> > &edited_resources) {
|
static bool _find_edited_resources(const Ref<Resource> &p_resource, Set<Ref<Resource>> &edited_resources) {
|
||||||
|
|
||||||
if (p_resource->is_edited()) {
|
if (p_resource->is_edited()) {
|
||||||
edited_resources.insert(p_resource);
|
edited_resources.insert(p_resource);
|
||||||
@ -1247,11 +1247,11 @@ int EditorNode::_save_external_resources() {
|
|||||||
flg |= ResourceSaver::FLAG_COMPRESS;
|
flg |= ResourceSaver::FLAG_COMPRESS;
|
||||||
flg |= ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS;
|
flg |= ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS;
|
||||||
|
|
||||||
Set<Ref<Resource> > edited_subresources;
|
Set<Ref<Resource>> edited_subresources;
|
||||||
int saved = 0;
|
int saved = 0;
|
||||||
List<Ref<Resource> > cached;
|
List<Ref<Resource>> cached;
|
||||||
ResourceCache::get_cached_resources(&cached);
|
ResourceCache::get_cached_resources(&cached);
|
||||||
for (List<Ref<Resource> >::Element *E = cached.front(); E; E = E->next()) {
|
for (List<Ref<Resource>>::Element *E = cached.front(); E; E = E->next()) {
|
||||||
|
|
||||||
Ref<Resource> res = E->get();
|
Ref<Resource> res = E->get();
|
||||||
if (!res->get_path().is_resource_file())
|
if (!res->get_path().is_resource_file())
|
||||||
@ -1266,7 +1266,7 @@ int EditorNode::_save_external_resources() {
|
|||||||
// clear later, because user may have put the same subresource in two different resources,
|
// clear later, because user may have put the same subresource in two different resources,
|
||||||
// which will be shared until the next reload
|
// which will be shared until the next reload
|
||||||
|
|
||||||
for (Set<Ref<Resource> >::Element *E = edited_subresources.front(); E; E = E->next()) {
|
for (Set<Ref<Resource>>::Element *E = edited_subresources.front(); E; E = E->next()) {
|
||||||
Ref<Resource> res = E->get();
|
Ref<Resource> res = E->get();
|
||||||
res->set_edited(false);
|
res->set_edited(false);
|
||||||
}
|
}
|
||||||
@ -3333,7 +3333,7 @@ Error EditorNode::load_scene(const String &p_scene, bool p_ignore_broken_deps, b
|
|||||||
|
|
||||||
dependency_errors.erase(lpath); //at least not self path
|
dependency_errors.erase(lpath); //at least not self path
|
||||||
|
|
||||||
for (Map<String, Set<String> >::Element *E = dependency_errors.front(); E; E = E->next()) {
|
for (Map<String, Set<String>>::Element *E = dependency_errors.front(); E; E = E->next()) {
|
||||||
|
|
||||||
String txt = vformat(TTR("Scene '%s' has broken dependencies:"), E->key()) + "\n";
|
String txt = vformat(TTR("Scene '%s' has broken dependencies:"), E->key()) + "\n";
|
||||||
for (Set<String>::Element *F = E->get().front(); F; F = F->next()) {
|
for (Set<String>::Element *F = E->get().front(); F; F = F->next()) {
|
||||||
@ -3787,8 +3787,8 @@ Ref<Texture2D> EditorNode::get_class_icon(const String &p_class, const String &p
|
|||||||
return icon;
|
return icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
const Map<String, Vector<EditorData::CustomType> > &p_map = EditorNode::get_editor_data().get_custom_types();
|
const Map<String, Vector<EditorData::CustomType>> &p_map = EditorNode::get_editor_data().get_custom_types();
|
||||||
for (const Map<String, Vector<EditorData::CustomType> >::Element *E = p_map.front(); E; E = E->next()) {
|
for (const Map<String, Vector<EditorData::CustomType>>::Element *E = p_map.front(); E; E = E->next()) {
|
||||||
const Vector<EditorData::CustomType> &ct = E->value();
|
const Vector<EditorData::CustomType> &ct = E->value();
|
||||||
for (int i = 0; i < ct.size(); ++i) {
|
for (int i = 0; i < ct.size(); ++i) {
|
||||||
if (ct[i].name == p_class) {
|
if (ct[i].name == p_class) {
|
||||||
@ -5120,10 +5120,10 @@ void EditorNode::reload_scene(const String &p_path) {
|
|||||||
|
|
||||||
//first of all, reload internal textures, materials, meshes, etc. as they might have changed on disk
|
//first of all, reload internal textures, materials, meshes, etc. as they might have changed on disk
|
||||||
|
|
||||||
List<Ref<Resource> > cached;
|
List<Ref<Resource>> cached;
|
||||||
ResourceCache::get_cached_resources(&cached);
|
ResourceCache::get_cached_resources(&cached);
|
||||||
List<Ref<Resource> > to_clear; //clear internal resources from previous scene from being used
|
List<Ref<Resource>> to_clear; //clear internal resources from previous scene from being used
|
||||||
for (List<Ref<Resource> >::Element *E = cached.front(); E; E = E->next()) {
|
for (List<Ref<Resource>>::Element *E = cached.front(); E; E = E->next()) {
|
||||||
|
|
||||||
if (E->get()->get_path().begins_with(p_path + "::")) { //subresources of existing scene
|
if (E->get()->get_path().begins_with(p_path + "::")) { //subresources of existing scene
|
||||||
to_clear.push_back(E->get());
|
to_clear.push_back(E->get());
|
||||||
@ -5254,9 +5254,9 @@ void EditorNode::remove_resource_conversion_plugin(const Ref<EditorResourceConve
|
|||||||
resource_conversion_plugins.erase(p_plugin);
|
resource_conversion_plugins.erase(p_plugin);
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector<Ref<EditorResourceConversionPlugin> > EditorNode::find_resource_conversion_plugin(const Ref<Resource> &p_for_resource) {
|
Vector<Ref<EditorResourceConversionPlugin>> EditorNode::find_resource_conversion_plugin(const Ref<Resource> &p_for_resource) {
|
||||||
|
|
||||||
Vector<Ref<EditorResourceConversionPlugin> > ret;
|
Vector<Ref<EditorResourceConversionPlugin>> ret;
|
||||||
|
|
||||||
for (int i = 0; i < resource_conversion_plugins.size(); i++) {
|
for (int i = 0; i < resource_conversion_plugins.size(); i++) {
|
||||||
if (resource_conversion_plugins[i].is_valid() && resource_conversion_plugins[i]->handles(p_for_resource)) {
|
if (resource_conversion_plugins[i].is_valid() && resource_conversion_plugins[i]->handles(p_for_resource)) {
|
||||||
|
@ -513,7 +513,7 @@ private:
|
|||||||
Set<FileDialog *> file_dialogs;
|
Set<FileDialog *> file_dialogs;
|
||||||
Set<EditorFileDialog *> editor_file_dialogs;
|
Set<EditorFileDialog *> editor_file_dialogs;
|
||||||
|
|
||||||
Map<String, Ref<Texture2D> > icon_type_cache;
|
Map<String, Ref<Texture2D>> icon_type_cache;
|
||||||
void _build_icon_type_cache();
|
void _build_icon_type_cache();
|
||||||
|
|
||||||
bool _initializing_addons;
|
bool _initializing_addons;
|
||||||
@ -536,7 +536,7 @@ private:
|
|||||||
void _find_node_types(Node *p_node, int &count_2d, int &count_3d);
|
void _find_node_types(Node *p_node, int &count_2d, int &count_3d);
|
||||||
void _save_scene_with_preview(String p_file, int p_idx = -1);
|
void _save_scene_with_preview(String p_file, int p_idx = -1);
|
||||||
|
|
||||||
Map<String, Set<String> > dependency_errors;
|
Map<String, Set<String>> dependency_errors;
|
||||||
|
|
||||||
static void _dependency_error_report(void *ud, const String &p_path, const String &p_dep, const String &p_type) {
|
static void _dependency_error_report(void *ud, const String &p_path, const String &p_dep, const String &p_type) {
|
||||||
EditorNode *en = (EditorNode *)ud;
|
EditorNode *en = (EditorNode *)ud;
|
||||||
@ -622,7 +622,7 @@ private:
|
|||||||
|
|
||||||
void _update_update_spinner();
|
void _update_update_spinner();
|
||||||
|
|
||||||
Vector<Ref<EditorResourceConversionPlugin> > resource_conversion_plugins;
|
Vector<Ref<EditorResourceConversionPlugin>> resource_conversion_plugins;
|
||||||
|
|
||||||
PrintHandlerList print_handler;
|
PrintHandlerList print_handler;
|
||||||
static void _print_handler(void *p_this, const String &p_string, bool p_error);
|
static void _print_handler(void *p_this, const String &p_string, bool p_error);
|
||||||
@ -844,7 +844,7 @@ public:
|
|||||||
|
|
||||||
void add_resource_conversion_plugin(const Ref<EditorResourceConversionPlugin> &p_plugin);
|
void add_resource_conversion_plugin(const Ref<EditorResourceConversionPlugin> &p_plugin);
|
||||||
void remove_resource_conversion_plugin(const Ref<EditorResourceConversionPlugin> &p_plugin);
|
void remove_resource_conversion_plugin(const Ref<EditorResourceConversionPlugin> &p_plugin);
|
||||||
Vector<Ref<EditorResourceConversionPlugin> > find_resource_conversion_plugin(const Ref<Resource> &p_for_resource);
|
Vector<Ref<EditorResourceConversionPlugin>> find_resource_conversion_plugin(const Ref<Resource> &p_for_resource);
|
||||||
|
|
||||||
static void add_init_callback(EditorNodeInitCallback p_callback) { _init_callbacks.push_back(p_callback); }
|
static void add_init_callback(EditorNodeInitCallback p_callback) { _init_callbacks.push_back(p_callback); }
|
||||||
static void add_build_callback(EditorBuildCallback p_callback);
|
static void add_build_callback(EditorBuildCallback p_callback);
|
||||||
|
@ -45,13 +45,13 @@
|
|||||||
|
|
||||||
Array EditorInterface::_make_mesh_previews(const Array &p_meshes, int p_preview_size) {
|
Array EditorInterface::_make_mesh_previews(const Array &p_meshes, int p_preview_size) {
|
||||||
|
|
||||||
Vector<Ref<Mesh> > meshes;
|
Vector<Ref<Mesh>> meshes;
|
||||||
|
|
||||||
for (int i = 0; i < p_meshes.size(); i++) {
|
for (int i = 0; i < p_meshes.size(); i++) {
|
||||||
meshes.push_back(p_meshes[i]);
|
meshes.push_back(p_meshes[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector<Ref<Texture2D> > textures = make_mesh_previews(meshes, NULL, p_preview_size);
|
Vector<Ref<Texture2D>> textures = make_mesh_previews(meshes, NULL, p_preview_size);
|
||||||
Array ret;
|
Array ret;
|
||||||
for (int i = 0; i < textures.size(); i++) {
|
for (int i = 0; i < textures.size(); i++) {
|
||||||
ret.push_back(textures[i]);
|
ret.push_back(textures[i]);
|
||||||
@ -60,7 +60,7 @@ Array EditorInterface::_make_mesh_previews(const Array &p_meshes, int p_preview_
|
|||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector<Ref<Texture2D> > EditorInterface::make_mesh_previews(const Vector<Ref<Mesh> > &p_meshes, Vector<Transform> *p_transforms, int p_preview_size) {
|
Vector<Ref<Texture2D>> EditorInterface::make_mesh_previews(const Vector<Ref<Mesh>> &p_meshes, Vector<Transform> *p_transforms, int p_preview_size) {
|
||||||
|
|
||||||
int size = p_preview_size;
|
int size = p_preview_size;
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ Vector<Ref<Texture2D> > EditorInterface::make_mesh_previews(const Vector<Ref<Mes
|
|||||||
|
|
||||||
EditorProgress ep("mlib", TTR("Creating Mesh Previews"), p_meshes.size());
|
EditorProgress ep("mlib", TTR("Creating Mesh Previews"), p_meshes.size());
|
||||||
|
|
||||||
Vector<Ref<Texture2D> > textures;
|
Vector<Ref<Texture2D>> textures;
|
||||||
|
|
||||||
for (int i = 0; i < p_meshes.size(); i++) {
|
for (int i = 0; i < p_meshes.size(); i++) {
|
||||||
|
|
||||||
|
@ -98,7 +98,7 @@ public:
|
|||||||
Error save_scene();
|
Error save_scene();
|
||||||
void save_scene_as(const String &p_scene, bool p_with_preview = true);
|
void save_scene_as(const String &p_scene, bool p_with_preview = true);
|
||||||
|
|
||||||
Vector<Ref<Texture2D> > make_mesh_previews(const Vector<Ref<Mesh> > &p_meshes, Vector<Transform> *p_transforms, int p_preview_size);
|
Vector<Ref<Texture2D>> make_mesh_previews(const Vector<Ref<Mesh>> &p_meshes, Vector<Transform> *p_transforms, int p_preview_size);
|
||||||
|
|
||||||
void set_main_screen_editor(const String &p_name);
|
void set_main_screen_editor(const String &p_name);
|
||||||
void set_distraction_free_mode(bool p_enter);
|
void set_distraction_free_mode(bool p_enter);
|
||||||
|
@ -2121,7 +2121,7 @@ void EditorPropertyResource::_menu_option(int p_which) {
|
|||||||
|
|
||||||
List<PropertyInfo> property_list;
|
List<PropertyInfo> property_list;
|
||||||
res_orig->get_property_list(&property_list);
|
res_orig->get_property_list(&property_list);
|
||||||
List<Pair<String, Variant> > propvalues;
|
List<Pair<String, Variant>> propvalues;
|
||||||
|
|
||||||
for (List<PropertyInfo>::Element *E = property_list.front(); E; E = E->next()) {
|
for (List<PropertyInfo>::Element *E = property_list.front(); E; E = E->next()) {
|
||||||
|
|
||||||
@ -2144,7 +2144,7 @@ void EditorPropertyResource::_menu_option(int p_which) {
|
|||||||
|
|
||||||
ERR_FAIL_COND(res.is_null());
|
ERR_FAIL_COND(res.is_null());
|
||||||
|
|
||||||
for (List<Pair<String, Variant> >::Element *E = propvalues.front(); E; E = E->next()) {
|
for (List<Pair<String, Variant>>::Element *E = propvalues.front(); E; E = E->next()) {
|
||||||
|
|
||||||
Pair<String, Variant> &p = E->get();
|
Pair<String, Variant> &p = E->get();
|
||||||
res->set(p.first, p.second);
|
res->set(p.first, p.second);
|
||||||
@ -2206,7 +2206,7 @@ void EditorPropertyResource::_menu_option(int p_which) {
|
|||||||
|
|
||||||
int to_type = p_which - CONVERT_BASE_ID;
|
int to_type = p_which - CONVERT_BASE_ID;
|
||||||
|
|
||||||
Vector<Ref<EditorResourceConversionPlugin> > conversions = EditorNode::get_singleton()->find_resource_conversion_plugin(res);
|
Vector<Ref<EditorResourceConversionPlugin>> conversions = EditorNode::get_singleton()->find_resource_conversion_plugin(res);
|
||||||
|
|
||||||
ERR_FAIL_INDEX(to_type, conversions.size());
|
ERR_FAIL_INDEX(to_type, conversions.size());
|
||||||
|
|
||||||
@ -2438,7 +2438,7 @@ void EditorPropertyResource::_update_menu_items() {
|
|||||||
|
|
||||||
if (!res.is_null()) {
|
if (!res.is_null()) {
|
||||||
|
|
||||||
Vector<Ref<EditorResourceConversionPlugin> > conversions = EditorNode::get_singleton()->find_resource_conversion_plugin(res);
|
Vector<Ref<EditorResourceConversionPlugin>> conversions = EditorNode::get_singleton()->find_resource_conversion_plugin(res);
|
||||||
if (conversions.size()) {
|
if (conversions.size()) {
|
||||||
menu->add_separator();
|
menu->add_separator();
|
||||||
}
|
}
|
||||||
|
@ -94,7 +94,7 @@ class EditorResourcePreview : public Node {
|
|||||||
static void _thread_func(void *ud);
|
static void _thread_func(void *ud);
|
||||||
void _thread();
|
void _thread();
|
||||||
|
|
||||||
Vector<Ref<EditorResourcePreviewGenerator> > preview_generators;
|
Vector<Ref<EditorResourcePreviewGenerator>> preview_generators;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
|
@ -125,7 +125,7 @@ bool EditorSettings::_get(const StringName &p_name, Variant &r_ret) const {
|
|||||||
if (p_name.operator String() == "shortcuts") {
|
if (p_name.operator String() == "shortcuts") {
|
||||||
|
|
||||||
Array arr;
|
Array arr;
|
||||||
for (const Map<String, Ref<ShortCut> >::Element *E = shortcuts.front(); E; E = E->next()) {
|
for (const Map<String, Ref<ShortCut>>::Element *E = shortcuts.front(); E; E = E->next()) {
|
||||||
|
|
||||||
Ref<ShortCut> sc = E->get();
|
Ref<ShortCut> sc = E->get();
|
||||||
|
|
||||||
@ -1476,7 +1476,7 @@ void EditorSettings::add_shortcut(const String &p_name, Ref<ShortCut> &p_shortcu
|
|||||||
|
|
||||||
bool EditorSettings::is_shortcut(const String &p_name, const Ref<InputEvent> &p_event) const {
|
bool EditorSettings::is_shortcut(const String &p_name, const Ref<InputEvent> &p_event) const {
|
||||||
|
|
||||||
const Map<String, Ref<ShortCut> >::Element *E = shortcuts.find(p_name);
|
const Map<String, Ref<ShortCut>>::Element *E = shortcuts.find(p_name);
|
||||||
ERR_FAIL_COND_V_MSG(!E, false, "Unknown Shortcut: " + p_name + ".");
|
ERR_FAIL_COND_V_MSG(!E, false, "Unknown Shortcut: " + p_name + ".");
|
||||||
|
|
||||||
return E->get()->is_shortcut(p_event);
|
return E->get()->is_shortcut(p_event);
|
||||||
@ -1484,7 +1484,7 @@ bool EditorSettings::is_shortcut(const String &p_name, const Ref<InputEvent> &p_
|
|||||||
|
|
||||||
Ref<ShortCut> EditorSettings::get_shortcut(const String &p_name) const {
|
Ref<ShortCut> EditorSettings::get_shortcut(const String &p_name) const {
|
||||||
|
|
||||||
const Map<String, Ref<ShortCut> >::Element *E = shortcuts.find(p_name);
|
const Map<String, Ref<ShortCut>>::Element *E = shortcuts.find(p_name);
|
||||||
if (!E)
|
if (!E)
|
||||||
return Ref<ShortCut>();
|
return Ref<ShortCut>();
|
||||||
|
|
||||||
@ -1493,7 +1493,7 @@ Ref<ShortCut> EditorSettings::get_shortcut(const String &p_name) const {
|
|||||||
|
|
||||||
void EditorSettings::get_shortcut_list(List<String> *r_shortcuts) {
|
void EditorSettings::get_shortcut_list(List<String> *r_shortcuts) {
|
||||||
|
|
||||||
for (const Map<String, Ref<ShortCut> >::Element *E = shortcuts.front(); E; E = E->next()) {
|
for (const Map<String, Ref<ShortCut>>::Element *E = shortcuts.front(); E; E = E->next()) {
|
||||||
|
|
||||||
r_shortcuts->push_back(E->key());
|
r_shortcuts->push_back(E->key());
|
||||||
}
|
}
|
||||||
|
@ -95,7 +95,7 @@ private:
|
|||||||
int last_order;
|
int last_order;
|
||||||
|
|
||||||
Ref<Resource> clipboard;
|
Ref<Resource> clipboard;
|
||||||
Map<String, Ref<ShortCut> > shortcuts;
|
Map<String, Ref<ShortCut>> shortcuts;
|
||||||
|
|
||||||
String resource_path;
|
String resource_path;
|
||||||
String settings_dir;
|
String settings_dir;
|
||||||
|
@ -1085,10 +1085,10 @@ void FileSystemDock::_try_duplicate_item(const FileOrFolder &p_item, const Strin
|
|||||||
|
|
||||||
void FileSystemDock::_update_resource_paths_after_move(const Map<String, String> &p_renames) const {
|
void FileSystemDock::_update_resource_paths_after_move(const Map<String, String> &p_renames) const {
|
||||||
// Rename all resources loaded, be it subresources or actual resources.
|
// Rename all resources loaded, be it subresources or actual resources.
|
||||||
List<Ref<Resource> > cached;
|
List<Ref<Resource>> cached;
|
||||||
ResourceCache::get_cached_resources(&cached);
|
ResourceCache::get_cached_resources(&cached);
|
||||||
|
|
||||||
for (List<Ref<Resource> >::Element *E = cached.front(); E; E = E->next()) {
|
for (List<Ref<Resource>>::Element *E = cached.front(); E; E = E->next()) {
|
||||||
Ref<Resource> r = E->get();
|
Ref<Resource> r = E->get();
|
||||||
|
|
||||||
String base_path = r->get_path();
|
String base_path = r->get_path();
|
||||||
|
@ -49,7 +49,7 @@ struct ColladaImport {
|
|||||||
Collada collada;
|
Collada collada;
|
||||||
Spatial *scene;
|
Spatial *scene;
|
||||||
|
|
||||||
Vector<Ref<Animation> > animations;
|
Vector<Ref<Animation>> animations;
|
||||||
|
|
||||||
struct NodeMap {
|
struct NodeMap {
|
||||||
//String path;
|
//String path;
|
||||||
@ -73,12 +73,12 @@ struct ColladaImport {
|
|||||||
|
|
||||||
Map<String, NodeMap> node_map; //map from collada node to engine node
|
Map<String, NodeMap> node_map; //map from collada node to engine node
|
||||||
Map<String, String> node_name_map; //map from collada node to engine node
|
Map<String, String> node_name_map; //map from collada node to engine node
|
||||||
Map<String, Ref<ArrayMesh> > mesh_cache;
|
Map<String, Ref<ArrayMesh>> mesh_cache;
|
||||||
Map<String, Ref<Curve3D> > curve_cache;
|
Map<String, Ref<Curve3D>> curve_cache;
|
||||||
Map<String, Ref<Material> > material_cache;
|
Map<String, Ref<Material>> material_cache;
|
||||||
Map<Collada::Node *, Skeleton *> skeleton_map;
|
Map<Collada::Node *, Skeleton *> skeleton_map;
|
||||||
|
|
||||||
Map<Skeleton *, Map<String, int> > skeleton_bone_map;
|
Map<Skeleton *, Map<String, int>> skeleton_bone_map;
|
||||||
|
|
||||||
Set<String> valid_animated_nodes;
|
Set<String> valid_animated_nodes;
|
||||||
Vector<int> valid_animated_properties;
|
Vector<int> valid_animated_properties;
|
||||||
@ -89,7 +89,7 @@ struct ColladaImport {
|
|||||||
Error _create_scene(Collada::Node *p_node, Spatial *p_parent);
|
Error _create_scene(Collada::Node *p_node, Spatial *p_parent);
|
||||||
Error _create_resources(Collada::Node *p_node, bool p_use_compression);
|
Error _create_resources(Collada::Node *p_node, bool p_use_compression);
|
||||||
Error _create_material(const String &p_target);
|
Error _create_material(const String &p_target);
|
||||||
Error _create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_mesh, const Map<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<ArrayMesh> > p_morph_meshes = Vector<Ref<ArrayMesh> >(), bool p_use_compression = false, bool p_use_mesh_material = false);
|
Error _create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_mesh, const Map<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<ArrayMesh>> p_morph_meshes = Vector<Ref<ArrayMesh>>(), bool p_use_compression = false, bool p_use_mesh_material = false);
|
||||||
Error load(const String &p_path, int p_flags, bool p_force_make_tangents = false, bool p_use_compression = false);
|
Error load(const String &p_path, int p_flags, bool p_force_make_tangents = false, bool p_use_compression = false);
|
||||||
void _fix_param_animation_tracks();
|
void _fix_param_animation_tracks();
|
||||||
void create_animation(int p_clip, bool p_make_tracks_in_all_bones, bool p_import_value_tracks);
|
void create_animation(int p_clip, bool p_make_tracks_in_all_bones, bool p_import_value_tracks);
|
||||||
@ -489,7 +489,7 @@ Error ColladaImport::_create_material(const String &p_target) {
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_mesh, const Map<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<ArrayMesh> > p_morph_meshes, bool p_use_compression, bool p_use_mesh_material) {
|
Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_mesh, const Map<String, Collada::NodeGeometry::Material> &p_material_map, const Collada::MeshData &meshdata, const Transform &p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_controller, const Collada::MorphControllerData *p_morph_data, Vector<Ref<ArrayMesh>> p_morph_meshes, bool p_use_compression, bool p_use_mesh_material) {
|
||||||
|
|
||||||
bool local_xform_mirror = p_local_xform.basis.determinant() < 0;
|
bool local_xform_mirror = p_local_xform.basis.determinant() < 0;
|
||||||
|
|
||||||
@ -608,7 +608,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize, Ref<ArrayMesh> &p_me
|
|||||||
/* ADD WEIGHTS IF EXIST */
|
/* ADD WEIGHTS IF EXIST */
|
||||||
/************************/
|
/************************/
|
||||||
|
|
||||||
Map<int, Vector<Collada::Vertex::Weight> > pre_weights;
|
Map<int, Vector<Collada::Vertex::Weight>> pre_weights;
|
||||||
|
|
||||||
bool has_weights = false;
|
bool has_weights = false;
|
||||||
|
|
||||||
@ -1096,7 +1096,7 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres
|
|||||||
String meshid;
|
String meshid;
|
||||||
Transform apply_xform;
|
Transform apply_xform;
|
||||||
Vector<int> bone_remap;
|
Vector<int> bone_remap;
|
||||||
Vector<Ref<ArrayMesh> > morphs;
|
Vector<Ref<ArrayMesh>> morphs;
|
||||||
|
|
||||||
if (ng2->controller) {
|
if (ng2->controller) {
|
||||||
|
|
||||||
@ -1173,7 +1173,7 @@ Error ColladaImport::_create_resources(Collada::Node *p_node, bool p_use_compres
|
|||||||
Ref<ArrayMesh> mesh = Ref<ArrayMesh>(memnew(ArrayMesh));
|
Ref<ArrayMesh> mesh = Ref<ArrayMesh>(memnew(ArrayMesh));
|
||||||
const Collada::MeshData &meshdata = collada.state.mesh_data_map[meshid2];
|
const Collada::MeshData &meshdata = collada.state.mesh_data_map[meshid2];
|
||||||
mesh->set_name(meshdata.name);
|
mesh->set_name(meshdata.name);
|
||||||
Error err = _create_mesh_surfaces(false, mesh, ng2->material_map, meshdata, apply_xform, bone_remap, skin, NULL, Vector<Ref<ArrayMesh> >(), false);
|
Error err = _create_mesh_surfaces(false, mesh, ng2->material_map, meshdata, apply_xform, bone_remap, skin, NULL, Vector<Ref<ArrayMesh>>(), false);
|
||||||
ERR_FAIL_COND_V(err, err);
|
ERR_FAIL_COND_V(err, err);
|
||||||
|
|
||||||
morphs.push_back(mesh);
|
morphs.push_back(mesh);
|
||||||
|
@ -1838,7 +1838,7 @@ Error EditorSceneImporterGLTF::_determine_skeletons(GLTFState &state) {
|
|||||||
skeleton_sets.get_representatives(groups_representatives);
|
skeleton_sets.get_representatives(groups_representatives);
|
||||||
|
|
||||||
Vector<GLTFNodeIndex> highest_group_members;
|
Vector<GLTFNodeIndex> highest_group_members;
|
||||||
Vector<Vector<GLTFNodeIndex> > groups;
|
Vector<Vector<GLTFNodeIndex>> groups;
|
||||||
for (int i = 0; i < groups_representatives.size(); ++i) {
|
for (int i = 0; i < groups_representatives.size(); ++i) {
|
||||||
Vector<GLTFNodeIndex> group;
|
Vector<GLTFNodeIndex> group;
|
||||||
skeleton_sets.get_members(group, groups_representatives[i]);
|
skeleton_sets.get_members(group, groups_representatives[i]);
|
||||||
|
@ -284,7 +284,7 @@ class EditorSceneImporterGLTF : public EditorSceneImporter {
|
|||||||
Channel<Vector3> translation_track;
|
Channel<Vector3> translation_track;
|
||||||
Channel<Quat> rotation_track;
|
Channel<Quat> rotation_track;
|
||||||
Channel<Vector3> scale_track;
|
Channel<Vector3> scale_track;
|
||||||
Vector<Channel<float> > weight_tracks;
|
Vector<Channel<float>> weight_tracks;
|
||||||
};
|
};
|
||||||
|
|
||||||
String name;
|
String name;
|
||||||
@ -302,18 +302,18 @@ class EditorSceneImporterGLTF : public EditorSceneImporter {
|
|||||||
bool use_named_skin_binds;
|
bool use_named_skin_binds;
|
||||||
|
|
||||||
Vector<GLTFNode *> nodes;
|
Vector<GLTFNode *> nodes;
|
||||||
Vector<Vector<uint8_t> > buffers;
|
Vector<Vector<uint8_t>> buffers;
|
||||||
Vector<GLTFBufferView> buffer_views;
|
Vector<GLTFBufferView> buffer_views;
|
||||||
Vector<GLTFAccessor> accessors;
|
Vector<GLTFAccessor> accessors;
|
||||||
|
|
||||||
Vector<GLTFMesh> meshes; //meshes are loaded directly, no reason not to.
|
Vector<GLTFMesh> meshes; //meshes are loaded directly, no reason not to.
|
||||||
Vector<Ref<Material> > materials;
|
Vector<Ref<Material>> materials;
|
||||||
|
|
||||||
String scene_name;
|
String scene_name;
|
||||||
Vector<int> root_nodes;
|
Vector<int> root_nodes;
|
||||||
|
|
||||||
Vector<GLTFTexture> textures;
|
Vector<GLTFTexture> textures;
|
||||||
Vector<Ref<Texture2D> > images;
|
Vector<Ref<Texture2D>> images;
|
||||||
|
|
||||||
Vector<GLTFSkin> skins;
|
Vector<GLTFSkin> skins;
|
||||||
Vector<GLTFCamera> cameras;
|
Vector<GLTFCamera> cameras;
|
||||||
|
@ -96,7 +96,7 @@ Error ResourceImporterCSVTranslation::import(const String &p_source_file, const
|
|||||||
ERR_FAIL_COND_V(line.size() <= 1, ERR_PARSE_ERROR);
|
ERR_FAIL_COND_V(line.size() <= 1, ERR_PARSE_ERROR);
|
||||||
|
|
||||||
Vector<String> locales;
|
Vector<String> locales;
|
||||||
Vector<Ref<Translation> > translations;
|
Vector<Ref<Translation>> translations;
|
||||||
|
|
||||||
for (int i = 1; i < line.size(); i++) {
|
for (int i = 1; i < line.size(); i++) {
|
||||||
|
|
||||||
|
@ -42,7 +42,7 @@ uint32_t EditorOBJImporter::get_import_flags() const {
|
|||||||
return IMPORT_SCENE;
|
return IMPORT_SCENE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Error _parse_material_library(const String &p_path, Map<String, Ref<StandardMaterial3D> > &material_map, List<String> *r_missing_deps) {
|
static Error _parse_material_library(const String &p_path, Map<String, Ref<StandardMaterial3D>> &material_map, List<String> *r_missing_deps) {
|
||||||
|
|
||||||
FileAccessRef f = FileAccess::open(p_path, FileAccess::READ);
|
FileAccessRef f = FileAccess::open(p_path, FileAccess::READ);
|
||||||
ERR_FAIL_COND_V_MSG(!f, ERR_CANT_OPEN, vformat("Couldn't open MTL file '%s', it may not exist or not be readable.", p_path));
|
ERR_FAIL_COND_V_MSG(!f, ERR_CANT_OPEN, vformat("Couldn't open MTL file '%s', it may not exist or not be readable.", p_path));
|
||||||
@ -203,7 +203,7 @@ static Error _parse_material_library(const String &p_path, Map<String, Ref<Stand
|
|||||||
return OK;
|
return OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
static Error _parse_obj(const String &p_path, List<Ref<Mesh> > &r_meshes, bool p_single_mesh, bool p_generate_tangents, bool p_optimize, Vector3 p_scale_mesh, Vector3 p_offset_mesh, List<String> *r_missing_deps) {
|
static Error _parse_obj(const String &p_path, List<Ref<Mesh>> &r_meshes, bool p_single_mesh, bool p_generate_tangents, bool p_optimize, Vector3 p_scale_mesh, Vector3 p_offset_mesh, List<String> *r_missing_deps) {
|
||||||
|
|
||||||
FileAccessRef f = FileAccess::open(p_path, FileAccess::READ);
|
FileAccessRef f = FileAccess::open(p_path, FileAccess::READ);
|
||||||
ERR_FAIL_COND_V_MSG(!f, ERR_CANT_OPEN, vformat("Couldn't open OBJ file '%s', it may not exist or not be readable.", p_path));
|
ERR_FAIL_COND_V_MSG(!f, ERR_CANT_OPEN, vformat("Couldn't open OBJ file '%s', it may not exist or not be readable.", p_path));
|
||||||
@ -221,7 +221,7 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh> > &r_meshes, bool p
|
|||||||
Vector<Vector2> uvs;
|
Vector<Vector2> uvs;
|
||||||
String name;
|
String name;
|
||||||
|
|
||||||
Map<String, Map<String, Ref<StandardMaterial3D> > > material_map;
|
Map<String, Map<String, Ref<StandardMaterial3D>>> material_map;
|
||||||
|
|
||||||
Ref<SurfaceTool> surf_tool = memnew(SurfaceTool);
|
Ref<SurfaceTool> surf_tool = memnew(SurfaceTool);
|
||||||
surf_tool->begin(Mesh::PRIMITIVE_TRIANGLES);
|
surf_tool->begin(Mesh::PRIMITIVE_TRIANGLES);
|
||||||
@ -397,7 +397,7 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh> > &r_meshes, bool p
|
|||||||
|
|
||||||
current_material_library = l.replace("mtllib", "").strip_edges();
|
current_material_library = l.replace("mtllib", "").strip_edges();
|
||||||
if (!material_map.has(current_material_library)) {
|
if (!material_map.has(current_material_library)) {
|
||||||
Map<String, Ref<StandardMaterial3D> > lib;
|
Map<String, Ref<StandardMaterial3D>> lib;
|
||||||
Error err = _parse_material_library(current_material_library, lib, r_missing_deps);
|
Error err = _parse_material_library(current_material_library, lib, r_missing_deps);
|
||||||
if (err == ERR_CANT_OPEN) {
|
if (err == ERR_CANT_OPEN) {
|
||||||
String dir = p_path.get_base_dir();
|
String dir = p_path.get_base_dir();
|
||||||
@ -420,7 +420,7 @@ static Error _parse_obj(const String &p_path, List<Ref<Mesh> > &r_meshes, bool p
|
|||||||
|
|
||||||
Node *EditorOBJImporter::import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) {
|
Node *EditorOBJImporter::import_scene(const String &p_path, uint32_t p_flags, int p_bake_fps, List<String> *r_missing_deps, Error *r_err) {
|
||||||
|
|
||||||
List<Ref<Mesh> > meshes;
|
List<Ref<Mesh>> meshes;
|
||||||
|
|
||||||
Error err = _parse_obj(p_path, meshes, false, p_flags & IMPORT_GENERATE_TANGENT_ARRAYS, p_flags & IMPORT_USE_COMPRESSION, Vector3(1, 1, 1), Vector3(0, 0, 0), r_missing_deps);
|
Error err = _parse_obj(p_path, meshes, false, p_flags & IMPORT_GENERATE_TANGENT_ARRAYS, p_flags & IMPORT_USE_COMPRESSION, Vector3(1, 1, 1), Vector3(0, 0, 0), r_missing_deps);
|
||||||
|
|
||||||
@ -433,7 +433,7 @@ Node *EditorOBJImporter::import_scene(const String &p_path, uint32_t p_flags, in
|
|||||||
|
|
||||||
Spatial *scene = memnew(Spatial);
|
Spatial *scene = memnew(Spatial);
|
||||||
|
|
||||||
for (List<Ref<Mesh> >::Element *E = meshes.front(); E; E = E->next()) {
|
for (List<Ref<Mesh>>::Element *E = meshes.front(); E; E = E->next()) {
|
||||||
|
|
||||||
MeshInstance *mi = memnew(MeshInstance);
|
MeshInstance *mi = memnew(MeshInstance);
|
||||||
mi->set_mesh(E->get());
|
mi->set_mesh(E->get());
|
||||||
@ -500,7 +500,7 @@ bool ResourceImporterOBJ::get_option_visibility(const String &p_option, const Ma
|
|||||||
|
|
||||||
Error ResourceImporterOBJ::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
|
Error ResourceImporterOBJ::import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files, Variant *r_metadata) {
|
||||||
|
|
||||||
List<Ref<Mesh> > meshes;
|
List<Ref<Mesh>> meshes;
|
||||||
|
|
||||||
Error err = _parse_obj(p_source_file, meshes, true, p_options["generate_tangents"], p_options["optimize_mesh"], p_options["scale_mesh"], p_options["offset_mesh"], NULL);
|
Error err = _parse_obj(p_source_file, meshes, true, p_options["generate_tangents"], p_options["optimize_mesh"], p_options["scale_mesh"], p_options["offset_mesh"], NULL);
|
||||||
|
|
||||||
|
@ -170,7 +170,7 @@ String ResourceImporterScene::get_visible_name() const {
|
|||||||
|
|
||||||
void ResourceImporterScene::get_recognized_extensions(List<String> *p_extensions) const {
|
void ResourceImporterScene::get_recognized_extensions(List<String> *p_extensions) const {
|
||||||
|
|
||||||
for (Set<Ref<EditorSceneImporter> >::Element *E = importers.front(); E; E = E->next()) {
|
for (Set<Ref<EditorSceneImporter>>::Element *E = importers.front(); E; E = E->next()) {
|
||||||
E->get()->get_extensions(p_extensions);
|
E->get()->get_extensions(p_extensions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -276,7 +276,7 @@ static String _fixstr(const String &p_what, const String &p_str) {
|
|||||||
return what;
|
return what;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void _gen_shape_list(const Ref<Mesh> &mesh, List<Ref<Shape> > &r_shape_list, bool p_convex) {
|
static void _gen_shape_list(const Ref<Mesh> &mesh, List<Ref<Shape>> &r_shape_list, bool p_convex) {
|
||||||
|
|
||||||
if (!p_convex) {
|
if (!p_convex) {
|
||||||
|
|
||||||
@ -284,7 +284,7 @@ static void _gen_shape_list(const Ref<Mesh> &mesh, List<Ref<Shape> > &r_shape_li
|
|||||||
r_shape_list.push_back(shape);
|
r_shape_list.push_back(shape);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
Vector<Ref<Shape> > cd = mesh->convex_decompose();
|
Vector<Ref<Shape>> cd = mesh->convex_decompose();
|
||||||
if (cd.size()) {
|
if (cd.size()) {
|
||||||
for (int i = 0; i < cd.size(); i++) {
|
for (int i = 0; i < cd.size(); i++) {
|
||||||
r_shape_list.push_back(cd[i]);
|
r_shape_list.push_back(cd[i]);
|
||||||
@ -293,7 +293,7 @@ static void _gen_shape_list(const Ref<Mesh> &mesh, List<Ref<Shape> > &r_shape_li
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>, List<Ref<Shape> > > &collision_map, LightBakeMode p_light_bake_mode) {
|
Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>, List<Ref<Shape>>> &collision_map, LightBakeMode p_light_bake_mode) {
|
||||||
|
|
||||||
// children first
|
// children first
|
||||||
for (int i = 0; i < p_node->get_child_count(); i++) {
|
for (int i = 0; i < p_node->get_child_count(); i++) {
|
||||||
@ -382,7 +382,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>
|
|||||||
Ref<Mesh> mesh = mi->get_mesh();
|
Ref<Mesh> mesh = mi->get_mesh();
|
||||||
|
|
||||||
if (mesh.is_valid()) {
|
if (mesh.is_valid()) {
|
||||||
List<Ref<Shape> > shapes;
|
List<Ref<Shape>> shapes;
|
||||||
String fixed_name;
|
String fixed_name;
|
||||||
if (collision_map.has(mesh)) {
|
if (collision_map.has(mesh)) {
|
||||||
shapes = collision_map[mesh];
|
shapes = collision_map[mesh];
|
||||||
@ -412,7 +412,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>
|
|||||||
p_node = col;
|
p_node = col;
|
||||||
|
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
for (List<Ref<Shape> >::Element *E = shapes.front(); E; E = E->next()) {
|
for (List<Ref<Shape>>::Element *E = shapes.front(); E; E = E->next()) {
|
||||||
|
|
||||||
CollisionShape *cshape = memnew(CollisionShape);
|
CollisionShape *cshape = memnew(CollisionShape);
|
||||||
cshape->set_shape(E->get());
|
cshape->set_shape(E->get());
|
||||||
@ -468,7 +468,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>
|
|||||||
Ref<Mesh> mesh = mi->get_mesh();
|
Ref<Mesh> mesh = mi->get_mesh();
|
||||||
|
|
||||||
if (mesh.is_valid()) {
|
if (mesh.is_valid()) {
|
||||||
List<Ref<Shape> > shapes;
|
List<Ref<Shape>> shapes;
|
||||||
if (collision_map.has(mesh)) {
|
if (collision_map.has(mesh)) {
|
||||||
shapes = collision_map[mesh];
|
shapes = collision_map[mesh];
|
||||||
} else {
|
} else {
|
||||||
@ -486,7 +486,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>
|
|||||||
mi->set_owner(rigid_body->get_owner());
|
mi->set_owner(rigid_body->get_owner());
|
||||||
|
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
for (List<Ref<Shape> >::Element *E = shapes.front(); E; E = E->next()) {
|
for (List<Ref<Shape>>::Element *E = shapes.front(); E; E = E->next()) {
|
||||||
|
|
||||||
CollisionShape *cshape = memnew(CollisionShape);
|
CollisionShape *cshape = memnew(CollisionShape);
|
||||||
cshape->set_shape(E->get());
|
cshape->set_shape(E->get());
|
||||||
@ -505,7 +505,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>
|
|||||||
Ref<Mesh> mesh = mi->get_mesh();
|
Ref<Mesh> mesh = mi->get_mesh();
|
||||||
|
|
||||||
if (mesh.is_valid()) {
|
if (mesh.is_valid()) {
|
||||||
List<Ref<Shape> > shapes;
|
List<Ref<Shape>> shapes;
|
||||||
String fixed_name;
|
String fixed_name;
|
||||||
if (collision_map.has(mesh)) {
|
if (collision_map.has(mesh)) {
|
||||||
shapes = collision_map[mesh];
|
shapes = collision_map[mesh];
|
||||||
@ -536,7 +536,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>
|
|||||||
col->set_owner(mi->get_owner());
|
col->set_owner(mi->get_owner());
|
||||||
|
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
for (List<Ref<Shape> >::Element *E = shapes.front(); E; E = E->next()) {
|
for (List<Ref<Shape>>::Element *E = shapes.front(); E; E = E->next()) {
|
||||||
|
|
||||||
CollisionShape *cshape = memnew(CollisionShape);
|
CollisionShape *cshape = memnew(CollisionShape);
|
||||||
cshape->set_shape(E->get());
|
cshape->set_shape(E->get());
|
||||||
@ -618,7 +618,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>
|
|||||||
Ref<ArrayMesh> mesh = mi->get_mesh();
|
Ref<ArrayMesh> mesh = mi->get_mesh();
|
||||||
if (!mesh.is_null()) {
|
if (!mesh.is_null()) {
|
||||||
|
|
||||||
List<Ref<Shape> > shapes;
|
List<Ref<Shape>> shapes;
|
||||||
if (collision_map.has(mesh)) {
|
if (collision_map.has(mesh)) {
|
||||||
shapes = collision_map[mesh];
|
shapes = collision_map[mesh];
|
||||||
} else if (_teststr(mesh->get_name(), "col")) {
|
} else if (_teststr(mesh->get_name(), "col")) {
|
||||||
@ -638,7 +638,7 @@ Node *ResourceImporterScene::_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>
|
|||||||
col->set_owner(p_node->get_owner());
|
col->set_owner(p_node->get_owner());
|
||||||
|
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
for (List<Ref<Shape> >::Element *E = shapes.front(); E; E = E->next()) {
|
for (List<Ref<Shape>>::Element *E = shapes.front(); E; E = E->next()) {
|
||||||
|
|
||||||
CollisionShape *cshape = memnew(CollisionShape);
|
CollisionShape *cshape = memnew(CollisionShape);
|
||||||
cshape->set_shape(E->get());
|
cshape->set_shape(E->get());
|
||||||
@ -957,7 +957,7 @@ void ResourceImporterScene::_find_meshes(Node *p_node, Map<Ref<ArrayMesh>, Trans
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ResourceImporterScene::_make_external_resources(Node *p_node, const String &p_base_path, bool p_make_animations, bool p_animations_as_text, bool p_keep_animations, bool p_make_materials, bool p_materials_as_text, bool p_keep_materials, bool p_make_meshes, bool p_meshes_as_text, Map<Ref<Animation>, Ref<Animation> > &p_animations, Map<Ref<Material>, Ref<Material> > &p_materials, Map<Ref<ArrayMesh>, Ref<ArrayMesh> > &p_meshes) {
|
void ResourceImporterScene::_make_external_resources(Node *p_node, const String &p_base_path, bool p_make_animations, bool p_animations_as_text, bool p_keep_animations, bool p_make_materials, bool p_materials_as_text, bool p_keep_materials, bool p_make_meshes, bool p_meshes_as_text, Map<Ref<Animation>, Ref<Animation>> &p_animations, Map<Ref<Material>, Ref<Material>> &p_materials, Map<Ref<ArrayMesh>, Ref<ArrayMesh>> &p_meshes) {
|
||||||
|
|
||||||
List<PropertyInfo> pi;
|
List<PropertyInfo> pi;
|
||||||
|
|
||||||
@ -1209,7 +1209,7 @@ Node *ResourceImporterScene::import_scene_from_other_importer(EditorSceneImporte
|
|||||||
Ref<EditorSceneImporter> importer;
|
Ref<EditorSceneImporter> importer;
|
||||||
String ext = p_path.get_extension().to_lower();
|
String ext = p_path.get_extension().to_lower();
|
||||||
|
|
||||||
for (Set<Ref<EditorSceneImporter> >::Element *E = importers.front(); E; E = E->next()) {
|
for (Set<Ref<EditorSceneImporter>>::Element *E = importers.front(); E; E = E->next()) {
|
||||||
|
|
||||||
if (E->get().ptr() == p_exception)
|
if (E->get().ptr() == p_exception)
|
||||||
continue;
|
continue;
|
||||||
@ -1241,7 +1241,7 @@ Ref<Animation> ResourceImporterScene::import_animation_from_other_importer(Edito
|
|||||||
Ref<EditorSceneImporter> importer;
|
Ref<EditorSceneImporter> importer;
|
||||||
String ext = p_path.get_extension().to_lower();
|
String ext = p_path.get_extension().to_lower();
|
||||||
|
|
||||||
for (Set<Ref<EditorSceneImporter> >::Element *E = importers.front(); E; E = E->next()) {
|
for (Set<Ref<EditorSceneImporter>>::Element *E = importers.front(); E; E = E->next()) {
|
||||||
|
|
||||||
if (E->get().ptr() == p_exception)
|
if (E->get().ptr() == p_exception)
|
||||||
continue;
|
continue;
|
||||||
@ -1276,7 +1276,7 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
|
|||||||
EditorProgress progress("import", TTR("Import Scene"), 104);
|
EditorProgress progress("import", TTR("Import Scene"), 104);
|
||||||
progress.step(TTR("Importing Scene..."), 0);
|
progress.step(TTR("Importing Scene..."), 0);
|
||||||
|
|
||||||
for (Set<Ref<EditorSceneImporter> >::Element *E = importers.front(); E; E = E->next()) {
|
for (Set<Ref<EditorSceneImporter>>::Element *E = importers.front(); E; E = E->next()) {
|
||||||
|
|
||||||
List<String> extensions;
|
List<String> extensions;
|
||||||
E->get()->get_extensions(&extensions);
|
E->get()->get_extensions(&extensions);
|
||||||
@ -1368,7 +1368,7 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
|
|||||||
float anim_optimizer_maxang = p_options["animation/optimizer/max_angle"];
|
float anim_optimizer_maxang = p_options["animation/optimizer/max_angle"];
|
||||||
int light_bake_mode = p_options["meshes/light_baking"];
|
int light_bake_mode = p_options["meshes/light_baking"];
|
||||||
|
|
||||||
Map<Ref<Mesh>, List<Ref<Shape> > > collision_map;
|
Map<Ref<Mesh>, List<Ref<Shape>>> collision_map;
|
||||||
|
|
||||||
scene = _fix_node(scene, scene, collision_map, LightBakeMode(light_bake_mode));
|
scene = _fix_node(scene, scene, collision_map, LightBakeMode(light_bake_mode));
|
||||||
|
|
||||||
@ -1456,9 +1456,9 @@ Error ResourceImporterScene::import(const String &p_source_file, const String &p
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (external_animations || external_materials || external_meshes) {
|
if (external_animations || external_materials || external_meshes) {
|
||||||
Map<Ref<Animation>, Ref<Animation> > anim_map;
|
Map<Ref<Animation>, Ref<Animation>> anim_map;
|
||||||
Map<Ref<Material>, Ref<Material> > mat_map;
|
Map<Ref<Material>, Ref<Material>> mat_map;
|
||||||
Map<Ref<ArrayMesh>, Ref<ArrayMesh> > mesh_map;
|
Map<Ref<ArrayMesh>, Ref<ArrayMesh>> mesh_map;
|
||||||
|
|
||||||
bool keep_materials = bool(p_options["materials/keep_on_reimport"]);
|
bool keep_materials = bool(p_options["materials/keep_on_reimport"]);
|
||||||
|
|
||||||
|
@ -93,7 +93,7 @@ public:
|
|||||||
class ResourceImporterScene : public ResourceImporter {
|
class ResourceImporterScene : public ResourceImporter {
|
||||||
GDCLASS(ResourceImporterScene, ResourceImporter);
|
GDCLASS(ResourceImporterScene, ResourceImporter);
|
||||||
|
|
||||||
Set<Ref<EditorSceneImporter> > importers;
|
Set<Ref<EditorSceneImporter>> importers;
|
||||||
|
|
||||||
static ResourceImporterScene *singleton;
|
static ResourceImporterScene *singleton;
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ class ResourceImporterScene : public ResourceImporter {
|
|||||||
public:
|
public:
|
||||||
static ResourceImporterScene *get_singleton() { return singleton; }
|
static ResourceImporterScene *get_singleton() { return singleton; }
|
||||||
|
|
||||||
const Set<Ref<EditorSceneImporter> > &get_importers() const { return importers; }
|
const Set<Ref<EditorSceneImporter>> &get_importers() const { return importers; }
|
||||||
|
|
||||||
void add_importer(Ref<EditorSceneImporter> p_importer) { importers.insert(p_importer); }
|
void add_importer(Ref<EditorSceneImporter> p_importer) { importers.insert(p_importer); }
|
||||||
void remove_importer(Ref<EditorSceneImporter> p_importer) { importers.erase(p_importer); }
|
void remove_importer(Ref<EditorSceneImporter> p_importer) { importers.erase(p_importer); }
|
||||||
@ -145,9 +145,9 @@ public:
|
|||||||
|
|
||||||
void _find_meshes(Node *p_node, Map<Ref<ArrayMesh>, Transform> &meshes);
|
void _find_meshes(Node *p_node, Map<Ref<ArrayMesh>, Transform> &meshes);
|
||||||
|
|
||||||
void _make_external_resources(Node *p_node, const String &p_base_path, bool p_make_animations, bool p_animations_as_text, bool p_keep_animations, bool p_make_materials, bool p_materials_as_text, bool p_keep_materials, bool p_make_meshes, bool p_meshes_as_text, Map<Ref<Animation>, Ref<Animation> > &p_animations, Map<Ref<Material>, Ref<Material> > &p_materials, Map<Ref<ArrayMesh>, Ref<ArrayMesh> > &p_meshes);
|
void _make_external_resources(Node *p_node, const String &p_base_path, bool p_make_animations, bool p_animations_as_text, bool p_keep_animations, bool p_make_materials, bool p_materials_as_text, bool p_keep_materials, bool p_make_meshes, bool p_meshes_as_text, Map<Ref<Animation>, Ref<Animation>> &p_animations, Map<Ref<Material>, Ref<Material>> &p_materials, Map<Ref<ArrayMesh>, Ref<ArrayMesh>> &p_meshes);
|
||||||
|
|
||||||
Node *_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>, List<Ref<Shape> > > &collision_map, LightBakeMode p_light_bake_mode);
|
Node *_fix_node(Node *p_node, Node *p_root, Map<Ref<Mesh>, List<Ref<Shape>>> &collision_map, LightBakeMode p_light_bake_mode);
|
||||||
|
|
||||||
void _create_clips(Node *scene, const Array &p_clips, bool p_bake_all);
|
void _create_clips(Node *scene, const Array &p_clips, bool p_bake_all);
|
||||||
void _filter_anim_tracks(Ref<Animation> anim, Set<String> &keep);
|
void _filter_anim_tracks(Ref<Animation> anim, Set<String> &keep);
|
||||||
|
@ -192,7 +192,7 @@ static void _plot_triangle(Vector2 *vertices, const Vector2 &p_offset, bool p_tr
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file, const Map<String, Map<StringName, Variant> > &p_source_file_options, const Map<String, String> &p_base_paths) {
|
Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file, const Map<String, Map<StringName, Variant>> &p_source_file_options, const Map<String, String> &p_base_paths) {
|
||||||
|
|
||||||
ERR_FAIL_COND_V(p_source_file_options.size() == 0, ERR_BUG); //should never happen
|
ERR_FAIL_COND_V(p_source_file_options.size() == 0, ERR_BUG); //should never happen
|
||||||
|
|
||||||
@ -202,7 +202,7 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file
|
|||||||
pack_data_files.resize(p_source_file_options.size());
|
pack_data_files.resize(p_source_file_options.size());
|
||||||
|
|
||||||
int idx = 0;
|
int idx = 0;
|
||||||
for (const Map<String, Map<StringName, Variant> >::Element *E = p_source_file_options.front(); E; E = E->next(), idx++) {
|
for (const Map<String, Map<StringName, Variant>>::Element *E = p_source_file_options.front(); E; E = E->next(), idx++) {
|
||||||
|
|
||||||
PackData &pack_data = pack_data_files.write[idx];
|
PackData &pack_data = pack_data_files.write[idx];
|
||||||
const String &source = E->key();
|
const String &source = E->key();
|
||||||
@ -251,7 +251,7 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file
|
|||||||
Ref<BitMap> bit_map;
|
Ref<BitMap> bit_map;
|
||||||
bit_map.instance();
|
bit_map.instance();
|
||||||
bit_map->create_from_image_alpha(image);
|
bit_map->create_from_image_alpha(image);
|
||||||
Vector<Vector<Vector2> > polygons = bit_map->clip_opaque_to_polygons(Rect2(0, 0, image->get_width(), image->get_height()));
|
Vector<Vector<Vector2>> polygons = bit_map->clip_opaque_to_polygons(Rect2(0, 0, image->get_width(), image->get_height()));
|
||||||
|
|
||||||
for (int j = 0; j < polygons.size(); j++) {
|
for (int j = 0; j < polygons.size(); j++) {
|
||||||
|
|
||||||
@ -323,7 +323,7 @@ Error ResourceImporterTextureAtlas::import_group_file(const String &p_group_file
|
|||||||
|
|
||||||
//save the images
|
//save the images
|
||||||
idx = 0;
|
idx = 0;
|
||||||
for (const Map<String, Map<StringName, Variant> >::Element *E = p_source_file_options.front(); E; E = E->next(), idx++) {
|
for (const Map<String, Map<StringName, Variant>>::Element *E = p_source_file_options.front(); E; E = E->next(), idx++) {
|
||||||
|
|
||||||
PackData &pack_data = pack_data_files.write[idx];
|
PackData &pack_data = pack_data_files.write[idx];
|
||||||
|
|
||||||
|
@ -40,7 +40,7 @@ class ResourceImporterTextureAtlas : public ResourceImporter {
|
|||||||
Rect2 region;
|
Rect2 region;
|
||||||
bool is_mesh;
|
bool is_mesh;
|
||||||
Vector<int> chart_pieces; //one for region, many for mesh
|
Vector<int> chart_pieces; //one for region, many for mesh
|
||||||
Vector<Vector<Vector2> > chart_vertices; //for mesh
|
Vector<Vector<Vector2>> chart_vertices; //for mesh
|
||||||
Ref<Image> image;
|
Ref<Image> image;
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -64,7 +64,7 @@ public:
|
|||||||
virtual String get_option_group_file() const;
|
virtual String get_option_group_file() const;
|
||||||
|
|
||||||
virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL, Variant *r_metadata = NULL);
|
virtual Error import(const String &p_source_file, const String &p_save_path, const Map<StringName, Variant> &p_options, List<String> *r_platform_variants, List<String> *r_gen_files = NULL, Variant *r_metadata = NULL);
|
||||||
virtual Error import_group_file(const String &p_group_file, const Map<String, Map<StringName, Variant> > &p_source_file_options, const Map<String, String> &p_base_paths);
|
virtual Error import_group_file(const String &p_group_file, const Map<String, Map<StringName, Variant>> &p_source_file_options, const Map<String, String> &p_base_paths);
|
||||||
|
|
||||||
ResourceImporterTextureAtlas();
|
ResourceImporterTextureAtlas();
|
||||||
};
|
};
|
||||||
|
@ -112,19 +112,19 @@ void ImportDock::set_edit_path(const String &p_path) {
|
|||||||
|
|
||||||
_update_options(config);
|
_update_options(config);
|
||||||
|
|
||||||
List<Ref<ResourceImporter> > importers;
|
List<Ref<ResourceImporter>> importers;
|
||||||
ResourceFormatImporter::get_singleton()->get_importers_for_extension(p_path.get_extension(), &importers);
|
ResourceFormatImporter::get_singleton()->get_importers_for_extension(p_path.get_extension(), &importers);
|
||||||
List<Pair<String, String> > importer_names;
|
List<Pair<String, String>> importer_names;
|
||||||
|
|
||||||
for (List<Ref<ResourceImporter> >::Element *E = importers.front(); E; E = E->next()) {
|
for (List<Ref<ResourceImporter>>::Element *E = importers.front(); E; E = E->next()) {
|
||||||
importer_names.push_back(Pair<String, String>(E->get()->get_visible_name(), E->get()->get_importer_name()));
|
importer_names.push_back(Pair<String, String>(E->get()->get_visible_name(), E->get()->get_importer_name()));
|
||||||
}
|
}
|
||||||
|
|
||||||
importer_names.sort_custom<PairSort<String, String> >();
|
importer_names.sort_custom<PairSort<String, String>>();
|
||||||
|
|
||||||
import_as->clear();
|
import_as->clear();
|
||||||
|
|
||||||
for (List<Pair<String, String> >::Element *E = importer_names.front(); E; E = E->next()) {
|
for (List<Pair<String, String>>::Element *E = importer_names.front(); E; E = E->next()) {
|
||||||
import_as->add_item(E->get().first);
|
import_as->add_item(E->get().first);
|
||||||
import_as->set_item_metadata(import_as->get_item_count() - 1, E->get().second);
|
import_as->set_item_metadata(import_as->get_item_count() - 1, E->get().second);
|
||||||
if (E->get().second == params->importer->get_importer_name()) {
|
if (E->get().second == params->importer->get_importer_name()) {
|
||||||
@ -240,19 +240,19 @@ void ImportDock::set_edit_multiple_paths(const Vector<String> &p_paths) {
|
|||||||
|
|
||||||
params->update();
|
params->update();
|
||||||
|
|
||||||
List<Ref<ResourceImporter> > importers;
|
List<Ref<ResourceImporter>> importers;
|
||||||
ResourceFormatImporter::get_singleton()->get_importers_for_extension(p_paths[0].get_extension(), &importers);
|
ResourceFormatImporter::get_singleton()->get_importers_for_extension(p_paths[0].get_extension(), &importers);
|
||||||
List<Pair<String, String> > importer_names;
|
List<Pair<String, String>> importer_names;
|
||||||
|
|
||||||
for (List<Ref<ResourceImporter> >::Element *E = importers.front(); E; E = E->next()) {
|
for (List<Ref<ResourceImporter>>::Element *E = importers.front(); E; E = E->next()) {
|
||||||
importer_names.push_back(Pair<String, String>(E->get()->get_visible_name(), E->get()->get_importer_name()));
|
importer_names.push_back(Pair<String, String>(E->get()->get_visible_name(), E->get()->get_importer_name()));
|
||||||
}
|
}
|
||||||
|
|
||||||
importer_names.sort_custom<PairSort<String, String> >();
|
importer_names.sort_custom<PairSort<String, String>>();
|
||||||
|
|
||||||
import_as->clear();
|
import_as->clear();
|
||||||
|
|
||||||
for (List<Pair<String, String> >::Element *E = importer_names.front(); E; E = E->next()) {
|
for (List<Pair<String, String>>::Element *E = importer_names.front(); E; E = E->next()) {
|
||||||
import_as->add_item(E->get().first);
|
import_as->add_item(E->get().first);
|
||||||
import_as->set_item_metadata(import_as->get_item_count() - 1, E->get().second);
|
import_as->set_item_metadata(import_as->get_item_count() - 1, E->get().second);
|
||||||
if (E->get().second == params->importer->get_importer_name()) {
|
if (E->get().second == params->importer->get_importer_name()) {
|
||||||
|
@ -536,7 +536,7 @@ bool AnimationNodeBlendTreeEditor::_update_filters(const Ref<AnimationNode> &ano
|
|||||||
updating = true;
|
updating = true;
|
||||||
|
|
||||||
Set<String> paths;
|
Set<String> paths;
|
||||||
HashMap<String, Set<String> > types;
|
HashMap<String, Set<String>> types;
|
||||||
{
|
{
|
||||||
List<StringName> animations;
|
List<StringName> animations;
|
||||||
player->get_animation_list(&animations);
|
player->get_animation_list(&animations);
|
||||||
|
@ -2028,7 +2028,7 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
|
|||||||
if (m.is_valid()) {
|
if (m.is_valid()) {
|
||||||
|
|
||||||
// Save the ik chain for reapplying before IK solve
|
// Save the ik chain for reapplying before IK solve
|
||||||
Vector<List<Dictionary> > all_bones_ik_states;
|
Vector<List<Dictionary>> all_bones_ik_states;
|
||||||
for (List<CanvasItem *>::Element *E = drag_selection.front(); E; E = E->next()) {
|
for (List<CanvasItem *>::Element *E = drag_selection.front(); E; E = E->next()) {
|
||||||
List<Dictionary> bones_ik_states;
|
List<Dictionary> bones_ik_states;
|
||||||
_save_canvas_item_ik_chain(E->get(), NULL, &bones_ik_states);
|
_save_canvas_item_ik_chain(E->get(), NULL, &bones_ik_states);
|
||||||
@ -2130,7 +2130,7 @@ bool CanvasItemEditor::_gui_input_move(const Ref<InputEvent> &p_event) {
|
|||||||
if (drag_selection.size() > 0) {
|
if (drag_selection.size() > 0) {
|
||||||
|
|
||||||
// Save the ik chain for reapplying before IK solve
|
// Save the ik chain for reapplying before IK solve
|
||||||
Vector<List<Dictionary> > all_bones_ik_states;
|
Vector<List<Dictionary>> all_bones_ik_states;
|
||||||
for (List<CanvasItem *>::Element *E = drag_selection.front(); E; E = E->next()) {
|
for (List<CanvasItem *>::Element *E = drag_selection.front(); E; E = E->next()) {
|
||||||
List<Dictionary> bones_ik_states;
|
List<Dictionary> bones_ik_states;
|
||||||
_save_canvas_item_ik_chain(E->get(), NULL, &bones_ik_states);
|
_save_canvas_item_ik_chain(E->get(), NULL, &bones_ik_states);
|
||||||
|
@ -196,7 +196,7 @@ void MeshInstanceEditor::_menu_option(int p_option) {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector<Ref<Shape> > shapes = mesh->convex_decompose();
|
Vector<Ref<Shape>> shapes = mesh->convex_decompose();
|
||||||
|
|
||||||
if (!shapes.size()) {
|
if (!shapes.size()) {
|
||||||
err_dialog->set_text(TTR("Couldn't create any collision shapes."));
|
err_dialog->set_text(TTR("Couldn't create any collision shapes."));
|
||||||
|
@ -170,7 +170,7 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
|
|||||||
|
|
||||||
if (1) {
|
if (1) {
|
||||||
|
|
||||||
Vector<Ref<Mesh> > meshes;
|
Vector<Ref<Mesh>> meshes;
|
||||||
Vector<Transform> transforms;
|
Vector<Transform> transforms;
|
||||||
Vector<int> ids = p_library->get_item_list();
|
Vector<int> ids = p_library->get_item_list();
|
||||||
for (int i = 0; i < ids.size(); i++) {
|
for (int i = 0; i < ids.size(); i++) {
|
||||||
@ -182,7 +182,7 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Vector<Ref<Texture2D> > textures = EditorInterface::get_singleton()->make_mesh_previews(meshes, &transforms, EditorSettings::get_singleton()->get("editors/grid_map/preview_size"));
|
Vector<Ref<Texture2D>> textures = EditorInterface::get_singleton()->make_mesh_previews(meshes, &transforms, EditorSettings::get_singleton()->get("editors/grid_map/preview_size"));
|
||||||
int j = 0;
|
int j = 0;
|
||||||
for (int i = 0; i < ids.size(); i++) {
|
for (int i = 0; i < ids.size(); i++) {
|
||||||
|
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user