From 2ab83e1abbf5ee6d00e16056a9e9394114026f28 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 7 Jan 2017 18:25:37 -0300 Subject: Memory pool vectors (DVector) have been enormously simplified in code, and renamed to PoolVector --- .../editor/plugins/shader_graph_editor_plugin.cpp | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'tools/editor/plugins/shader_graph_editor_plugin.cpp') diff --git a/tools/editor/plugins/shader_graph_editor_plugin.cpp b/tools/editor/plugins/shader_graph_editor_plugin.cpp index 15906563c..1f319a97c 100644 --- a/tools/editor/plugins/shader_graph_editor_plugin.cpp +++ b/tools/editor/plugins/shader_graph_editor_plugin.cpp @@ -986,13 +986,13 @@ void ShaderGraphView::_color_ramp_changed(int p_id,Node* p_ramp) { Vector offsets=cr->get_offsets(); Vector colors=cr->get_colors(); - DVector new_offsets; - DVector new_colors; + PoolVector new_offsets; + PoolVector new_colors; { new_offsets.resize(offsets.size()); new_colors.resize(colors.size()); - DVector::Write ow=new_offsets.write(); - DVector::Write cw=new_colors.write(); + PoolVector::Write ow=new_offsets.write(); + PoolVector::Write cw=new_colors.write(); for(int i=0;i old_offsets=graph->color_ramp_node_get_offsets(type,p_id); - DVector old_colors=graph->color_ramp_node_get_colors(type,p_id); + PoolVector old_offsets=graph->color_ramp_node_get_offsets(type,p_id); + PoolVector old_colors=graph->color_ramp_node_get_colors(type,p_id); if (old_offsets.size()!=new_offsets.size()) ur->create_action(TTR("Add/Remove to Color Ramp")); @@ -1027,10 +1027,10 @@ void ShaderGraphView::_curve_changed(int p_id,Node* p_curve) { Vector points=cr->get_points(); - DVector new_points; + PoolVector new_points; { new_points.resize(points.size()); - DVector::Write ow=new_points.write(); + PoolVector::Write ow=new_points.write(); for(int i=0;i old_points=graph->curve_map_node_get_points(type,p_id); + PoolVector old_points=graph->curve_map_node_get_points(type,p_id); if (old_points.size()!=new_points.size()) ur->create_action(TTR("Add/Remove to Curve Map")); @@ -2131,14 +2131,14 @@ void ShaderGraphView::_create_node(int p_id) { gn->set_title("ColorRamp"); GraphColorRampEdit * ramp = memnew( GraphColorRampEdit ); - DVector offsets = graph->color_ramp_node_get_offsets(type,p_id); - DVector colors = graph->color_ramp_node_get_colors(type,p_id); + PoolVector offsets = graph->color_ramp_node_get_offsets(type,p_id); + PoolVector colors = graph->color_ramp_node_get_colors(type,p_id); int oc = offsets.size(); if (oc) { - DVector::Read rofs = offsets.read(); - DVector::Read rcol = colors.read(); + PoolVector::Read rofs = offsets.read(); + PoolVector::Read rcol = colors.read(); Vector ofsv; Vector colorv; @@ -2184,12 +2184,12 @@ void ShaderGraphView::_create_node(int p_id) { gn->set_title("CurveMap"); GraphCurveMapEdit * map = memnew( GraphCurveMapEdit ); - DVector points = graph->curve_map_node_get_points(type,p_id); + PoolVector points = graph->curve_map_node_get_points(type,p_id); int oc = points.size(); if (oc) { - DVector::Read rofs = points.read(); + PoolVector::Read rofs = points.read(); Vector ofsv; -- cgit v1.2.3-70-g09d2