summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-12-07 02:04:20 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-12-07 02:04:20 -0300
commitc79be979d47daae613d1b1bbc732a30a74f56543 (patch)
tree9edaf684a8d3ff47b124d03e04c01f927c197255 /tools
parentf7c9a4a0a8ab770dfe565c31c7c47585beb53594 (diff)
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!
Diffstat (limited to 'tools')
-rw-r--r--tools/editor/animation_editor.cpp7
-rw-r--r--tools/editor/editor_node.cpp2
-rw-r--r--tools/editor/plugins/polygon_2d_editor_plugin.cpp9
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/shader_editor_plugin.cpp5
-rw-r--r--tools/export/blender25/io_scene_dae/export_dae.py24
6 files changed, 42 insertions, 7 deletions
diff --git a/tools/editor/animation_editor.cpp b/tools/editor/animation_editor.cpp
index 0d4f5a7b74..a47e878562 100644
--- a/tools/editor/animation_editor.cpp
+++ b/tools/editor/animation_editor.cpp
@@ -2513,6 +2513,7 @@ void AnimationKeyEditor::_query_insert(const InsertData& p_id) {
if (insert_frame!=OS::get_singleton()->get_frames_drawn()) {
+ //clear insert list for the frame if frame changed
if (insert_confirm->is_visible())
return; //do nothing
insert_data.clear();
@@ -2520,6 +2521,12 @@ void AnimationKeyEditor::_query_insert(const InsertData& p_id) {
}
insert_frame=OS::get_singleton()->get_frames_drawn();
+ for (List<InsertData>::Element *E=insert_data.front();E;E=E->next()) {
+ //prevent insertion of multiple tracks
+ if (E->get().path==p_id.path)
+ return; //already inserted a track for this on this frame
+ }
+
insert_data.push_back(p_id);
if (p_id.track_idx==-1) {
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index 5e9cdf78a2..2927e7c870 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -2819,6 +2819,8 @@ void EditorNode::animation_editor_make_visible(bool p_visible) {
//pd_anim->hide();
animation_editor->hide();
// scene_root_parent->set_margin(MARGIN_TOP,0);
+ if (!animation_vb->get_parent_control())
+ return;
animation_vb->get_parent_control()->minimum_size_changed();
top_split->set_collapsed(true);
}
diff --git a/tools/editor/plugins/polygon_2d_editor_plugin.cpp b/tools/editor/plugins/polygon_2d_editor_plugin.cpp
index 7dd8dd3035..27e539d50b 100644
--- a/tools/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -187,6 +187,8 @@ void Polygon2DEditor::_wip_close() {
bool Polygon2DEditor::forward_input_event(const InputEvent& p_event) {
+ if (node==NULL)
+ return false;
switch(p_event.type) {
@@ -701,11 +703,16 @@ void Polygon2DEditor::edit(Node *p_collision_polygon) {
node=p_collision_polygon->cast_to<Polygon2D>();
if (!canvas_item_editor->get_viewport_control()->is_connected("draw",this,"_canvas_draw"))
canvas_item_editor->get_viewport_control()->connect("draw",this,"_canvas_draw");
+ node->connect("exit_tree",this,"_node_removed",varray(),CONNECT_ONESHOT);
wip.clear();
wip_active=false;
edited_point=-1;
} else {
+
+ if (node)
+ node->disconnect("exit_tree",this,"_node_removed");
+
node=NULL;
if (canvas_item_editor->get_viewport_control()->is_connected("draw",this,"_canvas_draw"))
@@ -723,12 +730,14 @@ void Polygon2DEditor::_bind_methods() {
ObjectTypeDB::bind_method(_MD("_uv_draw"),&Polygon2DEditor::_uv_draw);
ObjectTypeDB::bind_method(_MD("_uv_input"),&Polygon2DEditor::_uv_input);
ObjectTypeDB::bind_method(_MD("_uv_scroll_changed"),&Polygon2DEditor::_uv_scroll_changed);
+ ObjectTypeDB::bind_method(_MD("_node_removed"),&Polygon2DEditor::_node_removed);
}
Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
+ node=NULL;
canvas_item_editor=NULL;
editor=p_editor;
undo_redo = editor->get_undo_redo();
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp
index c0d773309c..a5164d971b 100644
--- a/tools/editor/plugins/script_editor_plugin.cpp
+++ b/tools/editor/plugins/script_editor_plugin.cpp
@@ -1443,7 +1443,7 @@ void ScriptEditor::_add_callback(Object *p_obj, const String& p_function, const
int pos = script->get_language()->find_function(p_function,code);
if (pos==-1) {
//does not exist
-
+ ste->get_text_edit()->deselect();
pos=ste->get_text_edit()->get_line_count()+2;
String func = script->get_language()->make_function("",p_function,p_args);
//code=code+func;
diff --git a/tools/editor/plugins/shader_editor_plugin.cpp b/tools/editor/plugins/shader_editor_plugin.cpp
index d9bf4b6fa5..a6172ee098 100644
--- a/tools/editor/plugins/shader_editor_plugin.cpp
+++ b/tools/editor/plugins/shader_editor_plugin.cpp
@@ -144,10 +144,13 @@ void ShaderTextEditor::_validate_script() {
Error err = ShaderLanguage::compile(code,type,NULL,NULL,&errortxt,&line,&col);
if (err!=OK) {
- String error_text="error("+itos(line)+","+itos(col)+"): "+errortxt;
+ String error_text="error("+itos(line+1)+","+itos(col)+"): "+errortxt;
set_error(error_text);
+ get_text_edit()->set_line_as_marked(line,true);
} else {
+ for(int i=0;i<get_text_edit()->get_line_count();i++)
+ get_text_edit()->set_line_as_marked(i,false);
set_error("");
}
diff --git a/tools/export/blender25/io_scene_dae/export_dae.py b/tools/export/blender25/io_scene_dae/export_dae.py
index 8b1d2e296a..c41b60f2e6 100644
--- a/tools/export/blender25/io_scene_dae/export_dae.py
+++ b/tools/export/blender25/io_scene_dae/export_dae.py
@@ -1438,11 +1438,16 @@ class DaeExporter:
return tcn
def export_animations(self):
-
+ tmp_mat = [] # workaround by ndee
+ for s in self.skeletons: # workaround by ndee
+ tmp_bone_mat = [] # workaround by ndee
+ for bone in s.pose.bones: # workaround by ndee
+ tmp_bone_mat.append(Matrix(bone.matrix_basis)) # workaround by ndee
+ tmp_mat.append([Matrix(s.matrix_local),tmp_bone_mat]) # workaround by ndee -> stores skeleton and bone transformations
+
self.writel(S_ANIM,0,'<library_animations>')
-
if (self.config["use_anim_action_all"] and len(self.skeletons)):
cached_actions = {}
@@ -1473,13 +1478,18 @@ class DaeExporter:
bones.append(dp)
allowed_skeletons=[]
- for y in self.skeletons:
+ for i,y in enumerate(self.skeletons): # workaround by ndee
if (y.animation_data):
for z in y.pose.bones:
if (z.bone.name in bones):
if (not y in allowed_skeletons):
allowed_skeletons.append(y)
y.animation_data.action=x;
+
+ y.matrix_local = tmp_mat[i][0] # workaround by ndee -> resets the skeleton transformation.
+ for j,bone in enumerate(s.pose.bones): # workaround by ndee
+ bone.matrix_basis = Matrix() # workaround by ndee -> resets the bone transformations. Important if bones in follwing actions miss keyframes
+
print("allowed skeletons "+str(allowed_skeletons))
@@ -1498,16 +1508,20 @@ class DaeExporter:
self.writel(S_ANIM_CLIPS,0,'</library_animation_clips>')
- for s in self.skeletons:
+ for i,s in enumerate(self.skeletons): # workaround by ndee
if (s.animation_data==None):
continue
if s in cached_actions:
s.animation_data.action = bpy.data.actions[cached_actions[s]]
else:
s.animation_data.action = None
+ for j,bone in enumerate(s.pose.bones): # workaround by ndee
+ bone.matrix_basis = tmp_mat[i][1][j] # workaround by ndee -> resets the bone transformation to what they were before exporting.
else:
self.export_animation(self.scene.frame_start,self.scene.frame_end)
-
+
+
+
self.writel(S_ANIM,0,'</library_animations>')
def export(self):