summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitattributes1
-rw-r--r--core/variant.cpp18
-rw-r--r--drivers/speex/Makefile.am55
-rw-r--r--drivers/speex/Makefile.in667
-rw-r--r--drivers/unix/dir_access_unix.cpp35
-rw-r--r--drivers/windows/dir_access_windows.cpp20
-rw-r--r--modules/gdscript/gd_compiler.cpp14
-rw-r--r--modules/gdscript/gd_function.cpp25
-rw-r--r--modules/gdscript/gd_function.h3
-rw-r--r--modules/gdscript/gd_parser.cpp35
-rw-r--r--modules/gdscript/gd_parser.h2
-rw-r--r--modules/gdscript/gd_script.h2
-rw-r--r--platform/android/java_glue.cpp8
-rw-r--r--platform/android/os_android.cpp29
-rw-r--r--platform/android/os_android.h2
-rw-r--r--platform/haiku/context_gl_haiku.cpp12
-rw-r--r--platform/haiku/context_gl_haiku.h5
-rw-r--r--platform/haiku/detect.py6
-rw-r--r--platform/windows/joystick.cpp2
-rw-r--r--platform/x11/detect.py4
-rw-r--r--scene/3d/skeleton.cpp16
-rw-r--r--scene/audio/stream_player.cpp10
-rw-r--r--scene/audio/stream_player.h2
-rw-r--r--scene/gui/base_button.cpp2
-rw-r--r--scene/gui/color_picker.cpp12
-rw-r--r--scene/gui/color_picker.h1
-rw-r--r--scene/gui/color_ramp_edit.cpp4
-rw-r--r--scene/gui/grid_container.cpp1
-rw-r--r--scene/gui/line_edit.cpp49
-rw-r--r--scene/gui/line_edit.h6
-rw-r--r--scene/gui/text_edit.cpp7
-rw-r--r--scene/gui/tree.cpp7
-rw-r--r--scene/main/viewport.cpp72
-rw-r--r--scene/resources/packed_scene.cpp4
-rw-r--r--scene/resources/sample_library.cpp10
-rw-r--r--tools/doc/doc_data.cpp6
-rw-r--r--tools/editor/editor_dir_dialog.cpp18
-rw-r--r--tools/editor/editor_file_system.cpp7
-rw-r--r--tools/editor/editor_file_system.h1
-rw-r--r--tools/editor/editor_node.cpp1
-rw-r--r--tools/editor/editor_resource_preview.cpp34
-rw-r--r--tools/editor/editor_resource_preview.h4
-rw-r--r--tools/editor/io_plugins/editor_scene_import_plugin.cpp79
-rw-r--r--tools/editor/plugins/animation_player_editor_plugin.cpp1
-rw-r--r--tools/editor/plugins/sample_editor_plugin.cpp5
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp22
-rw-r--r--tools/editor/plugins/script_editor_plugin.h2
-rw-r--r--tools/editor/plugins/shader_graph_editor_plugin.cpp4
-rw-r--r--tools/editor/plugins/sprite_frames_editor_plugin.cpp63
-rw-r--r--tools/editor/plugins/tile_map_editor_plugin.cpp2
-rw-r--r--tools/editor/project_manager.cpp3
-rw-r--r--tools/editor/property_editor.cpp1
-rw-r--r--tools/editor/scene_tree_dock.cpp16
-rw-r--r--tools/editor/scene_tree_dock.h2
-rw-r--r--tools/editor/scenes_dock.cpp28
-rw-r--r--tools/editor/scenes_dock.h2
56 files changed, 599 insertions, 850 deletions
diff --git a/.gitattributes b/.gitattributes
index 36620d50f5..1df99d85bf 100644
--- a/.gitattributes
+++ b/.gitattributes
@@ -1,5 +1,6 @@
# Properly detect languages on Github
*.h linguist-language=cpp
+*.inc linguist-language=cpp
drivers/* linguist-vendored
*.cpp eol=lf
diff --git a/core/variant.cpp b/core/variant.cpp
index 81d10f379a..31321dc0f3 100644
--- a/core/variant.cpp
+++ b/core/variant.cpp
@@ -1559,72 +1559,78 @@ Variant::operator String() const {
case VECTOR2_ARRAY: {
DVector<Vector2> vec = operator DVector<Vector2>();
- String str;
+ String str("[");
for(int i=0;i<vec.size();i++) {
if (i>0)
str+=", ";
str=str+Variant( vec[i] );
}
+ str += "]";
return str;
} break;
case VECTOR3_ARRAY: {
DVector<Vector3> vec = operator DVector<Vector3>();
- String str;
+ String str("[");
for(int i=0;i<vec.size();i++) {
if (i>0)
str+=", ";
str=str+Variant( vec[i] );
}
+ str += "]";
return str;
} break;
case STRING_ARRAY: {
DVector<String> vec = operator DVector<String>();
- String str;
+ String str("[");
for(int i=0;i<vec.size();i++) {
if (i>0)
str+=", ";
str=str+vec[i];
}
+ str += "]";
return str;
} break;
case INT_ARRAY: {
DVector<int> vec = operator DVector<int>();
- String str;
+ String str("[");
for(int i=0;i<vec.size();i++) {
if (i>0)
str+=", ";
str=str+itos(vec[i]);
}
+ str += "]";
return str;
} break;
case REAL_ARRAY: {
DVector<real_t> vec = operator DVector<real_t>();
- String str;
+ String str("[");
for(int i=0;i<vec.size();i++) {
if (i>0)
str+=", ";
str=str+rtos(vec[i]);
}
+ str += "]";
return str;
} break;
case ARRAY: {
Array arr = operator Array();
- String str;
+ String str("[");
for (int i=0; i<arr.size(); i++) {
if (i)
str+=", ";
str += String(arr[i]);
};
+ str += "]";
return str;
} break;
diff --git a/drivers/speex/Makefile.am b/drivers/speex/Makefile.am
deleted file mode 100644
index 3d4e03f9a6..0000000000
--- a/drivers/speex/Makefile.am
+++ /dev/null
@@ -1,55 +0,0 @@
-# Disable automatic dependency tracking if using other tools than gcc and gmake
-#AUTOMAKE_OPTIONS = no-dependencies
-
-
-EXTRA_DIST=echo_diagnostic.m
-
-INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_builddir) @OGG_CFLAGS@ @FFT_CFLAGS@
-
-lib_LTLIBRARIES = libspeex.la libspeexdsp.la
-
-# Sources for compilation in the library
-libspeex_la_SOURCES = cb_search.c exc_10_32_table.c exc_8_128_table.c \
- filters.c gain_table.c hexc_table.c high_lsp_tables.c lsp.c \
- ltp.c speex.c stereo.c vbr.c vq.c bits.c exc_10_16_table.c \
- exc_20_32_table.c exc_5_256_table.c exc_5_64_table.c gain_table_lbr.c hexc_10_32_table.c \
- lpc.c lsp_tables_nb.c modes.c modes_wb.c nb_celp.c quant_lsp.c sb_celp.c \
- speex_callbacks.c speex_header.c window.c
-
-if BUILD_KISS_FFT
- FFTSRC=kiss_fft.c _kiss_fft_guts.h kiss_fft.h kiss_fftr.c kiss_fftr.h
-else
-if BUILD_SMALLFT
- FFTSRC=smallft.c
-else
- FFTSRC=
-endif
-endif
-
-libspeexdsp_la_SOURCES = preprocess.c jitter.c mdf.c fftwrap.c filterbank.c resample.c buffer.c scal.c $(FFTSRC)
-
-noinst_HEADERS = arch.h cb_search_arm4.h cb_search_bfin.h cb_search_sse.h \
- filters.h filters_arm4.h filters_bfin.h filters_sse.h fixed_arm4.h \
- fixed_arm5e.h fixed_bfin.h fixed_debug.h lpc.h lpc_bfin.h ltp.h ltp_arm4.h \
- ltp_sse.h math_approx.h misc_bfin.h nb_celp.h quant_lsp.h sb_celp.h \
- stack_alloc.h vbr.h vq.h vq_arm4.h vq_bfin.h vq_sse.h cb_search.h fftwrap.h \
- filterbank.h fixed_generic.h lsp.h lsp_bfin.h ltp_bfin.h modes.h os_support.h \
- pseudofloat.h quant_lsp_bfin.h smallft.h vorbis_psy.h resample_sse.h
-
-
-libspeex_la_LDFLAGS = -no-undefined -version-info @SPEEX_LT_CURRENT@:@SPEEX_LT_REVISION@:@SPEEX_LT_AGE@
-libspeexdsp_la_LDFLAGS = -no-undefined -version-info @SPEEX_LT_CURRENT@:@SPEEX_LT_REVISION@:@SPEEX_LT_AGE@
-
-noinst_PROGRAMS = testenc testenc_wb testenc_uwb testdenoise testecho testjitter
-testenc_SOURCES = testenc.c
-testenc_LDADD = libspeex.la
-testenc_wb_SOURCES = testenc_wb.c
-testenc_wb_LDADD = libspeex.la
-testenc_uwb_SOURCES = testenc_uwb.c
-testenc_uwb_LDADD = libspeex.la
-testdenoise_SOURCES = testdenoise.c
-testdenoise_LDADD = libspeexdsp.la @FFT_LIBS@
-testecho_SOURCES = testecho.c
-testecho_LDADD = libspeexdsp.la @FFT_LIBS@
-testjitter_SOURCES = testjitter.c
-testjitter_LDADD = libspeexdsp.la @FFT_LIBS@
diff --git a/drivers/speex/Makefile.in b/drivers/speex/Makefile.in
deleted file mode 100644
index a1044a58d8..0000000000
--- a/drivers/speex/Makefile.in
+++ /dev/null
@@ -1,667 +0,0 @@
-# Makefile.in generated by automake 1.8.5 from Makefile.am.
-# @configure_input@
-
-# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-# 2003, 2004 Free Software Foundation, Inc.
-# This Makefile.in is free software; the Free Software Foundation
-# gives unlimited permission to copy and/or distribute it,
-# with or without modifications, as long as this notice is preserved.
-
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
-# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
-# PARTICULAR PURPOSE.
-
-@SET_MAKE@
-
-# Disable automatic dependency tracking if using other tools than gcc and gmake
-#AUTOMAKE_OPTIONS = no-dependencies
-
-
-
-SOURCES = $(libspeex_la_SOURCES) $(libspeexdsp_la_SOURCES) $(testdenoise_SOURCES) $(testecho_SOURCES) $(testenc_SOURCES) $(testenc_uwb_SOURCES) $(testenc_wb_SOURCES) $(testjitter_SOURCES)
-
-srcdir = @srcdir@
-top_srcdir = @top_srcdir@
-VPATH = @srcdir@
-pkgdatadir = $(datadir)/@PACKAGE@
-pkglibdir = $(libdir)/@PACKAGE@
-pkgincludedir = $(includedir)/@PACKAGE@
-top_builddir = ..
-am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
-INSTALL = @INSTALL@
-install_sh_DATA = $(install_sh) -c -m 644
-install_sh_PROGRAM = $(install_sh) -c
-install_sh_SCRIPT = $(install_sh) -c
-INSTALL_HEADER = $(INSTALL_DATA)
-transform = $(program_transform_name)
-NORMAL_INSTALL = :
-PRE_INSTALL = :
-POST_INSTALL = :
-NORMAL_UNINSTALL = :
-PRE_UNINSTALL = :
-POST_UNINSTALL = :
-host_triplet = @host@
-noinst_PROGRAMS = testenc$(EXEEXT) testenc_wb$(EXEEXT) \
- testenc_uwb$(EXEEXT) testdenoise$(EXEEXT) testecho$(EXEEXT) \
- testjitter$(EXEEXT)
-subdir = libspeex
-DIST_COMMON = $(noinst_HEADERS) $(srcdir)/Makefile.am \
- $(srcdir)/Makefile.in
-ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
-am__aclocal_m4_deps = $(top_srcdir)/acinclude.m4 \
- $(top_srcdir)/configure.ac
-am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
- $(ACLOCAL_M4)
-mkinstalldirs = $(mkdir_p)
-CONFIG_HEADER = $(top_builddir)/config.h
-CONFIG_CLEAN_FILES =
-am__installdirs = "$(DESTDIR)$(libdir)"
-libLTLIBRARIES_INSTALL = $(INSTALL)
-LTLIBRARIES = $(lib_LTLIBRARIES)
-libspeex_la_LIBADD =
-am_libspeex_la_OBJECTS = cb_search.lo exc_10_32_table.lo \
- exc_8_128_table.lo filters.lo gain_table.lo hexc_table.lo \
- high_lsp_tables.lo lsp.lo ltp.lo speex.lo stereo.lo vbr.lo \
- vq.lo bits.lo exc_10_16_table.lo exc_20_32_table.lo \
- exc_5_256_table.lo exc_5_64_table.lo gain_table_lbr.lo \
- hexc_10_32_table.lo lpc.lo lsp_tables_nb.lo modes.lo \
- modes_wb.lo nb_celp.lo quant_lsp.lo sb_celp.lo \
- speex_callbacks.lo speex_header.lo window.lo
-libspeex_la_OBJECTS = $(am_libspeex_la_OBJECTS)
-libspeexdsp_la_LIBADD =
-am__libspeexdsp_la_SOURCES_DIST = preprocess.c jitter.c mdf.c \
- fftwrap.c filterbank.c resample.c buffer.c scal.c smallft.c \
- kiss_fft.c _kiss_fft_guts.h kiss_fft.h kiss_fftr.c kiss_fftr.h
-@BUILD_KISS_FFT_FALSE@@BUILD_SMALLFT_TRUE@am__objects_1 = smallft.lo
-@BUILD_KISS_FFT_TRUE@am__objects_1 = kiss_fft.lo kiss_fftr.lo
-am_libspeexdsp_la_OBJECTS = preprocess.lo jitter.lo mdf.lo fftwrap.lo \
- filterbank.lo resample.lo buffer.lo scal.lo $(am__objects_1)
-libspeexdsp_la_OBJECTS = $(am_libspeexdsp_la_OBJECTS)
-PROGRAMS = $(noinst_PROGRAMS)
-am_testdenoise_OBJECTS = testdenoise.$(OBJEXT)
-testdenoise_OBJECTS = $(am_testdenoise_OBJECTS)
-testdenoise_DEPENDENCIES = libspeexdsp.la
-am_testecho_OBJECTS = testecho.$(OBJEXT)
-testecho_OBJECTS = $(am_testecho_OBJECTS)
-testecho_DEPENDENCIES = libspeexdsp.la
-am_testenc_OBJECTS = testenc.$(OBJEXT)
-testenc_OBJECTS = $(am_testenc_OBJECTS)
-testenc_DEPENDENCIES = libspeex.la
-am_testenc_uwb_OBJECTS = testenc_uwb.$(OBJEXT)
-testenc_uwb_OBJECTS = $(am_testenc_uwb_OBJECTS)
-testenc_uwb_DEPENDENCIES = libspeex.la
-am_testenc_wb_OBJECTS = testenc_wb.$(OBJEXT)
-testenc_wb_OBJECTS = $(am_testenc_wb_OBJECTS)
-testenc_wb_DEPENDENCIES = libspeex.la
-am_testjitter_OBJECTS = testjitter.$(OBJEXT)
-testjitter_OBJECTS = $(am_testjitter_OBJECTS)
-testjitter_DEPENDENCIES = libspeexdsp.la
-DEFAULT_INCLUDES = -I. -I$(srcdir) -I$(top_builddir)
-depcomp = $(SHELL) $(top_srcdir)/depcomp
-am__depfiles_maybe = depfiles
-@AMDEP_TRUE@DEP_FILES = ./$(DEPDIR)/bits.Plo ./$(DEPDIR)/buffer.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/cb_search.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/exc_10_16_table.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/exc_10_32_table.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/exc_20_32_table.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/exc_5_256_table.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/exc_5_64_table.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/exc_8_128_table.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/fftwrap.Plo ./$(DEPDIR)/filterbank.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/filters.Plo ./$(DEPDIR)/gain_table.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/gain_table_lbr.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/hexc_10_32_table.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/hexc_table.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/high_lsp_tables.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/jitter.Plo ./$(DEPDIR)/kiss_fft.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/kiss_fftr.Plo ./$(DEPDIR)/lpc.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/lsp.Plo ./$(DEPDIR)/lsp_tables_nb.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/ltp.Plo ./$(DEPDIR)/mdf.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/modes.Plo ./$(DEPDIR)/modes_wb.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/nb_celp.Plo ./$(DEPDIR)/preprocess.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/quant_lsp.Plo ./$(DEPDIR)/resample.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/sb_celp.Plo ./$(DEPDIR)/scal.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/smallft.Plo ./$(DEPDIR)/speex.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/speex_callbacks.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/speex_header.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/stereo.Plo ./$(DEPDIR)/testdenoise.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/testecho.Po ./$(DEPDIR)/testenc.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/testenc_uwb.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/testenc_wb.Po \
-@AMDEP_TRUE@ ./$(DEPDIR)/testjitter.Po ./$(DEPDIR)/vbr.Plo \
-@AMDEP_TRUE@ ./$(DEPDIR)/vq.Plo ./$(DEPDIR)/window.Plo
-COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \
- $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)
-LTCOMPILE = $(LIBTOOL) --mode=compile $(CC) $(DEFS) \
- $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \
- $(AM_CFLAGS) $(CFLAGS)
-CCLD = $(CC)
-LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
- $(AM_LDFLAGS) $(LDFLAGS) -o $@
-SOURCES = $(libspeex_la_SOURCES) $(libspeexdsp_la_SOURCES) \
- $(testdenoise_SOURCES) $(testecho_SOURCES) $(testenc_SOURCES) \
- $(testenc_uwb_SOURCES) $(testenc_wb_SOURCES) \
- $(testjitter_SOURCES)
-DIST_SOURCES = $(libspeex_la_SOURCES) \
- $(am__libspeexdsp_la_SOURCES_DIST) $(testdenoise_SOURCES) \
- $(testecho_SOURCES) $(testenc_SOURCES) $(testenc_uwb_SOURCES) \
- $(testenc_wb_SOURCES) $(testjitter_SOURCES)
-HEADERS = $(noinst_HEADERS)
-ETAGS = etags
-CTAGS = ctags
-DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
-ACLOCAL = @ACLOCAL@
-AMDEP_FALSE = @AMDEP_FALSE@
-AMDEP_TRUE = @AMDEP_TRUE@
-AMTAR = @AMTAR@
-AR = @AR@
-AS = @AS@
-AUTOCONF = @AUTOCONF@
-AUTOHEADER = @AUTOHEADER@
-AUTOMAKE = @AUTOMAKE@
-AWK = @AWK@
-BUILD_KISS_FFT_FALSE = @BUILD_KISS_FFT_FALSE@
-BUILD_KISS_FFT_TRUE = @BUILD_KISS_FFT_TRUE@
-BUILD_SMALLFT_FALSE = @BUILD_SMALLFT_FALSE@
-BUILD_SMALLFT_TRUE = @BUILD_SMALLFT_TRUE@
-CC = @CC@
-CCDEPMODE = @CCDEPMODE@
-CFLAGS = @CFLAGS@
-CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
-CXX = @CXX@
-CXXCPP = @CXXCPP@
-CXXDEPMODE = @CXXDEPMODE@
-CXXFLAGS = @CXXFLAGS@
-CYGPATH_W = @CYGPATH_W@
-DEFS = @DEFS@
-DEPDIR = @DEPDIR@
-DLLTOOL = @DLLTOOL@
-DSYMUTIL = @DSYMUTIL@
-ECHO = @ECHO@
-ECHO_C = @ECHO_C@
-ECHO_N = @ECHO_N@
-ECHO_T = @ECHO_T@
-EGREP = @EGREP@
-EXEEXT = @EXEEXT@
-F77 = @F77@
-FFLAGS = @FFLAGS@
-FFT_CFLAGS = @FFT_CFLAGS@
-FFT_LIBS = @FFT_LIBS@
-FFT_PKGCONFIG = @FFT_PKGCONFIG@
-GREP = @GREP@
-INSTALL_DATA = @INSTALL_DATA@
-INSTALL_PROGRAM = @INSTALL_PROGRAM@
-INSTALL_SCRIPT = @INSTALL_SCRIPT@
-INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
-LDFLAGS = @LDFLAGS@
-LIBOBJS = @LIBOBJS@
-LIBS = @LIBS@
-LIBTOOL = @LIBTOOL@
-LN_S = @LN_S@
-LTLIBOBJS = @LTLIBOBJS@
-MAINT = @MAINT@
-MAINTAINER_MODE_FALSE = @MAINTAINER_MODE_FALSE@
-MAINTAINER_MODE_TRUE = @MAINTAINER_MODE_TRUE@
-MAKEINFO = @MAKEINFO@
-NMEDIT = @NMEDIT@
-OBJDUMP = @OBJDUMP@
-OBJEXT = @OBJEXT@
-OGG_CFLAGS = @OGG_CFLAGS@
-OGG_LIBS = @OGG_LIBS@
-PACKAGE = @PACKAGE@
-PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
-PACKAGE_NAME = @PACKAGE_NAME@
-PACKAGE_STRING = @PACKAGE_STRING@
-PACKAGE_TARNAME = @PACKAGE_TARNAME@
-PACKAGE_VERSION = @PACKAGE_VERSION@
-PATH_SEPARATOR = @PATH_SEPARATOR@
-PKG_CONFIG = @PKG_CONFIG@
-RANLIB = @RANLIB@
-SED = @SED@
-SET_MAKE = @SET_MAKE@
-SHELL = @SHELL@
-SIZE16 = @SIZE16@
-SIZE32 = @SIZE32@
-SPEEX_LT_AGE = @SPEEX_LT_AGE@
-SPEEX_LT_CURRENT = @SPEEX_LT_CURRENT@
-SPEEX_LT_REVISION = @SPEEX_LT_REVISION@
-SPEEX_VERSION = @SPEEX_VERSION@
-STRIP = @STRIP@
-VERSION = @VERSION@
-ac_ct_CC = @ac_ct_CC@
-ac_ct_CXX = @ac_ct_CXX@
-ac_ct_F77 = @ac_ct_F77@
-am__fastdepCC_FALSE = @am__fastdepCC_FALSE@
-am__fastdepCC_TRUE = @am__fastdepCC_TRUE@
-am__fastdepCXX_FALSE = @am__fastdepCXX_FALSE@
-am__fastdepCXX_TRUE = @am__fastdepCXX_TRUE@
-am__include = @am__include@
-am__leading_dot = @am__leading_dot@
-am__quote = @am__quote@
-bindir = @bindir@
-build = @build@
-build_alias = @build_alias@
-build_cpu = @build_cpu@
-build_os = @build_os@
-build_vendor = @build_vendor@
-datadir = @datadir@
-datarootdir = @datarootdir@
-docdir = @docdir@
-dvidir = @dvidir@
-exec_prefix = @exec_prefix@
-host = @host@
-host_alias = @host_alias@
-host_cpu = @host_cpu@
-host_os = @host_os@
-host_vendor = @host_vendor@
-htmldir = @htmldir@
-includedir = @includedir@
-infodir = @infodir@
-install_sh = @install_sh@
-libdir = @libdir@
-libexecdir = @libexecdir@
-localedir = @localedir@
-localstatedir = @localstatedir@
-mandir = @mandir@
-mkdir_p = @mkdir_p@
-oldincludedir = @oldincludedir@
-pdfdir = @pdfdir@
-prefix = @prefix@
-program_transform_name = @program_transform_name@
-psdir = @psdir@
-sbindir = @sbindir@
-sharedstatedir = @sharedstatedir@
-src = @src@
-sysconfdir = @sysconfdir@
-target_alias = @target_alias@
-EXTRA_DIST = echo_diagnostic.m
-INCLUDES = -I$(top_srcdir)/include -I$(top_builddir)/include -I$(top_builddir) @OGG_CFLAGS@ @FFT_CFLAGS@
-lib_LTLIBRARIES = libspeex.la libspeexdsp.la
-
-# Sources for compilation in the library
-libspeex_la_SOURCES = cb_search.c exc_10_32_table.c exc_8_128_table.c \
- filters.c gain_table.c hexc_table.c high_lsp_tables.c lsp.c \
- ltp.c speex.c stereo.c vbr.c vq.c bits.c exc_10_16_table.c \
- exc_20_32_table.c exc_5_256_table.c exc_5_64_table.c gain_table_lbr.c hexc_10_32_table.c \
- lpc.c lsp_tables_nb.c modes.c modes_wb.c nb_celp.c quant_lsp.c sb_celp.c \
- speex_callbacks.c speex_header.c window.c
-
-@BUILD_KISS_FFT_FALSE@@BUILD_SMALLFT_FALSE@FFTSRC =
-@BUILD_KISS_FFT_FALSE@@BUILD_SMALLFT_TRUE@FFTSRC = smallft.c
-@BUILD_KISS_FFT_TRUE@FFTSRC = kiss_fft.c _kiss_fft_guts.h kiss_fft.h kiss_fftr.c kiss_fftr.h
-libspeexdsp_la_SOURCES = preprocess.c jitter.c mdf.c fftwrap.c filterbank.c resample.c buffer.c scal.c $(FFTSRC)
-noinst_HEADERS = arch.h cb_search_arm4.h cb_search_bfin.h cb_search_sse.h \
- filters.h filters_arm4.h filters_bfin.h filters_sse.h fixed_arm4.h \
- fixed_arm5e.h fixed_bfin.h fixed_debug.h lpc.h lpc_bfin.h ltp.h ltp_arm4.h \
- ltp_sse.h math_approx.h misc_bfin.h nb_celp.h quant_lsp.h sb_celp.h \
- stack_alloc.h vbr.h vq.h vq_arm4.h vq_bfin.h vq_sse.h cb_search.h fftwrap.h \
- filterbank.h fixed_generic.h lsp.h lsp_bfin.h ltp_bfin.h modes.h os_support.h \
- pseudofloat.h quant_lsp_bfin.h smallft.h vorbis_psy.h resample_sse.h
-
-libspeex_la_LDFLAGS = -no-undefined -version-info @SPEEX_LT_CURRENT@:@SPEEX_LT_REVISION@:@SPEEX_LT_AGE@
-libspeexdsp_la_LDFLAGS = -no-undefined -version-info @SPEEX_LT_CURRENT@:@SPEEX_LT_REVISION@:@SPEEX_LT_AGE@
-testenc_SOURCES = testenc.c
-testenc_LDADD = libspeex.la
-testenc_wb_SOURCES = testenc_wb.c
-testenc_wb_LDADD = libspeex.la
-testenc_uwb_SOURCES = testenc_uwb.c
-testenc_uwb_LDADD = libspeex.la
-testdenoise_SOURCES = testdenoise.c
-testdenoise_LDADD = libspeexdsp.la @FFT_LIBS@
-testecho_SOURCES = testecho.c
-testecho_LDADD = libspeexdsp.la @FFT_LIBS@
-testjitter_SOURCES = testjitter.c
-testjitter_LDADD = libspeexdsp.la @FFT_LIBS@
-all: all-am
-
-.SUFFIXES:
-.SUFFIXES: .c .lo .o .obj
-$(srcdir)/Makefile.in: @MAINTAINER_MODE_TRUE@ $(srcdir)/Makefile.am $(am__configure_deps)
- @for dep in $?; do \
- case '$(am__configure_deps)' in \
- *$$dep*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh \
- && exit 0; \
- exit 1;; \
- esac; \
- done; \
- echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libspeex/Makefile'; \
- cd $(top_srcdir) && \
- $(AUTOMAKE) --gnu libspeex/Makefile
-.PRECIOUS: Makefile
-Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
- @case '$?' in \
- *config.status*) \
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
- *) \
- echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
- cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
- esac;
-
-$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-
-$(top_srcdir)/configure: @MAINTAINER_MODE_TRUE@ $(am__configure_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-$(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
- cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
-install-libLTLIBRARIES: $(lib_LTLIBRARIES)
- @$(NORMAL_INSTALL)
- test -z "$(libdir)" || $(mkdir_p) "$(DESTDIR)$(libdir)"
- @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- if test -f $$p; then \
- f="`echo $$p | sed -e 's|^.*/||'`"; \
- echo " $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(libdir)/$$f'"; \
- $(LIBTOOL) --mode=install $(libLTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(libdir)/$$f"; \
- else :; fi; \
- done
-
-uninstall-libLTLIBRARIES:
- @$(NORMAL_UNINSTALL)
- @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- p="`echo $$p | sed -e 's|^.*/||'`"; \
- echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$p'"; \
- $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$p"; \
- done
-
-clean-libLTLIBRARIES:
- -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES)
- @list='$(lib_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
-libspeex.la: $(libspeex_la_OBJECTS) $(libspeex_la_DEPENDENCIES)
- $(LINK) -rpath $(libdir) $(libspeex_la_LDFLAGS) $(libspeex_la_OBJECTS) $(libspeex_la_LIBADD) $(LIBS)
-libspeexdsp.la: $(libspeexdsp_la_OBJECTS) $(libspeexdsp_la_DEPENDENCIES)
- $(LINK) -rpath $(libdir) $(libspeexdsp_la_LDFLAGS) $(libspeexdsp_la_OBJECTS) $(libspeexdsp_la_LIBADD) $(LIBS)
-
-clean-noinstPROGRAMS:
- @list='$(noinst_PROGRAMS)'; for p in $$list; do \
- f=`echo $$p|sed 's/$(EXEEXT)$$//'`; \
- echo " rm -f $$p $$f"; \
- rm -f $$p $$f ; \
- done
-testdenoise$(EXEEXT): $(testdenoise_OBJECTS) $(testdenoise_DEPENDENCIES)
- @rm -f testdenoise$(EXEEXT)
- $(LINK) $(testdenoise_LDFLAGS) $(testdenoise_OBJECTS) $(testdenoise_LDADD) $(LIBS)
-testecho$(EXEEXT): $(testecho_OBJECTS) $(testecho_DEPENDENCIES)
- @rm -f testecho$(EXEEXT)
- $(LINK) $(testecho_LDFLAGS) $(testecho_OBJECTS) $(testecho_LDADD) $(LIBS)
-testenc$(EXEEXT): $(testenc_OBJECTS) $(testenc_DEPENDENCIES)
- @rm -f testenc$(EXEEXT)
- $(LINK) $(testenc_LDFLAGS) $(testenc_OBJECTS) $(testenc_LDADD) $(LIBS)
-testenc_uwb$(EXEEXT): $(testenc_uwb_OBJECTS) $(testenc_uwb_DEPENDENCIES)
- @rm -f testenc_uwb$(EXEEXT)
- $(LINK) $(testenc_uwb_LDFLAGS) $(testenc_uwb_OBJECTS) $(testenc_uwb_LDADD) $(LIBS)
-testenc_wb$(EXEEXT): $(testenc_wb_OBJECTS) $(testenc_wb_DEPENDENCIES)
- @rm -f testenc_wb$(EXEEXT)
- $(LINK) $(testenc_wb_LDFLAGS) $(testenc_wb_OBJECTS) $(testenc_wb_LDADD) $(LIBS)
-testjitter$(EXEEXT): $(testjitter_OBJECTS) $(testjitter_DEPENDENCIES)
- @rm -f testjitter$(EXEEXT)
- $(LINK) $(testjitter_LDFLAGS) $(testjitter_OBJECTS) $(testjitter_LDADD) $(LIBS)
-
-mostlyclean-compile:
- -rm -f *.$(OBJEXT)
-
-distclean-compile:
- -rm -f *.tab.c
-
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bits.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/buffer.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/cb_search.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exc_10_16_table.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exc_10_32_table.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exc_20_32_table.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exc_5_256_table.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exc_5_64_table.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/exc_8_128_table.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/fftwrap.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filterbank.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/filters.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gain_table.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/gain_table_lbr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hexc_10_32_table.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/hexc_table.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/high_lsp_tables.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/jitter.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kiss_fft.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/kiss_fftr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lpc.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/lsp_tables_nb.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ltp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/mdf.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modes.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/modes_wb.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/nb_celp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/preprocess.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/quant_lsp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/resample.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/sb_celp.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/scal.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/smallft.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/speex.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/speex_callbacks.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/speex_header.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/stereo.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testdenoise.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testecho.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testenc.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testenc_uwb.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testenc_wb.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/testjitter.Po@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vbr.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/vq.Plo@am__quote@
-@AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/window.Plo@am__quote@
-
-.c.o:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c $<
-
-.c.obj:
-@am__fastdepCC_TRUE@ if $(COMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ `$(CYGPATH_W) '$<'`; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=no @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Po' tmpdepfile='$(DEPDIR)/$*.TPo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(COMPILE) -c `$(CYGPATH_W) '$<'`
-
-.c.lo:
-@am__fastdepCC_TRUE@ if $(LTCOMPILE) -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -c -o $@ $<; \
-@am__fastdepCC_TRUE@ then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Plo"; else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ depfile='$(DEPDIR)/$*.Plo' tmpdepfile='$(DEPDIR)/$*.TPlo' @AMDEPBACKSLASH@
-@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@
-@am__fastdepCC_FALSE@ $(LTCOMPILE) -c -o $@ $<
-
-mostlyclean-libtool:
- -rm -f *.lo
-
-clean-libtool:
- -rm -rf .libs _libs
-
-distclean-libtool:
- -rm -f libtool
-uninstall-info-am:
-
-ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- mkid -fID $$unique
-tags: TAGS
-
-TAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- if test -z "$(ETAGS_ARGS)$$tags$$unique"; then :; else \
- test -n "$$unique" || unique=$$empty_fix; \
- $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \
- $$tags $$unique; \
- fi
-ctags: CTAGS
-CTAGS: $(HEADERS) $(SOURCES) $(TAGS_DEPENDENCIES) \
- $(TAGS_FILES) $(LISP)
- tags=; \
- here=`pwd`; \
- list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
- unique=`for i in $$list; do \
- if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \
- done | \
- $(AWK) ' { files[$$0] = 1; } \
- END { for (i in files) print i; }'`; \
- test -z "$(CTAGS_ARGS)$$tags$$unique" \
- || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \
- $$tags $$unique
-
-GTAGS:
- here=`$(am__cd) $(top_builddir) && pwd` \
- && cd $(top_srcdir) \
- && gtags -i $(GTAGS_ARGS) $$here
-
-distclean-tags:
- -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
-
-distdir: $(DISTFILES)
- @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
- topsrcdirstrip=`echo "$(top_srcdir)" | sed 's|.|.|g'`; \
- list='$(DISTFILES)'; for file in $$list; do \
- case $$file in \
- $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
- $(top_srcdir)/*) file=`echo "$$file" | sed "s|^$$topsrcdirstrip/|$(top_builddir)/|"`;; \
- esac; \
- if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
- dir=`echo "$$file" | sed -e 's,/[^/]*$$,,'`; \
- if test "$$dir" != "$$file" && test "$$dir" != "."; then \
- dir="/$$dir"; \
- $(mkdir_p) "$(distdir)$$dir"; \
- else \
- dir=''; \
- fi; \
- if test -d $$d/$$file; then \
- if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
- cp -pR $(srcdir)/$$file $(distdir)$$dir || exit 1; \
- fi; \
- cp -pR $$d/$$file $(distdir)$$dir || exit 1; \
- else \
- test -f $(distdir)/$$file \
- || cp -p $$d/$$file $(distdir)/$$file \
- || exit 1; \
- fi; \
- done
-check-am: all-am
-check: check-am
-all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(HEADERS)
-installdirs:
- for dir in "$(DESTDIR)$(libdir)"; do \
- test -z "$$dir" || $(mkdir_p) "$$dir"; \
- done
-install: install-am
-install-exec: install-exec-am
-install-data: install-data-am
-uninstall: uninstall-am
-
-install-am: all-am
- @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
-
-installcheck: installcheck-am
-install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
-mostlyclean-generic:
-
-clean-generic:
-
-distclean-generic:
- -rm -f $(CONFIG_CLEAN_FILES)
-
-maintainer-clean-generic:
- @echo "This command is intended for maintainers to use"
- @echo "it deletes files that may require special tools to rebuild."
-clean: clean-am
-
-clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \
- clean-noinstPROGRAMS mostlyclean-am
-
-distclean: distclean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-distclean-am: clean-am distclean-compile distclean-generic \
- distclean-libtool distclean-tags
-
-dvi: dvi-am
-
-dvi-am:
-
-html: html-am
-
-info: info-am
-
-info-am:
-
-install-data-am:
-
-install-exec-am: install-libLTLIBRARIES
-
-install-info: install-info-am
-
-install-man:
-
-installcheck-am:
-
-maintainer-clean: maintainer-clean-am
- -rm -rf ./$(DEPDIR)
- -rm -f Makefile
-maintainer-clean-am: distclean-am maintainer-clean-generic
-
-mostlyclean: mostlyclean-am
-
-mostlyclean-am: mostlyclean-compile mostlyclean-generic \
- mostlyclean-libtool
-
-pdf: pdf-am
-
-pdf-am:
-
-ps: ps-am
-
-ps-am:
-
-uninstall-am: uninstall-info-am uninstall-libLTLIBRARIES
-
-.PHONY: CTAGS GTAGS all all-am check check-am clean clean-generic \
- clean-libLTLIBRARIES clean-libtool clean-noinstPROGRAMS ctags \
- distclean distclean-compile distclean-generic \
- distclean-libtool distclean-tags distdir dvi dvi-am html \
- html-am info info-am install install-am install-data \
- install-data-am install-exec install-exec-am install-info \
- install-info-am install-libLTLIBRARIES install-man \
- install-strip installcheck installcheck-am installdirs \
- maintainer-clean maintainer-clean-generic mostlyclean \
- mostlyclean-compile mostlyclean-generic mostlyclean-libtool \
- pdf pdf-am ps ps-am tags uninstall uninstall-am \
- uninstall-info-am uninstall-libLTLIBRARIES
-
-# Tell versions [3.59,3.63) of GNU make to not export all variables.
-# Otherwise a system limit (for SysV at least) may be exceeded.
-.NOEXPORT:
diff --git a/drivers/unix/dir_access_unix.cpp b/drivers/unix/dir_access_unix.cpp
index f0e4511b1d..b3bea8ac27 100644
--- a/drivers/unix/dir_access_unix.cpp
+++ b/drivers/unix/dir_access_unix.cpp
@@ -67,8 +67,8 @@ bool DirAccessUnix::file_exists(String p_file) {
if (p_file.is_rel_path())
p_file=current_dir.plus_file(p_file);
- else
- p_file=fix_path(p_file);
+
+ p_file=fix_path(p_file);
struct stat flags;
bool success = (stat(p_file.utf8().get_data(),&flags)==0);
@@ -88,8 +88,8 @@ bool DirAccessUnix::dir_exists(String p_dir) {
if (p_dir.is_rel_path())
p_dir=get_current_dir().plus_file(p_dir);
- else
- p_dir=fix_path(p_dir);
+
+ p_dir=fix_path(p_dir);
struct stat flags;
bool success = (stat(p_dir.utf8().get_data(),&flags)==0);
@@ -105,8 +105,8 @@ uint64_t DirAccessUnix::get_modified_time(String p_file) {
if (p_file.is_rel_path())
p_file=current_dir.plus_file(p_file);
- else
- p_file=fix_path(p_file);
+
+ p_file=fix_path(p_file);
struct stat flags;
bool success = (stat(p_file.utf8().get_data(),&flags)==0);
@@ -201,8 +201,11 @@ Error DirAccessUnix::make_dir(String p_dir) {
if (p_dir.is_rel_path())
p_dir=get_current_dir().plus_file(p_dir);
- else
- p_dir=fix_path(p_dir);
+
+
+ p_dir=fix_path(p_dir);
+
+
#if 1
@@ -245,7 +248,7 @@ Error DirAccessUnix::change_dir(String p_dir) {
chdir(current_dir.utf8().get_data()); //ascii since this may be unicode or wathever the host os wants
bool worked=(chdir(p_dir.utf8().get_data())==0); // we can only give this utf8
-#ifndef IPHONE_ENABLED
+
String base = _get_root_path();
if (base!="") {
@@ -255,7 +258,7 @@ Error DirAccessUnix::change_dir(String p_dir) {
if (!new_dir.begins_with(base))
worked=false;
}
-#endif
+
if (worked) {
getcwd(real_current_dir_name,2048);
@@ -287,13 +290,13 @@ Error DirAccessUnix::rename(String p_path,String p_new_path) {
if (p_path.is_rel_path())
p_path=get_current_dir().plus_file(p_path);
- else
- p_path=fix_path(p_path);
+
+ p_path=fix_path(p_path);
if (p_new_path.is_rel_path())
p_new_path=get_current_dir().plus_file(p_new_path);
- else
- p_new_path=fix_path(p_new_path);
+
+ p_new_path=fix_path(p_new_path);
return ::rename(p_path.utf8().get_data(),p_new_path.utf8().get_data())==0?OK:FAILED;
}
@@ -301,8 +304,8 @@ Error DirAccessUnix::remove(String p_path) {
if (p_path.is_rel_path())
p_path=get_current_dir().plus_file(p_path);
- else
- p_path=fix_path(p_path);
+
+ p_path=fix_path(p_path);
struct stat flags;
if ((stat(p_path.utf8().get_data(),&flags)!=0))
diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp
index fa18f7c1f5..90e43d2518 100644
--- a/drivers/windows/dir_access_windows.cpp
+++ b/drivers/windows/dir_access_windows.cpp
@@ -193,8 +193,8 @@ Error DirAccessWindows::make_dir(String p_dir) {
if (p_dir.is_rel_path())
p_dir=get_current_dir().plus_file(p_dir);
- else
- p_dir=fix_path(p_dir);
+
+ p_dir=fix_path(p_dir);
p_dir = p_dir.replace("/","\\");
bool success;
@@ -268,8 +268,8 @@ bool DirAccessWindows::dir_exists(String p_dir) {
if (p_dir.is_rel_path())
p_dir=get_current_dir().plus_file(p_dir);
- else
- p_dir=fix_path(p_dir);
+
+ p_dir=fix_path(p_dir);
//p_dir.replace("/","\\");
@@ -289,13 +289,13 @@ Error DirAccessWindows::rename(String p_path,String p_new_path) {
if (p_path.is_rel_path())
p_path=get_current_dir().plus_file(p_path);
- else
- p_path=fix_path(p_path);
+
+ p_path=fix_path(p_path);
if (p_new_path.is_rel_path())
p_new_path=get_current_dir().plus_file(p_new_path);
- else
- p_new_path=fix_path(p_new_path);
+
+ p_new_path=fix_path(p_new_path);
if (file_exists(p_new_path)) {
if (remove(p_new_path) != OK) {
@@ -310,8 +310,8 @@ Error DirAccessWindows::remove(String p_path) {
if (p_path.is_rel_path())
p_path=get_current_dir().plus_file(p_path);
- else
- p_path=fix_path(p_path);
+
+ p_path=fix_path(p_path);
printf("erasing %s\n",p_path.utf8().get_data());
diff --git a/modules/gdscript/gd_compiler.cpp b/modules/gdscript/gd_compiler.cpp
index d9bbe42979..1f76f025d4 100644
--- a/modules/gdscript/gd_compiler.cpp
+++ b/modules/gdscript/gd_compiler.cpp
@@ -550,17 +550,25 @@ int GDCompiler::_parse_expression(CodeGen& codegen,const GDParser::Node *p_expre
int index;
if (named) {
-#ifdef DEBUG_ENABLED
if (on->arguments[0]->type==GDParser::Node::TYPE_SELF && codegen.script && codegen.function_node && !codegen.function_node->_static) {
- const Map<StringName,GDScript::MemberInfo>::Element *MI = codegen.script->member_indices.find(static_cast<GDParser::IdentifierNode*>(on->arguments[1])->name);
+ GDParser::IdentifierNode* identifier = static_cast<GDParser::IdentifierNode*>(on->arguments[1]);
+ const Map<StringName,GDScript::MemberInfo>::Element *MI = codegen.script->member_indices.find(identifier->name);
+
+#ifdef DEBUG_ENABLED
if (MI && MI->get().getter==codegen.function_node->name) {
String n = static_cast<GDParser::IdentifierNode*>(on->arguments[1])->name;
_set_error("Must use '"+n+"' instead of 'self."+n+"' in getter.",on);
return -1;
}
- }
#endif
+
+ if (MI && MI->get().getter=="") {
+ // Faster than indexing self (as if no self. had been used)
+ return (MI->get().index)|(GDFunction::ADDR_TYPE_MEMBER<<GDFunction::ADDR_BITS);
+ }
+ }
+
index=codegen.get_name_map_pos(static_cast<GDParser::IdentifierNode*>(on->arguments[1])->name);
} else {
diff --git a/modules/gdscript/gd_function.cpp b/modules/gdscript/gd_function.cpp
index 6e52686de4..de86eb2ab9 100644
--- a/modules/gdscript/gd_function.cpp
+++ b/modules/gdscript/gd_function.cpp
@@ -846,6 +846,8 @@ Variant GDFunction::call(GDInstance *p_instance, const Variant **p_args, int p_a
gdfs->state._class=_class;
gdfs->state.ip=ip+ipofs;
gdfs->state.line=line;
+ gdfs->state.instance_id=(p_instance && p_instance->get_owner())?p_instance->get_owner()->get_instance_ID():0;
+ gdfs->state.script_id=_class->get_instance_ID();
//gdfs->state.result_pos=ip+ipofs-1;
gdfs->state.defarg=defarg;
gdfs->state.instance=p_instance;
@@ -1352,6 +1354,18 @@ GDFunction::~GDFunction() {
Variant GDFunctionState::_signal_callback(const Variant** p_args, int p_argcount, Variant::CallError& r_error) {
+#ifdef DEBUG_ENABLED
+ if (state.instance_id && !ObjectDB::get_instance(state.instance_id)) {
+ ERR_EXPLAIN("Resumed after yield, but class instance is gone");
+ ERR_FAIL_V(Variant());
+ }
+
+ if (state.script_id && !ObjectDB::get_instance(state.script_id)) {
+ ERR_EXPLAIN("Resumed after yield, but script is gone");
+ ERR_FAIL_V(Variant());
+ }
+#endif
+
Variant arg;
r_error.error=Variant::CallError::CALL_OK;
@@ -1398,6 +1412,17 @@ bool GDFunctionState::is_valid() const {
Variant GDFunctionState::resume(const Variant& p_arg) {
ERR_FAIL_COND_V(!function,Variant());
+#ifdef DEBUG_ENABLED
+ if (state.instance_id && !ObjectDB::get_instance(state.instance_id)) {
+ ERR_EXPLAIN("Resumed after yield, but class instance is gone");
+ ERR_FAIL_V(Variant());
+ }
+
+ if (state.script_id && !ObjectDB::get_instance(state.script_id)) {
+ ERR_EXPLAIN("Resumed after yield, but script is gone");
+ ERR_FAIL_V(Variant());
+ }
+#endif
state.result=p_arg;
Variant::CallError err;
diff --git a/modules/gdscript/gd_function.h b/modules/gdscript/gd_function.h
index 942db170c8..e09c6509dd 100644
--- a/modules/gdscript/gd_function.h
+++ b/modules/gdscript/gd_function.h
@@ -136,6 +136,9 @@ public:
struct CallState {
+ ObjectID instance_id; //by debug only
+ ObjectID script_id;
+
GDInstance *instance;
Vector<uint8_t> stack;
int stack_size;
diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp
index e83bd3d21e..c33bf00c7b 100644
--- a/modules/gdscript/gd_parser.cpp
+++ b/modules/gdscript/gd_parser.cpp
@@ -31,6 +31,7 @@
#include "io/resource_loader.h"
#include "os/file_access.h"
#include "script_language.h"
+#include "gd_script.h"
template<class T>
T* GDParser::alloc_node() {
@@ -216,7 +217,7 @@ bool GDParser::_get_completable_identifier(CompletionType p_type,StringName& ide
}
-GDParser::Node* GDParser::_parse_expression(Node *p_parent,bool p_static,bool p_allow_assign) {
+GDParser::Node* GDParser::_parse_expression(Node *p_parent,bool p_static,bool p_allow_assign,bool p_parsing_constant) {
// Vector<Node*> expressions;
// Vector<OperatorNode::Operator> operators;
@@ -243,7 +244,7 @@ GDParser::Node* GDParser::_parse_expression(Node *p_parent,bool p_static,bool p_
//subexpression ()
tokenizer->advance();
parenthesis++;
- Node* subexpr = _parse_expression(p_parent,p_static);
+ Node* subexpr = _parse_expression(p_parent,p_static,p_allow_assign,p_parsing_constant);
parenthesis--;
if (!subexpr)
return NULL;
@@ -484,13 +485,23 @@ GDParser::Node* GDParser::_parse_expression(Node *p_parent,bool p_static,bool p_
}
- for( int i=0; i<cln->constant_expressions.size(); ++i ) {
+ if (p_parsing_constant) {
+ for( int i=0; i<cln->constant_expressions.size(); ++i ) {
- if( cln->constant_expressions[i].identifier == identifier ) {
+ if( cln->constant_expressions[i].identifier == identifier ) {
- expr = cln->constant_expressions[i].expression;
- bfn = true;
- break;
+ expr = cln->constant_expressions[i].expression;
+ bfn = true;
+ break;
+ }
+ }
+
+ if (GDScriptLanguage::get_singleton()->get_global_map().has(identifier)) {
+ //check from constants
+ ConstantNode *constant = alloc_node<ConstantNode>();
+ constant->value = GDScriptLanguage::get_singleton()->get_global_array()[ GDScriptLanguage::get_singleton()->get_global_map()[identifier] ];
+ expr=constant;
+ bfn = true;
}
}
@@ -567,7 +578,7 @@ GDParser::Node* GDParser::_parse_expression(Node *p_parent,bool p_static,bool p_
_set_error("',' or ']' expected");
return NULL;
}
- Node *n = _parse_expression(arr,p_static);
+ Node *n = _parse_expression(arr,p_static,p_allow_assign,p_parsing_constant);
if (!n)
return NULL;
arr->elements.push_back(n);
@@ -674,7 +685,7 @@ GDParser::Node* GDParser::_parse_expression(Node *p_parent,bool p_static,bool p_
expecting=DICT_EXPECT_VALUE;
} else {
//python/js style more flexible
- key = _parse_expression(dict,p_static);
+ key = _parse_expression(dict,p_static,p_allow_assign,p_parsing_constant);
if (!key)
return NULL;
expecting=DICT_EXPECT_COLON;
@@ -682,7 +693,7 @@ GDParser::Node* GDParser::_parse_expression(Node *p_parent,bool p_static,bool p_
}
if (expecting==DICT_EXPECT_VALUE) {
- Node *value = _parse_expression(dict,p_static);
+ Node *value = _parse_expression(dict,p_static,p_allow_assign,p_parsing_constant);
if (!value)
return NULL;
expecting=DICT_EXPECT_COMMA;
@@ -833,7 +844,7 @@ GDParser::Node* GDParser::_parse_expression(Node *p_parent,bool p_static,bool p_
tokenizer->advance(1);
- Node *subexpr = _parse_expression(op,p_static);
+ Node *subexpr = _parse_expression(op,p_static,p_allow_assign,p_parsing_constant);
if (!subexpr) {
return NULL;
}
@@ -1432,7 +1443,7 @@ GDParser::Node* GDParser::_reduce_expression(Node *p_node,bool p_to_const) {
GDParser::Node* GDParser::_parse_and_reduce_expression(Node *p_parent,bool p_static,bool p_reduce_const,bool p_allow_assign) {
- Node* expr=_parse_expression(p_parent,p_static,p_allow_assign);
+ Node* expr=_parse_expression(p_parent,p_static,p_allow_assign,p_reduce_const);
if (!expr || error_set)
return NULL;
expr = _reduce_expression(expr,p_reduce_const);
diff --git a/modules/gdscript/gd_parser.h b/modules/gdscript/gd_parser.h
index 6c49c1df52..4afc534a8c 100644
--- a/modules/gdscript/gd_parser.h
+++ b/modules/gdscript/gd_parser.h
@@ -435,7 +435,7 @@ private:
bool _parse_arguments(Node* p_parent, Vector<Node*>& p_args, bool p_static, bool p_can_codecomplete=false);
bool _enter_indent_block(BlockNode *p_block=NULL);
bool _parse_newline();
- Node* _parse_expression(Node *p_parent,bool p_static,bool p_allow_assign=false);
+ Node* _parse_expression(Node *p_parent, bool p_static, bool p_allow_assign=false, bool p_parsing_constant=false);
Node* _reduce_expression(Node *p_node,bool p_to_const=false);
Node* _parse_and_reduce_expression(Node *p_parent,bool p_static,bool p_reduce_const=false,bool p_allow_assign=false);
diff --git a/modules/gdscript/gd_script.h b/modules/gdscript/gd_script.h
index 166e29ad70..723761c3a9 100644
--- a/modules/gdscript/gd_script.h
+++ b/modules/gdscript/gd_script.h
@@ -202,6 +202,8 @@ friend class GDCompiler;
public:
+ _FORCE_INLINE_ Object* get_owner() { return owner; }
+
virtual bool set(const StringName& p_name, const Variant& p_value);
virtual bool get(const StringName& p_name, Variant &r_ret) const;
virtual void get_property_list(List<PropertyInfo> *p_properties) const;
diff --git a/platform/android/java_glue.cpp b/platform/android/java_glue.cpp
index 5fd2ab8910..3ea2ab1641 100644
--- a/platform/android/java_glue.cpp
+++ b/platform/android/java_glue.cpp
@@ -259,8 +259,7 @@ Variant _jobject_to_variant(JNIEnv * env, jobject obj) {
for (int i=0; i<stringCount; i++) {
jstring string = (jstring) env->GetObjectArrayElement(arr, i);
- const char *rawString = env->GetStringUTFChars(string, 0);
- sarr.push_back(String(rawString));
+ sarr.push_back(String::utf8(env->GetStringUTFChars(string, NULL)));
env->DeleteLocalRef(string);
}
@@ -506,7 +505,7 @@ public:
} break;
case Variant::BOOL: {
- ret = env->CallBooleanMethodA(instance,E->get().method,v);
+ ret = env->CallBooleanMethodA(instance,E->get().method,v)==JNI_TRUE;
//print_line("call bool");
} break;
case Variant::INT: {
@@ -521,8 +520,7 @@ public:
case Variant::STRING: {
jobject o = env->CallObjectMethodA(instance,E->get().method,v);
- String str = env->GetStringUTFChars((jstring)o, NULL );
- ret=str;
+ ret = String::utf8(env->GetStringUTFChars((jstring)o, NULL));
env->DeleteLocalRef(o);
} break;
case Variant::STRING_ARRAY: {
diff --git a/platform/android/os_android.cpp b/platform/android/os_android.cpp
index 4e6dfb2db2..13cdf2a020 100644
--- a/platform/android/os_android.cpp
+++ b/platform/android/os_android.cpp
@@ -708,8 +708,33 @@ void OS_Android::set_need_reload_hooks(bool p_needs_them) {
String OS_Android::get_data_dir() const {
- if (get_data_dir_func)
- return get_data_dir_func();
+ if (data_dir_cache!=String())
+ return data_dir_cache;
+
+ if (get_data_dir_func) {
+ String data_dir=get_data_dir_func();
+
+ //store current dir
+ char real_current_dir_name[2048];
+ getcwd(real_current_dir_name,2048);
+
+ //go to data dir
+ chdir(data_dir.utf8().get_data());
+
+ //get actual data dir, so we resolve potential symlink (Android 6.0+ seems to use symlink)
+ char data_current_dir_name[2048];
+ getcwd(data_current_dir_name,2048);
+
+ //cache by parsing utf8
+ data_dir_cache.parse_utf8(data_current_dir_name);
+
+ //restore original dir so we don't mess things up
+ chdir(real_current_dir_name);
+
+ return data_dir_cache;
+ }
+
+
return ".";
//return Globals::get_singleton()->get_singleton_object("GodotOS")->call("get_data_dir");
};
diff --git a/platform/android/os_android.h b/platform/android/os_android.h
index 843b3c4788..e82e08ea49 100644
--- a/platform/android/os_android.h
+++ b/platform/android/os_android.h
@@ -123,6 +123,8 @@ private:
PhysicsServer *physics_server;
Physics2DServer *physics_2d_server;
+ mutable String data_dir_cache;
+
#if 0
AudioDriverAndroid audio_driver_android;
#else
diff --git a/platform/haiku/context_gl_haiku.cpp b/platform/haiku/context_gl_haiku.cpp
index 2fedd1532a..bf890d14bf 100644
--- a/platform/haiku/context_gl_haiku.cpp
+++ b/platform/haiku/context_gl_haiku.cpp
@@ -35,6 +35,8 @@ ContextGL_Haiku::ContextGL_Haiku(HaikuDirectWindow* p_window) {
uint32 type = BGL_RGB | BGL_DOUBLE | BGL_DEPTH;
view = new HaikuGLView(window->Bounds(), type);
+
+ use_vsync = false;
}
ContextGL_Haiku::~ContextGL_Haiku() {
@@ -57,7 +59,7 @@ void ContextGL_Haiku::make_current() {
}
void ContextGL_Haiku::swap_buffers() {
- view->SwapBuffers();
+ view->SwapBuffers(use_vsync);
}
int ContextGL_Haiku::get_window_width() {
@@ -68,4 +70,12 @@ int ContextGL_Haiku::get_window_height() {
return window->Bounds().IntegerHeight();
}
+void ContextGL_Haiku::set_use_vsync(bool p_use) {
+ use_vsync = p_use;
+}
+
+bool ContextGL_Haiku::is_using_vsync() const {
+ return use_vsync;
+}
+
#endif
diff --git a/platform/haiku/context_gl_haiku.h b/platform/haiku/context_gl_haiku.h
index 91aae6b382..c7f80543aa 100644
--- a/platform/haiku/context_gl_haiku.h
+++ b/platform/haiku/context_gl_haiku.h
@@ -40,6 +40,8 @@ class ContextGL_Haiku : public ContextGL {
private:
HaikuGLView* view;
HaikuDirectWindow* window;
+
+ bool use_vsync;
public:
ContextGL_Haiku(HaikuDirectWindow* p_window);
@@ -51,6 +53,9 @@ public:
virtual void swap_buffers();
virtual int get_window_width();
virtual int get_window_height();
+
+ virtual void set_use_vsync(bool p_use);
+ virtual bool is_using_vsync() const;
};
#endif
diff --git a/platform/haiku/detect.py b/platform/haiku/detect.py
index 6d1a96a8da..f36b0c567e 100644
--- a/platform/haiku/detect.py
+++ b/platform/haiku/detect.py
@@ -24,7 +24,7 @@ def get_opts():
def get_flags():
return [
('builtin_zlib', 'no'),
- #('glew', 'yes'), # TODO: investigate the GLEW situation on Haiku
+ ('glew', 'yes'),
]
def configure(env):
@@ -38,8 +38,8 @@ def configure(env):
env.Append(CPPPATH = ['#platform/haiku'])
- env["CC"] = "gcc"
- env["CXX"] = "g++"
+ env["CC"] = "gcc-x86"
+ env["CXX"] = "g++-x86"
if (env["target"]=="release"):
if (env["debug_release"]=="yes"):
diff --git a/platform/windows/joystick.cpp b/platform/windows/joystick.cpp
index 663bbe3b9b..e69bfe6a52 100644
--- a/platform/windows/joystick.cpp
+++ b/platform/windows/joystick.cpp
@@ -283,7 +283,7 @@ void joystick_windows::close_joystick(int id) {
d_joysticks[id].attached = false;
attached_joysticks[d_joysticks[id].id] = false;
d_joysticks[id].guid.Data1 = d_joysticks[id].guid.Data2 = d_joysticks[id].guid.Data3 = 0;
- input->joy_connection_changed(id, false, "");
+ input->joy_connection_changed(d_joysticks[id].id, false, "");
joystick_count--;
}
diff --git a/platform/x11/detect.py b/platform/x11/detect.py
index 5f272536ba..54940866b2 100644
--- a/platform/x11/detect.py
+++ b/platform/x11/detect.py
@@ -209,5 +209,7 @@ def configure(env):
if (env["use_static_cpp"]=="yes"):
env.Append(LINKFLAGS=['-static-libstdc++'])
- env["x86_opt_gcc"]=True
+ list_of_x86 = ['x86_64', 'x86', 'i386', 'i586']
+ if any(platform.machine() in s for s in list_of_x86):
+ env["x86_opt_gcc"]=True
diff --git a/scene/3d/skeleton.cpp b/scene/3d/skeleton.cpp
index d0b739e17f..c996a8123c 100644
--- a/scene/3d/skeleton.cpp
+++ b/scene/3d/skeleton.cpp
@@ -64,15 +64,17 @@ bool Skeleton::_set(const StringName& p_path, const Variant& p_value) {
else if (what=="bound_childs") {
Array children=p_value;
- bones[which].nodes_bound.clear();
+ if (is_inside_tree()) {
+ bones[which].nodes_bound.clear();
- for (int i=0;i<children.size();i++) {
+ for (int i=0;i<children.size();i++) {
- NodePath path=children[i];
- ERR_CONTINUE( path.operator String()=="" );
- Node *node = get_node(path);
- ERR_CONTINUE(!node);
- bind_child_node_to_bone(which,node);
+ NodePath path=children[i];
+ ERR_CONTINUE( path.operator String()=="" );
+ Node *node = get_node(path);
+ ERR_CONTINUE(!node);
+ bind_child_node_to_bone(which,node);
+ }
}
} else {
return false;
diff --git a/scene/audio/stream_player.cpp b/scene/audio/stream_player.cpp
index 050e945c8f..99ecace1ed 100644
--- a/scene/audio/stream_player.cpp
+++ b/scene/audio/stream_player.cpp
@@ -77,7 +77,7 @@ void StreamPlayer::sp_update() {
if (to_mix==0) {
if (!stop_request) {
stop_request=true;
- call_deferred("stop");
+ call_deferred("_do_stop");
}
return;
}
@@ -91,7 +91,10 @@ void StreamPlayer::sp_update() {
}
}
-
+void StreamPlayer::_do_stop() {
+ stop();
+ emit_signal("finished");
+}
void StreamPlayer::_notification(int p_what) {
@@ -181,7 +184,7 @@ void StreamPlayer::stop() {
stop_request=false;
playback->stop();
resampler.flush();
- emit_signal("finished");
+
//set_idle_process(false);
}
@@ -381,6 +384,7 @@ void StreamPlayer::_bind_methods() {
ObjectTypeDB::bind_method(_MD("_set_play","play"),&StreamPlayer::_set_play);
ObjectTypeDB::bind_method(_MD("_get_play"),&StreamPlayer::_get_play);
+ ObjectTypeDB::bind_method(_MD("_do_stop"),&StreamPlayer::_do_stop);
ADD_PROPERTY( PropertyInfo(Variant::OBJECT, "stream/stream", PROPERTY_HINT_RESOURCE_TYPE,"AudioStream"), _SCS("set_stream"), _SCS("get_stream") );
ADD_PROPERTY( PropertyInfo(Variant::BOOL, "stream/play"), _SCS("_set_play"), _SCS("_get_play") );
diff --git a/scene/audio/stream_player.h b/scene/audio/stream_player.h
index 475139c2a4..4facc3c816 100644
--- a/scene/audio/stream_player.h
+++ b/scene/audio/stream_player.h
@@ -71,6 +71,8 @@ class StreamPlayer : public Node {
AudioRBResampler resampler;
+ void _do_stop();
+
bool _play;
void _set_play(bool p_play);
bool _get_play() const;
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp
index a2b7cd2e0a..699062fee4 100644
--- a/scene/gui/base_button.cpp
+++ b/scene/gui/base_button.cpp
@@ -416,7 +416,7 @@ Ref<ShortCut> BaseButton:: get_shortcut() const {
void BaseButton::_unhandled_input(InputEvent p_event) {
- if (!is_disabled() && is_visible() && shortcut.is_valid() && shortcut->is_shortcut(p_event)) {
+ if (!is_disabled() && is_visible() && p_event.is_pressed() && shortcut.is_valid() && shortcut->is_shortcut(p_event)) {
if (get_viewport()->get_modal_stack_top() && !get_viewport()->get_modal_stack_top()->is_a_parent_of(this))
return; //ignore because of modal window
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index d6bbdf2d21..06f8c27957 100644
--- a/scene/gui/color_picker.cpp
+++ b/scene/gui/color_picker.cpp
@@ -72,13 +72,16 @@ void ColorPicker::_notification(int p_what) {
_update_color();
}
- case NOTIFICATION_VISIBILITY_CHANGED: {
- c_text->call_deferred("grab_focus");
- c_text->call_deferred("select");
- } break;
+
}
}
+void ColorPicker::set_focus_on_line_edit() {
+
+ c_text->grab_focus();
+ c_text->select();
+}
+
void ColorPicker::_update_controls() {
if (edit_alpha) {
@@ -628,6 +631,7 @@ void ColorPickerButton::pressed() {
popup->set_pos(get_global_pos()-Size2(0,ms.height));
popup->set_size(ms);
popup->popup();
+ picker->set_focus_on_line_edit();
}
diff --git a/scene/gui/color_picker.h b/scene/gui/color_picker.h
index f5de982200..b9ef1f1e2f 100644
--- a/scene/gui/color_picker.h
+++ b/scene/gui/color_picker.h
@@ -107,6 +107,7 @@ public:
void set_raw_mode(bool p_enabled);
bool is_raw_mode() const;
+ void set_focus_on_line_edit();
ColorPicker();
};
diff --git a/scene/gui/color_ramp_edit.cpp b/scene/gui/color_ramp_edit.cpp
index 50e1ffbec9..b7347f00dc 100644
--- a/scene/gui/color_ramp_edit.cpp
+++ b/scene/gui/color_ramp_edit.cpp
@@ -271,7 +271,9 @@ void ColorRampEdit::_input_event(const InputEvent& p_event) {
void ColorRampEdit::_notification(int p_what) {
if (p_what==NOTIFICATION_ENTER_TREE) {
- picker->connect("color_changed",this,"_color_changed");
+ if (!picker->is_connected("color_changed",this,"_color_changed")) {
+ picker->connect("color_changed",this,"_color_changed");
+ }
}
if (p_what==NOTIFICATION_DRAW) {
diff --git a/scene/gui/grid_container.cpp b/scene/gui/grid_container.cpp
index dde9768a6d..5e6622b3f8 100644
--- a/scene/gui/grid_container.cpp
+++ b/scene/gui/grid_container.cpp
@@ -156,6 +156,7 @@ void GridContainer::_notification(int p_what) {
void GridContainer::set_columns(int p_columns) {
+ ERR_FAIL_COND(p_columns<1);
columns=p_columns;
queue_sort();
minimum_size_changed();
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index 579a6e2f0a..c025e4c706 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -108,7 +108,7 @@ void LineEdit::_input_event(InputEvent p_event) {
selection.doubleclick=false;
if (OS::get_singleton()->has_virtual_keyboard())
- OS::get_singleton()->show_virtual_keyboard(get_text(),get_global_rect());
+ OS::get_singleton()->show_virtual_keyboard(text,get_global_rect());
}
update();
@@ -556,7 +556,9 @@ void LineEdit::_notification(int p_what) {
cursor_set_blink_enabled(EDITOR_DEF("text_editor/caret_blink", false));
cursor_set_blink_speed(EDITOR_DEF("text_editor/caret_blink_speed", 0.65));
- EditorSettings::get_singleton()->connect("settings_changed",this,"_editor_settings_changed");
+ if (!EditorSettings::get_singleton()->is_connected("settings_changed",this,"_editor_settings_changed")) {
+ EditorSettings::get_singleton()->connect("settings_changed",this,"_editor_settings_changed");
+ }
}
} break;
#endif
@@ -634,14 +636,19 @@ void LineEdit::_notification(int p_what) {
Color font_color_selected=get_color("font_color_selected");
Color cursor_color=get_color("cursor_color");
+ const String& t = text.empty() ? placeholder : text;
+ // draw placeholder color
+ if(text.empty())
+ font_color.a *= placeholder_alpha;
+
while(true) {
//end of string, break!
- if (char_ofs>=text.length())
+ if (char_ofs>=t.length())
break;
- CharType cchar=pass?'*':text[char_ofs];
- CharType next=pass?'*':text[char_ofs+1];
+ CharType cchar=pass?'*':t[char_ofs];
+ CharType next=pass?'*':t[char_ofs+1];
int char_width=font->get_char_size( cchar,next ).width;
// end of widget, break!
@@ -678,7 +685,7 @@ void LineEdit::_notification(int p_what) {
}
if (OS::get_singleton()->has_virtual_keyboard())
- OS::get_singleton()->show_virtual_keyboard(get_text(),get_global_rect());
+ OS::get_singleton()->show_virtual_keyboard(text,get_global_rect());
} break;
case NOTIFICATION_FOCUS_EXIT: {
@@ -938,6 +945,29 @@ String LineEdit::get_text() const {
return text;
}
+void LineEdit::set_placeholder(String p_text) {
+
+ placeholder = p_text;
+ update();
+}
+
+String LineEdit::get_placeholder() const {
+
+ return placeholder;
+}
+
+
+void LineEdit::set_placeholder_alpha(float p_alpha) {
+
+ placeholder_alpha = p_alpha;
+ update();
+}
+
+float LineEdit::get_placeholder_alpha() const {
+
+ return placeholder_alpha;
+}
+
void LineEdit::set_cursor_pos(int p_pos) {
if (p_pos>(int)text.length())
@@ -1223,6 +1253,10 @@ void LineEdit::_bind_methods() {
ObjectTypeDB::bind_method(_MD("select_all"),&LineEdit::select_all);
ObjectTypeDB::bind_method(_MD("set_text","text"),&LineEdit::set_text);
ObjectTypeDB::bind_method(_MD("get_text"),&LineEdit::get_text);
+ ObjectTypeDB::bind_method(_MD("set_placeholder","text"),&LineEdit::set_placeholder);
+ ObjectTypeDB::bind_method(_MD("get_placeholder"),&LineEdit::get_placeholder);
+ ObjectTypeDB::bind_method(_MD("set_placeholder_alpha","alpha"),&LineEdit::set_placeholder_alpha);
+ ObjectTypeDB::bind_method(_MD("get_placeholder_alpha"),&LineEdit::get_placeholder_alpha);
ObjectTypeDB::bind_method(_MD("set_cursor_pos","pos"),&LineEdit::set_cursor_pos);
ObjectTypeDB::bind_method(_MD("get_cursor_pos"),&LineEdit::get_cursor_pos);
ObjectTypeDB::bind_method(_MD("cursor_set_blink_enabled", "enable"),&LineEdit::cursor_set_blink_enabled);
@@ -1257,6 +1291,8 @@ void LineEdit::_bind_methods() {
BIND_CONSTANT( MENU_MAX );
ADD_PROPERTYNZ( PropertyInfo( Variant::STRING, "text" ), _SCS("set_text"),_SCS("get_text") );
+ ADD_PROPERTYNZ( PropertyInfo( Variant::STRING, "placeholder/text" ), _SCS("set_placeholder"),_SCS("get_placeholder") );
+ ADD_PROPERTYNZ( PropertyInfo( Variant::REAL, "placeholder/alpha",PROPERTY_HINT_RANGE,"0,1,0.001" ), _SCS("set_placeholder_alpha"),_SCS("get_placeholder_alpha") );
ADD_PROPERTYNZ(PropertyInfo(Variant::INT, "align", PROPERTY_HINT_ENUM, "Left,Center,Right,Fill"), _SCS("set_align"), _SCS("get_align"));
ADD_PROPERTYNZ( PropertyInfo( Variant::INT, "max_length" ), _SCS("set_max_length"),_SCS("get_max_length") );
ADD_PROPERTYNO( PropertyInfo( Variant::BOOL, "editable" ), _SCS("set_editable"),_SCS("is_editable") );
@@ -1275,6 +1311,7 @@ LineEdit::LineEdit() {
window_has_focus=true;
max_length = 0;
pass=false;
+ placeholder_alpha=0.6;
selection_clear();
set_focus_mode( FOCUS_ALL );
diff --git a/scene/gui/line_edit.h b/scene/gui/line_edit.h
index e4da0f0b87..112e4ad55e 100644
--- a/scene/gui/line_edit.h
+++ b/scene/gui/line_edit.h
@@ -67,6 +67,8 @@ private:
String undo_text;
String text;
+ String placeholder;
+ float placeholder_alpha;
PopupMenu *menu;
@@ -135,6 +137,10 @@ public:
void delete_text(int p_from_column, int p_to_column);
void set_text(String p_text);
String get_text() const;
+ void set_placeholder(String p_text);
+ String get_placeholder() const;
+ void set_placeholder_alpha(float p_alpha);
+ float get_placeholder_alpha() const;
void set_cursor_pos(int p_pos);
int get_cursor_pos() const;
void set_max_length(int p_max_length);
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 6fd6137ac8..e106f0dfc6 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -852,6 +852,11 @@ void TextEdit::_notification(int p_what) {
k++;
}
+ // check for space between name and bracket
+ while (k < str.length() && (str[k] == '\t' || str[k] == ' ')) {
+ k++;
+ }
+
if (str[k] == '(') {
in_function_name = true;
}
@@ -1973,6 +1978,7 @@ void TextEdit::_input_event(const InputEvent& p_input_event) {
}
} break;
case KEY_TAB: {
+ if (k.mod.command) break; // avoid tab when command
if (readonly)
break;
@@ -4541,6 +4547,7 @@ TextEdit::TextEdit() {
scroll_past_end_of_file_enabled=false;
auto_brace_completion_enabled=false;
brace_matching_enabled=false;
+ highlight_all_occurrences=false;
auto_indent=false;
insert_mode = false;
window_has_focus=true;
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index f8516f8f5d..db14c15db8 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -1355,6 +1355,8 @@ void Tree::select_single_item(TreeItem *p_selected,TreeItem *p_current,int p_col
switched=true;
}
+ bool emitted_row=false;
+
for (int i=0;i<columns.size();i++) {
TreeItem::Cell &c=p_current->cells[i];
@@ -1373,7 +1375,10 @@ void Tree::select_single_item(TreeItem *p_selected,TreeItem *p_current,int p_col
selected_item=p_selected;
selected_col=0;
selected_item=p_selected;
- emit_signal("item_selected");
+ if (!emitted_row) {
+ emit_signal("item_selected");
+ emitted_row=true;
+ }
//if (p_col==i)
// p_current->selected_signal.call(p_col);
}
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp
index ff8f0d05f1..c6a32d5568 100644
--- a/scene/main/viewport.cpp
+++ b/scene/main/viewport.cpp
@@ -1331,11 +1331,11 @@ Matrix32 Viewport::_get_input_pre_xform() const {
Matrix32 pre_xf;
if (render_target) {
- ERR_FAIL_COND_V(to_screen_rect.size.x==0,pre_xf);
- ERR_FAIL_COND_V(to_screen_rect.size.y==0,pre_xf);
+ if (to_screen_rect!=Rect2()) {
- pre_xf.elements[2]=-to_screen_rect.pos;
- pre_xf.scale(rect.size/to_screen_rect.size);
+ pre_xf.elements[2]=-to_screen_rect.pos;
+ pre_xf.scale(rect.size/to_screen_rect.size);
+ }
} else {
pre_xf.elements[2]=-rect.pos;
@@ -1788,15 +1788,12 @@ void Viewport::_gui_input_event(InputEvent p_event) {
if (p_event.mouse_button.button_index==BUTTON_LEFT) {
gui.drag_accum=Vector2();
gui.drag_attempted=false;
- if (gui.drag_data.get_type()!=Variant::NIL) {
- _propagate_viewport_notification(this,NOTIFICATION_DRAG_END);
- }
- gui.drag_data=Variant();
}
}
+
p_event.mouse_button.global_x = pos.x;
p_event.mouse_button.global_y = pos.y;
@@ -1832,30 +1829,55 @@ void Viewport::_gui_input_event(InputEvent p_event) {
get_tree()->call_group(SceneTree::GROUP_CALL_REALTIME,"windows","_cancel_input_ID",p_event.ID);
get_tree()->set_input_as_handled();
+
+ if (gui.drag_data.get_type()!=Variant::NIL && p_event.mouse_button.button_index==BUTTON_LEFT) {
+
+ //alternate drop use (when using force_drag(), as proposed by #5342
+ if (gui.mouse_focus && gui.mouse_focus->can_drop_data(pos,gui.drag_data)) {
+ gui.mouse_focus->drop_data(pos,gui.drag_data);
+ }
+
+ gui.drag_data=Variant();
+
+ if (gui.drag_preview) {
+ memdelete( gui.drag_preview );
+ gui.drag_preview=NULL;
+ }
+ _propagate_viewport_notification(this,NOTIFICATION_DRAG_END);
+ //change mouse accordingly
+ }
+
+
+
_gui_cancel_tooltip();
//gui.tooltip_popup->hide();
} else {
- if (gui.drag_preview && p_event.mouse_button.button_index==BUTTON_LEFT) {
- memdelete( gui.drag_preview );
- gui.drag_preview=NULL;
- }
- if (!gui.mouse_focus) {
- if (gui.mouse_over && gui.drag_data.get_type()!=Variant::NIL && p_event.mouse_button.button_index==BUTTON_LEFT) {
+ if (gui.drag_data.get_type()!=Variant::NIL && p_event.mouse_button.button_index==BUTTON_LEFT) {
+ if (gui.mouse_over) {
Size2 pos = mpos;
pos = gui.focus_inv_xform.xform(pos);
if (gui.mouse_over->can_drop_data(pos,gui.drag_data)) {
gui.mouse_over->drop_data(pos,gui.drag_data);
}
- gui.drag_data=Variant();
- _propagate_viewport_notification(this,NOTIFICATION_DRAG_END);
- //change mouse accordingly
}
+ if (gui.drag_preview && p_event.mouse_button.button_index==BUTTON_LEFT) {
+ memdelete( gui.drag_preview );
+ gui.drag_preview=NULL;
+ }
+
+ gui.drag_data=Variant();
+ _propagate_viewport_notification(this,NOTIFICATION_DRAG_END);
+ //change mouse accordingly
+ }
+
+ if (!gui.mouse_focus) {
+ //release event is only sent if a mouse focus (previously pressed button) exists
break;
}
@@ -1875,10 +1897,10 @@ void Viewport::_gui_input_event(InputEvent p_event) {
gui.mouse_focus_button=-1;
}
- if (gui.drag_data.get_type()!=Variant::NIL && p_event.mouse_button.button_index==BUTTON_LEFT) {
+ /*if (gui.drag_data.get_type()!=Variant::NIL && p_event.mouse_button.button_index==BUTTON_LEFT) {
_propagate_viewport_notification(this,NOTIFICATION_DRAG_END);
gui.drag_data=Variant(); //always clear
- }
+ }*/
get_tree()->call_group(SceneTree::GROUP_CALL_REALTIME,"windows","_cancel_input_ID",p_event.ID);
@@ -2036,7 +2058,12 @@ void Viewport::_gui_input_event(InputEvent p_event) {
case InputEvent::JOYSTICK_BUTTON:
case InputEvent::KEY: {
- if (gui.key_focus) {
+
+ if (gui.key_focus && !gui.key_focus->is_visible()) {
+ gui.key_focus->release_focus();
+ }
+
+ if (gui.key_focus) {
gui.key_event_accepted=false;
if (gui.key_focus->can_process()) {
@@ -2176,6 +2203,9 @@ void Viewport::_gui_remove_from_modal_stack(List<Control*>::Element *MI,ObjectID
void Viewport::_gui_force_drag(Control *p_base, const Variant& p_data, Control *p_control) {
+ ERR_EXPLAIN("Drag data must be a value");
+ ERR_FAIL_COND(p_data.get_type()==Variant::NIL);
+
gui.drag_data=p_data;
gui.mouse_focus=NULL;
@@ -2372,8 +2402,8 @@ void Viewport::input(const InputEvent& p_event) {
ERR_FAIL_COND(!is_inside_tree());
+ get_tree()->_call_input_pause(input_group,"_input",p_event); //not a bug, must happen before GUI, order is _input -> gui input -> _unhandled input
_gui_input_event(p_event);
- get_tree()->_call_input_pause(input_group,"_input",p_event);
//get_tree()->call_group(SceneTree::GROUP_CALL_REVERSE|SceneTree::GROUP_CALL_REALTIME|SceneTree::GROUP_CALL_MULIILEVEL,gui_input_group,"_gui_input",p_event); //special one for GUI, as controls use their own process check
}
diff --git a/scene/resources/packed_scene.cpp b/scene/resources/packed_scene.cpp
index 50852dc1f7..4f5eed8796 100644
--- a/scene/resources/packed_scene.cpp
+++ b/scene/resources/packed_scene.cpp
@@ -731,6 +731,7 @@ Error SceneState::_parse_connections(Node *p_owner,Node *p_node, Map<StringName,
List<MethodInfo> _signals;
p_node->get_signal_list(&_signals);
+ _signals.sort();
//ERR_FAIL_COND_V( !node_map.has(p_node), ERR_BUG);
//NodeData &nd = nodes[node_map[p_node]];
@@ -740,6 +741,9 @@ Error SceneState::_parse_connections(Node *p_owner,Node *p_node, Map<StringName,
List<Node::Connection> conns;
p_node->get_signal_connection_list(E->get().name,&conns);
+
+ conns.sort();
+
for(List<Node::Connection>::Element *F=conns.front();F;F=F->next()) {
const Node::Connection &c = F->get();
diff --git a/scene/resources/sample_library.cpp b/scene/resources/sample_library.cpp
index 5b70ee0e11..73517b180e 100644
--- a/scene/resources/sample_library.cpp
+++ b/scene/resources/sample_library.cpp
@@ -122,9 +122,17 @@ bool SampleLibrary::has_sample(const StringName& p_name) const {
void SampleLibrary::_get_property_list(List<PropertyInfo> *p_list) const {
+
+ List<PropertyInfo> tpl;
for(Map<StringName,SampleData>::Element *E=sample_map.front();E;E=E->next()) {
- p_list->push_back( PropertyInfo( Variant::DICTIONARY, "samples/"+E->key(),PROPERTY_HINT_RESOURCE_TYPE,"Sample",PROPERTY_USAGE_NOEDITOR ) );
+ tpl.push_back( PropertyInfo( Variant::DICTIONARY, "samples/"+E->key(),PROPERTY_HINT_RESOURCE_TYPE,"Sample",PROPERTY_USAGE_NOEDITOR ) );
+ }
+
+ tpl.sort();
+ //sort so order is kept
+ for(List<PropertyInfo>::Element *E=tpl.front();E;E=E->next()) {
+ p_list->push_back(E->get());
}
}
diff --git a/tools/doc/doc_data.cpp b/tools/doc/doc_data.cpp
index e3689cf13d..470dd078ae 100644
--- a/tools/doc/doc_data.cpp
+++ b/tools/doc/doc_data.cpp
@@ -455,6 +455,12 @@ void DocData::generate(bool p_basic_types) {
}
+ {
+ //so it can be documented that it does not exist
+ class_list["Variant"]=ClassDoc();
+ class_list["Variant"].name="Variant";
+ }
+
if (!p_basic_types)
return;
diff --git a/tools/editor/editor_dir_dialog.cpp b/tools/editor/editor_dir_dialog.cpp
index a6e231cf18..f6ce7bf3f8 100644
--- a/tools/editor/editor_dir_dialog.cpp
+++ b/tools/editor/editor_dir_dialog.cpp
@@ -99,8 +99,14 @@ void EditorDirDialog::_notification(int p_what) {
if (p_what==NOTIFICATION_ENTER_TREE) {
reload();
- tree->connect("item_collapsed",this,"_item_collapsed",varray(),CONNECT_DEFERRED);
- EditorFileSystem::get_singleton()->connect("filesystem_changed",this,"reload");
+
+ if (!tree->is_connected("item_collapsed",this,"_item_collapsed")) {
+ tree->connect("item_collapsed",this,"_item_collapsed",varray(),CONNECT_DEFERRED);
+ }
+
+ if (!EditorFileSystem::get_singleton()->is_connected("filesystem_changed",this,"reload")) {
+ EditorFileSystem::get_singleton()->connect("filesystem_changed",this,"reload");
+ }
}
@@ -185,10 +191,14 @@ void EditorDirDialog::ok_pressed() {
void EditorDirDialog::_make_dir() {
TreeItem *ti=tree->get_selected();
- if (!ti)
+ if (!ti) {
+ mkdirerr->set_text("Please select a base directory first");
+ mkdirerr->popup_centered_minsize();
return;
+ }
makedialog->popup_centered_minsize(Size2(250,80));
+ makedirname->grab_focus();
}
void EditorDirDialog::_make_dir_confirm() {
@@ -198,9 +208,11 @@ void EditorDirDialog::_make_dir_confirm() {
return;
String dir = ti->get_metadata(0);
+
DirAccess *d = DirAccess::open(dir);
ERR_FAIL_COND(!d);
Error err = d->make_dir(makedirname->get_text());
+
if (err!=OK) {
mkdirerr->popup_centered_minsize(Size2(250,80));
} else {
diff --git a/tools/editor/editor_file_system.cpp b/tools/editor/editor_file_system.cpp
index 1f414f80a0..cb7cefea26 100644
--- a/tools/editor/editor_file_system.cpp
+++ b/tools/editor/editor_file_system.cpp
@@ -34,6 +34,7 @@
#include "editor_node.h"
#include "io/resource_saver.h"
#include "editor_settings.h"
+#include "editor_resource_preview.h"
EditorFileSystem *EditorFileSystem::singleton=NULL;
@@ -848,6 +849,7 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir,const S
continue;
}
+
if (_check_meta_sources(p_dir->files[i]->meta)) {
ItemAction ia;
ia.action=ItemAction::ACTION_FILE_SOURCES_CHANGED;
@@ -858,6 +860,8 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir,const S
} else {
p_dir->files[i]->meta.sources_changed=false;
}
+
+ EditorResourcePreview::get_singleton()->check_for_invalidation(p_dir->get_file_path(i));
}
for(int i=0;i<p_dir->subdirs.size();i++) {
@@ -1328,6 +1332,7 @@ void EditorFileSystem::update_file(const String& p_file) {
fs->files[cpos]->modified_time=FileAccess::get_modified_time(p_file);
fs->files[cpos]->meta=_get_meta(p_file);
+ EditorResourcePreview::get_singleton()->call_deferred("check_for_invalidation",p_file);
call_deferred("emit_signal","filesystem_changed"); //update later
}
@@ -1341,6 +1346,8 @@ void EditorFileSystem::_bind_methods() {
}
+
+
EditorFileSystem::EditorFileSystem() {
diff --git a/tools/editor/editor_file_system.h b/tools/editor/editor_file_system.h
index b96e947569..fb768fb358 100644
--- a/tools/editor/editor_file_system.h
+++ b/tools/editor/editor_file_system.h
@@ -236,6 +236,7 @@ public:
EditorFileSystemDirectory *get_path(const String& p_path);
String get_file_type(const String& p_file) const;
EditorFileSystemDirectory* find_file(const String& p_file,int* r_index) const;
+
EditorFileSystem();
~EditorFileSystem();
};
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index 2bba97251d..ae632ab381 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -2846,6 +2846,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
if (mt!=E->get()->get_last_modified_time()) {
E->get()->reload_from_file();
}
+
}
diff --git a/tools/editor/editor_resource_preview.cpp b/tools/editor/editor_resource_preview.cpp
index 8975c0ec35..750a172d1e 100644
--- a/tools/editor/editor_resource_preview.cpp
+++ b/tools/editor/editor_resource_preview.cpp
@@ -66,16 +66,20 @@ void EditorResourcePreview::_preview_ready(const String& p_str,const Ref<Texture
String path = p_str;
uint32_t hash=0;
+ uint64_t modified_time=0;
if (p_str.begins_with("ID:")) {
hash=p_str.get_slicec(':',2).to_int();
path="ID:"+p_str.get_slicec(':',1);
+ } else {
+ modified_time = FileAccess::get_modified_time(path);
}
Item item;
item.order=order++;
item.preview=p_texture;
item.last_hash=hash;
+ item.modified_time=modified_time;
cache[path]=item;
@@ -263,6 +267,8 @@ void EditorResourcePreview::queue_edited_resource_preview(const Ref<Resource>& p
preview_mutex->lock();
String path_id = "ID:"+itos(p_res->get_instance_ID());
+
+
if (cache.has(path_id) && cache[path_id].last_hash==p_res->hash_edited_version()) {
cache[path_id].order=order++;
@@ -272,6 +278,8 @@ void EditorResourcePreview::queue_edited_resource_preview(const Ref<Resource>& p
}
+ cache.erase(path_id); //erase if exists, since it will be regen
+
//print_line("send to thread "+p_path);
QueueItem item;
item.function=p_receiver_func;
@@ -322,6 +330,32 @@ EditorResourcePreview* EditorResourcePreview::get_singleton() {
void EditorResourcePreview::_bind_methods() {
ObjectTypeDB::bind_method("_preview_ready",&EditorResourcePreview::_preview_ready);
+ ObjectTypeDB::bind_method(_MD("check_for_invalidation","path"),&EditorResourcePreview::check_for_invalidation);
+
+
+ ADD_SIGNAL(MethodInfo("preview_invalidated",PropertyInfo(Variant::STRING,"path")));
+}
+
+bool EditorResourcePreview::check_for_invalidation(const String& p_path) {
+
+ preview_mutex->lock();
+
+ bool call_invalidated=false;
+ if (cache.has(p_path)) {
+
+ uint64_t modified_time = FileAccess::get_modified_time(p_path);
+ if (modified_time!=cache[p_path].modified_time) {
+ cache.erase(p_path);
+ call_invalidated=true;
+ }
+ }
+
+ preview_mutex->unlock();
+
+ if (call_invalidated) {//do outside mutex
+ call_deferred("emit_signal","preview_invalidated",p_path);
+ }
+
}
EditorResourcePreview::EditorResourcePreview() {
diff --git a/tools/editor/editor_resource_preview.h b/tools/editor/editor_resource_preview.h
index 63dc5c3dd3..fed8f129ed 100644
--- a/tools/editor/editor_resource_preview.h
+++ b/tools/editor/editor_resource_preview.h
@@ -93,6 +93,7 @@ class EditorResourcePreview : public Node {
Ref<Texture> preview;
int order;
uint32_t last_hash;
+ uint64_t modified_time;
};
int order;
@@ -106,6 +107,8 @@ class EditorResourcePreview : public Node {
void _thread();
Vector<Ref<EditorResourcePreviewGenerator> > preview_generators;
+
+
protected:
static void _bind_methods();
@@ -118,6 +121,7 @@ public:
void queue_edited_resource_preview(const Ref<Resource>& p_path, Object* p_receiver, const StringName& p_receiver_func, const Variant& p_userdata);
void add_preview_generator(const Ref<EditorResourcePreviewGenerator>& p_generator);
+ bool check_for_invalidation(const String& p_path);
EditorResourcePreview();
~EditorResourcePreview();
diff --git a/tools/editor/io_plugins/editor_scene_import_plugin.cpp b/tools/editor/io_plugins/editor_scene_import_plugin.cpp
index b27539b933..8899d65aea 100644
--- a/tools/editor/io_plugins/editor_scene_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_scene_import_plugin.cpp
@@ -2459,7 +2459,7 @@ void EditorSceneImportPlugin::_optimize_animations(Node *scene, float p_max_lin_
void EditorSceneImportPlugin::_find_resources_to_merge(Node *scene, Node *node, bool p_merge_material, Map<String, Ref<Material> > &materials, bool p_merge_anims, Map<String,Ref<Animation> >& merged_anims,Set<Ref<Mesh> > &tested_meshes) {
- if (node->get_owner()!=scene)
+ if (node!=scene && node->get_owner()!=scene)
return;
String path = scene->get_path_to(node);
@@ -2507,11 +2507,43 @@ void EditorSceneImportPlugin::_find_resources_to_merge(Node *scene, Node *node,
for(int i=0;i<mesh->get_surface_count();i++) {
Ref<Material> material = mesh->surface_get_material(i);
- materials[mesh->get_name()+":surf:"+mesh->surface_get_name(i)]=material;
+
+ if (material.is_valid()) {
+
+ String sname = mesh->surface_get_name(i);
+ if (sname=="")
+ sname="surf_"+itos(i);
+
+ sname=mesh->get_name()+":surf:"+sname;
+ materials[sname]=material;
+ }
}
tested_meshes.insert(mesh);
}
+
+ if (mesh.is_valid()) {
+
+ for(int i=0;i<mesh->get_surface_count();i++) {
+ Ref<Material> material = mi->get_surface_material(i);
+ if (material.is_valid()) {
+ String sname = mesh->surface_get_name(i);
+ if (sname=="")
+ sname="surf_"+itos(i);
+
+ sname=path+":inst_surf:"+sname;
+ materials[sname]=material;
+ }
+ }
+
+ }
+
+ Ref<Material> override = mi->get_material_override();
+
+ if (override.is_valid()) {
+
+ materials[path+":override"]=override;
+ }
}
@@ -2525,11 +2557,13 @@ void EditorSceneImportPlugin::_find_resources_to_merge(Node *scene, Node *node,
void EditorSceneImportPlugin::_merge_found_resources(Node *scene, Node *node, bool p_merge_material, const Map<String, Ref<Material> > &materials, bool p_merge_anims, const Map<String,Ref<Animation> >& merged_anims, Set<Ref<Mesh> > &tested_meshes) {
- if (node->get_owner()!=scene)
+ if (node!=scene && node->get_owner()!=scene)
return;
String path = scene->get_path_to(node);
+ print_line("at path: "+path);
+
if (node->cast_to<AnimationPlayer>()) {
AnimationPlayer *ap = node->cast_to<AnimationPlayer>();
@@ -2570,15 +2604,48 @@ void EditorSceneImportPlugin::_merge_found_resources(Node *scene, Node *node, bo
if (mesh.is_valid() && mesh->get_name()!=String() && !tested_meshes.has(mesh)) {
for(int i=0;i<mesh->get_surface_count();i++) {
- String sname = mesh->get_name()+":surf:"+mesh->surface_get_name(i);
+
+ String sname = mesh->surface_get_name(i);
+ if (sname=="")
+ sname="surf_"+itos(i);
+
+ sname=mesh->get_name()+":surf:"+sname;
+
if (materials.has(sname)) {
+
mesh->surface_set_material(i,materials[sname]);
}
}
tested_meshes.insert(mesh);
}
+
+ if (mesh.is_valid()) {
+
+ for(int i=0;i<mesh->get_surface_count();i++) {
+
+ String sname = mesh->surface_get_name(i);
+ if (sname=="")
+ sname="surf_"+itos(i);
+
+ sname=path+":inst_surf:"+sname;
+
+
+ if (materials.has(sname)) {
+
+ mi->set_surface_material(i,materials[sname]);
+ }
+ }
+
+ }
+
+
+ String opath = path+":override";
+ if (materials.has(opath)) {
+ mi->set_material_override(materials[opath]);
+ }
+
}
@@ -2643,6 +2710,7 @@ Error EditorSceneImportPlugin::import2(Node *scene, const String& p_dest_path, c
if (scene_flags&(SCENE_FLAG_MERGE_KEEP_MATERIALS|SCENE_FLAG_MERGE_KEEP_EXTRA_ANIM_TRACKS) && FileAccess::exists(p_dest_path)) {
//must merge!
+ print_line("MUST MERGE");
Ref<PackedScene> pscene = ResourceLoader::load(p_dest_path,"PackedScene",true);
if (pscene.is_valid()) {
@@ -2653,8 +2721,9 @@ Error EditorSceneImportPlugin::import2(Node *scene, const String& p_dest_path, c
Set<Ref<Mesh> > tested_meshes;
_find_resources_to_merge(instance,instance,scene_flags&SCENE_FLAG_MERGE_KEEP_MATERIALS,merged_materials,scene_flags&SCENE_FLAG_MERGE_KEEP_EXTRA_ANIM_TRACKS,merged_anims,tested_meshes);
+
tested_meshes.clear();
- _merge_found_resources(instance,instance,scene_flags&SCENE_FLAG_MERGE_KEEP_MATERIALS,merged_materials,scene_flags&SCENE_FLAG_MERGE_KEEP_EXTRA_ANIM_TRACKS,merged_anims,tested_meshes);
+ _merge_found_resources(scene,scene,scene_flags&SCENE_FLAG_MERGE_KEEP_MATERIALS,merged_materials,scene_flags&SCENE_FLAG_MERGE_KEEP_EXTRA_ANIM_TRACKS,merged_anims,tested_meshes);
memdelete(instance);
}
diff --git a/tools/editor/plugins/animation_player_editor_plugin.cpp b/tools/editor/plugins/animation_player_editor_plugin.cpp
index 10c7bf79a3..203564e612 100644
--- a/tools/editor/plugins/animation_player_editor_plugin.cpp
+++ b/tools/editor/plugins/animation_player_editor_plugin.cpp
@@ -1404,6 +1404,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
hb->add_child(animation);
animation->set_h_size_flags(SIZE_EXPAND_FILL);
animation->set_tooltip(TTR("Display list of animations in player."));
+ animation->set_clip_text(true);
autoplay = memnew( ToolButton );
hb->add_child(autoplay);
diff --git a/tools/editor/plugins/sample_editor_plugin.cpp b/tools/editor/plugins/sample_editor_plugin.cpp
index b094184a29..69602ac995 100644
--- a/tools/editor/plugins/sample_editor_plugin.cpp
+++ b/tools/editor/plugins/sample_editor_plugin.cpp
@@ -324,12 +324,13 @@ void SampleEditor::generate_preview_texture(const Ref<Sample>& p_sample,Ref<Imag
void SampleEditor::_update_sample() {
player->stop_all();
- if (sample->get_format()==Sample::FORMAT_IMA_ADPCM)
- return; //bye or unsupported
generate_preview_texture(sample,peakdisplay);
info_label->set_text(TTR("Length:")+" "+String::num(sample->get_length()/(float)sample->get_mix_rate(),2)+"s");
+ if (library->has_sample("default"))
+ library->remove_sample("default");
+
library->add_sample("default",sample);
}
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp
index 10e4fc8475..ee83b6b032 100644
--- a/tools/editor/plugins/script_editor_plugin.cpp
+++ b/tools/editor/plugins/script_editor_plugin.cpp
@@ -585,7 +585,6 @@ void ScriptTextEditor::_code_complete_script(const String& p_code, List<String>*
Error err = script->get_language()->complete_code(p_code,script->get_path().get_base_dir(),base,r_options,hint);
if (hint!="") {
get_text_edit()->set_code_hint(hint);
- print_line("hint: "+hint.replace(String::chr(0xFFFF),"|"));
}
}
@@ -2316,6 +2315,22 @@ void ScriptEditor::_script_split_dragged(float) {
EditorNode::get_singleton()->save_layout();
}
+void ScriptEditor::_unhandled_input(const InputEvent& p_event) {
+ if (p_event.key.pressed || !is_visible()) return;
+ if (ED_IS_SHORTCUT("script_editor/next_script", p_event)) {
+ int next_tab = script_list->get_current() + 1;
+ next_tab %= script_list->get_item_count();
+ _go_to_tab(script_list->get_item_metadata(next_tab));
+ _update_script_names();
+ }
+ if (ED_IS_SHORTCUT("script_editor/prev_script", p_event)) {
+ int next_tab = script_list->get_current() - 1;
+ next_tab = next_tab >= 0 ? next_tab : script_list->get_item_count() - 1;
+ _go_to_tab(script_list->get_item_metadata(next_tab));
+ _update_script_names();
+ }
+}
+
void ScriptEditor::set_window_layout(Ref<ConfigFile> p_layout) {
if (!bool(EDITOR_DEF("text_editor/restore_scripts_on_load",true))) {
@@ -2598,6 +2613,7 @@ void ScriptEditor::_bind_methods() {
ObjectTypeDB::bind_method("_history_forward",&ScriptEditor::_history_forward);
ObjectTypeDB::bind_method("_history_back",&ScriptEditor::_history_back);
ObjectTypeDB::bind_method("_live_auto_reload_running_scripts",&ScriptEditor::_live_auto_reload_running_scripts);
+ ObjectTypeDB::bind_method("_unhandled_input",&ScriptEditor::_unhandled_input);
}
@@ -2631,6 +2647,10 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
tab_container->set_h_size_flags(SIZE_EXPAND_FILL);
+ ED_SHORTCUT("script_editor/next_script", TTR("Next script"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_GREATER);
+ ED_SHORTCUT("script_editor/prev_script", TTR("Previous script"), KEY_MASK_CMD | KEY_LESS);
+ set_process_unhandled_input(true);
+
file_menu = memnew( MenuButton );
menu_hb->add_child(file_menu);
file_menu->set_text(TTR("File"));
diff --git a/tools/editor/plugins/script_editor_plugin.h b/tools/editor/plugins/script_editor_plugin.h
index 0636190a41..85412087b4 100644
--- a/tools/editor/plugins/script_editor_plugin.h
+++ b/tools/editor/plugins/script_editor_plugin.h
@@ -279,6 +279,8 @@ class ScriptEditor : public VBoxContainer {
void _script_split_dragged(float);
+ void _unhandled_input(const InputEvent& p_event);
+
void _history_forward();
void _history_back();
diff --git a/tools/editor/plugins/shader_graph_editor_plugin.cpp b/tools/editor/plugins/shader_graph_editor_plugin.cpp
index d567c8e9b3..dea2fe4833 100644
--- a/tools/editor/plugins/shader_graph_editor_plugin.cpp
+++ b/tools/editor/plugins/shader_graph_editor_plugin.cpp
@@ -176,7 +176,9 @@ void GraphColorRampEdit::_input_event(const InputEvent& p_event) {
void GraphColorRampEdit::_notification(int p_what){
if (p_what==NOTIFICATION_ENTER_TREE) {
- picker->connect("color_changed",this,"_color_changed");
+ if (!picker->is_connected("color_changed",this,"_color_changed")) {
+ picker->connect("color_changed",this,"_color_changed");
+ }
}
if (p_what==NOTIFICATION_DRAW) {
diff --git a/tools/editor/plugins/sprite_frames_editor_plugin.cpp b/tools/editor/plugins/sprite_frames_editor_plugin.cpp
index 4f59287994..e29a0c8d52 100644
--- a/tools/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/tools/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -31,7 +31,7 @@
#include "io/resource_loader.h"
#include "globals.h"
#include "tools/editor/editor_settings.h"
-
+#include "scene/3d/sprite_3d.h"
@@ -355,6 +355,35 @@ void SpriteFramesEditor::_animation_select() {
}
+
+static void _find_anim_sprites(Node* p_node,List<Node*> *r_nodes,Ref<SpriteFrames> p_sfames) {
+
+ Node *edited = EditorNode::get_singleton()->get_edited_scene();
+ if (!edited)
+ return;
+ if (p_node!=edited && p_node->get_owner()!=edited)
+ return;
+
+ {
+ AnimatedSprite *as = p_node->cast_to<AnimatedSprite>();
+ if (as && as->get_sprite_frames()==p_sfames) {
+ r_nodes->push_back(p_node);
+ }
+ }
+
+ {
+ AnimatedSprite3D *as = p_node->cast_to<AnimatedSprite3D>();
+ if (as && as->get_sprite_frames()==p_sfames) {
+ r_nodes->push_back(p_node);
+ }
+ }
+
+ for(int i=0;i<p_node->get_child_count();i++) {
+ _find_anim_sprites(p_node->get_child(i),r_nodes,p_sfames);
+ }
+
+}
+
void SpriteFramesEditor::_animation_name_edited(){
if (updating)
@@ -381,9 +410,24 @@ void SpriteFramesEditor::_animation_name_edited(){
name=new_name+" "+itos(counter);
}
+ List<Node*> nodes;
+ _find_anim_sprites(EditorNode::get_singleton()->get_edited_scene(),&nodes,Ref<SpriteFrames>(frames));
+
undo_redo->create_action(TTR("Rename Animation"));
undo_redo->add_do_method(frames,"rename_animation",edited_anim,name);
undo_redo->add_undo_method(frames,"rename_animation",name,edited_anim);
+
+ for(List<Node*>::Element *E=nodes.front();E;E=E->next()) {
+
+ String current = E->get()->call("get_animation");
+ if (current!=edited_anim)
+ continue;
+
+ undo_redo->add_do_method(E->get(),"set_animation",name);
+ undo_redo->add_undo_method(E->get(),"set_animation",edited_anim);
+
+ }
+
undo_redo->add_do_method(this,"_update_library");
undo_redo->add_undo_method(this,"_update_library");
@@ -406,12 +450,28 @@ void SpriteFramesEditor::_animation_add(){
name=new_name+" "+itos(counter);
}
+ List<Node*> nodes;
+ _find_anim_sprites(EditorNode::get_singleton()->get_edited_scene(),&nodes,Ref<SpriteFrames>(frames));
+
+
undo_redo->create_action(TTR("Add Animation"));
undo_redo->add_do_method(frames,"add_animation",name);
undo_redo->add_undo_method(frames,"remove_animation",name);
undo_redo->add_do_method(this,"_update_library");
undo_redo->add_undo_method(this,"_update_library");
+
+ for(List<Node*>::Element *E=nodes.front();E;E=E->next()) {
+
+ String current = E->get()->call("get_animation");
+ if (frames->has_animation(current))
+ continue;
+
+ undo_redo->add_do_method(E->get(),"set_animation",name);
+ undo_redo->add_undo_method(E->get(),"set_animation",current);
+
+ }
+
edited_anim=new_name;
undo_redo->commit_action();
@@ -426,6 +486,7 @@ void SpriteFramesEditor::_animation_remove(){
if (!frames->has_animation(edited_anim))
return;
+
undo_redo->create_action(TTR("Remove Animation"));
undo_redo->add_do_method(frames,"remove_animation",edited_anim);
undo_redo->add_undo_method(frames,"add_animation",edited_anim);
diff --git a/tools/editor/plugins/tile_map_editor_plugin.cpp b/tools/editor/plugins/tile_map_editor_plugin.cpp
index d5f85d3333..9d27ac8aa3 100644
--- a/tools/editor/plugins/tile_map_editor_plugin.cpp
+++ b/tools/editor/plugins/tile_map_editor_plugin.cpp
@@ -223,7 +223,7 @@ void TileMapEditor::_update_palette() {
String name;
if (tileset->tile_get_name(E->get())!="") {
- name = tileset->tile_get_name(E->get());
+ name = itos(E->get())+" - "+tileset->tile_get_name(E->get());
} else {
name = "#"+itos(E->get());
}
diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp
index d8814fd50e..dafec397c5 100644
--- a/tools/editor/project_manager.cpp
+++ b/tools/editor/project_manager.cpp
@@ -871,9 +871,6 @@ ProjectManager::ProjectManager() {
HBoxContainer *top_hb = memnew( HBoxContainer);
vb->add_child(top_hb);
- TextureFrame *logo = memnew( TextureFrame );
- logo->set_texture(theme->get_icon("LogoSmall","EditorIcons"));
- //top_hb->add_child( logo );
CenterContainer *ccl = memnew( CenterContainer );
Label *l = memnew( Label );
l->set_text(_MKSTR(VERSION_NAME)+String(" - ")+TTR("Project Manager"));
diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp
index 246785932d..e0dc76e733 100644
--- a/tools/editor/property_editor.cpp
+++ b/tools/editor/property_editor.cpp
@@ -612,6 +612,7 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty
color_picker->set_edit_alpha(hint!=PROPERTY_HINT_COLOR_NO_ALPHA);
color_picker->set_color(v);
set_size( Size2(300*EDSCALE, color_picker->get_combined_minimum_size().height+10*EDSCALE));
+ color_picker->set_focus_on_line_edit();
/*
int ofs=80;
int m=10;
diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp
index ab5c6e5044..d2bc0e112e 100644
--- a/tools/editor/scene_tree_dock.cpp
+++ b/tools/editor/scene_tree_dock.cpp
@@ -1069,6 +1069,8 @@ void SceneTreeDock::_do_reparent(Node* p_new_parent,int p_position_in_parent,Vec
List<Pair<NodePath,NodePath> > path_renames;
+ int inc=0;
+
for(int ni=0;ni<p_nodes.size();ni++) {
//no undo for now, sorry
@@ -1085,12 +1087,16 @@ void SceneTreeDock::_do_reparent(Node* p_new_parent,int p_position_in_parent,Vec
}
+ if (new_parent==node->get_parent() && node->get_index() < p_position_in_parent+ni) {
+ //if child will generate a gap when moved, adjust
+ inc--;
+ }
editor_data->get_undo_redo().add_do_method(node->get_parent(),"remove_child",node);
editor_data->get_undo_redo().add_do_method(new_parent,"add_child",node);
if (p_position_in_parent>=0)
- editor_data->get_undo_redo().add_do_method(new_parent,"move_child",node,p_position_in_parent+ni);
+ editor_data->get_undo_redo().add_do_method(new_parent,"move_child",node,p_position_in_parent+inc);
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
String new_name = new_parent->validate_child_name(node->get_name());
@@ -1122,6 +1128,8 @@ void SceneTreeDock::_do_reparent(Node* p_new_parent,int p_position_in_parent,Vec
editor_data->get_undo_redo().add_undo_method(new_parent,"remove_child",node);
+ inc++;
+
}
//add and move in a second step.. (so old order is preserved)
@@ -1583,7 +1591,7 @@ static Node* _find_last_visible(Node*p_node) {
}
-void SceneTreeDock::_normalize_drop(Node*& to_node, int &to_pos,int p_type) {
+void SceneTreeDock::_normalize_drop(Node*& to_node, int &to_pos, int p_type) {
to_pos=-1;
@@ -1624,6 +1632,7 @@ void SceneTreeDock::_normalize_drop(Node*& to_node, int &to_pos,int p_type) {
//just insert over this node because nothing is above at the same level
to_pos=to_node->get_index();
to_node=to_node->get_parent();
+
}
} else if (p_type==1) {
@@ -1650,12 +1659,13 @@ void SceneTreeDock::_normalize_drop(Node*& to_node, int &to_pos,int p_type) {
break;
}
}
-
if (lower_sibling) {
to_pos=lower_sibling->get_index();
}
to_node=to_node->get_parent();
+
+
}
#if 0
//quite complicated, look for next visible in tree
diff --git a/tools/editor/scene_tree_dock.h b/tools/editor/scene_tree_dock.h
index 60bec9b4f4..51041a235b 100644
--- a/tools/editor/scene_tree_dock.h
+++ b/tools/editor/scene_tree_dock.h
@@ -139,7 +139,7 @@ class SceneTreeDock : public VBoxContainer {
void _fill_path_renames(Vector<StringName> base_path,Vector<StringName> new_base_path,Node * p_node, List<Pair<NodePath,NodePath> > *p_renames);
- void _normalize_drop(Node*& to_node, int &to_pos,int p_type);
+ void _normalize_drop(Node*& to_node, int &to_pos, int p_type);
void _nodes_dragged(Array p_nodes,NodePath p_to,int p_type);
void _files_dropped(Vector<String> p_files,NodePath p_to,int p_type);
diff --git a/tools/editor/scenes_dock.cpp b/tools/editor/scenes_dock.cpp
index cbd7df9d18..fa7c898f91 100644
--- a/tools/editor/scenes_dock.cpp
+++ b/tools/editor/scenes_dock.cpp
@@ -164,12 +164,14 @@ void ScenesDock::_notification(int p_what) {
if (split_mode) {
file_list_vb->hide();
+ tree->set_custom_minimum_size(Size2(0,0));
tree->set_v_size_flags(SIZE_EXPAND_FILL);
button_back->show();
} else {
tree->show();
file_list_vb->show();
+ tree->set_custom_minimum_size(Size2(0,200)*EDSCALE);
tree->set_v_size_flags(SIZE_FILL);
button_back->hide();
if (!EditorFileSystem::get_singleton()->is_scanning()) {
@@ -187,6 +189,7 @@ void ScenesDock::_notification(int p_what) {
initialized=true;
EditorFileSystem::get_singleton()->connect("filesystem_changed",this,"_fs_changed");
+ EditorResourcePreview::get_singleton()->connect("preview_invalidated",this,"_preview_invalidated");
button_reload->set_icon( get_icon("Reload","EditorIcons"));
button_favorite->set_icon( get_icon("Favorites","EditorIcons"));
@@ -661,6 +664,27 @@ void ScenesDock::_go_to_dir(const String& p_dir){
}
+
+void ScenesDock::_preview_invalidated(const String& p_path) {
+
+ if (p_path.get_base_dir()==path && search_box->get_text()==String() && file_list_vb->is_visible()) {
+
+
+ for(int i=0;i<files->get_item_count();i++) {
+
+ if (files->get_item_metadata(i)==p_path) {
+ //re-request preview
+ Array udata;
+ udata.resize(2);
+ udata[0]=i;
+ udata[1]=files->get_item_text(i);
+ EditorResourcePreview::get_singleton()->queue_resource_preview(p_path,this,"_thumbnail_done",udata);
+ break;
+ }
+ }
+ }
+}
+
void ScenesDock::_fs_changed() {
button_hist_prev->set_disabled(history_pos==0);
@@ -1618,6 +1642,9 @@ void ScenesDock::_bind_methods() {
ObjectTypeDB::bind_method(_MD("drop_data_fw"), &ScenesDock::drop_data_fw);
ObjectTypeDB::bind_method(_MD("_files_list_rmb_select"),&ScenesDock::_files_list_rmb_select);
+ ObjectTypeDB::bind_method(_MD("_preview_invalidated"),&ScenesDock::_preview_invalidated);
+
+
ADD_SIGNAL(MethodInfo("instance"));
ADD_SIGNAL(MethodInfo("open"));
@@ -1702,7 +1729,6 @@ ScenesDock::ScenesDock(EditorNode *p_editor) {
tree->set_hide_root(true);
split_box->add_child(tree);
- tree->set_custom_minimum_size(Size2(0,200)*EDSCALE);
tree->set_drag_forwarding(this);
diff --git a/tools/editor/scenes_dock.h b/tools/editor/scenes_dock.h
index ed24711abb..0973fce250 100644
--- a/tools/editor/scenes_dock.h
+++ b/tools/editor/scenes_dock.h
@@ -168,6 +168,8 @@ class ScenesDock : public VBoxContainer {
bool can_drop_data_fw(const Point2& p_point,const Variant& p_data,Control* p_from) const;
void drop_data_fw(const Point2& p_point,const Variant& p_data,Control* p_from);
+ void _preview_invalidated(const String& p_path);
+
protected:
void _notification(int p_what);
static void _bind_methods();