diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | core/globals.cpp | 12 | ||||
-rw-r--r-- | core/variant_call.cpp | 4 | ||||
-rw-r--r-- | core/variant_op.cpp | 6 | ||||
-rw-r--r-- | doc/base/classes.xml | 72 | ||||
-rw-r--r-- | doc/core_classes.xml | 4 | ||||
-rw-r--r-- | drivers/gles2/rasterizer_gles2.cpp | 3 | ||||
-rw-r--r-- | drivers/gles2/shader_compiler_gles2.cpp | 10 | ||||
-rw-r--r-- | drivers/gles2/shaders/material.glsl | 8 | ||||
-rw-r--r-- | main/main.cpp | 4 | ||||
-rw-r--r-- | scene/gui/dialogs.cpp | 4 | ||||
-rw-r--r-- | scene/gui/popup_menu.cpp | 9 | ||||
-rw-r--r-- | scene/resources/shader_graph.cpp | 1 | ||||
-rw-r--r-- | servers/visual/shader_language.cpp | 3 | ||||
-rw-r--r-- | tools/editor/project_manager.cpp | 5 | ||||
-rw-r--r-- | tools/editor/scene_tree_dock.cpp | 5 |
16 files changed, 106 insertions, 45 deletions
diff --git a/.gitignore b/.gitignore index a7ac2d2fc7..f24d91a7ee 100644 --- a/.gitignore +++ b/.gitignore @@ -296,3 +296,4 @@ cscope.po.out godot.creator.* projects/ +platform/windows/godot_res.res diff --git a/core/globals.cpp b/core/globals.cpp index ffd4cf5d5e..aee708d0cd 100644 --- a/core/globals.cpp +++ b/core/globals.cpp @@ -332,6 +332,7 @@ Error Globals::setup(const String& p_path,const String & p_main_pack) { String candidate = d->get_current_dir(); String current_dir = d->get_current_dir(); + String exec_name = OS::get_singleton()->get_executable_path().get_file().basename(); bool found = false; bool first_time=true; @@ -339,7 +340,16 @@ Error Globals::setup(const String& p_path,const String & p_main_pack) { //try to load settings in ascending through dirs shape! //tries to open pack, but only first time - if (first_time && (_load_resource_pack(current_dir+"/data.pck") || _load_resource_pack(current_dir+"/data.pcz") )) { + if (first_time && (_load_resource_pack(current_dir+"/"+exec_name+".pck") || _load_resource_pack(current_dir+"/"+exec_name+".pcz") )) { + if (_load_settings("res://engine.cfg")==OK || _load_settings_binary("res://engine.cfb")==OK) { + + _load_settings("res://override.cfg"); + found=true; + + + } + break; + } else if (first_time && (_load_resource_pack(current_dir+"/data.pck") || _load_resource_pack(current_dir+"/data.pcz") )) { if (_load_settings("res://engine.cfg")==OK || _load_settings_binary("res://engine.cfb")==OK) { _load_settings("res://override.cfg"); diff --git a/core/variant_call.cpp b/core/variant_call.cpp index 51d683f1fe..48c38f05f9 100644 --- a/core/variant_call.cpp +++ b/core/variant_call.cpp @@ -1291,8 +1291,8 @@ _VariantCall::addfunc(Variant::m_vtype,Variant::m_ret,_SCS(#m_method),VCALL(m_cl ADDFUNC1(STRING,STRING,String,pad_decimals,INT,"digits",varray()); ADDFUNC1(STRING,STRING,String,pad_zeros,INT,"digits",varray()); - ADDFUNC0(STRING,STRING,String,to_ascii,varray()); - ADDFUNC0(STRING,STRING,String,to_utf8,varray()); + ADDFUNC0(STRING,RAW_ARRAY,String,to_ascii,varray()); + ADDFUNC0(STRING,RAW_ARRAY,String,to_utf8,varray()); ADDFUNC0(VECTOR2,VECTOR2,Vector2,normalized,varray()); diff --git a/core/variant_op.cpp b/core/variant_op.cpp index eabd647837..1bcfa7d2ae 100644 --- a/core/variant_op.cpp +++ b/core/variant_op.cpp @@ -2818,9 +2818,9 @@ void Variant::get_property_list(List<PropertyInfo> *p_list) const { } break; case MATRIX32: { - p_list->push_back( PropertyInfo(Variant::REAL,"x")); - p_list->push_back( PropertyInfo(Variant::REAL,"y")); - p_list->push_back( PropertyInfo(Variant::REAL,"o")); + p_list->push_back( PropertyInfo(Variant::VECTOR2,"x")); + p_list->push_back( PropertyInfo(Variant::VECTOR2,"y")); + p_list->push_back( PropertyInfo(Variant::VECTOR2,"o")); } break; case PLANE: { diff --git a/doc/base/classes.xml b/doc/base/classes.xml index 44a7cccfe5..12f9062888 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -4371,7 +4371,7 @@ Stop a given voice. </description> </method> - <method name="free"> + <method name="free_rid"> <argument index="0" name="rid" type="RID"> </argument> <description> @@ -12551,7 +12551,7 @@ This approximation makes straight segments between each point, then subdivides t <description> Connect to a host. This needs to be done before any requests are sent. The host should not have http:// prepended but will strip the protocol identifier if provided. - + verify_host will check the SSL identity of the host if set to true. </description> </method> @@ -12576,9 +12576,9 @@ verify_host will check the SSL identity of the host if set to true. Sends a request to the connected host. The url is the what is normally behind the hostname, i.e: http://somehost.com/index.php url would be "index.php" - + Headers are HTTP request headers - + To create a POST request with query strings to push to the server, do: var fields = {"username" : "user", "password" : "pass"} @@ -12693,10 +12693,10 @@ var result = httpClient.request(httpClient.METHOD_POST, "index.php", headers, qu </argument> <description> Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary. - + var fields = {"username": "user", "password": "pass"} String queryString = httpClient.query_string_from_dict(fields) - + returns:= "username=user&password=pass" </description> </method> @@ -16735,11 +16735,11 @@ returns:= "username=user&password=pass" </method> </methods> <members> - <member name="x" type="float"> + <member name="x" type="Vector2"> </member> - <member name="y" type="float"> + <member name="y" type="Vector2"> </member> - <member name="o" type="float"> + <member name="o" type="Vector2"> </member> </members> <constants> @@ -26372,12 +26372,14 @@ This method controls whether the position between two cached points is interpola <return type="String"> </return> <description> + Returns a copy of the array's contents formatted as String. Fast alternative to get_string_from_utf8(), assuming the content is ASCII-only (unlike the UTF-8 function, this function maps every byte to a character in the string, so any multibyte sequence will be torn apart). </description> </method> <method name="get_string_from_utf8"> <return type="String"> </return> <description> + Returns a copy of the array's contents formatted as String, assuming the array is formatted as UTF-8. Slower than get_string_from_ascii(), but works for UTF-8. Usually you should prefer this function over get_string_from_ascii() to support international input. </description> </method> <method name="push_back"> @@ -33134,9 +33136,10 @@ This method controls whether the position between two cached points is interpola </description> </method> <method name="to_ascii"> - <return type="String"> + <return type="RawArray"> </return> <description> + Convert the String (which is a character array) to RawArray (which is an array of bytes). The conversion is speeded up in comparison to to_utf8() with the assumption that all the characters the String contains are only ASCII characters. </description> </method> <method name="to_float"> @@ -33168,9 +33171,10 @@ This method controls whether the position between two cached points is interpola </description> </method> <method name="to_utf8"> - <return type="String"> + <return type="RawArray"> </return> <description> + Convert the String (which is an array of characters) to RawArray (which is an array of bytes). The conversion is a bit slower than to_ascii(), but supports all UTF-8 characters. Therefore, you should prefer this function over to_ascii(). </description> </method> <method name="xml_escape"> @@ -37623,7 +37627,7 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="vec" type="Vector2"> </argument> <description> - Reflects/mirrors the vector around another vector. + Like "slide", but reflects the Vector instead of continuing along the wall. </description> </method> <method name="rotated"> @@ -37687,10 +37691,10 @@ This method controls whether the position between two cached points is interpola </class> <class name="Vector2Array" category="Built-In Types"> <brief_description> - An Array of Vector2's. + An Array of Vector2. </brief_description> <description> - An Array specifically designed to hold Vector2's. + An Array specifically designed to hold Vector2. </description> <methods> <method name="get"> @@ -37699,21 +37703,21 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="idx" type="int"> </argument> <description> - Get the Vector2 at the given index. + Returns the Vector2 at the given index. </description> </method> <method name="push_back"> <argument index="0" name="vector2" type="Vector2"> </argument> <description> - Insert a new Vector2. + Inserts a Vector2 at the end. </description> </method> <method name="resize"> <argument index="0" name="idx" type="int"> </argument> <description> - Set the size of the Vector2Array. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array. + Sets the size of the Vector2Array. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array. </description> </method> <method name="set"> @@ -37722,7 +37726,7 @@ This method controls whether the position between two cached points is interpola <argument index="1" name="vector2" type="Vector2"> </argument> <description> - Set the Vector2 at the given index. + Changes the Vector2 at the given index. </description> </method> <method name="size"> @@ -37757,12 +37761,14 @@ This method controls whether the position between two cached points is interpola <return type="Vector3"> </return> <description> + Returns a new vector with all components in absolute values (e.g. positive). </description> </method> <method name="ceil"> <return type="Vector3"> </return> <description> + Returns a new vector with all components rounded up. </description> </method> <method name="cross"> @@ -37786,7 +37792,7 @@ This method controls whether the position between two cached points is interpola <argument index="3" name="t" type="float"> </argument> <description> - Perform a cubic interpolation between vectors a,b,c,d (b is current), by the given amount (i). + Perform a cubic interpolation between vectors pre_a, a, b, post_b (a is current), by the given amount (t). </description> </method> <method name="distance_squared_to"> @@ -37795,7 +37801,7 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="b" type="Vector3"> </argument> <description> - Return the squared distance (distance minus the last square root) to b. + Return the squared distance (distance minus the last square root) to b. Prefer this function over distance_to if you need to sort vectors or need the squared distance for some formula. </description> </method> <method name="distance_to"> @@ -37820,13 +37826,14 @@ This method controls whether the position between two cached points is interpola <return type="Vector3"> </return> <description> + Returns a new vector with all components rounded down. </description> </method> <method name="inverse"> <return type="Vector3"> </return> <description> - Returns the inverse of the vector. this is the same as Vector3( 1.0 / v.x, 1.0 / v.y, 1.0 / v.z ) + Returns the inverse of the vector. This is the same as Vector3( 1.0 / v.x, 1.0 / v.y, 1.0 / v.z ) </description> </method> <method name="length"> @@ -37840,7 +37847,7 @@ This method controls whether the position between two cached points is interpola <return type="float"> </return> <description> - Return the length of the vector, squared. + Return the length of the vector, squared. Prefer this function over "length" if you need to sort vectors or need the squared length for some formula. </description> </method> <method name="linear_interpolate"> @@ -37851,26 +37858,28 @@ This method controls whether the position between two cached points is interpola <argument index="1" name="t" type="float"> </argument> <description> - Linearly interpolates the vector to a given one (b), by the given amount (i). + Linearly interpolates the vector to a given one (b), by the given amount (t). </description> </method> <method name="max_axis"> <return type="int"> </return> <description> + Returns AXIS_X, AXIS_Y or AXIS_Z depending on which axis is the largest. </description> </method> <method name="min_axis"> <return type="int"> </return> <description> + Returns AXIS_X, AXIS_Y or AXIS_Z depending on which axis is the smallest. </description> </method> <method name="normalized"> <return type="Vector3"> </return> <description> - Return a copy of the normalized vector to unit length. This is the same as v / v.length() + Return a copy of the normalized vector to unit length. This is the same as v / v.length(). </description> </method> <method name="reflect"> @@ -37879,6 +37888,7 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="by" type="Vector3"> </argument> <description> + Like "slide", but reflects the Vector instead of continuing along the wall. </description> </method> <method name="rotated"> @@ -37889,6 +37899,7 @@ This method controls whether the position between two cached points is interpola <argument index="1" name="phi" type="float"> </argument> <description> + Rotates the vector around some axis by phi radians. </description> </method> <method name="slide"> @@ -37897,6 +37908,7 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="by" type="Vector3"> </argument> <description> + Slides the vector along a wall. </description> </method> <method name="snapped"> @@ -37918,6 +37930,7 @@ This method controls whether the position between two cached points is interpola <argument index="2" name="z" type="float"> </argument> <description> + Returns a Vector3 with the given components. </description> </method> </methods> @@ -37931,17 +37944,22 @@ This method controls whether the position between two cached points is interpola </members> <constants> <constant name="AXIS_X" value="0"> + Enumerated value for the X axis. Returned by functions like max_axis or min_axis. </constant> <constant name="AXIS_Y" value="1"> + Enumerated value for the Y axis. </constant> <constant name="AXIS_Z" value="2"> + Enumerated value for the Z axis. </constant> </constants> </class> <class name="Vector3Array" category="Built-In Types"> <brief_description> + An Array of Vector3. </brief_description> <description> + An Array specifically designed to hold Vector3. </description> <methods> <method name="get"> @@ -37950,18 +37968,21 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="idx" type="int"> </argument> <description> + Returns the Vector3 at the given index. </description> </method> <method name="push_back"> <argument index="0" name="vector3" type="Vector3"> </argument> <description> + Inserts a Vector3 at the end. </description> </method> <method name="resize"> <argument index="0" name="idx" type="int"> </argument> <description> + Sets the size of the Vector3Array. If larger than the current size it will reserve some space beforehand, and if it is smaller it will cut off the array. </description> </method> <method name="set"> @@ -37970,12 +37991,14 @@ This method controls whether the position between two cached points is interpola <argument index="1" name="vector3" type="Vector3"> </argument> <description> + Changes the Vector3 at the given index. </description> </method> <method name="size"> <return type="int"> </return> <description> + Returns the size of the array. </description> </method> <method name="Vector3Array"> @@ -37984,6 +38007,7 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="from" type="Array"> </argument> <description> + Constructs a new Vector3Array. Optionally, you can pass in an Array that will be converted. </description> </method> </methods> diff --git a/doc/core_classes.xml b/doc/core_classes.xml index 02b46ac4b9..c37b50f122 100644 --- a/doc/core_classes.xml +++ b/doc/core_classes.xml @@ -575,8 +575,8 @@ 3x3 Matrix. </brief_description> <description> - </description> Matrix represent a 3x3 (3 rows by 3 columns) transformation matrix. it is used mainly to represent and accumulate transformations such as rotation or scale when used as an OCS (oriented coordinate system). + </description> <methods> <method name="invert"> <description> @@ -937,8 +937,8 @@ Vector used for 2D Math. </brief_description> <description> - </description> Vector class, which performs basic 2D vector math operations. + </description> <methods> <method name="operator+"> <argument index="0" name="b" type="Vector2"> diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp index b473e8493f..39b448d6e0 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -4641,6 +4641,9 @@ void RasterizerGLES2::_update_shader( Shader* p_shader) const { if (light_flags.uses_light) { enablers.push_back("#define USE_LIGHT_SHADER_CODE\n"); } + if (light_flags.uses_shadow_color) { + enablers.push_back("#define USE_LIGHT_SHADOW_COLOR\n"); + } if (light_flags.uses_time || fragment_flags.uses_time || vertex_flags.uses_time) { enablers.push_back("#define USE_TIME\n"); uses_time=true; diff --git a/drivers/gles2/shader_compiler_gles2.cpp b/drivers/gles2/shader_compiler_gles2.cpp index c8f59ce22b..f981529ee3 100644 --- a/drivers/gles2/shader_compiler_gles2.cpp +++ b/drivers/gles2/shader_compiler_gles2.cpp @@ -221,6 +221,10 @@ String ShaderCompilerGLES2::dump_node_code(SL::Node *p_node,int p_level,bool p_a uses_light=true; } + if (vnode->name==vname_shadow) { + uses_shadow_color=true; + } + } if (type==ShaderLanguage::SHADER_CANVAS_ITEM_VERTEX) { @@ -783,13 +787,14 @@ ShaderCompilerGLES2::ShaderCompilerGLES2() { replace_table["texscreen"]= "texscreen"; replace_table["texpos"]= "texpos"; - mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["POSITION"] = "gl_Position"; + mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["SRC_VERTEX"] = "vertex_in.xyz"; mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["SRC_NORMAL"] = "normal_in"; mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["SRC_TANGENT"]="tangent_in"; mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["SRC_BINORMALF"]="binormalf"; - + + mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["POSITION"] = "gl_Position"; mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["VERTEX"]="vertex_interp"; mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["NORMAL"]="normal_interp"; mode_replace_table[ShaderLanguage::SHADER_MATERIAL_VERTEX]["TANGENT"]="tangent_interp"; @@ -858,6 +863,7 @@ ShaderCompilerGLES2::ShaderCompilerGLES2() { mode_replace_table[ShaderLanguage::SHADER_MATERIAL_LIGHT]["LIGHT"]="light"; mode_replace_table[ShaderLanguage::SHADER_MATERIAL_LIGHT]["POINT_COORD"]="gl_PointCoord"; mode_replace_table[ShaderLanguage::SHADER_MATERIAL_LIGHT]["TIME"]="time"; + mode_replace_table[ShaderLanguage::SHADER_MATERIAL_LIGHT]["SHADOW"]="shadow_color"; mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_VERTEX]["SRC_VERTEX"]="src_vtx"; mode_replace_table[ShaderLanguage::SHADER_CANVAS_ITEM_VERTEX]["VERTEX"]="outvec.xy"; diff --git a/drivers/gles2/shaders/material.glsl b/drivers/gles2/shaders/material.glsl index 38fb03ab5c..ccd80bf2f0 100644 --- a/drivers/gles2/shaders/material.glsl +++ b/drivers/gles2/shaders/material.glsl @@ -1175,6 +1175,10 @@ FRAGMENT_SHADER_CODE vec3 mdiffuse = diffuse.rgb; vec3 light; +#if defined(USE_LIGHT_SHADOW_COLOR) + vec3 shadow_color=vec3(0.0,0.0,0.0); +#endif + #if defined(USE_LIGHT_SHADER_CODE) //light is written by the light shader { @@ -1195,6 +1199,10 @@ LIGHT_SHADER_CODE #endif diffuse.rgb = const_light_mult * ambient_light *diffuse.rgb + light * attenuation * shadow_attenuation; +#if defined(USE_LIGHT_SHADOW_COLOR) + diffuse.rgb += light * shadow_color * attenuation * (1.0 - shadow_attenuation); +#endif + #ifdef USE_FOG diffuse.rgb = mix(diffuse.rgb,fog_interp.rgb,fog_interp.a); diff --git a/main/main.cpp b/main/main.cpp index e52b87913b..9f551d62be 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -432,7 +432,6 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas } else if (I->get()=="-e" || I->get()=="-editor") { // fonud editor editor=true; - init_maximized=true; } else if (I->get()=="-nowindow") { // fullscreen OS::get_singleton()->set_no_window_mode(true); @@ -649,6 +648,7 @@ Error Main::setup(const char *execpath,int argc, char *argv[],bool p_second_phas if (editor) { main_args.push_back("-editor"); + init_maximized=true; use_custom_res=false; } @@ -1092,7 +1092,7 @@ bool Main::start() { #endif - if(script=="" && game_path=="" && !editor && String(GLOBAL_DEF("application/main_scene",""))!="") { + if(script=="" && game_path=="" && String(GLOBAL_DEF("application/main_scene",""))!="") { game_path=GLOBAL_DEF("application/main_scene",""); } diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp index 0c0f924f52..efda8a66e1 100644 --- a/scene/gui/dialogs.cpp +++ b/scene/gui/dialogs.cpp @@ -308,7 +308,9 @@ void AcceptDialog::_bind_methods() { ADD_SIGNAL( MethodInfo("confirmed") ); ADD_SIGNAL( MethodInfo("custom_action",PropertyInfo(Variant::STRING,"action")) ); - + ADD_PROPERTYNZ( PropertyInfo(Variant::STRING,"dialog/text",PROPERTY_HINT_MULTILINE_TEXT,"",PROPERTY_USAGE_DEFAULT_INTL),_SCS("set_text"),_SCS("get_text")); + ADD_PROPERTY( PropertyInfo(Variant::BOOL, "dialog/hide_on_ok"),_SCS("set_hide_on_ok"),_SCS("get_hide_on_ok") ); + } diff --git a/scene/gui/popup_menu.cpp b/scene/gui/popup_menu.cpp index 99663fb2e2..20f28ecf10 100644 --- a/scene/gui/popup_menu.cpp +++ b/scene/gui/popup_menu.cpp @@ -170,7 +170,14 @@ void PopupMenu::_activate_submenu(int over) { Point2 p = get_global_pos(); Rect2 pr(p,get_size()); Ref<StyleBox> style = get_stylebox("panel"); - pm->set_pos(p+Point2(get_size().width,items[over]._ofs_cache-style->get_offset().y)); + + Point2 pos = p+Point2(get_size().width,items[over]._ofs_cache-style->get_offset().y); + Size2 size = pm->get_size(); + // fix pos + if (pos.x+size.width > get_viewport_rect().size.width) + pos.x=p.x-size.width; + + pm->set_pos(pos); pm->popup(); PopupMenu *pum = pm->cast_to<PopupMenu>(); diff --git a/scene/resources/shader_graph.cpp b/scene/resources/shader_graph.cpp index d5204f45d5..7b67eaeda8 100644 --- a/scene/resources/shader_graph.cpp +++ b/scene/resources/shader_graph.cpp @@ -1435,6 +1435,7 @@ const ShaderGraph::InOutParamInfo ShaderGraph::inout_param_info[]={ {MODE_MATERIAL,SHADER_TYPE_LIGHT,"ShadeParam","SHADE_PARAM","",SLOT_TYPE_SCALAR,SLOT_IN}, //light out {MODE_MATERIAL,SHADER_TYPE_LIGHT,"Light","LIGHT","",SLOT_TYPE_VEC,SLOT_OUT}, + {MODE_MATERIAL,SHADER_TYPE_LIGHT,"Shadow", "SHADOW", "",SLOT_TYPE_VEC, SLOT_OUT }, //canvas item vertex in {MODE_CANVAS_ITEM,SHADER_TYPE_VERTEX,"Vertex","vec3(SRC_VERTEX,0)","",SLOT_TYPE_VEC,SLOT_IN}, {MODE_CANVAS_ITEM,SHADER_TYPE_VERTEX,"UV","SRC_UV","",SLOT_TYPE_VEC,SLOT_IN}, diff --git a/servers/visual/shader_language.cpp b/servers/visual/shader_language.cpp index 6532c3f0ac..6c5f64edd9 100644 --- a/servers/visual/shader_language.cpp +++ b/servers/visual/shader_language.cpp @@ -1113,7 +1113,8 @@ const ShaderLanguage::BuiltinsDef ShaderLanguage::light_builtins_defs[]={ { "SPECULAR_EXP", TYPE_FLOAT}, { "SHADE_PARAM", TYPE_FLOAT}, { "LIGHT", TYPE_VEC3}, - { "POINT_COORD", TYPE_VEC2}, + { "SHADOW", TYPE_VEC3 }, + { "POINT_COORD", TYPE_VEC2 }, // { "SCREEN_POS", TYPE_VEC2}, // { "SCREEN_TEXEL_SIZE", TYPE_VEC2}, { "TIME", TYPE_FLOAT}, diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp index 893df04709..04705017d2 100644 --- a/tools/editor/project_manager.cpp +++ b/tools/editor/project_manager.cpp @@ -624,11 +624,6 @@ void ProjectManager::_open_project_confirm() { args.push_back("-editor"); - const String &selected_main = E->get(); - if (selected_main!="") { - args.push_back(selected_main); - } - String exec = OS::get_singleton()->get_executable_path(); OS::ProcessID pid=0; diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp index 0cafe7459b..8b5bf8c1e1 100644 --- a/tools/editor/scene_tree_dock.cpp +++ b/tools/editor/scene_tree_dock.cpp @@ -1264,7 +1264,10 @@ void SceneTreeDock::import_subscene() { void SceneTreeDock::_import_subscene() { Node* parent = scene_tree->get_selected(); - ERR_FAIL_COND(!parent); + if (!parent) { + parent = editor_data->get_edited_scene_root(); + ERR_FAIL_COND(!parent); + } import_subscene_dialog->move(parent,edited_scene); editor_data->get_undo_redo().clear_history(); //no undo for now.. |