diff options
-rw-r--r-- | doc/classes/Tween.xml | 2 | ||||
-rw-r--r-- | drivers/windows/dir_access_windows.cpp | 4 | ||||
-rw-r--r-- | editor/editor_file_dialog.cpp | 5 | ||||
-rw-r--r-- | scene/2d/polygon_2d.cpp | 4 | ||||
-rw-r--r-- | scene/animation/animation_player.cpp | 3 | ||||
-rw-r--r-- | servers/visual/visual_server_canvas.cpp | 15 |
6 files changed, 16 insertions, 17 deletions
diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml index c3af586b21..f5f50a75b1 100644 --- a/doc/classes/Tween.xml +++ b/doc/classes/Tween.xml @@ -13,7 +13,7 @@ Tween.TRANS_LINEAR, Tween.EASE_IN_OUT) tween.start() [/codeblock] - Many methods require a property name, such as "position" above. You can find the correct property name by hovering over the property in the Inspector. + Many methods require a property name, such as "position" above. You can find the correct property name by hovering over the property in the Inspector. You can also provide the components of a property directly by using "property:component" (eg. [code]position:x[/code]), where it would only apply to that particular component. Many of the methods accept [code]trans_type[/code] and [code]ease_type[/code]. The first accepts an [enum TransitionType] constant, and refers to the way the timing of the animation is handled (see [code]http://easings.net/[/code] for some examples). The second accepts an [enum EaseType] constant, and controls the where [code]trans_type[/code] is applied to the interpolation (in the beginning, the end, or both). If you don't know which transition and easing to pick, you can try different [enum TransitionType] constants with [code]EASE_IN_OUT[/code], and use the one that looks best. </description> <tutorials> diff --git a/drivers/windows/dir_access_windows.cpp b/drivers/windows/dir_access_windows.cpp index 499bb4f34b..c5f078ccfb 100644 --- a/drivers/windows/dir_access_windows.cpp +++ b/drivers/windows/dir_access_windows.cpp @@ -348,11 +348,11 @@ size_t DirAccessWindows::get_space_left() { String DirAccessWindows::get_filesystem_type() const { String path = fix_path(const_cast<DirAccessWindows *>(this)->get_current_dir()); - print_line("fixed path: " + path); + int unit_end = path.find(":"); ERR_FAIL_COND_V(unit_end == -1, String()); String unit = path.substr(0, unit_end + 1) + "\\"; - print_line("unit: " + unit); + WCHAR szVolumeName[100]; WCHAR szFileSystemName[10]; diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp index 765a330aaf..cdc06503e9 100644 --- a/editor/editor_file_dialog.cpp +++ b/editor/editor_file_dialog.cpp @@ -75,7 +75,7 @@ void EditorFileDialog::_notification(int p_what) { preview_wheel_index++; if (preview_wheel_index >= 8) preview_wheel_index = 0; - Ref<Texture> frame = get_icon("WaitPreview" + itos(preview_wheel_index + 1), "EditorIcons"); + Ref<Texture> frame = get_icon("Progress" + itos(preview_wheel_index + 1), "EditorIcons"); preview->set_texture(frame); preview_wheel_timeout = 0.1; } @@ -323,11 +323,10 @@ void EditorFileDialog::_request_single_thumbnail(const String &p_path) { if (!FileAccess::exists(p_path)) return; - EditorResourcePreview::get_singleton()->queue_resource_preview(p_path, this, "_thumbnail_done", p_path); - set_process(true); preview_waiting = true; preview_wheel_timeout = 0; + EditorResourcePreview::get_singleton()->queue_resource_preview(p_path, this, "_thumbnail_done", p_path); } void EditorFileDialog::_action_pressed() { diff --git a/scene/2d/polygon_2d.cpp b/scene/2d/polygon_2d.cpp index 1c58073f1d..f6f1bad581 100644 --- a/scene/2d/polygon_2d.cpp +++ b/scene/2d/polygon_2d.cpp @@ -307,7 +307,9 @@ void Polygon2D::_notification(int p_what) { if (invert || polygons.size() == 0) { Vector<int> indices = Geometry::triangulate_polygon(points); - VS::get_singleton()->canvas_item_add_triangle_array(get_canvas_item(), indices, points, colors, uvs, bones, weights, texture.is_valid() ? texture->get_rid() : RID()); + if (indices.size()) { + VS::get_singleton()->canvas_item_add_triangle_array(get_canvas_item(), indices, points, colors, uvs, bones, weights, texture.is_valid() ? texture->get_rid() : RID()); + } } else { //draw individual polygons Vector<int> total_indices; diff --git a/scene/animation/animation_player.cpp b/scene/animation/animation_player.cpp index 43ec8cebb0..016db15b73 100644 --- a/scene/animation/animation_player.cpp +++ b/scene/animation/animation_player.cpp @@ -287,7 +287,6 @@ void AnimationPlayer::_ensure_node_caches(AnimationData *p_anim) { // broken track (nonexistent bone) p_anim->node_cache[i]->skeleton = NULL; p_anim->node_cache[i]->spatial = NULL; - printf("bone is %ls\n", String(bone_name).c_str()); ERR_CONTINUE(p_anim->node_cache[i]->bone_idx < 0); } } else { @@ -1133,8 +1132,6 @@ void AnimationPlayer::play_backwards(const StringName &p_name, float p_custom_bl void AnimationPlayer::play(const StringName &p_name, float p_custom_blend, float p_custom_scale, bool p_from_end) { - //printf("animation is %ls\n", String(p_name).c_str()); - //ERR_FAIL_COND(!is_inside_scene()); StringName name = p_name; if (String(name) == "") diff --git a/servers/visual/visual_server_canvas.cpp b/servers/visual/visual_server_canvas.cpp index fb57de5a7b..2b5afb9cdd 100644 --- a/servers/visual/visual_server_canvas.cpp +++ b/servers/visual/visual_server_canvas.cpp @@ -758,11 +758,12 @@ void VisualServerCanvas::canvas_item_add_triangle_array(RID p_item, const Vector Item *canvas_item = canvas_item_owner.getornull(p_item); ERR_FAIL_COND(!canvas_item); - int ps = p_points.size(); - ERR_FAIL_COND(!p_colors.empty() && p_colors.size() != ps && p_colors.size() != 1); - ERR_FAIL_COND(!p_uvs.empty() && p_uvs.size() != ps); - ERR_FAIL_COND(!p_bones.empty() && p_bones.size() != ps * 4); - ERR_FAIL_COND(!p_weights.empty() && p_weights.size() != ps * 4); + int vertex_count = p_points.size(); + ERR_FAIL_COND(vertex_count==0); + ERR_FAIL_COND(!p_colors.empty() && p_colors.size() != vertex_count && p_colors.size() != 1); + ERR_FAIL_COND(!p_uvs.empty() && p_uvs.size() != vertex_count); + ERR_FAIL_COND(!p_bones.empty() && p_bones.size() != vertex_count * 4); + ERR_FAIL_COND(!p_weights.empty() && p_weights.size() != vertex_count * 4); Vector<int> indices = p_indices; @@ -770,9 +771,9 @@ void VisualServerCanvas::canvas_item_add_triangle_array(RID p_item, const Vector if (indices.empty()) { - ERR_FAIL_COND(ps % 3 != 0); + ERR_FAIL_COND(vertex_count % 3 != 0); if (p_count == -1) - count = ps; + count = vertex_count; } else { ERR_FAIL_COND(indices.size() % 3 != 0); |