Style: Partially apply clang-tidy's `cppcoreguidelines-pro-type-member-init`
Didn't commit all the changes where it wants to initialize a struct with `{}`. Should be reviewed in a separate PR. Option `IgnoreArrays` enabled for now to be conservative, can be disabled to see if it proposes more useful changes. Also fixed manually a handful of other missing initializations / moved some from constructors.
This commit is contained in:
parent
dd06cb90c5
commit
c273ddc3ee
|
@ -1,5 +1,5 @@
|
||||||
---
|
---
|
||||||
Checks: 'clang-diagnostic-*,clang-analyzer-*,-*,modernize-redundant-void-arg,modernize-use-bool-literals,modernize-use-default-member-init,modernize-use-nullptr,readability-braces-around-statements,readability-redundant-member-init'
|
Checks: 'clang-diagnostic-*,clang-analyzer-*,-*,cppcoreguidelines-pro-type-member-init,modernize-redundant-void-arg,modernize-use-bool-literals,modernize-use-default-member-init,modernize-use-nullptr,readability-braces-around-statements,readability-redundant-member-init'
|
||||||
WarningsAsErrors: ''
|
WarningsAsErrors: ''
|
||||||
HeaderFilterRegex: ''
|
HeaderFilterRegex: ''
|
||||||
AnalyzeTemporaryDtors: false
|
AnalyzeTemporaryDtors: false
|
||||||
|
@ -13,6 +13,10 @@ CheckOptions:
|
||||||
value: '1'
|
value: '1'
|
||||||
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
|
- key: cppcoreguidelines-non-private-member-variables-in-classes.IgnoreClassesWithAllMemberVariablesBeingPublic
|
||||||
value: '1'
|
value: '1'
|
||||||
|
- key: cppcoreguidelines-pro-type-member-init.IgnoreArrays
|
||||||
|
value: '1'
|
||||||
|
- key: cppcoreguidelines-pro-type-member-init.UseAssignment
|
||||||
|
value: '1'
|
||||||
- key: google-readability-function-size.StatementThreshold
|
- key: google-readability-function-size.StatementThreshold
|
||||||
value: '800'
|
value: '800'
|
||||||
- key: google-readability-namespace-comments.ShortNamespaceLines
|
- key: google-readability-namespace-comments.ShortNamespaceLines
|
||||||
|
|
|
@ -321,9 +321,9 @@ bool ProjectSettings::_get(const StringName &p_name, Variant &r_ret) const {
|
||||||
|
|
||||||
struct _VCSort {
|
struct _VCSort {
|
||||||
String name;
|
String name;
|
||||||
Variant::Type type;
|
Variant::Type type = Variant::VARIANT_MAX;
|
||||||
int order;
|
int order = 0;
|
||||||
uint32_t flags;
|
uint32_t flags = 0;
|
||||||
|
|
||||||
bool operator<(const _VCSort &p_vcs) const { return order == p_vcs.order ? name < p_vcs.name : order < p_vcs.order; }
|
bool operator<(const _VCSort &p_vcs) const { return order == p_vcs.order ? name < p_vcs.name : order < p_vcs.order; }
|
||||||
};
|
};
|
||||||
|
|
|
@ -41,7 +41,7 @@ struct _CoreConstant {
|
||||||
StringName enum_name;
|
StringName enum_name;
|
||||||
bool ignore_value_in_docs = false;
|
bool ignore_value_in_docs = false;
|
||||||
#endif
|
#endif
|
||||||
const char *name;
|
const char *name = nullptr;
|
||||||
int value = 0;
|
int value = 0;
|
||||||
|
|
||||||
_CoreConstant() {}
|
_CoreConstant() {}
|
||||||
|
|
|
@ -113,10 +113,10 @@ private:
|
||||||
int mouse_from_touch_index = -1;
|
int mouse_from_touch_index = -1;
|
||||||
|
|
||||||
struct VelocityTrack {
|
struct VelocityTrack {
|
||||||
uint64_t last_tick;
|
uint64_t last_tick = 0;
|
||||||
Vector2 velocity;
|
Vector2 velocity;
|
||||||
Vector2 accum;
|
Vector2 accum;
|
||||||
float accum_t;
|
float accum_t = 0.0f;
|
||||||
float min_ref_frame;
|
float min_ref_frame;
|
||||||
float max_ref_frame;
|
float max_ref_frame;
|
||||||
|
|
||||||
|
|
|
@ -86,15 +86,15 @@ class FileAccessNetwork : public FileAccess {
|
||||||
Semaphore page_sem;
|
Semaphore page_sem;
|
||||||
Mutex buffer_mutex;
|
Mutex buffer_mutex;
|
||||||
bool opened = false;
|
bool opened = false;
|
||||||
uint64_t total_size;
|
uint64_t total_size = 0;
|
||||||
mutable uint64_t pos = 0;
|
mutable uint64_t pos = 0;
|
||||||
int32_t id;
|
int32_t id = -1;
|
||||||
mutable bool eof_flag = false;
|
mutable bool eof_flag = false;
|
||||||
mutable int32_t last_page = -1;
|
mutable int32_t last_page = -1;
|
||||||
mutable uint8_t *last_page_buff = nullptr;
|
mutable uint8_t *last_page_buff = nullptr;
|
||||||
|
|
||||||
int32_t page_size;
|
int32_t page_size = 0;
|
||||||
int32_t read_ahead;
|
int32_t read_ahead = 0;
|
||||||
|
|
||||||
mutable int waiting_on_page = -1;
|
mutable int waiting_on_page = -1;
|
||||||
|
|
||||||
|
@ -108,7 +108,8 @@ class FileAccessNetwork : public FileAccess {
|
||||||
|
|
||||||
mutable Error response;
|
mutable Error response;
|
||||||
|
|
||||||
uint64_t exists_modtime;
|
uint64_t exists_modtime = 0;
|
||||||
|
|
||||||
friend class FileAccessNetworkClient;
|
friend class FileAccessNetworkClient;
|
||||||
void _queue_page(int32_t p_page) const;
|
void _queue_page(int32_t p_page) const;
|
||||||
void _respond(uint64_t p_len, Error p_status);
|
void _respond(uint64_t p_len, Error p_status);
|
||||||
|
|
|
@ -80,7 +80,7 @@ class FileAccessZip : public FileAccess {
|
||||||
unzFile zfile = nullptr;
|
unzFile zfile = nullptr;
|
||||||
unz_file_info64 file_info;
|
unz_file_info64 file_info;
|
||||||
|
|
||||||
mutable bool at_eof;
|
mutable bool at_eof = false;
|
||||||
|
|
||||||
void _close();
|
void _close();
|
||||||
|
|
||||||
|
|
|
@ -74,8 +74,7 @@ struct _IP_ResolverPrivate {
|
||||||
Semaphore sem;
|
Semaphore sem;
|
||||||
|
|
||||||
Thread thread;
|
Thread thread;
|
||||||
//Semaphore* semaphore;
|
bool thread_abort = false;
|
||||||
bool thread_abort;
|
|
||||||
|
|
||||||
void resolve_queues() {
|
void resolve_queues() {
|
||||||
for (int i = 0; i < IP::RESOLVER_MAX_QUERIES; i++) {
|
for (int i = 0; i < IP::RESOLVER_MAX_QUERIES; i++) {
|
||||||
|
|
|
@ -666,7 +666,7 @@ public:
|
||||||
face_pool.reset(true);
|
face_pool.reset(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
Vertex *vertex_list;
|
Vertex *vertex_list = nullptr;
|
||||||
|
|
||||||
void compute(const Vector3 *p_coords, int32_t p_count);
|
void compute(const Vector3 *p_coords, int32_t p_count);
|
||||||
|
|
||||||
|
|
|
@ -74,14 +74,14 @@ Vector<Vector<Vector2>> Geometry2D::decompose_polygon_in_convex(Vector<Point2> p
|
||||||
struct _AtlasWorkRect {
|
struct _AtlasWorkRect {
|
||||||
Size2i s;
|
Size2i s;
|
||||||
Point2i p;
|
Point2i p;
|
||||||
int idx;
|
int idx = 0;
|
||||||
_FORCE_INLINE_ bool operator<(const _AtlasWorkRect &p_r) const { return s.width > p_r.s.width; };
|
_FORCE_INLINE_ bool operator<(const _AtlasWorkRect &p_r) const { return s.width > p_r.s.width; };
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _AtlasWorkRectResult {
|
struct _AtlasWorkRectResult {
|
||||||
Vector<_AtlasWorkRect> result;
|
Vector<_AtlasWorkRect> result;
|
||||||
int max_w;
|
int max_w = 0;
|
||||||
int max_h;
|
int max_h = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
void Geometry2D::make_atlas(const Vector<Size2i> &p_rects, Vector<Point2i> &r_result, Size2i &r_size) {
|
void Geometry2D::make_atlas(const Vector<Size2i> &p_rects, Vector<Point2i> &r_result, Size2i &r_size) {
|
||||||
|
|
|
@ -61,8 +61,8 @@ static int __bsr_clz32(uint32_t x) {
|
||||||
|
|
||||||
class RandomPCG {
|
class RandomPCG {
|
||||||
pcg32_random_t pcg;
|
pcg32_random_t pcg;
|
||||||
uint64_t current_seed; // The seed the current generator state started from.
|
uint64_t current_seed = 0; // The seed the current generator state started from.
|
||||||
uint64_t current_inc;
|
uint64_t current_inc = 0;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
static const uint64_t DEFAULT_SEED = 12047754176567800795U;
|
static const uint64_t DEFAULT_SEED = 12047754176567800795U;
|
||||||
|
|
|
@ -54,7 +54,6 @@ class OS {
|
||||||
bool _single_window = false;
|
bool _single_window = false;
|
||||||
String _local_clipboard;
|
String _local_clipboard;
|
||||||
int _exit_code = EXIT_FAILURE; // unexpected exit is marked as failure
|
int _exit_code = EXIT_FAILURE; // unexpected exit is marked as failure
|
||||||
int _orientation;
|
|
||||||
bool _allow_hidpi = false;
|
bool _allow_hidpi = false;
|
||||||
bool _allow_layered = false;
|
bool _allow_layered = false;
|
||||||
bool _stdout_enabled = true;
|
bool _stdout_enabled = true;
|
||||||
|
@ -68,7 +67,7 @@ class OS {
|
||||||
// for the user interface we keep a record of the current display driver
|
// for the user interface we keep a record of the current display driver
|
||||||
// so we can retrieve the rendering drivers available
|
// so we can retrieve the rendering drivers available
|
||||||
int _display_driver_id = -1;
|
int _display_driver_id = -1;
|
||||||
String _current_rendering_driver_name = "";
|
String _current_rendering_driver_name;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void _set_logger(CompositeLogger *p_logger);
|
void _set_logger(CompositeLogger *p_logger);
|
||||||
|
|
|
@ -77,20 +77,20 @@ private:
|
||||||
|
|
||||||
Entry *entry_array = nullptr;
|
Entry *entry_array = nullptr;
|
||||||
int *entry_indices = nullptr;
|
int *entry_indices = nullptr;
|
||||||
int entry_max;
|
int entry_max = 0;
|
||||||
int entry_count;
|
int entry_count = 0;
|
||||||
|
|
||||||
uint8_t *pool = nullptr;
|
uint8_t *pool = nullptr;
|
||||||
void *mem_ptr = nullptr;
|
void *mem_ptr = nullptr;
|
||||||
int pool_size;
|
int pool_size = 0;
|
||||||
|
|
||||||
int free_mem;
|
int free_mem = 0;
|
||||||
int free_mem_peak;
|
int free_mem_peak = 0;
|
||||||
|
|
||||||
unsigned int check_count;
|
unsigned int check_count = 0;
|
||||||
int align;
|
int align = 1;
|
||||||
|
|
||||||
bool needs_locking;
|
bool needs_locking = false;
|
||||||
|
|
||||||
inline int entry_end(const Entry &p_entry) const {
|
inline int entry_end(const Entry &p_entry) const {
|
||||||
return p_entry.pos + aligned(p_entry.len);
|
return p_entry.pos + aligned(p_entry.len);
|
||||||
|
|
|
@ -37,9 +37,9 @@ extern "C" {
|
||||||
}
|
}
|
||||||
|
|
||||||
struct CompressedString {
|
struct CompressedString {
|
||||||
int orig_len;
|
int orig_len = 0;
|
||||||
CharString compressed;
|
CharString compressed;
|
||||||
int offset;
|
int offset = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
void OptimizedTranslation::generate(const Ref<Translation> &p_from) {
|
void OptimizedTranslation::generate(const Ref<Translation> &p_from) {
|
||||||
|
|
|
@ -949,20 +949,20 @@ struct _VariantCall {
|
||||||
_VariantCall::ConstantData *_VariantCall::constant_data = nullptr;
|
_VariantCall::ConstantData *_VariantCall::constant_data = nullptr;
|
||||||
|
|
||||||
struct VariantBuiltInMethodInfo {
|
struct VariantBuiltInMethodInfo {
|
||||||
void (*call)(Variant *base, const Variant **p_args, int p_argcount, Variant &r_ret, const Vector<Variant> &p_defvals, Callable::CallError &r_error);
|
void (*call)(Variant *base, const Variant **p_args, int p_argcount, Variant &r_ret, const Vector<Variant> &p_defvals, Callable::CallError &r_error) = nullptr;
|
||||||
Variant::ValidatedBuiltInMethod validated_call;
|
Variant::ValidatedBuiltInMethod validated_call = nullptr;
|
||||||
Variant::PTRBuiltInMethod ptrcall;
|
Variant::PTRBuiltInMethod ptrcall = nullptr;
|
||||||
|
|
||||||
Vector<Variant> default_arguments;
|
Vector<Variant> default_arguments;
|
||||||
Vector<String> argument_names;
|
Vector<String> argument_names;
|
||||||
|
|
||||||
bool is_const;
|
bool is_const = false;
|
||||||
bool is_static;
|
bool is_static = false;
|
||||||
bool has_return_type;
|
bool has_return_type = false;
|
||||||
bool is_vararg;
|
bool is_vararg = false;
|
||||||
Variant::Type return_type;
|
Variant::Type return_type;
|
||||||
int argument_count;
|
int argument_count = 0;
|
||||||
Variant::Type (*get_argument_type)(int p_arg);
|
Variant::Type (*get_argument_type)(int p_arg) = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef OAHashMap<StringName, VariantBuiltInMethodInfo> BuiltinMethodMap;
|
typedef OAHashMap<StringName, VariantBuiltInMethodInfo> BuiltinMethodMap;
|
||||||
|
|
|
@ -31,11 +31,11 @@
|
||||||
#include "variant_construct.h"
|
#include "variant_construct.h"
|
||||||
|
|
||||||
struct VariantConstructData {
|
struct VariantConstructData {
|
||||||
void (*construct)(Variant &r_base, const Variant **p_args, Callable::CallError &r_error);
|
void (*construct)(Variant &r_base, const Variant **p_args, Callable::CallError &r_error) = nullptr;
|
||||||
Variant::ValidatedConstructor validated_construct;
|
Variant::ValidatedConstructor validated_construct = nullptr;
|
||||||
Variant::PTRConstructor ptr_construct;
|
Variant::PTRConstructor ptr_construct = nullptr;
|
||||||
Variant::Type (*get_argument_type)(int);
|
Variant::Type (*get_argument_type)(int) = nullptr;
|
||||||
int argument_count;
|
int argument_count = 0;
|
||||||
Vector<String> arg_names;
|
Vector<String> arg_names;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -805,16 +805,16 @@ INDEXED_SETGET_STRUCT_TYPED(PackedColorArray, Color)
|
||||||
INDEXED_SETGET_STRUCT_DICT(Dictionary)
|
INDEXED_SETGET_STRUCT_DICT(Dictionary)
|
||||||
|
|
||||||
struct VariantIndexedSetterGetterInfo {
|
struct VariantIndexedSetterGetterInfo {
|
||||||
void (*setter)(Variant *base, int64_t index, const Variant *value, bool *valid, bool *oob);
|
void (*setter)(Variant *base, int64_t index, const Variant *value, bool *valid, bool *oob) = nullptr;
|
||||||
void (*getter)(const Variant *base, int64_t index, Variant *value, bool *oob);
|
void (*getter)(const Variant *base, int64_t index, Variant *value, bool *oob) = nullptr;
|
||||||
|
|
||||||
Variant::ValidatedIndexedSetter validated_setter;
|
Variant::ValidatedIndexedSetter validated_setter = nullptr;
|
||||||
Variant::ValidatedIndexedGetter validated_getter;
|
Variant::ValidatedIndexedGetter validated_getter = nullptr;
|
||||||
|
|
||||||
Variant::PTRIndexedSetter ptr_setter;
|
Variant::PTRIndexedSetter ptr_setter = nullptr;
|
||||||
Variant::PTRIndexedGetter ptr_getter;
|
Variant::PTRIndexedGetter ptr_getter = nullptr;
|
||||||
|
|
||||||
uint64_t (*get_indexed_size)(const Variant *base);
|
uint64_t (*get_indexed_size)(const Variant *base) = nullptr;
|
||||||
|
|
||||||
Variant::Type index_type;
|
Variant::Type index_type;
|
||||||
|
|
||||||
|
@ -1018,13 +1018,13 @@ struct VariantKeyedSetGetObject {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct VariantKeyedSetterGetterInfo {
|
struct VariantKeyedSetterGetterInfo {
|
||||||
Variant::ValidatedKeyedSetter validated_setter;
|
Variant::ValidatedKeyedSetter validated_setter = nullptr;
|
||||||
Variant::ValidatedKeyedGetter validated_getter;
|
Variant::ValidatedKeyedGetter validated_getter = nullptr;
|
||||||
Variant::ValidatedKeyedChecker validated_checker;
|
Variant::ValidatedKeyedChecker validated_checker = nullptr;
|
||||||
|
|
||||||
Variant::PTRKeyedSetter ptr_setter;
|
Variant::PTRKeyedSetter ptr_setter = nullptr;
|
||||||
Variant::PTRKeyedGetter ptr_getter;
|
Variant::PTRKeyedGetter ptr_getter = nullptr;
|
||||||
Variant::PTRKeyedChecker ptr_checker;
|
Variant::PTRKeyedChecker ptr_checker = nullptr;
|
||||||
|
|
||||||
bool valid = false;
|
bool valid = false;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1110,14 +1110,14 @@ static _FORCE_INLINE_ Variant::Type get_ret_type_helper(void (*p_func)(P...)) {
|
||||||
register_utility_function<Func_##m_func>(#m_func, m_args)
|
register_utility_function<Func_##m_func>(#m_func, m_args)
|
||||||
|
|
||||||
struct VariantUtilityFunctionInfo {
|
struct VariantUtilityFunctionInfo {
|
||||||
void (*call_utility)(Variant *r_ret, const Variant **p_args, int p_argcount, Callable::CallError &r_error);
|
void (*call_utility)(Variant *r_ret, const Variant **p_args, int p_argcount, Callable::CallError &r_error) = nullptr;
|
||||||
Variant::ValidatedUtilityFunction validated_call_utility;
|
Variant::ValidatedUtilityFunction validated_call_utility = nullptr;
|
||||||
Variant::PTRUtilityFunction ptr_call_utility;
|
Variant::PTRUtilityFunction ptr_call_utility = nullptr;
|
||||||
Vector<String> argnames;
|
Vector<String> argnames;
|
||||||
bool is_vararg;
|
bool is_vararg = false;
|
||||||
bool returns_value;
|
bool returns_value = false;
|
||||||
int argcount;
|
int argcount = 0;
|
||||||
Variant::Type (*get_arg_type)(int);
|
Variant::Type (*get_arg_type)(int) = nullptr;
|
||||||
Variant::Type return_type;
|
Variant::Type return_type;
|
||||||
Variant::UtilityFunctionType type;
|
Variant::UtilityFunctionType type;
|
||||||
};
|
};
|
||||||
|
|
|
@ -53,7 +53,7 @@ public:
|
||||||
// RasterizerCanvasGLES3 *canvas;
|
// RasterizerCanvasGLES3 *canvas;
|
||||||
// RasterizerSceneGLES3 *scene;
|
// RasterizerSceneGLES3 *scene;
|
||||||
|
|
||||||
GLES3::Config *config;
|
GLES3::Config *config = nullptr;
|
||||||
|
|
||||||
struct Resources {
|
struct Resources {
|
||||||
GLuint mipmap_blur_fbo;
|
GLuint mipmap_blur_fbo;
|
||||||
|
|
|
@ -141,7 +141,7 @@ private:
|
||||||
static bool shader_cache_save_debug;
|
static bool shader_cache_save_debug;
|
||||||
bool shader_cache_dir_valid = false;
|
bool shader_cache_dir_valid = false;
|
||||||
|
|
||||||
GLint max_image_units;
|
GLint max_image_units = 0;
|
||||||
|
|
||||||
enum StageType {
|
enum StageType {
|
||||||
STAGE_TYPE_VERTEX,
|
STAGE_TYPE_VERTEX,
|
||||||
|
|
|
@ -51,47 +51,47 @@ private:
|
||||||
static Config *singleton;
|
static Config *singleton;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
bool use_nearest_mip_filter;
|
bool use_nearest_mip_filter = false;
|
||||||
bool use_skeleton_software;
|
bool use_skeleton_software = false;
|
||||||
|
|
||||||
int max_vertex_texture_image_units;
|
int max_vertex_texture_image_units = 0;
|
||||||
int max_texture_image_units;
|
int max_texture_image_units = 0;
|
||||||
int max_texture_size;
|
int max_texture_size = 0;
|
||||||
int max_uniform_buffer_size;
|
int max_uniform_buffer_size = 0;
|
||||||
|
|
||||||
// TODO implement wireframe in OpenGL
|
// TODO implement wireframe in OpenGL
|
||||||
// bool generate_wireframes;
|
// bool generate_wireframes;
|
||||||
|
|
||||||
Set<String> extensions;
|
Set<String> extensions;
|
||||||
|
|
||||||
bool float_texture_supported;
|
bool float_texture_supported = false;
|
||||||
bool s3tc_supported;
|
bool s3tc_supported = false;
|
||||||
bool latc_supported;
|
bool latc_supported = false;
|
||||||
bool rgtc_supported;
|
bool rgtc_supported = false;
|
||||||
bool bptc_supported;
|
bool bptc_supported = false;
|
||||||
bool etc_supported;
|
bool etc_supported = false;
|
||||||
bool etc2_supported;
|
bool etc2_supported = false;
|
||||||
bool srgb_decode_supported;
|
bool srgb_decode_supported = false;
|
||||||
|
|
||||||
bool keep_original_textures;
|
bool keep_original_textures = false;
|
||||||
|
|
||||||
bool force_vertex_shading;
|
bool force_vertex_shading = false;
|
||||||
|
|
||||||
bool use_rgba_2d_shadows;
|
bool use_rgba_2d_shadows = false;
|
||||||
bool use_rgba_3d_shadows;
|
bool use_rgba_3d_shadows = false;
|
||||||
|
|
||||||
bool support_32_bits_indices;
|
bool support_32_bits_indices = false;
|
||||||
bool support_write_depth;
|
bool support_write_depth = false;
|
||||||
bool support_half_float_vertices;
|
bool support_half_float_vertices = false;
|
||||||
bool support_npot_repeat_mipmap;
|
bool support_npot_repeat_mipmap = false;
|
||||||
bool support_depth_cubemaps;
|
bool support_depth_cubemaps = false;
|
||||||
bool support_shadow_cubemaps;
|
bool support_shadow_cubemaps = false;
|
||||||
bool support_anisotropic_filter;
|
bool support_anisotropic_filter = false;
|
||||||
float anisotropic_level;
|
float anisotropic_level = 0.0f;
|
||||||
|
|
||||||
GLuint depth_internalformat;
|
GLuint depth_internalformat = 0;
|
||||||
GLuint depth_type;
|
GLuint depth_type = 0;
|
||||||
GLuint depth_buffer_internalformat;
|
GLuint depth_buffer_internalformat = 0;
|
||||||
|
|
||||||
// in some cases the legacy render didn't orphan. We will mark these
|
// in some cases the legacy render didn't orphan. We will mark these
|
||||||
// so the user can switch orphaning off for them.
|
// so the user can switch orphaning off for them.
|
||||||
|
|
|
@ -46,8 +46,8 @@ class DirAccessUnix : public DirAccess {
|
||||||
static Ref<DirAccess> create_fs();
|
static Ref<DirAccess> create_fs();
|
||||||
|
|
||||||
String current_dir;
|
String current_dir;
|
||||||
bool _cisdir;
|
bool _cisdir = false;
|
||||||
bool _cishidden;
|
bool _cishidden = false;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual String fix_unicode_name(const char *p_name) const { return String::utf8(p_name); }
|
virtual String fix_unicode_name(const char *p_name) const { return String::utf8(p_name); }
|
||||||
|
|
|
@ -886,8 +886,8 @@ class RenderingDeviceVulkan : public RenderingDevice {
|
||||||
DrawList *draw_list = nullptr; // One for regular draw lists, multiple for split.
|
DrawList *draw_list = nullptr; // One for regular draw lists, multiple for split.
|
||||||
uint32_t draw_list_subpass_count = 0;
|
uint32_t draw_list_subpass_count = 0;
|
||||||
uint32_t draw_list_count = 0;
|
uint32_t draw_list_count = 0;
|
||||||
VkRenderPass draw_list_render_pass;
|
VkRenderPass draw_list_render_pass = VK_NULL_HANDLE;
|
||||||
VkFramebuffer draw_list_vkframebuffer;
|
VkFramebuffer draw_list_vkframebuffer = VK_NULL_HANDLE;
|
||||||
#ifdef DEBUG_ENABLED
|
#ifdef DEBUG_ENABLED
|
||||||
FramebufferFormatID draw_list_framebuffer_format = INVALID_ID;
|
FramebufferFormatID draw_list_framebuffer_format = INVALID_ID;
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -185,27 +185,27 @@ private:
|
||||||
*/
|
*/
|
||||||
bool enabled_debug_report = false;
|
bool enabled_debug_report = false;
|
||||||
|
|
||||||
PFN_vkCreateDebugUtilsMessengerEXT CreateDebugUtilsMessengerEXT;
|
PFN_vkCreateDebugUtilsMessengerEXT CreateDebugUtilsMessengerEXT = nullptr;
|
||||||
PFN_vkDestroyDebugUtilsMessengerEXT DestroyDebugUtilsMessengerEXT;
|
PFN_vkDestroyDebugUtilsMessengerEXT DestroyDebugUtilsMessengerEXT = nullptr;
|
||||||
PFN_vkSubmitDebugUtilsMessageEXT SubmitDebugUtilsMessageEXT;
|
PFN_vkSubmitDebugUtilsMessageEXT SubmitDebugUtilsMessageEXT = nullptr;
|
||||||
PFN_vkCmdBeginDebugUtilsLabelEXT CmdBeginDebugUtilsLabelEXT;
|
PFN_vkCmdBeginDebugUtilsLabelEXT CmdBeginDebugUtilsLabelEXT = nullptr;
|
||||||
PFN_vkCmdEndDebugUtilsLabelEXT CmdEndDebugUtilsLabelEXT;
|
PFN_vkCmdEndDebugUtilsLabelEXT CmdEndDebugUtilsLabelEXT = nullptr;
|
||||||
PFN_vkCmdInsertDebugUtilsLabelEXT CmdInsertDebugUtilsLabelEXT;
|
PFN_vkCmdInsertDebugUtilsLabelEXT CmdInsertDebugUtilsLabelEXT = nullptr;
|
||||||
PFN_vkSetDebugUtilsObjectNameEXT SetDebugUtilsObjectNameEXT;
|
PFN_vkSetDebugUtilsObjectNameEXT SetDebugUtilsObjectNameEXT = nullptr;
|
||||||
PFN_vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT;
|
PFN_vkCreateDebugReportCallbackEXT CreateDebugReportCallbackEXT = nullptr;
|
||||||
PFN_vkDebugReportMessageEXT DebugReportMessageEXT;
|
PFN_vkDebugReportMessageEXT DebugReportMessageEXT = nullptr;
|
||||||
PFN_vkDestroyDebugReportCallbackEXT DestroyDebugReportCallbackEXT;
|
PFN_vkDestroyDebugReportCallbackEXT DestroyDebugReportCallbackEXT = nullptr;
|
||||||
PFN_vkGetPhysicalDeviceSurfaceSupportKHR fpGetPhysicalDeviceSurfaceSupportKHR;
|
PFN_vkGetPhysicalDeviceSurfaceSupportKHR fpGetPhysicalDeviceSurfaceSupportKHR = nullptr;
|
||||||
PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR fpGetPhysicalDeviceSurfaceCapabilitiesKHR;
|
PFN_vkGetPhysicalDeviceSurfaceCapabilitiesKHR fpGetPhysicalDeviceSurfaceCapabilitiesKHR = nullptr;
|
||||||
PFN_vkGetPhysicalDeviceSurfaceFormatsKHR fpGetPhysicalDeviceSurfaceFormatsKHR;
|
PFN_vkGetPhysicalDeviceSurfaceFormatsKHR fpGetPhysicalDeviceSurfaceFormatsKHR = nullptr;
|
||||||
PFN_vkGetPhysicalDeviceSurfacePresentModesKHR fpGetPhysicalDeviceSurfacePresentModesKHR;
|
PFN_vkGetPhysicalDeviceSurfacePresentModesKHR fpGetPhysicalDeviceSurfacePresentModesKHR = nullptr;
|
||||||
PFN_vkCreateSwapchainKHR fpCreateSwapchainKHR;
|
PFN_vkCreateSwapchainKHR fpCreateSwapchainKHR = nullptr;
|
||||||
PFN_vkDestroySwapchainKHR fpDestroySwapchainKHR;
|
PFN_vkDestroySwapchainKHR fpDestroySwapchainKHR = nullptr;
|
||||||
PFN_vkGetSwapchainImagesKHR fpGetSwapchainImagesKHR;
|
PFN_vkGetSwapchainImagesKHR fpGetSwapchainImagesKHR = nullptr;
|
||||||
PFN_vkAcquireNextImageKHR fpAcquireNextImageKHR;
|
PFN_vkAcquireNextImageKHR fpAcquireNextImageKHR = nullptr;
|
||||||
PFN_vkQueuePresentKHR fpQueuePresentKHR;
|
PFN_vkQueuePresentKHR fpQueuePresentKHR = nullptr;
|
||||||
PFN_vkGetRefreshCycleDurationGOOGLE fpGetRefreshCycleDurationGOOGLE;
|
PFN_vkGetRefreshCycleDurationGOOGLE fpGetRefreshCycleDurationGOOGLE = nullptr;
|
||||||
PFN_vkGetPastPresentationTimingGOOGLE fpGetPastPresentationTimingGOOGLE;
|
PFN_vkGetPastPresentationTimingGOOGLE fpGetPastPresentationTimingGOOGLE = nullptr;
|
||||||
|
|
||||||
VkDebugUtilsMessengerEXT dbg_messenger = VK_NULL_HANDLE;
|
VkDebugUtilsMessengerEXT dbg_messenger = VK_NULL_HANDLE;
|
||||||
VkDebugReportCallbackEXT dbg_debug_report = VK_NULL_HANDLE;
|
VkDebugReportCallbackEXT dbg_debug_report = VK_NULL_HANDLE;
|
||||||
|
|
|
@ -53,7 +53,7 @@ class AnimationBezierTrackEdit : public Control {
|
||||||
float play_position_pos = 0;
|
float play_position_pos = 0;
|
||||||
|
|
||||||
Ref<Animation> animation;
|
Ref<Animation> animation;
|
||||||
int selected_track;
|
int selected_track = 0;
|
||||||
|
|
||||||
Vector<Rect2> view_rects;
|
Vector<Rect2> view_rects;
|
||||||
|
|
||||||
|
@ -98,8 +98,8 @@ class AnimationBezierTrackEdit : public Control {
|
||||||
bool moving_selection_attempt = false;
|
bool moving_selection_attempt = false;
|
||||||
IntPair select_single_attempt;
|
IntPair select_single_attempt;
|
||||||
bool moving_selection = false;
|
bool moving_selection = false;
|
||||||
int moving_selection_from_key;
|
int moving_selection_from_key = 0;
|
||||||
int moving_selection_from_track;
|
int moving_selection_from_track = 0;
|
||||||
|
|
||||||
Vector2 moving_selection_offset;
|
Vector2 moving_selection_offset;
|
||||||
|
|
||||||
|
@ -114,7 +114,7 @@ class AnimationBezierTrackEdit : public Control {
|
||||||
int moving_handle_track = 0;
|
int moving_handle_track = 0;
|
||||||
Vector2 moving_handle_left;
|
Vector2 moving_handle_left;
|
||||||
Vector2 moving_handle_right;
|
Vector2 moving_handle_right;
|
||||||
int moving_handle_mode; // value from Animation::HandleMode
|
int moving_handle_mode = 0; // value from Animation::HandleMode
|
||||||
|
|
||||||
void _clear_selection();
|
void _clear_selection();
|
||||||
void _clear_selection_for_anim(const Ref<Animation> &p_anim);
|
void _clear_selection_for_anim(const Ref<Animation> &p_anim);
|
||||||
|
@ -136,8 +136,8 @@ class AnimationBezierTrackEdit : public Control {
|
||||||
Rect2 point_rect;
|
Rect2 point_rect;
|
||||||
Rect2 in_rect;
|
Rect2 in_rect;
|
||||||
Rect2 out_rect;
|
Rect2 out_rect;
|
||||||
int track;
|
int track = 0;
|
||||||
int key;
|
int key = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
Vector<EditPoint> edit_points;
|
Vector<EditPoint> edit_points;
|
||||||
|
|
|
@ -1886,10 +1886,7 @@ void AnimationTimelineEdit::_bind_methods() {
|
||||||
|
|
||||||
AnimationTimelineEdit::AnimationTimelineEdit() {
|
AnimationTimelineEdit::AnimationTimelineEdit() {
|
||||||
name_limit = 150 * EDSCALE;
|
name_limit = 150 * EDSCALE;
|
||||||
zoom = nullptr;
|
|
||||||
track_edit = nullptr;
|
|
||||||
|
|
||||||
play_position_pos = 0;
|
|
||||||
play_position = memnew(Control);
|
play_position = memnew(Control);
|
||||||
play_position->set_mouse_filter(MOUSE_FILTER_PASS);
|
play_position->set_mouse_filter(MOUSE_FILTER_PASS);
|
||||||
add_child(play_position);
|
add_child(play_position);
|
||||||
|
@ -3217,17 +3214,6 @@ void AnimationTrackEdit::_bind_methods() {
|
||||||
}
|
}
|
||||||
|
|
||||||
AnimationTrackEdit::AnimationTrackEdit() {
|
AnimationTrackEdit::AnimationTrackEdit() {
|
||||||
undo_redo = nullptr;
|
|
||||||
timeline = nullptr;
|
|
||||||
root = nullptr;
|
|
||||||
path = nullptr;
|
|
||||||
path_popup = nullptr;
|
|
||||||
menu = nullptr;
|
|
||||||
dropping_at = 0;
|
|
||||||
|
|
||||||
select_single_attempt = -1;
|
|
||||||
|
|
||||||
play_position_pos = 0;
|
|
||||||
play_position = memnew(Control);
|
play_position = memnew(Control);
|
||||||
play_position->set_mouse_filter(MOUSE_FILTER_PASS);
|
play_position->set_mouse_filter(MOUSE_FILTER_PASS);
|
||||||
add_child(play_position);
|
add_child(play_position);
|
||||||
|
@ -6238,8 +6224,6 @@ void AnimationTrackEditor::_pick_track_filter_input(const Ref<InputEvent> &p_ie)
|
||||||
}
|
}
|
||||||
|
|
||||||
AnimationTrackEditor::AnimationTrackEditor() {
|
AnimationTrackEditor::AnimationTrackEditor() {
|
||||||
root = nullptr;
|
|
||||||
|
|
||||||
undo_redo = EditorNode::get_singleton()->get_undo_redo();
|
undo_redo = EditorNode::get_singleton()->get_undo_redo();
|
||||||
|
|
||||||
main_panel = memnew(PanelContainer);
|
main_panel = memnew(PanelContainer);
|
||||||
|
@ -6452,8 +6436,6 @@ AnimationTrackEditor::AnimationTrackEditor() {
|
||||||
insert_confirm_reset->set_text(TTR("Create RESET Track(s)", ""));
|
insert_confirm_reset->set_text(TTR("Create RESET Track(s)", ""));
|
||||||
insert_confirm_reset->set_pressed(EDITOR_GET("editors/animation/default_create_reset_tracks"));
|
insert_confirm_reset->set_pressed(EDITOR_GET("editors/animation/default_create_reset_tracks"));
|
||||||
ichb->add_child(insert_confirm_reset);
|
ichb->add_child(insert_confirm_reset);
|
||||||
key_edit = nullptr;
|
|
||||||
multi_key_edit = nullptr;
|
|
||||||
|
|
||||||
box_selection = memnew(Control);
|
box_selection = memnew(Control);
|
||||||
add_child(box_selection);
|
add_child(box_selection);
|
||||||
|
|
|
@ -54,10 +54,10 @@ class AnimationTimelineEdit : public Range {
|
||||||
|
|
||||||
Ref<Animation> animation;
|
Ref<Animation> animation;
|
||||||
AnimationTrackEdit *track_edit = nullptr;
|
AnimationTrackEdit *track_edit = nullptr;
|
||||||
int name_limit;
|
int name_limit = 0;
|
||||||
Range *zoom = nullptr;
|
Range *zoom = nullptr;
|
||||||
Range *h_scroll = nullptr;
|
Range *h_scroll = nullptr;
|
||||||
float play_position_pos;
|
float play_position_pos = 0.0f;
|
||||||
|
|
||||||
HBoxContainer *len_hb = nullptr;
|
HBoxContainer *len_hb = nullptr;
|
||||||
EditorSpinSlider *length = nullptr;
|
EditorSpinSlider *length = nullptr;
|
||||||
|
@ -86,8 +86,8 @@ class AnimationTimelineEdit : public Range {
|
||||||
|
|
||||||
bool dragging_timeline = false;
|
bool dragging_timeline = false;
|
||||||
bool dragging_hsize = false;
|
bool dragging_hsize = false;
|
||||||
float dragging_hsize_from;
|
float dragging_hsize_from = 0.0f;
|
||||||
float dragging_hsize_at;
|
float dragging_hsize_at = 0.0f;
|
||||||
|
|
||||||
virtual void gui_input(const Ref<InputEvent> &p_event) override;
|
virtual void gui_input(const Ref<InputEvent> &p_event) override;
|
||||||
void _track_added(int p_track);
|
void _track_added(int p_track);
|
||||||
|
@ -145,17 +145,18 @@ class AnimationTrackEdit : public Control {
|
||||||
MENU_KEY_ADD_RESET,
|
MENU_KEY_ADD_RESET,
|
||||||
MENU_KEY_DELETE
|
MENU_KEY_DELETE
|
||||||
};
|
};
|
||||||
|
|
||||||
AnimationTimelineEdit *timeline = nullptr;
|
AnimationTimelineEdit *timeline = nullptr;
|
||||||
UndoRedo *undo_redo = nullptr;
|
UndoRedo *undo_redo = nullptr;
|
||||||
Popup *path_popup = nullptr;
|
Popup *path_popup = nullptr;
|
||||||
LineEdit *path = nullptr;
|
LineEdit *path = nullptr;
|
||||||
Node *root = nullptr;
|
Node *root = nullptr;
|
||||||
Control *play_position = nullptr; //separate control used to draw so updates for only position changed are much faster
|
Control *play_position = nullptr; //separate control used to draw so updates for only position changed are much faster
|
||||||
float play_position_pos;
|
float play_position_pos = 0.0f;
|
||||||
NodePath node_path;
|
NodePath node_path;
|
||||||
|
|
||||||
Ref<Animation> animation;
|
Ref<Animation> animation;
|
||||||
int track;
|
int track = 0;
|
||||||
|
|
||||||
Rect2 check_rect;
|
Rect2 check_rect;
|
||||||
Rect2 path_rect;
|
Rect2 path_rect;
|
||||||
|
@ -187,12 +188,12 @@ class AnimationTrackEdit : public Control {
|
||||||
|
|
||||||
Ref<Texture2D> _get_key_type_icon() const;
|
Ref<Texture2D> _get_key_type_icon() const;
|
||||||
|
|
||||||
mutable int dropping_at;
|
mutable int dropping_at = 0;
|
||||||
float insert_at_pos;
|
float insert_at_pos = 0.0f;
|
||||||
bool moving_selection_attempt = false;
|
bool moving_selection_attempt = false;
|
||||||
int select_single_attempt;
|
int select_single_attempt = -1;
|
||||||
bool moving_selection = false;
|
bool moving_selection = false;
|
||||||
float moving_selection_from_ofs;
|
float moving_selection_from_ofs = 0.0f;
|
||||||
|
|
||||||
bool in_group = false;
|
bool in_group = false;
|
||||||
AnimationTrackEditor *editor = nullptr;
|
AnimationTrackEditor *editor = nullptr;
|
||||||
|
@ -341,7 +342,7 @@ class AnimationTrackEditor : public VBoxContainer {
|
||||||
PropertySelector *prop_selector = nullptr;
|
PropertySelector *prop_selector = nullptr;
|
||||||
PropertySelector *method_selector = nullptr;
|
PropertySelector *method_selector = nullptr;
|
||||||
SceneTreeDialog *pick_track = nullptr;
|
SceneTreeDialog *pick_track = nullptr;
|
||||||
int adding_track_type;
|
int adding_track_type = 0;
|
||||||
NodePath adding_track_path;
|
NodePath adding_track_path;
|
||||||
|
|
||||||
bool keying = false;
|
bool keying = false;
|
||||||
|
@ -353,7 +354,7 @@ class AnimationTrackEditor : public VBoxContainer {
|
||||||
Variant value;
|
Variant value;
|
||||||
String query;
|
String query;
|
||||||
bool advance = false;
|
bool advance = false;
|
||||||
}; /* insert_data;*/
|
};
|
||||||
|
|
||||||
Label *insert_confirm_text = nullptr;
|
Label *insert_confirm_text = nullptr;
|
||||||
CheckBox *insert_confirm_bezier = nullptr;
|
CheckBox *insert_confirm_bezier = nullptr;
|
||||||
|
@ -388,8 +389,8 @@ class AnimationTrackEditor : public VBoxContainer {
|
||||||
|
|
||||||
void _timeline_value_changed(double);
|
void _timeline_value_changed(double);
|
||||||
|
|
||||||
float insert_key_from_track_call_ofs;
|
float insert_key_from_track_call_ofs = 0.0f;
|
||||||
int insert_key_from_track_call_track;
|
int insert_key_from_track_call_track = 0;
|
||||||
void _insert_key_from_track(float p_ofs, int p_track);
|
void _insert_key_from_track(float p_ofs, int p_track);
|
||||||
void _add_method_key(const String &p_method);
|
void _add_method_key(const String &p_method);
|
||||||
|
|
||||||
|
@ -415,7 +416,7 @@ class AnimationTrackEditor : public VBoxContainer {
|
||||||
void _key_deselected(int p_key, int p_track);
|
void _key_deselected(int p_key, int p_track);
|
||||||
|
|
||||||
bool moving_selection = false;
|
bool moving_selection = false;
|
||||||
float moving_selection_offset;
|
float moving_selection_offset = 0.0f;
|
||||||
void _move_selection_begin();
|
void _move_selection_begin();
|
||||||
void _move_selection(float p_offset);
|
void _move_selection(float p_offset);
|
||||||
void _move_selection_commit();
|
void _move_selection_commit();
|
||||||
|
@ -459,7 +460,7 @@ class AnimationTrackEditor : public VBoxContainer {
|
||||||
|
|
||||||
void _edit_menu_about_to_popup();
|
void _edit_menu_about_to_popup();
|
||||||
void _edit_menu_pressed(int p_option);
|
void _edit_menu_pressed(int p_option);
|
||||||
int last_menu_track_opt;
|
int last_menu_track_opt = 0;
|
||||||
|
|
||||||
void _cleanup_animation(Ref<Animation> p_animation);
|
void _cleanup_animation(Ref<Animation> p_animation);
|
||||||
|
|
||||||
|
|
|
@ -966,7 +966,6 @@ void AnimationTrackEditTypeAudio::_bind_methods() {
|
||||||
|
|
||||||
AnimationTrackEditTypeAudio::AnimationTrackEditTypeAudio() {
|
AnimationTrackEditTypeAudio::AnimationTrackEditTypeAudio() {
|
||||||
AudioStreamPreviewGenerator::get_singleton()->connect("preview_updated", callable_mp(this, &AnimationTrackEditTypeAudio::_preview_changed));
|
AudioStreamPreviewGenerator::get_singleton()->connect("preview_updated", callable_mp(this, &AnimationTrackEditTypeAudio::_preview_changed));
|
||||||
len_resizing = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool AnimationTrackEditTypeAudio::can_drop_data(const Point2 &p_point, const Variant &p_data) const {
|
bool AnimationTrackEditTypeAudio::can_drop_data(const Point2 &p_point, const Variant &p_data) const {
|
||||||
|
|
|
@ -115,10 +115,10 @@ class AnimationTrackEditTypeAudio : public AnimationTrackEdit {
|
||||||
void _preview_changed(ObjectID p_which);
|
void _preview_changed(ObjectID p_which);
|
||||||
|
|
||||||
bool len_resizing = false;
|
bool len_resizing = false;
|
||||||
bool len_resizing_start;
|
bool len_resizing_start = false;
|
||||||
int len_resizing_index;
|
int len_resizing_index = 0;
|
||||||
float len_resizing_from_px;
|
float len_resizing_from_px = 0.0f;
|
||||||
float len_resizing_rel;
|
float len_resizing_rel = 0.0f;
|
||||||
bool over_drag_position = false;
|
bool over_drag_position = false;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
|
@ -657,10 +657,6 @@ void FindReplaceBar::_bind_methods() {
|
||||||
}
|
}
|
||||||
|
|
||||||
FindReplaceBar::FindReplaceBar() {
|
FindReplaceBar::FindReplaceBar() {
|
||||||
results_count = -1;
|
|
||||||
results_count_to_current = -1;
|
|
||||||
needs_to_count_results = true;
|
|
||||||
|
|
||||||
vbc_lineedit = memnew(VBoxContainer);
|
vbc_lineedit = memnew(VBoxContainer);
|
||||||
add_child(vbc_lineedit);
|
add_child(vbc_lineedit);
|
||||||
vbc_lineedit->set_alignment(BoxContainer::ALIGNMENT_CENTER);
|
vbc_lineedit->set_alignment(BoxContainer::ALIGNMENT_CENTER);
|
||||||
|
|
|
@ -84,10 +84,10 @@ class FindReplaceBar : public HBoxContainer {
|
||||||
|
|
||||||
uint32_t flags = 0;
|
uint32_t flags = 0;
|
||||||
|
|
||||||
int result_line;
|
int result_line = 0;
|
||||||
int result_col;
|
int result_col = 0;
|
||||||
int results_count;
|
int results_count = -1;
|
||||||
int results_count_to_current;
|
int results_count_to_current = -1;
|
||||||
|
|
||||||
bool replace_all_mode = false;
|
bool replace_all_mode = false;
|
||||||
bool preserve_cursor = false;
|
bool preserve_cursor = false;
|
||||||
|
|
|
@ -111,7 +111,7 @@ private:
|
||||||
StringName signal;
|
StringName signal;
|
||||||
LineEdit *dst_method = nullptr;
|
LineEdit *dst_method = nullptr;
|
||||||
ConnectDialogBinds *cdbinds = nullptr;
|
ConnectDialogBinds *cdbinds = nullptr;
|
||||||
bool edit_mode;
|
bool edit_mode = false;
|
||||||
NodePath dst_path;
|
NodePath dst_path;
|
||||||
VBoxContainer *vbc_right = nullptr;
|
VBoxContainer *vbc_right = nullptr;
|
||||||
|
|
||||||
|
|
|
@ -111,9 +111,9 @@ private:
|
||||||
String _current_request;
|
String _current_request;
|
||||||
Ref<DAPeer> _current_peer;
|
Ref<DAPeer> _current_peer;
|
||||||
|
|
||||||
int breakpoint_id;
|
int breakpoint_id = 0;
|
||||||
int stackframe_id;
|
int stackframe_id = 0;
|
||||||
int variable_id;
|
int variable_id = 0;
|
||||||
List<DAP::Breakpoint> breakpoint_list;
|
List<DAP::Breakpoint> breakpoint_list;
|
||||||
Map<DAP::StackFrame, List<int>> stackframe_list;
|
Map<DAP::StackFrame, List<int>> stackframe_list;
|
||||||
Map<int, Array> variable_list;
|
Map<int, Array> variable_list;
|
||||||
|
|
|
@ -66,7 +66,7 @@ private:
|
||||||
Control *monitor_draw = nullptr;
|
Control *monitor_draw = nullptr;
|
||||||
Label *info_message = nullptr;
|
Label *info_message = nullptr;
|
||||||
StringName marker_key;
|
StringName marker_key;
|
||||||
int marker_frame;
|
int marker_frame = 0;
|
||||||
const int MARGIN = 4;
|
const int MARGIN = 4;
|
||||||
const int POINT_SEPARATION = 5;
|
const int POINT_SEPARATION = 5;
|
||||||
const int MARKER_MARGIN = 2;
|
const int MARKER_MARGIN = 2;
|
||||||
|
|
|
@ -662,9 +662,6 @@ EditorProfiler::EditorProfiler() {
|
||||||
|
|
||||||
int metric_size = CLAMP(int(EDITOR_GET("debugger/profiler_frame_history_size")), 60, 1024);
|
int metric_size = CLAMP(int(EDITOR_GET("debugger/profiler_frame_history_size")), 60, 1024);
|
||||||
frame_metrics.resize(metric_size);
|
frame_metrics.resize(metric_size);
|
||||||
total_metrics = 0;
|
|
||||||
last_metric = -1;
|
|
||||||
hover_metric = -1;
|
|
||||||
|
|
||||||
EDITOR_DEF("debugger/profiler_frame_max_functions", 64);
|
EDITOR_DEF("debugger/profiler_frame_max_functions", 64);
|
||||||
|
|
||||||
|
@ -682,7 +679,4 @@ EditorProfiler::EditorProfiler() {
|
||||||
|
|
||||||
plot_sigs.insert("physics_frame_time");
|
plot_sigs.insert("physics_frame_time");
|
||||||
plot_sigs.insert("category_frame_time");
|
plot_sigs.insert("category_frame_time");
|
||||||
|
|
||||||
seeking = false;
|
|
||||||
graph_height = 1;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -106,18 +106,18 @@ private:
|
||||||
SpinBox *cursor_metric_edit = nullptr;
|
SpinBox *cursor_metric_edit = nullptr;
|
||||||
|
|
||||||
Vector<Metric> frame_metrics;
|
Vector<Metric> frame_metrics;
|
||||||
int total_metrics;
|
int total_metrics = 0;
|
||||||
int last_metric;
|
int last_metric = -1;
|
||||||
|
|
||||||
int max_functions;
|
int max_functions = 0;
|
||||||
|
|
||||||
bool updating_frame;
|
bool updating_frame = false;
|
||||||
|
|
||||||
int hover_metric;
|
int hover_metric = -1;
|
||||||
|
|
||||||
float graph_height;
|
float graph_height = 1.0f;
|
||||||
|
|
||||||
bool seeking;
|
bool seeking = false;
|
||||||
|
|
||||||
Timer *frame_delay = nullptr;
|
Timer *frame_delay = nullptr;
|
||||||
Timer *plot_delay = nullptr;
|
Timer *plot_delay = nullptr;
|
||||||
|
|
|
@ -782,7 +782,6 @@ EditorVisualProfiler::EditorVisualProfiler() {
|
||||||
graph = memnew(TextureRect);
|
graph = memnew(TextureRect);
|
||||||
graph->set_ignore_texture_size(true);
|
graph->set_ignore_texture_size(true);
|
||||||
graph->set_mouse_filter(MOUSE_FILTER_STOP);
|
graph->set_mouse_filter(MOUSE_FILTER_STOP);
|
||||||
//graph->set_ignore_mouse(false);
|
|
||||||
graph->connect("draw", callable_mp(this, &EditorVisualProfiler::_graph_tex_draw));
|
graph->connect("draw", callable_mp(this, &EditorVisualProfiler::_graph_tex_draw));
|
||||||
graph->connect("gui_input", callable_mp(this, &EditorVisualProfiler::_graph_tex_input));
|
graph->connect("gui_input", callable_mp(this, &EditorVisualProfiler::_graph_tex_input));
|
||||||
graph->connect("mouse_exited", callable_mp(this, &EditorVisualProfiler::_graph_tex_mouse_exit));
|
graph->connect("mouse_exited", callable_mp(this, &EditorVisualProfiler::_graph_tex_mouse_exit));
|
||||||
|
@ -792,11 +791,6 @@ EditorVisualProfiler::EditorVisualProfiler() {
|
||||||
|
|
||||||
int metric_size = CLAMP(int(EDITOR_GET("debugger/profiler_frame_history_size")), 60, 1024);
|
int metric_size = CLAMP(int(EDITOR_GET("debugger/profiler_frame_history_size")), 60, 1024);
|
||||||
frame_metrics.resize(metric_size);
|
frame_metrics.resize(metric_size);
|
||||||
last_metric = -1;
|
|
||||||
//cursor_metric=-1;
|
|
||||||
hover_metric = -1;
|
|
||||||
|
|
||||||
//display_mode=DISPLAY_FRAME_TIME;
|
|
||||||
|
|
||||||
frame_delay = memnew(Timer);
|
frame_delay = memnew(Timer);
|
||||||
frame_delay->set_wait_time(0.1);
|
frame_delay->set_wait_time(0.1);
|
||||||
|
@ -809,12 +803,4 @@ EditorVisualProfiler::EditorVisualProfiler() {
|
||||||
plot_delay->set_one_shot(true);
|
plot_delay->set_one_shot(true);
|
||||||
add_child(plot_delay);
|
add_child(plot_delay);
|
||||||
plot_delay->connect("timeout", callable_mp(this, &EditorVisualProfiler::_update_plot));
|
plot_delay->connect("timeout", callable_mp(this, &EditorVisualProfiler::_update_plot));
|
||||||
|
|
||||||
seeking = false;
|
|
||||||
graph_height_cpu = 1;
|
|
||||||
graph_height_gpu = 1;
|
|
||||||
|
|
||||||
graph_limit = 1000 / 60.0;
|
|
||||||
|
|
||||||
//activate->set_disabled(true);
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,21 +83,20 @@ private:
|
||||||
SpinBox *cursor_metric_edit = nullptr;
|
SpinBox *cursor_metric_edit = nullptr;
|
||||||
|
|
||||||
Vector<Metric> frame_metrics;
|
Vector<Metric> frame_metrics;
|
||||||
int last_metric;
|
int last_metric = -1;
|
||||||
|
|
||||||
|
int hover_metric = -1;
|
||||||
|
|
||||||
StringName selected_area;
|
StringName selected_area;
|
||||||
|
|
||||||
bool updating_frame;
|
bool updating_frame = false;
|
||||||
|
|
||||||
//int cursor_metric;
|
float graph_height_cpu = 1.0f;
|
||||||
int hover_metric;
|
float graph_height_gpu = 1.0f;
|
||||||
|
|
||||||
float graph_height_cpu;
|
float graph_limit = 1000.0f / 60;
|
||||||
float graph_height_gpu;
|
|
||||||
|
|
||||||
float graph_limit;
|
bool seeking = false;
|
||||||
|
|
||||||
bool seeking;
|
|
||||||
|
|
||||||
Timer *frame_delay = nullptr;
|
Timer *frame_delay = nullptr;
|
||||||
Timer *plot_delay = nullptr;
|
Timer *plot_delay = nullptr;
|
||||||
|
|
|
@ -1263,7 +1263,6 @@ void EditorAudioBuses::_bind_methods() {
|
||||||
}
|
}
|
||||||
|
|
||||||
EditorAudioBuses::EditorAudioBuses() {
|
EditorAudioBuses::EditorAudioBuses() {
|
||||||
drop_end = nullptr;
|
|
||||||
top_hb = memnew(HBoxContainer);
|
top_hb = memnew(HBoxContainer);
|
||||||
add_child(top_hb);
|
add_child(top_hb);
|
||||||
|
|
||||||
|
|
|
@ -28,8 +28,8 @@
|
||||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
#ifndef EDITORAUDIOBUSES_H
|
#ifndef EDITOR_AUDIO_BUSES_H
|
||||||
#define EDITORAUDIOBUSES_H
|
#define EDITOR_AUDIO_BUSES_H
|
||||||
|
|
||||||
#include "editor/editor_plugin.h"
|
#include "editor/editor_plugin.h"
|
||||||
#include "scene/gui/box_container.h"
|
#include "scene/gui/box_container.h"
|
||||||
|
@ -192,7 +192,7 @@ class EditorAudioBuses : public VBoxContainer {
|
||||||
void _new_layout();
|
void _new_layout();
|
||||||
|
|
||||||
EditorFileDialog *file_dialog = nullptr;
|
EditorFileDialog *file_dialog = nullptr;
|
||||||
bool new_layout;
|
bool new_layout = false;
|
||||||
|
|
||||||
void _file_dialog_callback(const String &p_string);
|
void _file_dialog_callback(const String &p_string);
|
||||||
|
|
||||||
|
@ -275,4 +275,4 @@ public:
|
||||||
~AudioBusesEditorPlugin();
|
~AudioBusesEditorPlugin();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // EDITORAUDIOBUSES_H
|
#endif // EDITOR_AUDIO_BUSES_H
|
||||||
|
|
|
@ -1583,11 +1583,9 @@ bool EditorFileDialog::are_previews_enabled() {
|
||||||
EditorFileDialog::EditorFileDialog() {
|
EditorFileDialog::EditorFileDialog() {
|
||||||
show_hidden_files = default_show_hidden_files;
|
show_hidden_files = default_show_hidden_files;
|
||||||
display_mode = default_display_mode;
|
display_mode = default_display_mode;
|
||||||
local_history_pos = 0;
|
|
||||||
VBoxContainer *vbc = memnew(VBoxContainer);
|
VBoxContainer *vbc = memnew(VBoxContainer);
|
||||||
add_child(vbc);
|
add_child(vbc);
|
||||||
|
|
||||||
mode = FILE_MODE_SAVE_FILE;
|
|
||||||
set_title(TTR("Save a File"));
|
set_title(TTR("Save a File"));
|
||||||
|
|
||||||
ED_SHORTCUT("file_dialog/go_back", TTR("Go Back"), KeyModifierMask::ALT | Key::LEFT);
|
ED_SHORTCUT("file_dialog/go_back", TTR("Go Back"), KeyModifierMask::ALT | Key::LEFT);
|
||||||
|
@ -1795,7 +1793,6 @@ EditorFileDialog::EditorFileDialog() {
|
||||||
item_vb->add_child(file_box);
|
item_vb->add_child(file_box);
|
||||||
|
|
||||||
dir_access = DirAccess::create(DirAccess::ACCESS_RESOURCES);
|
dir_access = DirAccess::create(DirAccess::ACCESS_RESOURCES);
|
||||||
access = ACCESS_RESOURCES;
|
|
||||||
_update_drives();
|
_update_drives();
|
||||||
|
|
||||||
connect("confirmed", callable_mp(this, &EditorFileDialog::_action_pressed));
|
connect("confirmed", callable_mp(this, &EditorFileDialog::_action_pressed));
|
||||||
|
@ -1808,7 +1805,6 @@ EditorFileDialog::EditorFileDialog() {
|
||||||
filter->connect("item_selected", callable_mp(this, &EditorFileDialog::_filter_selected));
|
filter->connect("item_selected", callable_mp(this, &EditorFileDialog::_filter_selected));
|
||||||
|
|
||||||
confirm_save = memnew(ConfirmationDialog);
|
confirm_save = memnew(ConfirmationDialog);
|
||||||
//confirm_save->set_as_top_level(true);
|
|
||||||
add_child(confirm_save);
|
add_child(confirm_save);
|
||||||
confirm_save->connect("confirmed", callable_mp(this, &EditorFileDialog::_save_confirm_pressed));
|
confirm_save->connect("confirmed", callable_mp(this, &EditorFileDialog::_save_confirm_pressed));
|
||||||
|
|
||||||
|
@ -1843,9 +1839,6 @@ EditorFileDialog::EditorFileDialog() {
|
||||||
if (register_func) {
|
if (register_func) {
|
||||||
register_func(this);
|
register_func(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
preview_wheel_timeout = 0;
|
|
||||||
preview_wheel_index = 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EditorFileDialog::~EditorFileDialog() {
|
EditorFileDialog::~EditorFileDialog() {
|
||||||
|
|
|
@ -28,8 +28,8 @@
|
||||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
#ifndef EDITORFILEDIALOG_H
|
#ifndef EDITOR_FILE_DIALOG_H
|
||||||
#define EDITORFILEDIALOG_H
|
#define EDITOR_FILE_DIALOG_H
|
||||||
|
|
||||||
#include "core/io/dir_access.h"
|
#include "core/io/dir_access.h"
|
||||||
#include "editor/plugins/editor_preview_plugins.h"
|
#include "editor/plugins/editor_preview_plugins.h"
|
||||||
|
@ -88,11 +88,11 @@ private:
|
||||||
LineEdit *makedirname = nullptr;
|
LineEdit *makedirname = nullptr;
|
||||||
|
|
||||||
Button *makedir = nullptr;
|
Button *makedir = nullptr;
|
||||||
Access access;
|
Access access = ACCESS_RESOURCES;
|
||||||
|
|
||||||
VBoxContainer *vbox = nullptr;
|
VBoxContainer *vbox = nullptr;
|
||||||
FileMode mode;
|
FileMode mode = FILE_MODE_SAVE_FILE;
|
||||||
bool can_create_dir;
|
bool can_create_dir = false;
|
||||||
LineEdit *dir = nullptr;
|
LineEdit *dir = nullptr;
|
||||||
|
|
||||||
Button *dir_prev = nullptr;
|
Button *dir_prev = nullptr;
|
||||||
|
@ -130,15 +130,15 @@ private:
|
||||||
ItemList *recent = nullptr;
|
ItemList *recent = nullptr;
|
||||||
|
|
||||||
Vector<String> local_history;
|
Vector<String> local_history;
|
||||||
int local_history_pos;
|
int local_history_pos = 0;
|
||||||
void _push_history();
|
void _push_history();
|
||||||
|
|
||||||
Vector<String> filters;
|
Vector<String> filters;
|
||||||
|
|
||||||
bool previews_enabled = true;
|
bool previews_enabled = true;
|
||||||
bool preview_waiting = false;
|
bool preview_waiting = false;
|
||||||
int preview_wheel_index;
|
int preview_wheel_index = 0;
|
||||||
float preview_wheel_timeout;
|
float preview_wheel_timeout = 0.0f;
|
||||||
|
|
||||||
static bool default_show_hidden_files;
|
static bool default_show_hidden_files;
|
||||||
static DisplayMode default_display_mode;
|
static DisplayMode default_display_mode;
|
||||||
|
@ -257,4 +257,4 @@ VARIANT_ENUM_CAST(EditorFileDialog::FileMode);
|
||||||
VARIANT_ENUM_CAST(EditorFileDialog::Access);
|
VARIANT_ENUM_CAST(EditorFileDialog::Access);
|
||||||
VARIANT_ENUM_CAST(EditorFileDialog::DisplayMode);
|
VARIANT_ENUM_CAST(EditorFileDialog::DisplayMode);
|
||||||
|
|
||||||
#endif // EDITORFILEDIALOG_H
|
#endif // EDITOR_FILE_DIALOG_H
|
||||||
|
|
|
@ -56,7 +56,7 @@ class FindBar : public HBoxContainer {
|
||||||
|
|
||||||
RichTextLabel *rich_text_label = nullptr;
|
RichTextLabel *rich_text_label = nullptr;
|
||||||
|
|
||||||
int results_count;
|
int results_count = 0;
|
||||||
|
|
||||||
void _hide_bar();
|
void _hide_bar();
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ class EditorHelp : public VBoxContainer {
|
||||||
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 = 0;
|
||||||
|
|
||||||
RichTextLabel *class_desc = nullptr;
|
RichTextLabel *class_desc = nullptr;
|
||||||
HSplitContainer *h_split = nullptr;
|
HSplitContainer *h_split = nullptr;
|
||||||
|
|
|
@ -5909,7 +5909,6 @@ EditorNode::EditorNode() {
|
||||||
}
|
}
|
||||||
|
|
||||||
singleton = this;
|
singleton = this;
|
||||||
last_checked_version = 0;
|
|
||||||
|
|
||||||
TranslationServer::get_singleton()->set_enabled(false);
|
TranslationServer::get_singleton()->set_enabled(false);
|
||||||
// Load settings.
|
// Load settings.
|
||||||
|
@ -6263,8 +6262,6 @@ EditorNode::EditorNode() {
|
||||||
dock_vb->add_child(dock_float);
|
dock_vb->add_child(dock_float);
|
||||||
|
|
||||||
dock_select_popup->reset_size();
|
dock_select_popup->reset_size();
|
||||||
dock_select_rect_over_idx = -1;
|
|
||||||
dock_popup_selected_idx = -1;
|
|
||||||
|
|
||||||
for (int i = 0; i < DOCK_SLOT_MAX; i++) {
|
for (int i = 0; i < DOCK_SLOT_MAX; i++) {
|
||||||
dock_slot[i]->set_custom_minimum_size(Size2(170, 0) * EDSCALE);
|
dock_slot[i]->set_custom_minimum_size(Size2(170, 0) * EDSCALE);
|
||||||
|
@ -6811,7 +6808,6 @@ EditorNode::EditorNode() {
|
||||||
// Define corresponding default layout.
|
// Define corresponding default layout.
|
||||||
|
|
||||||
const String docks_section = "docks";
|
const String docks_section = "docks";
|
||||||
overridden_default_layout = -1;
|
|
||||||
default_layout.instantiate();
|
default_layout.instantiate();
|
||||||
// Dock numbers are based on DockSlot enum value + 1.
|
// Dock numbers are based on DockSlot enum value + 1.
|
||||||
default_layout->set_value(docks_section, "dock_3", "Scene,Import");
|
default_layout->set_value(docks_section, "dock_3", "Scene,Import");
|
||||||
|
@ -6890,8 +6886,6 @@ EditorNode::EditorNode() {
|
||||||
Button *output_button = add_bottom_panel_item(TTR("Output"), log);
|
Button *output_button = add_bottom_panel_item(TTR("Output"), log);
|
||||||
log->set_tool_button(output_button);
|
log->set_tool_button(output_button);
|
||||||
|
|
||||||
old_split_ofs = 0;
|
|
||||||
|
|
||||||
center_split->connect("resized", callable_mp(this, &EditorNode::_vp_resized));
|
center_split->connect("resized", callable_mp(this, &EditorNode::_vp_resized));
|
||||||
|
|
||||||
native_shader_source_visualizer = memnew(EditorNativeShaderSourceVisualizer);
|
native_shader_source_visualizer = memnew(EditorNativeShaderSourceVisualizer);
|
||||||
|
@ -7157,7 +7151,6 @@ EditorNode::EditorNode() {
|
||||||
}
|
}
|
||||||
update_spinner_step_msec = OS::get_singleton()->get_ticks_msec();
|
update_spinner_step_msec = OS::get_singleton()->get_ticks_msec();
|
||||||
update_spinner_step_frame = Engine::get_singleton()->get_frames_drawn();
|
update_spinner_step_frame = Engine::get_singleton()->get_frames_drawn();
|
||||||
update_spinner_step = 0;
|
|
||||||
|
|
||||||
editor_plugin_screen = nullptr;
|
editor_plugin_screen = nullptr;
|
||||||
editor_plugins_over = memnew(EditorPluginList);
|
editor_plugins_over = memnew(EditorPluginList);
|
||||||
|
@ -7191,9 +7184,6 @@ EditorNode::EditorNode() {
|
||||||
open_imported->connect("custom_action", callable_mp(this, &EditorNode::_inherit_imported));
|
open_imported->connect("custom_action", callable_mp(this, &EditorNode::_inherit_imported));
|
||||||
gui_base->add_child(open_imported);
|
gui_base->add_child(open_imported);
|
||||||
|
|
||||||
saved_version = 1;
|
|
||||||
_last_instantiated_scene = nullptr;
|
|
||||||
|
|
||||||
quick_open = memnew(EditorQuickOpen);
|
quick_open = memnew(EditorQuickOpen);
|
||||||
gui_base->add_child(quick_open);
|
gui_base->add_child(quick_open);
|
||||||
quick_open->connect("quick_open", callable_mp(this, &EditorNode::_quick_opened));
|
quick_open->connect("quick_open", callable_mp(this, &EditorNode::_quick_opened));
|
||||||
|
|
|
@ -283,7 +283,7 @@ private:
|
||||||
|
|
||||||
ConfirmationDialog *video_restart_dialog = nullptr;
|
ConfirmationDialog *video_restart_dialog = nullptr;
|
||||||
|
|
||||||
int rendering_driver_current;
|
int rendering_driver_current = 0;
|
||||||
String rendering_driver_request;
|
String rendering_driver_request;
|
||||||
|
|
||||||
// Split containers.
|
// Split containers.
|
||||||
|
@ -305,12 +305,12 @@ private:
|
||||||
PopupMenu *scene_tabs_context_menu = nullptr;
|
PopupMenu *scene_tabs_context_menu = nullptr;
|
||||||
Panel *tab_preview_panel = nullptr;
|
Panel *tab_preview_panel = nullptr;
|
||||||
TextureRect *tab_preview = nullptr;
|
TextureRect *tab_preview = nullptr;
|
||||||
int tab_closing_idx;
|
int tab_closing_idx = 0;
|
||||||
|
|
||||||
bool exiting = false;
|
bool exiting = false;
|
||||||
bool dimmed = false;
|
bool dimmed = false;
|
||||||
|
|
||||||
int old_split_ofs;
|
int old_split_ofs = 0;
|
||||||
VSplitContainer *top_split = nullptr;
|
VSplitContainer *top_split = nullptr;
|
||||||
HBoxContainer *bottom_hb = nullptr;
|
HBoxContainer *bottom_hb = nullptr;
|
||||||
Control *vp_base = nullptr;
|
Control *vp_base = nullptr;
|
||||||
|
@ -363,7 +363,7 @@ private:
|
||||||
EditorAbout *about = nullptr;
|
EditorAbout *about = nullptr;
|
||||||
AcceptDialog *warning = nullptr;
|
AcceptDialog *warning = nullptr;
|
||||||
|
|
||||||
int overridden_default_layout;
|
int overridden_default_layout = -1;
|
||||||
Ref<ConfigFile> default_layout;
|
Ref<ConfigFile> default_layout;
|
||||||
PopupMenu *editor_layouts = nullptr;
|
PopupMenu *editor_layouts = nullptr;
|
||||||
EditorLayoutsDialog *layout_dialog = nullptr;
|
EditorLayoutsDialog *layout_dialog = nullptr;
|
||||||
|
@ -412,8 +412,8 @@ private:
|
||||||
TabContainer *dock_slot[DOCK_SLOT_MAX];
|
TabContainer *dock_slot[DOCK_SLOT_MAX];
|
||||||
Timer *dock_drag_timer = nullptr;
|
Timer *dock_drag_timer = nullptr;
|
||||||
bool docks_visible = true;
|
bool docks_visible = true;
|
||||||
int dock_popup_selected_idx;
|
int dock_popup_selected_idx = -1;
|
||||||
int dock_select_rect_over_idx;
|
int dock_select_rect_over_idx = -1;
|
||||||
|
|
||||||
HBoxContainer *tabbar_container = nullptr;
|
HBoxContainer *tabbar_container = nullptr;
|
||||||
Button *distraction_free = nullptr;
|
Button *distraction_free = nullptr;
|
||||||
|
@ -446,24 +446,24 @@ private:
|
||||||
bool unsaved_cache = true;
|
bool unsaved_cache = true;
|
||||||
bool waiting_for_first_scan = true;
|
bool waiting_for_first_scan = true;
|
||||||
|
|
||||||
int current_menu_option;
|
int current_menu_option = 0;
|
||||||
|
|
||||||
SubViewport *scene_root = nullptr; // Root of the scene being edited.
|
SubViewport *scene_root = nullptr; // Root of the scene being edited.
|
||||||
Object *current = nullptr;
|
Object *current = nullptr;
|
||||||
|
|
||||||
Ref<Resource> saving_resource;
|
Ref<Resource> saving_resource;
|
||||||
|
|
||||||
uint64_t update_spinner_step_msec;
|
uint64_t update_spinner_step_msec = 0;
|
||||||
uint64_t update_spinner_step_frame;
|
uint64_t update_spinner_step_frame = 0;
|
||||||
int update_spinner_step;
|
int update_spinner_step = 0;
|
||||||
|
|
||||||
String _tmp_import_path;
|
String _tmp_import_path;
|
||||||
String external_file;
|
String external_file;
|
||||||
String open_navigate;
|
String open_navigate;
|
||||||
String run_custom_filename;
|
String run_custom_filename;
|
||||||
|
|
||||||
uint64_t saved_version;
|
uint64_t saved_version = 1;
|
||||||
uint64_t last_checked_version;
|
uint64_t last_checked_version = 0;
|
||||||
|
|
||||||
DynamicFontImportSettings *fontdata_import_settings = nullptr;
|
DynamicFontImportSettings *fontdata_import_settings = nullptr;
|
||||||
SceneImportSettings *scene_import_settings = nullptr;
|
SceneImportSettings *scene_import_settings = nullptr;
|
||||||
|
|
|
@ -656,10 +656,7 @@ void EditorSpinSlider::_ensure_input_popup() {
|
||||||
}
|
}
|
||||||
|
|
||||||
EditorSpinSlider::EditorSpinSlider() {
|
EditorSpinSlider::EditorSpinSlider() {
|
||||||
grabbing_spinner_dist_cache = 0;
|
|
||||||
pre_grab_value = 0;
|
|
||||||
set_focus_mode(FOCUS_ALL);
|
set_focus_mode(FOCUS_ALL);
|
||||||
updown_offset = -1;
|
|
||||||
grabber = memnew(TextureRect);
|
grabber = memnew(TextureRect);
|
||||||
add_child(grabber);
|
add_child(grabber);
|
||||||
grabber->hide();
|
grabber->hide();
|
||||||
|
@ -668,5 +665,4 @@ EditorSpinSlider::EditorSpinSlider() {
|
||||||
grabber->connect("mouse_entered", callable_mp(this, &EditorSpinSlider::_grabber_mouse_entered));
|
grabber->connect("mouse_entered", callable_mp(this, &EditorSpinSlider::_grabber_mouse_entered));
|
||||||
grabber->connect("mouse_exited", callable_mp(this, &EditorSpinSlider::_grabber_mouse_exited));
|
grabber->connect("mouse_exited", callable_mp(this, &EditorSpinSlider::_grabber_mouse_exited));
|
||||||
grabber->connect("gui_input", callable_mp(this, &EditorSpinSlider::_grabber_gui_input));
|
grabber->connect("gui_input", callable_mp(this, &EditorSpinSlider::_grabber_gui_input));
|
||||||
grabber_range = 1;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -40,41 +40,42 @@ class EditorSpinSlider : public Range {
|
||||||
|
|
||||||
String label;
|
String label;
|
||||||
String suffix;
|
String suffix;
|
||||||
int updown_offset;
|
int updown_offset = -1;
|
||||||
bool hover_updown = false;
|
bool hover_updown = false;
|
||||||
bool mouse_hover = false;
|
bool mouse_hover = false;
|
||||||
|
|
||||||
TextureRect *grabber = nullptr;
|
TextureRect *grabber = nullptr;
|
||||||
int grabber_range;
|
int grabber_range = 1;
|
||||||
|
|
||||||
bool mouse_over_spin = false;
|
bool mouse_over_spin = false;
|
||||||
bool mouse_over_grabber = false;
|
bool mouse_over_grabber = false;
|
||||||
bool mousewheel_over_grabber = false;
|
bool mousewheel_over_grabber = false;
|
||||||
|
|
||||||
bool grabbing_grabber = false;
|
bool grabbing_grabber = false;
|
||||||
int grabbing_from;
|
int grabbing_from = 0;
|
||||||
float grabbing_ratio;
|
float grabbing_ratio = 0.0f;
|
||||||
|
|
||||||
bool grabbing_spinner_attempt = false;
|
bool grabbing_spinner_attempt = false;
|
||||||
bool grabbing_spinner = false;
|
bool grabbing_spinner = false;
|
||||||
|
|
||||||
bool read_only = false;
|
bool read_only = false;
|
||||||
float grabbing_spinner_dist_cache;
|
float grabbing_spinner_dist_cache = 0.0f;
|
||||||
Vector2 grabbing_spinner_mouse_pos;
|
Vector2 grabbing_spinner_mouse_pos;
|
||||||
double pre_grab_value;
|
double pre_grab_value = 0.0;
|
||||||
|
|
||||||
Popup *value_input_popup = nullptr;
|
Popup *value_input_popup = nullptr;
|
||||||
LineEdit *value_input = nullptr;
|
LineEdit *value_input = nullptr;
|
||||||
bool value_input_just_closed = false;
|
bool value_input_just_closed = false;
|
||||||
bool value_input_dirty = false;
|
bool value_input_dirty = false;
|
||||||
|
|
||||||
|
bool hide_slider = false;
|
||||||
|
bool flat = false;
|
||||||
|
|
||||||
void _grabber_gui_input(const Ref<InputEvent> &p_event);
|
void _grabber_gui_input(const Ref<InputEvent> &p_event);
|
||||||
void _value_input_closed();
|
void _value_input_closed();
|
||||||
void _value_input_submitted(const String &);
|
void _value_input_submitted(const String &);
|
||||||
void _value_focus_exited();
|
void _value_focus_exited();
|
||||||
void _value_input_gui_input(const Ref<InputEvent> &p_event);
|
void _value_input_gui_input(const Ref<InputEvent> &p_event);
|
||||||
bool hide_slider = false;
|
|
||||||
bool flat = false;
|
|
||||||
|
|
||||||
void _evaluate_input_text();
|
void _evaluate_input_text();
|
||||||
|
|
||||||
|
|
|
@ -311,9 +311,6 @@ void EditorFileServer::stop() {
|
||||||
|
|
||||||
EditorFileServer::EditorFileServer() {
|
EditorFileServer::EditorFileServer() {
|
||||||
server.instantiate();
|
server.instantiate();
|
||||||
quit = false;
|
|
||||||
active = false;
|
|
||||||
cmd = CMD_NONE;
|
|
||||||
thread.start(_thread_start, this);
|
thread.start(_thread_start, this);
|
||||||
|
|
||||||
EDITOR_DEF("filesystem/file_server/port", 6010);
|
EDITOR_DEF("filesystem/file_server/port", 6010);
|
||||||
|
|
|
@ -63,12 +63,12 @@ class EditorFileServer : public Object {
|
||||||
Mutex wait_mutex;
|
Mutex wait_mutex;
|
||||||
Thread thread;
|
Thread thread;
|
||||||
static void _thread_start(void *);
|
static void _thread_start(void *);
|
||||||
bool quit;
|
bool quit = false;
|
||||||
Command cmd;
|
Command cmd = CMD_NONE;
|
||||||
|
|
||||||
String password;
|
String password;
|
||||||
int port;
|
int port = 0;
|
||||||
bool active;
|
bool active = false;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
void start();
|
void start();
|
||||||
|
|
|
@ -28,8 +28,8 @@
|
||||||
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
|
||||||
/*************************************************************************/
|
/*************************************************************************/
|
||||||
|
|
||||||
#ifndef SCENEIMPORTSETTINGS_H
|
#ifndef SCENE_IMPORT_SETTINGS_H
|
||||||
#define SCENEIMPORTSETTINGS_H
|
#define SCENE_IMPORT_SETTINGS_H
|
||||||
|
|
||||||
#include "editor/import/resource_importer_scene.h"
|
#include "editor/import/resource_importer_scene.h"
|
||||||
#include "scene/3d/camera_3d.h"
|
#include "scene/3d/camera_3d.h"
|
||||||
|
@ -86,9 +86,9 @@ class SceneImportSettings : public ConfirmationDialog {
|
||||||
|
|
||||||
Ref<StandardMaterial3D> collider_mat;
|
Ref<StandardMaterial3D> collider_mat;
|
||||||
|
|
||||||
float cam_rot_x;
|
float cam_rot_x = 0.0f;
|
||||||
float cam_rot_y;
|
float cam_rot_y = 0.0f;
|
||||||
float cam_zoom;
|
float cam_zoom = 0.0f;
|
||||||
|
|
||||||
void _update_scene();
|
void _update_scene();
|
||||||
|
|
||||||
|
@ -176,7 +176,7 @@ class SceneImportSettings : public ConfirmationDialog {
|
||||||
void _menu_callback(int p_id);
|
void _menu_callback(int p_id);
|
||||||
void _save_dir_callback(const String &p_path);
|
void _save_dir_callback(const String &p_path);
|
||||||
|
|
||||||
int current_action;
|
int current_action = 0;
|
||||||
|
|
||||||
Vector<TreeItem *> save_path_items;
|
Vector<TreeItem *> save_path_items;
|
||||||
|
|
||||||
|
@ -205,4 +205,4 @@ public:
|
||||||
~SceneImportSettings();
|
~SceneImportSettings();
|
||||||
};
|
};
|
||||||
|
|
||||||
#endif // SCENEIMPORTSETTINGS_H
|
#endif // SCENE_IMPORT_SETTINGS_H
|
||||||
|
|
|
@ -54,7 +54,7 @@ class PluginConfigDialog : public ConfirmationDialog {
|
||||||
TextureRect *subfolder_validation = nullptr;
|
TextureRect *subfolder_validation = nullptr;
|
||||||
TextureRect *script_validation = nullptr;
|
TextureRect *script_validation = nullptr;
|
||||||
|
|
||||||
bool _edit_mode;
|
bool _edit_mode = false;
|
||||||
|
|
||||||
void _clear_fields();
|
void _clear_fields();
|
||||||
void _on_confirmed();
|
void _on_confirmed();
|
||||||
|
|
|
@ -703,10 +703,8 @@ AbstractPolygon2DEditor::PosVertex AbstractPolygon2DEditor::closest_edge_point(c
|
||||||
}
|
}
|
||||||
|
|
||||||
AbstractPolygon2DEditor::AbstractPolygon2DEditor(bool p_wip_destructive) {
|
AbstractPolygon2DEditor::AbstractPolygon2DEditor(bool p_wip_destructive) {
|
||||||
canvas_item_editor = nullptr;
|
|
||||||
undo_redo = EditorNode::get_undo_redo();
|
undo_redo = EditorNode::get_undo_redo();
|
||||||
|
|
||||||
wip_active = false;
|
|
||||||
edited_point = PosVertex();
|
edited_point = PosVertex();
|
||||||
wip_destructive = p_wip_destructive;
|
wip_destructive = p_wip_destructive;
|
||||||
|
|
||||||
|
@ -736,8 +734,6 @@ AbstractPolygon2DEditor::AbstractPolygon2DEditor(bool p_wip_destructive) {
|
||||||
create_resource = memnew(ConfirmationDialog);
|
create_resource = memnew(ConfirmationDialog);
|
||||||
add_child(create_resource);
|
add_child(create_resource);
|
||||||
create_resource->get_ok_button()->set_text(TTR("Create"));
|
create_resource->get_ok_button()->set_text(TTR("Create"));
|
||||||
|
|
||||||
mode = MODE_EDIT;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractPolygon2DEditorPlugin::edit(Object *p_object) {
|
void AbstractPolygon2DEditorPlugin::edit(Object *p_object) {
|
||||||
|
|
|
@ -80,10 +80,10 @@ class AbstractPolygon2DEditor : public HBoxContainer {
|
||||||
|
|
||||||
Vector<Vector2> pre_move_edit;
|
Vector<Vector2> pre_move_edit;
|
||||||
Vector<Vector2> wip;
|
Vector<Vector2> wip;
|
||||||
bool wip_active;
|
bool wip_active = false;
|
||||||
bool wip_destructive;
|
bool wip_destructive = false;
|
||||||
|
|
||||||
bool _polygon_editing_enabled;
|
bool _polygon_editing_enabled = false;
|
||||||
|
|
||||||
CanvasItemEditor *canvas_item_editor = nullptr;
|
CanvasItemEditor *canvas_item_editor = nullptr;
|
||||||
Panel *panel = nullptr;
|
Panel *panel = nullptr;
|
||||||
|
@ -97,7 +97,7 @@ protected:
|
||||||
MODE_CONT,
|
MODE_CONT,
|
||||||
};
|
};
|
||||||
|
|
||||||
int mode;
|
int mode = MODE_EDIT;
|
||||||
|
|
||||||
UndoRedo *undo_redo = nullptr;
|
UndoRedo *undo_redo = nullptr;
|
||||||
|
|
||||||
|
|
|
@ -594,7 +594,6 @@ AnimationNodeBlendSpace1DEditor *AnimationNodeBlendSpace1DEditor::singleton = nu
|
||||||
|
|
||||||
AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
||||||
singleton = this;
|
singleton = this;
|
||||||
updating = false;
|
|
||||||
|
|
||||||
HBoxContainer *top_hb = memnew(HBoxContainer);
|
HBoxContainer *top_hb = memnew(HBoxContainer);
|
||||||
add_child(top_hb);
|
add_child(top_hb);
|
||||||
|
@ -745,9 +744,5 @@ AnimationNodeBlendSpace1DEditor::AnimationNodeBlendSpace1DEditor() {
|
||||||
open_file->connect("file_selected", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_file_opened));
|
open_file->connect("file_selected", callable_mp(this, &AnimationNodeBlendSpace1DEditor::_file_opened));
|
||||||
undo_redo = EditorNode::get_undo_redo();
|
undo_redo = EditorNode::get_undo_redo();
|
||||||
|
|
||||||
selected_point = -1;
|
|
||||||
dragging_selected = false;
|
|
||||||
dragging_selected_attempt = false;
|
|
||||||
|
|
||||||
set_custom_minimum_size(Size2(0, 150 * EDSCALE));
|
set_custom_minimum_size(Size2(0, 150 * EDSCALE));
|
||||||
}
|
}
|
||||||
|
|
|
@ -65,14 +65,14 @@ class AnimationNodeBlendSpace1DEditor : public AnimationTreeNodeEditorPlugin {
|
||||||
SpinBox *edit_value = nullptr;
|
SpinBox *edit_value = nullptr;
|
||||||
Button *open_editor = nullptr;
|
Button *open_editor = nullptr;
|
||||||
|
|
||||||
int selected_point;
|
int selected_point = -1;
|
||||||
|
|
||||||
Control *blend_space_draw = nullptr;
|
Control *blend_space_draw = nullptr;
|
||||||
|
|
||||||
PanelContainer *error_panel = nullptr;
|
PanelContainer *error_panel = nullptr;
|
||||||
Label *error_label = nullptr;
|
Label *error_label = nullptr;
|
||||||
|
|
||||||
bool updating;
|
bool updating = false;
|
||||||
|
|
||||||
UndoRedo *undo_redo = nullptr;
|
UndoRedo *undo_redo = nullptr;
|
||||||
|
|
||||||
|
@ -90,11 +90,11 @@ class AnimationNodeBlendSpace1DEditor : public AnimationTreeNodeEditorPlugin {
|
||||||
PopupMenu *menu = nullptr;
|
PopupMenu *menu = nullptr;
|
||||||
PopupMenu *animations_menu = nullptr;
|
PopupMenu *animations_menu = nullptr;
|
||||||
Vector<String> animations_to_add;
|
Vector<String> animations_to_add;
|
||||||
float add_point_pos;
|
float add_point_pos = 0.0f;
|
||||||
Vector<real_t> points;
|
Vector<real_t> points;
|
||||||
|
|
||||||
bool dragging_selected_attempt;
|
bool dragging_selected_attempt = false;
|
||||||
bool dragging_selected;
|
bool dragging_selected = false;
|
||||||
Vector2 drag_from;
|
Vector2 drag_from;
|
||||||
Vector2 drag_ofs;
|
Vector2 drag_ofs;
|
||||||
|
|
||||||
|
|
|
@ -1214,7 +1214,6 @@ AnimationNodeStateMachineEditor *AnimationNodeStateMachineEditor::singleton = nu
|
||||||
|
|
||||||
AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
|
AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
|
||||||
singleton = this;
|
singleton = this;
|
||||||
updating = false;
|
|
||||||
|
|
||||||
HBoxContainer *top_hb = memnew(HBoxContainer);
|
HBoxContainer *top_hb = memnew(HBoxContainer);
|
||||||
add_child(top_hb);
|
add_child(top_hb);
|
||||||
|
@ -1347,12 +1346,4 @@ AnimationNodeStateMachineEditor::AnimationNodeStateMachineEditor() {
|
||||||
open_file->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
|
open_file->set_file_mode(EditorFileDialog::FILE_MODE_OPEN_FILE);
|
||||||
open_file->connect("file_selected", callable_mp(this, &AnimationNodeStateMachineEditor::_file_opened));
|
open_file->connect("file_selected", callable_mp(this, &AnimationNodeStateMachineEditor::_file_opened));
|
||||||
undo_redo = EditorNode::get_undo_redo();
|
undo_redo = EditorNode::get_undo_redo();
|
||||||
|
|
||||||
over_node_what = -1;
|
|
||||||
dragging_selected_attempt = false;
|
|
||||||
connecting = false;
|
|
||||||
|
|
||||||
last_active = false;
|
|
||||||
|
|
||||||
error_time = 0;
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,7 @@ class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin {
|
||||||
PanelContainer *error_panel = nullptr;
|
PanelContainer *error_panel = nullptr;
|
||||||
Label *error_label = nullptr;
|
Label *error_label = nullptr;
|
||||||
|
|
||||||
bool updating;
|
bool updating = false;
|
||||||
|
|
||||||
UndoRedo *undo_redo = nullptr;
|
UndoRedo *undo_redo = nullptr;
|
||||||
|
|
||||||
|
@ -93,14 +93,14 @@ class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin {
|
||||||
|
|
||||||
Vector2 add_node_pos;
|
Vector2 add_node_pos;
|
||||||
|
|
||||||
bool dragging_selected_attempt;
|
bool dragging_selected_attempt = false;
|
||||||
bool dragging_selected;
|
bool dragging_selected = false;
|
||||||
Vector2 drag_from;
|
Vector2 drag_from;
|
||||||
Vector2 drag_ofs;
|
Vector2 drag_ofs;
|
||||||
StringName snap_x;
|
StringName snap_x;
|
||||||
StringName snap_y;
|
StringName snap_y;
|
||||||
|
|
||||||
bool connecting;
|
bool connecting = false;
|
||||||
StringName connecting_from;
|
StringName connecting_from;
|
||||||
Vector2 connecting_to;
|
Vector2 connecting_to;
|
||||||
StringName connecting_to_node;
|
StringName connecting_to_node;
|
||||||
|
@ -139,7 +139,7 @@ class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin {
|
||||||
StringName selected_transition_to;
|
StringName selected_transition_to;
|
||||||
|
|
||||||
StringName over_node;
|
StringName over_node;
|
||||||
int over_node_what;
|
int over_node_what = -1;
|
||||||
|
|
||||||
String prev_name;
|
String prev_name;
|
||||||
void _name_edited(const String &p_text);
|
void _name_edited(const String &p_text);
|
||||||
|
@ -155,15 +155,15 @@ class AnimationNodeStateMachineEditor : public AnimationTreeNodeEditorPlugin {
|
||||||
void _autoplay_selected();
|
void _autoplay_selected();
|
||||||
void _end_selected();
|
void _end_selected();
|
||||||
|
|
||||||
bool last_active;
|
bool last_active = false;
|
||||||
StringName last_blend_from_node;
|
StringName last_blend_from_node;
|
||||||
StringName last_current_node;
|
StringName last_current_node;
|
||||||
Vector<StringName> last_travel_path;
|
Vector<StringName> last_travel_path;
|
||||||
float last_play_pos;
|
float last_play_pos = 0.0f;
|
||||||
float play_pos;
|
float play_pos = 0.0f;
|
||||||
float current_length;
|
float current_length = 0.0f;
|
||||||
|
|
||||||
float error_time;
|
float error_time = 0.0f;
|
||||||
String error_text;
|
String error_text;
|
||||||
|
|
||||||
EditorFileDialog *open_file = nullptr;
|
EditorFileDialog *open_file = nullptr;
|
||||||
|
|
|
@ -60,9 +60,9 @@ class EditorAssetLibraryItem : public PanelContainer {
|
||||||
TextureRect *stars[5];
|
TextureRect *stars[5];
|
||||||
Label *price = nullptr;
|
Label *price = nullptr;
|
||||||
|
|
||||||
int asset_id;
|
int asset_id = 0;
|
||||||
int category_id;
|
int category_id = 0;
|
||||||
int author_id;
|
int author_id = 0;
|
||||||
|
|
||||||
void _asset_clicked();
|
void _asset_clicked();
|
||||||
void _category_clicked();
|
void _category_clicked();
|
||||||
|
@ -102,7 +102,7 @@ class EditorAssetLibraryItemDescription : public ConfirmationDialog {
|
||||||
|
|
||||||
void set_image(int p_type, int p_index, const Ref<Texture2D> &p_image);
|
void set_image(int p_type, int p_index, const Ref<Texture2D> &p_image);
|
||||||
|
|
||||||
int asset_id;
|
int asset_id = 0;
|
||||||
String download_url;
|
String download_url;
|
||||||
String title;
|
String title;
|
||||||
String sha256;
|
String sha256;
|
||||||
|
@ -146,7 +146,7 @@ class EditorAssetLibraryItemDownload : public MarginContainer {
|
||||||
|
|
||||||
int prev_status;
|
int prev_status;
|
||||||
|
|
||||||
int asset_id;
|
int asset_id = 0;
|
||||||
|
|
||||||
bool external_install;
|
bool external_install;
|
||||||
|
|
||||||
|
|
|
@ -4888,14 +4888,6 @@ CanvasItemEditor::CanvasItemEditor() {
|
||||||
view_offset = Point2(-150 - RULER_WIDTH, -95 - RULER_WIDTH);
|
view_offset = Point2(-150 - RULER_WIDTH, -95 - RULER_WIDTH);
|
||||||
previous_update_view_offset = view_offset; // Moves the view a little bit to the left so that (0,0) is visible. The values a relative to a 16/10 screen
|
previous_update_view_offset = view_offset; // Moves the view a little bit to the left so that (0,0) is visible. The values a relative to a 16/10 screen
|
||||||
|
|
||||||
grid_offset = Point2();
|
|
||||||
grid_step = Point2(8, 8); // A power-of-two value works better as a default
|
|
||||||
primary_grid_steps = 8; // A power-of-two value works better as a default
|
|
||||||
grid_step_multiplier = 0;
|
|
||||||
|
|
||||||
snap_rotation_offset = 0;
|
|
||||||
snap_rotation_step = Math::deg2rad(15.0);
|
|
||||||
snap_scale_step = 0.1f;
|
|
||||||
snap_target[0] = SNAP_TARGET_NONE;
|
snap_target[0] = SNAP_TARGET_NONE;
|
||||||
snap_target[1] = SNAP_TARGET_NONE;
|
snap_target[1] = SNAP_TARGET_NONE;
|
||||||
|
|
||||||
|
|
|
@ -180,7 +180,7 @@ private:
|
||||||
GRID_VISIBILITY_HIDE,
|
GRID_VISIBILITY_HIDE,
|
||||||
};
|
};
|
||||||
|
|
||||||
bool selection_menu_additive_selection;
|
bool selection_menu_additive_selection = false;
|
||||||
|
|
||||||
Tool tool = TOOL_SELECT;
|
Tool tool = TOOL_SELECT;
|
||||||
Control *viewport = nullptr;
|
Control *viewport = nullptr;
|
||||||
|
@ -204,20 +204,20 @@ private:
|
||||||
bool show_edit_locks = true;
|
bool show_edit_locks = true;
|
||||||
bool show_transformation_gizmos = true;
|
bool show_transformation_gizmos = true;
|
||||||
|
|
||||||
real_t zoom;
|
real_t zoom = 1.0;
|
||||||
Point2 view_offset;
|
Point2 view_offset;
|
||||||
Point2 previous_update_view_offset;
|
Point2 previous_update_view_offset;
|
||||||
|
|
||||||
bool selected_from_canvas = false;
|
bool selected_from_canvas = false;
|
||||||
|
|
||||||
Point2 grid_offset;
|
Point2 grid_offset;
|
||||||
Point2 grid_step;
|
Point2 grid_step = Point2(8, 8); // A power-of-two value works better as a default.
|
||||||
int primary_grid_steps;
|
int primary_grid_steps = 8;
|
||||||
int grid_step_multiplier;
|
int grid_step_multiplier = 0;
|
||||||
|
|
||||||
real_t snap_rotation_step;
|
real_t snap_rotation_step = 0.0;
|
||||||
real_t snap_rotation_offset;
|
real_t snap_rotation_offset = Math::deg2rad(15.0);
|
||||||
real_t snap_scale_step;
|
real_t snap_scale_step = 0.1f;
|
||||||
bool smart_snap_active = false;
|
bool smart_snap_active = false;
|
||||||
bool grid_snap_active = false;
|
bool grid_snap_active = false;
|
||||||
|
|
||||||
|
@ -241,7 +241,7 @@ private:
|
||||||
bool pan_pressed = false;
|
bool pan_pressed = false;
|
||||||
|
|
||||||
bool ruler_tool_active = false;
|
bool ruler_tool_active = false;
|
||||||
Point2 ruler_tool_origin = Point2();
|
Point2 ruler_tool_origin;
|
||||||
Point2 node_create_position;
|
Point2 node_create_position;
|
||||||
|
|
||||||
MenuOption last_option;
|
MenuOption last_option;
|
||||||
|
@ -346,7 +346,7 @@ private:
|
||||||
bool is_hovering_h_guide = false;
|
bool is_hovering_h_guide = false;
|
||||||
bool is_hovering_v_guide = false;
|
bool is_hovering_v_guide = false;
|
||||||
|
|
||||||
bool updating_value_dialog;
|
bool updating_value_dialog = false;
|
||||||
|
|
||||||
Point2 box_selecting_to;
|
Point2 box_selecting_to;
|
||||||
|
|
||||||
|
|
|
@ -47,8 +47,8 @@ class MeshLibraryEditor : public Control {
|
||||||
ConfirmationDialog *cd_remove = nullptr;
|
ConfirmationDialog *cd_remove = nullptr;
|
||||||
ConfirmationDialog *cd_update = nullptr;
|
ConfirmationDialog *cd_update = nullptr;
|
||||||
EditorFileDialog *file = nullptr;
|
EditorFileDialog *file = nullptr;
|
||||||
bool apply_xforms;
|
bool apply_xforms = false;
|
||||||
int to_erase;
|
int to_erase = 0;
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
MENU_OPTION_ADD_ITEM,
|
MENU_OPTION_ADD_ITEM,
|
||||||
|
@ -58,7 +58,7 @@ class MeshLibraryEditor : public Control {
|
||||||
MENU_OPTION_IMPORT_FROM_SCENE_APPLY_XFORMS
|
MENU_OPTION_IMPORT_FROM_SCENE_APPLY_XFORMS
|
||||||
};
|
};
|
||||||
|
|
||||||
int option;
|
int option = 0;
|
||||||
void _import_scene_cbk(const String &p_str);
|
void _import_scene_cbk(const String &p_str);
|
||||||
void _menu_cbk(int p_option);
|
void _menu_cbk(int p_option);
|
||||||
void _menu_remove_confirm();
|
void _menu_remove_confirm();
|
||||||
|
|
|
@ -46,7 +46,7 @@ class MultiMeshEditor : public Control {
|
||||||
AcceptDialog *err_dialog = nullptr;
|
AcceptDialog *err_dialog = nullptr;
|
||||||
MenuButton *options = nullptr;
|
MenuButton *options = nullptr;
|
||||||
MultiMeshInstance3D *_last_pp_node = nullptr;
|
MultiMeshInstance3D *_last_pp_node = nullptr;
|
||||||
bool browsing_source;
|
bool browsing_source = false;
|
||||||
|
|
||||||
Panel *panel = nullptr;
|
Panel *panel = nullptr;
|
||||||
MultiMeshInstance3D *node = nullptr;
|
MultiMeshInstance3D *node = nullptr;
|
||||||
|
|
|
@ -211,7 +211,7 @@ private:
|
||||||
Control *surface = nullptr;
|
Control *surface = nullptr;
|
||||||
SubViewport *viewport = nullptr;
|
SubViewport *viewport = nullptr;
|
||||||
Camera3D *camera = nullptr;
|
Camera3D *camera = nullptr;
|
||||||
bool transforming;
|
bool transforming = false;
|
||||||
bool orthogonal;
|
bool orthogonal;
|
||||||
bool auto_orthogonal;
|
bool auto_orthogonal;
|
||||||
bool lock_rotation;
|
bool lock_rotation;
|
||||||
|
@ -271,7 +271,7 @@ private:
|
||||||
|
|
||||||
ObjectID clicked;
|
ObjectID clicked;
|
||||||
Vector<_RayResult> selection_results;
|
Vector<_RayResult> selection_results;
|
||||||
bool clicked_wants_append;
|
bool clicked_wants_append = false;
|
||||||
bool selection_in_progress = false;
|
bool selection_in_progress = false;
|
||||||
|
|
||||||
PopupMenu *selection_menu = nullptr;
|
PopupMenu *selection_menu = nullptr;
|
||||||
|
@ -551,12 +551,12 @@ private:
|
||||||
|
|
||||||
RID origin;
|
RID origin;
|
||||||
RID origin_instance;
|
RID origin_instance;
|
||||||
bool origin_enabled;
|
bool origin_enabled = false;
|
||||||
RID grid[3];
|
RID grid[3];
|
||||||
RID grid_instance[3];
|
RID grid_instance[3];
|
||||||
bool grid_visible[3]; //currently visible
|
bool grid_visible[3]; //currently visible
|
||||||
bool grid_enable[3]; //should be always visible if true
|
bool grid_enable[3]; //should be always visible if true
|
||||||
bool grid_enabled;
|
bool grid_enabled = false;
|
||||||
bool grid_init_draw = false;
|
bool grid_init_draw = false;
|
||||||
Camera3D::Projection grid_camera_last_update_perspective = Camera3D::PROJECTION_PERSPECTIVE;
|
Camera3D::Projection grid_camera_last_update_perspective = Camera3D::PROJECTION_PERSPECTIVE;
|
||||||
Vector3 grid_camera_last_update_position = Vector3();
|
Vector3 grid_camera_last_update_position = Vector3();
|
||||||
|
|
|
@ -82,11 +82,11 @@ class Path2DEditor : public HBoxContainer {
|
||||||
};
|
};
|
||||||
|
|
||||||
Action action;
|
Action action;
|
||||||
int action_point;
|
int action_point = 0;
|
||||||
Point2 moving_from;
|
Point2 moving_from;
|
||||||
Point2 moving_screen_from;
|
Point2 moving_screen_from;
|
||||||
float orig_in_length;
|
float orig_in_length = 0.0f;
|
||||||
float orig_out_length;
|
float orig_out_length = 0.0f;
|
||||||
Vector2 edge_point;
|
Vector2 edge_point;
|
||||||
|
|
||||||
void _mode_selected(int p_mode);
|
void _mode_selected(int p_mode);
|
||||||
|
|
|
@ -84,7 +84,7 @@ class Path3DEditorPlugin : public EditorPlugin {
|
||||||
void _mode_changed(int p_idx);
|
void _mode_changed(int p_idx);
|
||||||
void _close_curve();
|
void _close_curve();
|
||||||
void _handle_option_pressed(int p_option);
|
void _handle_option_pressed(int p_option);
|
||||||
bool handle_clicked;
|
bool handle_clicked = false;
|
||||||
bool mirror_handle_angle;
|
bool mirror_handle_angle;
|
||||||
bool mirror_handle_length;
|
bool mirror_handle_length;
|
||||||
|
|
||||||
|
|
|
@ -96,7 +96,7 @@ class Polygon2DEditor : public AbstractPolygon2DEditor {
|
||||||
SpinBox *bone_paint_radius = nullptr;
|
SpinBox *bone_paint_radius = nullptr;
|
||||||
Label *bone_paint_radius_label = nullptr;
|
Label *bone_paint_radius_label = nullptr;
|
||||||
bool bone_painting;
|
bool bone_painting;
|
||||||
int bone_painting_bone;
|
int bone_painting_bone = 0;
|
||||||
Vector<float> prev_weights;
|
Vector<float> prev_weights;
|
||||||
Vector2 bone_paint_pos;
|
Vector2 bone_paint_pos;
|
||||||
AcceptDialog *grid_settings = nullptr;
|
AcceptDialog *grid_settings = nullptr;
|
||||||
|
@ -110,7 +110,7 @@ class Polygon2DEditor : public AbstractPolygon2DEditor {
|
||||||
Vector<Vector2> uv_create_uv_prev;
|
Vector<Vector2> uv_create_uv_prev;
|
||||||
Vector<Vector2> uv_create_poly_prev;
|
Vector<Vector2> uv_create_poly_prev;
|
||||||
Vector<Color> uv_create_colors_prev;
|
Vector<Color> uv_create_colors_prev;
|
||||||
int uv_create_prev_internal_vertices;
|
int uv_create_prev_internal_vertices = 0;
|
||||||
Array uv_create_bones_prev;
|
Array uv_create_bones_prev;
|
||||||
Array polygons_prev;
|
Array polygons_prev;
|
||||||
|
|
||||||
|
|
|
@ -66,14 +66,14 @@ class Polygon3DEditor : public HBoxContainer {
|
||||||
|
|
||||||
MenuButton *options = nullptr;
|
MenuButton *options = nullptr;
|
||||||
|
|
||||||
int edited_point;
|
int edited_point = 0;
|
||||||
Vector2 edited_point_pos;
|
Vector2 edited_point_pos;
|
||||||
PackedVector2Array pre_move_edit;
|
PackedVector2Array pre_move_edit;
|
||||||
PackedVector2Array wip;
|
PackedVector2Array wip;
|
||||||
bool wip_active;
|
bool wip_active;
|
||||||
bool snap_ignore;
|
bool snap_ignore;
|
||||||
|
|
||||||
float prev_depth;
|
float prev_depth = 0.0f;
|
||||||
|
|
||||||
void _wip_close();
|
void _wip_close();
|
||||||
void _polygon_draw();
|
void _polygon_draw();
|
||||||
|
|
|
@ -249,7 +249,7 @@ class ScriptEditor : public PanelContainer {
|
||||||
MenuButton *debug_menu = nullptr;
|
MenuButton *debug_menu = nullptr;
|
||||||
PopupMenu *context_menu = nullptr;
|
PopupMenu *context_menu = nullptr;
|
||||||
Timer *autosave_timer = nullptr;
|
Timer *autosave_timer = nullptr;
|
||||||
uint64_t idle;
|
uint64_t idle = 0;
|
||||||
|
|
||||||
PopupMenu *recent_scripts = nullptr;
|
PopupMenu *recent_scripts = nullptr;
|
||||||
PopupMenu *theme_submenu = nullptr;
|
PopupMenu *theme_submenu = nullptr;
|
||||||
|
|
|
@ -114,7 +114,7 @@ class ShaderEditor : public PanelContainer {
|
||||||
MenuButton *help_menu = nullptr;
|
MenuButton *help_menu = nullptr;
|
||||||
PopupMenu *context_menu = nullptr;
|
PopupMenu *context_menu = nullptr;
|
||||||
RichTextLabel *warnings_panel = nullptr;
|
RichTextLabel *warnings_panel = nullptr;
|
||||||
uint64_t idle;
|
uint64_t idle = 0;
|
||||||
|
|
||||||
GotoLineDialog *goto_line_dialog = nullptr;
|
GotoLineDialog *goto_line_dialog = nullptr;
|
||||||
ConfirmationDialog *erase_tab_confirm = nullptr;
|
ConfirmationDialog *erase_tab_confirm = nullptr;
|
||||||
|
|
|
@ -131,7 +131,7 @@ class Skeleton3DEditor : public VBoxContainer {
|
||||||
|
|
||||||
EditorFileDialog *file_dialog = nullptr;
|
EditorFileDialog *file_dialog = nullptr;
|
||||||
|
|
||||||
bool keyable;
|
bool keyable = false;
|
||||||
|
|
||||||
static Skeleton3DEditor *singleton;
|
static Skeleton3DEditor *singleton;
|
||||||
|
|
||||||
|
|
|
@ -105,7 +105,7 @@ class SpriteFramesEditor : public HSplitContainer {
|
||||||
EditorFileDialog *file_split_sheet = nullptr;
|
EditorFileDialog *file_split_sheet = nullptr;
|
||||||
Set<int> frames_selected;
|
Set<int> frames_selected;
|
||||||
Set<int> frames_toggled_by_mouse_hover;
|
Set<int> frames_toggled_by_mouse_hover;
|
||||||
int last_frame_selected;
|
int last_frame_selected = 0;
|
||||||
|
|
||||||
float scale_ratio;
|
float scale_ratio;
|
||||||
int thumbnail_default_size;
|
int thumbnail_default_size;
|
||||||
|
|
|
@ -87,14 +87,14 @@ class TextureRegionEditor : public VBoxContainer {
|
||||||
|
|
||||||
Rect2 rect;
|
Rect2 rect;
|
||||||
Rect2 rect_prev;
|
Rect2 rect_prev;
|
||||||
float prev_margin;
|
float prev_margin = 0.0f;
|
||||||
int edited_margin;
|
int edited_margin;
|
||||||
Map<RID, List<Rect2>> cache_map;
|
Map<RID, List<Rect2>> cache_map;
|
||||||
List<Rect2> autoslice_cache;
|
List<Rect2> autoslice_cache;
|
||||||
bool autoslice_is_dirty;
|
bool autoslice_is_dirty;
|
||||||
|
|
||||||
bool drag;
|
bool drag;
|
||||||
bool creating;
|
bool creating = false;
|
||||||
Vector2 drag_from;
|
Vector2 drag_from;
|
||||||
int drag_index;
|
int drag_index;
|
||||||
|
|
||||||
|
|
|
@ -108,8 +108,8 @@ private:
|
||||||
DRAG_TYPE_PAN,
|
DRAG_TYPE_PAN,
|
||||||
};
|
};
|
||||||
DragType drag_type = DRAG_TYPE_NONE;
|
DragType drag_type = DRAG_TYPE_NONE;
|
||||||
int drag_polygon_index;
|
int drag_polygon_index = 0;
|
||||||
int drag_point_index;
|
int drag_point_index = 0;
|
||||||
Vector2 drag_last_pos;
|
Vector2 drag_last_pos;
|
||||||
PackedVector2Array drag_old_polygon;
|
PackedVector2Array drag_old_polygon;
|
||||||
|
|
||||||
|
@ -132,9 +132,9 @@ private:
|
||||||
Ref<Texture2D> background_texture;
|
Ref<Texture2D> background_texture;
|
||||||
Rect2 background_region;
|
Rect2 background_region;
|
||||||
Vector2 background_offset;
|
Vector2 background_offset;
|
||||||
bool background_h_flip;
|
bool background_h_flip = false;
|
||||||
bool background_v_flip;
|
bool background_v_flip = false;
|
||||||
bool background_transpose;
|
bool background_transpose = false;
|
||||||
Color background_modulate;
|
Color background_modulate;
|
||||||
|
|
||||||
Color polygon_color = Color(1.0, 0.0, 0.0);
|
Color polygon_color = Color(1.0, 0.0, 0.0);
|
||||||
|
|
|
@ -5864,7 +5864,7 @@ public:
|
||||||
class VisualShaderNodePluginDefaultEditor : public VBoxContainer {
|
class VisualShaderNodePluginDefaultEditor : public VBoxContainer {
|
||||||
GDCLASS(VisualShaderNodePluginDefaultEditor, VBoxContainer);
|
GDCLASS(VisualShaderNodePluginDefaultEditor, VBoxContainer);
|
||||||
Ref<Resource> parent_resource;
|
Ref<Resource> parent_resource;
|
||||||
int node_id;
|
int node_id = 0;
|
||||||
VisualShader::Type shader_type;
|
VisualShader::Type shader_type;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
@ -5927,7 +5927,7 @@ public:
|
||||||
InspectorDock::get_inspector_singleton()->edit(p_resource.ptr());
|
InspectorDock::get_inspector_singleton()->edit(p_resource.ptr());
|
||||||
}
|
}
|
||||||
|
|
||||||
bool updating;
|
bool updating = false;
|
||||||
Ref<VisualShaderNode> node;
|
Ref<VisualShaderNode> node;
|
||||||
Vector<EditorProperty *> properties;
|
Vector<EditorProperty *> properties;
|
||||||
Vector<Label *> prop_names;
|
Vector<Label *> prop_names;
|
||||||
|
|
|
@ -85,7 +85,7 @@ class ProgressDialog : public PopupPanel {
|
||||||
void _popup();
|
void _popup();
|
||||||
|
|
||||||
void _cancel_pressed();
|
void _cancel_pressed();
|
||||||
bool cancelled;
|
bool cancelled = false;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
void _notification(int p_what);
|
void _notification(int p_what);
|
||||||
|
|
|
@ -104,7 +104,7 @@ class CustomPropertyEditor : public PopupPanel {
|
||||||
Variant::Type type;
|
Variant::Type type;
|
||||||
Variant v;
|
Variant v;
|
||||||
List<String> field_names;
|
List<String> field_names;
|
||||||
int hint;
|
int hint = 0;
|
||||||
String hint_text;
|
String hint_text;
|
||||||
HBoxContainer *value_hboxes[MAX_VALUE_EDITORS / 4];
|
HBoxContainer *value_hboxes[MAX_VALUE_EDITORS / 4];
|
||||||
VBoxContainer *value_vbox = nullptr;
|
VBoxContainer *value_vbox = nullptr;
|
||||||
|
@ -120,7 +120,7 @@ class CustomPropertyEditor : public PopupPanel {
|
||||||
ColorPicker *color_picker = nullptr;
|
ColorPicker *color_picker = nullptr;
|
||||||
TextEdit *text_edit = nullptr;
|
TextEdit *text_edit = nullptr;
|
||||||
bool read_only = false;
|
bool read_only = false;
|
||||||
bool picking_viewport;
|
bool picking_viewport = false;
|
||||||
GridContainer *checks20gc = nullptr;
|
GridContainer *checks20gc = nullptr;
|
||||||
CheckBox *checks20[20];
|
CheckBox *checks20[20];
|
||||||
SpinBox *spinbox = nullptr;
|
SpinBox *spinbox = nullptr;
|
||||||
|
|
|
@ -50,7 +50,7 @@ class PropertySelector : public ConfirmationDialog {
|
||||||
|
|
||||||
EditorHelpBit *help_bit = nullptr;
|
EditorHelpBit *help_bit = nullptr;
|
||||||
|
|
||||||
bool properties;
|
bool properties = false;
|
||||||
String selected;
|
String selected;
|
||||||
Variant::Type type;
|
Variant::Type type;
|
||||||
String base_type;
|
String base_type;
|
||||||
|
|
|
@ -64,7 +64,7 @@ class RenameDialog : public ConfirmationDialog {
|
||||||
|
|
||||||
SceneTreeEditor *scene_tree_editor = nullptr;
|
SceneTreeEditor *scene_tree_editor = nullptr;
|
||||||
UndoRedo *undo_redo = nullptr;
|
UndoRedo *undo_redo = nullptr;
|
||||||
int global_count;
|
int global_count = 0;
|
||||||
|
|
||||||
LineEdit *lne_search = nullptr;
|
LineEdit *lne_search = nullptr;
|
||||||
LineEdit *lne_replace = nullptr;
|
LineEdit *lne_replace = nullptr;
|
||||||
|
@ -97,9 +97,9 @@ class RenameDialog : public ConfirmationDialog {
|
||||||
|
|
||||||
List<Pair<NodePath, String>> to_rename;
|
List<Pair<NodePath, String>> to_rename;
|
||||||
Node *preview_node = nullptr;
|
Node *preview_node = nullptr;
|
||||||
bool lock_preview_update;
|
bool lock_preview_update = false;
|
||||||
ErrorHandlerList eh;
|
ErrorHandlerList eh;
|
||||||
bool has_errors;
|
bool has_errors = false;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
|
|
|
@ -108,7 +108,7 @@ class SceneTreeDock : public VBoxContainer {
|
||||||
bool restore_script_editor_on_drag = false;
|
bool restore_script_editor_on_drag = false;
|
||||||
bool reset_create_dialog = false;
|
bool reset_create_dialog = false;
|
||||||
|
|
||||||
int current_option;
|
int current_option = 0;
|
||||||
CreateDialog *create_dialog = nullptr;
|
CreateDialog *create_dialog = nullptr;
|
||||||
#ifdef MODULE_REGEX_ENABLED
|
#ifdef MODULE_REGEX_ENABLED
|
||||||
RenameDialog *rename_dialog = nullptr;
|
RenameDialog *rename_dialog = nullptr;
|
||||||
|
|
|
@ -46,7 +46,7 @@ struct CVTTCompressionJobParams {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct CVTTCompressionRowTask {
|
struct CVTTCompressionRowTask {
|
||||||
const uint8_t *in_mm_bytes;
|
const uint8_t *in_mm_bytes = nullptr;
|
||||||
uint8_t *out_mm_bytes = nullptr;
|
uint8_t *out_mm_bytes = nullptr;
|
||||||
int y_start = 0;
|
int y_start = 0;
|
||||||
int width = 0;
|
int width = 0;
|
||||||
|
@ -55,7 +55,7 @@ struct CVTTCompressionRowTask {
|
||||||
|
|
||||||
struct CVTTCompressionJobQueue {
|
struct CVTTCompressionJobQueue {
|
||||||
CVTTCompressionJobParams job_params;
|
CVTTCompressionJobParams job_params;
|
||||||
const CVTTCompressionRowTask *job_tasks;
|
const CVTTCompressionRowTask *job_tasks = nullptr;
|
||||||
uint32_t num_tasks = 0;
|
uint32_t num_tasks = 0;
|
||||||
SafeNumeric<uint32_t> current_task;
|
SafeNumeric<uint32_t> current_task;
|
||||||
};
|
};
|
||||||
|
|
|
@ -68,7 +68,7 @@ enum DDSFormat {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct DDSFormatInfo {
|
struct DDSFormatInfo {
|
||||||
const char *name;
|
const char *name = nullptr;
|
||||||
bool compressed = false;
|
bool compressed = false;
|
||||||
bool palette = false;
|
bool palette = false;
|
||||||
uint32_t divisor = 0;
|
uint32_t divisor = 0;
|
||||||
|
|
|
@ -545,7 +545,7 @@ struct GDScriptUtilityFunctionsDefinitions {
|
||||||
};
|
};
|
||||||
|
|
||||||
struct GDScriptUtilityFunctionInfo {
|
struct GDScriptUtilityFunctionInfo {
|
||||||
GDScriptUtilityFunctions::FunctionPtr function;
|
GDScriptUtilityFunctions::FunctionPtr function = nullptr;
|
||||||
MethodInfo info;
|
MethodInfo info;
|
||||||
bool is_constant = false;
|
bool is_constant = false;
|
||||||
};
|
};
|
||||||
|
|
|
@ -78,11 +78,11 @@ private:
|
||||||
|
|
||||||
bool check_graphics_api_support(XrVersion p_desired_version);
|
bool check_graphics_api_support(XrVersion p_desired_version);
|
||||||
|
|
||||||
VkInstance vulkan_instance;
|
VkInstance vulkan_instance = nullptr;
|
||||||
VkPhysicalDevice vulkan_physical_device;
|
VkPhysicalDevice vulkan_physical_device = nullptr;
|
||||||
VkDevice vulkan_device;
|
VkDevice vulkan_device = nullptr;
|
||||||
uint32_t vulkan_queue_family_index;
|
uint32_t vulkan_queue_family_index = 0;
|
||||||
uint32_t vulkan_queue_index;
|
uint32_t vulkan_queue_index = 0;
|
||||||
|
|
||||||
XrResult xrGetVulkanGraphicsRequirements2KHR(XrInstance p_instance, XrSystemId p_system_id, XrGraphicsRequirementsVulkanKHR *p_graphics_requirements);
|
XrResult xrGetVulkanGraphicsRequirements2KHR(XrInstance p_instance, XrSystemId p_system_id, XrGraphicsRequirementsVulkanKHR *p_graphics_requirements);
|
||||||
XrResult xrCreateVulkanInstanceKHR(XrInstance p_instance, const XrVulkanInstanceCreateInfoKHR *p_create_info, VkInstance *r_vulkan_instance, VkResult *r_vulkan_result);
|
XrResult xrCreateVulkanInstanceKHR(XrInstance p_instance, const XrVulkanInstanceCreateInfoKHR *p_create_info, VkInstance *r_vulkan_instance, VkResult *r_vulkan_result);
|
||||||
|
|
|
@ -104,9 +104,9 @@ private:
|
||||||
|
|
||||||
// state
|
// state
|
||||||
XrInstance instance = XR_NULL_HANDLE;
|
XrInstance instance = XR_NULL_HANDLE;
|
||||||
XrSystemId system_id;
|
XrSystemId system_id = 0;
|
||||||
String system_name;
|
String system_name;
|
||||||
uint32_t vendor_id;
|
uint32_t vendor_id = 0;
|
||||||
XrSystemTrackingProperties tracking_properties;
|
XrSystemTrackingProperties tracking_properties;
|
||||||
XrSession session = XR_NULL_HANDLE;
|
XrSession session = XR_NULL_HANDLE;
|
||||||
XrSessionState session_state = XR_SESSION_STATE_UNKNOWN;
|
XrSessionState session_state = XR_SESSION_STATE_UNKNOWN;
|
||||||
|
|
|
@ -878,8 +878,8 @@ _FORCE_INLINE_ TextServerAdvanced::FontTexturePosition TextServerAdvanced::find_
|
||||||
|
|
||||||
struct MSContext {
|
struct MSContext {
|
||||||
msdfgen::Point2 position;
|
msdfgen::Point2 position;
|
||||||
msdfgen::Shape *shape;
|
msdfgen::Shape *shape = nullptr;
|
||||||
msdfgen::Contour *contour;
|
msdfgen::Contour *contour = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DistancePixelConversion {
|
class DistancePixelConversion {
|
||||||
|
|
|
@ -322,8 +322,8 @@ _FORCE_INLINE_ TextServerFallback::FontTexturePosition TextServerFallback::find_
|
||||||
|
|
||||||
struct MSContext {
|
struct MSContext {
|
||||||
msdfgen::Point2 position;
|
msdfgen::Point2 position;
|
||||||
msdfgen::Shape *shape;
|
msdfgen::Shape *shape = nullptr;
|
||||||
msdfgen::Contour *contour;
|
msdfgen::Contour *contour = nullptr;
|
||||||
};
|
};
|
||||||
|
|
||||||
class DistancePixelConversion {
|
class DistancePixelConversion {
|
||||||
|
|
|
@ -99,7 +99,7 @@ class VideoStreamPlaybackTheora : public VideoStreamPlayback {
|
||||||
|
|
||||||
Ref<ImageTexture> texture;
|
Ref<ImageTexture> texture;
|
||||||
|
|
||||||
AudioMixCallback mix_callback;
|
AudioMixCallback mix_callback = nullptr;
|
||||||
void *mix_udata = nullptr;
|
void *mix_udata = nullptr;
|
||||||
bool paused = false;
|
bool paused = false;
|
||||||
|
|
||||||
|
|
|
@ -173,8 +173,8 @@ class VisualScriptPropertySelector::SearchRunner : public RefCounted {
|
||||||
Control *ui_service = nullptr;
|
Control *ui_service = nullptr;
|
||||||
Tree *results_tree = nullptr;
|
Tree *results_tree = nullptr;
|
||||||
String term;
|
String term;
|
||||||
int search_flags;
|
int search_flags = 0;
|
||||||
int scope_flags;
|
int scope_flags = 0;
|
||||||
|
|
||||||
Ref<Texture2D> empty_icon;
|
Ref<Texture2D> empty_icon;
|
||||||
Color disabled_color;
|
Color disabled_color;
|
||||||
|
|
|
@ -1180,8 +1180,8 @@ void VisualScriptBuiltinFunc::exec_func(BuiltinFunc p_func, const Variant **p_in
|
||||||
|
|
||||||
class VisualScriptNodeInstanceBuiltinFunc : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceBuiltinFunc : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptBuiltinFunc *node;
|
VisualScriptBuiltinFunc *node = nullptr;
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
|
|
||||||
VisualScriptBuiltinFunc::BuiltinFunc func;
|
VisualScriptBuiltinFunc::BuiltinFunc func;
|
||||||
|
|
||||||
|
|
|
@ -1299,8 +1299,8 @@ bool VisualScriptExpression::_compile_expression() {
|
||||||
|
|
||||||
class VisualScriptNodeInstanceExpression : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceExpression : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
VisualScriptExpression *expression;
|
VisualScriptExpression *expression = nullptr;
|
||||||
|
|
||||||
//virtual int get_working_memory_size() const override { return 0; }
|
//virtual int get_working_memory_size() const override { return 0; }
|
||||||
//execute by parsing the tree directly
|
//execute by parsing the tree directly
|
||||||
|
|
|
@ -119,9 +119,9 @@ void VisualScriptReturn::_bind_methods() {
|
||||||
|
|
||||||
class VisualScriptNodeInstanceReturn : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceReturn : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptReturn *node;
|
VisualScriptReturn *node = nullptr;
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
bool with_value;
|
bool with_value = false;
|
||||||
|
|
||||||
virtual int get_working_memory_size() const override { return 1; }
|
virtual int get_working_memory_size() const override { return 1; }
|
||||||
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
|
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
|
||||||
|
@ -213,8 +213,8 @@ void VisualScriptCondition::_bind_methods() {
|
||||||
|
|
||||||
class VisualScriptNodeInstanceCondition : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceCondition : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptCondition *node;
|
VisualScriptCondition *node = nullptr;
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
|
|
||||||
//virtual int get_working_memory_size() const override { return 1; }
|
//virtual int get_working_memory_size() const override { return 1; }
|
||||||
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
|
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
|
||||||
|
@ -293,8 +293,8 @@ void VisualScriptWhile::_bind_methods() {
|
||||||
|
|
||||||
class VisualScriptNodeInstanceWhile : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceWhile : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptWhile *node;
|
VisualScriptWhile *node = nullptr;
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
|
|
||||||
//virtual int get_working_memory_size() const override { return 1; }
|
//virtual int get_working_memory_size() const override { return 1; }
|
||||||
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
|
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
|
||||||
|
@ -376,8 +376,8 @@ void VisualScriptIterator::_bind_methods() {
|
||||||
|
|
||||||
class VisualScriptNodeInstanceIterator : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceIterator : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptIterator *node;
|
VisualScriptIterator *node = nullptr;
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
|
|
||||||
virtual int get_working_memory_size() const override { return 2; }
|
virtual int get_working_memory_size() const override { return 2; }
|
||||||
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
|
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
|
||||||
|
@ -508,9 +508,9 @@ void VisualScriptSequence::_bind_methods() {
|
||||||
|
|
||||||
class VisualScriptNodeInstanceSequence : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceSequence : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptSequence *node;
|
VisualScriptSequence *node = nullptr;
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
int steps;
|
int steps = 0;
|
||||||
|
|
||||||
virtual int get_working_memory_size() const override { return 1; }
|
virtual int get_working_memory_size() const override { return 1; }
|
||||||
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
|
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
|
||||||
|
@ -596,8 +596,8 @@ String VisualScriptSwitch::get_text() const {
|
||||||
|
|
||||||
class VisualScriptNodeInstanceSwitch : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceSwitch : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
int case_count;
|
int case_count = 0;
|
||||||
|
|
||||||
//virtual int get_working_memory_size() const override { return 0; }
|
//virtual int get_working_memory_size() const override { return 0; }
|
||||||
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
|
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
|
||||||
|
@ -774,7 +774,7 @@ VisualScriptTypeCast::TypeGuess VisualScriptTypeCast::guess_output_type(TypeGues
|
||||||
|
|
||||||
class VisualScriptNodeInstanceTypeCast : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceTypeCast : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
StringName base_type;
|
StringName base_type;
|
||||||
String script;
|
String script;
|
||||||
|
|
||||||
|
|
|
@ -720,15 +720,15 @@ class VisualScriptNodeInstanceFunctionCall : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptFunctionCall::CallMode call_mode;
|
VisualScriptFunctionCall::CallMode call_mode;
|
||||||
NodePath node_path;
|
NodePath node_path;
|
||||||
int input_args;
|
int input_args = 0;
|
||||||
bool validate;
|
bool validate = false;
|
||||||
int returns;
|
int returns = 0;
|
||||||
VisualScriptFunctionCall::RPCCallMode rpc_mode;
|
VisualScriptFunctionCall::RPCCallMode rpc_mode;
|
||||||
StringName function;
|
StringName function;
|
||||||
StringName singleton;
|
StringName singleton;
|
||||||
|
|
||||||
VisualScriptFunctionCall *node;
|
VisualScriptFunctionCall *node = nullptr;
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
|
|
||||||
//virtual int get_working_memory_size() const override { return 0; }
|
//virtual int get_working_memory_size() const override { return 0; }
|
||||||
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
|
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
|
||||||
|
@ -1462,11 +1462,11 @@ public:
|
||||||
NodePath node_path;
|
NodePath node_path;
|
||||||
StringName property;
|
StringName property;
|
||||||
|
|
||||||
VisualScriptPropertySet *node;
|
VisualScriptPropertySet *node = nullptr;
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
VisualScriptPropertySet::AssignOp assign_op;
|
VisualScriptPropertySet::AssignOp assign_op;
|
||||||
StringName index;
|
StringName index;
|
||||||
bool needs_get;
|
bool needs_get = false;
|
||||||
|
|
||||||
//virtual int get_working_memory_size() const override { return 0; }
|
//virtual int get_working_memory_size() const override { return 0; }
|
||||||
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
|
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
|
||||||
|
@ -2152,8 +2152,8 @@ public:
|
||||||
StringName property;
|
StringName property;
|
||||||
StringName index;
|
StringName index;
|
||||||
|
|
||||||
VisualScriptPropertyGet *node;
|
VisualScriptPropertyGet *node = nullptr;
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
|
|
||||||
virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override {
|
virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override {
|
||||||
switch (call_mode) {
|
switch (call_mode) {
|
||||||
|
@ -2362,9 +2362,9 @@ void VisualScriptEmitSignal::_bind_methods() {
|
||||||
|
|
||||||
class VisualScriptNodeInstanceEmitSignal : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceEmitSignal : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptEmitSignal *node;
|
VisualScriptEmitSignal *node = nullptr;
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
int argcount;
|
int argcount = 0;
|
||||||
StringName name;
|
StringName name;
|
||||||
|
|
||||||
//virtual int get_working_memory_size() const override { return 0; }
|
//virtual int get_working_memory_size() const override { return 0; }
|
||||||
|
|
|
@ -271,8 +271,8 @@ Multiplayer::RPCMode VisualScriptFunction::get_rpc_mode() const {
|
||||||
|
|
||||||
class VisualScriptNodeInstanceFunction : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceFunction : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptFunction *node;
|
VisualScriptFunction *node = nullptr;
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
|
|
||||||
//virtual int get_working_memory_size() const override { return 0; }
|
//virtual int get_working_memory_size() const override { return 0; }
|
||||||
|
|
||||||
|
@ -1097,7 +1097,7 @@ void VisualScriptOperator::_bind_methods() {
|
||||||
|
|
||||||
class VisualScriptNodeInstanceOperator : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceOperator : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
bool unary;
|
bool unary = false;
|
||||||
Variant::Operator op;
|
Variant::Operator op;
|
||||||
|
|
||||||
//virtual int get_working_memory_size() const override { return 0; }
|
//virtual int get_working_memory_size() const override { return 0; }
|
||||||
|
@ -1328,8 +1328,8 @@ void VisualScriptVariableGet::_bind_methods() {
|
||||||
|
|
||||||
class VisualScriptNodeInstanceVariableGet : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceVariableGet : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptVariableGet *node;
|
VisualScriptVariableGet *node = nullptr;
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
StringName variable;
|
StringName variable;
|
||||||
|
|
||||||
virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override {
|
virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override {
|
||||||
|
@ -1438,8 +1438,8 @@ void VisualScriptVariableSet::_bind_methods() {
|
||||||
|
|
||||||
class VisualScriptNodeInstanceVariableSet : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceVariableSet : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptVariableSet *node;
|
VisualScriptVariableSet *node = nullptr;
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
StringName variable;
|
StringName variable;
|
||||||
|
|
||||||
//virtual int get_working_memory_size() const override { return 0; }
|
//virtual int get_working_memory_size() const override { return 0; }
|
||||||
|
@ -1851,8 +1851,7 @@ int VisualScriptGlobalConstant::get_global_constant() {
|
||||||
|
|
||||||
class VisualScriptNodeInstanceGlobalConstant : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceGlobalConstant : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
int index;
|
int index = 0;
|
||||||
//virtual int get_working_memory_size() const override { return 0; }
|
|
||||||
|
|
||||||
virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override {
|
virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override {
|
||||||
*p_outputs[0] = CoreConstants::get_global_constant_value(index);
|
*p_outputs[0] = CoreConstants::get_global_constant_value(index);
|
||||||
|
@ -1963,9 +1962,8 @@ StringName VisualScriptClassConstant::get_base_type() {
|
||||||
|
|
||||||
class VisualScriptNodeInstanceClassConstant : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceClassConstant : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
int value;
|
int value = 0;
|
||||||
bool valid;
|
bool valid = false;
|
||||||
//virtual int get_working_memory_size() const override { return 0; }
|
|
||||||
|
|
||||||
virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override {
|
virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
|
@ -2098,8 +2096,7 @@ Variant::Type VisualScriptBasicTypeConstant::get_basic_type() const {
|
||||||
class VisualScriptNodeInstanceBasicTypeConstant : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceBasicTypeConstant : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
Variant value;
|
Variant value;
|
||||||
bool valid;
|
bool valid = false;
|
||||||
//virtual int get_working_memory_size() const override { return 0; }
|
|
||||||
|
|
||||||
virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override {
|
virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override {
|
||||||
if (!valid) {
|
if (!valid) {
|
||||||
|
@ -2227,8 +2224,7 @@ VisualScriptMathConstant::MathConstant VisualScriptMathConstant::get_math_consta
|
||||||
|
|
||||||
class VisualScriptNodeInstanceMathConstant : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceMathConstant : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
float value;
|
float value = 0.0f;
|
||||||
//virtual int get_working_memory_size() const override { return 0; }
|
|
||||||
|
|
||||||
virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override {
|
virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override {
|
||||||
*p_outputs[0] = value;
|
*p_outputs[0] = value;
|
||||||
|
@ -2320,7 +2316,7 @@ String VisualScriptEngineSingleton::get_singleton() {
|
||||||
|
|
||||||
class VisualScriptNodeInstanceEngineSingleton : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceEngineSingleton : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
Object *singleton;
|
Object *singleton = nullptr;
|
||||||
|
|
||||||
//virtual int get_working_memory_size() const override { return 0; }
|
//virtual int get_working_memory_size() const override { return 0; }
|
||||||
|
|
||||||
|
@ -2429,8 +2425,8 @@ NodePath VisualScriptSceneNode::get_node_path() {
|
||||||
|
|
||||||
class VisualScriptNodeInstanceSceneNode : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceSceneNode : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptSceneNode *node;
|
VisualScriptSceneNode *node = nullptr;
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
NodePath path;
|
NodePath path;
|
||||||
|
|
||||||
//virtual int get_working_memory_size() const override { return 0; }
|
//virtual int get_working_memory_size() const override { return 0; }
|
||||||
|
@ -2610,8 +2606,8 @@ String VisualScriptSceneTree::get_caption() const {
|
||||||
|
|
||||||
class VisualScriptNodeInstanceSceneTree : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceSceneTree : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptSceneTree *node;
|
VisualScriptSceneTree *node = nullptr;
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
|
|
||||||
//virtual int get_working_memory_size() const override { return 0; }
|
//virtual int get_working_memory_size() const override { return 0; }
|
||||||
|
|
||||||
|
@ -2779,7 +2775,7 @@ String VisualScriptSelf::get_caption() const {
|
||||||
|
|
||||||
class VisualScriptNodeInstanceSelf : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceSelf : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
|
|
||||||
//virtual int get_working_memory_size() const override { return 0; }
|
//virtual int get_working_memory_size() const override { return 0; }
|
||||||
|
|
||||||
|
@ -2965,11 +2961,11 @@ String VisualScriptCustomNode::get_category() const {
|
||||||
|
|
||||||
class VisualScriptNodeInstanceCustomNode : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceCustomNode : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
VisualScriptCustomNode *node;
|
VisualScriptCustomNode *node = nullptr;
|
||||||
int in_count;
|
int in_count = 0;
|
||||||
int out_count;
|
int out_count = 0;
|
||||||
int work_mem_size;
|
int work_mem_size = 0;
|
||||||
|
|
||||||
virtual int get_working_memory_size() const override { return work_mem_size; }
|
virtual int get_working_memory_size() const override { return work_mem_size; }
|
||||||
virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override {
|
virtual int step(const Variant **p_inputs, Variant **p_outputs, StartMode p_start_mode, Variant *p_working_mem, Callable::CallError &r_error, String &r_error_str) override {
|
||||||
|
@ -3161,10 +3157,10 @@ String VisualScriptSubCall::get_category() const {
|
||||||
|
|
||||||
class VisualScriptNodeInstanceSubCall : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceSubCall : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
VisualScriptSubCall *subcall;
|
VisualScriptSubCall *subcall = nullptr;
|
||||||
int input_args;
|
int input_args = 0;
|
||||||
bool valid;
|
bool valid = false;
|
||||||
|
|
||||||
//virtual int get_working_memory_size() const override { return 0; }
|
//virtual int get_working_memory_size() const override { return 0; }
|
||||||
|
|
||||||
|
@ -3281,7 +3277,7 @@ String VisualScriptComment::get_category() const {
|
||||||
|
|
||||||
class VisualScriptNodeInstanceComment : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceComment : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
|
|
||||||
//virtual int get_working_memory_size() const override { return 0; }
|
//virtual int get_working_memory_size() const override { return 0; }
|
||||||
|
|
||||||
|
@ -3380,9 +3376,9 @@ Dictionary VisualScriptConstructor::get_constructor() const {
|
||||||
|
|
||||||
class VisualScriptNodeInstanceConstructor : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceConstructor : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
Variant::Type type;
|
Variant::Type type;
|
||||||
int argcount;
|
int argcount = 0;
|
||||||
|
|
||||||
//virtual int get_working_memory_size() const override { return 0; }
|
//virtual int get_working_memory_size() const override { return 0; }
|
||||||
|
|
||||||
|
@ -3497,7 +3493,7 @@ Variant::Type VisualScriptLocalVar::get_var_type() const {
|
||||||
|
|
||||||
class VisualScriptNodeInstanceLocalVar : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceLocalVar : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
StringName name;
|
StringName name;
|
||||||
|
|
||||||
virtual int get_working_memory_size() const override { return 1; }
|
virtual int get_working_memory_size() const override { return 1; }
|
||||||
|
@ -3604,7 +3600,7 @@ Variant::Type VisualScriptLocalVarSet::get_var_type() const {
|
||||||
|
|
||||||
class VisualScriptNodeInstanceLocalVarSet : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceLocalVarSet : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
StringName name;
|
StringName name;
|
||||||
|
|
||||||
virtual int get_working_memory_size() const override { return 1; }
|
virtual int get_working_memory_size() const override { return 1; }
|
||||||
|
@ -3728,7 +3724,7 @@ VisualScriptInputAction::Mode VisualScriptInputAction::get_action_mode() const {
|
||||||
|
|
||||||
class VisualScriptNodeInstanceInputAction : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceInputAction : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
StringName action;
|
StringName action;
|
||||||
VisualScriptInputAction::Mode mode;
|
VisualScriptInputAction::Mode mode;
|
||||||
|
|
||||||
|
@ -3906,7 +3902,7 @@ Array VisualScriptDeconstruct::_get_elem_cache() const {
|
||||||
|
|
||||||
class VisualScriptNodeInstanceDeconstruct : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceDeconstruct : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
Vector<StringName> outputs;
|
Vector<StringName> outputs;
|
||||||
|
|
||||||
//virtual int get_working_memory_size() const override { return 0; }
|
//virtual int get_working_memory_size() const override { return 0; }
|
||||||
|
|
|
@ -93,7 +93,7 @@ String VisualScriptYield::get_text() const {
|
||||||
class VisualScriptNodeInstanceYield : public VisualScriptNodeInstance {
|
class VisualScriptNodeInstanceYield : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptYield::YieldMode mode;
|
VisualScriptYield::YieldMode mode;
|
||||||
double wait_time;
|
double wait_time = 0.0;
|
||||||
|
|
||||||
virtual int get_working_memory_size() const override { return 1; } //yield needs at least 1
|
virtual int get_working_memory_size() const override { return 1; } //yield needs at least 1
|
||||||
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
|
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
|
||||||
|
@ -500,11 +500,11 @@ class VisualScriptNodeInstanceYieldSignal : public VisualScriptNodeInstance {
|
||||||
public:
|
public:
|
||||||
VisualScriptYieldSignal::CallMode call_mode;
|
VisualScriptYieldSignal::CallMode call_mode;
|
||||||
NodePath node_path;
|
NodePath node_path;
|
||||||
int output_args;
|
int output_args = 0;
|
||||||
StringName signal;
|
StringName signal;
|
||||||
|
|
||||||
VisualScriptYieldSignal *node;
|
VisualScriptYieldSignal *node = nullptr;
|
||||||
VisualScriptInstance *instance;
|
VisualScriptInstance *instance = nullptr;
|
||||||
|
|
||||||
virtual int get_working_memory_size() const override { return 1; }
|
virtual int get_working_memory_size() const override { return 1; }
|
||||||
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
|
//virtual bool is_output_port_unsequenced(int p_idx) const { return false; }
|
||||||
|
|
|
@ -63,7 +63,7 @@ private:
|
||||||
|
|
||||||
String _key;
|
String _key;
|
||||||
String _host;
|
String _host;
|
||||||
uint16_t _port;
|
uint16_t _port = 0;
|
||||||
Array _ip_candidates;
|
Array _ip_candidates;
|
||||||
Vector<String> _protocols;
|
Vector<String> _protocols;
|
||||||
bool _use_ssl = false;
|
bool _use_ssl = false;
|
||||||
|
|
|
@ -53,8 +53,6 @@
|
||||||
class EditorExportPlatformIOS : public EditorExportPlatform {
|
class EditorExportPlatformIOS : public EditorExportPlatform {
|
||||||
GDCLASS(EditorExportPlatformIOS, EditorExportPlatform);
|
GDCLASS(EditorExportPlatformIOS, EditorExportPlatform);
|
||||||
|
|
||||||
int version_code;
|
|
||||||
|
|
||||||
Ref<ImageTexture> logo;
|
Ref<ImageTexture> logo;
|
||||||
|
|
||||||
// Plugins
|
// Plugins
|
||||||
|
|
|
@ -55,7 +55,7 @@
|
||||||
typedef GLXContext (*GLXCREATECONTEXTATTRIBSARBPROC)(Display *, GLXFBConfig, GLXContext, Bool, const int *);
|
typedef GLXContext (*GLXCREATECONTEXTATTRIBSARBPROC)(Display *, GLXFBConfig, GLXContext, Bool, const int *);
|
||||||
|
|
||||||
struct vendor {
|
struct vendor {
|
||||||
const char *glxvendor;
|
const char *glxvendor = nullptr;
|
||||||
int priority = 0;
|
int priority = 0;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -4531,24 +4531,11 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode
|
||||||
|
|
||||||
r_error = OK;
|
r_error = OK;
|
||||||
|
|
||||||
current_cursor = CURSOR_ARROW;
|
|
||||||
mouse_mode = MOUSE_MODE_VISIBLE;
|
|
||||||
|
|
||||||
for (int i = 0; i < CURSOR_MAX; i++) {
|
for (int i = 0; i < CURSOR_MAX; i++) {
|
||||||
cursors[i] = None;
|
cursors[i] = None;
|
||||||
img[i] = nullptr;
|
img[i] = nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
xmbstring = nullptr;
|
|
||||||
|
|
||||||
last_click_ms = 0;
|
|
||||||
last_click_button_index = MouseButton::NONE;
|
|
||||||
last_click_pos = Point2i(-100, -100);
|
|
||||||
|
|
||||||
last_timestamp = 0;
|
|
||||||
last_mouse_pos_valid = false;
|
|
||||||
last_keyrelease_time = 0;
|
|
||||||
|
|
||||||
XInitThreads(); //always use threads
|
XInitThreads(); //always use threads
|
||||||
|
|
||||||
/** XLIB INITIALIZATION **/
|
/** XLIB INITIALIZATION **/
|
||||||
|
@ -4583,8 +4570,6 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode
|
||||||
}
|
}
|
||||||
|
|
||||||
const char *err;
|
const char *err;
|
||||||
xrr_get_monitors = nullptr;
|
|
||||||
xrr_free_monitors = nullptr;
|
|
||||||
int xrandr_major = 0;
|
int xrandr_major = 0;
|
||||||
int xrandr_minor = 0;
|
int xrandr_minor = 0;
|
||||||
int event_base, error_base;
|
int event_base, error_base;
|
||||||
|
@ -4660,11 +4645,10 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode
|
||||||
XFree(imvalret);
|
XFree(imvalret);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Atorm internment */
|
/* Atom internment */
|
||||||
wm_delete = XInternAtom(x11_display, "WM_DELETE_WINDOW", true);
|
wm_delete = XInternAtom(x11_display, "WM_DELETE_WINDOW", true);
|
||||||
//Set Xdnd (drag & drop) support
|
// Set Xdnd (drag & drop) support.
|
||||||
xdnd_aware = XInternAtom(x11_display, "XdndAware", False);
|
xdnd_aware = XInternAtom(x11_display, "XdndAware", False);
|
||||||
xdnd_version = 5;
|
|
||||||
xdnd_enter = XInternAtom(x11_display, "XdndEnter", False);
|
xdnd_enter = XInternAtom(x11_display, "XdndEnter", False);
|
||||||
xdnd_position = XInternAtom(x11_display, "XdndPosition", False);
|
xdnd_position = XInternAtom(x11_display, "XdndPosition", False);
|
||||||
xdnd_status = XInternAtom(x11_display, "XdndStatus", False);
|
xdnd_status = XInternAtom(x11_display, "XdndStatus", False);
|
||||||
|
@ -4751,11 +4735,7 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode
|
||||||
}
|
}
|
||||||
driver_found = true;
|
driver_found = true;
|
||||||
|
|
||||||
// gl_manager->set_use_vsync(current_videomode.use_vsync);
|
|
||||||
|
|
||||||
if (true) {
|
if (true) {
|
||||||
// if (RasterizerGLES3::is_viable() == OK) {
|
|
||||||
// RasterizerGLES3::register_config();
|
|
||||||
RasterizerGLES3::make_current();
|
RasterizerGLES3::make_current();
|
||||||
} else {
|
} else {
|
||||||
memdelete(gl_manager);
|
memdelete(gl_manager);
|
||||||
|
@ -4930,12 +4910,6 @@ DisplayServerX11::DisplayServerX11(const String &p_rendering_driver, WindowMode
|
||||||
}
|
}
|
||||||
cursor_set_shape(CURSOR_BUSY);
|
cursor_set_shape(CURSOR_BUSY);
|
||||||
|
|
||||||
requested = None;
|
|
||||||
|
|
||||||
/*if (p_desired.layered) {
|
|
||||||
set_window_per_pixel_transparency_enabled(true);
|
|
||||||
}*/
|
|
||||||
|
|
||||||
XEvent xevent;
|
XEvent xevent;
|
||||||
while (XPending(x11_display) > 0) {
|
while (XPending(x11_display) > 0) {
|
||||||
XNextEvent(x11_display, &xevent);
|
XNextEvent(x11_display, &xevent);
|
||||||
|
|
|
@ -100,8 +100,8 @@ class DisplayServerX11 : public DisplayServer {
|
||||||
Atom xdnd_finished;
|
Atom xdnd_finished;
|
||||||
Atom xdnd_selection;
|
Atom xdnd_selection;
|
||||||
Atom xdnd_aware;
|
Atom xdnd_aware;
|
||||||
Atom requested;
|
Atom requested = None;
|
||||||
int xdnd_version;
|
int xdnd_version = 5;
|
||||||
|
|
||||||
#if defined(GLES3_ENABLED)
|
#if defined(GLES3_ENABLED)
|
||||||
GLManager_X11 *gl_manager = nullptr;
|
GLManager_X11 *gl_manager = nullptr;
|
||||||
|
@ -174,21 +174,21 @@ class DisplayServerX11 : public DisplayServer {
|
||||||
|
|
||||||
String internal_clipboard;
|
String internal_clipboard;
|
||||||
String internal_clipboard_primary;
|
String internal_clipboard_primary;
|
||||||
Window xdnd_source_window;
|
Window xdnd_source_window = 0;
|
||||||
::Display *x11_display;
|
::Display *x11_display;
|
||||||
char *xmbstring = nullptr;
|
char *xmbstring = nullptr;
|
||||||
int xmblen;
|
int xmblen = 0;
|
||||||
unsigned long last_timestamp;
|
unsigned long last_timestamp = 0;
|
||||||
::Time last_keyrelease_time;
|
::Time last_keyrelease_time = 0;
|
||||||
::XIM xim;
|
::XIM xim;
|
||||||
::XIMStyle xim_style;
|
::XIMStyle xim_style;
|
||||||
static void _xim_destroy_callback(::XIM im, ::XPointer client_data,
|
static void _xim_destroy_callback(::XIM im, ::XPointer client_data,
|
||||||
::XPointer call_data);
|
::XPointer call_data);
|
||||||
|
|
||||||
Point2i last_mouse_pos;
|
Point2i last_mouse_pos;
|
||||||
bool last_mouse_pos_valid;
|
bool last_mouse_pos_valid = false;
|
||||||
Point2i last_click_pos;
|
Point2i last_click_pos = Point2i(-100, -100);
|
||||||
uint64_t last_click_ms;
|
uint64_t last_click_ms = 0;
|
||||||
MouseButton last_click_button_index = MouseButton::NONE;
|
MouseButton last_click_button_index = MouseButton::NONE;
|
||||||
MouseButton last_button_state = MouseButton::NONE;
|
MouseButton last_button_state = MouseButton::NONE;
|
||||||
bool app_focused = false;
|
bool app_focused = false;
|
||||||
|
@ -221,7 +221,7 @@ class DisplayServerX11 : public DisplayServer {
|
||||||
void _get_key_modifier_state(unsigned int p_x11_state, Ref<InputEventWithModifiers> state);
|
void _get_key_modifier_state(unsigned int p_x11_state, Ref<InputEventWithModifiers> state);
|
||||||
void _flush_mouse_motion();
|
void _flush_mouse_motion();
|
||||||
|
|
||||||
MouseMode mouse_mode;
|
MouseMode mouse_mode = MOUSE_MODE_VISIBLE;
|
||||||
Point2i center;
|
Point2i center;
|
||||||
|
|
||||||
void _handle_key_event(WindowID p_window, XKeyEvent *p_event, LocalVector<XEvent> &p_events, uint32_t &p_event_index, bool p_echo = false);
|
void _handle_key_event(WindowID p_window, XKeyEvent *p_event, LocalVector<XEvent> &p_events, uint32_t &p_event_index, bool p_echo = false);
|
||||||
|
@ -233,30 +233,26 @@ class DisplayServerX11 : public DisplayServer {
|
||||||
String _clipboard_get(Atom p_source, Window x11_window) const;
|
String _clipboard_get(Atom p_source, Window x11_window) const;
|
||||||
void _clipboard_transfer_ownership(Atom p_source, Window x11_window) const;
|
void _clipboard_transfer_ownership(Atom p_source, Window x11_window) const;
|
||||||
|
|
||||||
//bool minimized;
|
bool do_mouse_warp = false;
|
||||||
//bool window_has_focus;
|
|
||||||
bool do_mouse_warp;
|
|
||||||
|
|
||||||
const char *cursor_theme;
|
const char *cursor_theme = nullptr;
|
||||||
int cursor_size;
|
int cursor_size = 0;
|
||||||
XcursorImage *img[CURSOR_MAX];
|
XcursorImage *img[CURSOR_MAX];
|
||||||
Cursor cursors[CURSOR_MAX];
|
Cursor cursors[CURSOR_MAX];
|
||||||
Cursor null_cursor;
|
Cursor null_cursor;
|
||||||
CursorShape current_cursor;
|
CursorShape current_cursor = CURSOR_ARROW;
|
||||||
Map<CursorShape, Vector<Variant>> cursors_cache;
|
Map<CursorShape, Vector<Variant>> cursors_cache;
|
||||||
|
|
||||||
bool layered_window;
|
bool layered_window = false;
|
||||||
|
|
||||||
String rendering_driver;
|
String rendering_driver;
|
||||||
//bool window_focused;
|
|
||||||
//void set_wm_border(bool p_enabled);
|
|
||||||
void set_wm_fullscreen(bool p_enabled);
|
void set_wm_fullscreen(bool p_enabled);
|
||||||
void set_wm_above(bool p_enabled);
|
void set_wm_above(bool p_enabled);
|
||||||
|
|
||||||
typedef xrr_monitor_info *(*xrr_get_monitors_t)(Display *dpy, Window window, Bool get_active, int *nmonitors);
|
typedef xrr_monitor_info *(*xrr_get_monitors_t)(Display *dpy, Window window, Bool get_active, int *nmonitors);
|
||||||
typedef void (*xrr_free_monitors_t)(xrr_monitor_info *monitors);
|
typedef void (*xrr_free_monitors_t)(xrr_monitor_info *monitors);
|
||||||
xrr_get_monitors_t xrr_get_monitors;
|
xrr_get_monitors_t xrr_get_monitors = nullptr;
|
||||||
xrr_free_monitors_t xrr_free_monitors;
|
xrr_free_monitors_t xrr_free_monitors = nullptr;
|
||||||
void *xrandr_handle = nullptr;
|
void *xrandr_handle = nullptr;
|
||||||
Bool xrandr_ext_ok;
|
Bool xrandr_ext_ok;
|
||||||
|
|
||||||
|
|
|
@ -93,8 +93,8 @@ class AppxPackager {
|
||||||
|
|
||||||
Vector<FileMeta> file_metadata;
|
Vector<FileMeta> file_metadata;
|
||||||
|
|
||||||
ZPOS64_T central_dir_offset;
|
ZPOS64_T central_dir_offset = 0;
|
||||||
ZPOS64_T end_of_central_dir_offset;
|
ZPOS64_T end_of_central_dir_offset = 0;
|
||||||
Vector<uint8_t> central_dir_data;
|
Vector<uint8_t> central_dir_data;
|
||||||
|
|
||||||
String hash_block(const uint8_t *p_block_data, size_t p_block_len);
|
String hash_block(const uint8_t *p_block_data, size_t p_block_len);
|
||||||
|
|
|
@ -49,7 +49,7 @@ public:
|
||||||
private:
|
private:
|
||||||
SpaceOverride gravity_space_override = SPACE_OVERRIDE_DISABLED;
|
SpaceOverride gravity_space_override = SPACE_OVERRIDE_DISABLED;
|
||||||
Vector2 gravity_vec;
|
Vector2 gravity_vec;
|
||||||
real_t gravity;
|
real_t gravity = 0.0;
|
||||||
bool gravity_is_point = false;
|
bool gravity_is_point = false;
|
||||||
real_t gravity_distance_scale = 0.0;
|
real_t gravity_distance_scale = 0.0;
|
||||||
|
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue