summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2017-01-07 18:25:37 -0300
committerJuan Linietsky <reduzio@gmail.com>2017-01-07 18:26:38 -0300
commit2ab83e1abbf5ee6d00e16056a9e9394114026f28 (patch)
tree7efbb375cc4d00d8e8589fcf1b6a1303bec5df2d /tools
parent2a38a5eaa844043b846e03d6655f84caf8a31e74 (diff)
Memory pool vectors (DVector) have been enormously simplified in code, and renamed to PoolVector
Diffstat (limited to 'tools')
-rw-r--r--tools/editor/editor_file_dialog.cpp2
-rw-r--r--tools/editor/editor_import_export.cpp8
-rw-r--r--tools/editor/editor_import_export.h4
-rw-r--r--tools/editor/editor_profiler.cpp4
-rw-r--r--tools/editor/editor_profiler.h2
-rw-r--r--tools/editor/io_plugins/editor_font_import_plugin.cpp10
-rw-r--r--tools/editor/io_plugins/editor_import_collada.cpp104
-rw-r--r--tools/editor/io_plugins/editor_sample_import_plugin.cpp22
-rw-r--r--tools/editor/io_plugins/editor_sample_import_plugin.h2
-rw-r--r--tools/editor/io_plugins/editor_scene_import_plugin.cpp4
-rw-r--r--tools/editor/io_plugins/editor_scene_importer_fbxconv.cpp32
-rw-r--r--tools/editor/io_plugins/editor_texture_import_plugin.cpp4
-rw-r--r--tools/editor/plugins/baked_light_baker.cpp40
-rw-r--r--tools/editor/plugins/baked_light_baker.h4
-rw-r--r--tools/editor/plugins/baked_light_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/baked_light_editor_plugin.h6
-rw-r--r--tools/editor/plugins/canvas_item_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/collision_polygon_editor_plugin.cpp4
-rw-r--r--tools/editor/plugins/color_ramp_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/editor_preview_plugins.cpp26
-rw-r--r--tools/editor/plugins/material_editor_plugin.cpp18
-rw-r--r--tools/editor/plugins/multimesh_editor_plugin.cpp10
-rw-r--r--tools/editor/plugins/navigation_polygon_editor_plugin.cpp18
-rw-r--r--tools/editor/plugins/navigation_polygon_editor_plugin.h2
-rw-r--r--tools/editor/plugins/particles_2d_editor_plugin.cpp12
-rw-r--r--tools/editor/plugins/particles_editor_plugin.cpp8
-rw-r--r--tools/editor/plugins/particles_editor_plugin.h2
-rw-r--r--tools/editor/plugins/polygon_2d_editor_plugin.cpp26
-rw-r--r--tools/editor/plugins/polygon_2d_editor_plugin.h2
-rw-r--r--tools/editor/plugins/sample_editor_plugin.cpp10
-rw-r--r--tools/editor/plugins/sample_library_editor_plugin.cpp4
-rw-r--r--tools/editor/plugins/sample_library_editor_plugin.h2
-rw-r--r--tools/editor/plugins/shader_graph_editor_plugin.cpp30
-rw-r--r--tools/editor/plugins/spatial_editor_plugin.cpp10
-rw-r--r--tools/editor/plugins/sprite_frames_editor_plugin.cpp4
-rw-r--r--tools/editor/plugins/sprite_frames_editor_plugin.h2
-rw-r--r--tools/editor/plugins/tile_map_editor_plugin.cpp24
-rw-r--r--tools/editor/plugins/tile_map_editor_plugin.h8
-rw-r--r--tools/editor/project_export.cpp4
-rw-r--r--tools/editor/spatial_editor_gizmos.cpp32
40 files changed, 256 insertions, 256 deletions
diff --git a/tools/editor/editor_file_dialog.cpp b/tools/editor/editor_file_dialog.cpp
index dfdd14673c..07cb72a6b0 100644
--- a/tools/editor/editor_file_dialog.cpp
+++ b/tools/editor/editor_file_dialog.cpp
@@ -313,7 +313,7 @@ void EditorFileDialog::_action_pressed() {
String fbase=dir_access->get_current_dir();
- DVector<String> files;
+ PoolVector<String> files;
for(int i=0;i<item_list->get_item_count();i++) {
if (item_list->is_selected(i))
files.push_back( fbase.plus_file(item_list->get_item_text(i) ));
diff --git a/tools/editor/editor_import_export.cpp b/tools/editor/editor_import_export.cpp
index 1245efafa1..c1be2cd940 100644
--- a/tools/editor/editor_import_export.cpp
+++ b/tools/editor/editor_import_export.cpp
@@ -2174,9 +2174,9 @@ bool EditorImportExport::sample_get_trim() const{
return sample_action_trim;
}
-DVector<String> EditorImportExport::_get_export_file_list() {
+PoolVector<String> EditorImportExport::_get_export_file_list() {
- DVector<String> fl;
+ PoolVector<String> fl;
for (Map<StringName,FileAction>::Element *E=files.front();E;E=E->next()) {
fl.push_back(E->key());
@@ -2185,9 +2185,9 @@ DVector<String> EditorImportExport::_get_export_file_list() {
return fl;
}
-DVector<String> EditorImportExport::_get_export_platforms() {
+PoolVector<String> EditorImportExport::_get_export_platforms() {
- DVector<String> ep;
+ PoolVector<String> ep;
for (Map<StringName,Ref<EditorExportPlatform> >::Element *E=exporters.front();E;E=E->next()) {
ep.push_back(E->key());
diff --git a/tools/editor/editor_import_export.h b/tools/editor/editor_import_export.h
index 9109e9ae9f..fb75373f17 100644
--- a/tools/editor/editor_import_export.h
+++ b/tools/editor/editor_import_export.h
@@ -321,8 +321,8 @@ protected:
static EditorImportExport* singleton;
- DVector<String> _get_export_file_list();
- DVector<String> _get_export_platforms();
+ PoolVector<String> _get_export_file_list();
+ PoolVector<String> _get_export_platforms();
static void _bind_methods();
public:
diff --git a/tools/editor/editor_profiler.cpp b/tools/editor/editor_profiler.cpp
index 5c7b7407b4..5a6de2fa1a 100644
--- a/tools/editor/editor_profiler.cpp
+++ b/tools/editor/editor_profiler.cpp
@@ -154,7 +154,7 @@ void EditorProfiler::_update_plot() {
}
- DVector<uint8_t>::Write wr = graph_image.write();
+ PoolVector<uint8_t>::Write wr = graph_image.write();
@@ -336,7 +336,7 @@ void EditorProfiler::_update_plot() {
}
- wr = DVector<uint8_t>::Write();
+ wr = PoolVector<uint8_t>::Write();
Image img(w,h,0,Image::FORMAT_RGBA8,graph_image);
diff --git a/tools/editor/editor_profiler.h b/tools/editor/editor_profiler.h
index 4e18f2e29a..233bc2e0fd 100644
--- a/tools/editor/editor_profiler.h
+++ b/tools/editor/editor_profiler.h
@@ -73,7 +73,7 @@ private:
Button *activate;
TextureFrame *graph;
Ref<ImageTexture> graph_texture;
- DVector<uint8_t> graph_image;
+ PoolVector<uint8_t> graph_image;
Tree *variables;
HSplitContainer *h_split;
diff --git a/tools/editor/io_plugins/editor_font_import_plugin.cpp b/tools/editor/io_plugins/editor_font_import_plugin.cpp
index 2bc29039ea..861af59455 100644
--- a/tools/editor/io_plugins/editor_font_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_font_import_plugin.cpp
@@ -1380,10 +1380,10 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe
int ow=font_data_list[i]->width;
int oh=font_data_list[i]->height;
- DVector<uint8_t> pixels;
+ PoolVector<uint8_t> pixels;
pixels.resize(s.x*s.y*4);
- DVector<uint8_t>::Write w = pixels.write();
+ PoolVector<uint8_t>::Write w = pixels.write();
//print_line("val: "+itos(font_data_list[i]->valign));
for(int y=0;y<s.height;y++) {
@@ -1512,7 +1512,7 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe
}
- w=DVector<uint8_t>::Write();
+ w=PoolVector<uint8_t>::Write();
Image img(s.width,s.height,0,Image::FORMAT_RGBA8,pixels);
@@ -1552,10 +1552,10 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe
if (from->has_option("advanced/premultiply_alpha") && bool(from->get_option("advanced/premultiply_alpha"))) {
- DVector<uint8_t> data = atlas.get_data();
+ PoolVector<uint8_t> data = atlas.get_data();
int dl = data.size();
{
- DVector<uint8_t>::Write w = data.write();
+ PoolVector<uint8_t>::Write w = data.write();
for(int i=0;i<dl;i+=4) {
diff --git a/tools/editor/io_plugins/editor_import_collada.cpp b/tools/editor/io_plugins/editor_import_collada.cpp
index c1830bf118..5720e15caa 100644
--- a/tools/editor/io_plugins/editor_import_collada.cpp
+++ b/tools/editor/io_plugins/editor_import_collada.cpp
@@ -485,15 +485,15 @@ Error ColladaImport::_create_material(const String& p_target) {
}
-static void _generate_normals(const DVector<int>& p_indices,const DVector<Vector3>& p_vertices,DVector<Vector3>&r_normals) {
+static void _generate_normals(const PoolVector<int>& p_indices,const PoolVector<Vector3>& p_vertices,PoolVector<Vector3>&r_normals) {
r_normals.resize(p_vertices.size());
- DVector<Vector3>::Write narrayw = r_normals.write();
+ PoolVector<Vector3>::Write narrayw = r_normals.write();
int iacount=p_indices.size()/3;
- DVector<int>::Read index_arrayr = p_indices.read();
- DVector<Vector3>::Read vertex_arrayr = p_vertices.read();
+ PoolVector<int>::Read index_arrayr = p_indices.read();
+ PoolVector<Vector3>::Read vertex_arrayr = p_vertices.read();
for(int idx=0;idx<iacount;idx++) {
@@ -519,7 +519,7 @@ static void _generate_normals(const DVector<int>& p_indices,const DVector<Vector
}
-static void _generate_tangents_and_binormals(const DVector<int>& p_indices,const DVector<Vector3>& p_vertices,const DVector<Vector3>& p_uvs,const DVector<Vector3>& p_normals,DVector<real_t>&r_tangents) {
+static void _generate_tangents_and_binormals(const PoolVector<int>& p_indices,const PoolVector<Vector3>& p_vertices,const PoolVector<Vector3>& p_uvs,const PoolVector<Vector3>& p_normals,PoolVector<real_t>&r_tangents) {
int vlen=p_vertices.size();
@@ -531,10 +531,10 @@ static void _generate_tangents_and_binormals(const DVector<int>& p_indices,const
int iacount=p_indices.size()/3;
- DVector<int>::Read index_arrayr = p_indices.read();
- DVector<Vector3>::Read vertex_arrayr = p_vertices.read();
- DVector<Vector3>::Read narrayr = p_normals.read();
- DVector<Vector3>::Read uvarrayr = p_uvs.read();
+ PoolVector<int>::Read index_arrayr = p_indices.read();
+ PoolVector<Vector3>::Read vertex_arrayr = p_vertices.read();
+ PoolVector<Vector3>::Read narrayr = p_normals.read();
+ PoolVector<Vector3>::Read uvarrayr = p_uvs.read();
for(int idx=0;idx<iacount;idx++) {
@@ -588,7 +588,7 @@ static void _generate_tangents_and_binormals(const DVector<int>& p_indices,const
}
r_tangents.resize(vlen*4);
- DVector<real_t>::Write tarrayw = r_tangents.write();
+ PoolVector<real_t>::Write tarrayw = r_tangents.write();
for(int idx=0;idx<vlen;idx++) {
Vector3 tangent = tangents[idx];
@@ -1031,9 +1031,9 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,con
}
- DVector<int> index_array;
+ PoolVector<int> index_array;
index_array.resize(indices_list.size());
- DVector<int>::Write index_arrayw = index_array.write();
+ PoolVector<int>::Write index_arrayw = index_array.write();
int iidx=0;
for(List<int>::Element *F=indices_list.front();F;F=F->next()) {
@@ -1041,7 +1041,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,con
index_arrayw[iidx++]=F->get();
}
- index_arrayw=DVector<int>::Write();
+ index_arrayw=PoolVector<int>::Write();
/*****************/
@@ -1075,14 +1075,14 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,con
- DVector<Vector3> final_vertex_array;
- DVector<Vector3> final_normal_array;
- DVector<float> final_tangent_array;
- DVector<Color> final_color_array;
- DVector<Vector3> final_uv_array;
- DVector<Vector3> final_uv2_array;
- DVector<int> final_bone_array;
- DVector<float> final_weight_array;
+ PoolVector<Vector3> final_vertex_array;
+ PoolVector<Vector3> final_normal_array;
+ PoolVector<float> final_tangent_array;
+ PoolVector<Color> final_color_array;
+ PoolVector<Vector3> final_uv_array;
+ PoolVector<Vector3> final_uv2_array;
+ PoolVector<int> final_bone_array;
+ PoolVector<float> final_weight_array;
uint32_t final_format=0;
@@ -1117,61 +1117,61 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,con
int vlen = vertex_array.size();
{ //vertices
- DVector<Vector3> varray;
+ PoolVector<Vector3> varray;
varray.resize(vertex_array.size());
- DVector<Vector3>::Write varrayw = varray.write();
+ PoolVector<Vector3>::Write varrayw = varray.write();
for(int k=0;k<vlen;k++)
varrayw[k]=vertex_array[k].vertex;
- varrayw = DVector<Vector3>::Write();
+ varrayw = PoolVector<Vector3>::Write();
final_vertex_array=varray;
}
if (uv_src) { //compute uv first, may be needed for computing tangent/bionrmal
- DVector<Vector3> uvarray;
+ PoolVector<Vector3> uvarray;
uvarray.resize(vertex_array.size());
- DVector<Vector3>::Write uvarrayw = uvarray.write();
+ PoolVector<Vector3>::Write uvarrayw = uvarray.write();
for(int k=0;k<vlen;k++) {
uvarrayw[k]=vertex_array[k].uv;
}
- uvarrayw = DVector<Vector3>::Write();
+ uvarrayw = PoolVector<Vector3>::Write();
final_uv_array=uvarray;
}
if (uv2_src) { //compute uv first, may be needed for computing tangent/bionrmal
- DVector<Vector3> uv2array;
+ PoolVector<Vector3> uv2array;
uv2array.resize(vertex_array.size());
- DVector<Vector3>::Write uv2arrayw = uv2array.write();
+ PoolVector<Vector3>::Write uv2arrayw = uv2array.write();
for(int k=0;k<vlen;k++) {
uv2arrayw[k]=vertex_array[k].uv2;
}
- uv2arrayw = DVector<Vector3>::Write();
+ uv2arrayw = PoolVector<Vector3>::Write();
final_uv2_array=uv2array;
}
if (normal_src) {
- DVector<Vector3> narray;
+ PoolVector<Vector3> narray;
narray.resize(vertex_array.size());
- DVector<Vector3>::Write narrayw = narray.write();
+ PoolVector<Vector3>::Write narrayw = narray.write();
for(int k=0;k<vlen;k++) {
narrayw[k]=vertex_array[k].normal;
}
- narrayw = DVector<Vector3>::Write();
+ narrayw = PoolVector<Vector3>::Write();
final_normal_array=narray;
- //DVector<Vector3> altnaray;
+ //PoolVector<Vector3> altnaray;
//_generate_normals(index_array,final_vertex_array,altnaray);
//for(int i=0;i<altnaray.size();i++)
@@ -1189,9 +1189,9 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,con
if (final_normal_array.size() && uv_src && binormal_src && tangent_src && !force_make_tangents) {
- DVector<real_t> tarray;
+ PoolVector<real_t> tarray;
tarray.resize(vertex_array.size()*4);
- DVector<real_t>::Write tarrayw = tarray.write();
+ PoolVector<real_t>::Write tarrayw = tarray.write();
for(int k=0;k<vlen;k++) {
@@ -1202,7 +1202,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,con
}
- tarrayw = DVector<real_t>::Write();
+ tarrayw = PoolVector<real_t>::Write();
final_tangent_array=tarray;
} else if (final_normal_array.size() && primitive==Mesh::PRIMITIVE_TRIANGLES && final_uv_array.size() && (force_make_tangents || (material.is_valid()))){
@@ -1217,27 +1217,27 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,con
if (color_src) {
- DVector<Color> colorarray;
+ PoolVector<Color> colorarray;
colorarray.resize(vertex_array.size());
- DVector<Color>::Write colorarrayw = colorarray.write();
+ PoolVector<Color>::Write colorarrayw = colorarray.write();
for(int k=0;k<vlen;k++) {
colorarrayw[k]=vertex_array[k].color;
}
- colorarrayw = DVector<Color>::Write();
+ colorarrayw = PoolVector<Color>::Write();
final_color_array=colorarray;
}
if (has_weights) {
- DVector<float> weightarray;
- DVector<int> bonearray;
+ PoolVector<float> weightarray;
+ PoolVector<int> bonearray;
weightarray.resize(vertex_array.size()*4);
- DVector<float>::Write weightarrayw = weightarray.write();
+ PoolVector<float>::Write weightarrayw = weightarray.write();
bonearray.resize(vertex_array.size()*4);
- DVector<int>::Write bonearrayw = bonearray.write();
+ PoolVector<int>::Write bonearrayw = bonearray.write();
for(int k=0;k<vlen;k++) {
float sum=0;
@@ -1262,8 +1262,8 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,con
}
- weightarrayw = DVector<float>::Write();
- bonearrayw = DVector<int>::Write();
+ weightarrayw = PoolVector<float>::Write();
+ bonearrayw = PoolVector<int>::Write();
final_weight_array = weightarray;
final_bone_array = bonearray;
@@ -1326,7 +1326,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,con
// morph anything but "POSITIONS" seem to exit. Because of this, normals and binormals/tangents have to be regenerated here,
// which may result in inaccurate (but most of the time good enough) results.
- DVector<Vector3> vertices;
+ PoolVector<Vector3> vertices;
vertices.resize(vlen);
ERR_FAIL_COND_V( md.vertices.size() != 1, ERR_INVALID_DATA);
@@ -1345,7 +1345,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,con
//read vertices from morph target
- DVector<Vector3>::Write vertw = vertices.write();
+ PoolVector<Vector3>::Write vertw = vertices.write();
for(int m_i=0;m_i<m->array.size()/stride;m_i++) {
@@ -1381,9 +1381,9 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,con
//vertices are in place, now generate everything else
- vertw = DVector<Vector3>::Write();
- DVector<Vector3> normals;
- DVector<float> tangents;
+ vertw = PoolVector<Vector3>::Write();
+ PoolVector<Vector3> normals;
+ PoolVector<float> tangents;
print_line("vertex source id: "+vertex_src_id);
if(md.vertices[vertex_src_id].sources.has("NORMAL")){
//has normals
@@ -1402,7 +1402,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,con
//read normals from morph target
- DVector<Vector3>::Write vertw = normals.write();
+ PoolVector<Vector3>::Write vertw = normals.write();
for(int m_i=0;m_i<m->array.size()/stride;m_i++) {
diff --git a/tools/editor/io_plugins/editor_sample_import_plugin.cpp b/tools/editor/io_plugins/editor_sample_import_plugin.cpp
index b776fdeec0..db405b1cd7 100644
--- a/tools/editor/io_plugins/editor_sample_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_sample_import_plugin.cpp
@@ -443,8 +443,8 @@ Error EditorSampleImportPlugin::import(const String& p_path, const Ref<ResourceI
data.resize(len*chans);
{
- DVector<uint8_t> src_data = smp->get_data();
- DVector<uint8_t>::Read sr = src_data.read();
+ PoolVector<uint8_t> src_data = smp->get_data();
+ PoolVector<uint8_t>::Read sr = src_data.read();
for(int i=0;i<len*chans;i++) {
@@ -602,7 +602,7 @@ Error EditorSampleImportPlugin::import(const String& p_path, const Ref<ResourceI
}
- DVector<uint8_t> dst_data;
+ PoolVector<uint8_t> dst_data;
Sample::Format dst_format;
if ( compression == _EditorSampleImportOptions::COMPRESS_MODE_RAM) {
@@ -629,8 +629,8 @@ Error EditorSampleImportPlugin::import(const String& p_path, const Ref<ResourceI
right[i]=data[i*2+1];
}
- DVector<uint8_t> bleft;
- DVector<uint8_t> bright;
+ PoolVector<uint8_t> bleft;
+ PoolVector<uint8_t> bright;
_compress_ima_adpcm(left,bleft);
_compress_ima_adpcm(right,bright);
@@ -638,9 +638,9 @@ Error EditorSampleImportPlugin::import(const String& p_path, const Ref<ResourceI
int dl = bleft.size();
dst_data.resize( dl *2 );
- DVector<uint8_t>::Write w=dst_data.write();
- DVector<uint8_t>::Read rl=bleft.read();
- DVector<uint8_t>::Read rr=bright.read();
+ PoolVector<uint8_t>::Write w=dst_data.write();
+ PoolVector<uint8_t>::Read rl=bleft.read();
+ PoolVector<uint8_t>::Read rr=bright.read();
for(int i=0;i<dl;i++) {
w[i*2+0]=rl[i];
@@ -655,7 +655,7 @@ Error EditorSampleImportPlugin::import(const String& p_path, const Ref<ResourceI
dst_format=is16?Sample::FORMAT_PCM16:Sample::FORMAT_PCM8;
dst_data.resize( data.size() * (is16?2:1));
{
- DVector<uint8_t>::Write w = dst_data.write();
+ PoolVector<uint8_t>::Write w = dst_data.write();
int ds=data.size();
for(int i=0;i<ds;i++) {
@@ -700,7 +700,7 @@ Error EditorSampleImportPlugin::import(const String& p_path, const Ref<ResourceI
}
-void EditorSampleImportPlugin::_compress_ima_adpcm(const Vector<float>& p_data,DVector<uint8_t>& dst_data) {
+void EditorSampleImportPlugin::_compress_ima_adpcm(const Vector<float>& p_data,PoolVector<uint8_t>& dst_data) {
/*p_sample_data->data = (void*)malloc(len);
@@ -730,7 +730,7 @@ void EditorSampleImportPlugin::_compress_ima_adpcm(const Vector<float>& p_data,D
datalen++;
dst_data.resize(datalen/2+4);
- DVector<uint8_t>::Write w = dst_data.write();
+ PoolVector<uint8_t>::Write w = dst_data.write();
int i,step_idx=0,prev=0;
diff --git a/tools/editor/io_plugins/editor_sample_import_plugin.h b/tools/editor/io_plugins/editor_sample_import_plugin.h
index 915ca3883c..6d781756b2 100644
--- a/tools/editor/io_plugins/editor_sample_import_plugin.h
+++ b/tools/editor/io_plugins/editor_sample_import_plugin.h
@@ -40,7 +40,7 @@ class EditorSampleImportPlugin : public EditorImportPlugin {
GDCLASS(EditorSampleImportPlugin,EditorImportPlugin);
EditorSampleImportDialog *dialog;
- void _compress_ima_adpcm(const Vector<float>& p_data,DVector<uint8_t>& dst_data);
+ void _compress_ima_adpcm(const Vector<float>& p_data,PoolVector<uint8_t>& dst_data);
public:
static EditorSampleImportPlugin *singleton;
diff --git a/tools/editor/io_plugins/editor_scene_import_plugin.cpp b/tools/editor/io_plugins/editor_scene_import_plugin.cpp
index c387e503e6..076750e59e 100644
--- a/tools/editor/io_plugins/editor_scene_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_scene_import_plugin.cpp
@@ -1897,7 +1897,7 @@ Node* EditorSceneImportPlugin::_fix_node(Node *p_node,Node *p_root,Map<Ref<Mesh>
return p_node;
MeshInstance *mi = p_node->cast_to<MeshInstance>();
- DVector<Face3> faces = mi->get_faces(VisualInstance::FACES_SOLID);
+ PoolVector<Face3> faces = mi->get_faces(VisualInstance::FACES_SOLID);
BSP_Tree bsptree(faces);
@@ -1940,7 +1940,7 @@ Node* EditorSceneImportPlugin::_fix_node(Node *p_node,Node *p_root,Map<Ref<Mesh>
return p_node;
MeshInstance *mi = p_node->cast_to<MeshInstance>();
- DVector<Face3> faces = mi->get_faces(VisualInstance::FACES_SOLID);
+ PoolVector<Face3> faces = mi->get_faces(VisualInstance::FACES_SOLID);
ERR_FAIL_COND_V(faces.size()==0,NULL);
//step 1 compute the plane
diff --git a/tools/editor/io_plugins/editor_scene_importer_fbxconv.cpp b/tools/editor/io_plugins/editor_scene_importer_fbxconv.cpp
index 1cb16843c5..e1b0719941 100644
--- a/tools/editor/io_plugins/editor_scene_importer_fbxconv.cpp
+++ b/tools/editor/io_plugins/editor_scene_importer_fbxconv.cpp
@@ -336,7 +336,7 @@ void EditorSceneImporterFBXConv::_add_surface(State& state,Ref<Mesh>& m,const Di
int idx = m->get_surface_count();
Array array = state.surface_cache[id].array;
- DVector<float> indices = array[Mesh::ARRAY_BONES];
+ PoolVector<float> indices = array[Mesh::ARRAY_BONES];
if (indices.size() && part.has("bones")) {
@@ -361,7 +361,7 @@ void EditorSceneImporterFBXConv::_add_surface(State& state,Ref<Mesh>& m,const Di
int ilen=indices.size();
{
- DVector<float>::Write iw=indices.write();
+ PoolVector<float>::Write iw=indices.write();
for(int j=0;j<ilen;j++) {
int b = iw[j];
ERR_CONTINUE(!index_map.has(b));
@@ -680,11 +680,11 @@ void EditorSceneImporterFBXConv::_parse_surfaces(State& state) {
case Mesh::ARRAY_VERTEX:
case Mesh::ARRAY_NORMAL: {
- DVector<Vector3> vtx;
+ PoolVector<Vector3> vtx;
vtx.resize(array.size());
{
int len=array.size();
- DVector<Vector3>::Write w = vtx.write();
+ PoolVector<Vector3>::Write w = vtx.write();
for(int l=0;l<len;l++) {
int pos = array[l];
@@ -701,12 +701,12 @@ void EditorSceneImporterFBXConv::_parse_surfaces(State& state) {
if (binormal_ofs<0)
break;
- DVector<float> tangents;
+ PoolVector<float> tangents;
tangents.resize(array.size()*4);
{
int len=array.size();
- DVector<float>::Write w = tangents.write();
+ PoolVector<float>::Write w = tangents.write();
for(int l=0;l<len;l++) {
int pos = array[l];
@@ -736,11 +736,11 @@ void EditorSceneImporterFBXConv::_parse_surfaces(State& state) {
} break;
case Mesh::ARRAY_COLOR: {
- DVector<Color> cols;
+ PoolVector<Color> cols;
cols.resize(array.size());
{
int len=array.size();
- DVector<Color>::Write w = cols.write();
+ PoolVector<Color>::Write w = cols.write();
for(int l=0;l<len;l++) {
int pos = array[l];
@@ -756,11 +756,11 @@ void EditorSceneImporterFBXConv::_parse_surfaces(State& state) {
case Mesh::ARRAY_TEX_UV:
case Mesh::ARRAY_TEX_UV2: {
- DVector<Vector2> uvs;
+ PoolVector<Vector2> uvs;
uvs.resize(array.size());
{
int len=array.size();
- DVector<Vector2>::Write w = uvs.write();
+ PoolVector<Vector2>::Write w = uvs.write();
for(int l=0;l<len;l++) {
int pos = array[l];
@@ -775,14 +775,14 @@ void EditorSceneImporterFBXConv::_parse_surfaces(State& state) {
case Mesh::ARRAY_BONES:
case Mesh::ARRAY_WEIGHTS: {
- DVector<float> arr;
+ PoolVector<float> arr;
arr.resize(array.size()*4);
int po=k==Mesh::ARRAY_WEIGHTS?1:0;
lofs=ofs[Mesh::ARRAY_BONES];
{
int len=array.size();
- DVector<float>::Write w = arr.write();
+ PoolVector<float>::Write w = arr.write();
for(int l=0;l<len;l++) {
int pos = array[l];
@@ -801,12 +801,12 @@ void EditorSceneImporterFBXConv::_parse_surfaces(State& state) {
} break;
case Mesh::ARRAY_INDEX: {
- DVector<int> arr;
+ PoolVector<int> arr;
arr.resize(indices.size());
{
int len=indices.size();
- DVector<int>::Write w = arr.write();
+ PoolVector<int>::Write w = arr.write();
for(int l=0;l<len;l++) {
w[l]=iarray[ indices[l] ];
@@ -838,10 +838,10 @@ void EditorSceneImporterFBXConv::_parse_surfaces(State& state) {
}
if (pt==Mesh::PRIMITIVE_TRIANGLES) {
- DVector<int> ia=arrays[Mesh::ARRAY_INDEX];
+ PoolVector<int> ia=arrays[Mesh::ARRAY_INDEX];
int len=ia.size();
{
- DVector<int>::Write w=ia.write();
+ PoolVector<int>::Write w=ia.write();
for(int l=0;l<len;l+=3) {
SWAP(w[l+1],w[l+2]);
}
diff --git a/tools/editor/io_plugins/editor_texture_import_plugin.cpp b/tools/editor/io_plugins/editor_texture_import_plugin.cpp
index 28462438fc..16bc334cce 100644
--- a/tools/editor/io_plugins/editor_texture_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_texture_import_plugin.cpp
@@ -1199,9 +1199,9 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
src.convert(Image::FORMAT_RGB8);
}
- DVector<uint8_t> data = src.get_data();
+ PoolVector<uint8_t> data = src.get_data();
MD5_CTX md5;
- DVector<uint8_t>::Read r=data.read();
+ PoolVector<uint8_t>::Read r=data.read();
MD5Init(&md5);
int len=data.size();
for(int j=0;j<len;j++) {
diff --git a/tools/editor/plugins/baked_light_baker.cpp b/tools/editor/plugins/baked_light_baker.cpp
index 2b660c4f94..2d91524ef9 100644
--- a/tools/editor/plugins/baked_light_baker.cpp
+++ b/tools/editor/plugins/baked_light_baker.cpp
@@ -108,8 +108,8 @@ BakedLightBaker::MeshTexture* BakedLightBaker::_get_mat_tex(const Ref<Texture>&
image=copy;
}
- DVector<uint8_t> dvt=image.get_data();
- DVector<uint8_t>::Read r=dvt.read();
+ PoolVector<uint8_t> dvt=image.get_data();
+ PoolVector<uint8_t>::Read r=dvt.read();
MeshTexture mt;
mt.tex_w=image.get_width();
mt.tex_h=image.get_height();
@@ -194,14 +194,14 @@ void BakedLightBaker::_add_mesh(const Ref<Mesh>& p_mesh,const Ref<Material>& p_m
Array a = p_mesh->surface_get_arrays(i);
- DVector<Vector3> vertices = a[Mesh::ARRAY_VERTEX];
- DVector<Vector3>::Read vr=vertices.read();
- DVector<Vector2> uv;
- DVector<Vector2>::Read uvr;
- DVector<Vector2> uv2;
- DVector<Vector2>::Read uv2r;
- DVector<Vector3> normal;
- DVector<Vector3>::Read normalr;
+ PoolVector<Vector3> vertices = a[Mesh::ARRAY_VERTEX];
+ PoolVector<Vector3>::Read vr=vertices.read();
+ PoolVector<Vector2> uv;
+ PoolVector<Vector2>::Read uvr;
+ PoolVector<Vector2> uv2;
+ PoolVector<Vector2>::Read uv2r;
+ PoolVector<Vector3> normal;
+ PoolVector<Vector3>::Read normalr;
bool read_uv=false;
bool read_normal=false;
@@ -236,8 +236,8 @@ void BakedLightBaker::_add_mesh(const Ref<Mesh>& p_mesh,const Ref<Material>& p_m
if (p_mesh->surface_get_format(i)&Mesh::ARRAY_FORMAT_INDEX) {
- DVector<int> indices = a[Mesh::ARRAY_INDEX];
- DVector<int>::Read ir = indices.read();
+ PoolVector<int> indices = a[Mesh::ARRAY_INDEX];
+ PoolVector<int>::Read ir = indices.read();
for(int i=0;i<facecount;i++) {
Triangle &t=triangles[tbase+i];
@@ -1788,7 +1788,7 @@ void BakedLightBaker::bake(const Ref<BakedLight> &p_light, Node* p_node) {
}
-void BakedLightBaker::update_octree_sampler(DVector<int> &p_sampler) {
+void BakedLightBaker::update_octree_sampler(PoolVector<int> &p_sampler) {
BakedLightBaker::Octant *octants=octant_pool.ptr();
double norm = 1.0/double(total_rays);
@@ -1845,7 +1845,7 @@ void BakedLightBaker::update_octree_sampler(DVector<int> &p_sampler) {
}
p_sampler.resize(tmp_smp.size());
- DVector<int>::Write w = p_sampler.write();
+ PoolVector<int>::Write w = p_sampler.write();
int ss = tmp_smp.size();
for(int i=0;i<ss;i++) {
w[i]=tmp_smp[i];
@@ -1859,7 +1859,7 @@ void BakedLightBaker::update_octree_sampler(DVector<int> &p_sampler) {
double mult = baked_light->get_energy_multiplier();
float saturation = baked_light->get_saturation();
- DVector<int>::Write w = p_sampler.write();
+ PoolVector<int>::Write w = p_sampler.write();
encode_uint32(octree_depth,(uint8_t*)&w[2]);
encode_uint32(linear_color,(uint8_t*)&w[3]);
@@ -1900,7 +1900,7 @@ void BakedLightBaker::update_octree_sampler(DVector<int> &p_sampler) {
}
-void BakedLightBaker::update_octree_images(DVector<uint8_t> &p_octree,DVector<uint8_t> &p_light) {
+void BakedLightBaker::update_octree_images(PoolVector<uint8_t> &p_octree,PoolVector<uint8_t> &p_light) {
int len = baked_octree_texture_w*baked_octree_texture_h*4;
@@ -1910,10 +1910,10 @@ void BakedLightBaker::update_octree_images(DVector<uint8_t> &p_octree,DVector<ui
p_light.resize(ilen);
- DVector<uint8_t>::Write w = p_octree.write();
+ PoolVector<uint8_t>::Write w = p_octree.write();
zeromem(w.ptr(),len);
- DVector<uint8_t>::Write iw = p_light.write();
+ PoolVector<uint8_t>::Write iw = p_light.write();
zeromem(iw.ptr(),ilen);
float gamma = baked_light->get_gamma_adjust();
@@ -2612,10 +2612,10 @@ Error BakedLightBaker::transfer_to_lightmaps() {
}
}
- DVector<uint8_t> dv;
+ PoolVector<uint8_t> dv;
dv.resize(baked_textures[i].data.size());
{
- DVector<uint8_t>::Write w = dv.write();
+ PoolVector<uint8_t>::Write w = dv.write();
copymem(w.ptr(),baked_textures[i].data.ptr(),baked_textures[i].data.size());
}
diff --git a/tools/editor/plugins/baked_light_baker.h b/tools/editor/plugins/baked_light_baker.h
index 5616183cb1..6fcf78dd0a 100644
--- a/tools/editor/plugins/baked_light_baker.h
+++ b/tools/editor/plugins/baked_light_baker.h
@@ -364,8 +364,8 @@ public:
Error transfer_to_lightmaps();
- void update_octree_sampler(DVector<int> &p_sampler);
- void update_octree_images(DVector<uint8_t> &p_octree,DVector<uint8_t> &p_light);
+ void update_octree_sampler(PoolVector<int> &p_sampler);
+ void update_octree_images(PoolVector<uint8_t> &p_octree,PoolVector<uint8_t> &p_light);
Ref<BakedLight> get_baked_light() { return baked_light; }
diff --git a/tools/editor/plugins/baked_light_editor_plugin.cpp b/tools/editor/plugins/baked_light_editor_plugin.cpp
index e6d969c399..8f564a3247 100644
--- a/tools/editor/plugins/baked_light_editor_plugin.cpp
+++ b/tools/editor/plugins/baked_light_editor_plugin.cpp
@@ -88,7 +88,7 @@ void BakedLightEditor::_notification(int p_option) {
float max_lum=0;
{
- DVector<Color>::Write cw=colors.write();
+ PoolVector<Color>::Write cw=colors.write();
BakedLightBaker::Octant *octants=baker->octant_pool.ptr();
BakedLightBaker::Octant *oct = &octants[baker->leaf_list];
int vert_idx=0;
diff --git a/tools/editor/plugins/baked_light_editor_plugin.h b/tools/editor/plugins/baked_light_editor_plugin.h
index 82310dc07e..e311fe9f17 100644
--- a/tools/editor/plugins/baked_light_editor_plugin.h
+++ b/tools/editor/plugins/baked_light_editor_plugin.h
@@ -50,9 +50,9 @@ class BakedLightEditor : public Control {
float update_timeout;
- DVector<uint8_t> octree_texture;
- DVector<uint8_t> light_texture;
- DVector<int> octree_sampler;
+ PoolVector<uint8_t> octree_texture;
+ PoolVector<uint8_t> light_texture;
+ PoolVector<int> octree_sampler;
BakedLightBaker *baker;
AcceptDialog *err_dialog;
diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp
index 5fa0d88ca5..168b41e51f 100644
--- a/tools/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp
@@ -3771,7 +3771,7 @@ void CanvasItemEditorViewport::_create_nodes(Node* parent, Node* child, String&
if (default_type=="Patch9Frame") {
editor_data->get_undo_redo().add_do_property(child,"rect/size",texture_size);
} else if (default_type=="Polygon2D") {
- DVector<Vector2> list;
+ PoolVector<Vector2> list;
list.push_back(Vector2(0,0));
list.push_back(Vector2(texture_size.width,0));
list.push_back(Vector2(texture_size.width,texture_size.height));
diff --git a/tools/editor/plugins/collision_polygon_editor_plugin.cpp b/tools/editor/plugins/collision_polygon_editor_plugin.cpp
index 5ac4023177..1aea1bdfdb 100644
--- a/tools/editor/plugins/collision_polygon_editor_plugin.cpp
+++ b/tools/editor/plugins/collision_polygon_editor_plugin.cpp
@@ -478,11 +478,11 @@ void CollisionPolygonEditor::_polygon_draw() {
Array a;
a.resize(Mesh::ARRAY_MAX);
- DVector<Vector3> va;
+ PoolVector<Vector3> va;
{
va.resize(poly.size());
- DVector<Vector3>::Write w=va.write();
+ PoolVector<Vector3>::Write w=va.write();
for(int i=0;i<poly.size();i++) {
diff --git a/tools/editor/plugins/color_ramp_editor_plugin.cpp b/tools/editor/plugins/color_ramp_editor_plugin.cpp
index 09bed1c2d0..90ec1e9f4e 100644
--- a/tools/editor/plugins/color_ramp_editor_plugin.cpp
+++ b/tools/editor/plugins/color_ramp_editor_plugin.cpp
@@ -75,7 +75,7 @@ void ColorRampEditorPlugin::_ramp_changed() {
UndoRedo *ur=EditorNode::get_singleton()->get_undo_redo();
- //Not sure if I should convert this data to DVector
+ //Not sure if I should convert this data to PoolVector
Vector<float> new_offsets=ramp_editor->get_offsets();
Vector<Color> new_colors=ramp_editor->get_colors();
Vector<float> old_offsets=color_ramp_ref->get_offsets();
diff --git a/tools/editor/plugins/editor_preview_plugins.cpp b/tools/editor/plugins/editor_preview_plugins.cpp
index 5a41f7e9e8..9dcfc2fa94 100644
--- a/tools/editor/plugins/editor_preview_plugins.cpp
+++ b/tools/editor/plugins/editor_preview_plugins.cpp
@@ -118,12 +118,12 @@ Ref<Texture> EditorBitmapPreviewPlugin::generate(const RES& p_from) {
return Ref<Texture>();
}
- DVector<uint8_t> data;
+ PoolVector<uint8_t> data;
data.resize(bm->get_size().width*bm->get_size().height);
{
- DVector<uint8_t>::Write w=data.write();
+ PoolVector<uint8_t>::Write w=data.write();
for(int i=0;i<bm->get_size().width;i++) {
for(int j=0;j<bm->get_size().height;j++) {
@@ -193,14 +193,14 @@ Ref<Texture> EditorPackedScenePreviewPlugin::_gen_from_imd(Ref<ResourceImportMet
Variant tn = p_imd->get_option("thumbnail");
//print_line(Variant::get_type_name(tn.get_type()));
- DVector<uint8_t> thumbnail = tn;
+ PoolVector<uint8_t> thumbnail = tn;
int len = thumbnail.size();
if (len==0)
return Ref<Texture>();
- DVector<uint8_t>::Read r = thumbnail.read();
+ PoolVector<uint8_t>::Read r = thumbnail.read();
Image img(r.ptr(),len);
if (img.empty())
@@ -311,10 +311,10 @@ EditorMaterialPreviewPlugin::EditorMaterialPreviewPlugin() {
int lons=32;
float radius=1.0;
- DVector<Vector3> vertices;
- DVector<Vector3> normals;
- DVector<Vector2> uvs;
- DVector<float> tangents;
+ PoolVector<Vector3> vertices;
+ PoolVector<Vector3> normals;
+ PoolVector<Vector2> uvs;
+ PoolVector<float> tangents;
Matrix3 tt = Matrix3(Vector3(0,1,0),Math_PI*0.5);
for(int i = 1; i <= lats; i++) {
@@ -535,15 +535,15 @@ Ref<Texture> EditorSamplePreviewPlugin::generate(const RES& p_from) {
int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size");
thumbnail_size*=EDSCALE;
- DVector<uint8_t> img;
+ PoolVector<uint8_t> img;
int w = thumbnail_size;
int h = thumbnail_size;
img.resize(w*h*3);
- DVector<uint8_t>::Write imgdata = img.write();
+ PoolVector<uint8_t>::Write imgdata = img.write();
uint8_t * imgw = imgdata.ptr();
- DVector<uint8_t> data = smp->get_data();
- DVector<uint8_t>::Read sampledata = data.read();
+ PoolVector<uint8_t> data = smp->get_data();
+ PoolVector<uint8_t>::Read sampledata = data.read();
const uint8_t *sdata=sampledata.ptr();
bool stereo = smp->is_stereo();
@@ -776,7 +776,7 @@ Ref<Texture> EditorSamplePreviewPlugin::generate(const RES& p_from) {
}
}
- imgdata = DVector<uint8_t>::Write();
+ imgdata = PoolVector<uint8_t>::Write();
Ref<ImageTexture> ptex = Ref<ImageTexture>( memnew( ImageTexture));
ptex->create_from_image(Image(w,h,0,Image::FORMAT_RGB8,img),0);
diff --git a/tools/editor/plugins/material_editor_plugin.cpp b/tools/editor/plugins/material_editor_plugin.cpp
index 3ef1818135..e43872deec 100644
--- a/tools/editor/plugins/material_editor_plugin.cpp
+++ b/tools/editor/plugins/material_editor_plugin.cpp
@@ -143,10 +143,10 @@ MaterialEditor::MaterialEditor() {
int lons=32;
float radius=1.0;
- DVector<Vector3> vertices;
- DVector<Vector3> normals;
- DVector<Vector2> uvs;
- DVector<float> tangents;
+ PoolVector<Vector3> vertices;
+ PoolVector<Vector3> normals;
+ PoolVector<Vector2> uvs;
+ PoolVector<float> tangents;
Matrix3 tt = Matrix3(Vector3(0,1,0),Math_PI*0.5);
for(int i = 1; i <= lats; i++) {
@@ -221,10 +221,10 @@ MaterialEditor::MaterialEditor() {
box_mesh.instance();
- DVector<Vector3> vertices;
- DVector<Vector3> normals;
- DVector<float> tangents;
- DVector<Vector3> uvs;
+ PoolVector<Vector3> vertices;
+ PoolVector<Vector3> normals;
+ PoolVector<float> tangents;
+ PoolVector<Vector3> uvs;
int vtx_idx=0;
#define ADD_VTX(m_idx);\
@@ -282,7 +282,7 @@ MaterialEditor::MaterialEditor() {
d[VisualServer::ARRAY_TEX_UV]= uvs ;
d[VisualServer::ARRAY_VERTEX]= vertices ;
- DVector<int> indices;
+ PoolVector<int> indices;
indices.resize(vertices.size());
for(int i=0;i<vertices.size();i++)
indices.set(i,i);
diff --git a/tools/editor/plugins/multimesh_editor_plugin.cpp b/tools/editor/plugins/multimesh_editor_plugin.cpp
index 9b19542268..49c04477a2 100644
--- a/tools/editor/plugins/multimesh_editor_plugin.cpp
+++ b/tools/editor/plugins/multimesh_editor_plugin.cpp
@@ -125,7 +125,7 @@ void MultiMeshEditor::_populate() {
Transform geom_xform = node->get_global_transform().affine_inverse() * ss_instance->get_global_transform();
- DVector<Face3> geometry = ss_instance->get_faces(VisualInstance::FACES_SOLID);
+ PoolVector<Face3> geometry = ss_instance->get_faces(VisualInstance::FACES_SOLID);
if (geometry.size()==0) {
@@ -137,7 +137,7 @@ void MultiMeshEditor::_populate() {
//make all faces local
int gc = geometry.size();
- DVector<Face3>::Write w = geometry.write();
+ PoolVector<Face3>::Write w = geometry.write();
for(int i=0;i<gc;i++) {
for(int j=0;j<3;j++) {
@@ -147,7 +147,7 @@ void MultiMeshEditor::_populate() {
- w = DVector<Face3>::Write();
+ w = PoolVector<Face3>::Write();
#if 0
node->get_multimesh()->set_instance_count(populate_amount->get_val());
node->populate_parent(populate_rotate_random->get_val(),populate_tilt_random->get_val(),populate_scale_random->get_val(),populate_scale->get_val());
@@ -164,12 +164,12 @@ void MultiMeshEditor::_populate() {
ERR_FAIL_COND(!vi);
#endif
- DVector<Face3> faces = geometry;
+ PoolVector<Face3> faces = geometry;
ERR_EXPLAIN(TTR("Parent has no solid faces to populate."));
int facecount=faces.size();
ERR_FAIL_COND(!facecount);
- DVector<Face3>::Read r = faces.read();
+ PoolVector<Face3>::Read r = faces.read();
diff --git a/tools/editor/plugins/navigation_polygon_editor_plugin.cpp b/tools/editor/plugins/navigation_polygon_editor_plugin.cpp
index d08c89c1ef..2d99522e0e 100644
--- a/tools/editor/plugins/navigation_polygon_editor_plugin.cpp
+++ b/tools/editor/plugins/navigation_polygon_editor_plugin.cpp
@@ -211,10 +211,10 @@ bool NavigationPolygonEditor::forward_input_event(const InputEvent& p_event) {
for(int j=0;j<node->get_navigation_polygon()->get_outline_count();j++) {
- DVector<Vector2> points=node->get_navigation_polygon()->get_outline(j);
+ PoolVector<Vector2> points=node->get_navigation_polygon()->get_outline(j);
int pc=points.size();
- DVector<Vector2>::Read poly=points.read();
+ PoolVector<Vector2>::Read poly=points.read();
for(int i=0;i<pc;i++) {
@@ -240,7 +240,7 @@ bool NavigationPolygonEditor::forward_input_event(const InputEvent& p_event) {
if (closest_idx>=0) {
pre_move_edit=node->get_navigation_polygon()->get_outline(closest_outline);
- DVector<Point2> poly = pre_move_edit;
+ PoolVector<Point2> poly = pre_move_edit;
poly.insert(closest_idx+1,xform.affine_inverse().xform(closest_pos));
edited_point=closest_idx+1;
edited_outline=closest_outline;
@@ -260,10 +260,10 @@ bool NavigationPolygonEditor::forward_input_event(const InputEvent& p_event) {
for(int j=0;j<node->get_navigation_polygon()->get_outline_count();j++) {
- DVector<Vector2> points=node->get_navigation_polygon()->get_outline(j);
+ PoolVector<Vector2> points=node->get_navigation_polygon()->get_outline(j);
int pc=points.size();
- DVector<Vector2>::Read poly=points.read();
+ PoolVector<Vector2>::Read poly=points.read();
for(int i=0;i<pc;i++) {
@@ -296,7 +296,7 @@ bool NavigationPolygonEditor::forward_input_event(const InputEvent& p_event) {
//apply
- DVector<Vector2> poly = node->get_navigation_polygon()->get_outline(edited_outline);
+ PoolVector<Vector2> poly = node->get_navigation_polygon()->get_outline(edited_outline);
ERR_FAIL_INDEX_V(edited_point,poly.size(),false);
poly.set(edited_point,edited_point_pos);
undo_redo->create_action(TTR("Edit Poly"));
@@ -322,10 +322,10 @@ bool NavigationPolygonEditor::forward_input_event(const InputEvent& p_event) {
for(int j=0;j<node->get_navigation_polygon()->get_outline_count();j++) {
- DVector<Vector2> points=node->get_navigation_polygon()->get_outline(j);
+ PoolVector<Vector2> points=node->get_navigation_polygon()->get_outline(j);
int pc=points.size();
- DVector<Vector2>::Read poly=points.read();
+ PoolVector<Vector2>::Read poly=points.read();
for(int i=0;i<pc;i++) {
@@ -345,7 +345,7 @@ bool NavigationPolygonEditor::forward_input_event(const InputEvent& p_event) {
if (closest_idx>=0) {
- DVector<Vector2> poly = node->get_navigation_polygon()->get_outline(closest_outline);
+ PoolVector<Vector2> poly = node->get_navigation_polygon()->get_outline(closest_outline);
if (poly.size()>3) {
undo_redo->create_action(TTR("Edit Poly (Remove Point)"));
diff --git a/tools/editor/plugins/navigation_polygon_editor_plugin.h b/tools/editor/plugins/navigation_polygon_editor_plugin.h
index 50ba0cfedb..1a5fa3c456 100644
--- a/tools/editor/plugins/navigation_polygon_editor_plugin.h
+++ b/tools/editor/plugins/navigation_polygon_editor_plugin.h
@@ -70,7 +70,7 @@ class NavigationPolygonEditor : public HBoxContainer {
int edited_outline;
int edited_point;
Vector2 edited_point_pos;
- DVector<Vector2> pre_move_edit;
+ PoolVector<Vector2> pre_move_edit;
Vector<Vector2> wip;
bool wip_active;
diff --git a/tools/editor/plugins/particles_2d_editor_plugin.cpp b/tools/editor/plugins/particles_2d_editor_plugin.cpp
index 0eda9d3c1a..aee6b68e3c 100644
--- a/tools/editor/plugins/particles_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/particles_2d_editor_plugin.cpp
@@ -74,8 +74,8 @@ void Particles2DEditorPlugin::_file_selected(const String& p_file) {
Size2i s = Size2(img.get_width(),img.get_height());
ERR_FAIL_COND(s.width==0 || s.height==0);
- DVector<uint8_t> data = img.get_data();
- DVector<uint8_t>::Read r = data.read();
+ PoolVector<uint8_t> data = img.get_data();
+ PoolVector<uint8_t>::Read r = data.read();
Vector<Point2i> valid_positions;
valid_positions.resize(s.width*s.height);
@@ -95,9 +95,9 @@ void Particles2DEditorPlugin::_file_selected(const String& p_file) {
ERR_EXPLAIN(TTR("No pixels with transparency > 128 in image.."));
ERR_FAIL_COND(valid_positions.size()==0);
- DVector<Point2> epoints;
+ PoolVector<Point2> epoints;
epoints.resize(epc);
- DVector<Point2>::Write w = epoints.write();
+ PoolVector<Point2>::Write w = epoints.write();
Size2 extents = Size2(img.get_width()*0.5,img.get_height()*0.5);
@@ -108,7 +108,7 @@ void Particles2DEditorPlugin::_file_selected(const String& p_file) {
w[i]=p/extents;
}
- w = DVector<Point2>::Write();
+ w = PoolVector<Point2>::Write();
undo_redo->create_action(TTR("Set Emission Mask"));
undo_redo->add_do_method(particles,"set_emission_points",epoints);
@@ -131,7 +131,7 @@ void Particles2DEditorPlugin::_menu_callback(int p_idx) {
case MENU_CLEAR_EMISSION_MASK: {
undo_redo->create_action(TTR("Clear Emission Mask"));
- undo_redo->add_do_method(particles,"set_emission_points",DVector<Vector2>());
+ undo_redo->add_do_method(particles,"set_emission_points",PoolVector<Vector2>());
undo_redo->add_undo_method(particles,"set_emission_points",particles->get_emission_points());
undo_redo->commit_action();
} break;
diff --git a/tools/editor/plugins/particles_editor_plugin.cpp b/tools/editor/plugins/particles_editor_plugin.cpp
index 4f4477070b..f290a453bb 100644
--- a/tools/editor/plugins/particles_editor_plugin.cpp
+++ b/tools/editor/plugins/particles_editor_plugin.cpp
@@ -77,7 +77,7 @@ void ParticlesEditor::_node_selected(const NodePath& p_path){
Transform geom_xform = node->get_global_transform().affine_inverse() * vi->get_global_transform();
int gc = geometry.size();
- DVector<Face3>::Write w = geometry.write();
+ PoolVector<Face3>::Write w = geometry.write();
for(int i=0;i<gc;i++) {
@@ -87,7 +87,7 @@ void ParticlesEditor::_node_selected(const NodePath& p_path){
}
- w = DVector<Face3>::Write();
+ w = PoolVector<Face3>::Write();
emission_dialog->popup_centered(Size2(300,130));
}
@@ -202,7 +202,7 @@ void ParticlesEditor::edit(Particles *p_particles) {
void ParticlesEditor::_generate_emission_points() {
/// hacer codigo aca
- DVector<Vector3> points;
+ PoolVector<Vector3> points;
if (emission_fill->get_selected()==0) {
@@ -256,7 +256,7 @@ void ParticlesEditor::_generate_emission_points() {
return;
}
- DVector<Face3>::Read r = geometry.read();
+ PoolVector<Face3>::Read r = geometry.read();
AABB aabb;
diff --git a/tools/editor/plugins/particles_editor_plugin.h b/tools/editor/plugins/particles_editor_plugin.h
index fa4ca3b9ec..c32fbe5ada 100644
--- a/tools/editor/plugins/particles_editor_plugin.h
+++ b/tools/editor/plugins/particles_editor_plugin.h
@@ -69,7 +69,7 @@ class ParticlesEditor : public Control {
};
- DVector<Face3> geometry;
+ PoolVector<Face3> geometry;
void _generate_emission_points();
void _resource_seleted(const String& p_res);
diff --git a/tools/editor/plugins/polygon_2d_editor_plugin.cpp b/tools/editor/plugins/polygon_2d_editor_plugin.cpp
index 7900f032c0..4977d5facc 100644
--- a/tools/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -102,8 +102,8 @@ void Polygon2DEditor::_menu_option(int p_option) {
}
- DVector<Vector2> points = node->get_polygon();
- DVector<Vector2> uvs = node->get_uv();
+ PoolVector<Vector2> points = node->get_polygon();
+ PoolVector<Vector2> uvs = node->get_uv();
if (uvs.size()!=points.size()) {
undo_redo->create_action(TTR("Create UV Map"));
undo_redo->add_do_method(node,"set_uv",points);
@@ -119,10 +119,10 @@ void Polygon2DEditor::_menu_option(int p_option) {
} break;
case UVEDIT_POLYGON_TO_UV: {
- DVector<Vector2> points = node->get_polygon();
+ PoolVector<Vector2> points = node->get_polygon();
if (points.size()==0)
break;
- DVector<Vector2> uvs = node->get_uv();
+ PoolVector<Vector2> uvs = node->get_uv();
undo_redo->create_action(TTR("Create UV Map"));
undo_redo->add_do_method(node,"set_uv",points);
undo_redo->add_undo_method(node,"set_uv",uvs);
@@ -134,8 +134,8 @@ void Polygon2DEditor::_menu_option(int p_option) {
} break;
case UVEDIT_UV_TO_POLYGON: {
- DVector<Vector2> points = node->get_polygon();
- DVector<Vector2> uvs = node->get_uv();
+ PoolVector<Vector2> points = node->get_polygon();
+ PoolVector<Vector2> uvs = node->get_uv();
if (uvs.size()==0)
break;
@@ -149,11 +149,11 @@ void Polygon2DEditor::_menu_option(int p_option) {
} break;
case UVEDIT_UV_CLEAR: {
- DVector<Vector2> uvs = node->get_uv();
+ PoolVector<Vector2> uvs = node->get_uv();
if (uvs.size()==0)
break;
undo_redo->create_action(TTR("Create UV Map"));
- undo_redo->add_do_method(node,"set_uv",DVector<Vector2>());
+ undo_redo->add_do_method(node,"set_uv",PoolVector<Vector2>());
undo_redo->add_undo_method(node,"set_uv",uvs);
undo_redo->add_do_method(uv_edit_draw,"update");
undo_redo->add_undo_method(uv_edit_draw,"update");
@@ -593,13 +593,13 @@ void Polygon2DEditor::_uv_input(const InputEvent& p_input) {
case UV_MODE_EDIT_POINT: {
- DVector<Vector2> uv_new=uv_prev;
+ PoolVector<Vector2> uv_new=uv_prev;
uv_new.set( uv_drag_index, uv_new[uv_drag_index]+drag );
node->set_uv(uv_new);
} break;
case UV_MODE_MOVE: {
- DVector<Vector2> uv_new=uv_prev;
+ PoolVector<Vector2> uv_new=uv_prev;
for(int i=0;i<uv_new.size();i++)
uv_new.set( i, uv_new[i]+drag );
@@ -610,7 +610,7 @@ void Polygon2DEditor::_uv_input(const InputEvent& p_input) {
case UV_MODE_ROTATE: {
Vector2 center;
- DVector<Vector2> uv_new=uv_prev;
+ PoolVector<Vector2> uv_new=uv_prev;
for(int i=0;i<uv_new.size();i++)
center+=uv_prev[i];
@@ -630,7 +630,7 @@ void Polygon2DEditor::_uv_input(const InputEvent& p_input) {
case UV_MODE_SCALE: {
Vector2 center;
- DVector<Vector2> uv_new=uv_prev;
+ PoolVector<Vector2> uv_new=uv_prev;
for(int i=0;i<uv_new.size();i++)
center+=uv_prev[i];
@@ -716,7 +716,7 @@ void Polygon2DEditor::_uv_draw() {
}
}
- DVector<Vector2> uvs = node->get_uv();
+ PoolVector<Vector2> uvs = node->get_uv();
Ref<Texture> handle = get_icon("EditorHandle","EditorIcons");
Rect2 rect(Point2(),mtx.basis_xform(base_tex->get_size()));
diff --git a/tools/editor/plugins/polygon_2d_editor_plugin.h b/tools/editor/plugins/polygon_2d_editor_plugin.h
index a2fd3dc4d0..67d50f6ac2 100644
--- a/tools/editor/plugins/polygon_2d_editor_plugin.h
+++ b/tools/editor/plugins/polygon_2d_editor_plugin.h
@@ -81,7 +81,7 @@ class Polygon2DEditor : public HBoxContainer {
Vector2 uv_draw_ofs;
float uv_draw_zoom;
- DVector<Vector2> uv_prev;
+ PoolVector<Vector2> uv_prev;
int uv_drag_index;
bool uv_drag;
UVMode uv_move_current;
diff --git a/tools/editor/plugins/sample_editor_plugin.cpp b/tools/editor/plugins/sample_editor_plugin.cpp
index a8fb5743b0..e836e04e19 100644
--- a/tools/editor/plugins/sample_editor_plugin.cpp
+++ b/tools/editor/plugins/sample_editor_plugin.cpp
@@ -77,15 +77,15 @@ void SampleEditor::_stop_pressed() {
void SampleEditor::generate_preview_texture(const Ref<Sample>& p_sample,Ref<ImageTexture> &p_texture) {
- DVector<uint8_t> data = p_sample->get_data();
+ PoolVector<uint8_t> data = p_sample->get_data();
- DVector<uint8_t> img;
+ PoolVector<uint8_t> img;
int w = p_texture->get_width();
int h = p_texture->get_height();
img.resize(w*h*3);
- DVector<uint8_t>::Write imgdata = img.write();
+ PoolVector<uint8_t>::Write imgdata = img.write();
uint8_t * imgw = imgdata.ptr();
- DVector<uint8_t>::Read sampledata = data.read();
+ PoolVector<uint8_t>::Read sampledata = data.read();
const uint8_t *sdata=sampledata.ptr();
bool stereo = p_sample->is_stereo();
@@ -308,7 +308,7 @@ void SampleEditor::generate_preview_texture(const Ref<Sample>& p_sample,Ref<Imag
}
}
- imgdata = DVector<uint8_t>::Write();
+ imgdata = PoolVector<uint8_t>::Write();
p_texture->set_data(Image(w,h,0,Image::FORMAT_RGB8,img));
diff --git a/tools/editor/plugins/sample_library_editor_plugin.cpp b/tools/editor/plugins/sample_library_editor_plugin.cpp
index 730c3b69a2..45615ccf9e 100644
--- a/tools/editor/plugins/sample_library_editor_plugin.cpp
+++ b/tools/editor/plugins/sample_library_editor_plugin.cpp
@@ -66,7 +66,7 @@ void SampleLibraryEditor::_notification(int p_what) {
}
}
-void SampleLibraryEditor::_file_load_request(const DVector<String>& p_path) {
+void SampleLibraryEditor::_file_load_request(const PoolVector<String>& p_path) {
for(int i=0;i<p_path.size();i++) {
@@ -400,7 +400,7 @@ void SampleLibraryEditor::drop_data_fw(const Point2& p_point,const Variant& p_da
if (String(d["type"])=="files") {
- DVector<String> files = d["files"];
+ PoolVector<String> files = d["files"];
_file_load_request(files);
diff --git a/tools/editor/plugins/sample_library_editor_plugin.h b/tools/editor/plugins/sample_library_editor_plugin.h
index 46b216af82..03bf01a459 100644
--- a/tools/editor/plugins/sample_library_editor_plugin.h
+++ b/tools/editor/plugins/sample_library_editor_plugin.h
@@ -59,7 +59,7 @@ class SampleLibraryEditor : public Panel {
void _load_pressed();
- void _file_load_request(const DVector<String>& p_path);
+ void _file_load_request(const PoolVector<String>& p_path);
void _delete_pressed();
void _update_library();
void _item_edited();
diff --git a/tools/editor/plugins/shader_graph_editor_plugin.cpp b/tools/editor/plugins/shader_graph_editor_plugin.cpp
index 15906563c7..1f319a97cc 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<float> offsets=cr->get_offsets();
Vector<Color> colors=cr->get_colors();
- DVector<float> new_offsets;
- DVector<Color> new_colors;
+ PoolVector<float> new_offsets;
+ PoolVector<Color> new_colors;
{
new_offsets.resize(offsets.size());
new_colors.resize(colors.size());
- DVector<float>::Write ow=new_offsets.write();
- DVector<Color>::Write cw=new_colors.write();
+ PoolVector<float>::Write ow=new_offsets.write();
+ PoolVector<Color>::Write cw=new_colors.write();
for(int i=0;i<new_offsets.size();i++) {
ow[i]=offsets[i];
cw[i]=colors[i];
@@ -1001,8 +1001,8 @@ void ShaderGraphView::_color_ramp_changed(int p_id,Node* p_ramp) {
}
- DVector<float> old_offsets=graph->color_ramp_node_get_offsets(type,p_id);
- DVector<Color> old_colors=graph->color_ramp_node_get_colors(type,p_id);
+ PoolVector<float> old_offsets=graph->color_ramp_node_get_offsets(type,p_id);
+ PoolVector<Color> 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<Point2> points=cr->get_points();
- DVector<Vector2> new_points;
+ PoolVector<Vector2> new_points;
{
new_points.resize(points.size());
- DVector<Vector2>::Write ow=new_points.write();
+ PoolVector<Vector2>::Write ow=new_points.write();
for(int i=0;i<new_points.size();i++) {
ow[i]=points[i];
}
@@ -1038,7 +1038,7 @@ void ShaderGraphView::_curve_changed(int p_id,Node* p_curve) {
}
- DVector<Vector2> old_points=graph->curve_map_node_get_points(type,p_id);
+ PoolVector<Vector2> 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<real_t> offsets = graph->color_ramp_node_get_offsets(type,p_id);
- DVector<Color> colors = graph->color_ramp_node_get_colors(type,p_id);
+ PoolVector<real_t> offsets = graph->color_ramp_node_get_offsets(type,p_id);
+ PoolVector<Color> colors = graph->color_ramp_node_get_colors(type,p_id);
int oc = offsets.size();
if (oc) {
- DVector<real_t>::Read rofs = offsets.read();
- DVector<Color>::Read rcol = colors.read();
+ PoolVector<real_t>::Read rofs = offsets.read();
+ PoolVector<Color>::Read rcol = colors.read();
Vector<float> ofsv;
Vector<Color> colorv;
@@ -2184,12 +2184,12 @@ void ShaderGraphView::_create_node(int p_id) {
gn->set_title("CurveMap");
GraphCurveMapEdit * map = memnew( GraphCurveMapEdit );
- DVector<Vector2> points = graph->curve_map_node_get_points(type,p_id);
+ PoolVector<Vector2> points = graph->curve_map_node_get_points(type,p_id);
int oc = points.size();
if (oc) {
- DVector<Vector2>::Read rofs = points.read();
+ PoolVector<Vector2>::Read rofs = points.read();
Vector<Vector2> ofsv;
diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp
index 439b884937..7913d097b7 100644
--- a/tools/editor/plugins/spatial_editor_plugin.cpp
+++ b/tools/editor/plugins/spatial_editor_plugin.cpp
@@ -898,10 +898,10 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
if (p.distance_to(aabb.get_support(-ray_dir))>min_d)
continue;
- DVector<Face3> faces = vi->get_faces(VisualInstance::FACES_SOLID);
+ PoolVector<Face3> faces = vi->get_faces(VisualInstance::FACES_SOLID);
int c = faces.size();
if (c>0) {
- DVector<Face3>::Read r = faces.read();
+ PoolVector<Face3>::Read r = faces.read();
for(int j=0;j<c;j++) {
@@ -3179,8 +3179,8 @@ void SpatialEditor::_init_indicators() {
indicator_mat->set_feature(FixedSpatialMaterial::FEATURE_TRANSPARENT,true);
- DVector<Color> grid_colors[3];
- DVector<Vector3> grid_points[3];
+ PoolVector<Color> grid_colors[3];
+ PoolVector<Vector3> grid_points[3];
Vector<Color> origin_colors;
Vector<Vector3> origin_points;
@@ -3262,7 +3262,7 @@ void SpatialEditor::_init_indicators() {
{
cursor_mesh = VisualServer::get_singleton()->mesh_create();
- DVector<Vector3> cursor_points;
+ PoolVector<Vector3> cursor_points;
float cs = 0.25;
cursor_points.push_back(Vector3(+cs,0,0));
cursor_points.push_back(Vector3(-cs,0,0));
diff --git a/tools/editor/plugins/sprite_frames_editor_plugin.cpp b/tools/editor/plugins/sprite_frames_editor_plugin.cpp
index 7c6e2f6532..fbdbb37b54 100644
--- a/tools/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/tools/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -64,7 +64,7 @@ void SpriteFramesEditor::_notification(int p_what) {
}
}
-void SpriteFramesEditor::_file_load_request(const DVector<String>& p_path,int p_at_pos) {
+void SpriteFramesEditor::_file_load_request(const PoolVector<String>& p_path,int p_at_pos) {
ERR_FAIL_COND(!frames->has_animation(edited_anim));
@@ -744,7 +744,7 @@ void SpriteFramesEditor::drop_data_fw(const Point2& p_point,const Variant& p_dat
if (String(d["type"])=="files") {
- DVector<String> files = d["files"];
+ PoolVector<String> files = d["files"];
_file_load_request(files,at_pos);
}
diff --git a/tools/editor/plugins/sprite_frames_editor_plugin.h b/tools/editor/plugins/sprite_frames_editor_plugin.h
index a6fc53d344..383b831a23 100644
--- a/tools/editor/plugins/sprite_frames_editor_plugin.h
+++ b/tools/editor/plugins/sprite_frames_editor_plugin.h
@@ -73,7 +73,7 @@ class SpriteFramesEditor : public PanelContainer {
void _load_pressed();
void _load_scene_pressed();
- void _file_load_request(const DVector<String>& p_path, int p_at_pos=-1);
+ void _file_load_request(const PoolVector<String>& p_path, int p_at_pos=-1);
void _paste_pressed();
void _empty_pressed();
void _empty2_pressed();
diff --git a/tools/editor/plugins/tile_map_editor_plugin.cpp b/tools/editor/plugins/tile_map_editor_plugin.cpp
index c4bde13352..3dd86527b0 100644
--- a/tools/editor/plugins/tile_map_editor_plugin.cpp
+++ b/tools/editor/plugins/tile_map_editor_plugin.cpp
@@ -289,7 +289,7 @@ void TileMapEditor::_pick_tile(const Point2& p_pos) {
canvas_item_editor->update();
}
-DVector<Vector2> TileMapEditor::_bucket_fill(const Point2i& p_start, bool erase, bool preview) {
+PoolVector<Vector2> TileMapEditor::_bucket_fill(const Point2i& p_start, bool erase, bool preview) {
int prev_id = node->get_cell(p_start.x, p_start.y);
int id = TileMap::INVALID_CELL;
@@ -297,7 +297,7 @@ DVector<Vector2> TileMapEditor::_bucket_fill(const Point2i& p_start, bool erase,
id = get_selected_tile();
if (id == TileMap::INVALID_CELL)
- return DVector<Vector2>();
+ return PoolVector<Vector2>();
}
Rect2i r = node->get_item_rect();
@@ -324,7 +324,7 @@ DVector<Vector2> TileMapEditor::_bucket_fill(const Point2i& p_start, bool erase,
if(invalidate_cache) {
for(int i = 0; i < area; ++i)
bucket_cache_visited[i] = false;
- bucket_cache = DVector<Vector2>();
+ bucket_cache = PoolVector<Vector2>();
bucket_cache_tile = prev_id;
bucket_cache_rect = r;
}
@@ -333,7 +333,7 @@ DVector<Vector2> TileMapEditor::_bucket_fill(const Point2i& p_start, bool erase,
}
}
- DVector<Vector2> points;
+ PoolVector<Vector2> points;
List<Point2i> queue;
queue.push_back(p_start);
@@ -370,10 +370,10 @@ DVector<Vector2> TileMapEditor::_bucket_fill(const Point2i& p_start, bool erase,
return preview ? bucket_cache : points;
}
-void TileMapEditor::_fill_points(const DVector<Vector2> p_points, const Dictionary& p_op) {
+void TileMapEditor::_fill_points(const PoolVector<Vector2> p_points, const Dictionary& p_op) {
int len = p_points.size();
- DVector<Vector2>::Read pr = p_points.read();
+ PoolVector<Vector2>::Read pr = p_points.read();
int id = p_op["id"];
bool xf = p_op["flip_h"];
@@ -386,10 +386,10 @@ void TileMapEditor::_fill_points(const DVector<Vector2> p_points, const Dictiona
}
}
-void TileMapEditor::_erase_points(const DVector<Vector2> p_points) {
+void TileMapEditor::_erase_points(const PoolVector<Vector2> p_points) {
int len = p_points.size();
- DVector<Vector2>::Read pr = p_points.read();
+ PoolVector<Vector2>::Read pr = p_points.read();
for (int i=0;i<len;i++) {
@@ -507,8 +507,8 @@ void TileMapEditor::_draw_cell(int p_cell, const Point2i& p_point, bool p_flip_h
void TileMapEditor::_draw_fill_preview(int p_cell, const Point2i& p_point, bool p_flip_h, bool p_flip_v, bool p_transpose, const Matrix32& p_xform) {
- DVector<Vector2> points = _bucket_fill(p_point, false, true);
- DVector<Vector2>::Read pr = points.read();
+ PoolVector<Vector2> points = _bucket_fill(p_point, false, true);
+ PoolVector<Vector2>::Read pr = points.read();
int len = points.size();
int time_after = OS::get_singleton()->get_ticks_msec();
@@ -748,7 +748,7 @@ bool TileMapEditor::forward_input_event(const InputEvent& p_event) {
pop["flip_v"] = node->is_cell_y_flipped(over_tile.x, over_tile.y);
pop["transpose"] = node->is_cell_transposed(over_tile.x, over_tile.y);
- DVector<Vector2> points = _bucket_fill(over_tile);
+ PoolVector<Vector2> points = _bucket_fill(over_tile);
if (points.size() == 0)
return false;
@@ -854,7 +854,7 @@ bool TileMapEditor::forward_input_event(const InputEvent& p_event) {
pop["flip_v"] = node->is_cell_y_flipped(over_tile.x, over_tile.y);
pop["transpose"] = node->is_cell_transposed(over_tile.x, over_tile.y);
- DVector<Vector2> points = _bucket_fill(over_tile, true);
+ PoolVector<Vector2> points = _bucket_fill(over_tile, true);
if (points.size() == 0)
return false;
diff --git a/tools/editor/plugins/tile_map_editor_plugin.h b/tools/editor/plugins/tile_map_editor_plugin.h
index 612593c56a..5217453740 100644
--- a/tools/editor/plugins/tile_map_editor_plugin.h
+++ b/tools/editor/plugins/tile_map_editor_plugin.h
@@ -109,7 +109,7 @@ class TileMapEditor : public VBoxContainer {
bool * bucket_cache_visited;
Rect2i bucket_cache_rect;
int bucket_cache_tile;
- DVector<Vector2> bucket_cache;
+ PoolVector<Vector2> bucket_cache;
struct CellOp {
int idx;
@@ -134,10 +134,10 @@ class TileMapEditor : public VBoxContainer {
void _pick_tile(const Point2& p_pos);
- DVector<Vector2> _bucket_fill(const Point2i& p_start, bool erase=false, bool preview=false);
+ PoolVector<Vector2> _bucket_fill(const Point2i& p_start, bool erase=false, bool preview=false);
- void _fill_points(const DVector<Vector2> p_points, const Dictionary& p_op);
- void _erase_points(const DVector<Vector2> p_points);
+ void _fill_points(const PoolVector<Vector2> p_points, const Dictionary& p_op);
+ void _erase_points(const PoolVector<Vector2> p_points);
void _select(const Point2i& p_from, const Point2i& p_to);
diff --git a/tools/editor/project_export.cpp b/tools/editor/project_export.cpp
index b183de7c7b..2bb8a63cb7 100644
--- a/tools/editor/project_export.cpp
+++ b/tools/editor/project_export.cpp
@@ -1732,7 +1732,7 @@ Error ProjectExport::export_project(const String& p_preset) {
String selected=p_preset;
- DVector<String> preset_settings = GlobalConfig::get_singleton()->get("export_presets/"+selected);
+ PoolVector<String> preset_settings = GlobalConfig::get_singleton()->get("export_presets/"+selected);
String preset_path=GlobalConfig::get_singleton()->get("export_presets_path/"+selected);
if (preset_path=="") {
@@ -2084,7 +2084,7 @@ Error ProjectExport::export_project(const String& p_preset) {
for (Map<String,Map<String,String> >::Element *E=remapped_paths.front();E;E=E->next()) {
String platform=E->key();
- DVector<String> remaps;
+ PoolVector<String> remaps;
for(Map<String,String>::Element *F=E->get().front();F;F=F->next() ) {
remaps.push_back(F->key());
diff --git a/tools/editor/spatial_editor_gizmos.cpp b/tools/editor/spatial_editor_gizmos.cpp
index 809c824d91..ed96fe9e3f 100644
--- a/tools/editor/spatial_editor_gizmos.cpp
+++ b/tools/editor/spatial_editor_gizmos.cpp
@@ -117,10 +117,10 @@ void EditorSpatialGizmo::add_lines(const Vector<Vector3> &p_lines, const Ref<Mat
a[Mesh::ARRAY_VERTEX]=p_lines;
- DVector<Color> color;
+ PoolVector<Color> color;
color.resize(p_lines.size());
{
- DVector<Color>::Write w = color.write();
+ PoolVector<Color>::Write w = color.write();
for(int i=0;i<p_lines.size();i++) {
if (is_selected())
w[i]=Color(1,1,1,0.6);
@@ -246,10 +246,10 @@ void EditorSpatialGizmo::add_handles(const Vector<Vector3> &p_handles, bool p_bi
a.resize(VS::ARRAY_MAX);
a[VS::ARRAY_VERTEX]=p_handles;
print_line("handles?: "+itos(p_handles.size()));
- DVector<Color> colors;
+ PoolVector<Color> colors;
{
colors.resize(p_handles.size());
- DVector<Color>::Write w=colors.write();
+ PoolVector<Color>::Write w=colors.write();
for(int i=0;i<p_handles.size();i++) {
Color col(1,1,1,1);
@@ -1425,11 +1425,11 @@ void RoomSpatialGizmo::redraw() {
Ref<RoomBounds> roomie = room->get_room();
if (roomie.is_null())
return;
- DVector<Face3> faces = roomie->get_geometry_hint();
+ PoolVector<Face3> faces = roomie->get_geometry_hint();
Vector<Vector3> lines;
int fc=faces.size();
- DVector<Face3>::Read r =faces.read();
+ PoolVector<Face3>::Read r =faces.read();
Map<_EdgeKey,Vector3> edge_map;
@@ -2056,7 +2056,7 @@ void CollisionShapeSpatialGizmo::redraw(){
if (s->cast_to<ConvexPolygonShape>()) {
- DVector<Vector3> points = s->cast_to<ConvexPolygonShape>()->get_points();
+ PoolVector<Vector3> points = s->cast_to<ConvexPolygonShape>()->get_points();
if (points.size()>3) {
@@ -2562,8 +2562,8 @@ void NavigationMeshSpatialGizmo::redraw() {
if (navmeshie.is_null())
return;
- DVector<Vector3> vertices = navmeshie->get_vertices();
- DVector<Vector3>::Read vr=vertices.read();
+ PoolVector<Vector3> vertices = navmeshie->get_vertices();
+ PoolVector<Vector3>::Read vr=vertices.read();
List<Face3> faces;
for(int i=0;i<navmeshie->get_polygon_count();i++) {
Vector<int> p = navmeshie->get_polygon(i);
@@ -2582,11 +2582,11 @@ void NavigationMeshSpatialGizmo::redraw() {
return;
Map<_EdgeKey,bool> edge_map;
- DVector<Vector3> tmeshfaces;
+ PoolVector<Vector3> tmeshfaces;
tmeshfaces.resize(faces.size()*3);
{
- DVector<Vector3>::Write tw=tmeshfaces.write();
+ PoolVector<Vector3>::Write tw=tmeshfaces.write();
int tidx=0;
@@ -3391,8 +3391,8 @@ SpatialEditorGizmos::SpatialEditorGizmos() {
pos3d_mesh = Ref<Mesh>( memnew( Mesh ) );
{
- DVector<Vector3> cursor_points;
- DVector<Color> cursor_colors;
+ PoolVector<Vector3> cursor_points;
+ PoolVector<Color> cursor_colors;
float cs = 0.25;
cursor_points.push_back(Vector3(+cs,0,0));
cursor_points.push_back(Vector3(-cs,0,0));
@@ -3424,8 +3424,8 @@ SpatialEditorGizmos::SpatialEditorGizmos() {
listener_line_mesh = Ref<Mesh>(memnew(Mesh));
{
- DVector<Vector3> cursor_points;
- DVector<Color> cursor_colors;
+ PoolVector<Vector3> cursor_points;
+ PoolVector<Color> cursor_colors;
cursor_points.push_back(Vector3(0, 0, 0));
cursor_points.push_back(Vector3(0, 0, -1.0));
cursor_colors.push_back(Color(0.5, 0.5, 0.5, 0.7));
@@ -3491,7 +3491,7 @@ SpatialEditorGizmos::SpatialEditorGizmos() {
{
- DVector<Vector3> vertices;
+ PoolVector<Vector3> vertices;
#undef ADD_VTX
#define ADD_VTX(m_idx);\