Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
eacb8f04c4
@ -117,7 +117,7 @@ if profile:
|
|||||||
|
|
||||||
opts=Variables(customs, ARGUMENTS)
|
opts=Variables(customs, ARGUMENTS)
|
||||||
opts.Add('target', 'Compile Target (debug/release_debug/release).', "debug")
|
opts.Add('target', 'Compile Target (debug/release_debug/release).', "debug")
|
||||||
opts.Add('bits', 'Compile Target Bits (default/32/64).', "default")
|
opts.Add('bits', 'Compile Target Bits (default/32/64/fat).', "default")
|
||||||
opts.Add('platform','Platform: '+str(platform_list)+'.',"")
|
opts.Add('platform','Platform: '+str(platform_list)+'.',"")
|
||||||
opts.Add('p','Platform (same as platform=).',"")
|
opts.Add('p','Platform (same as platform=).',"")
|
||||||
opts.Add('tools','Build Tools (Including Editor): (yes/no)','yes')
|
opts.Add('tools','Build Tools (Including Editor): (yes/no)','yes')
|
||||||
@ -276,6 +276,8 @@ if selected_platform in platform_list:
|
|||||||
suffix+=".32"
|
suffix+=".32"
|
||||||
elif (env["bits"]=="64"):
|
elif (env["bits"]=="64"):
|
||||||
suffix+=".64"
|
suffix+=".64"
|
||||||
|
elif (env["bits"]=="fat"):
|
||||||
|
suffix+=".fat"
|
||||||
|
|
||||||
suffix+=env.extra_suffix
|
suffix+=env.extra_suffix
|
||||||
|
|
||||||
|
@ -1103,7 +1103,7 @@
|
|||||||
% key
|
% key
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="KEY_AMPERSAND" value="38">
|
<constant name="KEY_AMPERSAND" value="38">
|
||||||
& key
|
& key
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="KEY_APOSTROPHE" value="39">
|
<constant name="KEY_APOSTROPHE" value="39">
|
||||||
' key
|
' key
|
||||||
@ -7268,12 +7268,14 @@
|
|||||||
<argument index="0" name="degrees" type="float">
|
<argument index="0" name="degrees" type="float">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Set rotation of the layer in degree.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_rotationd" qualifiers="const">
|
<method name="get_rotationd" qualifiers="const">
|
||||||
<return type="float">
|
<return type="float">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Get rotation of the layer in degree.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_scale">
|
<method name="set_scale">
|
||||||
@ -12250,18 +12252,21 @@ This approximation makes straight segments between each point, then subdivides t
|
|||||||
<argument index="0" name="dir" type="String">
|
<argument index="0" name="dir" type="String">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Set the current working directory of the file dialog.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_current_file">
|
<method name="set_current_file">
|
||||||
<argument index="0" name="file" type="String">
|
<argument index="0" name="file" type="String">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Set the current selected file name of the file dialog.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_current_path">
|
<method name="set_current_path">
|
||||||
<argument index="0" name="path" type="String">
|
<argument index="0" name="path" type="String">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Set the current selected file path of the file dialog.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_mode">
|
<method name="set_mode">
|
||||||
@ -12282,6 +12287,7 @@ This approximation makes straight segments between each point, then subdivides t
|
|||||||
<return type="VBoxContainer">
|
<return type="VBoxContainer">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Return the vertical box container of the dialog, custom controls can be added to it.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_access">
|
<method name="set_access">
|
||||||
@ -12314,6 +12320,7 @@ This approximation makes straight segments between each point, then subdivides t
|
|||||||
</method>
|
</method>
|
||||||
<method name="invalidate">
|
<method name="invalidate">
|
||||||
<description>
|
<description>
|
||||||
|
Invalidate and update the current dialog content list.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
@ -12351,6 +12358,7 @@ This approximation makes straight segments between each point, then subdivides t
|
|||||||
The dialog functions as a folder selector, disallowing the selection of any file.
|
The dialog functions as a folder selector, disallowing the selection of any file.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="MODE_OPEN_ANY" value="3">
|
<constant name="MODE_OPEN_ANY" value="3">
|
||||||
|
The dialog allows the selection of a file or a directory.
|
||||||
</constant>
|
</constant>
|
||||||
<constant name="MODE_SAVE_FILE" value="4">
|
<constant name="MODE_SAVE_FILE" value="4">
|
||||||
The dialog will warn when a file exists.
|
The dialog will warn when a file exists.
|
||||||
@ -21323,24 +21331,28 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
|
|||||||
<argument index="0" name="enabled" type="bool">
|
<argument index="0" name="enabled" type="bool">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Set whether the window is minimized.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="is_window_minimized" qualifiers="const">
|
<method name="is_window_minimized" qualifiers="const">
|
||||||
<return type="bool">
|
<return type="bool">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Return true if the window is minimized.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_window_maximized">
|
<method name="set_window_maximized">
|
||||||
<argument index="0" name="enabled" type="bool">
|
<argument index="0" name="enabled" type="bool">
|
||||||
</argument>
|
</argument>
|
||||||
<description>
|
<description>
|
||||||
|
Set the window size to maximized.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="is_window_maximized" qualifiers="const">
|
<method name="is_window_maximized" qualifiers="const">
|
||||||
<return type="bool">
|
<return type="bool">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Return true if the window is maximized.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="set_borderless_window">
|
<method name="set_borderless_window">
|
||||||
@ -21578,6 +21590,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
|
|||||||
<return type="int">
|
<return type="int">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Return the current unix timestamp.
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_datetime_from_unix_time" qualifiers="const">
|
<method name="get_datetime_from_unix_time" qualifiers="const">
|
||||||
@ -21740,6 +21753,7 @@ Example: (content-length:12), (Content-Type:application/json; charset=UTF-8)
|
|||||||
<return type="String">
|
<return type="String">
|
||||||
</return>
|
</return>
|
||||||
<description>
|
<description>
|
||||||
|
Return the absolute directory path of user data path([user://]).
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
<method name="get_system_dir" qualifiers="const">
|
<method name="get_system_dir" qualifiers="const">
|
||||||
@ -41487,6 +41501,17 @@ This method controls whether the position between two cached points is interpola
|
|||||||
<description>
|
<description>
|
||||||
</description>
|
</description>
|
||||||
</method>
|
</method>
|
||||||
|
<method name="get_linear_velocity" qualifiers="const">
|
||||||
|
<return type="Vector3">
|
||||||
|
</return>
|
||||||
|
<description>
|
||||||
|
Returns the VehicleBody's velocity vector. To get the absolute speed in scalar value, get the length of the return vector in pixels/second. Example:
|
||||||
|
[codeblock]
|
||||||
|
# vehicle is an instance of VehicleBody
|
||||||
|
var speed = vehicle.get_linear_velocity().length()
|
||||||
|
[/codeblock]
|
||||||
|
</description>
|
||||||
|
</method>
|
||||||
</methods>
|
</methods>
|
||||||
<constants>
|
<constants>
|
||||||
</constants>
|
</constants>
|
||||||
|
@ -1,9 +1,12 @@
|
|||||||
Import('env')
|
Import('env')
|
||||||
|
|
||||||
|
env_drivers = env.Clone()
|
||||||
|
|
||||||
env.drivers_sources=[]
|
env.drivers_sources=[]
|
||||||
#env.add_source_files(env.drivers_sources,"*.cpp")
|
#env.add_source_files(env.drivers_sources,"*.cpp")
|
||||||
env.Append(CPPPATH=["vorbis"])
|
env_drivers.Append(CPPPATH=["vorbis"])
|
||||||
Export('env')
|
|
||||||
|
Export('env_drivers')
|
||||||
|
|
||||||
SConscript('unix/SCsub');
|
SConscript('unix/SCsub');
|
||||||
SConscript('alsa/SCsub');
|
SConscript('alsa/SCsub');
|
||||||
@ -14,12 +17,9 @@ SConscript('gl_context/SCsub');
|
|||||||
SConscript('pnm/SCsub');
|
SConscript('pnm/SCsub');
|
||||||
|
|
||||||
if (env['openssl']!='no'):
|
if (env['openssl']!='no'):
|
||||||
env_ssl = env.Clone()
|
env_drivers.Append(CPPFLAGS=['-DOPENSSL_ENABLED']);
|
||||||
Export('env_ssl')
|
|
||||||
|
|
||||||
env_ssl.Append(CPPFLAGS=['-DOPENSSL_ENABLED']);
|
|
||||||
if (env['openssl']=="builtin"):
|
if (env['openssl']=="builtin"):
|
||||||
env_ssl.Append(CPPPATH=['#drivers/builtin_openssl2'])
|
env_drivers.Append(CPPPATH=['#drivers/builtin_openssl2'])
|
||||||
SConscript("builtin_openssl2/SCsub");
|
SConscript("builtin_openssl2/SCsub");
|
||||||
|
|
||||||
SConscript('openssl/SCsub')
|
SConscript('openssl/SCsub')
|
||||||
@ -84,14 +84,14 @@ if (env.split_drivers): #split drivers, this used to be needed for windows until
|
|||||||
base = string.join(fname.split("/")[:2], "/")
|
base = string.join(fname.split("/")[:2], "/")
|
||||||
if base != cur_base and len(list) > max_src:
|
if base != cur_base and len(list) > max_src:
|
||||||
if num > 0:
|
if num > 0:
|
||||||
lib = env.Library("drivers"+str(num), list)
|
lib = env_drivers.Library("drivers"+str(num), list)
|
||||||
lib_list.append(lib)
|
lib_list.append(lib)
|
||||||
list = []
|
list = []
|
||||||
num = num+1
|
num = num+1
|
||||||
cur_base = base
|
cur_base = base
|
||||||
list.append(f)
|
list.append(f)
|
||||||
|
|
||||||
lib = env.Library("drivers"+str(num), list)
|
lib = env_drivers.Library("drivers"+str(num), list)
|
||||||
lib_list.append(lib)
|
lib_list.append(lib)
|
||||||
|
|
||||||
if len(lib_list) > 0:
|
if len(lib_list) > 0:
|
||||||
@ -99,15 +99,15 @@ if (env.split_drivers): #split drivers, this used to be needed for windows until
|
|||||||
if os.name=='posix' and sys.platform=='msys':
|
if os.name=='posix' and sys.platform=='msys':
|
||||||
env.Replace(ARFLAGS=['rcsT'])
|
env.Replace(ARFLAGS=['rcsT'])
|
||||||
|
|
||||||
lib = env.Library("drivers_collated", lib_list)
|
lib = env_drivers.Library("drivers_collated", lib_list)
|
||||||
lib_list = [lib]
|
lib_list = [lib]
|
||||||
|
|
||||||
drivers_base=[]
|
drivers_base=[]
|
||||||
env.add_source_files(drivers_base,"*.cpp")
|
env_drivers.add_source_files(drivers_base,"*.cpp")
|
||||||
lib_list.insert(0, env.Library("drivers", drivers_base))
|
lib_list.insert(0, env_drivers.Library("drivers", drivers_base))
|
||||||
|
|
||||||
env.Prepend(LIBS=lib_list)
|
env.Prepend(LIBS=lib_list)
|
||||||
else:
|
else:
|
||||||
env.add_source_files(env.drivers_sources,"*.cpp")
|
env_drivers.add_source_files(env.drivers_sources,"*.cpp")
|
||||||
lib = env.Library("drivers",env.drivers_sources)
|
lib = env_drivers.Library("drivers",env.drivers_sources)
|
||||||
env.Prepend(LIBS=[lib])
|
env.Prepend(LIBS=[lib])
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
Import('env')
|
Import('env')
|
||||||
Import('env_ssl')
|
Import('env_drivers')
|
||||||
|
|
||||||
openssl_sources = [
|
openssl_sources = [
|
||||||
"ssl/t1_lib.c",
|
"ssl/t1_lib.c",
|
||||||
@ -642,17 +642,17 @@ openssl_sources = [
|
|||||||
|
|
||||||
#env.drivers_sources+=openssl_sources
|
#env.drivers_sources+=openssl_sources
|
||||||
|
|
||||||
env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto"])
|
env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/crypto"])
|
||||||
env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/openssl"])
|
env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/openssl"])
|
||||||
env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/evp"])
|
env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/evp"])
|
||||||
env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/asn1"])
|
env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/asn1"])
|
||||||
env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/modes"])
|
env_drivers.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/modes"])
|
||||||
#env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/store"])
|
#env_ssl.Append(CPPPATH=["#drivers/builtin_openssl2/crypto/store"])
|
||||||
env_ssl.Append(CPPFLAGS=["-DOPENSSL_NO_ASM","-DOPENSSL_THREADS","-DL_ENDIAN"])
|
env_drivers.Append(CPPFLAGS=["-DOPENSSL_NO_ASM","-DOPENSSL_THREADS","-DL_ENDIAN"])
|
||||||
|
|
||||||
# Workaround for compilation error with GCC/Clang when -Werror is too greedy (GH-4517)
|
# Workaround for compilation error with GCC/Clang when -Werror is too greedy (GH-4517)
|
||||||
import os
|
import os
|
||||||
if not (os.name=="nt" and os.getenv("VSINSTALLDIR")!=None): # not Windows and not MSVC
|
if not (os.name=="nt" and os.getenv("VSINSTALLDIR")!=None): # not Windows and not MSVC
|
||||||
env_ssl.Append(CFLAGS=["-Wno-error=implicit-function-declaration"])
|
env_drivers.Append(CFLAGS=["-Wno-error=implicit-function-declaration"])
|
||||||
|
|
||||||
env_ssl.add_source_files(env.drivers_sources,openssl_sources)
|
env_drivers.add_source_files(env.drivers_sources,openssl_sources)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Import('env_ssl')
|
Import('env_drivers')
|
||||||
Import('env')
|
Import('env')
|
||||||
|
|
||||||
env_ssl.add_source_files(env.drivers_sources,"*.cpp")
|
env_drivers.add_source_files(env.drivers_sources,"*.cpp")
|
||||||
env_ssl.add_source_files(env.drivers_sources,"*.c")
|
env_drivers.add_source_files(env.drivers_sources,"*.c")
|
||||||
|
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
Import('env')
|
Import('env')
|
||||||
|
Import('env_drivers')
|
||||||
|
|
||||||
|
|
||||||
png_sources = [
|
png_sources = [
|
||||||
@ -25,7 +26,7 @@ png_sources = [
|
|||||||
# Currently .ASM filter_neon.S does not compile on NT.
|
# Currently .ASM filter_neon.S does not compile on NT.
|
||||||
import os
|
import os
|
||||||
if ("neon_enabled" in env and env["neon_enabled"]) and os.name!="nt":
|
if ("neon_enabled" in env and env["neon_enabled"]) and os.name!="nt":
|
||||||
env.Append(CPPFLAGS=["-DPNG_ARM_NEON_OPT=2"])
|
env_drivers.Append(CPPFLAGS=["-DPNG_ARM_NEON_OPT=2"])
|
||||||
env_neon = env.Clone();
|
env_neon = env.Clone();
|
||||||
if "S_compiler" in env:
|
if "S_compiler" in env:
|
||||||
env_neon['CC'] = env['S_compiler']
|
env_neon['CC'] = env['S_compiler']
|
||||||
@ -33,7 +34,7 @@ if ("neon_enabled" in env and env["neon_enabled"]) and os.name!="nt":
|
|||||||
png_sources.append(env_neon.Object("#drivers/png/arm/arm_init.c"))
|
png_sources.append(env_neon.Object("#drivers/png/arm/arm_init.c"))
|
||||||
png_sources.append(env_neon.Object("#drivers/png/arm/filter_neon.S"))
|
png_sources.append(env_neon.Object("#drivers/png/arm/filter_neon.S"))
|
||||||
else:
|
else:
|
||||||
env.Append(CPPFLAGS=["-DPNG_ARM_NEON_OPT=0"])
|
env_drivers.Append(CPPFLAGS=["-DPNG_ARM_NEON_OPT=0"])
|
||||||
|
|
||||||
env.drivers_sources+=png_sources
|
env.drivers_sources+=png_sources
|
||||||
|
|
||||||
|
@ -21,7 +21,6 @@ def get_opts():
|
|||||||
|
|
||||||
return [
|
return [
|
||||||
('ANDROID_NDK_ROOT', 'the path to Android NDK', os.environ.get("ANDROID_NDK_ROOT", 0)),
|
('ANDROID_NDK_ROOT', 'the path to Android NDK', os.environ.get("ANDROID_NDK_ROOT", 0)),
|
||||||
('NDK_TOOLCHAIN', 'toolchain to use for the NDK',"arm-eabi-4.4.0"),
|
|
||||||
('NDK_TARGET', 'toolchain to use for the NDK',os.environ.get("NDK_TARGET", "arm-linux-androideabi-4.9")),
|
('NDK_TARGET', 'toolchain to use for the NDK',os.environ.get("NDK_TARGET", "arm-linux-androideabi-4.9")),
|
||||||
('NDK_TARGET_X86', 'toolchain to use for the NDK x86',os.environ.get("NDK_TARGET_X86", "x86-4.9")),
|
('NDK_TARGET_X86', 'toolchain to use for the NDK x86',os.environ.get("NDK_TARGET_X86", "x86-4.9")),
|
||||||
('ndk_platform', 'compile for platform: (android-<api> , example: android-15)',"android-15"),
|
('ndk_platform', 'compile for platform: (android-<api> , example: android-15)',"android-15"),
|
||||||
|
@ -68,9 +68,12 @@ def configure(env):
|
|||||||
if (env["bits"]=="64"):
|
if (env["bits"]=="64"):
|
||||||
env.Append(CCFLAGS=['-arch', 'x86_64'])
|
env.Append(CCFLAGS=['-arch', 'x86_64'])
|
||||||
env.Append(LINKFLAGS=['-arch', 'x86_64'])
|
env.Append(LINKFLAGS=['-arch', 'x86_64'])
|
||||||
else:
|
elif (env["bits"]=="32"):
|
||||||
env.Append(CCFLAGS=['-arch', 'i386'])
|
env.Append(CCFLAGS=['-arch', 'i386'])
|
||||||
env.Append(LINKFLAGS=['-arch', 'i386'])
|
env.Append(LINKFLAGS=['-arch', 'i386'])
|
||||||
|
else:
|
||||||
|
env.Append(CCFLAGS=['-arch', 'i386', '-arch', 'x86_64'])
|
||||||
|
env.Append(LINKFLAGS=['-arch', 'i386', '-arch', 'x86_64'])
|
||||||
else:
|
else:
|
||||||
#osxcross build
|
#osxcross build
|
||||||
root=os.environ.get("OSXCROSS_ROOT",0)
|
root=os.environ.get("OSXCROSS_ROOT",0)
|
||||||
|
@ -62,7 +62,7 @@ String CanvasModulate::get_configuration_warning() const {
|
|||||||
get_tree()->get_nodes_in_group("_canvas_modulate_"+itos(get_canvas().get_id()),&nodes);
|
get_tree()->get_nodes_in_group("_canvas_modulate_"+itos(get_canvas().get_id()),&nodes);
|
||||||
|
|
||||||
if (nodes.size()>1) {
|
if (nodes.size()>1) {
|
||||||
return TTR("Only one visible CanvasModulate is allowed per scene (or set of instanced scenes). The first one created will work, while the rest will be ignored.");
|
return TTR("Only one visible CanvasModulate is allowed per scene (or set of instanced scenes). The first created one will work, while the rest will be ignored.");
|
||||||
}
|
}
|
||||||
|
|
||||||
return String();
|
return String();
|
||||||
|
@ -16,7 +16,7 @@ public:
|
|||||||
void set_color(const Color& p_color);
|
void set_color(const Color& p_color);
|
||||||
Color get_color() const;
|
Color get_color() const;
|
||||||
|
|
||||||
String CanvasModulate::get_configuration_warning() const;
|
String get_configuration_warning() const;
|
||||||
|
|
||||||
CanvasModulate();
|
CanvasModulate();
|
||||||
~CanvasModulate();
|
~CanvasModulate();
|
||||||
|
@ -243,7 +243,7 @@ String PathFollow2D::get_configuration_warning() const {
|
|||||||
return String();
|
return String();
|
||||||
|
|
||||||
if (!get_parent() || !get_parent()->cast_to<Path2D>()) {
|
if (!get_parent() || !get_parent()->cast_to<Path2D>()) {
|
||||||
return TTR("PathFolow2D only works when set as a child of a Path2D node.");
|
return TTR("PathFollow2D only works when set as a child of a Path2D node.");
|
||||||
}
|
}
|
||||||
|
|
||||||
return String();
|
return String();
|
||||||
|
@ -540,7 +540,7 @@ String ViewportSprite::get_configuration_warning() const {
|
|||||||
Viewport *vp = n->cast_to<Viewport>();
|
Viewport *vp = n->cast_to<Viewport>();
|
||||||
if (!vp->is_set_as_render_target()) {
|
if (!vp->is_set_as_render_target()) {
|
||||||
|
|
||||||
return TTR("The Viewport set in the path property must be set as 'render taget' in order for this sprite to work");
|
return TTR("The Viewport set in the path property must be set as 'render target' in order for this sprite to work.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -347,11 +347,11 @@ void VisibilityEnabler2D::_node_removed(Node* p_node) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
String VisibilityEnabler2D::get_configuration_warning() const {
|
String VisibilityEnabler2D::get_configuration_warning() const {
|
||||||
|
#ifdef TOOLS_ENABLED
|
||||||
if (is_inside_tree() && get_parent() && (get_parent()->get_filename()==String() && get_parent()!=get_tree()->get_edited_scene_root())) {
|
if (is_inside_tree() && get_parent() && (get_parent()->get_filename()==String() && get_parent()!=get_tree()->get_edited_scene_root())) {
|
||||||
return TTR("VisibilityEnable2D works best when used with the edited scene root directly as parent.");
|
return TTR("VisibilityEnable2D works best when used with the edited scene root directly as parent.");
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
return String();
|
return String();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -936,7 +936,7 @@ void VehicleBody::_direct_state_changed(Object *p_state) {
|
|||||||
wheel.m_deltaRotation *= real_t(0.99);//damping of rotation when not in contact
|
wheel.m_deltaRotation *= real_t(0.99);//damping of rotation when not in contact
|
||||||
|
|
||||||
}
|
}
|
||||||
|
linear_velocity = s->get_linear_velocity();
|
||||||
}
|
}
|
||||||
|
|
||||||
void VehicleBody::set_mass(real_t p_mass) {
|
void VehicleBody::set_mass(real_t p_mass) {
|
||||||
@ -990,6 +990,10 @@ float VehicleBody::get_steering() const{
|
|||||||
return m_steeringValue;
|
return m_steeringValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Vector3 VehicleBody::get_linear_velocity()
|
||||||
|
{
|
||||||
|
return linear_velocity;
|
||||||
|
}
|
||||||
|
|
||||||
void VehicleBody::_bind_methods(){
|
void VehicleBody::_bind_methods(){
|
||||||
|
|
||||||
@ -1008,6 +1012,8 @@ void VehicleBody::_bind_methods(){
|
|||||||
ObjectTypeDB::bind_method(_MD("set_steering","steering"),&VehicleBody::set_steering);
|
ObjectTypeDB::bind_method(_MD("set_steering","steering"),&VehicleBody::set_steering);
|
||||||
ObjectTypeDB::bind_method(_MD("get_steering"),&VehicleBody::get_steering);
|
ObjectTypeDB::bind_method(_MD("get_steering"),&VehicleBody::get_steering);
|
||||||
|
|
||||||
|
ObjectTypeDB::bind_method(_MD("get_linear_velocity"),&VehicleBody::get_linear_velocity);
|
||||||
|
|
||||||
ObjectTypeDB::bind_method(_MD("_direct_state_changed"),&VehicleBody::_direct_state_changed);
|
ObjectTypeDB::bind_method(_MD("_direct_state_changed"),&VehicleBody::_direct_state_changed);
|
||||||
|
|
||||||
ADD_PROPERTY( PropertyInfo(Variant::REAL,"motion/engine_force",PROPERTY_HINT_RANGE,"0.00,1024.0,0.01"),_SCS("set_engine_force"),_SCS("get_engine_force"));
|
ADD_PROPERTY( PropertyInfo(Variant::REAL,"motion/engine_force",PROPERTY_HINT_RANGE,"0.00,1024.0,0.01"),_SCS("set_engine_force"),_SCS("get_engine_force"));
|
||||||
|
@ -178,6 +178,7 @@ public:
|
|||||||
void set_steering(float p_steering);
|
void set_steering(float p_steering);
|
||||||
float get_steering() const;
|
float get_steering() const;
|
||||||
|
|
||||||
|
Vector3 get_linear_velocity();
|
||||||
|
|
||||||
VehicleBody();
|
VehicleBody();
|
||||||
};
|
};
|
||||||
|
@ -1842,6 +1842,8 @@ void Viewport::_gui_input_event(InputEvent p_event) {
|
|||||||
if (gui.mouse_over)
|
if (gui.mouse_over)
|
||||||
gui.mouse_over->notification(Control::NOTIFICATION_MOUSE_EXIT);
|
gui.mouse_over->notification(Control::NOTIFICATION_MOUSE_EXIT);
|
||||||
|
|
||||||
|
_gui_cancel_tooltip();
|
||||||
|
|
||||||
if (over)
|
if (over)
|
||||||
over->notification(Control::NOTIFICATION_MOUSE_ENTER);
|
over->notification(Control::NOTIFICATION_MOUSE_ENTER);
|
||||||
|
|
||||||
@ -1849,8 +1851,6 @@ void Viewport::_gui_input_event(InputEvent p_event) {
|
|||||||
|
|
||||||
gui.mouse_over=over;
|
gui.mouse_over=over;
|
||||||
|
|
||||||
_gui_cancel_tooltip();
|
|
||||||
|
|
||||||
if (gui.drag_preview) {
|
if (gui.drag_preview) {
|
||||||
gui.drag_preview->set_pos(mpos);
|
gui.drag_preview->set_pos(mpos);
|
||||||
}
|
}
|
||||||
@ -2407,7 +2407,7 @@ String Viewport::get_configuration_warning() const {
|
|||||||
|
|
||||||
if (get_parent() && !get_parent()->cast_to<Control>() && !render_target) {
|
if (get_parent() && !get_parent()->cast_to<Control>() && !render_target) {
|
||||||
|
|
||||||
return TTR("This viewport is not set as render target. If you intend for it to display it's contents directly to the screen, make it a child of a Control so it can obtain a size. Otherwise, make it a RenderTarget and assign it's internal texture to some node for display.");
|
return TTR("This viewport is not set as render target. If you intend for it to display its contents directly to the screen, make it a child of a Control so it can obtain a size. Otherwise, make it a RenderTarget and assign its internal texture to some node for display.");
|
||||||
}
|
}
|
||||||
|
|
||||||
return String();
|
return String();
|
||||||
|
@ -1085,7 +1085,7 @@ EditorAddonLibrary::EditorAddonLibrary() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
search_hb->add_child( memnew( Label(TTR("Search: "))));
|
search_hb->add_child( memnew( Label(TTR("Search:")+" ")));
|
||||||
filter =memnew( LineEdit );
|
filter =memnew( LineEdit );
|
||||||
search_hb->add_child(filter);
|
search_hb->add_child(filter);
|
||||||
filter->set_h_size_flags(SIZE_EXPAND_FILL);
|
filter->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||||
@ -1112,7 +1112,7 @@ EditorAddonLibrary::EditorAddonLibrary() {
|
|||||||
HBoxContainer *search_hb2 = memnew( HBoxContainer );
|
HBoxContainer *search_hb2 = memnew( HBoxContainer );
|
||||||
library_main->add_child(search_hb2);
|
library_main->add_child(search_hb2);
|
||||||
|
|
||||||
search_hb2->add_child( memnew( Label("Sort: ")));
|
search_hb2->add_child( memnew( Label(TTR("Sort:")+" ")));
|
||||||
sort = memnew( OptionButton );
|
sort = memnew( OptionButton );
|
||||||
for(int i=0;i<SORT_MAX;i++) {
|
for(int i=0;i<SORT_MAX;i++) {
|
||||||
sort->add_item(sort_text[i]);
|
sort->add_item(sort_text[i]);
|
||||||
@ -1123,26 +1123,26 @@ EditorAddonLibrary::EditorAddonLibrary() {
|
|||||||
sort->set_h_size_flags(SIZE_EXPAND_FILL);
|
sort->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||||
|
|
||||||
reverse = memnew( CheckBox);
|
reverse = memnew( CheckBox);
|
||||||
reverse->set_text("Reverse");
|
reverse->set_text(TTR("Reverse"));
|
||||||
search_hb2->add_child(reverse);
|
search_hb2->add_child(reverse);
|
||||||
|
|
||||||
search_hb2->add_child(memnew(VSeparator));
|
search_hb2->add_child(memnew(VSeparator));
|
||||||
|
|
||||||
//search_hb2->add_spacer();
|
//search_hb2->add_spacer();
|
||||||
|
|
||||||
search_hb2->add_child( memnew( Label("Category: ")));
|
search_hb2->add_child( memnew( Label(TTR("Category:")+" ")));
|
||||||
categories = memnew( OptionButton );
|
categories = memnew( OptionButton );
|
||||||
categories->add_item("All");
|
categories->add_item(TTR("All"));
|
||||||
search_hb2->add_child(categories);
|
search_hb2->add_child(categories);
|
||||||
categories->set_h_size_flags(SIZE_EXPAND_FILL);
|
categories->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||||
//search_hb2->add_spacer();
|
//search_hb2->add_spacer();
|
||||||
|
|
||||||
search_hb2->add_child(memnew(VSeparator));
|
search_hb2->add_child(memnew(VSeparator));
|
||||||
|
|
||||||
search_hb2->add_child( memnew( Label("Site: ")));
|
search_hb2->add_child( memnew( Label(TTR("Site:")+" ")));
|
||||||
repository = memnew( OptionButton );
|
repository = memnew( OptionButton );
|
||||||
|
|
||||||
repository->add_item(TTR("Godot"));
|
repository->add_item("Godot");
|
||||||
search_hb2->add_child(repository);
|
search_hb2->add_child(repository);
|
||||||
repository->set_h_size_flags(SIZE_EXPAND_FILL);
|
repository->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||||
|
|
||||||
@ -1232,7 +1232,7 @@ EditorAddonLibrary::EditorAddonLibrary() {
|
|||||||
asset_open = memnew( EditorFileDialog );
|
asset_open = memnew( EditorFileDialog );
|
||||||
|
|
||||||
asset_open->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
|
asset_open->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
|
||||||
asset_open->add_filter("*.zip ; Assets ZIP File");
|
asset_open->add_filter("*.zip ; "+TTR("Assets ZIP File"));
|
||||||
asset_open->set_mode(EditorFileDialog::MODE_OPEN_FILE);
|
asset_open->set_mode(EditorFileDialog::MODE_OPEN_FILE);
|
||||||
add_child(asset_open);
|
add_child(asset_open);
|
||||||
asset_open->connect("file_selected",this,"_asset_file_selected");
|
asset_open->connect("file_selected",this,"_asset_file_selected");
|
||||||
|
@ -889,7 +889,7 @@ void AnimationKeyEditor::_menu_track(int p_type) {
|
|||||||
case TRACK_MENU_SET_ALL_TRANS_OUTIN: t=-2.0; break;
|
case TRACK_MENU_SET_ALL_TRANS_OUTIN: t=-2.0; break;
|
||||||
}
|
}
|
||||||
|
|
||||||
undo_redo->create_action(TTR("Set Transitions to: ")+rtos(t));
|
undo_redo->create_action(TTR("Set Transitions to:")+" "+rtos(t));
|
||||||
|
|
||||||
for(Map<SelectedKey,KeyInfo>::Element *E=selection.back();E;E=E->prev()) {
|
for(Map<SelectedKey,KeyInfo>::Element *E=selection.back();E;E=E->prev()) {
|
||||||
|
|
||||||
@ -2096,7 +2096,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
|
|||||||
/*
|
/*
|
||||||
if (ofsx < remove_icon->get_width()) {
|
if (ofsx < remove_icon->get_width()) {
|
||||||
|
|
||||||
undo_redo->create_action(TTR("Remove Anim Track"));
|
undo_redo->create_action("Remove Anim Track");
|
||||||
undo_redo->add_do_method(animation.ptr(),"remove_track",idx);
|
undo_redo->add_do_method(animation.ptr(),"remove_track",idx);
|
||||||
undo_redo->add_undo_method(animation.ptr(),"add_track",animation->track_get_type(idx),idx);
|
undo_redo->add_undo_method(animation.ptr(),"add_track",animation->track_get_type(idx),idx);
|
||||||
undo_redo->add_undo_method(animation.ptr(),"track_set_path",idx,animation->track_get_path(idx));
|
undo_redo->add_undo_method(animation.ptr(),"track_set_path",idx,animation->track_get_path(idx));
|
||||||
@ -2129,7 +2129,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
|
|||||||
if (ofsx < move_down_icon->get_width()) {
|
if (ofsx < move_down_icon->get_width()) {
|
||||||
|
|
||||||
if (idx < animation->get_track_count() -1) {
|
if (idx < animation->get_track_count() -1) {
|
||||||
undo_redo->create_action(TTR("Move Anim Track Down"));
|
undo_redo->create_action("Move Anim Track Down");
|
||||||
undo_redo->add_do_method(animation.ptr(),"track_move_up",idx);
|
undo_redo->add_do_method(animation.ptr(),"track_move_up",idx);
|
||||||
undo_redo->add_undo_method(animation.ptr(),"track_move_down",idx+1);
|
undo_redo->add_undo_method(animation.ptr(),"track_move_down",idx+1);
|
||||||
undo_redo->commit_action();
|
undo_redo->commit_action();
|
||||||
@ -2142,7 +2142,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
|
|||||||
if (ofsx < move_up_icon->get_width()) {
|
if (ofsx < move_up_icon->get_width()) {
|
||||||
|
|
||||||
if (idx >0) {
|
if (idx >0) {
|
||||||
undo_redo->create_action(TTR("Move Anim Track Up"));
|
undo_redo->create_action("Move Anim Track Up");
|
||||||
undo_redo->add_do_method(animation.ptr(),"track_move_down",idx);
|
undo_redo->add_do_method(animation.ptr(),"track_move_down",idx);
|
||||||
undo_redo->add_undo_method(animation.ptr(),"track_move_up",idx-1);
|
undo_redo->add_undo_method(animation.ptr(),"track_move_up",idx-1);
|
||||||
undo_redo->commit_action();
|
undo_redo->commit_action();
|
||||||
@ -2893,7 +2893,7 @@ void AnimationKeyEditor::_notification(int p_what) {
|
|||||||
optimize_dialog->connect("confirmed",this,"_animation_optimize");
|
optimize_dialog->connect("confirmed",this,"_animation_optimize");
|
||||||
|
|
||||||
menu_track->get_popup()->add_child(tpp);
|
menu_track->get_popup()->add_child(tpp);
|
||||||
//menu_track->get_popup()->add_submenu_item(TTR("Set Transitions.."),"Transitions");
|
//menu_track->get_popup()->add_submenu_item("Set Transitions..","Transitions");
|
||||||
//menu_track->get_popup()->add_separator();
|
//menu_track->get_popup()->add_separator();
|
||||||
menu_track->get_popup()->add_item(TTR("Optimize Animation"),TRACK_MENU_OPTIMIZE);
|
menu_track->get_popup()->add_item(TTR("Optimize Animation"),TRACK_MENU_OPTIMIZE);
|
||||||
menu_track->get_popup()->add_item(TTR("Clean-Up Animation"),TRACK_MENU_CLEAN_UP);
|
menu_track->get_popup()->add_item(TTR("Clean-Up Animation"),TRACK_MENU_CLEAN_UP);
|
||||||
@ -3113,9 +3113,9 @@ void AnimationKeyEditor::_query_insert(const InsertData& p_id) {
|
|||||||
if (bool(EDITOR_DEF("animation/confirm_insert_track",true))) {
|
if (bool(EDITOR_DEF("animation/confirm_insert_track",true))) {
|
||||||
//potential new key, does not exist
|
//potential new key, does not exist
|
||||||
if (insert_data.size()==1)
|
if (insert_data.size()==1)
|
||||||
insert_confirm->set_text(TTR("Create NEW track for ")+p_id.query+TTR(" and insert key?"));
|
insert_confirm->set_text(vformat(TTR("Create NEW track for %s and insert key?"),p_id.query));
|
||||||
else
|
else
|
||||||
insert_confirm->set_text(TTR("Create ")+itos(insert_data.size())+TTR(" NEW tracks and insert keys?"));
|
insert_confirm->set_text(vformat(TTR("Create %d NEW tracks and insert keys?"),insert_data.size()));
|
||||||
|
|
||||||
insert_confirm->get_ok()->set_text(TTR("Create"));
|
insert_confirm->get_ok()->set_text(TTR("Create"));
|
||||||
insert_confirm->popup_centered_minsize();
|
insert_confirm->popup_centered_minsize();
|
||||||
@ -3818,7 +3818,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
|
|||||||
hb->add_child( memnew( VSeparator ) );
|
hb->add_child( memnew( VSeparator ) );
|
||||||
|
|
||||||
Label *l = memnew( Label );
|
Label *l = memnew( Label );
|
||||||
l->set_text(TTR("Len(s):"));
|
l->set_text(TTR("Length (s):"));
|
||||||
hb->add_child(l);
|
hb->add_child(l);
|
||||||
|
|
||||||
length = memnew( SpinBox );
|
length = memnew( SpinBox );
|
||||||
@ -3833,7 +3833,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
|
|||||||
length->connect("value_changed",this,"_animation_len_changed");
|
length->connect("value_changed",this,"_animation_len_changed");
|
||||||
|
|
||||||
l = memnew( Label );
|
l = memnew( Label );
|
||||||
l->set_text(TTR("Step(s):"));
|
l->set_text(TTR("Step (s):"));
|
||||||
hb->add_child(l);
|
hb->add_child(l);
|
||||||
|
|
||||||
step = memnew( SpinBox );
|
step = memnew( SpinBox );
|
||||||
@ -3929,7 +3929,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
|
|||||||
|
|
||||||
/*keying = memnew( Button );
|
/*keying = memnew( Button );
|
||||||
keying->set_toggle_mode(true);
|
keying->set_toggle_mode(true);
|
||||||
//keying->set_text(TTR("Keys"));
|
//keying->set_text("Keys");
|
||||||
keying->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_END,60);
|
keying->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_END,60);
|
||||||
keying->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_END,10);
|
keying->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_END,10);
|
||||||
keying->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_BEGIN,55);
|
keying->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_BEGIN,55);
|
||||||
@ -3939,7 +3939,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
/* l = memnew( Label );
|
/* l = memnew( Label );
|
||||||
l->set_text(TTR("Base: "));
|
l->set_text("Base: ");
|
||||||
l->set_pos(Point2(0,3));
|
l->set_pos(Point2(0,3));
|
||||||
// dr_panel->add_child(l);*/
|
// dr_panel->add_child(l);*/
|
||||||
|
|
||||||
@ -4089,10 +4089,10 @@ AnimationKeyEditor::AnimationKeyEditor() {
|
|||||||
cleanup_vb->add_child(cleanup_tracks);
|
cleanup_vb->add_child(cleanup_tracks);
|
||||||
|
|
||||||
cleanup_all = memnew( CheckButton );
|
cleanup_all = memnew( CheckButton );
|
||||||
cleanup_all->set_text(TTR("Clean-Up all animations"));
|
cleanup_all->set_text(TTR("Clean-up all animations"));
|
||||||
cleanup_vb->add_child(cleanup_all);
|
cleanup_vb->add_child(cleanup_all);
|
||||||
|
|
||||||
cleanup_dialog->set_title(TTR("Clean up Animation(s) (NO UNDO!)"));
|
cleanup_dialog->set_title(TTR("Clean-Up Animation(s) (NO UNDO!)"));
|
||||||
cleanup_dialog->get_ok()->set_text(TTR("Clean-Up"));
|
cleanup_dialog->get_ok()->set_text(TTR("Clean-Up"));
|
||||||
|
|
||||||
cleanup_dialog->connect("confirmed",this,"_menu_track",varray(TRACK_MENU_CLEAN_UP_CONFIRM));
|
cleanup_dialog->connect("confirmed",this,"_menu_track",varray(TRACK_MENU_CLEAN_UP_CONFIRM));
|
||||||
|
@ -239,7 +239,7 @@ void CallDialog::set_object(Object *p_object,StringName p_selected) {
|
|||||||
return_value->clear();
|
return_value->clear();
|
||||||
|
|
||||||
_update_method_list();
|
_update_method_list();
|
||||||
method_label->set_text(TTR("Method List For ' ")+p_object->get_type()+" ':");
|
method_label->set_text(vformat(TTR("Method List For '%s':"),p_object->get_type()));
|
||||||
}
|
}
|
||||||
|
|
||||||
CallDialog::CallDialog() {
|
CallDialog::CallDialog() {
|
||||||
@ -323,7 +323,7 @@ CallDialog::CallDialog() {
|
|||||||
|
|
||||||
label->set_begin( Point2( 15,54) );
|
label->set_begin( Point2( 15,54) );
|
||||||
label->set_end( Point2( 16,44) );
|
label->set_end( Point2( 16,44) );
|
||||||
label->set_text(TTR("Parameters:"));
|
label->set_text("Parameters:");
|
||||||
|
|
||||||
add_child(label);
|
add_child(label);
|
||||||
*/
|
*/
|
||||||
|
@ -216,7 +216,7 @@ void FindReplaceDialog::_replace() {
|
|||||||
|
|
||||||
text_edit->set_v_scroll(vsval);
|
text_edit->set_v_scroll(vsval);
|
||||||
// text_edit->set_h_scroll(hsval);
|
// text_edit->set_h_scroll(hsval);
|
||||||
error_label->set_text(TTR("Replaced ")+itos(rc)+TTR(" ocurrence(s)."));
|
error_label->set_text(vformat(TTR("Replaced %d ocurrence(s)."),rc));
|
||||||
|
|
||||||
|
|
||||||
//hide();
|
//hide();
|
||||||
@ -274,7 +274,7 @@ bool FindReplaceDialog::_search() {
|
|||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
set_error(TTR("Not Found!"));
|
set_error(TTR("Not found!"));
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -498,7 +498,7 @@ FindReplaceDialog::FindReplaceDialog() {
|
|||||||
|
|
||||||
void CodeTextEditor::_line_col_changed() {
|
void CodeTextEditor::_line_col_changed() {
|
||||||
|
|
||||||
String text = String()+TTR("Line: ")+itos(text_editor->cursor_get_line()+1)+TTR(", Col: ")+itos(text_editor->cursor_get_column());
|
String text = String()+TTR("Line:")+" "+itos(text_editor->cursor_get_line()+1)+", "+TTR("Col:")+" "+itos(text_editor->cursor_get_column());
|
||||||
line_col->set_text(text);
|
line_col->set_text(text);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -294,8 +294,8 @@ void ConnectDialog::_bind_methods() {
|
|||||||
|
|
||||||
ConnectDialog::ConnectDialog() {
|
ConnectDialog::ConnectDialog() {
|
||||||
|
|
||||||
int margin = get_constant("margin",TTR("Dialogs"));
|
int margin = get_constant("margin","Dialogs");
|
||||||
int button_margin = get_constant("button_margin",TTR("Dialogs"));
|
int button_margin = get_constant("button_margin","Dialogs");
|
||||||
|
|
||||||
|
|
||||||
Label * label = memnew( Label );
|
Label * label = memnew( Label );
|
||||||
@ -416,7 +416,7 @@ ConnectDialog::ConnectDialog() {
|
|||||||
|
|
||||||
|
|
||||||
/*dst_method_list = memnew( MenuButton );
|
/*dst_method_list = memnew( MenuButton );
|
||||||
dst_method_list->set_text(TTR("List.."));
|
dst_method_list->set_text("List..");
|
||||||
dst_method_list->set_anchor( MARGIN_RIGHT, ANCHOR_END );
|
dst_method_list->set_anchor( MARGIN_RIGHT, ANCHOR_END );
|
||||||
dst_method_list->set_anchor( MARGIN_LEFT, ANCHOR_END );
|
dst_method_list->set_anchor( MARGIN_LEFT, ANCHOR_END );
|
||||||
dst_method_list->set_anchor( MARGIN_TOP, ANCHOR_END );
|
dst_method_list->set_anchor( MARGIN_TOP, ANCHOR_END );
|
||||||
@ -429,7 +429,7 @@ ConnectDialog::ConnectDialog() {
|
|||||||
make_callback = memnew( CheckButton );
|
make_callback = memnew( CheckButton );
|
||||||
make_callback->set_toggle_mode(true);
|
make_callback->set_toggle_mode(true);
|
||||||
make_callback->set_pressed( EDITOR_DEF("text_editor/create_signal_callbacks",true));
|
make_callback->set_pressed( EDITOR_DEF("text_editor/create_signal_callbacks",true));
|
||||||
make_callback->set_text(TTR("Make Function "));
|
make_callback->set_text(TTR("Make Function"));
|
||||||
dstm_hb->add_child(make_callback);
|
dstm_hb->add_child(make_callback);
|
||||||
|
|
||||||
deferred = memnew( CheckButton );
|
deferred = memnew( CheckButton );
|
||||||
@ -447,7 +447,7 @@ ConnectDialog::ConnectDialog() {
|
|||||||
realtime->set_anchor( MARGIN_RIGHT, ANCHOR_END );
|
realtime->set_anchor( MARGIN_RIGHT, ANCHOR_END );
|
||||||
realtime->set_begin( Point2( 120, button_margin-10 ) );
|
realtime->set_begin( Point2( 120, button_margin-10 ) );
|
||||||
realtime->set_end( Point2( 80, margin ) );
|
realtime->set_end( Point2( 80, margin ) );
|
||||||
realtime->set_text(TTR("Realtime"));
|
realtime->set_text("Realtime");
|
||||||
add_child(realtime);
|
add_child(realtime);
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -465,7 +465,7 @@ ConnectDialog::ConnectDialog() {
|
|||||||
add_child(error);
|
add_child(error);
|
||||||
error->get_ok()->set_text(TTR("Close"));
|
error->get_ok()->set_text(TTR("Close"));
|
||||||
get_ok()->set_text(TTR("Connect"));
|
get_ok()->set_text(TTR("Connect"));
|
||||||
// error->get_cancel()->set_text(TTR("Close"));
|
// error->get_cancel()->set_text("Close");
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -511,7 +511,7 @@ void ConnectionsDialog::_connect() {
|
|||||||
StringArray args = it->get_metadata(0).operator Dictionary()["args"];
|
StringArray args = it->get_metadata(0).operator Dictionary()["args"];
|
||||||
int flags = CONNECT_PERSIST | (defer?CONNECT_DEFERRED:0) | (oshot?CONNECT_ONESHOT:0);
|
int flags = CONNECT_PERSIST | (defer?CONNECT_DEFERRED:0) | (oshot?CONNECT_ONESHOT:0);
|
||||||
|
|
||||||
undo_redo->create_action(TTR("Connect '")+signal+"' to '"+String(dst_method)+"'");
|
undo_redo->create_action(vformat(TTR("Connect '%s' to '%s'"),signal,String(dst_method)));
|
||||||
undo_redo->add_do_method(node,"connect",signal,target,dst_method,binds,flags);
|
undo_redo->add_do_method(node,"connect",signal,target,dst_method,binds,flags);
|
||||||
undo_redo->add_undo_method(node,"disconnect",signal,target,dst_method);
|
undo_redo->add_undo_method(node,"disconnect",signal,target,dst_method);
|
||||||
undo_redo->add_do_method(this,"update_tree");
|
undo_redo->add_do_method(this,"update_tree");
|
||||||
@ -610,7 +610,7 @@ void ConnectionsDialog::_remove_confirm() {
|
|||||||
|
|
||||||
Dictionary meta=selected->get_metadata(0);
|
Dictionary meta=selected->get_metadata(0);
|
||||||
|
|
||||||
undo_redo->create_action(TTR("Remove Subscription"));
|
undo_redo->create_action("Remove Subscription");
|
||||||
undo_redo->add_do_method(node,"unsubscribe_path_event",meta["from_event"].operator String(),meta["from_path"].operator NodePath(),meta["to_method"].operator String());
|
undo_redo->add_do_method(node,"unsubscribe_path_event",meta["from_event"].operator String(),meta["from_path"].operator NodePath(),meta["to_method"].operator String());
|
||||||
undo_redo->add_undo_method(node,"subscribe_path_event_persist",meta["from_event"].operator String(),meta["from_path"].operator NodePath(),meta["to_method"].operator String(),Array(),false);
|
undo_redo->add_undo_method(node,"subscribe_path_event_persist",meta["from_event"].operator String(),meta["from_path"].operator NodePath(),meta["to_method"].operator String(),Array(),false);
|
||||||
undo_redo->add_do_method(this,"update_tree");
|
undo_redo->add_do_method(this,"update_tree");
|
||||||
|
@ -251,7 +251,7 @@ void CreateDialog::_notification(int p_what) {
|
|||||||
void CreateDialog::set_base_type(const String& p_base) {
|
void CreateDialog::set_base_type(const String& p_base) {
|
||||||
|
|
||||||
base_type=p_base;
|
base_type=p_base;
|
||||||
set_title(TTR("Create New ")+p_base);
|
set_title(TTR("Create New")+" "+p_base);
|
||||||
_update_search();
|
_update_search();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -541,7 +541,7 @@ void CreateDialog::_bind_methods() {
|
|||||||
|
|
||||||
void CreateDialog::set_base_type(const String& p_base) {
|
void CreateDialog::set_base_type(const String& p_base) {
|
||||||
|
|
||||||
set_title(TTR("Create ")+p_base+" Type");
|
set_title(vformat("Create %s Type",p_base));
|
||||||
|
|
||||||
if (base==p_base)
|
if (base==p_base)
|
||||||
return;
|
return;
|
||||||
@ -562,14 +562,14 @@ CreateDialog::CreateDialog() {
|
|||||||
add_child(vbc);
|
add_child(vbc);
|
||||||
set_child_rect(vbc);
|
set_child_rect(vbc);
|
||||||
|
|
||||||
get_ok()->set_text(TTR("Create"));
|
get_ok()->set_text("Create");
|
||||||
|
|
||||||
tree = memnew( Tree );
|
tree = memnew( Tree );
|
||||||
vbc->add_margin_child(TTR("Type:"),tree,true);
|
vbc->add_margin_child("Type:",tree,true);
|
||||||
//tree->set_hide_root(true);
|
//tree->set_hide_root(true);
|
||||||
|
|
||||||
filter = memnew( LineEdit );
|
filter = memnew( LineEdit );
|
||||||
vbc->add_margin_child(TTR("Filter:"),filter);
|
vbc->add_margin_child("Filter:",filter);
|
||||||
|
|
||||||
base="Node";
|
base="Node";
|
||||||
set_as_toplevel(true);
|
set_as_toplevel(true);
|
||||||
|
@ -27,7 +27,7 @@ void DependencyEditor::_load_pressed(Object* p_item,int p_cell,int p_button){
|
|||||||
String fname = ti->get_text(0);
|
String fname = ti->get_text(0);
|
||||||
replacing = ti->get_text(1);
|
replacing = ti->get_text(1);
|
||||||
|
|
||||||
search->set_title(TTR("Search Replacement For: ")+replacing.get_file());
|
search->set_title(TTR("Search Replacement For:")+" "+replacing.get_file());
|
||||||
|
|
||||||
search->clear_filters();
|
search->clear_filters();
|
||||||
List<String> ext;
|
List<String> ext;
|
||||||
@ -180,7 +180,7 @@ void DependencyEditor::_update_list() {
|
|||||||
String name = path.get_file();
|
String name = path.get_file();
|
||||||
|
|
||||||
Ref<Texture> icon;
|
Ref<Texture> icon;
|
||||||
if (has_icon(type,TTR("EditorIcons"))) {
|
if (has_icon(type,"EditorIcons")) {
|
||||||
icon=get_icon(type,"EditorIcons");
|
icon=get_icon(type,"EditorIcons");
|
||||||
} else {
|
} else {
|
||||||
icon=get_icon("Object","EditorIcons");
|
icon=get_icon("Object","EditorIcons");
|
||||||
@ -209,15 +209,15 @@ void DependencyEditor::edit(const String& p_path) {
|
|||||||
|
|
||||||
|
|
||||||
editing=p_path;
|
editing=p_path;
|
||||||
set_title(TTR("Dependencies For: ")+p_path.get_file());
|
set_title(TTR("Dependencies For:")+" "+p_path.get_file());
|
||||||
|
|
||||||
_update_list();
|
_update_list();
|
||||||
popup_centered_ratio();
|
popup_centered_ratio();
|
||||||
|
|
||||||
if (EditorNode::get_singleton()->is_scene_open(p_path)) {
|
if (EditorNode::get_singleton()->is_scene_open(p_path)) {
|
||||||
EditorNode::get_singleton()->show_warning(TTR("Scene '")+p_path.get_file()+"' is currently being edited.\nChanges will not take effect unless reloaded.");
|
EditorNode::get_singleton()->show_warning(vformat(TTR("Scene '%s' is currently being edited.\nChanges will not take effect unless reloaded."),p_path.get_file()));
|
||||||
} else if (ResourceCache::has(p_path)) {
|
} else if (ResourceCache::has(p_path)) {
|
||||||
EditorNode::get_singleton()->show_warning(TTR("Resource '")+p_path.get_file()+"' is in use.\nChanges will take effect when reloaded.");
|
EditorNode::get_singleton()->show_warning(vformat(TTR("Resource '%s' is in use.\nChanges will take effect when reloaded."),p_path.get_file()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -301,7 +301,7 @@ void DependencyEditorOwners::_fill_owners(EditorFileSystemDirectory *efsd) {
|
|||||||
|
|
||||||
Ref<Texture> icon;
|
Ref<Texture> icon;
|
||||||
String type=efsd->get_file_type(i);
|
String type=efsd->get_file_type(i);
|
||||||
if (!has_icon(type,TTR("EditorIcons"))) {
|
if (!has_icon(type,"EditorIcons")) {
|
||||||
icon=get_icon("Object","EditorIcons");
|
icon=get_icon("Object","EditorIcons");
|
||||||
} else {
|
} else {
|
||||||
icon=get_icon(type,"EditorIcons");
|
icon=get_icon(type,"EditorIcons");
|
||||||
@ -319,7 +319,7 @@ void DependencyEditorOwners::show(const String& p_path) {
|
|||||||
_fill_owners(EditorFileSystem::get_singleton()->get_filesystem());
|
_fill_owners(EditorFileSystem::get_singleton()->get_filesystem());
|
||||||
popup_centered_ratio();
|
popup_centered_ratio();
|
||||||
|
|
||||||
set_title(TTR("Owners Of: ")+p_path.get_file());
|
set_title(TTR("Owners Of:")+" "+p_path.get_file());
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -362,7 +362,7 @@ void DependencyRemoveDialog::_fill_owners(EditorFileSystemDirectory *efsd) {
|
|||||||
|
|
||||||
Ref<Texture> icon;
|
Ref<Texture> icon;
|
||||||
String type=efsd->get_file_type(i);
|
String type=efsd->get_file_type(i);
|
||||||
if (!has_icon(type,TTR("EditorIcons"))) {
|
if (!has_icon(type,"EditorIcons")) {
|
||||||
icon=get_icon("Object","EditorIcons");
|
icon=get_icon("Object","EditorIcons");
|
||||||
} else {
|
} else {
|
||||||
icon=get_icon(type,"EditorIcons");
|
icon=get_icon(type,"EditorIcons");
|
||||||
@ -448,7 +448,7 @@ void DependencyErrorDialog::show(const String& p_for_file,const Vector<String> &
|
|||||||
|
|
||||||
|
|
||||||
for_file=p_for_file;
|
for_file=p_for_file;
|
||||||
set_title(TTR("Error loading: ")+p_for_file.get_file());
|
set_title(TTR("Error loading:")+" "+p_for_file.get_file());
|
||||||
files->clear();
|
files->clear();
|
||||||
|
|
||||||
TreeItem *root = files->create_item(NULL);
|
TreeItem *root = files->create_item(NULL);
|
||||||
@ -461,7 +461,7 @@ void DependencyErrorDialog::show(const String& p_for_file,const Vector<String> &
|
|||||||
type=report[i].get_slice("::",1);
|
type=report[i].get_slice("::",1);
|
||||||
|
|
||||||
Ref<Texture> icon;
|
Ref<Texture> icon;
|
||||||
if (!has_icon(type,TTR("EditorIcons"))) {
|
if (!has_icon(type,"EditorIcons")) {
|
||||||
icon=get_icon("Object","EditorIcons");
|
icon=get_icon("Object","EditorIcons");
|
||||||
} else {
|
} else {
|
||||||
icon=get_icon(type,"EditorIcons");
|
icon=get_icon(type,"EditorIcons");
|
||||||
@ -523,7 +523,7 @@ void OrphanResourcesDialog::ok_pressed() {
|
|||||||
if (paths.empty())
|
if (paths.empty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
delete_confirm->set_text(TTR("Permanently Delete ")+itos(paths.size())+" Item(s) ? (No Undo!!)");
|
delete_confirm->set_text(vformat(TTR("Permanently delete %d item(s)? (No undo!)"),paths.size()));
|
||||||
delete_confirm->popup_centered_minsize();
|
delete_confirm->popup_centered_minsize();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -580,7 +580,7 @@ bool OrphanResourcesDialog::_fill_owners(EditorFileSystemDirectory *efsd,HashMap
|
|||||||
String type=efsd->get_file_type(i);
|
String type=efsd->get_file_type(i);
|
||||||
|
|
||||||
Ref<Texture> icon;
|
Ref<Texture> icon;
|
||||||
if (has_icon(type,TTR("EditorIcons"))) {
|
if (has_icon(type,"EditorIcons")) {
|
||||||
icon=get_icon(type,"EditorIcons");
|
icon=get_icon(type,"EditorIcons");
|
||||||
} else {
|
} else {
|
||||||
icon=get_icon("Object","EditorIcons");
|
icon=get_icon("Object","EditorIcons");
|
||||||
|
@ -677,7 +677,7 @@ void EditorFileDialog::update_filters() {
|
|||||||
if (max_filters<filters.size())
|
if (max_filters<filters.size())
|
||||||
all_filters+=", ...";
|
all_filters+=", ...";
|
||||||
|
|
||||||
filter->add_item(TTR("All Recognized ( ")+all_filters+" )");
|
filter->add_item(TTR("All Recognized")+" ( "+all_filters+" )");
|
||||||
}
|
}
|
||||||
for(int i=0;i<filters.size();i++) {
|
for(int i=0;i<filters.size();i++) {
|
||||||
|
|
||||||
|
@ -314,7 +314,7 @@ void EditorFileSystem::_scan_filesystem() {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
EditorProgressBG scan_progress("efs",TTR("ScanFS"),1000);
|
EditorProgressBG scan_progress("efs","ScanFS",1000);
|
||||||
|
|
||||||
ScanProgress sp;
|
ScanProgress sp;
|
||||||
sp.low=0;
|
sp.low=0;
|
||||||
@ -609,7 +609,7 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir,DirAccess
|
|||||||
|
|
||||||
da->change_dir("..");
|
da->change_dir("..");
|
||||||
} else {
|
} else {
|
||||||
ERR_PRINTS(TTR("Can't go into subdir: ")+E->get());
|
ERR_PRINTS(TTR("Cannot go into subdir:")+" "+E->get());
|
||||||
}
|
}
|
||||||
|
|
||||||
p_progress.update(idx,total);
|
p_progress.update(idx,total);
|
||||||
|
@ -519,7 +519,7 @@ EditorHelpIndex::EditorHelpIndex() {
|
|||||||
search_box->connect("input_event", this, "_sbox_input");
|
search_box->connect("input_event", this, "_sbox_input");
|
||||||
|
|
||||||
class_list = memnew( Tree );
|
class_list = memnew( Tree );
|
||||||
vbc->add_margin_child(TTR("Class List: "), class_list, true);
|
vbc->add_margin_child(TTR("Class List:")+" ", class_list, true);
|
||||||
class_list->set_v_size_flags(SIZE_EXPAND_FILL);
|
class_list->set_v_size_flags(SIZE_EXPAND_FILL);
|
||||||
|
|
||||||
class_list->connect("item_activated",this,"_tree_item_selected");
|
class_list->connect("item_activated",this,"_tree_item_selected");
|
||||||
@ -710,7 +710,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
|
|||||||
|
|
||||||
class_desc->push_font(doc_title_font);
|
class_desc->push_font(doc_title_font);
|
||||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
|
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
|
||||||
class_desc->add_text(TTR("Class: "));
|
class_desc->add_text(TTR("Class:")+" ");
|
||||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/base_type_color"));
|
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/base_type_color"));
|
||||||
_add_text(p_class);
|
_add_text(p_class);
|
||||||
class_desc->pop();
|
class_desc->pop();
|
||||||
@ -722,7 +722,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
|
|||||||
|
|
||||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
|
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
|
||||||
class_desc->push_font(doc_title_font);
|
class_desc->push_font(doc_title_font);
|
||||||
class_desc->add_text(TTR("Inherits: "));
|
class_desc->add_text(TTR("Inherits:")+" ");
|
||||||
class_desc->pop();
|
class_desc->pop();
|
||||||
class_desc->pop();
|
class_desc->pop();
|
||||||
|
|
||||||
@ -756,7 +756,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
|
|||||||
if (!found) {
|
if (!found) {
|
||||||
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
|
class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
|
||||||
class_desc->push_font(doc_title_font);
|
class_desc->push_font(doc_title_font);
|
||||||
class_desc->add_text("Inherited by: ");
|
class_desc->add_text(TTR("Inherited by:")+" ");
|
||||||
class_desc->pop();
|
class_desc->pop();
|
||||||
class_desc->pop();
|
class_desc->pop();
|
||||||
|
|
||||||
|
@ -240,12 +240,12 @@ static void _edit_files_with_filter(DirAccess *da,const List<String>& p_filters,
|
|||||||
for(const List<String>::Element *F=p_filters.front();F;F=F->next()) {
|
for(const List<String>::Element *F=p_filters.front();F;F=F->next()) {
|
||||||
|
|
||||||
if (fullpath.matchn(F->get())) {
|
if (fullpath.matchn(F->get())) {
|
||||||
String act = TTR("Added: ");
|
String act = TTR("Added:")+" ";
|
||||||
|
|
||||||
if (!exclude) {
|
if (!exclude) {
|
||||||
r_list.insert(fullpath);
|
r_list.insert(fullpath);
|
||||||
} else {
|
} else {
|
||||||
act = TTR("Removed: ");
|
act = TTR("Removed:")+" ";
|
||||||
r_list.erase(fullpath);
|
r_list.erase(fullpath);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -866,7 +866,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func
|
|||||||
Error err = plugin->import2(dst_file,imd,get_image_compression(),true);
|
Error err = plugin->import2(dst_file,imd,get_image_compression(),true);
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
||||||
EditorNode::add_io_error(TTR("Error saving atlas! ")+dst_file.get_file());
|
EditorNode::add_io_error(TTR("Error saving atlas:")+" "+dst_file.get_file());
|
||||||
return ERR_CANT_CREATE;
|
return ERR_CANT_CREATE;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -916,7 +916,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func
|
|||||||
String path = EditorSettings::get_singleton()->get_settings_path()+"/tmp/tmpatlas.atex";
|
String path = EditorSettings::get_singleton()->get_settings_path()+"/tmp/tmpatlas.atex";
|
||||||
Error err = ResourceSaver::save(path,atex);
|
Error err = ResourceSaver::save(path,atex);
|
||||||
if (err!=OK) {
|
if (err!=OK) {
|
||||||
EditorNode::add_io_error(TTR("Could not save atlas subtexture: ")+path);
|
EditorNode::add_io_error(TTR("Could not save atlas subtexture:")+" "+path);
|
||||||
return ERR_CANT_CREATE;
|
return ERR_CANT_CREATE;
|
||||||
}
|
}
|
||||||
Vector<uint8_t> data = FileAccess::get_file_as_array(path);
|
Vector<uint8_t> data = FileAccess::get_file_as_array(path);
|
||||||
@ -1157,7 +1157,7 @@ Error EditorExportPlatform::save_pack_file(void *p_userdata,const String& p_path
|
|||||||
MD5Final(&ctx);
|
MD5Final(&ctx);
|
||||||
pd->f->store_buffer(ctx.digest,16);
|
pd->f->store_buffer(ctx.digest,16);
|
||||||
}
|
}
|
||||||
pd->ep->step(TTR("Storing File: ")+p_path,2+p_file*100/p_total,false);
|
pd->ep->step(TTR("Storing File:")+" "+p_path,2+p_file*100/p_total,false);
|
||||||
pd->count++;
|
pd->count++;
|
||||||
pd->ftmp->store_buffer(p_data.ptr(),p_data.size());
|
pd->ftmp->store_buffer(p_data.ptr(),p_data.size());
|
||||||
if (pd->alignment > 1) {
|
if (pd->alignment > 1) {
|
||||||
@ -1195,7 +1195,7 @@ Error EditorExportPlatform::save_zip_file(void *p_userdata,const String& p_path,
|
|||||||
zipWriteInFileInZip(zip,p_data.ptr(),p_data.size());
|
zipWriteInFileInZip(zip,p_data.ptr(),p_data.size());
|
||||||
zipCloseFileInZip(zip);
|
zipCloseFileInZip(zip);
|
||||||
|
|
||||||
zd->ep->step(TTR("Storing File: ")+p_path,2+p_file*100/p_total,false);
|
zd->ep->step(TTR("Storing File:")+" "+p_path,2+p_file*100/p_total,false);
|
||||||
zd->count++;
|
zd->count++;
|
||||||
return OK;
|
return OK;
|
||||||
|
|
||||||
@ -1309,7 +1309,7 @@ Error EditorExportPlatformPC::export_project(const String& p_path, bool p_debug,
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
EditorProgress ep("export",TTR("Exporting for ")+get_name(),102);
|
EditorProgress ep("export",vformat(TTR("Exporting for %s"),get_name()),102);
|
||||||
|
|
||||||
const int BUFSIZE = 32768;
|
const int BUFSIZE = 32768;
|
||||||
|
|
||||||
|
@ -432,7 +432,7 @@ void EditorNode::_rebuild_import_menu()
|
|||||||
{
|
{
|
||||||
PopupMenu* p = import_menu->get_popup();
|
PopupMenu* p = import_menu->get_popup();
|
||||||
p->clear();
|
p->clear();
|
||||||
p->add_item(TTR("Node from scene"), FILE_IMPORT_SUBSCENE);
|
p->add_item(TTR("Node From Scene"), FILE_IMPORT_SUBSCENE);
|
||||||
p->add_separator();
|
p->add_separator();
|
||||||
for (int i = 0; i < editor_import_export->get_import_plugin_count(); i++) {
|
for (int i = 0; i < editor_import_export->get_import_plugin_count(); i++) {
|
||||||
p->add_item(editor_import_export->get_import_plugin(i)->get_visible_name(), IMPORT_PLUGIN_BASE + i);
|
p->add_item(editor_import_export->get_import_plugin(i)->get_visible_name(), IMPORT_PLUGIN_BASE + i);
|
||||||
@ -606,15 +606,15 @@ void EditorNode::_dialog_display_file_error(String p_file,Error p_error) {
|
|||||||
|
|
||||||
case ERR_FILE_CANT_WRITE: {
|
case ERR_FILE_CANT_WRITE: {
|
||||||
|
|
||||||
accept->set_text(TTR("Can't open file for writing: ")+p_file.extension());
|
accept->set_text(TTR("Can't open file for writing:")+" "+p_file.extension());
|
||||||
} break;
|
} break;
|
||||||
case ERR_FILE_UNRECOGNIZED: {
|
case ERR_FILE_UNRECOGNIZED: {
|
||||||
|
|
||||||
accept->set_text(TTR("File format requested unknown: ")+p_file.extension());
|
accept->set_text(TTR("Requested file format unknown:")+" "+p_file.extension());
|
||||||
} break;
|
} break;
|
||||||
default: {
|
default: {
|
||||||
|
|
||||||
accept->set_text(TTR("Error Saving."));
|
accept->set_text(TTR("Error while saving."));
|
||||||
}break;
|
}break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1071,8 +1071,8 @@ void EditorNode::_import_action(const String& p_action) {
|
|||||||
|
|
||||||
current_option=-1;
|
current_option=-1;
|
||||||
//accept->get_cancel()->hide();
|
//accept->get_cancel()->hide();
|
||||||
accept->get_ok()->set_text(TTR("Ugh"));
|
accept->get_ok()->set_text("Ugh");
|
||||||
accept->set_text(TTR("Error importing scene."));
|
accept->set_text("Error importing scene.");
|
||||||
accept->popup_centered(Size2(300,70));;
|
accept->popup_centered(Size2(300,70));;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1087,8 +1087,8 @@ void EditorNode::_import_action(const String& p_action) {
|
|||||||
|
|
||||||
memdelete(src);
|
memdelete(src);
|
||||||
//accept->get_cancel()->hide();
|
//accept->get_cancel()->hide();
|
||||||
accept->get_ok()->set_text(TTR("Ugh"));
|
accept->get_ok()->set_text("Ugh");
|
||||||
accept->set_text(TTR("Error load scene to update."));
|
accept->set_text("Error load scene to update.");
|
||||||
accept->popup_centered(Size2(300,70));;
|
accept->popup_centered(Size2(300,70));;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1128,8 +1128,8 @@ void EditorNode::_import(const String &p_file) {
|
|||||||
|
|
||||||
current_option=-1;
|
current_option=-1;
|
||||||
//accept->get_cancel()->hide();
|
//accept->get_cancel()->hide();
|
||||||
accept->get_ok()->set_text(TTR("Ugh"));
|
accept->get_ok()->set_text("Ugh");
|
||||||
accept->set_text(TTR("Error importing scene."));
|
accept->set_text("Error importing scene.");
|
||||||
accept->popup_centered(Size2(300,70));;
|
accept->popup_centered(Size2(300,70));;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1251,7 +1251,7 @@ void EditorNode::_dialog_action(String p_file) {
|
|||||||
current_option=-1;
|
current_option=-1;
|
||||||
//accept->get_cancel()->hide();
|
//accept->get_cancel()->hide();
|
||||||
accept->get_ok()->set_text(TTR("I see.."));
|
accept->get_ok()->set_text(TTR("I see.."));
|
||||||
accept->set_text(TTR("Can't load MeshLibrary for merging!."));
|
accept->set_text(TTR("Can't load MeshLibrary for merging!"));
|
||||||
accept->popup_centered_minsize();
|
accept->popup_centered_minsize();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1268,7 +1268,7 @@ void EditorNode::_dialog_action(String p_file) {
|
|||||||
if (err) {
|
if (err) {
|
||||||
|
|
||||||
accept->get_ok()->set_text(TTR("I see.."));
|
accept->get_ok()->set_text(TTR("I see.."));
|
||||||
accept->set_text(TTR("Error saving MeshLibrary!."));
|
accept->set_text(TTR("Error saving MeshLibrary!"));
|
||||||
accept->popup_centered_minsize();
|
accept->popup_centered_minsize();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1286,7 +1286,7 @@ void EditorNode::_dialog_action(String p_file) {
|
|||||||
current_option=-1;
|
current_option=-1;
|
||||||
//accept->get_cancel()->hide();
|
//accept->get_cancel()->hide();
|
||||||
accept->get_ok()->set_text(TTR("I see.."));
|
accept->get_ok()->set_text(TTR("I see.."));
|
||||||
accept->set_text(TTR("Can't load TileSet for merging!."));
|
accept->set_text(TTR("Can't load TileSet for merging!"));
|
||||||
accept->popup_centered_minsize();
|
accept->popup_centered_minsize();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1304,7 +1304,7 @@ void EditorNode::_dialog_action(String p_file) {
|
|||||||
if (err) {
|
if (err) {
|
||||||
|
|
||||||
accept->get_ok()->set_text(TTR("I see.."));
|
accept->get_ok()->set_text(TTR("I see.."));
|
||||||
accept->set_text(TTR("Error saving TileSet!."));
|
accept->set_text(TTR("Error saving TileSet!"));
|
||||||
accept->popup_centered_minsize();
|
accept->popup_centered_minsize();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1328,7 +1328,7 @@ void EditorNode::_dialog_action(String p_file) {
|
|||||||
}
|
}
|
||||||
int ret = unzGoToFirstFile(pkg);
|
int ret = unzGoToFirstFile(pkg);
|
||||||
|
|
||||||
int fc=0; //coun them
|
int fc=0; //count them
|
||||||
|
|
||||||
while(ret==UNZ_OK) {
|
while(ret==UNZ_OK) {
|
||||||
fc++;
|
fc++;
|
||||||
@ -1368,7 +1368,7 @@ void EditorNode::_dialog_action(String p_file) {
|
|||||||
|
|
||||||
file=file.get_file();
|
file=file.get_file();
|
||||||
|
|
||||||
p.step(TTR("Importing: ")+file,fc);
|
p.step(TTR("Importing:")+" "+file,fc);
|
||||||
print_line("IMPORT "+file);
|
print_line("IMPORT "+file);
|
||||||
|
|
||||||
FileAccess *f = FileAccess::open(EditorSettings::get_singleton()->get_settings_path()+"/templates/"+file,FileAccess::WRITE);
|
FileAccess *f = FileAccess::open(EditorSettings::get_singleton()->get_settings_path()+"/templates/"+file,FileAccess::WRITE);
|
||||||
@ -1454,7 +1454,7 @@ void EditorNode::_dialog_action(String p_file) {
|
|||||||
_update_layouts_menu();
|
_update_layouts_menu();
|
||||||
|
|
||||||
if (p_file=="Default") {
|
if (p_file=="Default") {
|
||||||
show_warning(TTR("Restored Default layout to base settings."));
|
show_warning(TTR("Restored default layout to base settings."));
|
||||||
}
|
}
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
@ -1769,7 +1769,7 @@ void EditorNode::_edit_current() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//p->add_separator();
|
//p->add_separator();
|
||||||
//p->add_item(TTR("All Methods"),OBJECT_CALL_METHOD);
|
//p->add_item("All Methods",OBJECT_CALL_METHOD);
|
||||||
|
|
||||||
|
|
||||||
update_keying();
|
update_keying();
|
||||||
@ -1832,7 +1832,7 @@ void EditorNode::_run(bool p_current,const String& p_custom) {
|
|||||||
current_option=-1;
|
current_option=-1;
|
||||||
//accept->get_cancel()->hide();
|
//accept->get_cancel()->hide();
|
||||||
accept->get_ok()->set_text(TTR("I see.."));
|
accept->get_ok()->set_text(TTR("I see.."));
|
||||||
accept->set_text(TTR("No scene to run exists."));
|
accept->set_text(TTR("There is no defined scene to run."));
|
||||||
accept->popup_centered_minsize();
|
accept->popup_centered_minsize();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1896,7 +1896,7 @@ void EditorNode::_run(bool p_current,const String& p_custom) {
|
|||||||
current_option=-1;
|
current_option=-1;
|
||||||
//accept->get_cancel()->hide();
|
//accept->get_cancel()->hide();
|
||||||
accept->get_ok()->set_text(TTR("I see.."));
|
accept->get_ok()->set_text(TTR("I see.."));
|
||||||
accept->set_text(TTR("Current scene was never saved, please save scene before running."));
|
accept->set_text(TTR("Current scene was never saved, please save it prior to running."));
|
||||||
accept->popup_centered_minsize();
|
accept->popup_centered_minsize();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1998,11 +1998,12 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
|
|||||||
switch( p_option ) {
|
switch( p_option ) {
|
||||||
case FILE_NEW_SCENE: {
|
case FILE_NEW_SCENE: {
|
||||||
|
|
||||||
|
// TODO: Drop such obsolete commented code
|
||||||
/*
|
/*
|
||||||
if (!p_confirmed) {
|
if (!p_confirmed) {
|
||||||
confirmation->get_ok()->set_text(TTR("Yes"));
|
confirmation->get_ok()->set_text("Yes");
|
||||||
//confirmation->get_cancel()->show();
|
//confirmation->get_cancel()->show();
|
||||||
confirmation->set_text(TTR("Start a New Scene? (Current will be lost)"));
|
confirmation->set_text("Start a New Scene? (Current will be lost)");
|
||||||
confirmation->popup_centered_minsize();
|
confirmation->popup_centered_minsize();
|
||||||
break;
|
break;
|
||||||
}*/
|
}*/
|
||||||
@ -2058,7 +2059,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
|
|||||||
|
|
||||||
|
|
||||||
//quick_open->popup("Resource", false, true);
|
//quick_open->popup("Resource", false, true);
|
||||||
//quick_open->set_title(TTR("Quick Search File.."));
|
//quick_open->set_title("Quick Search File..");
|
||||||
scenes_dock->focus_on_filter();
|
scenes_dock->focus_on_filter();
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
@ -2221,7 +2222,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
|
|||||||
|
|
||||||
current_option=-1;
|
current_option=-1;
|
||||||
//confirmation->get_cancel()->hide();
|
//confirmation->get_cancel()->hide();
|
||||||
accept->get_ok()->set_text(TTR("I see.."));
|
accept->get_ok()->set_text("I see..");
|
||||||
accept->set_text("This operation can't be done without a tree root.");
|
accept->set_text("This operation can't be done without a tree root.");
|
||||||
accept->popup_centered(Size2(300,70));;
|
accept->popup_centered(Size2(300,70));;
|
||||||
break;
|
break;
|
||||||
@ -2243,8 +2244,8 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
|
|||||||
} else {
|
} else {
|
||||||
current_option=-1;
|
current_option=-1;
|
||||||
//confirmation->get_cancel()->hide();
|
//confirmation->get_cancel()->hide();
|
||||||
accept->get_ok()->set_text(TTR("I see.."));
|
accept->get_ok()->set_text("I see..");
|
||||||
accept->set_text(TTR("Please save the scene first."));
|
accept->set_text("Please save the scene first.");
|
||||||
accept->popup_centered(Size2(300,70));;
|
accept->popup_centered(Size2(300,70));;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -2259,7 +2260,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
|
|||||||
String target = export_db->get_current_platform();
|
String target = export_db->get_current_platform();
|
||||||
Ref<EditorExporter> exporter = export_db->get_exporter(target);
|
Ref<EditorExporter> exporter = export_db->get_exporter(target);
|
||||||
if (exporter.is_null()) {
|
if (exporter.is_null()) {
|
||||||
accept->set_text(TTR("No exporter for platform '")+target+"' yet.");
|
accept->set_text("No exporter for platform '"+target+"' yet.");
|
||||||
accept->popup_centered(Size2(300,70));;
|
accept->popup_centered(Size2(300,70));;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2343,7 +2344,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
|
|||||||
|
|
||||||
confirmation->get_ok()->set_text(TTR("Quit"));
|
confirmation->get_ok()->set_text(TTR("Quit"));
|
||||||
//confirmation->get_cancel()->show();
|
//confirmation->get_cancel()->show();
|
||||||
confirmation->set_text(TTR("Exit the Editor?"));
|
confirmation->set_text(TTR("Exit the editor?"));
|
||||||
confirmation->popup_centered(Size2(180,70));
|
confirmation->popup_centered(Size2(180,70));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -2411,7 +2412,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
|
|||||||
String filename = scene->get_filename();
|
String filename = scene->get_filename();
|
||||||
|
|
||||||
if (filename==String()) {
|
if (filename==String()) {
|
||||||
show_warning(TTR("Can't reload a scene that was never saved.."));
|
show_warning(TTR("Can't reload a scene that was never saved."));
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2440,7 +2441,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
|
|||||||
|
|
||||||
current_option=-1;
|
current_option=-1;
|
||||||
//accept->get_cancel()->hide();
|
//accept->get_cancel()->hide();
|
||||||
accept->get_ok()->set_text(TTR("I see.."));
|
accept->get_ok()->set_text("I see..");
|
||||||
accept->set_text("This operation can't be done without a selected node.");
|
accept->set_text("This operation can't be done without a selected node.");
|
||||||
accept->popup_centered(Size2(300,70));;
|
accept->popup_centered(Size2(300,70));;
|
||||||
break;
|
break;
|
||||||
@ -2452,7 +2453,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
|
|||||||
|
|
||||||
current_option=-1;
|
current_option=-1;
|
||||||
//confirmation->get_cancel()->hide();
|
//confirmation->get_cancel()->hide();
|
||||||
accept->get_ok()->set_text(TTR("I see.."));
|
accept->get_ok()->set_text("I see..");
|
||||||
accept->set_text("This operation can't be done without a selected node.");
|
accept->set_text("This operation can't be done without a selected node.");
|
||||||
accept->popup_centered(Size2(300,70));;
|
accept->popup_centered(Size2(300,70));;
|
||||||
break;
|
break;
|
||||||
@ -2464,8 +2465,8 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
|
|||||||
|
|
||||||
current_option=-1;
|
current_option=-1;
|
||||||
//accept->get_cancel()->hide();
|
//accept->get_cancel()->hide();
|
||||||
accept->get_ok()->set_text(TTR("Ugh"));
|
accept->get_ok()->set_text("Ugh");
|
||||||
accept->set_text(String(TTR("Error loading scene from "))+external_file);
|
accept->set_text("Error loading scene from "+external_file);
|
||||||
accept->popup_centered(Size2(300,70));;
|
accept->popup_centered(Size2(300,70));;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -2473,7 +2474,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
|
|||||||
instanced_scene->generate_instance_state();
|
instanced_scene->generate_instance_state();
|
||||||
instanced_scene->set_filename( Globals::get_singleton()->localize_path(external_file) );
|
instanced_scene->set_filename( Globals::get_singleton()->localize_path(external_file) );
|
||||||
|
|
||||||
editor_data.get_undo_redo().create_action(TTR("Instance Scene"));
|
editor_data.get_undo_redo().create_action("Instance Scene");
|
||||||
editor_data.get_undo_redo().add_do_method(parent,"add_child",instanced_scene);
|
editor_data.get_undo_redo().add_do_method(parent,"add_child",instanced_scene);
|
||||||
editor_data.get_undo_redo().add_do_method(instanced_scene,"set_owner",edited_scene);
|
editor_data.get_undo_redo().add_do_method(instanced_scene,"set_owner",edited_scene);
|
||||||
editor_data.get_undo_redo().add_do_reference(instanced_scene);
|
editor_data.get_undo_redo().add_do_reference(instanced_scene);
|
||||||
@ -2703,11 +2704,11 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
|
|||||||
if (ischecked) {
|
if (ischecked) {
|
||||||
file_server->stop();
|
file_server->stop();
|
||||||
//debug_button->set_icon(gui_base->get_icon("FileServer","EditorIcons"));
|
//debug_button->set_icon(gui_base->get_icon("FileServer","EditorIcons"));
|
||||||
//debug_button->get_popup()->set_item_text( debug_button->get_popup()->get_item_index(RUN_FILE_SERVER),TTR("Enable File Server"));
|
//debug_button->get_popup()->set_item_text( debug_button->get_popup()->get_item_index(RUN_FILE_SERVER),"Enable File Server");
|
||||||
} else {
|
} else {
|
||||||
file_server->start();
|
file_server->start();
|
||||||
//debug_button->set_icon(gui_base->get_icon("FileServerActive","EditorIcons"));
|
//debug_button->set_icon(gui_base->get_icon("FileServerActive","EditorIcons"));
|
||||||
//debug_button->get_popup()->set_item_text( debug_button->get_popup()->get_item_index(RUN_FILE_SERVER),TTR("Disable File Server"));
|
//debug_button->get_popup()->set_item_text( debug_button->get_popup()->get_item_index(RUN_FILE_SERVER),"Disable File Server");
|
||||||
}
|
}
|
||||||
|
|
||||||
debug_button->get_popup()->set_item_checked( debug_button->get_popup()->get_item_index(RUN_FILE_SERVER),!ischecked);
|
debug_button->get_popup()->set_item_checked( debug_button->get_popup()->get_item_index(RUN_FILE_SERVER),!ischecked);
|
||||||
@ -2819,9 +2820,9 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
|
|||||||
if (!p_confirmed) {
|
if (!p_confirmed) {
|
||||||
|
|
||||||
|
|
||||||
confirmation->get_ok()->set_text(TTR("Open"));
|
confirmation->get_ok()->set_text("Open");
|
||||||
//confirmation->get_cancel()->show();
|
//confirmation->get_cancel()->show();
|
||||||
confirmation->set_text(TTR("Current scene changed, save and re-import ?"));
|
confirmation->set_text("Current scene changed, save and re-import ?");
|
||||||
confirmation->popup_centered(Size2(300,70));
|
confirmation->popup_centered(Size2(300,70));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -2834,8 +2835,8 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
|
|||||||
|
|
||||||
current_option=-1;
|
current_option=-1;
|
||||||
//accept->get_cancel()->hide();
|
//accept->get_cancel()->hide();
|
||||||
accept->get_ok()->set_text(TTR("I see.."));
|
accept->get_ok()->set_text("I see..");
|
||||||
accept->set_text(TTR("Can't import if edited scene was not saved.")); //i dont think this code will ever run
|
accept->set_text("Can't import if edited scene was not saved."); //i dont think this code will ever run
|
||||||
accept->popup_centered(Size2(300,70));;
|
accept->popup_centered(Size2(300,70));;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
@ -3251,7 +3252,7 @@ Error EditorNode::save_optimized_copy(const String& p_scene,const String& p_pres
|
|||||||
if (!get_edited_scene()) {
|
if (!get_edited_scene()) {
|
||||||
|
|
||||||
get_scene()->quit();
|
get_scene()->quit();
|
||||||
ERR_EXPLAIN(TTR("No scene to optimize (loading failed?"));
|
ERR_EXPLAIN("No scene to optimize (loading failed?)");
|
||||||
ERR_FAIL_V(ERR_FILE_NOT_FOUND);
|
ERR_FAIL_V(ERR_FILE_NOT_FOUND);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -3276,10 +3277,10 @@ Error EditorNode::save_optimized_copy(const String& p_scene,const String& p_pres
|
|||||||
if (!Globals::get_singleton()->has(preset)) {
|
if (!Globals::get_singleton()->has(preset)) {
|
||||||
|
|
||||||
//accept->"()->hide();
|
//accept->"()->hide();
|
||||||
accept->get_ok()->set_text(TTR("I see.."));
|
accept->get_ok()->set_text("I see..");
|
||||||
accept->set_text(TTR("Optimizer preset not found: ")+p_preset);
|
accept->set_text("Optimizer preset not found: "+p_preset);
|
||||||
accept->popup_centered(Size2(300,70));;
|
accept->popup_centered(Size2(300,70));;
|
||||||
ERR_EXPLAIN(TTR("Optimizer preset not found: ")+p_preset);
|
ERR_EXPLAIN("Optimizer preset not found: "+p_preset);
|
||||||
ERR_FAIL_V(ERR_INVALID_PARAMETER);
|
ERR_FAIL_V(ERR_INVALID_PARAMETER);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -3299,7 +3300,7 @@ Error EditorNode::save_optimized_copy(const String& p_scene,const String& p_pres
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ERR_EXPLAIN(TTR("Preset '")+p_preset+"' references nonexistent saver: "+type);
|
ERR_EXPLAIN("Preset '"+p_preset+"' references nonexistent saver: "+type);
|
||||||
ERR_FAIL_COND_V(saver.is_null(),ERR_INVALID_DATA);
|
ERR_FAIL_COND_V(saver.is_null(),ERR_INVALID_DATA);
|
||||||
|
|
||||||
List<Variant> keys;
|
List<Variant> keys;
|
||||||
@ -3334,8 +3335,8 @@ Error EditorNode::save_optimized_copy(const String& p_scene,const String& p_pres
|
|||||||
|
|
||||||
current_option=-1;
|
current_option=-1;
|
||||||
//accept->get_cancel()->hide();
|
//accept->get_cancel()->hide();
|
||||||
accept->get_ok()->set_text(TTR("I see.."));
|
accept->get_ok()->set_text("I see..");
|
||||||
accept->set_text(TTR("Couldn't save scene. Likely dependencies (instances) couldn't be satisfied."));
|
accept->set_text("Couldn't save scene. Likely dependencies (instances) couldn't be satisfied.");
|
||||||
accept->popup_centered(Size2(300,70));;
|
accept->popup_centered(Size2(300,70));;
|
||||||
return ERR_INVALID_DATA;
|
return ERR_INVALID_DATA;
|
||||||
|
|
||||||
@ -3345,8 +3346,8 @@ Error EditorNode::save_optimized_copy(const String& p_scene,const String& p_pres
|
|||||||
if (err) {
|
if (err) {
|
||||||
|
|
||||||
//accept->"()->hide();
|
//accept->"()->hide();
|
||||||
accept->get_ok()->set_text(TTR("I see.."));
|
accept->get_ok()->set_text("I see..");
|
||||||
accept->set_text(TTR("Error saving optimized scene: ")+path);
|
accept->set_text("Error saving optimized scene: "+path);
|
||||||
accept->popup_centered(Size2(300,70));;
|
accept->popup_centered(Size2(300,70));;
|
||||||
|
|
||||||
ERR_FAIL_COND_V(err,err);
|
ERR_FAIL_COND_V(err,err);
|
||||||
@ -3635,7 +3636,7 @@ Error EditorNode::load_scene(const String& p_scene, bool p_ignore_broken_deps,bo
|
|||||||
|
|
||||||
for (Map<String,Set<String> >::Element *E=dependency_errors.front();E;E=E->next()) {
|
for (Map<String,Set<String> >::Element *E=dependency_errors.front();E;E=E->next()) {
|
||||||
|
|
||||||
String txt=TTR("Scene '")+E->key()+"' has broken dependencies:\n";
|
String txt=vformat(TTR("Scene '%s' has broken dependencies:"),E->key())+"\n";
|
||||||
for(Set<String>::Element *F=E->get().front();F;F=F->next()) {
|
for(Set<String>::Element *F=E->get().front();F;F=F->next()) {
|
||||||
txt+="\t"+F->get()+"\n";
|
txt+="\t"+F->get()+"\n";
|
||||||
}
|
}
|
||||||
@ -3916,8 +3917,8 @@ void EditorNode::_save_optimized() {
|
|||||||
if (err) {
|
if (err) {
|
||||||
|
|
||||||
//accept->"()->hide();
|
//accept->"()->hide();
|
||||||
accept->get_ok()->set_text(TTR("I see.."));
|
accept->get_ok()->set_text("I see..");
|
||||||
accept->set_text(TTR("Error saving optimized scene: ")+path);
|
accept->set_text("Error saving optimized scene: "+path);
|
||||||
accept->popup_centered(Size2(300,70));;
|
accept->popup_centered(Size2(300,70));;
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -4949,7 +4950,7 @@ Variant EditorNode::drag_files(const Vector<String>& p_files, Control *p_from){
|
|||||||
if (p_files.size()>max_files) {
|
if (p_files.size()>max_files) {
|
||||||
|
|
||||||
Label* label=memnew( Label );
|
Label* label=memnew( Label );
|
||||||
label->set_text(itos(p_files.size()-max_files)+" "+TTR("More File(s)"));
|
label->set_text(vformat(TTR("%d more file(s)"), p_files.size()-max_files));
|
||||||
files->add_child(label);
|
files->add_child(label);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -4980,7 +4981,7 @@ Variant EditorNode::drag_files_and_dirs(const Vector<String>& p_files, Control *
|
|||||||
if (p_files.size()>max_files) {
|
if (p_files.size()>max_files) {
|
||||||
|
|
||||||
Label* label=memnew( Label );
|
Label* label=memnew( Label );
|
||||||
label->set_text(itos(p_files.size()-max_files)+" "+TTR("More File(s) and/or Directory(s)"));
|
label->set_text(vformat(TTR("%d more file(s) or folder(s)"), p_files.size()-max_files));
|
||||||
files->add_child(label);
|
files->add_child(label);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -5151,7 +5152,7 @@ EditorNode::EditorNode() {
|
|||||||
ObjectTypeDB::set_type_enabled("CollisionShape",true);
|
ObjectTypeDB::set_type_enabled("CollisionShape",true);
|
||||||
ObjectTypeDB::set_type_enabled("CollisionShape2D",true);
|
ObjectTypeDB::set_type_enabled("CollisionShape2D",true);
|
||||||
ObjectTypeDB::set_type_enabled("CollisionPolygon2D",true);
|
ObjectTypeDB::set_type_enabled("CollisionPolygon2D",true);
|
||||||
//ObjectTypeDB::set_type_enabled(TTR("BodyVolumeConvexPolygon"),true);
|
//ObjectTypeDB::set_type_enabled("BodyVolumeConvexPolygon",true);
|
||||||
|
|
||||||
gui_base = memnew( Panel );
|
gui_base = memnew( Panel );
|
||||||
add_child(gui_base);
|
add_child(gui_base);
|
||||||
@ -5512,20 +5513,20 @@ EditorNode::EditorNode() {
|
|||||||
menu_panel->add_child( node_menu );
|
menu_panel->add_child( node_menu );
|
||||||
|
|
||||||
p=node_menu->get_popup();
|
p=node_menu->get_popup();
|
||||||
p->add_item(TTR("Create"),NODE_CREATE);
|
p->add_item("Create",NODE_CREATE);
|
||||||
p->add_item(TTR("Instance"),NODE_INSTANCE);
|
p->add_item("Instance",NODE_INSTANCE);
|
||||||
p->add_separator();
|
p->add_separator();
|
||||||
p->add_item(TTR("Reparent"),NODE_REPARENT);
|
p->add_item("Reparent",NODE_REPARENT);
|
||||||
p->add_item(TTR("Move Up"),NODE_MOVE_UP);
|
p->add_item("Move Up",NODE_MOVE_UP);
|
||||||
p->add_item(TTR("Move Down"),NODE_MOVE_DOWN);
|
p->add_item("Move Down",NODE_MOVE_DOWN);
|
||||||
p->add_separator();
|
p->add_separator();
|
||||||
p->add_item(TTR("Duplicate"),NODE_DUPLICATE);
|
p->add_item("Duplicate",NODE_DUPLICATE);
|
||||||
p->add_separator();
|
p->add_separator();
|
||||||
p->add_item(TTR("Remove (Branch)"),NODE_REMOVE_BRANCH);
|
p->add_item("Remove (Branch)",NODE_REMOVE_BRANCH);
|
||||||
p->add_item(TTR("Remove (Element)"),NODE_REMOVE_ELEMENT);
|
p->add_item("Remove (Element)",NODE_REMOVE_ELEMENT);
|
||||||
p->add_separator();
|
p->add_separator();
|
||||||
p->add_item(TTR("Edit Subscriptions.."),NODE_CONNECTIONS);
|
p->add_item("Edit Subscriptions..",NODE_CONNECTIONS);
|
||||||
p->add_item(TTR("Edit Groups.."),NODE_GROUPS);
|
p->add_item("Edit Groups..",NODE_GROUPS);
|
||||||
|
|
||||||
resource_menu = memnew( MenuButton );
|
resource_menu = memnew( MenuButton );
|
||||||
resource_menu->set_text("Resource");
|
resource_menu->set_text("Resource");
|
||||||
@ -5543,7 +5544,7 @@ EditorNode::EditorNode() {
|
|||||||
p->connect("item_pressed",this,"_menu_option");
|
p->connect("item_pressed",this,"_menu_option");
|
||||||
|
|
||||||
tool_menu = memnew( MenuButton );
|
tool_menu = memnew( MenuButton );
|
||||||
tool_menu->set_tooltip(TTR("Miscelaneous project or scene wide tools."));
|
tool_menu->set_tooltip(TTR("Miscellaneous project or scene-wide tools."));
|
||||||
tool_menu->set_text(TTR("Tools"));
|
tool_menu->set_text(TTR("Tools"));
|
||||||
|
|
||||||
//tool_menu->set_icon(gui_base->get_icon("Save","EditorIcons"));
|
//tool_menu->set_icon(gui_base->get_icon("Save","EditorIcons"));
|
||||||
@ -5602,6 +5603,7 @@ EditorNode::EditorNode() {
|
|||||||
pause_button->set_disabled(true);
|
pause_button->set_disabled(true);
|
||||||
play_hb->add_child(pause_button);
|
play_hb->add_child(pause_button);
|
||||||
|
|
||||||
|
|
||||||
stop_button = memnew( ToolButton );
|
stop_button = memnew( ToolButton );
|
||||||
play_hb->add_child(stop_button);
|
play_hb->add_child(stop_button);
|
||||||
//stop_button->set_toggle_mode(true);
|
//stop_button->set_toggle_mode(true);
|
||||||
@ -5636,7 +5638,7 @@ EditorNode::EditorNode() {
|
|||||||
play_custom_scene_button->set_focus_mode(Control::FOCUS_NONE);
|
play_custom_scene_button->set_focus_mode(Control::FOCUS_NONE);
|
||||||
play_custom_scene_button->set_icon(gui_base->get_icon("PlayCustom","EditorIcons"));
|
play_custom_scene_button->set_icon(gui_base->get_icon("PlayCustom","EditorIcons"));
|
||||||
play_custom_scene_button->connect("pressed", this,"_menu_option",make_binds(RUN_PLAY_CUSTOM_SCENE));
|
play_custom_scene_button->connect("pressed", this,"_menu_option",make_binds(RUN_PLAY_CUSTOM_SCENE));
|
||||||
play_custom_scene_button->set_tooltip(TTR("Play custom scene (")+keycode_get_string(KEY_MASK_CMD|KEY_MASK_SHIFT|KEY_F5)+").");
|
play_custom_scene_button->set_tooltip(TTR("Play custom scene")+" ("+keycode_get_string(KEY_MASK_CMD|KEY_MASK_SHIFT|KEY_F5)+").");
|
||||||
|
|
||||||
debug_button = memnew( MenuButton );
|
debug_button = memnew( MenuButton );
|
||||||
debug_button->set_flat(true);
|
debug_button->set_flat(true);
|
||||||
@ -5645,7 +5647,7 @@ EditorNode::EditorNode() {
|
|||||||
debug_button->set_focus_mode(Control::FOCUS_NONE);
|
debug_button->set_focus_mode(Control::FOCUS_NONE);
|
||||||
debug_button->set_icon(gui_base->get_icon("Remote","EditorIcons"));
|
debug_button->set_icon(gui_base->get_icon("Remote","EditorIcons"));
|
||||||
//debug_button->connect("pressed", this,"_menu_option",make_binds(RUN_LIVE_DEBUG));
|
//debug_button->connect("pressed", this,"_menu_option",make_binds(RUN_LIVE_DEBUG));
|
||||||
debug_button->set_tooltip(TTR("Debug Options"));
|
debug_button->set_tooltip(TTR("Debug options"));
|
||||||
|
|
||||||
p=debug_button->get_popup();
|
p=debug_button->get_popup();
|
||||||
p->add_check_item(TTR("Live Editing"),RUN_LIVE_DEBUG);
|
p->add_check_item(TTR("Live Editing"),RUN_LIVE_DEBUG);
|
||||||
@ -5723,9 +5725,9 @@ EditorNode::EditorNode() {
|
|||||||
right_menu_hb->add_child( settings_menu );
|
right_menu_hb->add_child( settings_menu );
|
||||||
p=settings_menu->get_popup();
|
p=settings_menu->get_popup();
|
||||||
|
|
||||||
//p->add_item(TTR("Export Settings"),SETTINGS_EXPORT_PREFERENCES);
|
//p->add_item("Export Settings",SETTINGS_EXPORT_PREFERENCES);
|
||||||
p->add_item(TTR("Editor Settings"),SETTINGS_PREFERENCES);
|
p->add_item(TTR("Editor Settings"),SETTINGS_PREFERENCES);
|
||||||
//p->add_item(TTR("Optimization Presets"),SETTINGS_OPTIMIZED_PRESETS);
|
//p->add_item("Optimization Presets",SETTINGS_OPTIMIZED_PRESETS);
|
||||||
p->add_separator();
|
p->add_separator();
|
||||||
editor_layouts = memnew( PopupMenu );
|
editor_layouts = memnew( PopupMenu );
|
||||||
editor_layouts->set_name("Layouts");
|
editor_layouts->set_name("Layouts");
|
||||||
@ -5783,7 +5785,7 @@ EditorNode::EditorNode() {
|
|||||||
dock_slot[DOCK_SLOT_LEFT_UR]->add_child(scene_tree_dock);
|
dock_slot[DOCK_SLOT_LEFT_UR]->add_child(scene_tree_dock);
|
||||||
#if 0
|
#if 0
|
||||||
resources_dock = memnew( ResourcesDock(this) );
|
resources_dock = memnew( ResourcesDock(this) );
|
||||||
resources_dock->set_name(TTR("Resources"));
|
resources_dock->set_name("Resources");
|
||||||
//top_pallete->add_child(resources_dock);
|
//top_pallete->add_child(resources_dock);
|
||||||
dock_slot[DOCK_SLOT_RIGHT_BL]->add_child(resources_dock);
|
dock_slot[DOCK_SLOT_RIGHT_BL]->add_child(resources_dock);
|
||||||
//top_pallete->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
//top_pallete->set_v_size_flags(Control::SIZE_EXPAND_FILL);
|
||||||
@ -5817,21 +5819,21 @@ EditorNode::EditorNode() {
|
|||||||
prop_editor_base->add_child(prop_editor_hb);
|
prop_editor_base->add_child(prop_editor_hb);
|
||||||
|
|
||||||
resource_new_button = memnew( ToolButton );
|
resource_new_button = memnew( ToolButton );
|
||||||
resource_new_button->set_tooltip(TTR("Create a new resource in memory and edit it"));
|
resource_new_button->set_tooltip(TTR("Create a new resource in memory and edit it."));
|
||||||
resource_new_button->set_icon(gui_base->get_icon("New","EditorIcons"));
|
resource_new_button->set_icon(gui_base->get_icon("New","EditorIcons"));
|
||||||
prop_editor_hb->add_child(resource_new_button);
|
prop_editor_hb->add_child(resource_new_button);
|
||||||
resource_new_button->connect("pressed",this,"_menu_option",varray(RESOURCE_NEW));
|
resource_new_button->connect("pressed",this,"_menu_option",varray(RESOURCE_NEW));
|
||||||
resource_new_button->set_focus_mode(Control::FOCUS_NONE);
|
resource_new_button->set_focus_mode(Control::FOCUS_NONE);
|
||||||
|
|
||||||
resource_load_button = memnew( ToolButton );
|
resource_load_button = memnew( ToolButton );
|
||||||
resource_load_button->set_tooltip(TTR("Load an existing resource from disk and edit it"));
|
resource_load_button->set_tooltip(TTR("Load an existing resource from disk and edit it."));
|
||||||
resource_load_button->set_icon(gui_base->get_icon("Load","EditorIcons"));
|
resource_load_button->set_icon(gui_base->get_icon("Load","EditorIcons"));
|
||||||
prop_editor_hb->add_child(resource_load_button);
|
prop_editor_hb->add_child(resource_load_button);
|
||||||
resource_load_button->connect("pressed",this,"_menu_option",varray(RESOURCE_LOAD));
|
resource_load_button->connect("pressed",this,"_menu_option",varray(RESOURCE_LOAD));
|
||||||
resource_load_button->set_focus_mode(Control::FOCUS_NONE);
|
resource_load_button->set_focus_mode(Control::FOCUS_NONE);
|
||||||
|
|
||||||
resource_save_button = memnew( MenuButton );
|
resource_save_button = memnew( MenuButton );
|
||||||
resource_save_button->set_tooltip(TTR("Save the currently edited resource"));
|
resource_save_button->set_tooltip(TTR("Save the currently edited resource."));
|
||||||
resource_save_button->set_icon(gui_base->get_icon("Save","EditorIcons"));
|
resource_save_button->set_icon(gui_base->get_icon("Save","EditorIcons"));
|
||||||
prop_editor_hb->add_child(resource_save_button);
|
prop_editor_hb->add_child(resource_save_button);
|
||||||
resource_save_button->get_popup()->add_item(TTR("Save"),RESOURCE_SAVE);
|
resource_save_button->get_popup()->add_item(TTR("Save"),RESOURCE_SAVE);
|
||||||
@ -5860,7 +5862,7 @@ EditorNode::EditorNode() {
|
|||||||
|
|
||||||
|
|
||||||
editor_history_menu = memnew( MenuButton );
|
editor_history_menu = memnew( MenuButton );
|
||||||
editor_history_menu->set_tooltip(TTR("History of recently edited objects"));
|
editor_history_menu->set_tooltip(TTR("History of recently edited objects."));
|
||||||
editor_history_menu->set_icon( gui_base->get_icon("History","EditorIcons"));
|
editor_history_menu->set_icon( gui_base->get_icon("History","EditorIcons"));
|
||||||
prop_editor_hb->add_child(editor_history_menu);
|
prop_editor_hb->add_child(editor_history_menu);
|
||||||
editor_history_menu->connect("about_to_show",this,"_prepare_history");
|
editor_history_menu->connect("about_to_show",this,"_prepare_history");
|
||||||
@ -5896,7 +5898,7 @@ EditorNode::EditorNode() {
|
|||||||
prop_editor_base->add_child(search_bar);
|
prop_editor_base->add_child(search_bar);
|
||||||
search_bar->hide();
|
search_bar->hide();
|
||||||
|
|
||||||
Label *l = memnew( Label(TTR("Search: ")) );
|
Label *l = memnew( Label(TTR("Search:")+" ") );
|
||||||
search_bar->add_child(l);
|
search_bar->add_child(l);
|
||||||
|
|
||||||
search_box = memnew( LineEdit );
|
search_box = memnew( LineEdit );
|
||||||
@ -6081,7 +6083,7 @@ EditorNode::EditorNode() {
|
|||||||
|
|
||||||
|
|
||||||
about = memnew( AcceptDialog );
|
about = memnew( AcceptDialog );
|
||||||
about->set_title(TTR("Thanks so Much!"));
|
about->set_title(TTR("Thanks from the Godot community!"));
|
||||||
//about->get_cancel()->hide();
|
//about->get_cancel()->hide();
|
||||||
about->get_ok()->set_text(TTR("Thanks!"));
|
about->get_ok()->set_text(TTR("Thanks!"));
|
||||||
about->set_hide_on_ok(true);
|
about->set_hide_on_ok(true);
|
||||||
@ -6101,7 +6103,7 @@ EditorNode::EditorNode() {
|
|||||||
|
|
||||||
|
|
||||||
file_templates = memnew( FileDialog );
|
file_templates = memnew( FileDialog );
|
||||||
file_templates->set_title(TTR("Import Templates from ZIP file"));
|
file_templates->set_title(TTR("Import Templates From ZIP File"));
|
||||||
|
|
||||||
gui_base->add_child( file_templates );
|
gui_base->add_child( file_templates );
|
||||||
file_templates->set_mode(FileDialog::MODE_OPEN_FILE);
|
file_templates->set_mode(FileDialog::MODE_OPEN_FILE);
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
void EditorReImportDialog::popup_reimport() {
|
void EditorReImportDialog::popup_reimport() {
|
||||||
|
|
||||||
if (EditorFileSystem::get_singleton()->is_scanning()) {
|
if (EditorFileSystem::get_singleton()->is_scanning()) {
|
||||||
error->set_text(TTR("Please wait for scan to complete"));
|
error->set_text(TTR("Please wait for scan to complete."));
|
||||||
error->popup_centered_minsize();
|
error->popup_centered_minsize();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -92,7 +92,7 @@ void EditorReImportDialog::popup_reimport() {
|
|||||||
void EditorReImportDialog::ok_pressed() {
|
void EditorReImportDialog::ok_pressed() {
|
||||||
|
|
||||||
if (EditorFileSystem::get_singleton()->is_scanning()) {
|
if (EditorFileSystem::get_singleton()->is_scanning()) {
|
||||||
error->set_text(TTR("Please wait for scan to complete"));
|
error->set_text(TTR("Please wait for scan to complete."));
|
||||||
error->popup_centered_minsize();
|
error->popup_centered_minsize();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -9,12 +9,12 @@
|
|||||||
void EditorScript::add_root_node(Node *p_node) {
|
void EditorScript::add_root_node(Node *p_node) {
|
||||||
|
|
||||||
if (!editor) {
|
if (!editor) {
|
||||||
EditorNode::add_io_error(TTR("EditorScript::add_root_node : Write your logic in the _run() method."));
|
EditorNode::add_io_error("EditorScript::add_root_node: "+TTR("Write your logic in the _run() method."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (editor->get_edited_scene()) {
|
if (editor->get_edited_scene()) {
|
||||||
EditorNode::add_io_error(TTR("EditorScript::add_root_node : There is an edited scene already."));
|
EditorNode::add_io_error("EditorScript::add_root_node: "+TTR("There is an edited scene already."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -24,7 +24,7 @@ void EditorScript::add_root_node(Node *p_node) {
|
|||||||
Node *EditorScript::get_scene() {
|
Node *EditorScript::get_scene() {
|
||||||
|
|
||||||
if (!editor) {
|
if (!editor) {
|
||||||
EditorNode::add_io_error(TTR("EditorScript::get_scene : Write your logic in the _run() method."));
|
EditorNode::add_io_error("EditorScript::get_scene: "+TTR("Write your logic in the _run() method."));
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -36,7 +36,7 @@ void EditorScript::_run() {
|
|||||||
Ref<Script> s = get_script();
|
Ref<Script> s = get_script();
|
||||||
ERR_FAIL_COND(!s.is_valid());
|
ERR_FAIL_COND(!s.is_valid());
|
||||||
if (!get_script_instance()) {
|
if (!get_script_instance()) {
|
||||||
EditorNode::add_io_error("Couldn't instance script:\n "+s->get_path()+"\nDid you forget the 'tool' keyword?");
|
EditorNode::add_io_error(TTR("Couldn't instance script:")+"\n "+s->get_path()+"\n"+TTR("Did you forget the 'tool' keyword?"));
|
||||||
return;
|
return;
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -46,7 +46,7 @@ void EditorScript::_run() {
|
|||||||
get_script_instance()->call("_run",NULL,0,ce);
|
get_script_instance()->call("_run",NULL,0,ce);
|
||||||
if (ce.error!=Variant::CallError::CALL_OK) {
|
if (ce.error!=Variant::CallError::CALL_OK) {
|
||||||
|
|
||||||
EditorNode::add_io_error("Couldn't run script:\n "+s->get_path()+"\nDid you forget the '_run' method?");
|
EditorNode::add_io_error(TTR("Couldn't run script:")+"\n "+s->get_path()+"\n"+TTR("Did you forget the '_run' method?"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -263,7 +263,7 @@ void EditorSettings::create() {
|
|||||||
|
|
||||||
memdelete(dir);
|
memdelete(dir);
|
||||||
|
|
||||||
singleton = ResourceLoader::load(config_file_path,TTR("EditorSettings"));
|
singleton = ResourceLoader::load(config_file_path,"EditorSettings");
|
||||||
if (singleton.is_null()) {
|
if (singleton.is_null()) {
|
||||||
WARN_PRINT("Could not open config file.");
|
WARN_PRINT("Could not open config file.");
|
||||||
goto fail;
|
goto fail;
|
||||||
@ -505,7 +505,8 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
|
|||||||
#else
|
#else
|
||||||
hints["import/pvrtc_texture_tool"]=PropertyInfo(Variant::STRING,"import/pvrtc_texture_tool",PROPERTY_HINT_GLOBAL_FILE,"");
|
hints["import/pvrtc_texture_tool"]=PropertyInfo(Variant::STRING,"import/pvrtc_texture_tool",PROPERTY_HINT_GLOBAL_FILE,"");
|
||||||
#endif
|
#endif
|
||||||
set(TTR("PVRTC/fast_conversion"),false);
|
// TODO: Rename to "import/pvrtc_fast_conversion" to match other names?
|
||||||
|
set("PVRTC/fast_conversion",false);
|
||||||
|
|
||||||
|
|
||||||
set("run/auto_save_before_running",true);
|
set("run/auto_save_before_running",true);
|
||||||
|
@ -198,7 +198,7 @@ EditorSubScene::EditorSubScene() {
|
|||||||
|
|
||||||
scene=NULL;
|
scene=NULL;
|
||||||
|
|
||||||
set_title(TTR("Select Sub-Scene.."));
|
set_title(TTR("Select Node(s) to Import"));
|
||||||
set_hide_on_ok(false);
|
set_hide_on_ok(false);
|
||||||
|
|
||||||
VBoxContainer *vb = memnew( VBoxContainer );
|
VBoxContainer *vb = memnew( VBoxContainer );
|
||||||
|
@ -278,7 +278,7 @@ ImportSettingsDialog::ImportSettingsDialog(EditorNode *p_editor) {
|
|||||||
set_child_rect(tree);
|
set_child_rect(tree);
|
||||||
set_title(TTR("Imported Resources"));
|
set_title(TTR("Imported Resources"));
|
||||||
|
|
||||||
texformat=TTR("Keep,None,Disk,VRAM");
|
// texformat="Keep,None,Disk,VRAM";
|
||||||
|
|
||||||
tree->set_hide_root(true);
|
tree->set_hide_root(true);
|
||||||
tree->set_columns(2);
|
tree->set_columns(2);
|
||||||
@ -288,7 +288,7 @@ ImportSettingsDialog::ImportSettingsDialog(EditorNode *p_editor) {
|
|||||||
tree->connect("item_edited",this,"_item_edited");
|
tree->connect("item_edited",this,"_item_edited");
|
||||||
tree->connect("button_pressed",this,"_button_pressed");
|
tree->connect("button_pressed",this,"_button_pressed");
|
||||||
|
|
||||||
// add_button(TTR("Re-Import"),"reimport");
|
// add_button("Re-Import","reimport");
|
||||||
get_ok()->set_text(TTR("Re-Import"));
|
get_ok()->set_text(TTR("Re-Import"));
|
||||||
get_cancel()->set_text(TTR("Close"));
|
get_cancel()->set_text(TTR("Close"));
|
||||||
|
|
||||||
|
@ -527,7 +527,7 @@ class EditorFontImportDialog : public ConfirmationDialog {
|
|||||||
Ref<ResourceImportMetadata> rimd = get_rimd();
|
Ref<ResourceImportMetadata> rimd = get_rimd();
|
||||||
|
|
||||||
if (rimd.is_null()) {
|
if (rimd.is_null()) {
|
||||||
error_dialog->set_text(TTR("Can't load/process source font"));
|
error_dialog->set_text(TTR("Can't load/process source font."));
|
||||||
error_dialog->popup_centered(Size2(200,100));
|
error_dialog->popup_centered(Size2(200,100));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -657,14 +657,14 @@ public:
|
|||||||
testhb->add_child(test_color);
|
testhb->add_child(test_color);
|
||||||
|
|
||||||
vbl->add_spacer();
|
vbl->add_spacer();
|
||||||
vbl->add_margin_child(TTR("Test: "),testhb);
|
vbl->add_margin_child(TTR("Test:")+" ",testhb);
|
||||||
/*
|
/*
|
||||||
HBoxContainer *upd_hb = memnew( HBoxContainer );
|
HBoxContainer *upd_hb = memnew( HBoxContainer );
|
||||||
// vbl->add_child(upd_hb);
|
// vbl->add_child(upd_hb);
|
||||||
upd_hb->add_spacer();
|
upd_hb->add_spacer();
|
||||||
Button *update = memnew( Button);
|
Button *update = memnew( Button);
|
||||||
upd_hb->add_child(update);
|
upd_hb->add_child(update);
|
||||||
update->set_text(TTR("Update"));
|
update->set_text("Update");
|
||||||
update->connect("pressed",this,"_update");
|
update->connect("pressed",this,"_update");
|
||||||
*/
|
*/
|
||||||
options = memnew( _EditorFontImportOptions );
|
options = memnew( _EditorFontImportOptions );
|
||||||
@ -887,7 +887,7 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe
|
|||||||
if (src_path.extension().to_lower()=="fnt") {
|
if (src_path.extension().to_lower()=="fnt") {
|
||||||
|
|
||||||
if (ResourceLoader::load(src_path).is_valid()) {
|
if (ResourceLoader::load(src_path).is_valid()) {
|
||||||
EditorNode::get_singleton()->show_warning(TTR("Path: ")+src_path+"\nIs a Godot font file, please supply a BMFont type file instead.");
|
EditorNode::get_singleton()->show_warning(TTR("Path:")+" "+src_path+"\n"+TTR("This file is already a Godot font file, please supply a BMFont type file instead."));
|
||||||
return Ref<BitmapFont>();
|
return Ref<BitmapFont>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -895,7 +895,7 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe
|
|||||||
font.instance();
|
font.instance();
|
||||||
Error err = font->create_from_fnt(src_path);
|
Error err = font->create_from_fnt(src_path);
|
||||||
if (err) {
|
if (err) {
|
||||||
EditorNode::get_singleton()->show_warning(TTR("Path: ")+src_path+"\nFailed opening as BMFont file.");
|
EditorNode::get_singleton()->show_warning(TTR("Path:")+" "+src_path+"\n"+TTR("Failed opening as BMFont file."));
|
||||||
return Ref<BitmapFont>();
|
return Ref<BitmapFont>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -939,7 +939,7 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe
|
|||||||
|
|
||||||
if ( error ) {
|
if ( error ) {
|
||||||
FT_Done_FreeType( library );
|
FT_Done_FreeType( library );
|
||||||
ERR_EXPLAIN(TTR("Invalid font size. "));
|
ERR_EXPLAIN(TTR("Invalid font size."));
|
||||||
ERR_FAIL_COND_V( error,Ref<BitmapFont>() );
|
ERR_FAIL_COND_V( error,Ref<BitmapFont>() );
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -986,7 +986,7 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe
|
|||||||
if ( !fa ) {
|
if ( !fa ) {
|
||||||
|
|
||||||
FT_Done_FreeType( library );
|
FT_Done_FreeType( library );
|
||||||
ERR_EXPLAIN(TTR("Invalid font custom source. "));
|
ERR_EXPLAIN(TTR("Invalid font custom source."));
|
||||||
ERR_FAIL_COND_V( !fa,Ref<BitmapFont>() );
|
ERR_FAIL_COND_V( !fa,Ref<BitmapFont>() );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -207,6 +207,13 @@ public:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
String dst = save_path->get_text();
|
||||||
|
if (dst=="") {
|
||||||
|
error_dialog->set_text(TTR("Save path is empty!"));
|
||||||
|
error_dialog->popup_centered_minsize();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
for(int i=0;i<meshes.size();i++) {
|
for(int i=0;i<meshes.size();i++) {
|
||||||
|
|
||||||
Ref<ResourceImportMetadata> imd = memnew( ResourceImportMetadata );
|
Ref<ResourceImportMetadata> imd = memnew( ResourceImportMetadata );
|
||||||
@ -224,16 +231,9 @@ public:
|
|||||||
|
|
||||||
imd->add_source(EditorImportPlugin::validate_source_path(meshes[i]));
|
imd->add_source(EditorImportPlugin::validate_source_path(meshes[i]));
|
||||||
|
|
||||||
String dst = save_path->get_text();
|
String file_path = dst.plus_file(meshes[i].get_file().basename()+".msh");
|
||||||
if (dst=="") {
|
|
||||||
error_dialog->set_text(TTR("Save path is empty!"));
|
|
||||||
error_dialog->popup_centered_minsize();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
dst = dst.plus_file(meshes[i].get_file().basename()+".msh");
|
plugin->import(file_path,imd);
|
||||||
|
|
||||||
plugin->import(dst,imd);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
hide();
|
hide();
|
||||||
@ -362,7 +362,7 @@ Error EditorMeshImportPlugin::import(const String& p_path, const Ref<ResourceImp
|
|||||||
if (mesh->surface_get_name(i)!="")
|
if (mesh->surface_get_name(i)!="")
|
||||||
name=mesh->surface_get_name(i);
|
name=mesh->surface_get_name(i);
|
||||||
else
|
else
|
||||||
name=TTR("Surface ")+itos(i+1);
|
name=vformat(TTR("Surface %d"),i+1);
|
||||||
|
|
||||||
name_map[name]=mesh->surface_get_material(i);
|
name_map[name]=mesh->surface_get_material(i);
|
||||||
}
|
}
|
||||||
@ -498,7 +498,7 @@ Error EditorMeshImportPlugin::import(const String& p_path, const Ref<ResourceImp
|
|||||||
surf_tool->index();
|
surf_tool->index();
|
||||||
mesh = surf_tool->commit(mesh);
|
mesh = surf_tool->commit(mesh);
|
||||||
if (name=="")
|
if (name=="")
|
||||||
name=TTR("Surface ")+itos(mesh->get_surface_count()-1);
|
name=vformat(TTR("Surface %d"),mesh->get_surface_count()-1);
|
||||||
mesh->surface_set_name(mesh->get_surface_count()-1,name);
|
mesh->surface_set_name(mesh->get_surface_count()-1,name);
|
||||||
name="";
|
name="";
|
||||||
surf_tool->clear();
|
surf_tool->clear();
|
||||||
|
@ -262,7 +262,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!save_path->get_text().begins_with("res://")) {
|
if (!save_path->get_text().begins_with("res://")) {
|
||||||
error_dialog->set_text(TTR("Target path must be full resource path."));
|
error_dialog->set_text(TTR("Target path must be a complete resource path."));
|
||||||
error_dialog->popup_centered_minsize();
|
error_dialog->popup_centered_minsize();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -406,7 +406,7 @@ String EditorSampleImportPlugin::get_name() const {
|
|||||||
}
|
}
|
||||||
String EditorSampleImportPlugin::get_visible_name() const{
|
String EditorSampleImportPlugin::get_visible_name() const{
|
||||||
|
|
||||||
return TTR("Audio Sample");
|
return "Audio Sample";
|
||||||
}
|
}
|
||||||
void EditorSampleImportPlugin::import_dialog(const String& p_from){
|
void EditorSampleImportPlugin::import_dialog(const String& p_from){
|
||||||
|
|
||||||
|
@ -686,7 +686,7 @@ void EditorSceneImportDialog::_import(bool p_and_open) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!save_path->get_text().begins_with("res://")) {
|
if (!save_path->get_text().begins_with("res://")) {
|
||||||
error_dialog->set_text(TTR("Target path must be full resource path."));
|
error_dialog->set_text(TTR("Target path must be a complete resource path."));
|
||||||
error_dialog->popup_centered_minsize();
|
error_dialog->popup_centered_minsize();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -721,7 +721,7 @@ void EditorSceneImportDialog::_import(bool p_and_open) {
|
|||||||
if (script_path->get_text()!="") {
|
if (script_path->get_text()!="") {
|
||||||
Ref<Script> scr = ResourceLoader::load(script_path->get_text());
|
Ref<Script> scr = ResourceLoader::load(script_path->get_text());
|
||||||
if (!scr.is_valid()) {
|
if (!scr.is_valid()) {
|
||||||
error_dialog->set_text(TTR("Couldn't load Post-Import Script."));
|
error_dialog->set_text(TTR("Couldn't load post-import script."));
|
||||||
error_dialog->popup_centered(Size2(200,100));
|
error_dialog->popup_centered(Size2(200,100));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -730,7 +730,7 @@ void EditorSceneImportDialog::_import(bool p_and_open) {
|
|||||||
pi->set_script(scr.get_ref_ptr());
|
pi->set_script(scr.get_ref_ptr());
|
||||||
if (!pi->get_script_instance()) {
|
if (!pi->get_script_instance()) {
|
||||||
|
|
||||||
error_dialog->set_text(TTR("Invalid/Broken Script for Post-Import."));
|
error_dialog->set_text(TTR("Invalid/broken script for post-import."));
|
||||||
error_dialog->popup_centered(Size2(200,100));
|
error_dialog->popup_centered(Size2(200,100));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -816,7 +816,7 @@ void EditorSceneImportDialog::_import(bool p_and_open) {
|
|||||||
|
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
||||||
error_dialog->set_text(TTR("Error importing scene."));
|
error_dialog->set_text("Error importing scene.");
|
||||||
error_dialog->popup_centered(Size2(200,100));
|
error_dialog->popup_centered(Size2(200,100));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1164,14 +1164,14 @@ EditorSceneImportDialog::EditorSceneImportDialog(EditorNode *p_editor, EditorSce
|
|||||||
|
|
||||||
this_import = memnew( OptionButton );
|
this_import = memnew( OptionButton );
|
||||||
this_import->add_item(TTR("Overwrite Existing Scene"));
|
this_import->add_item(TTR("Overwrite Existing Scene"));
|
||||||
this_import->add_item("Overwrite Existing, Keep Materials");
|
this_import->add_item(TTR("Overwrite Existing, Keep Materials"));
|
||||||
this_import->add_item(TTR("Keep Existing, Merge with New"));
|
this_import->add_item(TTR("Keep Existing, Merge with New"));
|
||||||
this_import->add_item(TTR("Keep Existing, Ignore New"));
|
this_import->add_item(TTR("Keep Existing, Ignore New"));
|
||||||
vbc->add_margin_child(TTR("This Time:"),this_import);
|
vbc->add_margin_child(TTR("This Time:"),this_import);
|
||||||
|
|
||||||
next_import = memnew( OptionButton );
|
next_import = memnew( OptionButton );
|
||||||
next_import->add_item(TTR("Overwrite Existing Scene"));
|
next_import->add_item(TTR("Overwrite Existing Scene"));
|
||||||
next_import->add_item("Overwrite Existing, Keep Materials");
|
next_import->add_item(TTR("Overwrite Existing, Keep Materials"));
|
||||||
next_import->add_item(TTR("Keep Existing, Merge with New"));
|
next_import->add_item(TTR("Keep Existing, Merge with New"));
|
||||||
next_import->add_item(TTR("Keep Existing, Ignore New"));
|
next_import->add_item(TTR("Keep Existing, Ignore New"));
|
||||||
vbc->add_margin_child(TTR("Next Time:"),next_import);
|
vbc->add_margin_child(TTR("Next Time:"),next_import);
|
||||||
@ -2735,13 +2735,13 @@ Error EditorSceneImportPlugin::import2(Node *scene, const String& p_dest_path, c
|
|||||||
post_import_script_path = post_import_script_path;
|
post_import_script_path = post_import_script_path;
|
||||||
Ref<Script> scr = ResourceLoader::load(post_import_script_path);
|
Ref<Script> scr = ResourceLoader::load(post_import_script_path);
|
||||||
if (!scr.is_valid()) {
|
if (!scr.is_valid()) {
|
||||||
EditorNode::add_io_error(TTR("Couldn't load post-import script: '")+post_import_script_path);
|
EditorNode::add_io_error(TTR("Couldn't load post-import script:")+" "+post_import_script_path);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
post_import_script = Ref<EditorScenePostImport>( memnew( EditorScenePostImport ) );
|
post_import_script = Ref<EditorScenePostImport>( memnew( EditorScenePostImport ) );
|
||||||
post_import_script->set_script(scr.get_ref_ptr());
|
post_import_script->set_script(scr.get_ref_ptr());
|
||||||
if (!post_import_script->get_script_instance()) {
|
if (!post_import_script->get_script_instance()) {
|
||||||
EditorNode::add_io_error(TTR("Invalid/Broken Script for Post-Import: '")+post_import_script_path);
|
EditorNode::add_io_error(TTR("Invalid/broken script for post-import:")+" "+post_import_script_path);
|
||||||
post_import_script.unref();
|
post_import_script.unref();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2751,7 +2751,7 @@ Error EditorSceneImportPlugin::import2(Node *scene, const String& p_dest_path, c
|
|||||||
if (post_import_script.is_valid()) {
|
if (post_import_script.is_valid()) {
|
||||||
scene = post_import_script->post_import(scene);
|
scene = post_import_script->post_import(scene);
|
||||||
if (!scene) {
|
if (!scene) {
|
||||||
EditorNode::add_io_error(TTR("Error running Post-Import script: '")+post_import_script_path);
|
EditorNode::add_io_error(TTR("Error running post-import script:")+" "+post_import_script_path);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2780,18 +2780,18 @@ Error EditorSceneImportPlugin::import2(Node *scene, const String& p_dest_path, c
|
|||||||
String path = texture->get_path();
|
String path = texture->get_path();
|
||||||
String fname= path.get_file();
|
String fname= path.get_file();
|
||||||
String target_path = Globals::get_singleton()->localize_path(target_res_path.plus_file(fname));
|
String target_path = Globals::get_singleton()->localize_path(target_res_path.plus_file(fname));
|
||||||
progress.step(TTR("Import Img: ")+fname,3+(idx)*100/imagemap.size());
|
progress.step(TTR("Import Image:")+" "+fname,3+(idx)*100/imagemap.size());
|
||||||
|
|
||||||
idx++;
|
idx++;
|
||||||
|
|
||||||
if (path==target_path) {
|
if (path==target_path) {
|
||||||
|
|
||||||
EditorNode::add_io_error(TTR("Can't import a file over itself: '")+target_path);
|
EditorNode::add_io_error(TTR("Can't import a file over itself:")+" "+target_path);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!target_path.begins_with("res://")) {
|
if (!target_path.begins_with("res://")) {
|
||||||
EditorNode::add_io_error(TTR("Couldn't localize path: '")+target_path+"' (already local)");
|
EditorNode::add_io_error(vformat(TTR("Couldn't localize path: %s (already local)"),target_path));
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -507,15 +507,15 @@ void EditorSceneImporterFBXConv::_parse_materials(State& state) {
|
|||||||
if (tex.is_valid() && texture.has("type")) {
|
if (tex.is_valid() && texture.has("type")) {
|
||||||
|
|
||||||
String type=texture["type"];
|
String type=texture["type"];
|
||||||
if (type==TTR("DIFFUSE"))
|
if (type=="DIFFUSE")
|
||||||
mat->set_texture(FixedMaterial::PARAM_DIFFUSE,tex);
|
mat->set_texture(FixedMaterial::PARAM_DIFFUSE,tex);
|
||||||
else if (type==TTR("SPECULAR"))
|
else if (type=="SPECULAR")
|
||||||
mat->set_texture(FixedMaterial::PARAM_SPECULAR,tex);
|
mat->set_texture(FixedMaterial::PARAM_SPECULAR,tex);
|
||||||
else if (type==TTR("SHININESS"))
|
else if (type=="SHININESS")
|
||||||
mat->set_texture(FixedMaterial::PARAM_SPECULAR_EXP,tex);
|
mat->set_texture(FixedMaterial::PARAM_SPECULAR_EXP,tex);
|
||||||
else if (type=="NORMAL")
|
else if (type=="NORMAL")
|
||||||
mat->set_texture(FixedMaterial::PARAM_NORMAL,tex);
|
mat->set_texture(FixedMaterial::PARAM_NORMAL,tex);
|
||||||
else if (type==TTR("EMISSIVE"))
|
else if (type=="EMISSIVE")
|
||||||
mat->set_texture(FixedMaterial::PARAM_EMISSION,tex);
|
mat->set_texture(FixedMaterial::PARAM_EMISSION,tex);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -570,13 +570,13 @@ void EditorSceneImporterFBXConv::_parse_surfaces(State& state) {
|
|||||||
exists[Mesh::ARRAY_COLOR]=true;
|
exists[Mesh::ARRAY_COLOR]=true;
|
||||||
ofs[Mesh::ARRAY_COLOR]=stride;
|
ofs[Mesh::ARRAY_COLOR]=stride;
|
||||||
stride+=4;
|
stride+=4;
|
||||||
} else if (attr==TTR("COLORPACKED")) {
|
} else if (attr=="COLORPACKED") {
|
||||||
stride+=1; //ignore
|
stride+=1; //ignore
|
||||||
} else if (attr==TTR("TANGENT")) {
|
} else if (attr=="TANGENT") {
|
||||||
exists[Mesh::ARRAY_TANGENT]=true;
|
exists[Mesh::ARRAY_TANGENT]=true;
|
||||||
ofs[Mesh::ARRAY_TANGENT]=stride;
|
ofs[Mesh::ARRAY_TANGENT]=stride;
|
||||||
stride+=3;
|
stride+=3;
|
||||||
} else if (attr==TTR("BINORMAL")) {
|
} else if (attr=="BINORMAL") {
|
||||||
binormal_ofs=stride;
|
binormal_ofs=stride;
|
||||||
stride+=3;
|
stride+=3;
|
||||||
} else if (attr=="TEXCOORD0") {
|
} else if (attr=="TEXCOORD0") {
|
||||||
@ -587,10 +587,10 @@ void EditorSceneImporterFBXConv::_parse_surfaces(State& state) {
|
|||||||
exists[Mesh::ARRAY_TEX_UV2]=true;
|
exists[Mesh::ARRAY_TEX_UV2]=true;
|
||||||
ofs[Mesh::ARRAY_TEX_UV2]=stride;
|
ofs[Mesh::ARRAY_TEX_UV2]=stride;
|
||||||
stride+=2;
|
stride+=2;
|
||||||
} else if (attr.begins_with(TTR("TEXCOORD"))) {
|
} else if (attr.begins_with("TEXCOORD")) {
|
||||||
stride+=2;
|
stride+=2;
|
||||||
} else if (attr.begins_with(TTR("BLENDWEIGHT"))) {
|
} else if (attr.begins_with("BLENDWEIGHT")) {
|
||||||
int idx=attr.replace(TTR("BLENDWEIGHT"),"").to_int();
|
int idx=attr.replace("BLENDWEIGHT","").to_int();
|
||||||
if (idx==0) {
|
if (idx==0) {
|
||||||
exists[Mesh::ARRAY_BONES]=true;
|
exists[Mesh::ARRAY_BONES]=true;
|
||||||
ofs[Mesh::ARRAY_BONES]=stride;
|
ofs[Mesh::ARRAY_BONES]=stride;
|
||||||
@ -799,13 +799,13 @@ void EditorSceneImporterFBXConv::_parse_surfaces(State& state) {
|
|||||||
|
|
||||||
if (part.has("type")) {
|
if (part.has("type")) {
|
||||||
String type=part["type"];
|
String type=part["type"];
|
||||||
if (type==TTR("LINES"))
|
if (type=="LINES")
|
||||||
pt=Mesh::PRIMITIVE_LINES;
|
pt=Mesh::PRIMITIVE_LINES;
|
||||||
else if (type==TTR("POINTS"))
|
else if (type=="POINTS")
|
||||||
pt=Mesh::PRIMITIVE_POINTS;
|
pt=Mesh::PRIMITIVE_POINTS;
|
||||||
else if (type==TTR("TRIANGLE_STRIP"))
|
else if (type=="TRIANGLE_STRIP")
|
||||||
pt=Mesh::PRIMITIVE_TRIANGLE_STRIP;
|
pt=Mesh::PRIMITIVE_TRIANGLE_STRIP;
|
||||||
else if (type==TTR("LINE_STRIP"))
|
else if (type=="LINE_STRIP")
|
||||||
pt=Mesh::PRIMITIVE_LINE_STRIP;
|
pt=Mesh::PRIMITIVE_LINE_STRIP;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1056,7 +1056,7 @@ Error EditorSceneImporterFBXConv::_parse_fbx(State& state,const String& p_path)
|
|||||||
}
|
}
|
||||||
|
|
||||||
args.push_back("-o");
|
args.push_back("-o");
|
||||||
args.push_back(TTR("G3DJ"));
|
args.push_back("G3DJ");
|
||||||
args.push_back(path);
|
args.push_back(path);
|
||||||
|
|
||||||
int res;
|
int res;
|
||||||
|
@ -53,17 +53,17 @@ static const char *flag_names[]={
|
|||||||
|
|
||||||
#if 0 // not used
|
#if 0 // not used
|
||||||
static const char *flag_short_names[]={
|
static const char *flag_short_names[]={
|
||||||
TTR("Stream"),
|
"Stream",
|
||||||
TTR("FixBorder"),
|
"FixBorder",
|
||||||
TTR("AlphBit"),
|
"AlphBit",
|
||||||
TTR("ExtComp"),
|
"ExtComp",
|
||||||
TTR("NoMipMap"),
|
"NoMipMap",
|
||||||
TTR("Repeat"),
|
"Repeat",
|
||||||
TTR("Filter"),
|
"Filter",
|
||||||
TTR("PMAlpha"),
|
"PMAlpha",
|
||||||
TTR("ToLinear"),
|
"ToLinear",
|
||||||
TTR("ToRG"),
|
"ToRG",
|
||||||
TTR("Anisoropic"),
|
"Anisoropic",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
#endif
|
#endif
|
||||||
@ -343,7 +343,7 @@ void EditorTextureImportDialog::_import() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!save_path->get_text().begins_with("res://")) {
|
if (!save_path->get_text().begins_with("res://")) {
|
||||||
error_dialog->set_text(TTR("Target path must be full resource path."));
|
error_dialog->set_text(TTR("Target path must be a complete resource path."));
|
||||||
error_dialog->popup_centered_minsize();
|
error_dialog->popup_centered_minsize();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -382,7 +382,7 @@ void EditorTextureImportDialog::_import() {
|
|||||||
Error err = plugin->import(dst_file,imd);
|
Error err = plugin->import(dst_file,imd);
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
||||||
error_dialog->set_text(TTR("Error importing: ")+dst_file.get_file());
|
error_dialog->set_text(TTR("Error importing:")+" "+dst_file.get_file());
|
||||||
error_dialog->popup_centered(Size2(200,100));
|
error_dialog->popup_centered(Size2(200,100));
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -391,7 +391,7 @@ void EditorTextureImportDialog::_import() {
|
|||||||
|
|
||||||
if (files.size()!=1) {
|
if (files.size()!=1) {
|
||||||
|
|
||||||
error_dialog->set_text(TTR("Only one file is required for large texture"));
|
error_dialog->set_text(TTR("Only one file is required for large texture."));
|
||||||
error_dialog->popup_centered(Size2(200,100));
|
error_dialog->popup_centered(Size2(200,100));
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -414,7 +414,7 @@ void EditorTextureImportDialog::_import() {
|
|||||||
Error err = plugin->import(dst_file,imd);
|
Error err = plugin->import(dst_file,imd);
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
||||||
error_dialog->set_text(TTR("Error importing: ")+dst_file.get_file());
|
error_dialog->set_text(TTR("Error importing:")+" "+dst_file.get_file());
|
||||||
error_dialog->popup_centered(Size2(200,100));
|
error_dialog->popup_centered(Size2(200,100));
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -438,7 +438,7 @@ void EditorTextureImportDialog::_import() {
|
|||||||
Error err = plugin->import(dst_file,imd);
|
Error err = plugin->import(dst_file,imd);
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
||||||
error_dialog->set_text(TTR("Error importing: ")+dst_file.get_file());
|
error_dialog->set_text(TTR("Error importing:")+" "+dst_file.get_file());
|
||||||
error_dialog->popup_centered(Size2(200,100));
|
error_dialog->popup_centered(Size2(200,100));
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -499,7 +499,7 @@ void EditorTextureImportDialog::_notification(int p_what) {
|
|||||||
|
|
||||||
List<String> extensions;
|
List<String> extensions;
|
||||||
ImageLoader::get_recognized_extensions(&extensions);
|
ImageLoader::get_recognized_extensions(&extensions);
|
||||||
// ResourceLoader::get_recognized_extensions_for_type(TTR("PackedTexture"),&extensions);
|
// ResourceLoader::get_recognized_extensions_for_type("PackedTexture",&extensions);
|
||||||
file_select->clear_filters();
|
file_select->clear_filters();
|
||||||
for(int i=0;i<extensions.size();i++) {
|
for(int i=0;i<extensions.size();i++) {
|
||||||
|
|
||||||
@ -579,7 +579,7 @@ EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin*
|
|||||||
|
|
||||||
if (p_atlas) {
|
if (p_atlas) {
|
||||||
size->set_val(2048);
|
size->set_val(2048);
|
||||||
vbc->add_margin_child(TTR("Max Texture size:"),size);
|
vbc->add_margin_child(TTR("Max Texture Size:"),size);
|
||||||
} else {
|
} else {
|
||||||
size->set_val(256);
|
size->set_val(256);
|
||||||
vbc->add_margin_child(TTR("Cell Size:"),size);
|
vbc->add_margin_child(TTR("Cell Size:"),size);
|
||||||
@ -612,9 +612,9 @@ EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin*
|
|||||||
save_file_select->set_mode(EditorFileDialog::MODE_SAVE_FILE);
|
save_file_select->set_mode(EditorFileDialog::MODE_SAVE_FILE);
|
||||||
save_file_select->clear_filters();
|
save_file_select->clear_filters();
|
||||||
if (large)
|
if (large)
|
||||||
save_file_select->add_filter("*.ltex;Large Texture");
|
save_file_select->add_filter("*.ltex;"+TTR("Large Texture"));
|
||||||
else
|
else
|
||||||
save_file_select->add_filter("*.tex;Base Atlas Texture");
|
save_file_select->add_filter("*.tex;"+TTR("Base Atlas Texture"));
|
||||||
save_file_select->connect("file_selected", this,"_choose_save_dir");
|
save_file_select->connect("file_selected", this,"_choose_save_dir");
|
||||||
|
|
||||||
save_select = memnew( EditorDirDialog );
|
save_select = memnew( EditorDirDialog );
|
||||||
@ -1057,7 +1057,7 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
|
|||||||
|
|
||||||
err = ResourceSaver::save(p_path,existing);
|
err = ResourceSaver::save(p_path,existing);
|
||||||
if (err!=OK) {
|
if (err!=OK) {
|
||||||
EditorNode::add_io_error(TTR("Couldn't save large texture: ")+p_path);
|
EditorNode::add_io_error(TTR("Couldn't save large texture:")+" "+p_path);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1072,7 +1072,7 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
|
|||||||
bool alpha=false;
|
bool alpha=false;
|
||||||
bool crop = from->get_option("crop");
|
bool crop = from->get_option("crop");
|
||||||
|
|
||||||
EditorProgress ep("make_atlas",TTR("Build Atlas For: ")+p_path.get_file(),from->get_source_count()+3);
|
EditorProgress ep("make_atlas",TTR("Build Atlas For:")+" "+p_path.get_file(),from->get_source_count()+3);
|
||||||
|
|
||||||
print_line("sources: "+itos(from->get_source_count()));
|
print_line("sources: "+itos(from->get_source_count()));
|
||||||
|
|
||||||
@ -1081,12 +1081,12 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
|
|||||||
String path = EditorImportPlugin::expand_source_path(from->get_source_path(i));
|
String path = EditorImportPlugin::expand_source_path(from->get_source_path(i));
|
||||||
String md5 = FileAccess::get_md5(path);
|
String md5 = FileAccess::get_md5(path);
|
||||||
from->set_source_md5(i,FileAccess::get_md5(path));
|
from->set_source_md5(i,FileAccess::get_md5(path));
|
||||||
ep.step(TTR("Loading Image: ")+path,i);
|
ep.step(TTR("Loading Image:")+" "+path,i);
|
||||||
print_line("source path: "+path+" md5 "+md5);
|
print_line("source path: "+path+" md5 "+md5);
|
||||||
Image src;
|
Image src;
|
||||||
Error err = ImageLoader::load_image(path,&src);
|
Error err = ImageLoader::load_image(path,&src);
|
||||||
if (err) {
|
if (err) {
|
||||||
EditorNode::add_io_error(TTR("Couldn't load image: ")+path);
|
EditorNode::add_io_error(TTR("Couldn't load image:")+" "+path);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1176,7 +1176,7 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
|
|||||||
Size2i dst_size;
|
Size2i dst_size;
|
||||||
EditorAtlas::fit(src_sizes,dst_positions,dst_size);
|
EditorAtlas::fit(src_sizes,dst_positions,dst_size);
|
||||||
|
|
||||||
print_line("size that workeD: "+itos(dst_size.width)+","+itos(dst_size.height));
|
print_line("size that worked: "+itos(dst_size.width)+","+itos(dst_size.height));
|
||||||
|
|
||||||
ep.step(TTR("Blitting Images"),sources.size()+2);
|
ep.step(TTR("Blitting Images"),sources.size()+2);
|
||||||
|
|
||||||
@ -1291,7 +1291,7 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
|
|||||||
atlases[i]->set_atlas(texture);
|
atlases[i]->set_atlas(texture);
|
||||||
Error err = ResourceSaver::save(apath,atlases[i]);
|
Error err = ResourceSaver::save(apath,atlases[i]);
|
||||||
if (err) {
|
if (err) {
|
||||||
EditorNode::add_io_error(TTR("Couldn't save atlas image: ")+apath);
|
EditorNode::add_io_error(TTR("Couldn't save atlas image:")+" "+apath);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
//from->set_source_md5(i,FileAccess::get_md5(apath));
|
//from->set_source_md5(i,FileAccess::get_md5(apath));
|
||||||
@ -1433,7 +1433,7 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
|
|||||||
|
|
||||||
Error err = ResourceSaver::save(p_path,texture,save_flags);
|
Error err = ResourceSaver::save(p_path,texture,save_flags);
|
||||||
if (err!=OK) {
|
if (err!=OK) {
|
||||||
EditorNode::add_io_error(TTR("Couldn't save converted texture: ")+p_path);
|
EditorNode::add_io_error(TTR("Couldn't save converted texture:")+" "+p_path);
|
||||||
return err;
|
return err;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -236,7 +236,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!save_path->get_text().begins_with("res://")) {
|
if (!save_path->get_text().begins_with("res://")) {
|
||||||
error_dialog->set_text(TTR("No target path!!"));
|
error_dialog->set_text(TTR("No target path!"));
|
||||||
error_dialog->popup_centered(Size2(200,100));
|
error_dialog->popup_centered(Size2(200,100));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -258,7 +258,7 @@ public:
|
|||||||
String savefile = save_path->get_text().plus_file(import_path->get_text().get_file().basename()+"."+locale+".xl");
|
String savefile = save_path->get_text().plus_file(import_path->get_text().get_file().basename()+"."+locale+".xl");
|
||||||
Error err = plugin->import(savefile,imd);
|
Error err = plugin->import(savefile,imd);
|
||||||
if (err!=OK) {
|
if (err!=OK) {
|
||||||
error_dialog->set_text(TTR("Couldnt import!"));
|
error_dialog->set_text(TTR("Couldn't import!"));
|
||||||
error_dialog->popup_centered(Size2(200,100));
|
error_dialog->popup_centered(Size2(200,100));
|
||||||
} else if (add_to_project->is_pressed()) {
|
} else if (add_to_project->is_pressed()) {
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ bool MultiNodeEdit::_set(const StringName& p_name, const Variant& p_value){
|
|||||||
|
|
||||||
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
|
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
|
||||||
|
|
||||||
ur->create_action(TTR("MultiNode Set ")+String(p_name));
|
ur->create_action(TTR("MultiNode Set")+" "+String(p_name));
|
||||||
for (const List<NodePath>::Element *E=nodes.front();E;E=E->next()) {
|
for (const List<NodePath>::Element *E=nodes.front();E;E=E->next()) {
|
||||||
|
|
||||||
if (!es->has_node(E->get()))
|
if (!es->has_node(E->get()))
|
||||||
|
@ -496,7 +496,7 @@ void AnimationPlayerEditor::_animation_name_edited() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (player->has_animation(new_name)) {
|
if (player->has_animation(new_name)) {
|
||||||
error_dialog->set_text(TTR("ERROR: Animation Name Already Exists!"));
|
error_dialog->set_text(TTR("ERROR: Animation name already exists!"));
|
||||||
error_dialog->popup_centered_minsize();
|
error_dialog->popup_centered_minsize();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1022,7 +1022,7 @@ void AnimationPlayerEditor::_editor_store() {
|
|||||||
return; //already there
|
return; //already there
|
||||||
|
|
||||||
|
|
||||||
undo_redo->create_action(TTR("Store anim in editor"));
|
undo_redo->create_action("Store anim in editor");
|
||||||
undo_redo->add_do_method(key_editor,"set_animation",anim);
|
undo_redo->add_do_method(key_editor,"set_animation",anim);
|
||||||
undo_redo->add_undo_method(key_editor,"remove_animation",anim);
|
undo_redo->add_undo_method(key_editor,"remove_animation",anim);
|
||||||
undo_redo->commit_action();
|
undo_redo->commit_action();
|
||||||
@ -1044,7 +1044,7 @@ void AnimationPlayerEditor::_editor_load(){
|
|||||||
String base=anim->get_name();
|
String base=anim->get_name();
|
||||||
bool noname=false;
|
bool noname=false;
|
||||||
if (base=="") {
|
if (base=="") {
|
||||||
base=TTR("New Anim");
|
base="New Anim";
|
||||||
noname=true;
|
noname=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1063,7 +1063,7 @@ void AnimationPlayerEditor::_editor_load(){
|
|||||||
if (noname)
|
if (noname)
|
||||||
anim->set_name(base);
|
anim->set_name(base);
|
||||||
|
|
||||||
undo_redo->create_action(TTR("Add Animation From Editor"));
|
undo_redo->create_action("Add Animation From Editor");
|
||||||
undo_redo->add_do_method(player,"add_animation",base,anim);
|
undo_redo->add_do_method(player,"add_animation",base,anim);
|
||||||
undo_redo->add_undo_method(player,"remove_animation",base);
|
undo_redo->add_undo_method(player,"remove_animation",base);
|
||||||
undo_redo->add_do_method(this,"_animation_player_changed",player);
|
undo_redo->add_do_method(this,"_animation_player_changed",player);
|
||||||
@ -1298,7 +1298,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
|
|||||||
Label * l;
|
Label * l;
|
||||||
|
|
||||||
/*l= memnew( Label );
|
/*l= memnew( Label );
|
||||||
l->set_text(TTR("Animation Player:"));
|
l->set_text("Animation Player:");
|
||||||
add_child(l);*/
|
add_child(l);*/
|
||||||
|
|
||||||
HBoxContainer *hb = memnew( HBoxContainer );
|
HBoxContainer *hb = memnew( HBoxContainer );
|
||||||
@ -1306,11 +1306,11 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
|
|||||||
|
|
||||||
|
|
||||||
play_bw_from = memnew( ToolButton );
|
play_bw_from = memnew( ToolButton );
|
||||||
play_bw_from->set_tooltip(TTR("Play backwards selected animation from current pos. (A)"));
|
play_bw_from->set_tooltip(TTR("Play selected animation backwards from current pos. (A)"));
|
||||||
hb->add_child(play_bw_from);
|
hb->add_child(play_bw_from);
|
||||||
|
|
||||||
play_bw = memnew( ToolButton );
|
play_bw = memnew( ToolButton );
|
||||||
play_bw->set_tooltip(TTR("Play backwards selected animation from end. (Shift+A)"));
|
play_bw->set_tooltip(TTR("Play selected animation backwards from end. (Shift+A)"));
|
||||||
hb->add_child(play_bw);
|
hb->add_child(play_bw);
|
||||||
|
|
||||||
stop = memnew( ToolButton );
|
stop = memnew( ToolButton );
|
||||||
@ -1391,7 +1391,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
|
|||||||
|
|
||||||
autoplay = memnew( ToolButton );
|
autoplay = memnew( ToolButton );
|
||||||
hb->add_child(autoplay);
|
hb->add_child(autoplay);
|
||||||
autoplay->set_tooltip(TTR("Autoplay On Load"));
|
autoplay->set_tooltip(TTR("Autoplay on Load"));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -1405,7 +1405,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
|
|||||||
tool_anim->get_popup()->add_item(TTR("Copy Animation"),TOOL_COPY_ANIM);
|
tool_anim->get_popup()->add_item(TTR("Copy Animation"),TOOL_COPY_ANIM);
|
||||||
tool_anim->get_popup()->add_item(TTR("Paste Animation"),TOOL_PASTE_ANIM);
|
tool_anim->get_popup()->add_item(TTR("Paste Animation"),TOOL_PASTE_ANIM);
|
||||||
//tool_anim->get_popup()->add_separator();
|
//tool_anim->get_popup()->add_separator();
|
||||||
//tool_anim->get_popup()->add_item(TTR("Edit Anim Resource"),TOOL_PASTE_ANIM);
|
//tool_anim->get_popup()->add_item("Edit Anim Resource",TOOL_PASTE_ANIM);
|
||||||
hb->add_child(tool_anim);
|
hb->add_child(tool_anim);
|
||||||
|
|
||||||
nodename = memnew( Button );
|
nodename = memnew( Button );
|
||||||
@ -1444,7 +1444,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
|
|||||||
|
|
||||||
error_dialog = memnew( ConfirmationDialog );
|
error_dialog = memnew( ConfirmationDialog );
|
||||||
error_dialog->get_ok()->set_text(TTR("Close"));
|
error_dialog->get_ok()->set_text(TTR("Close"));
|
||||||
//error_dialog->get_cancel()->set_text(TTR("Close"));
|
//error_dialog->get_cancel()->set_text("Close");
|
||||||
error_dialog->set_text(TTR("Error!"));
|
error_dialog->set_text(TTR("Error!"));
|
||||||
add_child(error_dialog);
|
add_child(error_dialog);
|
||||||
|
|
||||||
@ -1459,7 +1459,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
|
|||||||
blend_editor.dialog->set_child_rect(blend_vb);
|
blend_editor.dialog->set_child_rect(blend_vb);
|
||||||
blend_editor.tree = memnew( Tree );
|
blend_editor.tree = memnew( Tree );
|
||||||
blend_editor.tree->set_columns(2);
|
blend_editor.tree->set_columns(2);
|
||||||
blend_vb->add_margin_child(TTR("Blend Times: "),blend_editor.tree,true);
|
blend_vb->add_margin_child(TTR("Blend Times:"),blend_editor.tree,true);
|
||||||
blend_editor.next = memnew( OptionButton );
|
blend_editor.next = memnew( OptionButton );
|
||||||
blend_vb->add_margin_child(TTR("Next (Auto Queue):"),blend_editor.next);
|
blend_vb->add_margin_child(TTR("Next (Auto Queue):"),blend_editor.next);
|
||||||
blend_editor.dialog->set_title(TTR("Cross-Animation Blend Times"));
|
blend_editor.dialog->set_title(TTR("Cross-Animation Blend Times"));
|
||||||
|
@ -203,7 +203,7 @@ public:
|
|||||||
virtual Dictionary get_state() const { return anim_editor->get_state(); }
|
virtual Dictionary get_state() const { return anim_editor->get_state(); }
|
||||||
virtual void set_state(const Dictionary& p_state) { anim_editor->set_state(p_state); }
|
virtual void set_state(const Dictionary& p_state) { anim_editor->set_state(p_state); }
|
||||||
|
|
||||||
virtual String get_name() const { return TTR("Anim"); }
|
virtual String get_name() const { return "Anim"; }
|
||||||
bool has_main_screen() const { return false; }
|
bool has_main_screen() const { return false; }
|
||||||
virtual void edit(Object *p_node);
|
virtual void edit(Object *p_node);
|
||||||
virtual bool handles(Object *p_node) const;
|
virtual bool handles(Object *p_node) const;
|
||||||
|
@ -990,12 +990,12 @@ void AnimationTreeEditor::_notification(int p_what) {
|
|||||||
case AnimationTreePlayer::CONNECT_OK: {
|
case AnimationTreePlayer::CONNECT_OK: {
|
||||||
|
|
||||||
Ref<Font> f = get_font("font","Label");
|
Ref<Font> f = get_font("font","Label");
|
||||||
f->draw(get_canvas_item(),Point2(5,25+f->get_ascent()),TTR("Animation Tree is Valid."),Color(0,1,0.6,0.8));
|
f->draw(get_canvas_item(),Point2(5,25+f->get_ascent()),TTR("Animation tree is valid."),Color(0,1,0.6,0.8));
|
||||||
} break;
|
} break;
|
||||||
default: {
|
default: {
|
||||||
|
|
||||||
Ref<Font> f = get_font("font","Label");
|
Ref<Font> f = get_font("font","Label");
|
||||||
f->draw(get_canvas_item(),Point2(5,25+f->get_ascent()),TTR("Animation Tree is Invalid."),Color(1,0.6,0.0,0.8));
|
f->draw(get_canvas_item(),Point2(5,25+f->get_ascent()),TTR("Animation tree is invalid."),Color(1,0.6,0.0,0.8));
|
||||||
} break;
|
} break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1369,7 +1369,7 @@ AnimationTreeEditor::AnimationTreeEditor() {
|
|||||||
p->add_item(TTR("TimeSeek Node"),AnimationTreePlayer::NODE_TIMESEEK);
|
p->add_item(TTR("TimeSeek Node"),AnimationTreePlayer::NODE_TIMESEEK);
|
||||||
p->add_item(TTR("Transition Node"),AnimationTreePlayer::NODE_TRANSITION);
|
p->add_item(TTR("Transition Node"),AnimationTreePlayer::NODE_TRANSITION);
|
||||||
p->add_separator();
|
p->add_separator();
|
||||||
p->add_item(TTR("Import Animations..."), MENU_IMPORT_ANIMATIONS); // wtf
|
p->add_item(TTR("Import Animations.."), MENU_IMPORT_ANIMATIONS); // wtf
|
||||||
p->add_separator();
|
p->add_separator();
|
||||||
p->add_item(TTR("Clear"),MENU_GRAPH_CLEAR);
|
p->add_item(TTR("Clear"),MENU_GRAPH_CLEAR);
|
||||||
|
|
||||||
@ -1524,7 +1524,7 @@ AnimationTreeEditorPlugin::AnimationTreeEditorPlugin(EditorNode *p_node) {
|
|||||||
anim_tree_editor = memnew( AnimationTreeEditor );
|
anim_tree_editor = memnew( AnimationTreeEditor );
|
||||||
anim_tree_editor->set_custom_minimum_size(Size2(0,300));
|
anim_tree_editor->set_custom_minimum_size(Size2(0,300));
|
||||||
|
|
||||||
button=editor->add_bottom_panel_item(TTR("AnimationTree"),anim_tree_editor);
|
button=editor->add_bottom_panel_item("AnimationTree",anim_tree_editor);
|
||||||
button->hide();
|
button->hide();
|
||||||
|
|
||||||
|
|
||||||
|
@ -180,7 +180,7 @@ class AnimationTreeEditorPlugin : public EditorPlugin {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual String get_name() const { return TTR("AnimTree"); }
|
virtual String get_name() const { return "AnimTree"; }
|
||||||
bool has_main_screen() const { return false; }
|
bool has_main_screen() const { return false; }
|
||||||
virtual void edit(Object *p_node);
|
virtual void edit(Object *p_node);
|
||||||
virtual bool handles(Object *p_node) const;
|
virtual bool handles(Object *p_node) const;
|
||||||
|
@ -728,14 +728,14 @@ void BakedLightBaker::_make_octree() {
|
|||||||
for(int i=0;i<8;i++)
|
for(int i=0;i<8;i++)
|
||||||
root->children[i]=0;
|
root->children[i]=0;
|
||||||
|
|
||||||
EditorProgress ep("bake_octree",TTR("Parsing ")+itos(triangles.size())+" Triangles:",triangles.size());
|
EditorProgress ep("bake_octree",vformat(TTR("Parsing %d Triangles:"), triangles.size()),triangles.size());
|
||||||
|
|
||||||
for(int i=0;i<triangles.size();i++) {
|
for(int i=0;i<triangles.size();i++) {
|
||||||
|
|
||||||
_octree_insert(0,&triangles[i],octree_depth-1);
|
_octree_insert(0,&triangles[i],octree_depth-1);
|
||||||
if ((i%1000)==0) {
|
if ((i%1000)==0) {
|
||||||
|
|
||||||
ep.step(TTR("Triangle# ")+itos(i),i);
|
ep.step(TTR("Triangle #")+itos(i),i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1906,7 +1906,7 @@ void CanvasItemEditor::_viewport_draw() {
|
|||||||
if (h_scroll->is_visible())
|
if (h_scroll->is_visible())
|
||||||
size.height-=h_scroll->get_size().height;
|
size.height-=h_scroll->get_size().height;
|
||||||
|
|
||||||
get_stylebox(TTR("EditorFocus"),"EditorStyles")->draw(ci,Rect2(Point2(),size));
|
get_stylebox("EditorFocus","EditorStyles")->draw(ci,Rect2(Point2(),size));
|
||||||
}
|
}
|
||||||
|
|
||||||
Ref<Texture> lock = get_icon("Lock","EditorIcons");
|
Ref<Texture> lock = get_icon("Lock","EditorIcons");
|
||||||
@ -2229,7 +2229,7 @@ void CanvasItemEditor::_notification(int p_what) {
|
|||||||
key_insert_button->set_icon(get_icon("Key","EditorIcons"));
|
key_insert_button->set_icon(get_icon("Key","EditorIcons"));
|
||||||
|
|
||||||
|
|
||||||
//anchor_menu->add_icon_override(TTR("Align Top Left"));
|
//anchor_menu->add_icon_override("Align Top Left");
|
||||||
anchor_menu->set_icon(get_icon("Anchor","EditorIcons"));
|
anchor_menu->set_icon(get_icon("Anchor","EditorIcons"));
|
||||||
PopupMenu *p=anchor_menu->get_popup();
|
PopupMenu *p=anchor_menu->get_popup();
|
||||||
|
|
||||||
@ -3147,7 +3147,7 @@ void CanvasItemEditor::end_drag() {
|
|||||||
|
|
||||||
if (undo_redo) {
|
if (undo_redo) {
|
||||||
|
|
||||||
undo_redo->create_action(TTR("Edit CanvasItem"));
|
undo_redo->create_action("Edit CanvasItem");
|
||||||
for(CanvasItemMap::Element *E=canvas_items.front();E;E=E->next()) {
|
for(CanvasItemMap::Element *E=canvas_items.front();E;E=E->next()) {
|
||||||
CanvasItem *canvas_item = E->key();
|
CanvasItem *canvas_item = E->key();
|
||||||
Variant state=canvas_item->edit_get_state();
|
Variant state=canvas_item->edit_get_state();
|
||||||
@ -3285,7 +3285,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
|
|||||||
hb->add_child(select_button);
|
hb->add_child(select_button);
|
||||||
select_button->connect("pressed",this,"_tool_select",make_binds(TOOL_SELECT));
|
select_button->connect("pressed",this,"_tool_select",make_binds(TOOL_SELECT));
|
||||||
select_button->set_pressed(true);
|
select_button->set_pressed(true);
|
||||||
select_button->set_tooltip("Select Mode (Q)\n"+keycode_get_string(KEY_MASK_CMD)+"Drag: Rotate\nAlt+Drag: Move\nPress 'v' to Change Pivot, 'Shift+v' to Drag Pivot (while moving).\nAlt+RMB: Depth list selection");
|
select_button->set_tooltip(TTR("Select Mode (Q)")+"\n"+keycode_get_string(KEY_MASK_CMD)+TTR("Drag: Rotate")+"\n"+TTR("Alt+Drag: Move")+"\n"+TTR("Press 'v' to Change Pivot, 'Shift+v' to Drag Pivot (while moving).")+"\n"+TTR("Alt+RMB: Depth list selection"));
|
||||||
|
|
||||||
|
|
||||||
move_button = memnew( ToolButton );
|
move_button = memnew( ToolButton );
|
||||||
@ -3306,13 +3306,13 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
|
|||||||
list_select_button->set_toggle_mode(true);
|
list_select_button->set_toggle_mode(true);
|
||||||
hb->add_child(list_select_button);
|
hb->add_child(list_select_button);
|
||||||
list_select_button->connect("pressed",this,"_tool_select",make_binds(TOOL_LIST_SELECT));
|
list_select_button->connect("pressed",this,"_tool_select",make_binds(TOOL_LIST_SELECT));
|
||||||
list_select_button->set_tooltip("Show a list of all objects at the position clicked\n(same as Alt+RMB in selet mode).");
|
list_select_button->set_tooltip(TTR("Show a list of all objects at the position clicked\n(same as Alt+RMB in select mode)."));
|
||||||
|
|
||||||
pivot_button = memnew( ToolButton );
|
pivot_button = memnew( ToolButton );
|
||||||
pivot_button->set_toggle_mode(true);
|
pivot_button->set_toggle_mode(true);
|
||||||
hb->add_child(pivot_button);
|
hb->add_child(pivot_button);
|
||||||
pivot_button->connect("pressed",this,"_tool_select",make_binds(TOOL_EDIT_PIVOT));
|
pivot_button->connect("pressed",this,"_tool_select",make_binds(TOOL_EDIT_PIVOT));
|
||||||
pivot_button->set_tooltip(TTR("Click to change object's rotation pivot"));
|
pivot_button->set_tooltip(TTR("Click to change object's rotation pivot."));
|
||||||
|
|
||||||
pan_button = memnew( ToolButton );
|
pan_button = memnew( ToolButton );
|
||||||
pan_button->set_toggle_mode(true);
|
pan_button->set_toggle_mode(true);
|
||||||
@ -3326,7 +3326,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
|
|||||||
hb->add_child(lock_button);
|
hb->add_child(lock_button);
|
||||||
|
|
||||||
lock_button->connect("pressed",this,"_popup_callback",varray(LOCK_SELECTED));
|
lock_button->connect("pressed",this,"_popup_callback",varray(LOCK_SELECTED));
|
||||||
lock_button->set_tooltip("Lock the selected object in-place (can't be moved).");
|
lock_button->set_tooltip(TTR("Lock the selected object in place (can't be moved)."));
|
||||||
|
|
||||||
unlock_button = memnew( ToolButton );
|
unlock_button = memnew( ToolButton );
|
||||||
hb->add_child(unlock_button);
|
hb->add_child(unlock_button);
|
||||||
@ -3336,12 +3336,12 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
|
|||||||
group_button = memnew( ToolButton );
|
group_button = memnew( ToolButton );
|
||||||
hb->add_child(group_button);
|
hb->add_child(group_button);
|
||||||
group_button->connect("pressed",this,"_popup_callback",varray(GROUP_SELECTED));
|
group_button->connect("pressed",this,"_popup_callback",varray(GROUP_SELECTED));
|
||||||
group_button->set_tooltip("Makes sure the object's' children are not selectable.");
|
group_button->set_tooltip(TTR("Makes sure the object's children are not selectable."));
|
||||||
|
|
||||||
ungroup_button = memnew( ToolButton );
|
ungroup_button = memnew( ToolButton );
|
||||||
hb->add_child(ungroup_button);
|
hb->add_child(ungroup_button);
|
||||||
ungroup_button->connect("pressed",this,"_popup_callback",varray(UNGROUP_SELECTED));
|
ungroup_button->connect("pressed",this,"_popup_callback",varray(UNGROUP_SELECTED));
|
||||||
ungroup_button->set_tooltip("Restores the object's' children ability to be selected.");
|
ungroup_button->set_tooltip(TTR("Restores the object's children's ability to be selected."));
|
||||||
|
|
||||||
hb->add_child(memnew(VSeparator));
|
hb->add_child(memnew(VSeparator));
|
||||||
|
|
||||||
@ -3375,10 +3375,10 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
p->add_item(TTR("Align Horizontal"),ALIGN_HORIZONTAL);
|
p->add_item("Align Horizontal",ALIGN_HORIZONTAL);
|
||||||
p->add_item(TTR("Align Vertical"),ALIGN_VERTICAL);
|
p->add_item("Align Vertical",ALIGN_VERTICAL);
|
||||||
p->add_item(TTR("Space Horizontal"),SPACE_HORIZONTAL);
|
p->add_item("Space Horizontal",SPACE_HORIZONTAL);
|
||||||
p->add_item(TTR("Space Vertical"),SPACE_VERTICAL);*/
|
p->add_item("Space Vertical",SPACE_VERTICAL);*/
|
||||||
|
|
||||||
view_menu = memnew( MenuButton );
|
view_menu = memnew( MenuButton );
|
||||||
view_menu->set_text(TTR("View"));
|
view_menu->set_text(TTR("View"));
|
||||||
@ -3436,7 +3436,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
|
|||||||
key_insert_button = memnew( Button );
|
key_insert_button = memnew( Button );
|
||||||
key_insert_button->set_focus_mode(FOCUS_NONE);
|
key_insert_button->set_focus_mode(FOCUS_NONE);
|
||||||
key_insert_button->connect("pressed",this,"_popup_callback",varray(ANIM_INSERT_KEY));
|
key_insert_button->connect("pressed",this,"_popup_callback",varray(ANIM_INSERT_KEY));
|
||||||
key_insert_button->set_tooltip(TTR("Insert Keys (Insert)"));
|
key_insert_button->set_tooltip(TTR("Insert Keys (Ins)"));
|
||||||
|
|
||||||
animation_hb->add_child(key_insert_button);
|
animation_hb->add_child(key_insert_button);
|
||||||
|
|
||||||
|
@ -390,7 +390,7 @@ CollisionPolygon2DEditor::CollisionPolygon2DEditor(EditorNode *p_editor) {
|
|||||||
add_child(button_create);
|
add_child(button_create);
|
||||||
button_create->connect("pressed",this,"_menu_option",varray(MODE_CREATE));
|
button_create->connect("pressed",this,"_menu_option",varray(MODE_CREATE));
|
||||||
button_create->set_toggle_mode(true);
|
button_create->set_toggle_mode(true);
|
||||||
button_create->set_tooltip(TTR("Create a new polygon from scratch"));
|
button_create->set_tooltip(TTR("Create a new polygon from scratch."));
|
||||||
|
|
||||||
button_edit = memnew( ToolButton );
|
button_edit = memnew( ToolButton );
|
||||||
add_child(button_edit);
|
add_child(button_edit);
|
||||||
@ -404,8 +404,8 @@ CollisionPolygon2DEditor::CollisionPolygon2DEditor(EditorNode *p_editor) {
|
|||||||
options = memnew( MenuButton );
|
options = memnew( MenuButton );
|
||||||
add_child(options);
|
add_child(options);
|
||||||
options->set_area_as_parent_rect();
|
options->set_area_as_parent_rect();
|
||||||
options->set_text(TTR("Polygon"));
|
options->set_text("Polygon");
|
||||||
//options->get_popup()->add_item(TTR("Parse BBCODE"),PARSE_BBCODE);
|
//options->get_popup()->add_item("Parse BBCode",PARSE_BBCODE);
|
||||||
options->get_popup()->connect("item_pressed", this,"_menu_option");
|
options->get_popup()->connect("item_pressed", this,"_menu_option");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -559,8 +559,8 @@ CollisionPolygonEditor::CollisionPolygonEditor(EditorNode *p_editor) {
|
|||||||
options = memnew( MenuButton );
|
options = memnew( MenuButton );
|
||||||
add_child(options);
|
add_child(options);
|
||||||
options->set_area_as_parent_rect();
|
options->set_area_as_parent_rect();
|
||||||
options->set_text(TTR("Polygon"));
|
options->set_text("Polygon");
|
||||||
//options->get_popup()->add_item(TTR("Parse BBCODE"),PARSE_BBCODE);
|
//options->get_popup()->add_item("Parse BBCode",PARSE_BBCODE);
|
||||||
options->get_popup()->connect("item_pressed", this,"_menu_option");
|
options->get_popup()->connect("item_pressed", this,"_menu_option");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -112,7 +112,7 @@ void ControlEditor::_key_move(const Vector2& p_dir, bool p_snap) {
|
|||||||
if (p_snap)
|
if (p_snap)
|
||||||
motion*=snap_val->get_text().to_double();
|
motion*=snap_val->get_text().to_double();
|
||||||
|
|
||||||
undo_redo->create_action(TTR("Edit Control"));
|
undo_redo->create_action("Edit Control");
|
||||||
for(ControlMap::Element *E=controls.front();E;E=E->next()) {
|
for(ControlMap::Element *E=controls.front();E;E=E->next()) {
|
||||||
Control *control = E->key();
|
Control *control = E->key();
|
||||||
undo_redo->add_do_method(control,"set_pos",control->get_pos()+motion);
|
undo_redo->add_do_method(control,"set_pos",control->get_pos()+motion);
|
||||||
@ -156,7 +156,7 @@ void ControlEditor::_input_event(InputEvent p_event) {
|
|||||||
|
|
||||||
if (undo_redo) {
|
if (undo_redo) {
|
||||||
|
|
||||||
undo_redo->create_action(TTR("Edit Control"));
|
undo_redo->create_action("Edit Control");
|
||||||
for(ControlMap::Element *E=controls.front();E;E=E->next()) {
|
for(ControlMap::Element *E=controls.front();E;E=E->next()) {
|
||||||
Control *control = E->key();
|
Control *control = E->key();
|
||||||
undo_redo->add_do_method(control,"set_pos",control->get_pos());
|
undo_redo->add_do_method(control,"set_pos",control->get_pos());
|
||||||
@ -752,17 +752,17 @@ ControlEditor::ControlEditor(EditorNode *p_editor) {
|
|||||||
handle_len=10;
|
handle_len=10;
|
||||||
|
|
||||||
popup=memnew( PopupMenu );
|
popup=memnew( PopupMenu );
|
||||||
popup->add_check_item(TTR("Use Snap"));
|
popup->add_check_item("Use Snap");
|
||||||
popup->add_item(TTR("Configure Snap.."));
|
popup->add_item("Configure Snap..");
|
||||||
add_child(popup);
|
add_child(popup);
|
||||||
|
|
||||||
snap_dialog = memnew( ConfirmationDialog );
|
snap_dialog = memnew( ConfirmationDialog );
|
||||||
snap_dialog->get_ok()->hide();
|
snap_dialog->get_ok()->hide();
|
||||||
snap_dialog->get_cancel()->set_text(TTR("Close"));
|
snap_dialog->get_cancel()->set_text("Close");
|
||||||
add_child(snap_dialog);
|
add_child(snap_dialog);
|
||||||
|
|
||||||
Label *l = memnew(Label);
|
Label *l = memnew(Label);
|
||||||
l->set_text(TTR("Snap:"));
|
l->set_text("Snap:");
|
||||||
l->set_pos(Point2(5,5));
|
l->set_pos(Point2(5,5));
|
||||||
snap_dialog->add_child(l);
|
snap_dialog->add_child(l);
|
||||||
|
|
||||||
|
@ -125,7 +125,7 @@ class ControlEditorPlugin : public EditorPlugin {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual String get_name() const { return TTR("GUI"); }
|
virtual String get_name() const { return "GUI"; }
|
||||||
bool has_main_screen() const { return true; }
|
bool has_main_screen() const { return true; }
|
||||||
virtual void edit(Object *p_object);
|
virtual void edit(Object *p_object);
|
||||||
virtual bool handles(Object *p_object) const;
|
virtual bool handles(Object *p_object) const;
|
||||||
|
@ -256,7 +256,7 @@ void MeshLibraryEditor::_menu_cbk(int p_option) {
|
|||||||
if (p.begins_with("/MeshLibrary/item") && p.get_slice_count("/")>=3) {
|
if (p.begins_with("/MeshLibrary/item") && p.get_slice_count("/")>=3) {
|
||||||
|
|
||||||
to_erase = p.get_slice("/",3).to_int();
|
to_erase = p.get_slice("/",3).to_int();
|
||||||
cd->set_text(TTR("Remove Item ")+itos(to_erase)+"?");
|
cd->set_text(vformat(TTR("Remove item %d?"),to_erase));
|
||||||
cd->popup_centered(Size2(300,60));
|
cd->popup_centered(Size2(300,60));
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
|
@ -129,7 +129,7 @@ int ItemListOptionButtonPlugin::get_flags() const {
|
|||||||
|
|
||||||
void ItemListOptionButtonPlugin::add_item() {
|
void ItemListOptionButtonPlugin::add_item() {
|
||||||
|
|
||||||
ob->add_item( TTR("Item ")+itos(ob->get_item_count()));
|
ob->add_item( vformat(TTR("Item %d"),ob->get_item_count()));
|
||||||
_change_notify();
|
_change_notify();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -171,7 +171,7 @@ int ItemListPopupMenuPlugin::get_flags() const {
|
|||||||
|
|
||||||
void ItemListPopupMenuPlugin::add_item() {
|
void ItemListPopupMenuPlugin::add_item() {
|
||||||
|
|
||||||
pp->add_item( TTR("Item ")+itos(pp->get_item_count()));
|
pp->add_item( vformat(TTR("Item %d"),pp->get_item_count()));
|
||||||
_change_notify();
|
_change_notify();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -421,13 +421,13 @@ LightOccluder2DEditor::LightOccluder2DEditor(EditorNode *p_editor) {
|
|||||||
add_child(button_create);
|
add_child(button_create);
|
||||||
button_create->connect("pressed",this,"_menu_option",varray(MODE_CREATE));
|
button_create->connect("pressed",this,"_menu_option",varray(MODE_CREATE));
|
||||||
button_create->set_toggle_mode(true);
|
button_create->set_toggle_mode(true);
|
||||||
button_create->set_tooltip(TTR("Create a new polygon from scratch"));
|
button_create->set_tooltip(TTR("Create a new polygon from scratch."));
|
||||||
|
|
||||||
button_edit = memnew( ToolButton );
|
button_edit = memnew( ToolButton );
|
||||||
add_child(button_edit);
|
add_child(button_edit);
|
||||||
button_edit->connect("pressed",this,"_menu_option",varray(MODE_EDIT));
|
button_edit->connect("pressed",this,"_menu_option",varray(MODE_EDIT));
|
||||||
button_edit->set_toggle_mode(true);
|
button_edit->set_toggle_mode(true);
|
||||||
button_edit->set_tooltip("Edit existing polygon:\nLMB: Move Point.\nCtrl+LMB: Split Segment.\nRMB: Erase Point.");
|
button_edit->set_tooltip(TTR("Edit existing polygon:")+"\n"+TTR("LMB: Move Point.")+"\n"+TTR("Ctrl+LMB: Split Segment.")+"\n"+TTR("RMB: Erase Point."));
|
||||||
|
|
||||||
create_poly = memnew( ConfirmationDialog );
|
create_poly = memnew( ConfirmationDialog );
|
||||||
add_child(create_poly);
|
add_child(create_poly);
|
||||||
@ -440,8 +440,8 @@ LightOccluder2DEditor::LightOccluder2DEditor(EditorNode *p_editor) {
|
|||||||
options = memnew( MenuButton );
|
options = memnew( MenuButton );
|
||||||
add_child(options);
|
add_child(options);
|
||||||
options->set_area_as_parent_rect();
|
options->set_area_as_parent_rect();
|
||||||
options->set_text(TTR("Polygon"));
|
options->set_text("Polygon");
|
||||||
//options->get_popup()->add_item(TTR("Parse BBCODE"),PARSE_BBCODE);
|
//options->get_popup()->add_item("Parse BBCode",PARSE_BBCODE);
|
||||||
options->get_popup()->connect("item_pressed", this,"_menu_option");
|
options->get_popup()->connect("item_pressed", this,"_menu_option");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ void MultiMeshEditor::_populate() {
|
|||||||
|
|
||||||
if (!ms_node) {
|
if (!ms_node) {
|
||||||
|
|
||||||
err_dialog->set_text(TTR("Mesh source is invalid (Invalid Path)."));
|
err_dialog->set_text(TTR("Mesh source is invalid (invalid path)."));
|
||||||
err_dialog->popup_centered_minsize();
|
err_dialog->popup_centered_minsize();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -82,7 +82,7 @@ void MultiMeshEditor::_populate() {
|
|||||||
|
|
||||||
if (!ms_instance) {
|
if (!ms_instance) {
|
||||||
|
|
||||||
err_dialog->set_text(TTR("Mesh source is invalid (Not a MeshInstance)."));
|
err_dialog->set_text(TTR("Mesh source is invalid (not a MeshInstance)."));
|
||||||
err_dialog->popup_centered_minsize();
|
err_dialog->popup_centered_minsize();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -91,7 +91,7 @@ void MultiMeshEditor::_populate() {
|
|||||||
|
|
||||||
if (mesh.is_null()) {
|
if (mesh.is_null()) {
|
||||||
|
|
||||||
err_dialog->set_text(TTR("Mesh source is invalid (Contains no Mesh resource)."));
|
err_dialog->set_text(TTR("Mesh source is invalid (contains no Mesh resource)."));
|
||||||
err_dialog->popup_centered_minsize();
|
err_dialog->popup_centered_minsize();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -109,7 +109,7 @@ void MultiMeshEditor::_populate() {
|
|||||||
|
|
||||||
if (!ss_node) {
|
if (!ss_node) {
|
||||||
|
|
||||||
err_dialog->set_text(TTR("Surface source is invalid (Invalid Path)."));
|
err_dialog->set_text(TTR("Surface source is invalid (invalid path)."));
|
||||||
err_dialog->popup_centered_minsize();
|
err_dialog->popup_centered_minsize();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -118,7 +118,7 @@ void MultiMeshEditor::_populate() {
|
|||||||
|
|
||||||
if (!ss_instance) {
|
if (!ss_instance) {
|
||||||
|
|
||||||
err_dialog->set_text(TTR("Surface source is invalid (Not Geometry)."));
|
err_dialog->set_text(TTR("Surface source is invalid (no geometry)."));
|
||||||
err_dialog->popup_centered_minsize();
|
err_dialog->popup_centered_minsize();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -129,7 +129,7 @@ void MultiMeshEditor::_populate() {
|
|||||||
|
|
||||||
if (geometry.size()==0) {
|
if (geometry.size()==0) {
|
||||||
|
|
||||||
err_dialog->set_text(TTR("Surface source is invalid (No Faces)."));
|
err_dialog->set_text(TTR("Surface source is invalid (no faces)."));
|
||||||
err_dialog->popup_centered_minsize();
|
err_dialog->popup_centered_minsize();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -153,10 +153,10 @@ void MultiMeshEditor::_populate() {
|
|||||||
node->populate_parent(populate_rotate_random->get_val(),populate_tilt_random->get_val(),populate_scale_random->get_val(),populate_scale->get_val());
|
node->populate_parent(populate_rotate_random->get_val(),populate_tilt_random->get_val(),populate_scale_random->get_val(),populate_scale->get_val());
|
||||||
|
|
||||||
|
|
||||||
ERR_EXPLAIN(TTR("Parent is not of type VisualInstance."));
|
ERR_EXPLAIN("Parent is not of type VisualInstance.");
|
||||||
ERR_FAIL_COND(!get_parent() || !get_parent()->is_type("VisualInstance"));
|
ERR_FAIL_COND(!get_parent() || !get_parent()->is_type("VisualInstance"));
|
||||||
|
|
||||||
ERR_EXPLAIN(TTR("Multimesh not present"));
|
ERR_EXPLAIN("Multimesh not present.");
|
||||||
ERR_FAIL_COND(multimesh.is_null());
|
ERR_FAIL_COND(multimesh.is_null());
|
||||||
|
|
||||||
VisualInstance *vi = get_parent()->cast_to<VisualInstance>();
|
VisualInstance *vi = get_parent()->cast_to<VisualInstance>();
|
||||||
@ -184,9 +184,9 @@ void MultiMeshEditor::_populate() {
|
|||||||
area_accum+=area;
|
area_accum+=area;
|
||||||
}
|
}
|
||||||
|
|
||||||
ERR_EXPLAIN(TTR("Couldn't map area"));
|
ERR_EXPLAIN(TTR("Couldn't map area."));
|
||||||
ERR_FAIL_COND(triangle_area_map.size()==0);
|
ERR_FAIL_COND(triangle_area_map.size()==0);
|
||||||
ERR_EXPLAIN(TTR("Couldn't map area"));
|
ERR_EXPLAIN(TTR("Couldn't map area."));
|
||||||
ERR_FAIL_COND(area_accum==0);
|
ERR_FAIL_COND(area_accum==0);
|
||||||
|
|
||||||
|
|
||||||
|
@ -469,13 +469,13 @@ NavigationPolygonEditor::NavigationPolygonEditor(EditorNode *p_editor) {
|
|||||||
add_child(button_create);
|
add_child(button_create);
|
||||||
button_create->connect("pressed",this,"_menu_option",varray(MODE_CREATE));
|
button_create->connect("pressed",this,"_menu_option",varray(MODE_CREATE));
|
||||||
button_create->set_toggle_mode(true);
|
button_create->set_toggle_mode(true);
|
||||||
button_create->set_tooltip(TTR("Create a new polygon from scratch"));
|
button_create->set_tooltip(TTR("Create a new polygon from scratch."));
|
||||||
|
|
||||||
button_edit = memnew( ToolButton );
|
button_edit = memnew( ToolButton );
|
||||||
add_child(button_edit);
|
add_child(button_edit);
|
||||||
button_edit->connect("pressed",this,"_menu_option",varray(MODE_EDIT));
|
button_edit->connect("pressed",this,"_menu_option",varray(MODE_EDIT));
|
||||||
button_edit->set_toggle_mode(true);
|
button_edit->set_toggle_mode(true);
|
||||||
button_edit->set_tooltip("Edit existing polygon:\nLMB: Move Point.\nCtrl+LMB: Split Segment.\nRMB: Erase Point.");
|
button_edit->set_tooltip(TTR("Edit existing polygon:")+"\n"+TTR("LMB: Move Point.")+"\n"+TTR("Ctrl+LMB: Split Segment.")+"\n"+TTR("RMB: Erase Point."));
|
||||||
create_nav = memnew( ConfirmationDialog );
|
create_nav = memnew( ConfirmationDialog );
|
||||||
add_child(create_nav);
|
add_child(create_nav);
|
||||||
create_nav->get_ok()->set_text(TTR("Create"));
|
create_nav->get_ok()->set_text(TTR("Create"));
|
||||||
@ -487,8 +487,8 @@ NavigationPolygonEditor::NavigationPolygonEditor(EditorNode *p_editor) {
|
|||||||
options = memnew( MenuButton );
|
options = memnew( MenuButton );
|
||||||
add_child(options);
|
add_child(options);
|
||||||
options->set_area_as_parent_rect();
|
options->set_area_as_parent_rect();
|
||||||
options->set_text(TTR("Polygon"));
|
options->set_text("Polygon");
|
||||||
//options->get_popup()->add_item(TTR("Parse BBCODE"),PARSE_BBCODE);
|
//options->get_popup()->add_item("Parse BBCode",PARSE_BBCODE);
|
||||||
options->get_popup()->connect("item_pressed", this,"_menu_option");
|
options->get_popup()->connect("item_pressed", this,"_menu_option");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ void Particles2DEditorPlugin::_file_selected(const String& p_file) {
|
|||||||
|
|
||||||
Image img;
|
Image img;
|
||||||
Error err = ImageLoader::load_image(p_file,&img);
|
Error err = ImageLoader::load_image(p_file,&img);
|
||||||
ERR_EXPLAIN(TTR("Error loading image: ")+p_file);
|
ERR_EXPLAIN(TTR("Error loading image:")+" "+p_file);
|
||||||
ERR_FAIL_COND(err!=OK);
|
ERR_FAIL_COND(err!=OK);
|
||||||
|
|
||||||
img.convert(Image::FORMAT_GRAYSCALE_ALPHA);
|
img.convert(Image::FORMAT_GRAYSCALE_ALPHA);
|
||||||
|
@ -249,7 +249,7 @@ void ParticlesEditor::_generate_emission_points() {
|
|||||||
|
|
||||||
if (gcount==0) {
|
if (gcount==0) {
|
||||||
|
|
||||||
err_dialog->set_text(TTR("No Faces!"));
|
err_dialog->set_text(TTR("No faces!"));
|
||||||
err_dialog->popup_centered_minsize();
|
err_dialog->popup_centered_minsize();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -622,8 +622,8 @@ Path2DEditor::Path2DEditor(EditorNode *p_editor) {
|
|||||||
options = memnew( MenuButton );
|
options = memnew( MenuButton );
|
||||||
add_child(options);
|
add_child(options);
|
||||||
options->set_area_as_parent_rect();
|
options->set_area_as_parent_rect();
|
||||||
options->set_text(TTR("Polygon"));
|
options->set_text("Polygon");
|
||||||
//options->get_popup()->add_item(TTR("Parse BBCODE"),PARSE_BBCODE);
|
//options->get_popup()->add_item("Parse BBCode",PARSE_BBCODE);
|
||||||
options->get_popup()->connect("item_pressed", this,"_menu_option");
|
options->get_popup()->connect("item_pressed", this,"_menu_option");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -636,7 +636,7 @@ Path2DEditor::Path2DEditor(EditorNode *p_editor) {
|
|||||||
curve_edit->set_icon(CanvasItemEditor::get_singleton()->get_icon("CurveEdit","EditorIcons"));
|
curve_edit->set_icon(CanvasItemEditor::get_singleton()->get_icon("CurveEdit","EditorIcons"));
|
||||||
curve_edit->set_toggle_mode(true);
|
curve_edit->set_toggle_mode(true);
|
||||||
curve_edit->set_focus_mode(Control::FOCUS_NONE);
|
curve_edit->set_focus_mode(Control::FOCUS_NONE);
|
||||||
curve_edit->set_tooltip("Select Points\nShift+Drag: Select Control Points\n"+keycode_get_string(KEY_MASK_CMD)+"Click: Add Point\nRight Click: Delete Point.");
|
curve_edit->set_tooltip(TTR("Select Points")+"\n"+TTR("Shift+Drag: Select Control Points")+"\n"+keycode_get_string(KEY_MASK_CMD)+TTR("Click: Add Point")+"\n"+TTR("Right Click: Delete Point"));
|
||||||
curve_edit->connect("pressed",this,"_mode_selected",varray(MODE_EDIT));
|
curve_edit->connect("pressed",this,"_mode_selected",varray(MODE_EDIT));
|
||||||
base_hb->add_child(curve_edit);
|
base_hb->add_child(curve_edit);
|
||||||
curve_edit_curve = memnew( ToolButton );
|
curve_edit_curve = memnew( ToolButton );
|
||||||
@ -650,14 +650,14 @@ Path2DEditor::Path2DEditor(EditorNode *p_editor) {
|
|||||||
curve_create->set_icon(CanvasItemEditor::get_singleton()->get_icon("CurveCreate","EditorIcons"));
|
curve_create->set_icon(CanvasItemEditor::get_singleton()->get_icon("CurveCreate","EditorIcons"));
|
||||||
curve_create->set_toggle_mode(true);
|
curve_create->set_toggle_mode(true);
|
||||||
curve_create->set_focus_mode(Control::FOCUS_NONE);
|
curve_create->set_focus_mode(Control::FOCUS_NONE);
|
||||||
curve_create->set_tooltip("Add Point (in empty space)\nSplit Segment (in curve).");
|
curve_create->set_tooltip(TTR("Add Point (in empty space)")+"\n"+TTR("Split Segment (in curve)"));
|
||||||
curve_create->connect("pressed",this,"_mode_selected",varray(MODE_CREATE));
|
curve_create->connect("pressed",this,"_mode_selected",varray(MODE_CREATE));
|
||||||
base_hb->add_child(curve_create);
|
base_hb->add_child(curve_create);
|
||||||
curve_del = memnew( ToolButton );
|
curve_del = memnew( ToolButton );
|
||||||
curve_del->set_icon(CanvasItemEditor::get_singleton()->get_icon("CurveDelete","EditorIcons"));
|
curve_del->set_icon(CanvasItemEditor::get_singleton()->get_icon("CurveDelete","EditorIcons"));
|
||||||
curve_del->set_toggle_mode(true);
|
curve_del->set_toggle_mode(true);
|
||||||
curve_del->set_focus_mode(Control::FOCUS_NONE);
|
curve_del->set_focus_mode(Control::FOCUS_NONE);
|
||||||
curve_del->set_tooltip(TTR("Delete Point."));
|
curve_del->set_tooltip(TTR("Delete Point"));
|
||||||
curve_del->connect("pressed",this,"_mode_selected",varray(MODE_DELETE));
|
curve_del->connect("pressed",this,"_mode_selected",varray(MODE_DELETE));
|
||||||
base_hb->add_child(curve_del);
|
base_hb->add_child(curve_del);
|
||||||
curve_close = memnew( ToolButton );
|
curve_close = memnew( ToolButton );
|
||||||
|
@ -546,21 +546,21 @@ PathEditorPlugin::PathEditorPlugin(EditorNode *p_node) {
|
|||||||
curve_edit->set_toggle_mode(true);
|
curve_edit->set_toggle_mode(true);
|
||||||
curve_edit->hide();
|
curve_edit->hide();
|
||||||
curve_edit->set_focus_mode(Control::FOCUS_NONE);
|
curve_edit->set_focus_mode(Control::FOCUS_NONE);
|
||||||
curve_edit->set_tooltip("Select Points\nShift+Drag: Select Control Points\n"+keycode_get_string(KEY_MASK_CMD)+"Click: Add Point\nRight Click: Delete Point.");
|
curve_edit->set_tooltip(TTR("Select Points")+"\n"+TTR("Shift+Drag: Select Control Points")+"\n"+keycode_get_string(KEY_MASK_CMD)+TTR("Click: Add Point")+"\n"+TTR("Right Click: Delete Point"));
|
||||||
SpatialEditor::get_singleton()->add_control_to_menu_panel(curve_edit);
|
SpatialEditor::get_singleton()->add_control_to_menu_panel(curve_edit);
|
||||||
curve_create = memnew( ToolButton );
|
curve_create = memnew( ToolButton );
|
||||||
curve_create->set_icon(SpatialEditor::get_singleton()->get_icon("CurveCreate","EditorIcons"));
|
curve_create->set_icon(SpatialEditor::get_singleton()->get_icon("CurveCreate","EditorIcons"));
|
||||||
curve_create->set_toggle_mode(true);
|
curve_create->set_toggle_mode(true);
|
||||||
curve_create->hide();
|
curve_create->hide();
|
||||||
curve_create->set_focus_mode(Control::FOCUS_NONE);
|
curve_create->set_focus_mode(Control::FOCUS_NONE);
|
||||||
curve_create->set_tooltip("Add Point (in empty space)\nSplit Segment (in curve).");
|
curve_create->set_tooltip(TTR("Add Point (in empty space)")+"\n"+TTR("Split Segment (in curve)"));
|
||||||
SpatialEditor::get_singleton()->add_control_to_menu_panel(curve_create);
|
SpatialEditor::get_singleton()->add_control_to_menu_panel(curve_create);
|
||||||
curve_del = memnew( ToolButton );
|
curve_del = memnew( ToolButton );
|
||||||
curve_del->set_icon(SpatialEditor::get_singleton()->get_icon("CurveDelete","EditorIcons"));
|
curve_del->set_icon(SpatialEditor::get_singleton()->get_icon("CurveDelete","EditorIcons"));
|
||||||
curve_del->set_toggle_mode(true);
|
curve_del->set_toggle_mode(true);
|
||||||
curve_del->hide();
|
curve_del->hide();
|
||||||
curve_del->set_focus_mode(Control::FOCUS_NONE);
|
curve_del->set_focus_mode(Control::FOCUS_NONE);
|
||||||
curve_del->set_tooltip(TTR("Delete Point."));
|
curve_del->set_tooltip(TTR("Delete Point"));
|
||||||
SpatialEditor::get_singleton()->add_control_to_menu_panel(curve_del);
|
SpatialEditor::get_singleton()->add_control_to_menu_panel(curve_del);
|
||||||
curve_close = memnew( ToolButton );
|
curve_close = memnew( ToolButton );
|
||||||
curve_close->set_icon(SpatialEditor::get_singleton()->get_icon("CurveClose","EditorIcons"));
|
curve_close->set_icon(SpatialEditor::get_singleton()->get_icon("CurveClose","EditorIcons"));
|
||||||
|
@ -840,8 +840,8 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
|
|||||||
options = memnew( MenuButton );
|
options = memnew( MenuButton );
|
||||||
add_child(options);
|
add_child(options);
|
||||||
options->set_area_as_parent_rect();
|
options->set_area_as_parent_rect();
|
||||||
options->set_text(TTR("Polygon"));
|
options->set_text("Polygon");
|
||||||
//options->get_popup()->add_item(TTR("Parse BBCODE"),PARSE_BBCODE);
|
//options->get_popup()->add_item("Parse BBCode",PARSE_BBCODE);
|
||||||
options->get_popup()->connect("item_pressed", this,"_menu_option");
|
options->get_popup()->connect("item_pressed", this,"_menu_option");
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -868,7 +868,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
|
|||||||
uv_button[i]->set_focus_mode(FOCUS_NONE);
|
uv_button[i]->set_focus_mode(FOCUS_NONE);
|
||||||
}
|
}
|
||||||
|
|
||||||
uv_button[0]->set_tooltip("Move Point\nCtrl: Rotate\nShift: Move All\n:Shift+Ctrl: Scale");
|
uv_button[0]->set_tooltip(TTR("Move Point")+"\n"+TTR("Ctrl: Rotate")+"\n"+TTR("Shift: Move All")+"\n"+TTR("Shift+Ctrl: Scale"));
|
||||||
uv_button[1]->set_tooltip(TTR("Move Polygon"));
|
uv_button[1]->set_tooltip(TTR("Move Polygon"));
|
||||||
uv_button[2]->set_tooltip(TTR("Rotate Polygon"));
|
uv_button[2]->set_tooltip(TTR("Rotate Polygon"));
|
||||||
uv_button[3]->set_tooltip(TTR("Scale Polygon"));
|
uv_button[3]->set_tooltip(TTR("Scale Polygon"));
|
||||||
|
@ -72,7 +72,7 @@ void ResourcePreloaderEditor::_files_load_request(const Vector<String>& p_paths)
|
|||||||
if (resource.is_null()) {
|
if (resource.is_null()) {
|
||||||
dialog->set_text(TTR("ERROR: Couldn't load resource!"));
|
dialog->set_text(TTR("ERROR: Couldn't load resource!"));
|
||||||
dialog->set_title(TTR("Error!"));
|
dialog->set_title(TTR("Error!"));
|
||||||
//dialog->get_cancel()->set_text(TTR("Close"));
|
//dialog->get_cancel()->set_text("Close");
|
||||||
dialog->get_ok()->set_text(TTR("Close"));
|
dialog->get_ok()->set_text(TTR("Close"));
|
||||||
dialog->popup_centered_minsize();
|
dialog->popup_centered_minsize();
|
||||||
return; ///beh should show an error i guess
|
return; ///beh should show an error i guess
|
||||||
@ -169,7 +169,7 @@ void ResourcePreloaderEditor::_paste_pressed() {
|
|||||||
if (!r.is_valid()) {
|
if (!r.is_valid()) {
|
||||||
dialog->set_text(TTR("Resource clipboard is empty!"));
|
dialog->set_text(TTR("Resource clipboard is empty!"));
|
||||||
dialog->set_title(TTR("Error!"));
|
dialog->set_title(TTR("Error!"));
|
||||||
//dialog->get_cancel()->set_text(TTR("Close"));
|
//dialog->get_cancel()->set_text("Close");
|
||||||
dialog->get_ok()->set_text(TTR("Close"));
|
dialog->get_ok()->set_text(TTR("Close"));
|
||||||
dialog->popup_centered_minsize();
|
dialog->popup_centered_minsize();
|
||||||
return; ///beh should show an error i guess
|
return; ///beh should show an error i guess
|
||||||
@ -206,11 +206,11 @@ void ResourcePreloaderEditor::_delete_pressed() {
|
|||||||
|
|
||||||
_delete_confirm_pressed(); //it has undo.. why bother with a dialog..
|
_delete_confirm_pressed(); //it has undo.. why bother with a dialog..
|
||||||
/*
|
/*
|
||||||
dialog->set_title(TTR("Confirm..."));
|
dialog->set_title("Confirm...");
|
||||||
dialog->set_text(TTR("Remove Resource '")+tree->get_selected()->get_text(0)+"' ?");
|
dialog->set_text("Remove Resource '"+tree->get_selected()->get_text(0)+"' ?");
|
||||||
//dialog->get_cancel()->set_text(TTR("Cancel"));
|
//dialog->get_cancel()->set_text("Cancel");
|
||||||
//dialog->get_ok()->show();
|
//dialog->get_ok()->show();
|
||||||
dialog->get_ok()->set_text(TTR("Remove"));
|
dialog->get_ok()->set_text("Remove");
|
||||||
dialog->popup_centered(Size2(300,60));*/
|
dialog->popup_centered(Size2(300,60));*/
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -106,8 +106,8 @@ RichTextEditor::RichTextEditor() {
|
|||||||
CanvasItemEditor::get_singleton()->add_control_to_menu_panel(options);
|
CanvasItemEditor::get_singleton()->add_control_to_menu_panel(options);
|
||||||
options->set_area_as_parent_rect();
|
options->set_area_as_parent_rect();
|
||||||
|
|
||||||
options->set_text(TTR("RichText"));
|
options->set_text("RichText");
|
||||||
options->get_popup()->add_item(TTR("Parse BBCODE"),PARSE_BBCODE);
|
options->get_popup()->add_item(TTR("Parse BBCode"),PARSE_BBCODE);
|
||||||
options->get_popup()->add_item(TTR("Clear"),CLEAR);
|
options->get_popup()->add_item(TTR("Clear"),CLEAR);
|
||||||
|
|
||||||
options->get_popup()->connect("item_pressed", this,"_menu_option");
|
options->get_popup()->connect("item_pressed", this,"_menu_option");
|
||||||
|
@ -77,7 +77,7 @@ class RichTextEditorPlugin : public EditorPlugin {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual String get_name() const { return TTR("RichText"); }
|
virtual String get_name() const { return "RichText"; }
|
||||||
bool has_main_screen() const { return false; }
|
bool has_main_screen() const { return false; }
|
||||||
virtual void edit(Object *p_node);
|
virtual void edit(Object *p_node);
|
||||||
virtual bool handles(Object *p_node) const;
|
virtual bool handles(Object *p_node) const;
|
||||||
|
@ -328,7 +328,7 @@ void SampleEditor::_update_sample() {
|
|||||||
return; //bye or unsupported
|
return; //bye or unsupported
|
||||||
|
|
||||||
generate_preview_texture(sample,peakdisplay);
|
generate_preview_texture(sample,peakdisplay);
|
||||||
info_label->set_text(TTR("Length: ")+itos(sample->get_length())+" frames ("+String::num(sample->get_length()/(float)sample->get_mix_rate(),2)+" s), "+(sample->get_format()==Sample::FORMAT_PCM16?"16 Bits, ":"8 bits, ")+(sample->is_stereo()?"Stereo.":"Mono."));
|
info_label->set_text(TTR("Length:")+" "+vformat(TTR("%d frames"), sample->get_length())+" ("+String::num(sample->get_length()/(float)sample->get_mix_rate(),2)+" s), "+(sample->get_format()==Sample::FORMAT_PCM16?TTR("16 Bits"):TTR("8 Bits"))+", "+(sample->is_stereo()?TTR("Stereo"):TTR("Mono"))+".");
|
||||||
|
|
||||||
library->add_sample("default",sample);
|
library->add_sample("default",sample);
|
||||||
}
|
}
|
||||||
|
@ -76,7 +76,7 @@ void SampleLibraryEditor::_file_load_request(const DVector<String>& p_path) {
|
|||||||
if (sample.is_null()) {
|
if (sample.is_null()) {
|
||||||
dialog->set_text(TTR("ERROR: Couldn't load sample!"));
|
dialog->set_text(TTR("ERROR: Couldn't load sample!"));
|
||||||
dialog->set_title(TTR("Error!"));
|
dialog->set_title(TTR("Error!"));
|
||||||
//dialog->get_cancel()->set_text(TTR("Close"));
|
//dialog->get_cancel()->set_text("Close");
|
||||||
dialog->get_ok()->set_text(TTR("Close"));
|
dialog->get_ok()->set_text(TTR("Close"));
|
||||||
dialog->popup_centered_minsize();
|
dialog->popup_centered_minsize();
|
||||||
return; ///beh should show an error i guess
|
return; ///beh should show an error i guess
|
||||||
@ -248,7 +248,7 @@ void SampleLibraryEditor::_update_library() {
|
|||||||
ti->set_cell_mode(2,TreeItem::CELL_MODE_STRING);
|
ti->set_cell_mode(2,TreeItem::CELL_MODE_STRING);
|
||||||
ti->set_editable(2,false);
|
ti->set_editable(2,false);
|
||||||
ti->set_selectable(2,false);
|
ti->set_selectable(2,false);
|
||||||
ti->set_text(2,String()+/*itos(smp->get_length())+" frames ("+String::num(smp->get_length()/(float)smp->get_mix_rate(),2)+" smp), "+*/(smp->get_format()==Sample::FORMAT_PCM16?"16 Bits, ":(smp->get_format()==Sample::FORMAT_PCM8?"8 bits, ":TTR("IMA-ADPCM,")))+(smp->is_stereo()?"Stereo":"Mono"));
|
ti->set_text(2,String()+(smp->get_format()==Sample::FORMAT_PCM16?TTR("16 Bits")+", ":(smp->get_format()==Sample::FORMAT_PCM8?TTR("8 Bits")+", ":"IMA-ADPCM,"))+(smp->is_stereo()?TTR("Stereo"):TTR("Mono")));
|
||||||
|
|
||||||
// Volume dB
|
// Volume dB
|
||||||
ti->set_cell_mode(3,TreeItem::CELL_MODE_RANGE);
|
ti->set_cell_mode(3,TreeItem::CELL_MODE_RANGE);
|
||||||
@ -457,7 +457,7 @@ SampleLibraryEditor::SampleLibraryEditor() {
|
|||||||
tree->set_column_title(1,TTR("Preview"));
|
tree->set_column_title(1,TTR("Preview"));
|
||||||
tree->set_column_title(2,TTR("Format"));
|
tree->set_column_title(2,TTR("Format"));
|
||||||
tree->set_column_title(3,"dB");
|
tree->set_column_title(3,"dB");
|
||||||
tree->set_column_title(4,"Pitch");
|
tree->set_column_title(4,TTR("Pitch"));
|
||||||
tree->set_column_title(5,"");
|
tree->set_column_title(5,"");
|
||||||
|
|
||||||
tree->set_column_min_width(1,150);
|
tree->set_column_min_width(1,150);
|
||||||
|
@ -1252,16 +1252,35 @@ void ScriptEditor::_menu_option(int p_option) {
|
|||||||
Ref<Script> scr = current->get_edited_script();
|
Ref<Script> scr = current->get_edited_script();
|
||||||
if (scr.is_null())
|
if (scr.is_null())
|
||||||
return;
|
return;
|
||||||
int line = tx->cursor_get_line();
|
|
||||||
int next_line = line + 1;
|
int from_line = tx->cursor_get_line();
|
||||||
|
int to_line = tx->cursor_get_line();
|
||||||
int column = tx->cursor_get_column();
|
int column = tx->cursor_get_column();
|
||||||
|
|
||||||
if (line >= tx->get_line_count() - 1)
|
if (tx->is_selection_active()) {
|
||||||
tx->set_line(line, tx->get_line(line) + "\n");
|
from_line = tx->get_selection_from_line();
|
||||||
|
to_line = tx->get_selection_to_line();
|
||||||
|
column = tx->cursor_get_column();
|
||||||
|
}
|
||||||
|
int next_line = to_line + 1;
|
||||||
|
|
||||||
String line_clone = tx->get_line(line);
|
tx->begin_complex_operation();
|
||||||
|
for (int i = from_line; i <= to_line; i++) {
|
||||||
|
|
||||||
|
if (i >= tx->get_line_count() - 1) {
|
||||||
|
tx->set_line(i, tx->get_line(i) + "\n");
|
||||||
|
}
|
||||||
|
String line_clone = tx->get_line(i);
|
||||||
tx->insert_at(line_clone, next_line);
|
tx->insert_at(line_clone, next_line);
|
||||||
|
next_line++;
|
||||||
|
}
|
||||||
|
|
||||||
tx->cursor_set_column(column);
|
tx->cursor_set_column(column);
|
||||||
|
if (tx->is_selection_active()) {
|
||||||
|
tx->select(to_line + 1, tx->get_selection_from_column(), next_line - 1, tx->get_selection_to_column());
|
||||||
|
}
|
||||||
|
|
||||||
|
tx->end_complex_operation();
|
||||||
tx->update();
|
tx->update();
|
||||||
|
|
||||||
} break;
|
} break;
|
||||||
@ -2441,7 +2460,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
|
|||||||
#else
|
#else
|
||||||
edit_menu->get_popup()->add_item(TTR("Complete Symbol"),EDIT_COMPLETE,KEY_MASK_CMD|KEY_SPACE);
|
edit_menu->get_popup()->add_item(TTR("Complete Symbol"),EDIT_COMPLETE,KEY_MASK_CMD|KEY_SPACE);
|
||||||
#endif
|
#endif
|
||||||
edit_menu->get_popup()->add_item("Trim Trailing Whitespace", EDIT_TRIM_TRAILING_WHITESAPCE, KEY_MASK_CTRL|KEY_MASK_ALT|KEY_T);
|
edit_menu->get_popup()->add_item(TTR("Trim Trailing Whitespace"), EDIT_TRIM_TRAILING_WHITESAPCE, KEY_MASK_CTRL|KEY_MASK_ALT|KEY_T);
|
||||||
edit_menu->get_popup()->add_item(TTR("Auto Indent"),EDIT_AUTO_INDENT,KEY_MASK_CMD|KEY_I);
|
edit_menu->get_popup()->add_item(TTR("Auto Indent"),EDIT_AUTO_INDENT,KEY_MASK_CMD|KEY_I);
|
||||||
edit_menu->get_popup()->connect("item_pressed", this,"_menu_option");
|
edit_menu->get_popup()->connect("item_pressed", this,"_menu_option");
|
||||||
|
|
||||||
@ -2477,7 +2496,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
|
|||||||
debug_menu->get_popup()->add_item(TTR("Break"),DEBUG_BREAK);
|
debug_menu->get_popup()->add_item(TTR("Break"),DEBUG_BREAK);
|
||||||
debug_menu->get_popup()->add_item(TTR("Continue"),DEBUG_CONTINUE);
|
debug_menu->get_popup()->add_item(TTR("Continue"),DEBUG_CONTINUE);
|
||||||
debug_menu->get_popup()->add_separator();
|
debug_menu->get_popup()->add_separator();
|
||||||
//debug_menu->get_popup()->add_check_item(TTR("Show Debugger"),DEBUG_SHOW);
|
//debug_menu->get_popup()->add_check_item("Show Debugger",DEBUG_SHOW);
|
||||||
debug_menu->get_popup()->add_check_item(TTR("Keep Debugger Open"),DEBUG_SHOW_KEEP_OPEN);
|
debug_menu->get_popup()->add_check_item(TTR("Keep Debugger Open"),DEBUG_SHOW_KEEP_OPEN);
|
||||||
debug_menu->get_popup()->connect("item_pressed", this,"_menu_option");
|
debug_menu->get_popup()->connect("item_pressed", this,"_menu_option");
|
||||||
|
|
||||||
@ -2523,7 +2542,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
|
|||||||
site_search->set_text(TTR("Tutorials"));
|
site_search->set_text(TTR("Tutorials"));
|
||||||
site_search->connect("pressed",this,"_menu_option",varray(SEARCH_WEBSITE));
|
site_search->connect("pressed",this,"_menu_option",varray(SEARCH_WEBSITE));
|
||||||
menu_hb->add_child(site_search);
|
menu_hb->add_child(site_search);
|
||||||
site_search->set_tooltip(TTR("Open http://www.godotengine.org at tutorials section."));
|
site_search->set_tooltip(TTR("Open https://godotengine.org at tutorials section."));
|
||||||
|
|
||||||
class_search = memnew( ToolButton );
|
class_search = memnew( ToolButton );
|
||||||
class_search->set_text(TTR("Classes"));
|
class_search->set_text(TTR("Classes"));
|
||||||
@ -2581,7 +2600,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
|
|||||||
disk_changed->set_child_rect(vbc);
|
disk_changed->set_child_rect(vbc);
|
||||||
|
|
||||||
Label *dl = memnew( Label );
|
Label *dl = memnew( Label );
|
||||||
dl->set_text("The following files are newer on disk.\nWhat action should be taken?:");
|
dl->set_text(TTR("The following files are newer on disk.\nWhat action should be taken?:"));
|
||||||
vbc->add_child(dl);
|
vbc->add_child(dl);
|
||||||
|
|
||||||
disk_changed_list = memnew( Tree );
|
disk_changed_list = memnew( Tree );
|
||||||
|
@ -507,7 +507,7 @@ ShaderEditor::ShaderEditor() {
|
|||||||
search_menu->get_popup()->add_item(TTR("Find Next"),SEARCH_FIND_NEXT,KEY_F3);
|
search_menu->get_popup()->add_item(TTR("Find Next"),SEARCH_FIND_NEXT,KEY_F3);
|
||||||
search_menu->get_popup()->add_item(TTR("Replace.."),SEARCH_REPLACE,KEY_MASK_CMD|KEY_R);
|
search_menu->get_popup()->add_item(TTR("Replace.."),SEARCH_REPLACE,KEY_MASK_CMD|KEY_R);
|
||||||
search_menu->get_popup()->add_separator();
|
search_menu->get_popup()->add_separator();
|
||||||
// search_menu->get_popup()->add_item(TTR("Locate Symbol.."),SEARCH_LOCATE_SYMBOL,KEY_MASK_CMD|KEY_K);
|
// search_menu->get_popup()->add_item("Locate Symbol..",SEARCH_LOCATE_SYMBOL,KEY_MASK_CMD|KEY_K);
|
||||||
search_menu->get_popup()->add_item(TTR("Goto Line.."),SEARCH_GOTO_LINE,KEY_MASK_CMD|KEY_G);
|
search_menu->get_popup()->add_item(TTR("Goto Line.."),SEARCH_GOTO_LINE,KEY_MASK_CMD|KEY_G);
|
||||||
search_menu->get_popup()->connect("item_pressed", this,"_menu_option");
|
search_menu->get_popup()->connect("item_pressed", this,"_menu_option");
|
||||||
|
|
||||||
|
@ -743,7 +743,7 @@ void ShaderGraphView::_vec_op_changed(int p_op, int p_id){
|
|||||||
void ShaderGraphView::_vec_scalar_op_changed(int p_op, int p_id){
|
void ShaderGraphView::_vec_scalar_op_changed(int p_op, int p_id){
|
||||||
|
|
||||||
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
|
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
|
||||||
ur->create_action(TTR("Change VecxScalar Operator"));
|
ur->create_action(TTR("Change Vec Scalar Operator"));
|
||||||
ur->add_do_method(graph.ptr(),"vec_scalar_op_node_set_op",type,p_id,p_op);
|
ur->add_do_method(graph.ptr(),"vec_scalar_op_node_set_op",type,p_id,p_op);
|
||||||
ur->add_undo_method(graph.ptr(),"vec_scalar_op_node_set_op",type,p_id,graph->vec_scalar_op_node_get_op(type,p_id));
|
ur->add_undo_method(graph.ptr(),"vec_scalar_op_node_set_op",type,p_id,graph->vec_scalar_op_node_get_op(type,p_id));
|
||||||
ur->add_do_method(this,"_update_graph");
|
ur->add_do_method(this,"_update_graph");
|
||||||
@ -902,7 +902,7 @@ void ShaderGraphView::_variant_edited() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
|
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
|
||||||
ur->create_action(TTR("Change default value"));
|
ur->create_action(TTR("Change Default Value"));
|
||||||
ur->add_do_method(graph.ptr(),"default_set_value",type,edited_id,edited_def, v);
|
ur->add_do_method(graph.ptr(),"default_set_value",type,edited_id,edited_def, v);
|
||||||
ur->add_undo_method(graph.ptr(),"default_set_value",type,edited_id,edited_def, v2);
|
ur->add_undo_method(graph.ptr(),"default_set_value",type,edited_id,edited_def, v2);
|
||||||
ur->add_do_method(this,"_update_graph");
|
ur->add_do_method(this,"_update_graph");
|
||||||
@ -1427,7 +1427,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
|
|
||||||
} break; // all inputs (case Shader type dependent)
|
} break; // all inputs (case Shader type dependent)
|
||||||
case ShaderGraph::NODE_SCALAR_CONST: {
|
case ShaderGraph::NODE_SCALAR_CONST: {
|
||||||
gn->set_title(TTR("Scalar"));
|
gn->set_title("Scalar");
|
||||||
SpinBox *sb = memnew( SpinBox );
|
SpinBox *sb = memnew( SpinBox );
|
||||||
sb->set_min(-100000);
|
sb->set_min(-100000);
|
||||||
sb->set_max(100000);
|
sb->set_max(100000);
|
||||||
@ -1440,7 +1440,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
} break; //scalar constant
|
} break; //scalar constant
|
||||||
case ShaderGraph::NODE_VEC_CONST: {
|
case ShaderGraph::NODE_VEC_CONST: {
|
||||||
|
|
||||||
gn->set_title(TTR("Vector"));
|
gn->set_title("Vector");
|
||||||
Array v3p(true);
|
Array v3p(true);
|
||||||
for(int i=0;i<3;i++) {
|
for(int i=0;i<3;i++) {
|
||||||
HBoxContainer *hbc = memnew( HBoxContainer );
|
HBoxContainer *hbc = memnew( HBoxContainer );
|
||||||
@ -1469,11 +1469,11 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
cpb->connect("color_changed",this,"_rgb_const_changed",varray(p_id));
|
cpb->connect("color_changed",this,"_rgb_const_changed",varray(p_id));
|
||||||
gn->add_child(cpb);
|
gn->add_child(cpb);
|
||||||
Label *l = memnew( Label );
|
Label *l = memnew( Label );
|
||||||
l->set_text(TTR("RGB"));
|
l->set_text("RGB");
|
||||||
l->set_align(Label::ALIGN_RIGHT);
|
l->set_align(Label::ALIGN_RIGHT);
|
||||||
gn->add_child(l);
|
gn->add_child(l);
|
||||||
l = memnew( Label );
|
l = memnew( Label );
|
||||||
l->set_text(TTR("Alpha"));
|
l->set_text("Alpha");
|
||||||
l->set_align(Label::ALIGN_RIGHT);
|
l->set_align(Label::ALIGN_RIGHT);
|
||||||
gn->add_child(l);
|
gn->add_child(l);
|
||||||
|
|
||||||
@ -1482,7 +1482,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
|
|
||||||
} break; //rgb constant (shows a color picker instead)
|
} break; //rgb constant (shows a color picker instead)
|
||||||
case ShaderGraph::NODE_XFORM_CONST: {
|
case ShaderGraph::NODE_XFORM_CONST: {
|
||||||
gn->set_title(TTR("XForm"));
|
gn->set_title("XForm");
|
||||||
ToolButton *edit = memnew( ToolButton );
|
ToolButton *edit = memnew( ToolButton );
|
||||||
edit->set_text("edit..");
|
edit->set_text("edit..");
|
||||||
edit->connect("pressed",this,"_xform_const_changed",varray(p_id,edit));
|
edit->connect("pressed",this,"_xform_const_changed",varray(p_id,edit));
|
||||||
@ -1492,7 +1492,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
} break; // 4x4 matrix constant
|
} break; // 4x4 matrix constant
|
||||||
case ShaderGraph::NODE_TIME: {
|
case ShaderGraph::NODE_TIME: {
|
||||||
|
|
||||||
gn->set_title(TTR("Time"));
|
gn->set_title("Time");
|
||||||
Label *l = memnew( Label );
|
Label *l = memnew( Label );
|
||||||
l->set_text("(s)");
|
l->set_text("(s)");
|
||||||
l->set_align(Label::ALIGN_RIGHT);
|
l->set_align(Label::ALIGN_RIGHT);
|
||||||
@ -1502,24 +1502,24 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
} break; // time in seconds
|
} break; // time in seconds
|
||||||
case ShaderGraph::NODE_SCREEN_TEX: {
|
case ShaderGraph::NODE_SCREEN_TEX: {
|
||||||
|
|
||||||
gn->set_title(TTR("ScreenTex"));
|
gn->set_title("ScreenTex");
|
||||||
HBoxContainer *hbc = memnew( HBoxContainer );
|
HBoxContainer *hbc = memnew( HBoxContainer );
|
||||||
hbc->add_constant_override("separation",0);
|
hbc->add_constant_override("separation",0);
|
||||||
if (!graph->is_slot_connected(type,p_id,0)) {
|
if (!graph->is_slot_connected(type,p_id,0)) {
|
||||||
Vector3 v = graph->default_get_value(type, p_id, 0);
|
Vector3 v = graph->default_get_value(type, p_id, 0);
|
||||||
hbc->add_child(make_editor(TTR("UV: ") + v,gn,p_id,0,Variant::VECTOR3));
|
hbc->add_child(make_editor("UV: " + v,gn,p_id,0,Variant::VECTOR3));
|
||||||
} else {
|
} else {
|
||||||
hbc->add_child(make_label(TTR("UV"),Variant::VECTOR3));
|
hbc->add_child(make_label("UV",Variant::VECTOR3));
|
||||||
}
|
}
|
||||||
hbc->add_spacer();
|
hbc->add_spacer();
|
||||||
hbc->add_child( memnew(Label(TTR("RGB"))));
|
hbc->add_child( memnew(Label("RGB")));
|
||||||
gn->add_child(hbc);
|
gn->add_child(hbc);
|
||||||
gn->set_slot(0,true,ShaderGraph::SLOT_TYPE_VEC,typecol[ShaderGraph::SLOT_TYPE_VEC],true,ShaderGraph::SLOT_TYPE_VEC,typecol[ShaderGraph::SLOT_TYPE_VEC]);
|
gn->set_slot(0,true,ShaderGraph::SLOT_TYPE_VEC,typecol[ShaderGraph::SLOT_TYPE_VEC],true,ShaderGraph::SLOT_TYPE_VEC,typecol[ShaderGraph::SLOT_TYPE_VEC]);
|
||||||
|
|
||||||
} break; // screen texture sampler (takes UV) (only usable in fragment case Shader)
|
} break; // screen texture sampler (takes UV) (only usable in fragment case Shader)
|
||||||
case ShaderGraph::NODE_SCALAR_OP: {
|
case ShaderGraph::NODE_SCALAR_OP: {
|
||||||
|
|
||||||
gn->set_title(TTR("ScalarOp"));
|
gn->set_title("ScalarOp");
|
||||||
static const char* op_name[ShaderGraph::SCALAR_MAX_OP]={
|
static const char* op_name[ShaderGraph::SCALAR_MAX_OP]={
|
||||||
("Add"),
|
("Add"),
|
||||||
("Sub"),
|
("Sub"),
|
||||||
@ -1567,7 +1567,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
} break; // scalar vs scalar op (mul: { } break; add: { } break; div: { } break; etc)
|
} break; // scalar vs scalar op (mul: { } break; add: { } break; div: { } break; etc)
|
||||||
case ShaderGraph::NODE_VEC_OP: {
|
case ShaderGraph::NODE_VEC_OP: {
|
||||||
|
|
||||||
gn->set_title(TTR("VecOp"));
|
gn->set_title("VecOp");
|
||||||
static const char* op_name[ShaderGraph::VEC_MAX_OP]={
|
static const char* op_name[ShaderGraph::VEC_MAX_OP]={
|
||||||
("Add"),
|
("Add"),
|
||||||
("Sub"),
|
("Sub"),
|
||||||
@ -1615,7 +1615,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
} break; // vec3 vs vec3 op (mul: { } break;ad: { } break;div: { } break;crossprod: { } break;etc)
|
} break; // vec3 vs vec3 op (mul: { } break;ad: { } break;div: { } break;crossprod: { } break;etc)
|
||||||
case ShaderGraph::NODE_VEC_SCALAR_OP: {
|
case ShaderGraph::NODE_VEC_SCALAR_OP: {
|
||||||
|
|
||||||
gn->set_title(TTR("VecScalarOp"));
|
gn->set_title("VecScalarOp");
|
||||||
static const char* op_name[ShaderGraph::VEC_SCALAR_MAX_OP]={
|
static const char* op_name[ShaderGraph::VEC_SCALAR_MAX_OP]={
|
||||||
("Mul"),
|
("Mul"),
|
||||||
("Div"),
|
("Div"),
|
||||||
@ -1657,7 +1657,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
} break; // vec3 vs scalar op (mul: { } break; add: { } break; div: { } break; etc)
|
} break; // vec3 vs scalar op (mul: { } break; add: { } break; div: { } break; etc)
|
||||||
case ShaderGraph::NODE_RGB_OP: {
|
case ShaderGraph::NODE_RGB_OP: {
|
||||||
|
|
||||||
gn->set_title(TTR("RGB Op"));
|
gn->set_title("RGB Op");
|
||||||
static const char* op_name[ShaderGraph::RGB_MAX_OP]={
|
static const char* op_name[ShaderGraph::RGB_MAX_OP]={
|
||||||
("Screen"),
|
("Screen"),
|
||||||
("Difference"),
|
("Difference"),
|
||||||
@ -1702,7 +1702,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
} break; // vec3 vs vec3 rgb op (with scalar amount): { } break; like brighten: { } break; darken: { } break; burn: { } break; dodge: { } break; multiply: { } break; etc.
|
} break; // vec3 vs vec3 rgb op (with scalar amount): { } break; like brighten: { } break; darken: { } break; burn: { } break; dodge: { } break; multiply: { } break; etc.
|
||||||
case ShaderGraph::NODE_XFORM_MULT: {
|
case ShaderGraph::NODE_XFORM_MULT: {
|
||||||
|
|
||||||
gn->set_title(TTR("XFMult"));
|
gn->set_title("XFMult");
|
||||||
HBoxContainer *hbc = memnew( HBoxContainer );
|
HBoxContainer *hbc = memnew( HBoxContainer );
|
||||||
if (graph->is_slot_connected(type, p_id, 0)) {
|
if (graph->is_slot_connected(type, p_id, 0)) {
|
||||||
hbc->add_child(make_label("a",Variant::TRANSFORM));
|
hbc->add_child(make_label("a",Variant::TRANSFORM));
|
||||||
@ -1725,9 +1725,9 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
} break; // mat4 x mat4
|
} break; // mat4 x mat4
|
||||||
case ShaderGraph::NODE_XFORM_VEC_MULT: {
|
case ShaderGraph::NODE_XFORM_VEC_MULT: {
|
||||||
|
|
||||||
gn->set_title(TTR("XFVecMult"));
|
gn->set_title("XFVecMult");
|
||||||
|
|
||||||
CheckBox *button = memnew (CheckBox(TTR("RotOnly")));
|
CheckBox *button = memnew (CheckBox("RotOnly"));
|
||||||
button->set_pressed(graph->xform_vec_mult_node_get_no_translation(type,p_id));
|
button->set_pressed(graph->xform_vec_mult_node_get_no_translation(type,p_id));
|
||||||
button->connect("toggled",this,"_xform_inv_rev_changed",varray(p_id));
|
button->connect("toggled",this,"_xform_inv_rev_changed",varray(p_id));
|
||||||
|
|
||||||
@ -1758,10 +1758,10 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
} break;
|
} break;
|
||||||
case ShaderGraph::NODE_XFORM_VEC_INV_MULT: {
|
case ShaderGraph::NODE_XFORM_VEC_INV_MULT: {
|
||||||
|
|
||||||
gn->set_title(TTR("XFVecInvMult"));
|
gn->set_title("XFVecInvMult");
|
||||||
|
|
||||||
|
|
||||||
CheckBox *button = memnew( CheckBox(TTR("RotOnly")));
|
CheckBox *button = memnew( CheckBox("RotOnly"));
|
||||||
button->set_pressed(graph->xform_vec_mult_node_get_no_translation(type,p_id));
|
button->set_pressed(graph->xform_vec_mult_node_get_no_translation(type,p_id));
|
||||||
button->connect("toggled",this,"_xform_inv_rev_changed",varray(p_id));
|
button->connect("toggled",this,"_xform_inv_rev_changed",varray(p_id));
|
||||||
|
|
||||||
@ -1793,7 +1793,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
} break; // mat4 x vec3 inverse mult (with no-translation option)
|
} break; // mat4 x vec3 inverse mult (with no-translation option)
|
||||||
case ShaderGraph::NODE_SCALAR_FUNC: {
|
case ShaderGraph::NODE_SCALAR_FUNC: {
|
||||||
|
|
||||||
gn->set_title(TTR("ScalarFunc"));
|
gn->set_title("ScalarFunc");
|
||||||
static const char* func_name[ShaderGraph::SCALAR_MAX_FUNC]={
|
static const char* func_name[ShaderGraph::SCALAR_MAX_FUNC]={
|
||||||
("Sin"),
|
("Sin"),
|
||||||
("Cos"),
|
("Cos"),
|
||||||
@ -1846,7 +1846,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
gn->set_title(TTR("VecFunc"));
|
gn->set_title("VecFunc");
|
||||||
static const char* func_name[ShaderGraph::VEC_MAX_FUNC]={
|
static const char* func_name[ShaderGraph::VEC_MAX_FUNC]={
|
||||||
("Normalize"),
|
("Normalize"),
|
||||||
("Saturate"),
|
("Saturate"),
|
||||||
@ -1882,7 +1882,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
|
|
||||||
} break; // vector function (normalize: { } break; negate: { } break; reciprocal: { } break; rgb2hsv: { } break; hsv2rgb: { } break; etc: { } break; etc)
|
} break; // vector function (normalize: { } break; negate: { } break; reciprocal: { } break; rgb2hsv: { } break; hsv2rgb: { } break; etc: { } break; etc)
|
||||||
case ShaderGraph::NODE_VEC_LEN: {
|
case ShaderGraph::NODE_VEC_LEN: {
|
||||||
gn->set_title(TTR("VecLength"));
|
gn->set_title("VecLength");
|
||||||
HBoxContainer *hbc = memnew( HBoxContainer );
|
HBoxContainer *hbc = memnew( HBoxContainer );
|
||||||
if (graph->is_slot_connected(type, p_id, 0)) {
|
if (graph->is_slot_connected(type, p_id, 0)) {
|
||||||
hbc->add_child(make_label("in", Variant::VECTOR3));
|
hbc->add_child(make_label("in", Variant::VECTOR3));
|
||||||
@ -1899,7 +1899,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
} break; // vec3 length
|
} break; // vec3 length
|
||||||
case ShaderGraph::NODE_DOT_PROD: {
|
case ShaderGraph::NODE_DOT_PROD: {
|
||||||
|
|
||||||
gn->set_title(TTR("DotProduct"));
|
gn->set_title("DotProduct");
|
||||||
HBoxContainer *hbc = memnew( HBoxContainer );
|
HBoxContainer *hbc = memnew( HBoxContainer );
|
||||||
hbc->add_constant_override("separation",0);
|
hbc->add_constant_override("separation",0);
|
||||||
if (graph->is_slot_connected(type, p_id, 0)) {
|
if (graph->is_slot_connected(type, p_id, 0)) {
|
||||||
@ -1924,7 +1924,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
} break; // vec3 . vec3 (dot product -> scalar output)
|
} break; // vec3 . vec3 (dot product -> scalar output)
|
||||||
case ShaderGraph::NODE_VEC_TO_SCALAR: {
|
case ShaderGraph::NODE_VEC_TO_SCALAR: {
|
||||||
|
|
||||||
gn->set_title(TTR("Vec2Scalar"));
|
gn->set_title("Vec2Scalar");
|
||||||
HBoxContainer *hbc = memnew( HBoxContainer );
|
HBoxContainer *hbc = memnew( HBoxContainer );
|
||||||
hbc->add_constant_override("separation",0);
|
hbc->add_constant_override("separation",0);
|
||||||
if (graph->is_slot_connected(type, p_id, 0)) {
|
if (graph->is_slot_connected(type, p_id, 0)) {
|
||||||
@ -1955,7 +1955,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
} break; // 1 vec3 input: { } break; 3 scalar outputs
|
} break; // 1 vec3 input: { } break; 3 scalar outputs
|
||||||
case ShaderGraph::NODE_SCALAR_TO_VEC: {
|
case ShaderGraph::NODE_SCALAR_TO_VEC: {
|
||||||
|
|
||||||
gn->set_title(TTR("Scalar2Vec"));
|
gn->set_title("Scalar2Vec");
|
||||||
HBoxContainer *hbc = memnew( HBoxContainer );
|
HBoxContainer *hbc = memnew( HBoxContainer );
|
||||||
if (graph->is_slot_connected(type, p_id, 0)) {
|
if (graph->is_slot_connected(type, p_id, 0)) {
|
||||||
hbc->add_child(make_label("x", Variant::REAL));
|
hbc->add_child(make_label("x", Variant::REAL));
|
||||||
@ -1986,7 +1986,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
} break; // 3 scalar input: { } break; 1 vec3 output
|
} break; // 3 scalar input: { } break; 1 vec3 output
|
||||||
case ShaderGraph::NODE_VEC_TO_XFORM: {
|
case ShaderGraph::NODE_VEC_TO_XFORM: {
|
||||||
|
|
||||||
gn->set_title(TTR("Vec2XForm"));
|
gn->set_title("Vec2XForm");
|
||||||
HBoxContainer *hbc = memnew( HBoxContainer );
|
HBoxContainer *hbc = memnew( HBoxContainer );
|
||||||
hbc->add_constant_override("separation",0);
|
hbc->add_constant_override("separation",0);
|
||||||
if (graph->is_slot_connected(type, p_id, 0)) {
|
if (graph->is_slot_connected(type, p_id, 0)) {
|
||||||
@ -2025,7 +2025,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
} break; // 3 vec input: { } break; 1 xform output
|
} break; // 3 vec input: { } break; 1 xform output
|
||||||
case ShaderGraph::NODE_XFORM_TO_VEC: {
|
case ShaderGraph::NODE_XFORM_TO_VEC: {
|
||||||
|
|
||||||
gn->set_title(TTR("XForm2Vec"));
|
gn->set_title("XForm2Vec");
|
||||||
|
|
||||||
HBoxContainer *hbc = memnew( HBoxContainer );
|
HBoxContainer *hbc = memnew( HBoxContainer );
|
||||||
hbc->add_constant_override("separation",0);
|
hbc->add_constant_override("separation",0);
|
||||||
@ -2057,7 +2057,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
} break; // 3 vec input: { } break; 1 xform output
|
} break; // 3 vec input: { } break; 1 xform output
|
||||||
case ShaderGraph::NODE_SCALAR_INTERP: {
|
case ShaderGraph::NODE_SCALAR_INTERP: {
|
||||||
|
|
||||||
gn->set_title(TTR("ScalarInterp"));
|
gn->set_title("ScalarInterp");
|
||||||
HBoxContainer *hbc = memnew( HBoxContainer );
|
HBoxContainer *hbc = memnew( HBoxContainer );
|
||||||
hbc->add_constant_override("separation",0);
|
hbc->add_constant_override("separation",0);
|
||||||
if (graph->is_slot_connected(type, p_id, 0)) {
|
if (graph->is_slot_connected(type, p_id, 0)) {
|
||||||
@ -2090,7 +2090,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
} break; // scalar interpolation (with optional curve)
|
} break; // scalar interpolation (with optional curve)
|
||||||
case ShaderGraph::NODE_VEC_INTERP: {
|
case ShaderGraph::NODE_VEC_INTERP: {
|
||||||
|
|
||||||
gn->set_title(TTR("VecInterp"));
|
gn->set_title("VecInterp");
|
||||||
HBoxContainer *hbc = memnew( HBoxContainer );
|
HBoxContainer *hbc = memnew( HBoxContainer );
|
||||||
if (graph->is_slot_connected(type, p_id, 0)) {
|
if (graph->is_slot_connected(type, p_id, 0)) {
|
||||||
hbc->add_child(make_label("a", Variant::VECTOR3));
|
hbc->add_child(make_label("a", Variant::VECTOR3));
|
||||||
@ -2174,7 +2174,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
} break; // scalar interpolation (with optional curve)
|
} break; // scalar interpolation (with optional curve)
|
||||||
case ShaderGraph::NODE_CURVE_MAP: {
|
case ShaderGraph::NODE_CURVE_MAP: {
|
||||||
|
|
||||||
gn->set_title(TTR("CurveMap"));
|
gn->set_title("CurveMap");
|
||||||
GraphCurveMapEdit * map = memnew( GraphCurveMapEdit );
|
GraphCurveMapEdit * map = memnew( GraphCurveMapEdit );
|
||||||
|
|
||||||
DVector<Vector2> points = graph->curve_map_node_get_points(type,p_id);
|
DVector<Vector2> points = graph->curve_map_node_get_points(type,p_id);
|
||||||
@ -2221,7 +2221,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
|
|
||||||
case ShaderGraph::NODE_SCALAR_INPUT: {
|
case ShaderGraph::NODE_SCALAR_INPUT: {
|
||||||
|
|
||||||
gn->set_title(TTR("ScalarUniform"));
|
gn->set_title("ScalarUniform");
|
||||||
LineEdit *le = memnew( LineEdit );
|
LineEdit *le = memnew( LineEdit );
|
||||||
gn->add_child(le);
|
gn->add_child(le);
|
||||||
le->set_text(graph->input_node_get_name(type,p_id));
|
le->set_text(graph->input_node_get_name(type,p_id));
|
||||||
@ -2238,7 +2238,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
} break; // scalar uniform (assignable in material)
|
} break; // scalar uniform (assignable in material)
|
||||||
case ShaderGraph::NODE_VEC_INPUT: {
|
case ShaderGraph::NODE_VEC_INPUT: {
|
||||||
|
|
||||||
gn->set_title(TTR("VectorUniform"));
|
gn->set_title("VectorUniform");
|
||||||
LineEdit *le = memnew( LineEdit );
|
LineEdit *le = memnew( LineEdit );
|
||||||
gn->add_child(le);
|
gn->add_child(le);
|
||||||
le->set_text(graph->input_node_get_name(type,p_id));
|
le->set_text(graph->input_node_get_name(type,p_id));
|
||||||
@ -2265,7 +2265,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
} break; // vec3 uniform (assignable in material)
|
} break; // vec3 uniform (assignable in material)
|
||||||
case ShaderGraph::NODE_RGB_INPUT: {
|
case ShaderGraph::NODE_RGB_INPUT: {
|
||||||
|
|
||||||
gn->set_title(TTR("ColorUniform"));
|
gn->set_title("ColorUniform");
|
||||||
LineEdit *le = memnew( LineEdit );
|
LineEdit *le = memnew( LineEdit );
|
||||||
gn->add_child(le);
|
gn->add_child(le);
|
||||||
le->set_text(graph->input_node_get_name(type,p_id));
|
le->set_text(graph->input_node_get_name(type,p_id));
|
||||||
@ -2275,11 +2275,11 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
cpb->connect("color_changed",this,"_rgb_input_changed",varray(p_id));
|
cpb->connect("color_changed",this,"_rgb_input_changed",varray(p_id));
|
||||||
gn->add_child(cpb);
|
gn->add_child(cpb);
|
||||||
Label *l = memnew( Label );
|
Label *l = memnew( Label );
|
||||||
l->set_text(TTR("RGB"));
|
l->set_text("RGB");
|
||||||
l->set_align(Label::ALIGN_RIGHT);
|
l->set_align(Label::ALIGN_RIGHT);
|
||||||
gn->add_child(l);
|
gn->add_child(l);
|
||||||
l = memnew( Label );
|
l = memnew( Label );
|
||||||
l->set_text(TTR("Alpha"));
|
l->set_text("Alpha");
|
||||||
l->set_align(Label::ALIGN_RIGHT);
|
l->set_align(Label::ALIGN_RIGHT);
|
||||||
gn->add_child(l);
|
gn->add_child(l);
|
||||||
|
|
||||||
@ -2289,7 +2289,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
|
|
||||||
} break; // color uniform (assignable in material)
|
} break; // color uniform (assignable in material)
|
||||||
case ShaderGraph::NODE_XFORM_INPUT: {
|
case ShaderGraph::NODE_XFORM_INPUT: {
|
||||||
gn->set_title(TTR("XFUniform"));
|
gn->set_title("XFUniform");
|
||||||
LineEdit *le = memnew( LineEdit );
|
LineEdit *le = memnew( LineEdit );
|
||||||
gn->add_child(le);
|
gn->add_child(le);
|
||||||
le->set_text(graph->input_node_get_name(type,p_id));
|
le->set_text(graph->input_node_get_name(type,p_id));
|
||||||
@ -2303,7 +2303,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
} break; // mat4 uniform (assignable in material)
|
} break; // mat4 uniform (assignable in material)
|
||||||
case ShaderGraph::NODE_TEXTURE_INPUT: {
|
case ShaderGraph::NODE_TEXTURE_INPUT: {
|
||||||
|
|
||||||
gn->set_title(TTR("TexUniform"));
|
gn->set_title("TexUniform");
|
||||||
LineEdit *le = memnew( LineEdit );
|
LineEdit *le = memnew( LineEdit );
|
||||||
gn->add_child(le);
|
gn->add_child(le);
|
||||||
le->set_text(graph->input_node_get_name(type,p_id));
|
le->set_text(graph->input_node_get_name(type,p_id));
|
||||||
@ -2311,7 +2311,9 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
TextureFrame *tex = memnew( TextureFrame );
|
TextureFrame *tex = memnew( TextureFrame );
|
||||||
tex->set_expand(true);
|
tex->set_expand(true);
|
||||||
tex->set_custom_minimum_size(Size2(80,80));
|
tex->set_custom_minimum_size(Size2(80,80));
|
||||||
|
tex->set_drag_forwarding(this);
|
||||||
gn->add_child(tex);
|
gn->add_child(tex);
|
||||||
|
tex->set_ignore_mouse(false);
|
||||||
tex->set_texture(graph->texture_input_node_get_value(type,p_id));
|
tex->set_texture(graph->texture_input_node_get_value(type,p_id));
|
||||||
ToolButton *edit = memnew( ToolButton );
|
ToolButton *edit = memnew( ToolButton );
|
||||||
edit->set_text("edit..");
|
edit->set_text("edit..");
|
||||||
@ -2321,18 +2323,18 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
HBoxContainer *hbc = memnew( HBoxContainer );
|
HBoxContainer *hbc = memnew( HBoxContainer );
|
||||||
hbc->add_constant_override("separation",0);
|
hbc->add_constant_override("separation",0);
|
||||||
if (graph->is_slot_connected(type, p_id, 0)) {
|
if (graph->is_slot_connected(type, p_id, 0)) {
|
||||||
hbc->add_child(make_label(TTR("UV"), Variant::VECTOR3));
|
hbc->add_child(make_label("UV", Variant::VECTOR3));
|
||||||
} else {
|
} else {
|
||||||
Vector3 v = graph->default_get_value(type,p_id,0);
|
Vector3 v = graph->default_get_value(type,p_id,0);
|
||||||
hbc->add_child(make_editor(String(TTR("UV: "))+v,gn,p_id,0,Variant::VECTOR3));
|
hbc->add_child(make_editor(String("UV: ")+v,gn,p_id,0,Variant::VECTOR3));
|
||||||
}
|
}
|
||||||
hbc->add_spacer();
|
hbc->add_spacer();
|
||||||
Label *l=memnew(Label(TTR("RGB")));
|
Label *l=memnew(Label("RGB"));
|
||||||
l->set_align(Label::ALIGN_RIGHT);
|
l->set_align(Label::ALIGN_RIGHT);
|
||||||
hbc->add_child(l);
|
hbc->add_child(l);
|
||||||
gn->add_child(hbc);
|
gn->add_child(hbc);
|
||||||
l = memnew( Label );
|
l = memnew( Label );
|
||||||
l->set_text(TTR("Alpha"));
|
l->set_text("Alpha");
|
||||||
l->set_align(Label::ALIGN_RIGHT);
|
l->set_align(Label::ALIGN_RIGHT);
|
||||||
gn->add_child(l);
|
gn->add_child(l);
|
||||||
|
|
||||||
@ -2342,7 +2344,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
} break; // texture input (assignable in material)
|
} break; // texture input (assignable in material)
|
||||||
case ShaderGraph::NODE_CUBEMAP_INPUT: {
|
case ShaderGraph::NODE_CUBEMAP_INPUT: {
|
||||||
|
|
||||||
gn->set_title(TTR("TexUniform"));
|
gn->set_title("TexUniform");
|
||||||
LineEdit *le = memnew( LineEdit );
|
LineEdit *le = memnew( LineEdit );
|
||||||
gn->add_child(le);
|
gn->add_child(le);
|
||||||
le->set_text(graph->input_node_get_name(type,p_id));
|
le->set_text(graph->input_node_get_name(type,p_id));
|
||||||
@ -2357,18 +2359,18 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
HBoxContainer *hbc = memnew( HBoxContainer );
|
HBoxContainer *hbc = memnew( HBoxContainer );
|
||||||
hbc->add_constant_override("separation",0);
|
hbc->add_constant_override("separation",0);
|
||||||
if (graph->is_slot_connected(type, p_id, 0)) {
|
if (graph->is_slot_connected(type, p_id, 0)) {
|
||||||
hbc->add_child(make_label(TTR("UV"), Variant::VECTOR3));
|
hbc->add_child(make_label("UV", Variant::VECTOR3));
|
||||||
} else {
|
} else {
|
||||||
Vector3 v = graph->default_get_value(type,p_id,0);
|
Vector3 v = graph->default_get_value(type,p_id,0);
|
||||||
hbc->add_child(make_editor(String(TTR("UV: "))+v,gn,p_id,0,Variant::VECTOR3));
|
hbc->add_child(make_editor(String("UV: ")+v,gn,p_id,0,Variant::VECTOR3));
|
||||||
}
|
}
|
||||||
hbc->add_spacer();
|
hbc->add_spacer();
|
||||||
Label *l=memnew(Label(TTR("RGB")));
|
Label *l=memnew(Label("RGB"));
|
||||||
l->set_align(Label::ALIGN_RIGHT);
|
l->set_align(Label::ALIGN_RIGHT);
|
||||||
hbc->add_child(l);
|
hbc->add_child(l);
|
||||||
gn->add_child(hbc);
|
gn->add_child(hbc);
|
||||||
l = memnew( Label );
|
l = memnew( Label );
|
||||||
l->set_text(TTR("Alpha"));
|
l->set_text("Alpha");
|
||||||
l->set_align(Label::ALIGN_RIGHT);
|
l->set_align(Label::ALIGN_RIGHT);
|
||||||
gn->add_child(l);
|
gn->add_child(l);
|
||||||
|
|
||||||
@ -2378,22 +2380,22 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
} break; // cubemap input (assignable in material)
|
} break; // cubemap input (assignable in material)
|
||||||
case ShaderGraph::NODE_DEFAULT_TEXTURE: {
|
case ShaderGraph::NODE_DEFAULT_TEXTURE: {
|
||||||
|
|
||||||
gn->set_title(TTR("CanvasItemTex"));
|
gn->set_title("CanvasItemTex");
|
||||||
HBoxContainer *hbc = memnew( HBoxContainer );
|
HBoxContainer *hbc = memnew( HBoxContainer );
|
||||||
hbc->add_constant_override("separation",0);
|
hbc->add_constant_override("separation",0);
|
||||||
if (graph->is_slot_connected(type, p_id, 0)) {
|
if (graph->is_slot_connected(type, p_id, 0)) {
|
||||||
hbc->add_child(make_label(TTR("UV"), Variant::VECTOR3));
|
hbc->add_child(make_label("UV", Variant::VECTOR3));
|
||||||
} else {
|
} else {
|
||||||
Vector3 v = graph->default_get_value(type,p_id,0);
|
Vector3 v = graph->default_get_value(type,p_id,0);
|
||||||
hbc->add_child(make_editor(String(TTR("UV: "))+v,gn,p_id,0,Variant::VECTOR3));
|
hbc->add_child(make_editor(String("UV: ")+v,gn,p_id,0,Variant::VECTOR3));
|
||||||
}
|
}
|
||||||
hbc->add_spacer();
|
hbc->add_spacer();
|
||||||
Label *l=memnew(Label(TTR("RGB")));
|
Label *l=memnew(Label("RGB"));
|
||||||
l->set_align(Label::ALIGN_RIGHT);
|
l->set_align(Label::ALIGN_RIGHT);
|
||||||
hbc->add_child(l);
|
hbc->add_child(l);
|
||||||
gn->add_child(hbc);
|
gn->add_child(hbc);
|
||||||
l = memnew( Label );
|
l = memnew( Label );
|
||||||
l->set_text(TTR("Alpha"));
|
l->set_text("Alpha");
|
||||||
l->set_align(Label::ALIGN_RIGHT);
|
l->set_align(Label::ALIGN_RIGHT);
|
||||||
gn->add_child(l);
|
gn->add_child(l);
|
||||||
|
|
||||||
@ -2404,7 +2406,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
} break; // screen texture sampler (takes UV) (only usable in fragment case Shader)
|
} break; // screen texture sampler (takes UV) (only usable in fragment case Shader)
|
||||||
|
|
||||||
case ShaderGraph::NODE_OUTPUT: {
|
case ShaderGraph::NODE_OUTPUT: {
|
||||||
gn->set_title(TTR("Output"));
|
gn->set_title("Output");
|
||||||
gn->set_show_close_button(false);
|
gn->set_show_close_button(false);
|
||||||
|
|
||||||
List<ShaderGraph::SlotInfo> si;
|
List<ShaderGraph::SlotInfo> si;
|
||||||
@ -2412,22 +2414,22 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
|
|
||||||
Array colors;
|
Array colors;
|
||||||
colors.push_back("Color");
|
colors.push_back("Color");
|
||||||
colors.push_back(TTR("LightColor"));
|
colors.push_back("LightColor");
|
||||||
colors.push_back("Light");
|
colors.push_back("Light");
|
||||||
colors.push_back(TTR("Diffuse"));
|
colors.push_back("Diffuse");
|
||||||
colors.push_back(TTR("Specular"));
|
colors.push_back("Specular");
|
||||||
colors.push_back(TTR("Emmision"));
|
colors.push_back("Emmision");
|
||||||
Array reals;
|
Array reals;
|
||||||
reals.push_back(TTR("Alpha"));
|
reals.push_back("Alpha");
|
||||||
reals.push_back(TTR("DiffuseAlpha"));
|
reals.push_back("DiffuseAlpha");
|
||||||
reals.push_back(TTR("NormalMapDepth"));
|
reals.push_back("NormalMapDepth");
|
||||||
reals.push_back(TTR("SpecExp"));
|
reals.push_back("SpecExp");
|
||||||
reals.push_back(TTR("Glow"));
|
reals.push_back("Glow");
|
||||||
reals.push_back(TTR("ShadeParam"));
|
reals.push_back("ShadeParam");
|
||||||
reals.push_back(TTR("SpecularExp"));
|
reals.push_back("SpecularExp");
|
||||||
reals.push_back(TTR("LightAlpha"));
|
reals.push_back("LightAlpha");
|
||||||
reals.push_back(TTR("PointSize"));
|
reals.push_back("PointSize");
|
||||||
reals.push_back(TTR("Discard"));
|
reals.push_back("Discard");
|
||||||
|
|
||||||
int idx=0;
|
int idx=0;
|
||||||
for (List<ShaderGraph::SlotInfo>::Element *E=si.front();E;E=E->next()) {
|
for (List<ShaderGraph::SlotInfo>::Element *E=si.front();E;E=E->next()) {
|
||||||
@ -2448,7 +2450,7 @@ void ShaderGraphView::_create_node(int p_id) {
|
|||||||
|
|
||||||
} break; // output (case Shader type dependent)
|
} break; // output (case Shader type dependent)
|
||||||
case ShaderGraph::NODE_COMMENT: {
|
case ShaderGraph::NODE_COMMENT: {
|
||||||
gn->set_title(TTR("Comment"));
|
gn->set_title("Comment");
|
||||||
TextEdit *te = memnew(TextEdit);
|
TextEdit *te = memnew(TextEdit);
|
||||||
te->set_custom_minimum_size(Size2(100,100));
|
te->set_custom_minimum_size(Size2(100,100));
|
||||||
gn->add_child(te);
|
gn->add_child(te);
|
||||||
@ -2517,6 +2519,105 @@ void ShaderGraphView::_sg_updated() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Variant ShaderGraphView::get_drag_data_fw(const Point2 &p_point, Control *p_from)
|
||||||
|
{
|
||||||
|
TextureFrame* frame = p_from->cast_to<TextureFrame>();
|
||||||
|
if (!frame)
|
||||||
|
return Variant();
|
||||||
|
|
||||||
|
if (!frame->get_texture().is_valid())
|
||||||
|
return Variant();
|
||||||
|
|
||||||
|
RES res = frame->get_texture();
|
||||||
|
return EditorNode::get_singleton()->drag_resource(res,p_from);
|
||||||
|
|
||||||
|
return Variant();
|
||||||
|
}
|
||||||
|
|
||||||
|
bool ShaderGraphView::can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const
|
||||||
|
{
|
||||||
|
if (p_data.get_type() != Variant::DICTIONARY)
|
||||||
|
return false;
|
||||||
|
|
||||||
|
Dictionary d = p_data;
|
||||||
|
|
||||||
|
if (d.has("type")){
|
||||||
|
if (d["type"] == "resource" && d.has("resource")) {
|
||||||
|
Variant val = d["resource"];
|
||||||
|
|
||||||
|
if (val.get_type()==Variant::OBJECT) {
|
||||||
|
RES res = val;
|
||||||
|
if (res.is_valid() && res->cast_to<Texture>())
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (d["type"] == "files" && d.has("files")) {
|
||||||
|
Vector<String> files = d["files"];
|
||||||
|
if (files.size() != 1)
|
||||||
|
return false;
|
||||||
|
return (ResourceLoader::get_resource_type(files[0]) == "ImageTexture");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
void ShaderGraphView::drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from)
|
||||||
|
{
|
||||||
|
if (!can_drop_data_fw(p_point, p_data, p_from))
|
||||||
|
return;
|
||||||
|
|
||||||
|
TextureFrame *frame = p_from->cast_to<TextureFrame>();
|
||||||
|
if (!frame)
|
||||||
|
return;
|
||||||
|
|
||||||
|
Dictionary d = p_data;
|
||||||
|
Ref<Texture> tex;
|
||||||
|
|
||||||
|
if (d.has("type")) {
|
||||||
|
if (d["type"] == "resource" && d.has("resource")){
|
||||||
|
Variant val = d["resource"];
|
||||||
|
|
||||||
|
if (val.get_type()==Variant::OBJECT) {
|
||||||
|
RES res = val;
|
||||||
|
if (res.is_valid())
|
||||||
|
tex = Ref<Texture>(res->cast_to<Texture>());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (d["type"] == "files" && d.has("files")) {
|
||||||
|
Vector<String> files = d["files"];
|
||||||
|
RES res = ResourceLoader::load(files[0]);
|
||||||
|
if (res.is_valid())
|
||||||
|
tex = Ref<Texture>(res->cast_to<Texture>());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!tex.is_valid()) return;
|
||||||
|
|
||||||
|
GraphNode *gn = frame->get_parent()->cast_to<GraphNode>();
|
||||||
|
if (!gn) return;
|
||||||
|
|
||||||
|
int id = -1;
|
||||||
|
for(Map<int,GraphNode*>::Element *E = node_map.front();E;E=E->next())
|
||||||
|
if (E->get() == gn) {
|
||||||
|
id = E->key();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
print_line(String::num(double(id)));
|
||||||
|
if (id < 0) return;
|
||||||
|
|
||||||
|
if (graph->node_get_type(type,id)==ShaderGraph::NODE_TEXTURE_INPUT) {
|
||||||
|
|
||||||
|
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
|
||||||
|
ur->create_action(TTR("Change Texture Uniform"));
|
||||||
|
ur->add_do_method(graph.ptr(),"texture_input_node_set_value",type,id,tex);
|
||||||
|
ur->add_undo_method(graph.ptr(),"texture_input_node_set_value",type,id,graph->texture_input_node_get_value(type,id));
|
||||||
|
ur->add_do_method(this,"_update_graph");
|
||||||
|
ur->add_undo_method(this,"_update_graph");
|
||||||
|
ur->commit_action();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
void ShaderGraphView::set_graph(Ref<ShaderGraph> p_graph){
|
void ShaderGraphView::set_graph(Ref<ShaderGraph> p_graph){
|
||||||
|
|
||||||
|
|
||||||
@ -2623,6 +2724,10 @@ void ShaderGraphView::_bind_methods() {
|
|||||||
ObjectTypeDB::bind_method("_color_ramp_changed",&ShaderGraphView::_color_ramp_changed);
|
ObjectTypeDB::bind_method("_color_ramp_changed",&ShaderGraphView::_color_ramp_changed);
|
||||||
ObjectTypeDB::bind_method("_curve_changed",&ShaderGraphView::_curve_changed);
|
ObjectTypeDB::bind_method("_curve_changed",&ShaderGraphView::_curve_changed);
|
||||||
|
|
||||||
|
ObjectTypeDB::bind_method(_MD("get_drag_data_fw"), &ShaderGraphView::get_drag_data_fw);
|
||||||
|
ObjectTypeDB::bind_method(_MD("can_drop_data_fw"), &ShaderGraphView::can_drop_data_fw);
|
||||||
|
ObjectTypeDB::bind_method(_MD("drop_data_fw"), &ShaderGraphView::drop_data_fw);
|
||||||
|
|
||||||
ObjectTypeDB::bind_method("_sg_updated",&ShaderGraphView::_sg_updated);
|
ObjectTypeDB::bind_method("_sg_updated",&ShaderGraphView::_sg_updated);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -116,7 +116,7 @@ public:
|
|||||||
GraphCurveMapEdit();
|
GraphCurveMapEdit();
|
||||||
};
|
};
|
||||||
|
|
||||||
class ShaderGraphView : public Node {
|
class ShaderGraphView : public Control {
|
||||||
|
|
||||||
OBJ_TYPE(ShaderGraphView,Node);
|
OBJ_TYPE(ShaderGraphView,Node);
|
||||||
|
|
||||||
@ -181,6 +181,10 @@ class ShaderGraphView : public Node {
|
|||||||
void _curve_changed(int p_id,Node* p_curve);
|
void _curve_changed(int p_id,Node* p_curve);
|
||||||
void _sg_updated();
|
void _sg_updated();
|
||||||
Map<int,GraphNode*> node_map;
|
Map<int,GraphNode*> node_map;
|
||||||
|
|
||||||
|
Variant get_drag_data_fw(const Point2& p_point,Control* p_from);
|
||||||
|
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);
|
||||||
protected:
|
protected:
|
||||||
void _notification(int p_what);
|
void _notification(int p_what);
|
||||||
static void _bind_methods();
|
static void _bind_methods();
|
||||||
|
@ -561,7 +561,7 @@ void SpatialEditorViewport::_select_region() {
|
|||||||
|
|
||||||
void SpatialEditorViewport::_update_name() {
|
void SpatialEditorViewport::_update_name() {
|
||||||
|
|
||||||
String ortho = orthogonal?TTR("Orthogonal"):"Perspective";
|
String ortho = orthogonal?TTR("Orthogonal"):TTR("Perspective");
|
||||||
|
|
||||||
if (name!="")
|
if (name!="")
|
||||||
view_menu->set_text("[ "+name+" "+ortho+" ]");
|
view_menu->set_text("[ "+name+" "+ortho+" ]");
|
||||||
@ -1353,7 +1353,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
|
|||||||
scale = Math::stepify(scale,spatial_editor->get_scale_snap());
|
scale = Math::stepify(scale,spatial_editor->get_scale_snap());
|
||||||
}
|
}
|
||||||
|
|
||||||
set_message(TTR("Scaling to ")+String::num(scale,1)+"%.");
|
set_message(vformat(TTR("Scaling to %s%%."),String::num(scale,1)));
|
||||||
scale/=100.0;
|
scale/=100.0;
|
||||||
|
|
||||||
Transform r;
|
Transform r;
|
||||||
@ -1431,7 +1431,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
|
|||||||
motion.snap(snap);
|
motion.snap(snap);
|
||||||
}
|
}
|
||||||
|
|
||||||
//set_message(TTR("Translating: ")+motion);
|
//set_message("Translating: "+motion);
|
||||||
|
|
||||||
List<Node*> &selection = editor_selection->get_selected_node_list();
|
List<Node*> &selection = editor_selection->get_selected_node_list();
|
||||||
|
|
||||||
@ -1493,13 +1493,13 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
|
|||||||
if (snap) {
|
if (snap) {
|
||||||
angle=Math::rad2deg(angle)+snap*0.5; //else it wont reach +180
|
angle=Math::rad2deg(angle)+snap*0.5; //else it wont reach +180
|
||||||
angle-=Math::fmod(angle,snap);
|
angle-=Math::fmod(angle,snap);
|
||||||
set_message(TTR("Rotating ")+rtos(angle)+" degrees.");
|
set_message(vformat(TTR("Rotating %s degrees."),rtos(angle)));
|
||||||
angle=Math::deg2rad(angle);
|
angle=Math::deg2rad(angle);
|
||||||
} else
|
} else
|
||||||
set_message(TTR("Rotating ")+rtos(Math::rad2deg(angle))+" degrees.");
|
set_message(vformat(TTR("Rotating %s degrees."),rtos(Math::rad2deg(angle))));
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
set_message(TTR("Rotating ")+rtos(Math::rad2deg(angle))+" degrees.");
|
set_message(vformat(TTR("Rotating %s degrees."),rtos(Math::rad2deg(angle))));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1967,7 +1967,7 @@ void SpatialEditorViewport::_draw() {
|
|||||||
if (surface->has_focus()) {
|
if (surface->has_focus()) {
|
||||||
Size2 size = surface->get_size();
|
Size2 size = surface->get_size();
|
||||||
Rect2 r =Rect2(Point2(),size);
|
Rect2 r =Rect2(Point2(),size);
|
||||||
get_stylebox(TTR("EditorFocus"),"EditorStyles")->draw(surface->get_canvas_item(),r);
|
get_stylebox("EditorFocus","EditorStyles")->draw(surface->get_canvas_item(),r);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -2482,7 +2482,7 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
|
|||||||
view_menu->get_popup()->add_check_item(TTR("Orthogonal (Num5)"),VIEW_ORTHOGONAL);
|
view_menu->get_popup()->add_check_item(TTR("Orthogonal (Num5)"),VIEW_ORTHOGONAL);
|
||||||
view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(VIEW_PERSPECTIVE),true);
|
view_menu->get_popup()->set_item_checked(view_menu->get_popup()->get_item_index(VIEW_PERSPECTIVE),true);
|
||||||
view_menu->get_popup()->add_separator();
|
view_menu->get_popup()->add_separator();
|
||||||
view_menu->get_popup()->add_check_item("Environment",VIEW_ENVIRONMENT);
|
view_menu->get_popup()->add_check_item(TTR("Environment"),VIEW_ENVIRONMENT);
|
||||||
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(VIEW_ENVIRONMENT),true);
|
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(VIEW_ENVIRONMENT),true);
|
||||||
view_menu->get_popup()->add_separator();
|
view_menu->get_popup()->add_separator();
|
||||||
view_menu->get_popup()->add_check_item(TTR("Audio Listener"),VIEW_AUDIO_LISTENER);
|
view_menu->get_popup()->add_check_item(TTR("Audio Listener"),VIEW_AUDIO_LISTENER);
|
||||||
|
@ -78,7 +78,7 @@ void SpriteFramesEditor::_file_load_request(const DVector<String>& p_path,int p_
|
|||||||
if (resource.is_null()) {
|
if (resource.is_null()) {
|
||||||
dialog->set_text(TTR("ERROR: Couldn't load frame resource!"));
|
dialog->set_text(TTR("ERROR: Couldn't load frame resource!"));
|
||||||
dialog->set_title(TTR("Error!"));
|
dialog->set_title(TTR("Error!"));
|
||||||
//dialog->get_cancel()->set_text(TTR("Close"));
|
//dialog->get_cancel()->set_text("Close");
|
||||||
dialog->get_ok()->set_text(TTR("Close"));
|
dialog->get_ok()->set_text(TTR("Close"));
|
||||||
dialog->popup_centered_minsize();
|
dialog->popup_centered_minsize();
|
||||||
return; ///beh should show an error i guess
|
return; ///beh should show an error i guess
|
||||||
@ -152,7 +152,7 @@ void SpriteFramesEditor::_item_edited() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
RES samp = frames->get_resource(old_name);
|
RES samp = frames->get_resource(old_name);
|
||||||
undo_redo->create_action(TTR("Rename Resource"));
|
undo_redo->create_action("Rename Resource");
|
||||||
undo_redo->add_do_method(frames,"remove_resource",old_name);
|
undo_redo->add_do_method(frames,"remove_resource",old_name);
|
||||||
undo_redo->add_do_method(frames,"add_resource",new_name,samp);
|
undo_redo->add_do_method(frames,"add_resource",new_name,samp);
|
||||||
undo_redo->add_undo_method(frames,"remove_resource",new_name);
|
undo_redo->add_undo_method(frames,"remove_resource",new_name);
|
||||||
@ -198,7 +198,7 @@ void SpriteFramesEditor::_paste_pressed() {
|
|||||||
if (!r.is_valid()) {
|
if (!r.is_valid()) {
|
||||||
dialog->set_text(TTR("Resource clipboard is empty or not a texture!"));
|
dialog->set_text(TTR("Resource clipboard is empty or not a texture!"));
|
||||||
dialog->set_title(TTR("Error!"));
|
dialog->set_title(TTR("Error!"));
|
||||||
//dialog->get_cancel()->set_text(TTR("Close"));
|
//dialog->get_cancel()->set_text("Close");
|
||||||
dialog->get_ok()->set_text(TTR("Close"));
|
dialog->get_ok()->set_text(TTR("Close"));
|
||||||
dialog->popup_centered_minsize();
|
dialog->popup_centered_minsize();
|
||||||
return; ///beh should show an error i guess
|
return; ///beh should show an error i guess
|
||||||
@ -333,11 +333,11 @@ void SpriteFramesEditor::_delete_pressed() {
|
|||||||
|
|
||||||
_delete_confirm_pressed(); //it has undo.. why bother with a dialog..
|
_delete_confirm_pressed(); //it has undo.. why bother with a dialog..
|
||||||
/*
|
/*
|
||||||
dialog->set_title(TTR("Confirm..."));
|
dialog->set_title("Confirm...");
|
||||||
dialog->set_text(TTR("Remove Resource '")+tree->get_selected()->get_text(0)+"' ?");
|
dialog->set_text("Remove Resource '"+tree->get_selected()->get_text(0)+"' ?");
|
||||||
//dialog->get_cancel()->set_text(TTR("Cancel"));
|
//dialog->get_cancel()->set_text("Cancel");
|
||||||
//dialog->get_ok()->show();
|
//dialog->get_ok()->show();
|
||||||
dialog->get_ok()->set_text(TTR("Remove"));
|
dialog->get_ok()->set_text("Remove");
|
||||||
dialog->popup_centered(Size2(300,60));*/
|
dialog->popup_centered(Size2(300,60));*/
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -530,7 +530,7 @@ void SpriteFramesEditor::_update_library(bool p_skip_selector) {
|
|||||||
|
|
||||||
if (frames->get_frame(edited_anim,i).is_null()) {
|
if (frames->get_frame(edited_anim,i).is_null()) {
|
||||||
|
|
||||||
name=itos(i)+TTR(": (empty)");
|
name=itos(i)+": "+TTR("(empty)");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
name=itos(i)+": "+frames->get_frame(edited_anim,i)->get_name();
|
name=itos(i)+": "+frames->get_frame(edited_anim,i)->get_name();
|
||||||
|
@ -119,7 +119,7 @@ class SpriteRegionEditorPlugin : public EditorPlugin
|
|||||||
EditorNode *editor;
|
EditorNode *editor;
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual String get_name() const { return TTR("SpriteRegion"); }
|
virtual String get_name() const { return "SpriteRegion"; }
|
||||||
bool has_main_screen() const { return false; }
|
bool has_main_screen() const { return false; }
|
||||||
virtual void edit(Object *p_node);
|
virtual void edit(Object *p_node);
|
||||||
virtual bool handles(Object *p_node) const;
|
virtual bool handles(Object *p_node) const;
|
||||||
|
@ -69,7 +69,7 @@ class StreamEditorPlugin : public EditorPlugin {
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
virtual String get_name() const { return TTR("Stream"); }
|
virtual String get_name() const { return "Stream"; }
|
||||||
bool has_main_screen() const { return false; }
|
bool has_main_screen() const { return false; }
|
||||||
virtual void edit(Object *p_node);
|
virtual void edit(Object *p_node);
|
||||||
virtual bool handles(Object *p_node) const;
|
virtual bool handles(Object *p_node) const;
|
||||||
|
@ -199,7 +199,7 @@ void ThemeEditor::_save_template_cbk(String fname) {
|
|||||||
if (!file) {
|
if (!file) {
|
||||||
|
|
||||||
|
|
||||||
ERR_EXPLAIN(TTR("Can't save theme to file: ")+filename);
|
ERR_EXPLAIN(TTR("Can't save theme to file:")+" "+filename);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
file->store_line("; ******************* ");
|
file->store_line("; ******************* ");
|
||||||
@ -599,7 +599,7 @@ ThemeEditor::ThemeEditor() {
|
|||||||
theme_menu->get_popup()->add_item(TTR("Add Item"),POPUP_ADD);
|
theme_menu->get_popup()->add_item(TTR("Add Item"),POPUP_ADD);
|
||||||
theme_menu->get_popup()->add_item(TTR("Add Class Items"),POPUP_CLASS_ADD);
|
theme_menu->get_popup()->add_item(TTR("Add Class Items"),POPUP_CLASS_ADD);
|
||||||
theme_menu->get_popup()->add_item(TTR("Remove Item"),POPUP_REMOVE);
|
theme_menu->get_popup()->add_item(TTR("Remove Item"),POPUP_REMOVE);
|
||||||
theme_menu->get_popup()->add_item("Remove Class Items",POPUP_CLASS_REMOVE);
|
theme_menu->get_popup()->add_item(TTR("Remove Class Items"),POPUP_CLASS_REMOVE);
|
||||||
theme_menu->get_popup()->add_separator();
|
theme_menu->get_popup()->add_separator();
|
||||||
theme_menu->get_popup()->add_item(TTR("Create Template"),POPUP_CREATE_TEMPLATE);
|
theme_menu->get_popup()->add_item(TTR("Create Template"),POPUP_CREATE_TEMPLATE);
|
||||||
hb_menu->add_child(theme_menu);
|
hb_menu->add_child(theme_menu);
|
||||||
@ -757,7 +757,7 @@ ThemeEditor::ThemeEditor() {
|
|||||||
line_edit = memnew( LineEdit );
|
line_edit = memnew( LineEdit );
|
||||||
line_edit->set_pos( Point2( 25, 275 ) );
|
line_edit->set_pos( Point2( 25, 275 ) );
|
||||||
line_edit->set_size( Point2( 150, 5 ) );
|
line_edit->set_size( Point2( 150, 5 ) );
|
||||||
line_edit->set_text(TTR("Line Edit"));
|
line_edit->set_text("Line Edit");
|
||||||
panel->add_child(line_edit);
|
panel->add_child(line_edit);
|
||||||
|
|
||||||
test_v_scroll = memnew( VScrollBar );
|
test_v_scroll = memnew( VScrollBar );
|
||||||
@ -786,12 +786,12 @@ ThemeEditor::ThemeEditor() {
|
|||||||
item = test_tree->create_item( test_tree->get_root() );
|
item = test_tree->create_item( test_tree->get_root() );
|
||||||
item->set_cell_mode(0, TreeItem::CELL_MODE_RANGE);
|
item->set_cell_mode(0, TreeItem::CELL_MODE_RANGE);
|
||||||
item->set_editable(0,true);
|
item->set_editable(0,true);
|
||||||
item->set_text(0,TTR("Have,Many,Several,Options!"));
|
item->set_text(0,"Have,Many,Several,Options!"));
|
||||||
item->set_range(0,2);
|
item->set_range(0,2);
|
||||||
|
|
||||||
Button *fd_button= memnew( Button );
|
Button *fd_button= memnew( Button );
|
||||||
fd_button->set_pos(Point2(300,275));
|
fd_button->set_pos(Point2(300,275));
|
||||||
fd_button->set_text(TTR("Open File Dialog"));
|
fd_button->set_text("Open File Dialog");
|
||||||
panel->add_child(fd_button);
|
panel->add_child(fd_button);
|
||||||
|
|
||||||
test_file_dialog = memnew( EditorFileDialog );
|
test_file_dialog = memnew( EditorFileDialog );
|
||||||
@ -852,8 +852,8 @@ ThemeEditor::ThemeEditor() {
|
|||||||
type_select = memnew( OptionButton );
|
type_select = memnew( OptionButton );
|
||||||
type_select->add_item(TTR("Icon"));
|
type_select->add_item(TTR("Icon"));
|
||||||
type_select->add_item(TTR("Style"));
|
type_select->add_item(TTR("Style"));
|
||||||
type_select->add_item("Font");
|
type_select->add_item(TTR("Font"));
|
||||||
type_select->add_item("Color");
|
type_select->add_item(TTR("Color"));
|
||||||
type_select->add_item(TTR("Constant"));
|
type_select->add_item(TTR("Constant"));
|
||||||
type_select->set_pos( Point2( 400,25 ) );
|
type_select->set_pos( Point2( 400,25 ) );
|
||||||
type_select->set_size( Point2( 80,5 ) );
|
type_select->set_size( Point2( 80,5 ) );
|
||||||
|
@ -1318,13 +1318,13 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
|
|||||||
|
|
||||||
PopupMenu *p = options->get_popup();
|
PopupMenu *p = options->get_popup();
|
||||||
|
|
||||||
p->add_item("Bucket", OPTION_BUCKET);
|
p->add_item(TTR("Bucket"), OPTION_BUCKET);
|
||||||
p->add_separator();
|
p->add_separator();
|
||||||
p->add_item("Pick Tile", OPTION_PICK_TILE, KEY_CONTROL);
|
p->add_item(TTR("Pick Tile"), OPTION_PICK_TILE, KEY_CONTROL);
|
||||||
p->add_separator();
|
p->add_separator();
|
||||||
p->add_item("Select", OPTION_SELECT, KEY_MASK_CMD+KEY_B);
|
p->add_item(TTR("Select"), OPTION_SELECT, KEY_MASK_CMD+KEY_B);
|
||||||
p->add_item(TTR("Duplicate Selection"), OPTION_DUPLICATE, KEY_MASK_CMD+KEY_D);
|
p->add_item(TTR("Duplicate Selection"), OPTION_DUPLICATE, KEY_MASK_CMD+KEY_D);
|
||||||
p->add_item("Erase Selection", OPTION_ERASE_SELECTION, KEY_DELETE);
|
p->add_item(TTR("Erase Selection"), OPTION_ERASE_SELECTION, KEY_DELETE);
|
||||||
|
|
||||||
p->connect("item_pressed", this, "_menu_option");
|
p->connect("item_pressed", this, "_menu_option");
|
||||||
|
|
||||||
|
@ -175,7 +175,7 @@ void TileSetEditor::_name_dialog_confirm(const String& name) {
|
|||||||
if (tileset->has_tile(id)) {
|
if (tileset->has_tile(id)) {
|
||||||
tileset->remove_tile(id);
|
tileset->remove_tile(id);
|
||||||
} else {
|
} else {
|
||||||
err_dialog->set_text(TTR("Could not find tile: ") + name);
|
err_dialog->set_text(TTR("Could not find tile:")+" " + name);
|
||||||
err_dialog->popup_centered(Size2(300, 60));
|
err_dialog->popup_centered(Size2(300, 60));
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
|
@ -505,7 +505,7 @@ void ProjectExportDialog::_export_action_pck(const String& p_file) {
|
|||||||
if (p_file.ends_with(".pck")) {
|
if (p_file.ends_with(".pck")) {
|
||||||
FileAccess *f = FileAccess::open(p_file,FileAccess::WRITE);
|
FileAccess *f = FileAccess::open(p_file,FileAccess::WRITE);
|
||||||
if (!f) {
|
if (!f) {
|
||||||
error->set_text(TTR("Error exporting project PCK! Can't write"));
|
error->set_text(TTR("Error writing the project PCK!"));
|
||||||
error->popup_centered_minsize();
|
error->popup_centered_minsize();
|
||||||
}
|
}
|
||||||
ERR_FAIL_COND(!f);
|
ERR_FAIL_COND(!f);
|
||||||
@ -586,7 +586,7 @@ void ProjectExportDialog::custom_action(const String&) {
|
|||||||
Ref<EditorExportPlatform> exporter = EditorImportExport::get_singleton()->get_export_platform(platform);
|
Ref<EditorExportPlatform> exporter = EditorImportExport::get_singleton()->get_export_platform(platform);
|
||||||
|
|
||||||
if (exporter.is_null()) {
|
if (exporter.is_null()) {
|
||||||
error->set_text(TTR("No exporter for platform '")+platform+"' yet.");
|
error->set_text(vformat(TTR("No exporter for platform '%s' yet."),platform));
|
||||||
error->popup_centered_minsize();
|
error->popup_centered_minsize();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -858,17 +858,17 @@ void ProjectExportDialog::_group_add() {
|
|||||||
|
|
||||||
if (name=="") {
|
if (name=="") {
|
||||||
group_new_name_error->show();
|
group_new_name_error->show();
|
||||||
group_new_name_error->set_text(TTR("Group Name Can't be Empty!"));
|
group_new_name_error->set_text(TTR("Group name can't be empty!"));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (name.find("/")!=-1 || name.find(":")!=-1 || name.find(",")!=-1 || name.find("-")!=-1) {
|
if (name.find("/")!=-1 || name.find(":")!=-1 || name.find(",")!=-1 || name.find("-")!=-1) {
|
||||||
group_new_name_error->set_text(TTR("Invalid Character in Group Name!"));
|
group_new_name_error->set_text(TTR("Invalid character in group name!"));
|
||||||
group_new_name_error->show();
|
group_new_name_error->show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EditorImportExport::get_singleton()->image_export_has_group(name)) {
|
if (EditorImportExport::get_singleton()->image_export_has_group(name)) {
|
||||||
group_new_name_error->set_text(TTR("Group Name Already Exists!"));
|
group_new_name_error->set_text(TTR("Group name already exists!"));
|
||||||
group_new_name_error->show();
|
group_new_name_error->show();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1061,13 +1061,13 @@ void ProjectExportDialog::_group_atlas_preview() {
|
|||||||
Error err = plugin->import2(dst_file,imd,EditorExportPlatform::IMAGE_COMPRESSION_NONE,true);
|
Error err = plugin->import2(dst_file,imd,EditorExportPlatform::IMAGE_COMPRESSION_NONE,true);
|
||||||
if (err) {
|
if (err) {
|
||||||
|
|
||||||
EditorNode::add_io_error(TTR("Error saving atlas! ")+dst_file.get_file());
|
EditorNode::add_io_error(TTR("Error saving atlas:")+" "+dst_file.get_file());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
Ref<Texture> tex = ResourceLoader::load(dst_file);
|
Ref<Texture> tex = ResourceLoader::load(dst_file);
|
||||||
atlas_preview_frame->set_texture(tex); //clear previous
|
atlas_preview_frame->set_texture(tex); //clear previous
|
||||||
atlas_preview_dialog->set_title(TTR("Atlas Preview (")+itos(tex->get_width())+"x"+itos(tex->get_height())+")");
|
atlas_preview_dialog->set_title(TTR("Atlas Preview")+" ("+itos(tex->get_width())+"x"+itos(tex->get_height())+")");
|
||||||
atlas_preview_dialog->popup_centered_ratio(0.9);
|
atlas_preview_dialog->popup_centered_ratio(0.9);
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -1211,14 +1211,14 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
|
|||||||
tree->set_column_min_width(1,90);
|
tree->set_column_min_width(1,90);
|
||||||
|
|
||||||
filters = memnew( LineEdit );
|
filters = memnew( LineEdit );
|
||||||
vb->add_margin_child(TTR("Filters to export non-resource files (Comma Separated, eg: *.json, *.txt):"),filters);
|
vb->add_margin_child(TTR("Filters to export non-resource files (comma-separated, e.g.: *.json, *.txt):"),filters);
|
||||||
filters->connect("text_changed",this,"_filters_edited");
|
filters->connect("text_changed",this,"_filters_edited");
|
||||||
filters_exclude = memnew( LineEdit );
|
filters_exclude = memnew( LineEdit );
|
||||||
vb->add_margin_child(TTR("Filters to exclude from export (Comma Separated, eg: *.json, *.txt):"),filters_exclude);
|
vb->add_margin_child(TTR("Filters to exclude from export (comma-separated, e.g.: *.json, *.txt):"),filters_exclude);
|
||||||
filters_exclude->connect("text_changed",this,"_filters_exclude_edited");
|
filters_exclude->connect("text_changed",this,"_filters_exclude_edited");
|
||||||
|
|
||||||
convert_text_scenes = memnew( CheckButton );
|
convert_text_scenes = memnew( CheckButton );
|
||||||
convert_text_scenes->set_text(TTR("Convert text scenes to binary on export"));
|
convert_text_scenes->set_text(TTR("Convert text scenes to binary on export."));
|
||||||
vb->add_child(convert_text_scenes);
|
vb->add_child(convert_text_scenes);
|
||||||
convert_text_scenes->connect("toggled",this,"_export_mode_changed");
|
convert_text_scenes->connect("toggled",this,"_export_mode_changed");
|
||||||
|
|
||||||
@ -1260,7 +1260,7 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
|
|||||||
fmt->set_editable(0,true);
|
fmt->set_editable(0,true);
|
||||||
formats.push_back(fmt);
|
formats.push_back(fmt);
|
||||||
}
|
}
|
||||||
image_vb->add_margin_child(TTR("Compress Formats: "),image_formats,true);
|
image_vb->add_margin_child(TTR("Compress Formats:")+" ",image_formats,true);
|
||||||
|
|
||||||
/// groups
|
/// groups
|
||||||
HBoxContainer *group_hb = memnew( HBoxContainer );
|
HBoxContainer *group_hb = memnew( HBoxContainer );
|
||||||
@ -1421,7 +1421,7 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
|
|||||||
sample_max_hz = memnew( SpinBox );
|
sample_max_hz = memnew( SpinBox );
|
||||||
sample_max_hz->set_max(192000);
|
sample_max_hz->set_max(192000);
|
||||||
sample_max_hz->set_min(8000);
|
sample_max_hz->set_min(8000);
|
||||||
sample_vbox->add_margin_child(TTR("Sampling Rate Limit: (hz)"),sample_max_hz);
|
sample_vbox->add_margin_child(TTR("Sampling Rate Limit (Hz):"),sample_max_hz);
|
||||||
sample_trim = memnew( CheckButton );
|
sample_trim = memnew( CheckButton );
|
||||||
sample_trim->set_text(TTR("Trim"));
|
sample_trim->set_text(TTR("Trim"));
|
||||||
sample_vbox->add_margin_child(TTR("Trailing Silence:"),sample_trim);
|
sample_vbox->add_margin_child(TTR("Trailing Silence:"),sample_trim);
|
||||||
@ -1529,7 +1529,7 @@ Error ProjectExport::export_project(const String& p_preset) {
|
|||||||
String preset_path=Globals::get_singleton()->get("export_presets_path/"+selected);
|
String preset_path=Globals::get_singleton()->get("export_presets_path/"+selected);
|
||||||
if (preset_path=="") {
|
if (preset_path=="") {
|
||||||
|
|
||||||
error->set_text(TTR("Export path empty, see export options"));
|
error->set_text("Export path empty, see export options");
|
||||||
error->popup_centered_minsize(Size2(300,100));
|
error->popup_centered_minsize(Size2(300,100));
|
||||||
ERR_FAIL_V(ERR_INVALID_DATA);
|
ERR_FAIL_V(ERR_INVALID_DATA);
|
||||||
}
|
}
|
||||||
@ -1551,9 +1551,9 @@ Error ProjectExport::export_project(const String& p_preset) {
|
|||||||
}
|
}
|
||||||
if (pc%3 != 0 ) {
|
if (pc%3 != 0 ) {
|
||||||
memdelete(d);
|
memdelete(d);
|
||||||
error->set_text(TTR("Corrupted export data.."));
|
error->set_text("Corrupted export data..");
|
||||||
error->popup_centered_minsize(Size2(300,100));
|
error->popup_centered_minsize(Size2(300,100));
|
||||||
ERR_EXPLAIN(TTR("Corrupted export data..."));
|
ERR_EXPLAIN("Corrupted export data...");
|
||||||
ERR_FAIL_V(ERR_INVALID_DATA);
|
ERR_FAIL_V(ERR_INVALID_DATA);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1706,7 +1706,7 @@ Error ProjectExport::export_project(const String& p_preset) {
|
|||||||
if (err!=OK) {
|
if (err!=OK) {
|
||||||
memdelete(da);
|
memdelete(da);
|
||||||
memdelete(d);
|
memdelete(d);
|
||||||
ERR_EXPLAIN(TTR("Cannot make dir: ")+cwd+"/"+p);
|
ERR_EXPLAIN("Cannot make dir: "+cwd+"/"+p);
|
||||||
ERR_FAIL_V(ERR_CANT_CREATE);
|
ERR_FAIL_V(ERR_CANT_CREATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1714,7 +1714,7 @@ Error ProjectExport::export_project(const String& p_preset) {
|
|||||||
|
|
||||||
memdelete(da);
|
memdelete(da);
|
||||||
memdelete(d);
|
memdelete(d);
|
||||||
ERR_EXPLAIN(TTR("Cannot change to dir: ")+cwd+"/"+p);
|
ERR_EXPLAIN("Cannot change to dir: "+cwd+"/"+p);
|
||||||
ERR_FAIL_V(ERR_CANT_CREATE);
|
ERR_FAIL_V(ERR_CANT_CREATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1742,7 +1742,7 @@ Error ProjectExport::export_project(const String& p_preset) {
|
|||||||
|
|
||||||
if (!Globals::get_singleton()->has("optimizer_presets/"+preset)) {
|
if (!Globals::get_singleton()->has("optimizer_presets/"+preset)) {
|
||||||
memdelete(d);
|
memdelete(d);
|
||||||
ERR_EXPLAIN(TTR("Unknown optimizer preset: ")+preset);
|
ERR_EXPLAIN("Unknown optimizer preset: "+preset);
|
||||||
ERR_FAIL_V(ERR_INVALID_DATA);
|
ERR_FAIL_V(ERR_INVALID_DATA);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1763,7 +1763,7 @@ Error ProjectExport::export_project(const String& p_preset) {
|
|||||||
|
|
||||||
if (saver.is_null()) {
|
if (saver.is_null()) {
|
||||||
memdelete(d);
|
memdelete(d);
|
||||||
ERR_EXPLAIN(TTR("Preset '")+preset+"' references nonexistent saver: "+type);
|
ERR_EXPLAIN("Preset '"+preset+"' references nonexistent saver: "+type);
|
||||||
ERR_FAIL_COND_V(saver.is_null(),ERR_INVALID_DATA);
|
ERR_FAIL_COND_V(saver.is_null(),ERR_INVALID_DATA);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1807,7 +1807,7 @@ Error ProjectExport::export_project(const String& p_preset) {
|
|||||||
if (res.is_null()) {
|
if (res.is_null()) {
|
||||||
|
|
||||||
memdelete(d);
|
memdelete(d);
|
||||||
ERR_EXPLAIN(TTR("Errr loading resource to optimize: ")+path);
|
ERR_EXPLAIN("Error loading resource to optimize: "+path);
|
||||||
ERR_FAIL_V(ERR_INVALID_DATA);
|
ERR_FAIL_V(ERR_INVALID_DATA);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1830,7 +1830,7 @@ Error ProjectExport::export_project(const String& p_preset) {
|
|||||||
Error err = ResourceSaver::save(write_file,res,flags,saver);
|
Error err = ResourceSaver::save(write_file,res,flags,saver);
|
||||||
if (err) {
|
if (err) {
|
||||||
memdelete(d);
|
memdelete(d);
|
||||||
ERR_EXPLAIN(TTR("Errr saving optimized resource: ")+write_file);
|
ERR_EXPLAIN("Error saving optimized resource: "+write_file);
|
||||||
ERR_FAIL_COND_V(err,ERR_CANT_OPEN);
|
ERR_FAIL_COND_V(err,ERR_CANT_OPEN);
|
||||||
}
|
}
|
||||||
source_file=write_file;
|
source_file=write_file;
|
||||||
@ -1853,7 +1853,7 @@ Error ProjectExport::export_project(const String& p_preset) {
|
|||||||
if (err) {
|
if (err) {
|
||||||
|
|
||||||
|
|
||||||
ERR_EXPLAIN(TTR("Error copying from: ")+source_file+" to "+dst_file+".");
|
ERR_EXPLAIN("Error copying from: "+source_file+" to "+dst_file+".");
|
||||||
ERR_FAIL_COND_V(err,err);
|
ERR_FAIL_COND_V(err,err);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ class NewProjectDialog : public ConfirmationDialog {
|
|||||||
get_ok()->set_disabled(true);
|
get_ok()->set_disabled(true);
|
||||||
DirAccess *d = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
|
DirAccess *d = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
|
||||||
if (project_path->get_text() != "" && d->change_dir(project_path->get_text())!=OK) {
|
if (project_path->get_text() != "" && d->change_dir(project_path->get_text())!=OK) {
|
||||||
error->set_text(TTR("Invalid Path for Project, Path Must Exist!"));
|
error->set_text(TTR("Invalid project path, the path must exist!"));
|
||||||
memdelete(d);
|
memdelete(d);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -75,7 +75,7 @@ class NewProjectDialog : public ConfirmationDialog {
|
|||||||
|
|
||||||
if (d->file_exists("engine.cfg")) {
|
if (d->file_exists("engine.cfg")) {
|
||||||
|
|
||||||
error->set_text(TTR("Invalid Project Path (engine.cfg must not exist)."));
|
error->set_text(TTR("Invalid project path, engine.cfg must not exist."));
|
||||||
memdelete(d);
|
memdelete(d);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -84,7 +84,7 @@ class NewProjectDialog : public ConfirmationDialog {
|
|||||||
|
|
||||||
if (project_path->get_text() != "" && !d->file_exists("engine.cfg")) {
|
if (project_path->get_text() != "" && !d->file_exists("engine.cfg")) {
|
||||||
|
|
||||||
error->set_text(TTR("Invalid Project Path (engine.cfg must exist)."));
|
error->set_text(TTR("Invalid project path, engine.cfg must exist."));
|
||||||
memdelete(d);
|
memdelete(d);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@ -170,7 +170,7 @@ class NewProjectDialog : public ConfirmationDialog {
|
|||||||
DirAccess *d = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
|
DirAccess *d = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
|
||||||
|
|
||||||
if (d->change_dir(project_path->get_text())!=OK) {
|
if (d->change_dir(project_path->get_text())!=OK) {
|
||||||
error->set_text(TTR("Invalid Path for Project (changed anything?)"));
|
error->set_text(TTR("Invalid project path (changed anything?)."));
|
||||||
memdelete(d);
|
memdelete(d);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -180,7 +180,7 @@ class NewProjectDialog : public ConfirmationDialog {
|
|||||||
|
|
||||||
FileAccess *f = FileAccess::open(dir.plus_file("/engine.cfg"),FileAccess::WRITE);
|
FileAccess *f = FileAccess::open(dir.plus_file("/engine.cfg"),FileAccess::WRITE);
|
||||||
if (!f) {
|
if (!f) {
|
||||||
error->set_text(TTR("Couldn't create engine.cfg in project path"));
|
error->set_text(TTR("Couldn't create engine.cfg in project path."));
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
f->store_line("; Engine configuration file.");
|
f->store_line("; Engine configuration file.");
|
||||||
@ -247,7 +247,7 @@ public:
|
|||||||
if (import_mode) {
|
if (import_mode) {
|
||||||
set_title(TTR("Import Existing Project"));
|
set_title(TTR("Import Existing Project"));
|
||||||
get_ok()->set_text(TTR("Import"));
|
get_ok()->set_text(TTR("Import"));
|
||||||
pp->set_text(TTR("Project Path: (Must exist)"));
|
pp->set_text(TTR("Project Path (Must Exist):"));
|
||||||
pn->set_text(TTR("Project Name:"));
|
pn->set_text(TTR("Project Name:"));
|
||||||
pn->hide();
|
pn->hide();
|
||||||
project_name->hide();
|
project_name->hide();
|
||||||
@ -788,7 +788,7 @@ void ProjectManager::_erase_project() {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
|
|
||||||
erase_ask->set_text(TTR("Remove project from list?? (Folder contents will not be modified)"));
|
erase_ask->set_text(TTR("Remove project from the list? (Folder contents will not be modified)"));
|
||||||
erase_ask->popup_centered_minsize();
|
erase_ask->popup_centered_minsize();
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -822,8 +822,8 @@ void ProjectManager::_bind_methods() {
|
|||||||
|
|
||||||
ProjectManager::ProjectManager() {
|
ProjectManager::ProjectManager() {
|
||||||
|
|
||||||
int margin = get_constant("margin",TTR("Dialogs"));
|
int margin = get_constant("margin","Dialogs");
|
||||||
int button_margin = get_constant("button_margin",TTR("Dialogs"));
|
int button_margin = get_constant("button_margin","Dialogs");
|
||||||
|
|
||||||
// load settings
|
// load settings
|
||||||
if (!EditorSettings::get_singleton())
|
if (!EditorSettings::get_singleton())
|
||||||
@ -999,8 +999,8 @@ ProjectManager::ProjectManager() {
|
|||||||
_scan_begin( EditorSettings::get_singleton()->get("global/autoscan_project_path") );
|
_scan_begin( EditorSettings::get_singleton()->get("global/autoscan_project_path") );
|
||||||
}
|
}
|
||||||
|
|
||||||
//get_ok()->set_text(TTR("Open"));
|
//get_ok()->set_text("Open");
|
||||||
//get_ok()->set_text(TTR("Exit"));
|
//get_ok()->set_text("Exit");
|
||||||
|
|
||||||
last_clicked = "";
|
last_clicked = "";
|
||||||
}
|
}
|
||||||
|
@ -139,7 +139,7 @@ void ProjectSettings::_action_edited() {
|
|||||||
ti->set_text(0,old_name);
|
ti->set_text(0,old_name);
|
||||||
add_at="input/"+old_name;
|
add_at="input/"+old_name;
|
||||||
|
|
||||||
message->set_text(TTR("Invalid Action (Anything goes but / or :)."));
|
message->set_text(TTR("Invalid action (anything goes but '/' or ':')."));
|
||||||
message->popup_centered(Size2(300,100));
|
message->popup_centered(Size2(300,100));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -151,7 +151,7 @@ void ProjectSettings::_action_edited() {
|
|||||||
ti->set_text(0,old_name);
|
ti->set_text(0,old_name);
|
||||||
add_at="input/"+old_name;
|
add_at="input/"+old_name;
|
||||||
|
|
||||||
message->set_text(TTR("Action '")+new_name+"' already exists!.");
|
message->set_text(vformat(TTR("Action '%s' already exists!"),new_name));
|
||||||
message->popup_centered(Size2(300,100));
|
message->popup_centered(Size2(300,100));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -357,7 +357,7 @@ void ProjectSettings::_add_item(int p_item){
|
|||||||
for(int i=0;i<JOY_AXIS_MAX*2;i++) {
|
for(int i=0;i<JOY_AXIS_MAX*2;i++) {
|
||||||
|
|
||||||
String desc = _axis_names[i];
|
String desc = _axis_names[i];
|
||||||
device_index->add_item(TTR("Axis ")+itos(i/2)+" "+(i&1?"+":"-")+desc);
|
device_index->add_item(TTR("Axis")+" "+itos(i/2)+" "+(i&1?"+":"-")+desc);
|
||||||
}
|
}
|
||||||
device_input->popup_centered(Size2(350,95));
|
device_input->popup_centered(Size2(350,95));
|
||||||
|
|
||||||
@ -517,7 +517,7 @@ void ProjectSettings::_update_actions() {
|
|||||||
} break;
|
} break;
|
||||||
case InputEvent::JOYSTICK_BUTTON: {
|
case InputEvent::JOYSTICK_BUTTON: {
|
||||||
|
|
||||||
String str = TTR("Device ")+itos(ie.device)+", Button "+itos(ie.joy_button.button_index);
|
String str = TTR("Device")+" "+itos(ie.device)+", "+TTR("Button")+" "+itos(ie.joy_button.button_index);
|
||||||
if (ie.joy_button.button_index>=0 && ie.joy_button.button_index<JOY_BUTTON_MAX)
|
if (ie.joy_button.button_index>=0 && ie.joy_button.button_index<JOY_BUTTON_MAX)
|
||||||
str+=String()+" ("+_button_names[ie.joy_button.button_index]+").";
|
str+=String()+" ("+_button_names[ie.joy_button.button_index]+").";
|
||||||
else
|
else
|
||||||
@ -528,14 +528,14 @@ void ProjectSettings::_update_actions() {
|
|||||||
} break;
|
} break;
|
||||||
case InputEvent::MOUSE_BUTTON: {
|
case InputEvent::MOUSE_BUTTON: {
|
||||||
|
|
||||||
String str = TTR("Device ")+itos(ie.device)+", ";
|
String str = TTR("Device")+" "+itos(ie.device)+", ";
|
||||||
switch (ie.mouse_button.button_index) {
|
switch (ie.mouse_button.button_index) {
|
||||||
case BUTTON_LEFT: str+=TTR("Left Button."); break;
|
case BUTTON_LEFT: str+=TTR("Left Button."); break;
|
||||||
case BUTTON_RIGHT: str+=TTR("Right Button."); break;
|
case BUTTON_RIGHT: str+=TTR("Right Button."); break;
|
||||||
case BUTTON_MIDDLE: str+=TTR("Middle Button."); break;
|
case BUTTON_MIDDLE: str+=TTR("Middle Button."); break;
|
||||||
case BUTTON_WHEEL_UP: str+=TTR("Wheel Up."); break;
|
case BUTTON_WHEEL_UP: str+=TTR("Wheel Up."); break;
|
||||||
case BUTTON_WHEEL_DOWN: str+=TTR("Wheel Down."); break;
|
case BUTTON_WHEEL_DOWN: str+=TTR("Wheel Down."); break;
|
||||||
default: str+=TTR("Button ")+itos(ie.mouse_button.button_index)+".";
|
default: str+=TTR("Button")+" "+itos(ie.mouse_button.button_index)+".";
|
||||||
}
|
}
|
||||||
|
|
||||||
action->set_text(0,str);
|
action->set_text(0,str);
|
||||||
@ -546,7 +546,7 @@ void ProjectSettings::_update_actions() {
|
|||||||
int ax = ie.joy_motion.axis;
|
int ax = ie.joy_motion.axis;
|
||||||
int n = 2*ax + (ie.joy_motion.axis_value<0 ? 0:1);
|
int n = 2*ax + (ie.joy_motion.axis_value<0 ? 0:1);
|
||||||
String desc = _axis_names[n];
|
String desc = _axis_names[n];
|
||||||
String str = TTR("Device ")+itos(ie.device)+", Axis "+itos(ax)+" "+(ie.joy_motion.axis_value<0?"-":"+")+desc +".";
|
String str = TTR("Device")+" "+itos(ie.device)+", "+TTR("Axis")+" "+itos(ax)+" "+(ie.joy_motion.axis_value<0?"-":"+")+desc +".";
|
||||||
action->set_text(0,str);
|
action->set_text(0,str);
|
||||||
action->set_icon(0,get_icon("JoyAxis","EditorIcons"));
|
action->set_icon(0,get_icon("JoyAxis","EditorIcons"));
|
||||||
} break;
|
} break;
|
||||||
@ -650,13 +650,13 @@ void ProjectSettings::_action_add() {
|
|||||||
|
|
||||||
String action = action_name->get_text();
|
String action = action_name->get_text();
|
||||||
if (action.find("/")!=-1 || action.find(":")!=-1 || action=="") {
|
if (action.find("/")!=-1 || action.find(":")!=-1 || action=="") {
|
||||||
message->set_text(TTR("Invalid Action (Anything goes but / or :)."));
|
message->set_text(TTR("Invalid action (anything goes but '/' or ':')."));
|
||||||
message->popup_centered(Size2(300,100));
|
message->popup_centered(Size2(300,100));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (Globals::get_singleton()->has("input/"+action)) {
|
if (Globals::get_singleton()->has("input/"+action)) {
|
||||||
message->set_text(TTR("Action '")+action+"' already exists!.");
|
message->set_text(vformat(TTR("Action '%s' already exists!"),action));
|
||||||
message->popup_centered(Size2(300,100));
|
message->popup_centered(Size2(300,100));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -710,7 +710,7 @@ void ProjectSettings::_item_checked(const String& p_item, bool p_check) {
|
|||||||
void ProjectSettings::_save() {
|
void ProjectSettings::_save() {
|
||||||
|
|
||||||
Error err = Globals::get_singleton()->save();
|
Error err = Globals::get_singleton()->save();
|
||||||
message->set_text(err!=OK?TTR("Error saving settings."):"Settings Saved OK.");
|
message->set_text(err!=OK?TTR("Error saving settings."):TTR("Settings saved OK."));
|
||||||
message->popup_centered(Size2(300,100));
|
message->popup_centered(Size2(300,100));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -851,7 +851,7 @@ void ProjectSettings::_autoload_edited() {
|
|||||||
if (checked)
|
if (checked)
|
||||||
path="*"+path;
|
path="*"+path;
|
||||||
|
|
||||||
undo_redo->create_action(TTR("Toggle Autoload GlobalVar"));
|
undo_redo->create_action(TTR("Toggle AutoLoad Globals"));
|
||||||
undo_redo->add_do_property(Globals::get_singleton(),base,path);
|
undo_redo->add_do_property(Globals::get_singleton(),base,path);
|
||||||
undo_redo->add_undo_property(Globals::get_singleton(),base,Globals::get_singleton()->get(base));
|
undo_redo->add_undo_property(Globals::get_singleton(),base,Globals::get_singleton()->get(base));
|
||||||
undo_redo->add_do_method(Globals::get_singleton(),"set_order",base,order); // keep order, as config order matters for these
|
undo_redo->add_do_method(Globals::get_singleton(),"set_order",base,order); // keep order, as config order matters for these
|
||||||
@ -869,7 +869,7 @@ void ProjectSettings::_autoload_add() {
|
|||||||
|
|
||||||
String name = autoload_add_name->get_text();
|
String name = autoload_add_name->get_text();
|
||||||
if (!name.is_valid_identifier()) {
|
if (!name.is_valid_identifier()) {
|
||||||
message->set_text("Invalid Name.\nValid characters: a-z,A-Z,0-9 or _");
|
message->set_text(TTR("Invalid name.")+"\n"+TTR("Valid characters:")+" a-z, A-Z, 0-9 or _");
|
||||||
message->popup_centered(Size2(300,100));
|
message->popup_centered(Size2(300,100));
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -877,7 +877,7 @@ void ProjectSettings::_autoload_add() {
|
|||||||
|
|
||||||
if (ObjectTypeDB::type_exists(name)) {
|
if (ObjectTypeDB::type_exists(name)) {
|
||||||
|
|
||||||
message->set_text(TTR("Invalid Name.Must not collide with an existing engine class name."));
|
message->set_text(TTR("Invalid name. Must not collide with an existing engine class name."));
|
||||||
message->popup_centered(Size2(300,100));
|
message->popup_centered(Size2(300,100));
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -886,7 +886,7 @@ void ProjectSettings::_autoload_add() {
|
|||||||
for(int i=0;i<Variant::VARIANT_MAX;i++) {
|
for(int i=0;i<Variant::VARIANT_MAX;i++) {
|
||||||
if (Variant::get_type_name(Variant::Type(i))==name) {
|
if (Variant::get_type_name(Variant::Type(i))==name) {
|
||||||
|
|
||||||
message->set_text(TTR("Invalid Name.Must not collide with an existing buit-in type name."));
|
message->set_text(TTR("Invalid name. Must not collide with an existing buit-in type name."));
|
||||||
message->popup_centered(Size2(300,100));
|
message->popup_centered(Size2(300,100));
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -897,7 +897,7 @@ void ProjectSettings::_autoload_add() {
|
|||||||
|
|
||||||
if (GlobalConstants::get_global_constant_name(i)==name) {
|
if (GlobalConstants::get_global_constant_name(i)==name) {
|
||||||
|
|
||||||
message->set_text(TTR("Invalid Name.Must not collide with an existing global constant name."));
|
message->set_text(TTR("Invalid name. Must not collide with an existing global constant name."));
|
||||||
message->popup_centered(Size2(300,100));
|
message->popup_centered(Size2(300,100));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -1556,7 +1556,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
|
|||||||
save->set_anchor(MARGIN_BOTTOM,ANCHOR_END);
|
save->set_anchor(MARGIN_BOTTOM,ANCHOR_END);
|
||||||
save->set_begin( Point2(80,28) );
|
save->set_begin( Point2(80,28) );
|
||||||
save->set_end( Point2(10,20) );
|
save->set_end( Point2(10,20) );
|
||||||
save->set_text(TTR("Save"));
|
save->set_text("Save");
|
||||||
save->connect("pressed",this,"_save");
|
save->connect("pressed",this,"_save");
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@ -1684,7 +1684,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
|
|||||||
save->set_anchor(MARGIN_BOTTOM,ANCHOR_END);
|
save->set_anchor(MARGIN_BOTTOM,ANCHOR_END);
|
||||||
save->set_begin( Point2(80,28) );
|
save->set_begin( Point2(80,28) );
|
||||||
save->set_end( Point2(10,20) );
|
save->set_end( Point2(10,20) );
|
||||||
save->set_text(TTR("Save"));
|
save->set_text("Save");
|
||||||
save->connect("pressed",this,"_save");
|
save->connect("pressed",this,"_save");
|
||||||
*/
|
*/
|
||||||
setting=false;
|
setting=false;
|
||||||
@ -1861,7 +1861,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
Control * es = memnew( Control );
|
Control * es = memnew( Control );
|
||||||
es->set_name(TTR("Export"));
|
es->set_name("Export");
|
||||||
tab_container->add_child(es);
|
tab_container->add_child(es);
|
||||||
export_settings = memnew( ProjectExportSettings );
|
export_settings = memnew( ProjectExportSettings );
|
||||||
es->add_child(export_settings);
|
es->add_child(export_settings);
|
||||||
|
@ -419,8 +419,8 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty
|
|||||||
|
|
||||||
//action_buttons[0];
|
//action_buttons[0];
|
||||||
|
|
||||||
int button_margin = get_constant("button_margin",TTR("Dialogs"));
|
int button_margin = get_constant("button_margin","Dialogs");
|
||||||
int margin = get_constant("margin",TTR("Dialogs"));
|
int margin = get_constant("margin","Dialogs");
|
||||||
|
|
||||||
action_buttons[0]->set_anchor( MARGIN_LEFT, ANCHOR_END );
|
action_buttons[0]->set_anchor( MARGIN_LEFT, ANCHOR_END );
|
||||||
action_buttons[0]->set_anchor( MARGIN_TOP, ANCHOR_END );
|
action_buttons[0]->set_anchor( MARGIN_TOP, ANCHOR_END );
|
||||||
@ -691,10 +691,10 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty
|
|||||||
int id = TYPE_BASE_ID+idx;
|
int id = TYPE_BASE_ID+idx;
|
||||||
if (has_icon(t,"EditorIcons")) {
|
if (has_icon(t,"EditorIcons")) {
|
||||||
|
|
||||||
menu->add_icon_item(get_icon(t,"EditorIcons"),"New "+t,id);
|
menu->add_icon_item(get_icon(t,"EditorIcons"),TTR("New")+" "+t,id);
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
menu->add_item(TTR("New ")+t,id);
|
menu->add_item(TTR("New")+" "+t,id);
|
||||||
}
|
}
|
||||||
|
|
||||||
idx++;
|
idx++;
|
||||||
@ -936,7 +936,7 @@ void CustomPropertyEditor::_node_path_selected(NodePath p_path) {
|
|||||||
|
|
||||||
if (owner->is_type("Node"))
|
if (owner->is_type("Node"))
|
||||||
node = owner->cast_to<Node>();
|
node = owner->cast_to<Node>();
|
||||||
else if (owner->is_type(TTR("ArrayPropertyEdit")))
|
else if (owner->is_type("ArrayPropertyEdit"))
|
||||||
node = owner->cast_to<ArrayPropertyEdit>()->get_node();
|
node = owner->cast_to<ArrayPropertyEdit>()->get_node();
|
||||||
|
|
||||||
if (!node) {
|
if (!node) {
|
||||||
@ -1732,7 +1732,7 @@ CustomPropertyEditor::CustomPropertyEditor() {
|
|||||||
add_child(checks20[i]);
|
add_child(checks20[i]);
|
||||||
checks20[i]->hide();
|
checks20[i]->hide();
|
||||||
checks20[i]->connect("pressed",this,"_action_pressed",make_binds(i));
|
checks20[i]->connect("pressed",this,"_action_pressed",make_binds(i));
|
||||||
checks20[i]->set_tooltip(TTR("Bit ")+itos(i)+", val "+itos(1<<i)+".");
|
checks20[i]->set_tooltip(vformat(TTR("Bit %d, val %d."), i, 1<<i));
|
||||||
}
|
}
|
||||||
|
|
||||||
text_edit = memnew( TextEdit );
|
text_edit = memnew( TextEdit );
|
||||||
@ -2658,11 +2658,11 @@ void PropertyEditor::update_tree() {
|
|||||||
TreeItem *title = tree->create_item(root);
|
TreeItem *title = tree->create_item(root);
|
||||||
|
|
||||||
title->set_custom_bg_color(0,get_color("prop_section","Editor"));
|
title->set_custom_bg_color(0,get_color("prop_section","Editor"));
|
||||||
title->set_text(0,TTR("Property")); // todo, fetch name if ID exists in database
|
title->set_text(0,"Property"); // todo, fetch name if ID exists in database
|
||||||
title->set_editable(0,false);
|
title->set_editable(0,false);
|
||||||
title->set_selectable(0,false);
|
title->set_selectable(0,false);
|
||||||
title->set_custom_bg_color(1,get_color("prop_section","Editor"));
|
title->set_custom_bg_color(1,get_color("prop_section","Editor"));
|
||||||
title->set_text(1,TTR("Value")); // todo, fetch name if ID exists in database
|
title->set_text(1,"Value"); // todo, fetch name if ID exists in database
|
||||||
title->set_editable(1,false);
|
title->set_editable(1,false);
|
||||||
title->set_selectable(1,false);
|
title->set_selectable(1,false);
|
||||||
*/
|
*/
|
||||||
@ -2671,7 +2671,7 @@ void PropertyEditor::update_tree() {
|
|||||||
if (obj->cast_to<Node>() || obj->cast_to<Resource>()) {
|
if (obj->cast_to<Node>() || obj->cast_to<Resource>()) {
|
||||||
TreeItem *type = tree->create_item(root);
|
TreeItem *type = tree->create_item(root);
|
||||||
|
|
||||||
type->set_text(0,TTR("Type")); // todo, fetch name if ID exists in database
|
type->set_text(0,"Type"); // todo, fetch name if ID exists in database
|
||||||
type->set_text(1,obj->get_type()); // todo, fetch name if ID exists in database
|
type->set_text(1,obj->get_type()); // todo, fetch name if ID exists in database
|
||||||
if (has_icon(obj->get_type(),"EditorIcons"))
|
if (has_icon(obj->get_type(),"EditorIcons"))
|
||||||
type->set_icon(1,get_icon(obj->get_type(),"EditorIcons") );
|
type->set_icon(1,get_icon(obj->get_type(),"EditorIcons") );
|
||||||
@ -2684,7 +2684,7 @@ void PropertyEditor::update_tree() {
|
|||||||
|
|
||||||
TreeItem *name = tree->create_item(root);
|
TreeItem *name = tree->create_item(root);
|
||||||
|
|
||||||
name->set_text(0,TTR("Name")); // todo, fetch name if ID exists in database
|
name->set_text(0,"Name"); // todo, fetch name if ID exists in database
|
||||||
if (obj->is_type("Resource"))
|
if (obj->is_type("Resource"))
|
||||||
name->set_text(1,obj->cast_to<Resource>()->get_name());
|
name->set_text(1,obj->cast_to<Resource>()->get_name());
|
||||||
else if (obj->is_type("Node"))
|
else if (obj->is_type("Node"))
|
||||||
@ -2767,7 +2767,7 @@ void PropertyEditor::update_tree() {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
sep->set_tooltip(0,TTR("Class: ")+p.name+":\n\n"+class_descr_cache[type]);
|
sep->set_tooltip(0,TTR("Class:")+" "+p.name+":\n\n"+class_descr_cache[type]);
|
||||||
}
|
}
|
||||||
//sep->set_custom_color(0,Color(1,1,1));
|
//sep->set_custom_color(0,Color(1,1,1));
|
||||||
|
|
||||||
@ -2864,7 +2864,7 @@ void PropertyEditor::update_tree() {
|
|||||||
descr_cache[type][setter]=descr;
|
descr_cache[type][setter]=descr;
|
||||||
}
|
}
|
||||||
|
|
||||||
item->set_tooltip(0, TTR("Property: ")+p.name+"\n\n"+descr);
|
item->set_tooltip(0, TTR("Property:")+" "+p.name+"\n\n"+descr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//EditorHelp::get_doc_data();
|
//EditorHelp::get_doc_data();
|
||||||
@ -3433,7 +3433,7 @@ void PropertyEditor::_edit_set(const String& p_name, const Variant& p_value) {
|
|||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
||||||
undo_redo->create_action(TTR("Set ")+p_name,true);
|
undo_redo->create_action(TTR("Set")+" "+p_name,true);
|
||||||
undo_redo->add_do_property(obj,p_name,p_value);
|
undo_redo->add_do_property(obj,p_name,p_value);
|
||||||
undo_redo->add_undo_property(obj,p_name,obj->get(p_name));
|
undo_redo->add_undo_property(obj,p_name,obj->get(p_name));
|
||||||
undo_redo->add_do_method(this,"_changed_callback",obj,p_name);
|
undo_redo->add_do_method(this,"_changed_callback",obj,p_name);
|
||||||
|
@ -82,7 +82,7 @@ static void _compress_image(Image::CompressMode p_mode,Image *p_image) {
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (EditorSettings::get_singleton()->get(TTR("PVRTC/fast_conversion")).operator bool()) {
|
if (EditorSettings::get_singleton()->get("PVRTC/fast_conversion").operator bool()) {
|
||||||
args.push_back("-pvrtcfast");
|
args.push_back("-pvrtcfast");
|
||||||
}
|
}
|
||||||
if (p_image->get_mipmaps()>0)
|
if (p_image->get_mipmaps()>0)
|
||||||
@ -93,13 +93,13 @@ static void _compress_image(Image::CompressMode p_mode,Image *p_image) {
|
|||||||
ResourceSaver::save(src_img,t);
|
ResourceSaver::save(src_img,t);
|
||||||
|
|
||||||
Error err = OS::get_singleton()->execute(ttpath,args,true);
|
Error err = OS::get_singleton()->execute(ttpath,args,true);
|
||||||
ERR_EXPLAIN(TTR("Could not execute PVRTC Tool: ")+ttpath);
|
ERR_EXPLAIN(TTR("Could not execute PVRTC tool:")+" "+ttpath);
|
||||||
ERR_FAIL_COND(err!=OK);
|
ERR_FAIL_COND(err!=OK);
|
||||||
|
|
||||||
|
|
||||||
t=ResourceLoader::load(dst_img,"Texture");
|
t=ResourceLoader::load(dst_img,"Texture");
|
||||||
|
|
||||||
ERR_EXPLAIN(TTR("Can't load back converted image using PVRTC Tool: ")+dst_img);
|
ERR_EXPLAIN(TTR("Can't load back converted image using PVRTC tool:")+" "+dst_img);
|
||||||
ERR_FAIL_COND(t.is_null());
|
ERR_FAIL_COND(t.is_null());
|
||||||
|
|
||||||
*p_image=t->get_data();
|
*p_image=t->get_data();
|
||||||
|
@ -99,7 +99,7 @@ ReparentDialog::ReparentDialog() {
|
|||||||
|
|
||||||
//Label *label = memnew( Label );
|
//Label *label = memnew( Label );
|
||||||
//label->set_pos( Point2( 15,8) );
|
//label->set_pos( Point2( 15,8) );
|
||||||
//label->set_text(TTR("Reparent Location (Select new Parent):"));
|
//label->set_text("Reparent Location (Select new Parent):");
|
||||||
|
|
||||||
keep_transform = memnew( CheckBox );
|
keep_transform = memnew( CheckBox );
|
||||||
keep_transform->set_text(TTR("Keep Global Transform"));
|
keep_transform->set_text(TTR("Keep Global Transform"));
|
||||||
@ -107,7 +107,7 @@ ReparentDialog::ReparentDialog() {
|
|||||||
vbc->add_child(keep_transform);
|
vbc->add_child(keep_transform);
|
||||||
|
|
||||||
|
|
||||||
//vbc->add_margin_child(TTR("Options:"),node_only);;
|
//vbc->add_margin_child("Options:",node_only);;
|
||||||
|
|
||||||
//cancel->connect("pressed", this,"_cancel");
|
//cancel->connect("pressed", this,"_cancel");
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ RunSettingsDialog::RunSettingsDialog() {
|
|||||||
arguments->set_editable(false);
|
arguments->set_editable(false);
|
||||||
|
|
||||||
get_ok()->set_text(TTR("Close"));
|
get_ok()->set_text(TTR("Close"));
|
||||||
//get_cancel()->set_text(TTR("Close"));
|
//get_cancel()->set_text("Close");
|
||||||
|
|
||||||
arguments->set_text("-l $scene");
|
arguments->set_text("-l $scene");
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ void SceneTreeDock::instance(const String& p_file) {
|
|||||||
|
|
||||||
current_option=-1;
|
current_option=-1;
|
||||||
//accept->get_cancel()->hide();
|
//accept->get_cancel()->hide();
|
||||||
accept->get_ok()->set_text(TTR("Ok :( "));
|
accept->get_ok()->set_text(TTR("OK :("));
|
||||||
accept->set_text(TTR("No parent to instance a child at."));
|
accept->set_text(TTR("No parent to instance a child at."));
|
||||||
accept->popup_centered_minsize();
|
accept->popup_centered_minsize();
|
||||||
return;
|
return;
|
||||||
@ -98,7 +98,7 @@ void SceneTreeDock::instance_scenes(const Vector<String>& p_files,Node* parent,i
|
|||||||
current_option=-1;
|
current_option=-1;
|
||||||
//accept->get_cancel()->hide();
|
//accept->get_cancel()->hide();
|
||||||
accept->get_ok()->set_text(TTR("Ugh"));
|
accept->get_ok()->set_text(TTR("Ugh"));
|
||||||
accept->set_text(String(TTR("Error loading scene from "))+p_files[i]);
|
accept->set_text(vformat(TTR("Error loading scene from %s"),p_files[i]));
|
||||||
accept->popup_centered_minsize();
|
accept->popup_centered_minsize();
|
||||||
error=true;
|
error=true;
|
||||||
break;
|
break;
|
||||||
@ -110,7 +110,7 @@ void SceneTreeDock::instance_scenes(const Vector<String>& p_files,Node* parent,i
|
|||||||
current_option=-1;
|
current_option=-1;
|
||||||
//accept->get_cancel()->hide();
|
//accept->get_cancel()->hide();
|
||||||
accept->get_ok()->set_text(TTR("Ugh"));
|
accept->get_ok()->set_text(TTR("Ugh"));
|
||||||
accept->set_text(String(TTR("Error instancing scene from "))+p_files[i]);
|
accept->set_text(vformat(TTR("Error instancing scene from %s"),p_files[i]));
|
||||||
accept->popup_centered_minsize();
|
accept->popup_centered_minsize();
|
||||||
error=true;
|
error=true;
|
||||||
break;
|
break;
|
||||||
@ -122,7 +122,7 @@ void SceneTreeDock::instance_scenes(const Vector<String>& p_files,Node* parent,i
|
|||||||
if (_cyclical_dependency_exists(edited_scene->get_filename(), instanced_scene)) {
|
if (_cyclical_dependency_exists(edited_scene->get_filename(), instanced_scene)) {
|
||||||
|
|
||||||
accept->get_ok()->set_text(TTR("Ok"));
|
accept->get_ok()->set_text(TTR("Ok"));
|
||||||
accept->set_text(String(TTR("Cannot instance the scene '"))+p_files[i]+String(TTR("' because the current scene exists within one of its' nodes.")));
|
accept->set_text(vformat(TTR("Cannot instance the scene '%s' because the current scene exists within one of its nodes."),p_files[i]));
|
||||||
accept->popup_centered_minsize();
|
accept->popup_centered_minsize();
|
||||||
error=true;
|
error=true;
|
||||||
break;
|
break;
|
||||||
@ -225,7 +225,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
|
|||||||
/* should be legal now
|
/* should be legal now
|
||||||
current_option=-1;
|
current_option=-1;
|
||||||
//confirmation->get_cancel()->hide();
|
//confirmation->get_cancel()->hide();
|
||||||
accept->get_ok()->set_text(TTR("I see.."));
|
accept->get_ok()->set_text("I see..");
|
||||||
accept->set_text("This operation can't be done without a tree root.");
|
accept->set_text("This operation can't be done without a tree root.");
|
||||||
accept->popup_centered_minsize();
|
accept->popup_centered_minsize();
|
||||||
*/
|
*/
|
||||||
@ -308,7 +308,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
|
|||||||
current_option=-1;
|
current_option=-1;
|
||||||
//accept->get_cancel()->hide();
|
//accept->get_cancel()->hide();
|
||||||
accept->get_ok()->set_text(TTR("I see.."));
|
accept->get_ok()->set_text(TTR("I see.."));
|
||||||
accept->set_text("This operation can't be done on the tree root.");
|
accept->set_text(TTR("This operation can't be done on the tree root."));
|
||||||
accept->popup_centered_minsize();
|
accept->popup_centered_minsize();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -376,7 +376,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
|
|||||||
current_option=-1;
|
current_option=-1;
|
||||||
//accept->get_cancel()->hide();
|
//accept->get_cancel()->hide();
|
||||||
accept->get_ok()->set_text(TTR("I see.."));
|
accept->get_ok()->set_text(TTR("I see.."));
|
||||||
accept->set_text("This operation can't be done on the tree root.");
|
accept->set_text(TTR("This operation can't be done on the tree root."));
|
||||||
accept->popup_centered_minsize();
|
accept->popup_centered_minsize();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -488,7 +488,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
|
|||||||
current_option=-1;
|
current_option=-1;
|
||||||
//confirmation->get_cancel()->hide();
|
//confirmation->get_cancel()->hide();
|
||||||
accept->get_ok()->set_text(TTR("I see.."));
|
accept->get_ok()->set_text(TTR("I see.."));
|
||||||
accept->set_text("This operation can't be done on the tree root.");
|
accept->set_text(TTR("This operation can't be done on the tree root."));
|
||||||
accept->popup_centered_minsize();
|
accept->popup_centered_minsize();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -548,7 +548,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
|
|||||||
|
|
||||||
if (!scene) {
|
if (!scene) {
|
||||||
accept->get_ok()->set_text(TTR("I see.."));
|
accept->get_ok()->set_text(TTR("I see.."));
|
||||||
accept->set_text("This operation can't be done without a scene.");
|
accept->set_text(TTR("This operation can't be done without a scene."));
|
||||||
accept->popup_centered_minsize();
|
accept->popup_centered_minsize();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -566,7 +566,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
|
|||||||
|
|
||||||
if (tocopy!=editor_data->get_edited_scene_root() && tocopy->get_filename()!="") {
|
if (tocopy!=editor_data->get_edited_scene_root() && tocopy->get_filename()!="") {
|
||||||
accept->get_ok()->set_text(TTR("I see.."));
|
accept->get_ok()->set_text(TTR("I see.."));
|
||||||
accept->set_text("This operation can't be done on instanced scenes.");
|
accept->set_text(TTR("This operation can't be done on instanced scenes."));
|
||||||
accept->popup_centered_minsize();
|
accept->popup_centered_minsize();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@ -1411,7 +1411,7 @@ void SceneTreeDock::_import_subscene() {
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
editor_data->get_undo_redo().create_action(TTR("Import Subscene"));
|
editor_data->get_undo_redo().create_action("Import Subscene");
|
||||||
editor_data->get_undo_redo().add_do_method(parent,"add_child",ss);
|
editor_data->get_undo_redo().add_do_method(parent,"add_child",ss);
|
||||||
//editor_data->get_undo_redo().add_do_method(editor_selection,"clear");
|
//editor_data->get_undo_redo().add_do_method(editor_selection,"clear");
|
||||||
//editor_data->get_undo_redo().add_do_method(editor_selection,"add_node",child);
|
//editor_data->get_undo_redo().add_do_method(editor_selection,"add_node",child);
|
||||||
@ -1768,7 +1768,7 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor,Node *p_scene_root,EditorSelec
|
|||||||
|
|
||||||
tb = memnew( ToolButton );
|
tb = memnew( ToolButton );
|
||||||
tb->connect("pressed",this,"_tool_selected",make_binds(TOOL_NEW, false));
|
tb->connect("pressed",this,"_tool_selected",make_binds(TOOL_NEW, false));
|
||||||
tb->set_tooltip("Add/Create a New Node\n("+keycode_get_string(KEY_MASK_CMD|KEY_A)+")");
|
tb->set_tooltip(TTR("Add/Create a New Node")+"\n("+keycode_get_string(KEY_MASK_CMD|KEY_A)+")");
|
||||||
filter_hbc->add_child(tb);
|
filter_hbc->add_child(tb);
|
||||||
button_add=tb;
|
button_add=tb;
|
||||||
|
|
||||||
|
@ -293,13 +293,13 @@ bool SceneTreeEditor::_add_nodes(Node *p_node,TreeItem *p_parent) {
|
|||||||
|
|
||||||
if (p_node==get_scene_node() && p_node->get_scene_inherited_state().is_valid()) {
|
if (p_node==get_scene_node() && p_node->get_scene_inherited_state().is_valid()) {
|
||||||
item->add_button(0,get_icon("InstanceOptions","EditorIcons"),BUTTON_SUBSCENE);
|
item->add_button(0,get_icon("InstanceOptions","EditorIcons"),BUTTON_SUBSCENE);
|
||||||
item->set_tooltip(0,TTR("Inherits: ")+p_node->get_scene_inherited_state()->get_path()+"\nType: "+p_node->get_type());
|
item->set_tooltip(0,TTR("Inherits:")+" "+p_node->get_scene_inherited_state()->get_path()+"\n"+TTR("Type:")+" "+p_node->get_type());
|
||||||
} else if (p_node!=get_scene_node() && p_node->get_filename()!="" && can_open_instance) {
|
} else if (p_node!=get_scene_node() && p_node->get_filename()!="" && can_open_instance) {
|
||||||
|
|
||||||
item->add_button(0,get_icon("InstanceOptions","EditorIcons"),BUTTON_SUBSCENE);
|
item->add_button(0,get_icon("InstanceOptions","EditorIcons"),BUTTON_SUBSCENE);
|
||||||
item->set_tooltip(0,TTR("Instance: ")+p_node->get_filename()+"\nType: "+p_node->get_type());
|
item->set_tooltip(0,TTR("Instance:")+" "+p_node->get_filename()+"\n"+TTR("Type:")+" "+p_node->get_type());
|
||||||
} else {
|
} else {
|
||||||
item->set_tooltip(0,String(p_node->get_name())+"\nType: "+p_node->get_type());
|
item->set_tooltip(0,String(p_node->get_name())+"\n"+TTR("Type:")+" "+p_node->get_type());
|
||||||
}
|
}
|
||||||
|
|
||||||
if (can_open_instance) {
|
if (can_open_instance) {
|
||||||
@ -684,7 +684,7 @@ void SceneTreeEditor::_renamed() {
|
|||||||
String new_name=which->get_text(0);
|
String new_name=which->get_text(0);
|
||||||
if (new_name.find(".") != -1 || new_name.find("/") != -1) {
|
if (new_name.find(".") != -1 || new_name.find("/") != -1) {
|
||||||
|
|
||||||
error->set_text(TTR("Invalid node name, the following characters are not allowed:\n \".\", \"/\""));
|
error->set_text(TTR("Invalid node name, the following characters are not allowed:")+"\n \".\", \"/\"");
|
||||||
error->popup_centered_minsize();
|
error->popup_centered_minsize();
|
||||||
new_name=n->get_name();
|
new_name=n->get_name();
|
||||||
}
|
}
|
||||||
|
@ -859,7 +859,7 @@ void ScenesDock::_move_operation(const String& p_to_path) {
|
|||||||
|
|
||||||
for(int i=0;i<move_dirs.size();i++) {
|
for(int i=0;i<move_dirs.size();i++) {
|
||||||
if (p_to_path.begins_with(move_dirs[i])) {
|
if (p_to_path.begins_with(move_dirs[i])) {
|
||||||
EditorNode::get_singleton()->show_warning(TTR("Can't move directories to within themselves"));
|
EditorNode::get_singleton()->show_warning(TTR("Can't move directories to within themselves."));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -944,6 +944,7 @@ void ScenesDock::_file_option(int p_option) {
|
|||||||
switch(p_option) {
|
switch(p_option) {
|
||||||
|
|
||||||
|
|
||||||
|
case FILE_SHOW_IN_EXPLORER:
|
||||||
case FILE_OPEN: {
|
case FILE_OPEN: {
|
||||||
int idx=-1;
|
int idx=-1;
|
||||||
for(int i=0;i<files->get_item_count();i++) {
|
for(int i=0;i<files->get_item_count();i++) {
|
||||||
@ -959,6 +960,12 @@ void ScenesDock::_file_option(int p_option) {
|
|||||||
|
|
||||||
|
|
||||||
String path = files->get_item_metadata(idx);
|
String path = files->get_item_metadata(idx);
|
||||||
|
if (p_option == FILE_SHOW_IN_EXPLORER) {
|
||||||
|
String dir = Globals::get_singleton()->globalize_path(path);
|
||||||
|
dir = dir.substr(0, dir.find_last("/"));
|
||||||
|
OS::get_singleton()->shell_open(String("file://")+dir);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (path.ends_with("/")) {
|
if (path.ends_with("/")) {
|
||||||
if (path!="res://") {
|
if (path!="res://") {
|
||||||
@ -1036,7 +1043,7 @@ void ScenesDock::_file_option(int p_option) {
|
|||||||
rename_dialog->set_mode(EditorFileDialog::MODE_SAVE_FILE);
|
rename_dialog->set_mode(EditorFileDialog::MODE_SAVE_FILE);
|
||||||
rename_dialog->set_current_path(move_files[0]);
|
rename_dialog->set_current_path(move_files[0]);
|
||||||
rename_dialog->popup_centered_ratio();
|
rename_dialog->popup_centered_ratio();
|
||||||
rename_dialog->set_title(TTR("Pick New Name and Location For: ")+move_files[0].get_file());
|
rename_dialog->set_title(TTR("Pick New Name and Location For:")+" "+move_files[0].get_file());
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@ -1416,6 +1423,10 @@ void ScenesDock::_files_list_rmb_select(int p_item,const Vector2& p_pos) {
|
|||||||
|
|
||||||
file_options->add_item(TTR("Delete"),FILE_REMOVE);
|
file_options->add_item(TTR("Delete"),FILE_REMOVE);
|
||||||
//file_options->add_item(TTR("Info"),FILE_INFO);
|
//file_options->add_item(TTR("Info"),FILE_INFO);
|
||||||
|
|
||||||
|
file_options->add_separator();
|
||||||
|
file_options->add_item(TTR("Show In File Manager"),FILE_SHOW_IN_EXPLORER);
|
||||||
|
|
||||||
file_options->set_pos(files->get_global_pos() + p_pos);
|
file_options->set_pos(files->get_global_pos() + p_pos);
|
||||||
file_options->popup();
|
file_options->popup();
|
||||||
|
|
||||||
@ -1635,4 +1646,3 @@ ScenesDock::ScenesDock(EditorNode *p_editor) {
|
|||||||
ScenesDock::~ScenesDock() {
|
ScenesDock::~ScenesDock() {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -62,7 +62,8 @@ class ScenesDock : public VBoxContainer {
|
|||||||
FILE_MOVE,
|
FILE_MOVE,
|
||||||
FILE_REMOVE,
|
FILE_REMOVE,
|
||||||
FILE_REIMPORT,
|
FILE_REIMPORT,
|
||||||
FILE_INFO
|
FILE_INFO,
|
||||||
|
FILE_SHOW_IN_EXPLORER
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -74,17 +74,17 @@ bool ScriptCreateDialog::_validate(const String& p_string) {
|
|||||||
void ScriptCreateDialog::_class_name_changed(const String& p_name) {
|
void ScriptCreateDialog::_class_name_changed(const String& p_name) {
|
||||||
|
|
||||||
if (!_validate(parent_name->get_text())) {
|
if (!_validate(parent_name->get_text())) {
|
||||||
error_label->set_text(TTR("Invaild parent class name"));
|
error_label->set_text(TTR("Invalid parent class name"));
|
||||||
error_label->add_color_override("font_color",Color(1,0.4,0.0,0.8));
|
error_label->add_color_override("font_color",Color(1,0.4,0.0,0.8));
|
||||||
} else if (class_name->is_editable()) {
|
} else if (class_name->is_editable()) {
|
||||||
if (class_name->get_text()=="") {
|
if (class_name->get_text()=="") {
|
||||||
error_label->set_text(TTR("Valid Chars: a-z A-Z 0-9 _"));
|
error_label->set_text(TTR("Valid chars:")+" a-z A-Z 0-9 _");
|
||||||
error_label->add_color_override("font_color",Color(1,1,1,0.6));
|
error_label->add_color_override("font_color",Color(1,1,1,0.6));
|
||||||
} else if (!_validate(class_name->get_text())) {
|
} else if (!_validate(class_name->get_text())) {
|
||||||
error_label->set_text(TTR("Invalid class name"));
|
error_label->set_text(TTR("Invalid class name"));
|
||||||
error_label->add_color_override("font_color",Color(1,0.2,0.2,0.8));
|
error_label->add_color_override("font_color",Color(1,0.2,0.2,0.8));
|
||||||
} else {
|
} else {
|
||||||
error_label->set_text(TTR("Valid Name"));
|
error_label->set_text(TTR("Valid name"));
|
||||||
error_label->add_color_override("font_color",Color(0,1.0,0.8,0.8));
|
error_label->add_color_override("font_color",Color(0,1.0,0.8,0.8));
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -98,12 +98,12 @@ void ScriptCreateDialog::ok_pressed() {
|
|||||||
|
|
||||||
if (class_name->is_editable() && !_validate(class_name->get_text())) {
|
if (class_name->is_editable() && !_validate(class_name->get_text())) {
|
||||||
|
|
||||||
alert->set_text(TTR("Class Name is Invalid!"));
|
alert->set_text(TTR("Class name is invalid!"));
|
||||||
alert->popup_centered_minsize();
|
alert->popup_centered_minsize();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (!_validate(parent_name->get_text())) {
|
if (!_validate(parent_name->get_text())) {
|
||||||
alert->set_text(TTR("Parent Class Name is Invalid!"));
|
alert->set_text(TTR("Parent class name is invalid!"));
|
||||||
alert->popup_centered_minsize();
|
alert->popup_centered_minsize();
|
||||||
|
|
||||||
return;
|
return;
|
||||||
@ -133,7 +133,7 @@ void ScriptCreateDialog::ok_pressed() {
|
|||||||
script->set_path(lpath);
|
script->set_path(lpath);
|
||||||
if (!path_valid) {
|
if (!path_valid) {
|
||||||
|
|
||||||
alert->set_text(TTR("Path is Invalid!"));
|
alert->set_text(TTR("Invalid path!"));
|
||||||
alert->popup_centered_minsize();
|
alert->popup_centered_minsize();
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -141,7 +141,7 @@ void ScriptCreateDialog::ok_pressed() {
|
|||||||
Error err = ResourceSaver::save(lpath,scr,ResourceSaver::FLAG_CHANGE_PATH);
|
Error err = ResourceSaver::save(lpath,scr,ResourceSaver::FLAG_CHANGE_PATH);
|
||||||
if (err!=OK) {
|
if (err!=OK) {
|
||||||
|
|
||||||
alert->set_text(TTR("Could not create script in filesystem: ")+String(""));
|
alert->set_text(TTR("Could not create script in filesystem."));
|
||||||
alert->popup_centered_minsize();
|
alert->popup_centered_minsize();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -215,7 +215,7 @@ void ScriptCreateDialog::_path_changed(const String& p_path) {
|
|||||||
|
|
||||||
if (p=="") {
|
if (p=="") {
|
||||||
|
|
||||||
path_error_label->set_text(TTR("Path is Empty"));
|
path_error_label->set_text(TTR("Path is empty"));
|
||||||
path_error_label->add_color_override("font_color",Color(1,0.4,0.0,0.8));
|
path_error_label->add_color_override("font_color",Color(1,0.4,0.0,0.8));
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -234,7 +234,7 @@ void ScriptCreateDialog::_path_changed(const String& p_path) {
|
|||||||
|
|
||||||
if (d->change_dir(p.get_base_dir())!=OK) {
|
if (d->change_dir(p.get_base_dir())!=OK) {
|
||||||
|
|
||||||
path_error_label->set_text(TTR("Base Path Invalid"));
|
path_error_label->set_text(TTR("Invalid base path"));
|
||||||
path_error_label->add_color_override("font_color",Color(1,0.4,0.0,0.8));
|
path_error_label->add_color_override("font_color",Color(1,0.4,0.0,0.8));
|
||||||
memdelete(d);
|
memdelete(d);
|
||||||
return;
|
return;
|
||||||
@ -249,7 +249,7 @@ void ScriptCreateDialog::_path_changed(const String& p_path) {
|
|||||||
|
|
||||||
if (f->file_exists(p)) {
|
if (f->file_exists(p)) {
|
||||||
|
|
||||||
path_error_label->set_text(TTR("File Exists"));
|
path_error_label->set_text(TTR("File exists"));
|
||||||
path_error_label->add_color_override("font_color",Color(1,0.4,0.0,0.8));
|
path_error_label->add_color_override("font_color",Color(1,0.4,0.0,0.8));
|
||||||
memdelete(f);
|
memdelete(f);
|
||||||
return;
|
return;
|
||||||
@ -273,13 +273,13 @@ void ScriptCreateDialog::_path_changed(const String& p_path) {
|
|||||||
|
|
||||||
if (!found) {
|
if (!found) {
|
||||||
|
|
||||||
path_error_label->set_text(TTR("Invalid Extension"));
|
path_error_label->set_text(TTR("Invalid extension"));
|
||||||
path_error_label->add_color_override("font_color",Color(1,0.4,0.0,0.8));
|
path_error_label->add_color_override("font_color",Color(1,0.4,0.0,0.8));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
path_error_label->set_text(TTR("Path is Valid"));
|
path_error_label->set_text(TTR("Valid path"));
|
||||||
path_error_label->add_color_override("font_color",Color(0,1.0,0.8,0.8));
|
path_error_label->add_color_override("font_color",Color(0,1.0,0.8,0.8));
|
||||||
|
|
||||||
path_valid=true;
|
path_valid=true;
|
||||||
@ -363,7 +363,7 @@ ScriptCreateDialog::ScriptCreateDialog() {
|
|||||||
|
|
||||||
set_size(Size2(200,150));
|
set_size(Size2(200,150));
|
||||||
set_hide_on_ok(false);
|
set_hide_on_ok(false);
|
||||||
set_title(TTR("Create Script for Node"));
|
set_title(TTR("Create Node Script"));
|
||||||
|
|
||||||
file_browse = memnew( EditorFileDialog );
|
file_browse = memnew( EditorFileDialog );
|
||||||
file_browse->connect("file_selected",this,"_file_selected");
|
file_browse->connect("file_selected",this,"_file_selected");
|
||||||
|
@ -292,7 +292,7 @@ void ScriptEditorDebugger::_parse_message(const String& p_msg,const Array& p_dat
|
|||||||
it->set_icon(0,get_icon(type,"EditorIcons"));
|
it->set_icon(0,get_icon(type,"EditorIcons"));
|
||||||
}
|
}
|
||||||
|
|
||||||
vmem_total->set_tooltip(TTR("Bytes: ")+itos(total));
|
vmem_total->set_tooltip(TTR("Bytes:")+" "+itos(total));
|
||||||
vmem_total->set_text(String::humanize_size(total));
|
vmem_total->set_text(String::humanize_size(total));
|
||||||
|
|
||||||
} else if (p_msg=="stack_dump") {
|
} else if (p_msg=="stack_dump") {
|
||||||
@ -412,12 +412,12 @@ void ScriptEditorDebugger::_parse_message(const String& p_msg,const Array& p_dat
|
|||||||
String time = String("%d:%02d:%02d:%04d").sprintf(vals,&e);
|
String time = String("%d:%02d:%02d:%04d").sprintf(vals,&e);
|
||||||
String txt=time+" - "+String(err[8]);
|
String txt=time+" - "+String(err[8]);
|
||||||
|
|
||||||
String tooltip=TTR("Type:")+String(warning?"Warning":"Error");
|
String tooltip=TTR("Type:")+String(warning?TTR("Warning"):TTR("Error"));
|
||||||
tooltip+="\nDescription: "+String(err[8]);
|
tooltip+="\n"+TTR("Description:")+" "+String(err[8]);
|
||||||
tooltip+="\nTime: "+time;
|
tooltip+="\n"+TTR("Time:")+" "+time;
|
||||||
tooltip+="\nC Error: "+String(err[7]);
|
tooltip+="\nC "+TTR("Error:")+" "+String(err[7]);
|
||||||
tooltip+="\nC Source: "+String(err[5])+":"+String(err[6]);
|
tooltip+="\nC "+TTR("Source:")+" "+String(err[5])+":"+String(err[6]);
|
||||||
tooltip+="\nC Function: "+String(err[4]);
|
tooltip+="\nC "+TTR("Function:")+" "+String(err[4]);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -702,8 +702,8 @@ void ScriptEditorDebugger::_notification(int p_what) {
|
|||||||
debugger_button->set_icon(Ref<Texture>());
|
debugger_button->set_icon(Ref<Texture>());
|
||||||
tabs->set_tab_icon(error_split->get_index(),Ref<Texture>());
|
tabs->set_tab_icon(error_split->get_index(),Ref<Texture>());
|
||||||
} else {
|
} else {
|
||||||
error_split->set_name(TTR("Errors (")+itos(error_count)+")");
|
error_split->set_name(TTR("Errors")+" ("+itos(error_count)+")");
|
||||||
debugger_button->set_text(TTR("Debugger (")+itos(error_count)+")");
|
debugger_button->set_text(TTR("Debugger")+" ("+itos(error_count)+")");
|
||||||
debugger_button->set_icon(get_icon("Error","EditorIcons"));
|
debugger_button->set_icon(get_icon("Error","EditorIcons"));
|
||||||
tabs->set_tab_icon(error_split->get_index(),get_icon("Error","EditorIcons"));
|
tabs->set_tab_icon(error_split->get_index(),get_icon("Error","EditorIcons"));
|
||||||
}
|
}
|
||||||
@ -1350,7 +1350,7 @@ void ScriptEditorDebugger::_error_selected(int p_idx) {
|
|||||||
|
|
||||||
error_stack->add_item(str);
|
error_stack->add_item(str);
|
||||||
error_stack->set_item_metadata(error_stack->get_item_count()-1,md);
|
error_stack->set_item_metadata(error_stack->get_item_count()-1,md);
|
||||||
error_stack->set_item_tooltip(error_stack->get_item_count()-1,TTR("File: ")+String(st[i])+"\nLine: "+itos(line));
|
error_stack->set_item_tooltip(error_stack->get_item_count()-1,TTR("File:")+" "+String(st[i])+"\n"+TTR("Line:")+" "+itos(line));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1484,7 +1484,7 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor){
|
|||||||
|
|
||||||
forward = memnew( Button );
|
forward = memnew( Button );
|
||||||
hbc->add_child(forward);
|
hbc->add_child(forward);
|
||||||
back->set_tooltip(TTR("Inspect Next Instance"));
|
forward->set_tooltip(TTR("Inspect Next Instance"));
|
||||||
|
|
||||||
|
|
||||||
HSplitContainer *sc = memnew( HSplitContainer );
|
HSplitContainer *sc = memnew( HSplitContainer );
|
||||||
@ -1533,7 +1533,7 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor){
|
|||||||
errvb = memnew( VBoxContainer );
|
errvb = memnew( VBoxContainer );
|
||||||
errvb->set_h_size_flags(SIZE_EXPAND_FILL);
|
errvb->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||||
error_stack = memnew( ItemList );
|
error_stack = memnew( ItemList );
|
||||||
errvb->add_margin_child(TTR("Stack Trace (if applies):"),error_stack,true);
|
errvb->add_margin_child(TTR("Stack Trace (if applicable):"),error_stack,true);
|
||||||
error_split->add_child(errvb);
|
error_split->add_child(errvb);
|
||||||
|
|
||||||
error_split->set_name(TTR("Errors"));
|
error_split->set_name(TTR("Errors"));
|
||||||
@ -1591,10 +1591,10 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor){
|
|||||||
|
|
||||||
VBoxContainer *vmem_vb = memnew( VBoxContainer );
|
VBoxContainer *vmem_vb = memnew( VBoxContainer );
|
||||||
HBoxContainer *vmem_hb = memnew( HBoxContainer );
|
HBoxContainer *vmem_hb = memnew( HBoxContainer );
|
||||||
Label *vmlb = memnew(Label(TTR("List of Video Memory Usage by Resource: ")) );
|
Label *vmlb = memnew(Label(TTR("List of Video Memory Usage by Resource:")+" ") );
|
||||||
vmlb->set_h_size_flags(SIZE_EXPAND_FILL);
|
vmlb->set_h_size_flags(SIZE_EXPAND_FILL);
|
||||||
vmem_hb->add_child( vmlb );
|
vmem_hb->add_child( vmlb );
|
||||||
vmem_hb->add_child( memnew(Label(TTR("Total: "))) );
|
vmem_hb->add_child( memnew(Label(TTR("Total:")+" ")) );
|
||||||
vmem_total = memnew( LineEdit );
|
vmem_total = memnew( LineEdit );
|
||||||
vmem_total->set_editable(false);
|
vmem_total->set_editable(false);
|
||||||
vmem_total->set_custom_minimum_size(Size2(100,1));
|
vmem_total->set_custom_minimum_size(Size2(100,1));
|
||||||
|
@ -122,7 +122,7 @@ EditorSettingsDialog::EditorSettingsDialog() {
|
|||||||
vbc->add_child(hbc);
|
vbc->add_child(hbc);
|
||||||
|
|
||||||
Label *l = memnew( Label );
|
Label *l = memnew( Label );
|
||||||
l->set_text(TTR("Search: "));
|
l->set_text(TTR("Search:")+" ");
|
||||||
hbc->add_child(l);
|
hbc->add_child(l);
|
||||||
|
|
||||||
search_box = memnew( LineEdit );
|
search_box = memnew( LineEdit );
|
||||||
@ -146,16 +146,16 @@ EditorSettingsDialog::EditorSettingsDialog() {
|
|||||||
|
|
||||||
hbc = memnew( HBoxContainer );
|
hbc = memnew( HBoxContainer );
|
||||||
vbc->add_child(hbc);
|
vbc->add_child(hbc);
|
||||||
hbc->add_child( memnew( Label(TTR("Plugin List: "))));
|
hbc->add_child( memnew( Label(TTR("Plugin List:")+" ") ));
|
||||||
hbc->add_spacer();
|
hbc->add_spacer();
|
||||||
//Button *load = memnew( Button );
|
//Button *load = memnew( Button );
|
||||||
//load->set_text(TTR("Load.."));
|
//load->set_text("Load..");
|
||||||
//hbc->add_child(load);
|
//hbc->add_child(load);
|
||||||
|
|
||||||
|
|
||||||
//get_ok()->set_text(TTR("Apply"));
|
//get_ok()->set_text("Apply");
|
||||||
set_hide_on_ok(true);
|
set_hide_on_ok(true);
|
||||||
//get_cancel()->set_text(TTR("Close"));
|
//get_cancel()->set_text("Close");
|
||||||
|
|
||||||
timer = memnew( Timer );
|
timer = memnew( Timer );
|
||||||
timer->set_wait_time(1.5);
|
timer->set_wait_time(1.5);
|
||||||
|
@ -731,9 +731,9 @@ Vector3 EditorSpatialGizmo::get_handle_pos(int p_idx) const {
|
|||||||
String LightSpatialGizmo::get_handle_name(int p_idx) const {
|
String LightSpatialGizmo::get_handle_name(int p_idx) const {
|
||||||
|
|
||||||
if (p_idx==0)
|
if (p_idx==0)
|
||||||
return TTR("Radius");
|
return "Radius";
|
||||||
else
|
else
|
||||||
return TTR("Aperture");
|
return "Aperture";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -1030,9 +1030,9 @@ LightSpatialGizmo::LightSpatialGizmo(Light* p_light){
|
|||||||
String CameraSpatialGizmo::get_handle_name(int p_idx) const {
|
String CameraSpatialGizmo::get_handle_name(int p_idx) const {
|
||||||
|
|
||||||
if (camera->get_projection()==Camera::PROJECTION_PERSPECTIVE) {
|
if (camera->get_projection()==Camera::PROJECTION_PERSPECTIVE) {
|
||||||
return TTR("FOV");
|
return "FOV";
|
||||||
} else {
|
} else {
|
||||||
return TTR("Size");
|
return "Size";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Variant CameraSpatialGizmo::get_handle_value(int p_idx) const{
|
Variant CameraSpatialGizmo::get_handle_value(int p_idx) const{
|
||||||
@ -1695,22 +1695,22 @@ String CollisionShapeSpatialGizmo::get_handle_name(int p_idx) const {
|
|||||||
|
|
||||||
if (s->cast_to<SphereShape>()) {
|
if (s->cast_to<SphereShape>()) {
|
||||||
|
|
||||||
return TTR("Radius");
|
return "Radius";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s->cast_to<BoxShape>()) {
|
if (s->cast_to<BoxShape>()) {
|
||||||
|
|
||||||
return TTR("Extents");
|
return "Extents";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s->cast_to<CapsuleShape>()) {
|
if (s->cast_to<CapsuleShape>()) {
|
||||||
|
|
||||||
return p_idx==0?TTR("Radius"):"Height";
|
return p_idx==0?"Radius":"Height";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (s->cast_to<RayShape>()) {
|
if (s->cast_to<RayShape>()) {
|
||||||
|
|
||||||
return TTR("Length");
|
return "Length";
|
||||||
}
|
}
|
||||||
|
|
||||||
return "";
|
return "";
|
||||||
|
@ -2,73 +2,110 @@
|
|||||||
|
|
||||||
import fnmatch
|
import fnmatch
|
||||||
import os
|
import os
|
||||||
import re
|
|
||||||
import shutil
|
import shutil
|
||||||
import subprocess
|
import subprocess
|
||||||
|
import sys
|
||||||
|
|
||||||
|
|
||||||
|
line_nb = False
|
||||||
|
|
||||||
|
for arg in sys.argv[1:]:
|
||||||
|
if (arg == "--with-line-nb"):
|
||||||
|
print("Enabling line numbers in the context locations.")
|
||||||
|
line_nb = True
|
||||||
|
else:
|
||||||
|
os.sys.exit("Non supported argument '" + arg + "'. Aborting.")
|
||||||
|
|
||||||
|
|
||||||
if (not os.path.exists("tools")):
|
if (not os.path.exists("tools")):
|
||||||
os.sys.exit("ERROR: This script should be started from the root of the git repo.")
|
os.sys.exit("ERROR: This script should be started from the root of the git repo.")
|
||||||
|
|
||||||
|
|
||||||
matches = []
|
matches = []
|
||||||
for root, dirnames, filenames in os.walk('.'):
|
for root, dirnames, filenames in os.walk('.'):
|
||||||
for filename in fnmatch.filter(filenames, '*.cpp'):
|
for filename in fnmatch.filter(filenames, '*.cpp'):
|
||||||
if (filename.find("collada")!=-1):
|
if (filename.find("collada") != -1):
|
||||||
continue
|
continue
|
||||||
matches.append(os.path.join(root, filename))
|
matches.append(os.path.join(root, filename))
|
||||||
for filename in fnmatch.filter(filenames, '*.h'):
|
for filename in fnmatch.filter(filenames, '*.h'):
|
||||||
if (filename.find("collada")!=-1):
|
if (filename.find("collada") != -1):
|
||||||
continue
|
continue
|
||||||
matches.append(os.path.join(root, filename))
|
matches.append(os.path.join(root, filename))
|
||||||
|
|
||||||
|
|
||||||
unique_str=[]
|
unique_str = []
|
||||||
main_po=""
|
unique_loc = {}
|
||||||
|
main_po = """
|
||||||
|
# LANGUAGE translation of the Godot Engine editor
|
||||||
|
# Copyright (C) 2016 Juan Linietsky, Ariel Manzur and the Godot community
|
||||||
|
# This file is distributed under the same license as the Godot source code.
|
||||||
|
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
|
||||||
|
#
|
||||||
|
#, fuzzy
|
||||||
|
msgid ""
|
||||||
|
msgstr ""
|
||||||
|
"Project-Id-Version: Godot Engine editor\\n"
|
||||||
|
"Content-Type: text/plain; charset=UTF-8\\n"
|
||||||
|
"Content-Transfer-Encoding: 8-bit\\n"
|
||||||
|
"""
|
||||||
|
|
||||||
print("Updating the tools.pot template...")
|
print("Updating the tools.pot template...")
|
||||||
|
|
||||||
for fname in matches:
|
for fname in matches:
|
||||||
|
|
||||||
f = open(fname,"rb")
|
f = open(fname, "rb")
|
||||||
|
|
||||||
new_f = ""
|
|
||||||
|
|
||||||
l = f.readline()
|
l = f.readline()
|
||||||
lc=1
|
lc = 1
|
||||||
while(l):
|
while (l):
|
||||||
|
|
||||||
pos = 0
|
pos = 0
|
||||||
while(pos>=0):
|
while (pos >= 0):
|
||||||
pos = l.find('TTR(\"',pos)
|
pos = l.find('TTR(\"', pos)
|
||||||
if (pos==-1):
|
if (pos == -1):
|
||||||
break
|
break
|
||||||
pos+=5
|
pos += 5
|
||||||
|
|
||||||
msg=""
|
msg = ""
|
||||||
while (pos < len(l) and (l[pos]!='"' or l[pos-1]=='\\') ):
|
while (pos < len(l) and (l[pos] != '"' or l[pos - 1] == '\\')):
|
||||||
msg+=l[pos]
|
msg += l[pos]
|
||||||
pos+=1
|
pos += 1
|
||||||
|
|
||||||
|
location = os.path.relpath(fname).replace('\\','/')
|
||||||
|
if (line_nb):
|
||||||
|
location += ":" + str(lc)
|
||||||
|
|
||||||
if (not msg in unique_str):
|
if (not msg in unique_str):
|
||||||
main_po+="\n#:"+fname+":"+str(lc)+"\n"
|
main_po += "\n#: " + location + "\n"
|
||||||
main_po+='msgid "'+msg+'"\n'
|
main_po += 'msgid "' + msg + '"\n'
|
||||||
main_po+='msgstr ""\n'
|
main_po += 'msgstr ""\n'
|
||||||
unique_str.append(msg)
|
unique_str.append(msg)
|
||||||
|
unique_loc[msg] = [location]
|
||||||
|
elif (not location in unique_loc[msg]):
|
||||||
|
# Add additional location to previous occurence too
|
||||||
|
msg_pos = main_po.find('\nmsgid "' + msg)
|
||||||
|
main_po = main_po[:msg_pos] + ' ' + location + main_po[msg_pos:]
|
||||||
|
unique_loc[msg].append(location)
|
||||||
|
|
||||||
l = f.readline()
|
l = f.readline()
|
||||||
lc+=1
|
lc += 1
|
||||||
|
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
|
||||||
f = open("tools.pot","wb")
|
f = open("tools.pot", "wb")
|
||||||
f.write(main_po)
|
f.write(main_po)
|
||||||
f.close()
|
f.close()
|
||||||
|
|
||||||
|
if (os.name == "posix"):
|
||||||
|
os.system("msgmerge -w80 tools.pot tools.pot > tools.pot.wrap")
|
||||||
|
shutil.move("tools.pot.wrap", "tools.pot")
|
||||||
|
|
||||||
shutil.move("tools.pot", "tools/translations/tools.pot")
|
shutil.move("tools.pot", "tools/translations/tools.pot")
|
||||||
|
|
||||||
# TODO: Make that in a portable way, if we care; if not, kudos to Unix users
|
# TODO: Make that in a portable way, if we care; if not, kudos to Unix users
|
||||||
if (os.name == "posix"):
|
if (os.name == "posix"):
|
||||||
added = subprocess.check_output("git diff tools/translations/tools.pot | grep \+msgid | wc -l", shell=True)
|
added = subprocess.check_output("git diff tools/translations/tools.pot | grep \+msgid | wc -l", shell = True)
|
||||||
removed = subprocess.check_output("git diff tools/translations/tools.pot | grep \\\-msgid | wc -l", shell=True)
|
removed = subprocess.check_output("git diff tools/translations/tools.pot | grep \\\-msgid | wc -l", shell = True)
|
||||||
print("Template changes compared to the staged status:")
|
print("Template changes compared to the staged status:")
|
||||||
print(" Additions: %s msgids.\n Deletions: %s msgids." % (int(added), int(removed)))
|
print(" Additions: %s msgids.\n Deletions: %s msgids." % (int(added), int(removed)))
|
||||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user