From 4a7114262343e39235569525b7939896f806b4e6 Mon Sep 17 00:00:00 2001 From: quabug Date: Wed, 3 Dec 2014 12:17:23 +0800 Subject: [PATCH 01/14] Add move_child_notify method in Node class --- scene/main/node.cpp | 6 ++++++ scene/main/node.h | 1 + 2 files changed, 7 insertions(+) diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 292e4d1a7b..4163e6a1b8 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -271,6 +271,7 @@ void Node::move_child(Node *p_child,int p_pos) { data.children[i]->data.pos=i; } // notification second + move_child_notify(p_child); for (int i=0;inotification( NOTIFICATION_MOVED_IN_PARENT ); @@ -310,6 +311,11 @@ void Node::remove_child_notify(Node *p_child) { // to be used when not wanted } +void Node::move_child_notify(Node *p_child) { + + // to be used when not wanted +} + void Node::set_fixed_process(bool p_process) { if (data.fixed_process==p_process) diff --git a/scene/main/node.h b/scene/main/node.h index 9229e2f9bb..371a5325ca 100644 --- a/scene/main/node.h +++ b/scene/main/node.h @@ -142,6 +142,7 @@ protected: virtual void add_child_notify(Node *p_child); virtual void remove_child_notify(Node *p_child); + virtual void move_child_notify(Node *p_child); void remove_and_delete_child(Node *p_child); void _propagate_replace_owner(Node *p_owner,Node* p_by_owner); From 25f8f5339a803d55d448d1760b5e8671e0946509 Mon Sep 17 00:00:00 2001 From: quabug Date: Wed, 3 Dec 2014 13:29:28 +0800 Subject: [PATCH 02/14] use tab instead of space --- scene/main/node.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scene/main/node.cpp b/scene/main/node.cpp index 4163e6a1b8..45a30d7bca 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -271,7 +271,7 @@ void Node::move_child(Node *p_child,int p_pos) { data.children[i]->data.pos=i; } // notification second - move_child_notify(p_child); + move_child_notify(p_child); for (int i=0;inotification( NOTIFICATION_MOVED_IN_PARENT ); From c79be979d47daae613d1b1bbc732a30a74f56543 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sun, 7 Dec 2014 02:04:20 -0300 Subject: [PATCH 03/14] Batch of Bugfixes -=-=-=-=-=-=-=-=- -Fixed Export UV XForm (should work now). #923 -Fixed enforcement of limits in property editor. #919 -Fixed long-standing bug of export editings in script inheritance. #914, #859, #756 -Fixed horrible error reporting in shader language. #912 -Added kinematic collision with plane (please test well). #911 -Fixed double animation track insert when using 2D rigs. #904 -VKey updates offset parameter in sprite edition. #901 -Do not allow anymore a script to preload itself. (does not fix #899, but narrows it down) -Avoid connection editor from overriding selected text. #897 -Fixed timer autostart. #876 -Fixed collision layers in 3D physics. #872 -Improved operators in shader #857 -Fixed ambient lighting bug #834 -Avoid editor from processing gamepad input #813 -Added not keyword #752 Please test! --- demos/3d/truck_town/crane.scn | Bin 23916 -> 24164 bytes doc/base/classes.xml | 201 +++++++++++++----- drivers/gles2/rasterizer_gles2.cpp | 4 +- drivers/gles2/shaders/material.glsl | 2 +- modules/gdscript/gd_editor.cpp | 2 +- modules/gdscript/gd_parser.cpp | 16 +- modules/gdscript/gd_parser.h | 5 +- modules/gdscript/gd_script.cpp | 164 +++++++++++--- modules/gdscript/gd_script.h | 13 +- scene/2d/animated_sprite.cpp | 7 +- scene/2d/area_2d.cpp | 15 ++ scene/2d/area_2d.h | 1 + scene/2d/polygon_2d.cpp | 1 + scene/2d/sprite.cpp | 6 + scene/3d/area.cpp | 18 ++ scene/3d/area.h | 1 + scene/3d/light.cpp | 4 +- scene/3d/sprite_3d.cpp | 10 + scene/3d/visual_instance.cpp | 8 +- scene/gui/tree.cpp | 7 + scene/main/scene_main_loop.cpp | 3 + scene/main/timer.cpp | 3 +- scene/scene_string_names.cpp | 2 + scene/scene_string_names.h | 1 + servers/physics/body_pair_sw.cpp | 2 +- servers/physics/collision_solver_sw.cpp | 44 +++- servers/physics/collision_solver_sw.h | 1 + servers/visual/rasterizer.cpp | 2 +- servers/visual/shader_language.cpp | 16 +- tools/editor/animation_editor.cpp | 7 + tools/editor/editor_node.cpp | 2 + .../plugins/polygon_2d_editor_plugin.cpp | 9 + tools/editor/plugins/script_editor_plugin.cpp | 2 +- tools/editor/plugins/shader_editor_plugin.cpp | 5 +- .../blender25/io_scene_dae/export_dae.py | 24 ++- 35 files changed, 492 insertions(+), 116 deletions(-) diff --git a/demos/3d/truck_town/crane.scn b/demos/3d/truck_town/crane.scn index 080bd8ea172a1f6b657167f4e31f80984a031123..2c4645af69f41aa1026bd27abec1c86f401c1b30 100644 GIT binary patch delta 6543 zcmaE}i}A@GM$e#NXJ-Zw5MW^V@t%R9ik*R>mW6?VpOt~(7#jnFBr5~MaSjHCyX*`M z|5+FqTv-?x^w}5~cCj)rXmTm?bqgv$$Bv znUO(6A^HKEdOdS|YDK|AW(Llb)RM%^ocP?#iU-WP4YdsMiN=Ya54bvRVkmmRtl1#Q z5T78QT$8}bQmmhzlmCz<;~^8j(|(rHviOQLg-47Gf(nZmN|f>$N|jn4Fx+?8{(xPC zDZV5*;qe1T@r0d884uWm9kiVIA25hLWKdxceZZW1K=c8}WmX7GcqgGd$1NIreu~DCvY)lq&lxpyw4h+ zRGOEPqr&cL?Q(=6IK?gbpyEqbD}DX6{2V1E#`t8FVwR#rz4Vj^%&Lx}4XR7i9ONBd zF>opDWXZ`-PRvnoU@~Ah?GT~B@PJvA$&lg011?b}BZhPb6$J(dwgZk##thL;nP6FF z6NY+!IRzmI$CSZY1I9LEFgJp+%^B92z}OZHs^&1ZCByDC5ZiI;ftk#P1`IDAaEmb; zGSuWKXelr}V9{kVVps?gGG_Rn2NhyAVYpwRAPkZgV>V^j-=t6v<(M(d?}15}Gt^Im zu`L+x&VaEk8LVf6+00@rMg|OqdqEr*VGgJKir|dIf>Z|g^UnL-Pjmn16SLptu*t48 zy5HW}j={}!A**jc2odXYuGZ;T$5_b+hAkJX= zfJvOeOo97=xO3tGcLoa(*Am2Kuu|YYpwD2fzNdQZMIy-AW3c}1_lN;1_p+Tef9PVYzYhxq`6rb7#j97JYZmWAj-}5uIB%~ zr3JAG@eicA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w(w4t@^K4)+cSKTz;jU||20aKi4z9Ys4wEeD1Mc18uK26n~< zdxvm`cy~wE;N+srg2|;phWt#kW=bZoEBG=vI*2nfFihSY6fD2z0dug!>Idq<57?JG z?gnwTI}|$zI~;dlKXBM>=491i55{Ga^Ma*0v>Q|;b<%aBCr=Ds9?0BrNYM5HbNB;s z{sYHdUOLz_GB7-pWoOe_Vz>QQN@BhO zJA=IgKd3p(K56L`yDd392OeCX1&N}QcljOYUvcLx3k>h9doSc%T8J0PK8?Qore zTY>$7@_F_nGsNr{Oq^%y$UnI<)PbE@fPsPGfcND6q2f$V`IB#is&P2pb>L=TR^XY; z5@yK9z@@)k7 zuJZzBhW`o-3~UPAlh;NX3NR)xGHbau)b_Zs~TMYl5x}9!6X5Y@>sGxl4Hbb%kH-nP`Gee33vqL*Wssg)lrYzB8;1@Q;!*$i0<#vr-L z^P|Oho%0`vUuVcx&ryzbH z`?2tMH+d&<*Zoh~FEj8fI6G-OBs;J(2rl4f5K>@weePQ9*zCaI8tlNpAg;i|Af~{q zFpJ^8YyJc7*>2JYX1j{JTDzJ%fT}%fH)H2uhkS;583lfad9T;4k4|F>?J9InDcSv`*eW2N4xtq4bVFzgkdxz=Iti>Hy zJ1RTecN2H}|BPAOq1b`JVLF4M0*9j6LjiMl;{%%=<~yu*2zN++Xl?HH-+{r={6P0X zbH{pze8>9!1I-VU%{|l~@|!alDQp32@rXXK`608p!}*8S<{s)W^-l90(w)|Wm3#U> z + + + + + + @@ -3418,6 +3424,12 @@ + + + + + + @@ -4828,6 +4840,10 @@ + + + + @@ -11647,6 +11663,14 @@ + + + + + + + + @@ -15474,14 +15498,12 @@ Finally, when a node is freed, it will free all its children nodes too. - + - Called when entered the scene. - + - Called when being removed from the scene. @@ -15634,11 +15656,10 @@ - + - Return wether the node is inside a scene tree (a tree where the topmost node is a [RootNode]) @@ -15882,11 +15903,10 @@ - - + + - Get the current SceneMainLoop. Only returned if the node is inside the scene, else returns null. @@ -15917,28 +15937,24 @@ - - - Emitted when the node enters the scene. - - Emitted when the node is renamed. - + + + + + - Emitted when the node exits the scene. - - Notification received when the node enters the Scene Tree and gains access to the [RootNode]. Note that children nodes will not have received the notification at that time yet. + - - Notification received when the node exits the Scene Tree and loses access to the [RootNode]. Note that parent nodes will not have received the notification at that time yet. + @@ -16554,6 +16570,10 @@ + + + + @@ -17334,7 +17354,7 @@ - + @@ -17368,6 +17388,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Provides an opaque background for [Control] children. @@ -18039,6 +18123,30 @@ + + + + + + + + + + + + + + + + + + + + + + + + @@ -18173,7 +18281,7 @@ - + @@ -19534,7 +19642,7 @@ - + @@ -20994,7 +21102,7 @@ - + @@ -24091,6 +24199,12 @@ + + + + + + @@ -24364,6 +24478,12 @@ Return true if the body has the ability to fall asleep when not moving. See [set_can_sleep]. + + + + + + @@ -25275,13 +25395,10 @@ - + - Scene-Based implementation of the MainLoop. - Scene implementation of the MainLoop. All scenes edited using the editor are loaded with this main loop, which provides the base for the scene system.[br] - All group operations (get nodes, call, etc) is performed here. All nodes in a group can be called a specific functions, set a property or notified. This happens in scene-order. @@ -25292,7 +25409,6 @@ - Call a notification in all the nodes belonging to a given group. See GROUP_CALL_* enum for options. @@ -25305,7 +25421,6 @@ - Set a property in all the nodes belonging to a given group. See GROUP_CALL_* enum for options. @@ -25314,7 +25429,6 @@ - Get all the nods belonging to a given group. @@ -25327,21 +25441,18 @@ - Set to true if the application will quit automatically when quit is requested (Alt-f4 or ctrl-c). - Set to true to tell nodes and the scene that it is being edited. This is used by editors, not release. - Return true if the scene is being run inside an editor. @@ -25360,19 +25471,16 @@ - Set pause. The built-in pause system is very basic and only meant to avoid processing nodes not allowed to work in pause mode. - Return true if the scene is paused. - Handle a current input event (avoid further processing of it). @@ -25385,12 +25493,10 @@ - Return the frame index (how many frames were drawn). - Quit the application. @@ -25407,7 +25513,6 @@ - Queue an object for deletion next time the loop goes idle. @@ -25428,41 +25533,33 @@ - Call a function for all the nodes in a given group. - Emitted when the screen changes size. - Emitted when a node is removed from the scene. - Emitted when the scene tree changed (nodes added/removed/moved/etc) - Regular group call flag (no flags). - Call a group in inverse-scene order. - Call a group immediately (usually calls are delivered on idle). - Call a group only once, even if call is performed many times. @@ -32543,7 +32640,7 @@ - + @@ -32601,6 +32698,12 @@ + + + + + + diff --git a/drivers/gles2/rasterizer_gles2.cpp b/drivers/gles2/rasterizer_gles2.cpp index 057de329df..9f2fd032fa 100644 --- a/drivers/gles2/rasterizer_gles2.cpp +++ b/drivers/gles2/rasterizer_gles2.cpp @@ -4648,7 +4648,8 @@ void RasterizerGLES2::_add_geometry( const Geometry* p_geometry, const InstanceD if (m->flags[VS::MATERIAL_FLAG_INVERT_FACES]) e->mirror=!e->mirror; - e->light_type=0xFF; // no lights! + //e->light_type=0xFF; // no lights! + e->light_type=3; //light type 3 is no light? e->light=0xFFFF; if (!shadow && !has_blend_alpha && has_alpha && m->depth_draw_mode==VS::MATERIAL_DEPTH_DRAW_OPAQUE_PRE_PASS_ALPHA) { @@ -9122,6 +9123,7 @@ void RasterizerGLES2::init() { use_anisotropic_filter=true; float_linear_supported=true; float_supported=true; + use_rgba_shadowmaps=false; glGetFloatv(GL_MAX_TEXTURE_MAX_ANISOTROPY_EXT,&anisotropic_level); anisotropic_level=MIN(anisotropic_level,float(GLOBAL_DEF("rasterizer/anisotropic_filter_level",4.0))); diff --git a/drivers/gles2/shaders/material.glsl b/drivers/gles2/shaders/material.glsl index 7d9aca4b4d..f2d9eaf1e5 100644 --- a/drivers/gles2/shaders/material.glsl +++ b/drivers/gles2/shaders/material.glsl @@ -1214,7 +1214,7 @@ LIGHT_SHADER_CODE # if !defined(LIGHT_TYPE_DIRECTIONAL) && !defined(LIGHT_TYPE_OMNI) && !defined (LIGHT_TYPE_SPOT) //none #ifndef SHADELESS - diffuse.rgb=vec3(0.0,0.0,0.0); + diffuse.rgb=ambient_light *diffuse.rgb; #endif # endif diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp index b1db087fb3..95bae2d32a 100644 --- a/modules/gdscript/gd_editor.cpp +++ b/modules/gdscript/gd_editor.cpp @@ -66,7 +66,7 @@ bool GDScriptLanguage::validate(const String& p_script, int &r_line_error,int &r GDParser parser; - Error err = parser.parse(p_script,p_path.get_base_dir(),true); + Error err = parser.parse(p_script,p_path.get_base_dir(),true,p_path); if (err) { r_line_error=parser.get_error_line(); r_col_error=parser.get_error_column(); diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp index de2b5219a9..904b6ba52f 100644 --- a/modules/gdscript/gd_parser.cpp +++ b/modules/gdscript/gd_parser.cpp @@ -225,7 +225,14 @@ GDParser::Node* GDParser::_parse_expression(Node *p_parent,bool p_static,bool p_ String path = tokenizer->get_token_constant(); if (!path.is_abs_path() && base_path!="") path=base_path+"/"+path; - path = path.replace("///","//"); + path = path.replace("///","//").simplify_path(); + if (path==self_path) { + + _set_error("Can't preload itself (use 'get_script()')."); + return NULL; + + } + Ref res; if (!validating) { @@ -2616,8 +2623,9 @@ Error GDParser::_parse(const String& p_base_path) { return OK; } -Error GDParser::parse_bytecode(const Vector &p_bytecode,const String& p_base_path) { +Error GDParser::parse_bytecode(const Vector &p_bytecode,const String& p_base_path, const String &p_self_path) { + self_path=p_self_path; GDTokenizerBuffer *tb = memnew( GDTokenizerBuffer ); tb->set_code_buffer(p_bytecode); tokenizer=tb; @@ -2628,9 +2636,9 @@ Error GDParser::parse_bytecode(const Vector &p_bytecode,const String& p } -Error GDParser::parse(const String& p_code,const String& p_base_path,bool p_just_validate) { - +Error GDParser::parse(const String& p_code, const String& p_base_path, bool p_just_validate, const String &p_self_path) { + self_path=p_self_path; GDTokenizerText *tt = memnew( GDTokenizerText ); tt->set_code(p_code); diff --git a/modules/gdscript/gd_parser.h b/modules/gdscript/gd_parser.h index 5fac34396c..3f82cafc61 100644 --- a/modules/gdscript/gd_parser.h +++ b/modules/gdscript/gd_parser.h @@ -373,6 +373,7 @@ private: List tab_level; String base_path; + String self_path; PropertyInfo current_export; @@ -398,8 +399,8 @@ public: String get_error() const; int get_error_line() const; int get_error_column() const; - Error parse(const String& p_code, const String& p_base_path="", bool p_just_validate=false); - Error parse_bytecode(const Vector &p_bytecode,const String& p_base_path=""); + Error parse(const String& p_code, const String& p_base_path="", bool p_just_validate=false,const String& p_self_path=""); + Error parse_bytecode(const Vector &p_bytecode,const String& p_base_path="",const String& p_self_path=""); const Node *get_parse_tree() const; diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp index 7085ae6a56..b19168f536 100644 --- a/modules/gdscript/gd_script.cpp +++ b/modules/gdscript/gd_script.cpp @@ -1523,6 +1523,7 @@ void GDScript::_placeholder_erased(PlaceHolderScriptInstance *p_placeholder) { placeholders.erase(p_placeholder); } +/* void GDScript::_update_placeholder(PlaceHolderScriptInstance *p_placeholder) { @@ -1563,7 +1564,7 @@ void GDScript::_update_placeholder(PlaceHolderScriptInstance *p_placeholder) { p_placeholder->update(plist,default_values); -} +}*/ #endif ScriptInstance* GDScript::instance_create(Object *p_this) { @@ -1582,7 +1583,8 @@ ScriptInstance* GDScript::instance_create(Object *p_this) { }*/ PlaceHolderScriptInstance *si = memnew( PlaceHolderScriptInstance(GDScriptLanguage::get_singleton(),Ref