summaryrefslogtreecommitdiff
path: root/tools/editor
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor')
-rw-r--r--tools/editor/code_editor.cpp2
-rw-r--r--tools/editor/editor_autoload_settings.cpp2
-rw-r--r--tools/editor/editor_help.cpp2
-rw-r--r--tools/editor/editor_node.cpp35
-rw-r--r--tools/editor/editor_profiler.cpp2
-rw-r--r--tools/editor/icons/SCsub2
-rw-r--r--tools/editor/io_plugins/editor_font_import_plugin.cpp10
-rw-r--r--tools/editor/io_plugins/editor_import_collada.cpp50
-rw-r--r--tools/editor/io_plugins/editor_scene_import_plugin.cpp58
-rw-r--r--tools/editor/io_plugins/editor_scene_importer_fbxconv.cpp3
-rw-r--r--tools/editor/io_plugins/editor_scene_importer_fbxconv.h2
-rw-r--r--tools/editor/io_plugins/editor_texture_import_plugin.cpp72
-rw-r--r--tools/editor/plugins/baked_light_baker.cpp11
-rw-r--r--tools/editor/plugins/baked_light_baker.h3
-rw-r--r--tools/editor/plugins/baked_light_editor_plugin.cpp5
-rw-r--r--tools/editor/plugins/baked_light_editor_plugin.h4
-rw-r--r--tools/editor/plugins/collision_polygon_editor_plugin.cpp3
-rw-r--r--tools/editor/plugins/collision_polygon_editor_plugin.h4
-rw-r--r--tools/editor/plugins/cube_grid_theme_editor_plugin.cpp3
-rw-r--r--tools/editor/plugins/cube_grid_theme_editor_plugin.h3
-rw-r--r--tools/editor/plugins/editor_preview_plugins.cpp17
-rw-r--r--tools/editor/plugins/editor_preview_plugins.h3
-rw-r--r--tools/editor/plugins/material_editor_plugin.cpp3
-rw-r--r--tools/editor/plugins/material_editor_plugin.h3
-rw-r--r--tools/editor/plugins/mesh_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/mesh_editor_plugin.h3
-rw-r--r--tools/editor/plugins/particles_2d_editor_plugin.cpp4
-rw-r--r--tools/editor/plugins/particles_editor_plugin.cpp3
-rw-r--r--tools/editor/plugins/particles_editor_plugin.h3
-rw-r--r--tools/editor/plugins/path_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/path_editor_plugin.h3
-rw-r--r--tools/editor/plugins/polygon_2d_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/sample_editor_plugin.cpp4
-rw-r--r--tools/editor/plugins/sample_library_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/shader_editor_plugin.cpp3
-rw-r--r--tools/editor/plugins/shader_editor_plugin.h4
-rw-r--r--tools/editor/plugins/shader_graph_editor_plugin.cpp4
-rw-r--r--tools/editor/plugins/shader_graph_editor_plugin.h4
-rw-r--r--tools/editor/plugins/spatial_editor_plugin.cpp86
-rw-r--r--tools/editor/plugins/spatial_editor_plugin.h2
-rw-r--r--tools/editor/project_manager.cpp4
-rw-r--r--tools/editor/pvrtc_compress.cpp2
-rw-r--r--tools/editor/scene_tree_editor.cpp2
-rw-r--r--tools/editor/spatial_editor_gizmos.cpp3
-rw-r--r--tools/editor/spatial_editor_gizmos.h4
45 files changed, 242 insertions, 206 deletions
diff --git a/tools/editor/code_editor.cpp b/tools/editor/code_editor.cpp
index 9240e3527c..6fb796ae6a 100644
--- a/tools/editor/code_editor.cpp
+++ b/tools/editor/code_editor.cpp
@@ -895,7 +895,7 @@ void FindReplaceDialog::_bind_methods() {
FindReplaceDialog::FindReplaceDialog() {
- set_self_opacity(0.8);
+ set_self_modulate(Color(1,1,1,0.8));
VBoxContainer *vb = memnew( VBoxContainer );
add_child(vb);
diff --git a/tools/editor/editor_autoload_settings.cpp b/tools/editor/editor_autoload_settings.cpp
index 97062b1480..bf8a891247 100644
--- a/tools/editor/editor_autoload_settings.cpp
+++ b/tools/editor/editor_autoload_settings.cpp
@@ -399,7 +399,7 @@ Variant EditorAutoloadSettings::get_drag_data_fw(const Point2& p_point, Control
for (int i = 0; i < max_size; i++) {
Label *label = memnew( Label(autoloads[i]) );
- label->set_self_opacity(Math::lerp(1, 0, float(i)/PREVIEW_LIST_MAX_SIZE));
+ label->set_self_modulate(Color(1,1,1,Math::lerp(1, 0, float(i)/PREVIEW_LIST_MAX_SIZE)));
preview->add_child(label);
}
diff --git a/tools/editor/editor_help.cpp b/tools/editor/editor_help.cpp
index 4f83dc2f66..628870c70f 100644
--- a/tools/editor/editor_help.cpp
+++ b/tools/editor/editor_help.cpp
@@ -1710,7 +1710,7 @@ EditorHelp::EditorHelp() {
search_dialog->get_ok()->set_text(TTR("Find"));
search_dialog->connect("confirmed",this,"_search_cbk");
search_dialog->set_hide_on_ok(false);
- search_dialog->set_self_opacity(0.8);
+ search_dialog->set_self_modulate(Color(1,1,1,0.8));
/*class_search = memnew( EditorHelpSearch(editor) );
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index 8274272a7e..7f02624107 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -907,10 +907,11 @@ void EditorNode::_save_scene_with_preview(String p_file) {
_editor_select(is2d?EDITOR_2D:EDITOR_3D);
- VS::get_singleton()->viewport_queue_screen_capture(viewport);
+
save.step(TTR("Creating Thumbnail"),2);
save.step(TTR("Creating Thumbnail"),3);
- Image img = VS::get_singleton()->viewport_get_screen_capture(viewport);
+#if 0
+ Image img = VS::get_singleton()->viewport_texture(scree_capture(viewport);
int preview_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size");;
preview_size*=EDSCALE;
int width,height;
@@ -928,7 +929,7 @@ void EditorNode::_save_scene_with_preview(String p_file) {
height=img.get_height();
}
- img.convert(Image::FORMAT_RGB);
+ img.convert(Image::FORMAT_RGB8);
img.resize(width,height);
String pfile = EditorSettings::get_singleton()->get_settings_path().plus_file("tmp/last_scene_preview.png");
@@ -940,7 +941,7 @@ void EditorNode::_save_scene_with_preview(String p_file) {
if (editor_data.get_edited_scene_import_metadata().is_null())
editor_data.set_edited_scene_import_metadata(Ref<ResourceImportMetadata>( memnew( ResourceImportMetadata ) ) );
editor_data.get_edited_scene_import_metadata()->set_option("thumbnail",imgdata);
-
+#endif
//tamanio tel thumbnail
if (screen!=-1) {
_editor_select(screen);
@@ -1243,7 +1244,7 @@ void EditorNode::_dialog_action(String p_file) {
ml = Ref<MeshLibrary>( memnew( MeshLibrary ));
}
- MeshLibraryEditor::update_library_file(editor_data.get_edited_scene_root(),ml,true);
+// MeshLibraryEditor::update_library_file(editor_data.get_edited_scene_root(),ml,true);
Error err = ResourceSaver::save(p_file,ml);
if (err) {
@@ -4145,7 +4146,7 @@ void EditorNode::register_editor_types() {
ObjectTypeDB::register_type<EditorFileDialog>();
//ObjectTypeDB::register_type<EditorImportExport>();
ObjectTypeDB::register_type<EditorSettings>();
- ObjectTypeDB::register_type<EditorSpatialGizmo>();
+// ObjectTypeDB::register_type<EditorSpatialGizmo>();
ObjectTypeDB::register_type<EditorResourcePreview>();
ObjectTypeDB::register_type<EditorResourcePreviewGenerator>();
ObjectTypeDB::register_type<EditorFileSystem>();
@@ -6537,10 +6538,10 @@ EditorNode::EditorNode() {
//more visually meaningful to have this later
raise_bottom_panel_item(AnimationPlayerEditor::singleton);
- add_editor_plugin( memnew( ShaderGraphEditorPlugin(this,true) ) );
+/* add_editor_plugin( memnew( ShaderGraphEditorPlugin(this,true) ) );
add_editor_plugin( memnew( ShaderGraphEditorPlugin(this,false) ) );
add_editor_plugin( memnew( ShaderEditorPlugin(this,true) ) );
- add_editor_plugin( memnew( ShaderEditorPlugin(this,false) ) );
+ add_editor_plugin( memnew( ShaderEditorPlugin(this,false) ) );*/
add_editor_plugin( memnew( CameraEditorPlugin(this) ) );
add_editor_plugin( memnew( SampleEditorPlugin(this) ) );
add_editor_plugin( memnew( SampleLibraryEditorPlugin(this) ) );
@@ -6549,14 +6550,14 @@ EditorNode::EditorNode() {
add_editor_plugin( memnew( MeshInstanceEditorPlugin(this) ) );
add_editor_plugin( memnew( AnimationTreeEditorPlugin(this) ) );
//add_editor_plugin( memnew( SamplePlayerEditorPlugin(this) ) ); - this is kind of useless at this point
- add_editor_plugin( memnew( MeshLibraryEditorPlugin(this) ) );
+// add_editor_plugin( memnew( MeshLibraryEditorPlugin(this) ) );
//add_editor_plugin( memnew( StreamEditorPlugin(this) ) );
add_editor_plugin( memnew( StyleBoxEditorPlugin(this) ) );
- add_editor_plugin( memnew( ParticlesEditorPlugin(this) ) );
+ //add_editor_plugin( memnew( ParticlesEditorPlugin(this) ) );
add_editor_plugin( memnew( ResourcePreloaderEditorPlugin(this) ) );
add_editor_plugin( memnew( ItemListEditorPlugin(this) ) );
//add_editor_plugin( memnew( RichTextEditorPlugin(this) ) );
- add_editor_plugin( memnew( CollisionPolygonEditorPlugin(this) ) );
+// add_editor_plugin( memnew( CollisionPolygonEditorPlugin(this) ) );
add_editor_plugin( memnew( CollisionPolygon2DEditorPlugin(this) ) );
add_editor_plugin( memnew( TileSetEditorPlugin(this) ) );
add_editor_plugin( memnew( TileMapEditorPlugin(this) ) );
@@ -6564,16 +6565,16 @@ EditorNode::EditorNode() {
add_editor_plugin( memnew( TextureRegionEditorPlugin(this) ) );
add_editor_plugin( memnew( Particles2DEditorPlugin(this) ) );
add_editor_plugin( memnew( Path2DEditorPlugin(this) ) );
- add_editor_plugin( memnew( PathEditorPlugin(this) ) );
- add_editor_plugin( memnew( BakedLightEditorPlugin(this) ) );
+// add_editor_plugin( memnew( PathEditorPlugin(this) ) );
+ //add_editor_plugin( memnew( BakedLightEditorPlugin(this) ) );
add_editor_plugin( memnew( Polygon2DEditorPlugin(this) ) );
add_editor_plugin( memnew( LightOccluder2DEditorPlugin(this) ) );
add_editor_plugin( memnew( NavigationPolygonEditorPlugin(this) ) );
add_editor_plugin( memnew( ColorRampEditorPlugin(this) ) );
add_editor_plugin( memnew( CollisionShape2DEditorPlugin(this) ) );
add_editor_plugin( memnew( TextureEditorPlugin(this) ) );
- add_editor_plugin( memnew( MaterialEditorPlugin(this) ) );
- add_editor_plugin( memnew( MeshEditorPlugin(this) ) );
+// add_editor_plugin( memnew( MaterialEditorPlugin(this) ) );
+// add_editor_plugin( memnew( MeshEditorPlugin(this) ) );
for(int i=0;i<EditorPlugins::get_plugin_count();i++)
add_editor_plugin( EditorPlugins::create(i,this) );
@@ -6582,14 +6583,14 @@ EditorNode::EditorNode() {
plugin_init_callbacks[i]();
}
- resource_preview->add_preview_generator( Ref<EditorTexturePreviewPlugin>( memnew(EditorTexturePreviewPlugin )));
+ /*resource_preview->add_preview_generator( Ref<EditorTexturePreviewPlugin>( memnew(EditorTexturePreviewPlugin )));
resource_preview->add_preview_generator( Ref<EditorPackedScenePreviewPlugin>( memnew(EditorPackedScenePreviewPlugin )));
resource_preview->add_preview_generator( Ref<EditorMaterialPreviewPlugin>( memnew(EditorMaterialPreviewPlugin )));
resource_preview->add_preview_generator( Ref<EditorScriptPreviewPlugin>( memnew(EditorScriptPreviewPlugin )));
resource_preview->add_preview_generator( Ref<EditorSamplePreviewPlugin>( memnew(EditorSamplePreviewPlugin )));
resource_preview->add_preview_generator( Ref<EditorMeshPreviewPlugin>( memnew(EditorMeshPreviewPlugin )));
resource_preview->add_preview_generator( Ref<EditorBitmapPreviewPlugin>( memnew(EditorBitmapPreviewPlugin )));
-
+*/
circle_step_msec=OS::get_singleton()->get_ticks_msec();
diff --git a/tools/editor/editor_profiler.cpp b/tools/editor/editor_profiler.cpp
index 13327f0be9..435ad78b89 100644
--- a/tools/editor/editor_profiler.cpp
+++ b/tools/editor/editor_profiler.cpp
@@ -338,7 +338,7 @@ void EditorProfiler::_update_plot() {
wr = DVector<uint8_t>::Write();
- Image img(w,h,0,Image::FORMAT_RGBA,graph_image);
+ Image img(w,h,0,Image::FORMAT_RGBA8,graph_image);
if (reset_texture) {
diff --git a/tools/editor/icons/SCsub b/tools/editor/icons/SCsub
index 44e28f49e6..e9054f30d9 100644
--- a/tools/editor/icons/SCsub
+++ b/tools/editor/icons/SCsub
@@ -63,7 +63,7 @@ def make_editor_icons_action(target, source, env):
s.write("\tRef<ImageTexture> texture( memnew( ImageTexture ) );\n")
s.write("\tbool use_hidpi_image=(editor_get_scale()>1.0&&p_hidpi_png);\n")
s.write("\tImage img(use_hidpi_image?p_hidpi_png:p_png);\n")
- s.write("\tif (editor_get_scale()>1.0 && !p_hidpi_png) { img.convert(Image::FORMAT_RGBA); img.expand_x2_hq2x(); use_hidpi_image=true;}\n")
+ s.write("\tif (editor_get_scale()>1.0 && !p_hidpi_png) { img.convert(Image::FORMAT_RGBA8); img.expand_x2_hq2x(); use_hidpi_image=true;}\n")
s.write("\timg.resize(img.get_width()*EDSCALE/(use_hidpi_image?2:1),img.get_height()*EDSCALE/(use_hidpi_image?2:1));\n")
s.write("\ttexture->create_from_image( img,ImageTexture::FLAG_FILTER );\n")
s.write("\treturn texture;\n")
diff --git a/tools/editor/io_plugins/editor_font_import_plugin.cpp b/tools/editor/io_plugins/editor_font_import_plugin.cpp
index df3741f0d4..0a3b0d4917 100644
--- a/tools/editor/io_plugins/editor_font_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_font_import_plugin.cpp
@@ -1330,7 +1330,7 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe
if (err==OK) {
for(int i=0;i<height;i++){
- color[i]=img.get_pixel(0,i*img.get_height()/height);
+ //color[i]=img.get_pixel(0,i*img.get_height()/height);
}
} else {
@@ -1514,7 +1514,7 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe
w=DVector<uint8_t>::Write();
- Image img(s.width,s.height,0,Image::FORMAT_RGBA,pixels);
+ Image img(s.width,s.height,0,Image::FORMAT_RGBA8,pixels);
font_data_list[i]->blit=img;
font_data_list[i]->blit_ofs=o;
@@ -1537,7 +1537,7 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe
res_size.y=nearest_power_of_2(res_size.y);
print_line("Atlas size: "+res_size);
- Image atlas(res_size.x,res_size.y,0,Image::FORMAT_RGBA);
+ Image atlas(res_size.x,res_size.y,0,Image::FORMAT_RGBA8);
for(int i=0;i<font_data_list.size();i++) {
@@ -1565,12 +1565,12 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe
}
}
- atlas=Image(res_size.x,res_size.y,0,Image::FORMAT_RGBA,data);
+ atlas=Image(res_size.x,res_size.y,0,Image::FORMAT_RGBA8,data);
}
if (from->has_option("color/monochrome") && bool(from->get_option("color/monochrome"))) {
- atlas.convert(Image::FORMAT_GRAYSCALE_ALPHA);
+ atlas.convert(Image::FORMAT_LA8);
}
diff --git a/tools/editor/io_plugins/editor_import_collada.cpp b/tools/editor/io_plugins/editor_import_collada.cpp
index 1130e2be30..6b1873d49a 100644
--- a/tools/editor/io_plugins/editor_import_collada.cpp
+++ b/tools/editor/io_plugins/editor_import_collada.cpp
@@ -237,8 +237,8 @@ Error ColladaImport::_create_scene(Collada::Node *p_node, Spatial *p_parent) {
//well, it's an ambient light..
Light *l = memnew( DirectionalLight );
// l->set_color(Light::COLOR_AMBIENT,ld.color);
- l->set_color(Light::COLOR_DIFFUSE,Color(0,0,0));
- l->set_color(Light::COLOR_SPECULAR,Color(0,0,0));
+// l->set_color(Light::COLOR_DIFFUSE,Color(0,0,0));
+// l->set_color(Light::COLOR_SPECULAR,Color(0,0,0));
node = l;
} else if (ld.mode==Collada::LightData::MODE_DIRECTIONAL) {
@@ -248,8 +248,8 @@ Error ColladaImport::_create_scene(Collada::Node *p_node, Spatial *p_parent) {
//if (found_ambient) //use it here
// l->set_color(Light::COLOR_AMBIENT,ambient);
- l->set_color(Light::COLOR_DIFFUSE,ld.color);
- l->set_color(Light::COLOR_SPECULAR,Color(1,1,1));
+// l->set_color(Light::COLOR_DIFFUSE,ld.color);
+// l->set_color(Light::COLOR_SPECULAR,Color(1,1,1));
node = l;
} else {
@@ -259,14 +259,14 @@ Error ColladaImport::_create_scene(Collada::Node *p_node, Spatial *p_parent) {
l=memnew( OmniLight );
else {
l=memnew( SpotLight );
- l->set_parameter(Light::PARAM_SPOT_ANGLE,ld.spot_angle);
- l->set_parameter(Light::PARAM_SPOT_ATTENUATION,ld.spot_exp);
+// l->set_parameter(Light::PARAM_SPOT_ANGLE,ld.spot_angle);
+// l->set_parameter(Light::PARAM_SPOT_ATTENUATION,ld.spot_exp);
}
//
- l->set_color(Light::COLOR_DIFFUSE,ld.color);
- l->set_color(Light::COLOR_SPECULAR,Color(1,1,1));
- l->approximate_opengl_attenuation(ld.constant_att,ld.linear_att,ld.quad_att);
+// l->set_color(Light::COLOR_DIFFUSE,ld.color);
+// l->set_color(Light::COLOR_SPECULAR,Color(1,1,1));
+// l->approximate_opengl_attenuation(ld.constant_att,ld.linear_att,ld.quad_att);
node=l;
}
@@ -394,14 +394,14 @@ Error ColladaImport::_create_material(const String& p_target) {
Ref<Texture> texture = ResourceLoader::load(texfile,"Texture");
if (texture.is_valid()) {
- material->set_texture(FixedMaterial::PARAM_DIFFUSE,texture);
- material->set_parameter(FixedMaterial::PARAM_DIFFUSE,Color(1,1,1,1));
+// material->set_texture(FixedMaterial::PARAM_DIFFUSE,texture);
+// material->set_parameter(FixedMaterial::PARAM_DIFFUSE,Color(1,1,1,1));
} else {
missing_textures.push_back(texfile.get_file());
}
}
} else {
- material->set_parameter(FixedMaterial::PARAM_DIFFUSE,effect.diffuse.color);
+// material->set_parameter(FixedMaterial::PARAM_DIFFUSE,effect.diffuse.color);
}
// SPECULAR
@@ -414,15 +414,15 @@ Error ColladaImport::_create_material(const String& p_target) {
Ref<Texture> texture = ResourceLoader::load(texfile,"Texture");
if (texture.is_valid()) {
- material->set_texture(FixedMaterial::PARAM_SPECULAR,texture);
- material->set_parameter(FixedMaterial::PARAM_SPECULAR,Color(1,1,1,1));
+// material->set_texture(FixedMaterial::PARAM_SPECULAR,texture);
+// material->set_parameter(FixedMaterial::PARAM_SPECULAR,Color(1,1,1,1));
} else {
missing_textures.push_back(texfile.get_file());
}
}
} else {
- material->set_parameter(FixedMaterial::PARAM_SPECULAR,effect.specular.color);
+// material->set_parameter(FixedMaterial::PARAM_SPECULAR,effect.specular.color);
}
// EMISSION
@@ -435,15 +435,15 @@ Error ColladaImport::_create_material(const String& p_target) {
Ref<Texture> texture = ResourceLoader::load(texfile,"Texture");
if (texture.is_valid()) {
- material->set_texture(FixedMaterial::PARAM_EMISSION,texture);
- material->set_parameter(FixedMaterial::PARAM_EMISSION,Color(1,1,1,1));
+// material->set_texture(FixedMaterial::PARAM_EMISSION,texture);
+// material->set_parameter(FixedMaterial::PARAM_EMISSION,Color(1,1,1,1));
}else {
- missing_textures.push_back(texfile.get_file());
+// missing_textures.push_back(texfile.get_file());
}
}
} else {
- material->set_parameter(FixedMaterial::PARAM_EMISSION,effect.emission.color);
+// material->set_parameter(FixedMaterial::PARAM_EMISSION,effect.emission.color);
}
// NORMAL
@@ -456,18 +456,18 @@ Error ColladaImport::_create_material(const String& p_target) {
Ref<Texture> texture = ResourceLoader::load(texfile,"Texture");
if (texture.is_valid()) {
- material->set_texture(FixedMaterial::PARAM_NORMAL,texture);
+ // material->set_texture(FixedMaterial::PARAM_NORMAL,texture);
}else {
- missing_textures.push_back(texfile.get_file());
+// missing_textures.push_back(texfile.get_file());
}
}
}
- material->set_parameter(FixedMaterial::PARAM_SPECULAR_EXP,effect.shininess);
- material->set_flag(Material::FLAG_DOUBLE_SIDED,effect.double_sided);
- material->set_flag(Material::FLAG_UNSHADED,effect.unshaded);
+// material->set_parameter(FixedMaterial::PARAM_SPECULAR_EXP,effect.shininess);
+// material->set_flag(Material::FLAG_DOUBLE_SIDED,effect.double_sided);
+// material->set_flag(Material::FLAG_UNSHADED,effect.unshaded);
@@ -1196,7 +1196,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,con
tarrayw = DVector<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() && material->get_texture(FixedMaterial::PARAM_NORMAL).is_valid()))){
+ } else if (final_normal_array.size() && primitive==Mesh::PRIMITIVE_TRIANGLES && final_uv_array.size() && (force_make_tangents || (material.is_valid()))){
//if this uses triangles, there are uvs and the material is using a normalmap, generate tangents and binormals, because they WILL be needed
//generate binormals/tangents
_generate_tangents_and_binormals(index_array,final_vertex_array,final_uv_array,final_normal_array,final_tangent_array);
diff --git a/tools/editor/io_plugins/editor_scene_import_plugin.cpp b/tools/editor/io_plugins/editor_scene_import_plugin.cpp
index 190b56faba..9d68807c46 100644
--- a/tools/editor/io_plugins/editor_scene_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_scene_import_plugin.cpp
@@ -1406,9 +1406,9 @@ void EditorSceneImportPlugin::_find_resources(const Variant& p_var, Map<Ref<Imag
if (tex.is_valid()) {
image_map.insert(tex,TEXTURE_ROLE_NORMALMAP);
- if (p_flags&SCENE_FLAG_CONVERT_NORMALMAPS_TO_XY)
- res->cast_to<FixedMaterial>()->set_fixed_flag(FixedMaterial::FLAG_USE_XY_NORMALMAP,true);
- }
+ //if (p_flags&SCENE_FLAG_CONVERT_NORMALMAPS_TO_XY)
+ // res->cast_to<FixedMaterial>()->set_fixed_flag(FixedMaterial::FLAG_USE_XY_NORMALMAP,true);
+ }//
} else {
@@ -1516,10 +1516,10 @@ Node* EditorSceneImportPlugin::_fix_node(Node *p_node,Node *p_root,Map<Ref<Mesh>
Ref<FixedMaterial> fm = m->surface_get_material(i);
if (fm.is_valid()) {
- fm->set_flag(Material::FLAG_UNSHADED,true);
- fm->set_flag(Material::FLAG_DOUBLE_SIDED,true);
- fm->set_depth_draw_mode(Material::DEPTH_DRAW_NEVER);
- fm->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA,true);
+ // fm->set_flag(Material::FLAG_UNSHADED,true);
+ // fm->set_flag(Material::FLAG_DOUBLE_SIDED,true);
+ // fm->set_depth_draw_mode(Material::DEPTH_DRAW_NEVER);
+ // fm->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA,true);
}
}
}
@@ -1543,17 +1543,17 @@ Node* EditorSceneImportPlugin::_fix_node(Node *p_node,Node *p_root,Map<Ref<Mesh>
if (p_flags&SCENE_FLAG_DETECT_ALPHA && _teststr(mat->get_name(),"alpha")) {
- mat->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA,true);
- mat->set_name(_fixstr(mat->get_name(),"alpha"));
+ // mat->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA,true);
+ // mat->set_name(_fixstr(mat->get_name(),"alpha"));
}
if (p_flags&SCENE_FLAG_DETECT_VCOLOR && _teststr(mat->get_name(),"vcol")) {
- mat->set_fixed_flag(FixedMaterial::FLAG_USE_COLOR_ARRAY,true);
- mat->set_name(_fixstr(mat->get_name(),"vcol"));
+ //mat->set_fixed_flag(FixedMaterial::FLAG_USE_COLOR_ARRAY,true);
+ //mat->set_name(_fixstr(mat->get_name(),"vcol"));
}
if (p_flags&SCENE_FLAG_SET_LIGHTMAP_TO_UV2_IF_EXISTS && m->surface_get_format(i)&Mesh::ARRAY_FORMAT_TEX_UV2) {
- mat->set_flag(Material::FLAG_LIGHTMAP_ON_UV2,true);
+ //mat->set_flag(Material::FLAG_LIGHTMAP_ON_UV2,true);
}
}
@@ -1612,11 +1612,11 @@ Node* EditorSceneImportPlugin::_fix_node(Node *p_node,Node *p_root,Map<Ref<Mesh>
float dist = d.to_double();
mi->set_flag(GeometryInstance::FLAG_BILLBOARD,true);
mi->set_flag(GeometryInstance::FLAG_BILLBOARD_FIX_Y,true);
- mi->set_draw_range_begin(dist);
- mi->set_draw_range_end(100000);
+ //mi->set_draw_range_begin(dist);
+ //mi->set_draw_range_end(100000);
- mip->set_draw_range_begin(0);
- mip->set_draw_range_end(dist);
+ //mip->set_draw_range_begin(0);
+ //mip->set_draw_range_end(dist);
if (mi->get_mesh().is_valid()) {
@@ -1625,10 +1625,10 @@ Node* EditorSceneImportPlugin::_fix_node(Node *p_node,Node *p_root,Map<Ref<Mesh>
Ref<FixedMaterial> fm = m->surface_get_material(i);
if (fm.is_valid()) {
- fm->set_flag(Material::FLAG_UNSHADED,true);
- fm->set_flag(Material::FLAG_DOUBLE_SIDED,true);
- fm->set_depth_draw_mode(Material::DEPTH_DRAW_NEVER);
- fm->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA,true);
+ // fm->set_flag(Material::FLAG_UNSHADED,true);
+ // fm->set_flag(Material::FLAG_DOUBLE_SIDED,true);
+ // fm->set_depth_draw_mode(Material::DEPTH_DRAW_NEVER);
+ // fm->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA,true);
}
}
}
@@ -1660,11 +1660,11 @@ Node* EditorSceneImportPlugin::_fix_node(Node *p_node,Node *p_root,Map<Ref<Mesh>
d=d.substr(1,d.length());
if (d.length() && d[0]>='0' && d[0]<='9') {
float dist = d.to_double();
- mi->set_draw_range_begin(dist);
- mi->set_draw_range_end(100000);
+ /// mi->set_draw_range_begin(dist);
+ // mi->set_draw_range_end(100000);
- mip->set_draw_range_begin(0);
- mip->set_draw_range_end(dist);
+ // mip->set_draw_range_begin(0);
+ // mip->set_draw_range_end(dist);
/*if (mi->get_mesh().is_valid()) {
@@ -1888,8 +1888,8 @@ Node* EditorSceneImportPlugin::_fix_node(Node *p_node,Node *p_root,Map<Ref<Mesh>
BSP_Tree bsptree(faces);
Ref<RoomBounds> area = memnew( RoomBounds );
- area->set_bounds(faces);
- area->set_geometry_hint(faces);
+ //area->set_bounds(faces);
+ //area->set_geometry_hint(faces);
Room * room = memnew( Room );
@@ -1917,7 +1917,7 @@ Node* EditorSceneImportPlugin::_fix_node(Node *p_node,Node *p_root,Map<Ref<Mesh>
memdelete(p_node);
p_node=room;
- room->compute_room_from_subtree();
+ //room->compute_room_from_subtree();
} else if (p_flags&SCENE_FLAG_CREATE_PORTALS &&_teststr(name,"portal") && p_node->cast_to<MeshInstance>()) {
@@ -2047,7 +2047,7 @@ Node* EditorSceneImportPlugin::_fix_node(Node *p_node,Node *p_root,Map<Ref<Mesh>
Ref<FixedMaterial> fm = mesh->surface_get_material(i);
if (fm.is_valid()) {
String name = fm->get_name();
- if (_teststr(name,"alpha")) {
+ /* if (_teststr(name,"alpha")) {
fm->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA,true);
name=_fixstr(name,"alpha");
}
@@ -2055,7 +2055,7 @@ Node* EditorSceneImportPlugin::_fix_node(Node *p_node,Node *p_root,Map<Ref<Mesh>
if (_teststr(name,"vcol")) {
fm->set_fixed_flag(FixedMaterial::FLAG_USE_COLOR_ARRAY,true);
name=_fixstr(name,"vcol");
- }
+ }*/
fm->set_name(name);
}
}
diff --git a/tools/editor/io_plugins/editor_scene_importer_fbxconv.cpp b/tools/editor/io_plugins/editor_scene_importer_fbxconv.cpp
index ac3c4637c2..f117182365 100644
--- a/tools/editor/io_plugins/editor_scene_importer_fbxconv.cpp
+++ b/tools/editor/io_plugins/editor_scene_importer_fbxconv.cpp
@@ -33,7 +33,7 @@
#include "scene/3d/mesh_instance.h"
#include "scene/animation/animation_player.h"
-
+#if 0
String EditorSceneImporterFBXConv::_id(const String& p_id) const {
return p_id.replace(":","_").replace("/","_");
@@ -1132,3 +1132,4 @@ EditorSceneImporterFBXConv::EditorSceneImporterFBXConv() {
#endif
}
+#endif
diff --git a/tools/editor/io_plugins/editor_scene_importer_fbxconv.h b/tools/editor/io_plugins/editor_scene_importer_fbxconv.h
index b0cbc07ba3..e23c0e2faa 100644
--- a/tools/editor/io_plugins/editor_scene_importer_fbxconv.h
+++ b/tools/editor/io_plugins/editor_scene_importer_fbxconv.h
@@ -32,6 +32,7 @@
#include "tools/editor/io_plugins/editor_scene_import_plugin.h"
#include "scene/3d/skeleton.h"
+#if 0
class EditorSceneImporterFBXConv : public EditorSceneImporter {
@@ -107,3 +108,4 @@ public:
};
#endif // EDITOR_SCENE_IMPORTER_FBXCONV_H
+#endif
diff --git a/tools/editor/io_plugins/editor_texture_import_plugin.cpp b/tools/editor/io_plugins/editor_texture_import_plugin.cpp
index 2935ea8fe2..4397956be7 100644
--- a/tools/editor/io_plugins/editor_texture_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_texture_import_plugin.cpp
@@ -843,33 +843,27 @@ void EditorTextureImportPlugin::compress_image(EditorExportPlatform::ImageCompre
//do absolutely nothing
- } break;
- case EditorExportPlatform::IMAGE_COMPRESSION_INDEXED: {
-
- //quantize
- image.quantize();
-
- } break;
+ } break;
case EditorExportPlatform::IMAGE_COMPRESSION_BC: {
// for maximum compatibility, BC shall always use mipmaps and be PO2
image.resize_to_po2();
- if (image.get_mipmaps()==0)
+ if (!image.has_mipmaps())
image.generate_mipmaps();
- image.compress(Image::COMPRESS_BC);
+ image.compress(Image::COMPRESS_S3TC);
/*
if (has_alpha) {
if (flags&IMAGE_FLAG_ALPHA_BIT) {
- image.convert(Image::FORMAT_BC3);
+ image.convert(Image::FORMAT_DXT5);
} else {
- image.convert(Image::FORMAT_BC2);
+ image.convert(Image::FORMAT_DXT3);
}
} else {
- image.convert(Image::FORMAT_BC1);
+ image.convert(Image::FORMAT_DXT1);
}*/
@@ -880,24 +874,24 @@ void EditorTextureImportPlugin::compress_image(EditorExportPlatform::ImageCompre
// for maximum compatibility (hi apple!), PVRT shall always
// use mipmaps, be PO2 and square
- if (image.get_mipmaps()==0)
+ if (!image.has_mipmaps())
image.generate_mipmaps();
image.resize_to_po2(true);
if (p_smaller) {
image.compress(Image::COMPRESS_PVRTC2);
- //image.convert(has_alpha ? Image::FORMAT_PVRTC2_ALPHA : Image::FORMAT_PVRTC2);
+ //image.convert(has_alpha ? Image::FORMAT_PVRTC2A : Image::FORMAT_PVRTC2);
} else {
image.compress(Image::COMPRESS_PVRTC4);
- //image.convert(has_alpha ? Image::FORMAT_PVRTC4_ALPHA : Image::FORMAT_PVRTC4);
+ //image.convert(has_alpha ? Image::FORMAT_PVRTC4A : Image::FORMAT_PVRTC4);
}
} break;
case EditorExportPlatform::IMAGE_COMPRESSION_ETC1: {
image.resize_to_po2(); //square or not?
- if (image.get_mipmaps()==0)
+ if (!image.has_mipmaps())
image.generate_mipmaps();
if (!image.detect_alpha()) {
//ETC1 is only opaque
@@ -930,18 +924,18 @@ Error EditorTextureImportPlugin::_process_texture_data(Ref<ImageTexture> &textur
ERR_FAIL_COND_V(image.empty(),ERR_INVALID_DATA);
bool has_alpha=image.detect_alpha();
- if (!has_alpha && image.get_format()==Image::FORMAT_RGBA) {
+ if (!has_alpha && image.get_format()==Image::FORMAT_RGBA8) {
- image.convert(Image::FORMAT_RGB);
+ image.convert(Image::FORMAT_RGB8);
}
- if (image.get_format()==Image::FORMAT_RGBA && flags&IMAGE_FLAG_FIX_BORDER_ALPHA) {
+ if (image.get_format()==Image::FORMAT_RGBA8 && flags&IMAGE_FLAG_FIX_BORDER_ALPHA) {
image.fix_alpha_edges();
}
- if (image.get_format()==Image::FORMAT_RGBA && flags&IMAGE_FLAG_PREMULT_ALPHA) {
+ if (image.get_format()==Image::FORMAT_RGBA8 && flags&IMAGE_FLAG_PREMULT_ALPHA) {
image.premultiply_alpha();
}
@@ -950,7 +944,7 @@ Error EditorTextureImportPlugin::_process_texture_data(Ref<ImageTexture> &textur
image.normalmap_to_xy();
}
- //if ((image.get_format()==Image::FORMAT_RGB || image.get_format()==Image::FORMAT_RGBA) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) {
+ //if ((image.get_format()==Image::FORMAT_RGB8 || image.get_format()==Image::FORMAT_RGBA8) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) {
// image.srgb_to_linear();
//}
@@ -989,18 +983,18 @@ Error EditorTextureImportPlugin::_process_texture_data(Ref<ImageTexture> &textur
bool has_alpha=image.detect_alpha();
- if (!has_alpha && image.get_format()==Image::FORMAT_RGBA) {
+ if (!has_alpha && image.get_format()==Image::FORMAT_RGBA8) {
- image.convert(Image::FORMAT_RGB);
+ image.convert(Image::FORMAT_RGB8);
}
- if (image.get_format()==Image::FORMAT_RGBA && flags&IMAGE_FLAG_FIX_BORDER_ALPHA) {
+ if (image.get_format()==Image::FORMAT_RGBA8 && flags&IMAGE_FLAG_FIX_BORDER_ALPHA) {
image.fix_alpha_edges();
}
- if (image.get_format()==Image::FORMAT_RGBA && flags&IMAGE_FLAG_PREMULT_ALPHA) {
+ if (image.get_format()==Image::FORMAT_RGBA8 && flags&IMAGE_FLAG_PREMULT_ALPHA) {
image.premultiply_alpha();
}
@@ -1009,7 +1003,7 @@ Error EditorTextureImportPlugin::_process_texture_data(Ref<ImageTexture> &textur
image.normalmap_to_xy();
}
- //if ((image.get_format()==Image::FORMAT_RGB || image.get_format()==Image::FORMAT_RGBA) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) {
+ //if ((image.get_format()==Image::FORMAT_RGB8 || image.get_format()==Image::FORMAT_RGBA8) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) {
//
// print_line("CONVERT BECAUSE: "+itos(flags));
// image.srgb_to_linear();
@@ -1200,9 +1194,9 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
Image src = tsources[i];
if (alpha) {
- src.convert(Image::FORMAT_RGBA);
+ src.convert(Image::FORMAT_RGBA8);
} else {
- src.convert(Image::FORMAT_RGB);
+ src.convert(Image::FORMAT_RGB8);
}
DVector<uint8_t> data = src.get_data();
@@ -1280,7 +1274,7 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
atlas_h=nearest_power_of_2(dst_size.height);
}
Image atlas;
- atlas.create(atlas_w,atlas_h,0,alpha?Image::FORMAT_RGBA:Image::FORMAT_RGB);
+ atlas.create(atlas_w,atlas_h,0,alpha?Image::FORMAT_RGBA8:Image::FORMAT_RGB8);
atlases.resize(from->get_source_count());
@@ -1411,18 +1405,18 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
ERR_FAIL_COND_V(image.empty(),ERR_INVALID_DATA);
bool has_alpha=image.detect_alpha();
- if (!has_alpha && image.get_format()==Image::FORMAT_RGBA) {
+ if (!has_alpha && image.get_format()==Image::FORMAT_RGBA8) {
- image.convert(Image::FORMAT_RGB);
+ image.convert(Image::FORMAT_RGB8);
}
- if (image.get_format()==Image::FORMAT_RGBA && flags&IMAGE_FLAG_FIX_BORDER_ALPHA) {
+ if (image.get_format()==Image::FORMAT_RGBA8 && flags&IMAGE_FLAG_FIX_BORDER_ALPHA) {
image.fix_alpha_edges();
}
- if (image.get_format()==Image::FORMAT_RGBA && flags&IMAGE_FLAG_PREMULT_ALPHA) {
+ if (image.get_format()==Image::FORMAT_RGBA8 && flags&IMAGE_FLAG_PREMULT_ALPHA) {
image.premultiply_alpha();
}
@@ -1431,7 +1425,7 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
image.normalmap_to_xy();
}
- //if ((image.get_format()==Image::FORMAT_RGB || image.get_format()==Image::FORMAT_RGBA) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) {
+ //if ((image.get_format()==Image::FORMAT_RGB8 || image.get_format()==Image::FORMAT_RGBA8) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) {
// image.srgb_to_linear();
//}
@@ -1470,18 +1464,18 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
bool has_alpha=image.detect_alpha();
- if (!has_alpha && image.get_format()==Image::FORMAT_RGBA) {
+ if (!has_alpha && image.get_format()==Image::FORMAT_RGBA8) {
- image.convert(Image::FORMAT_RGB);
+ image.convert(Image::FORMAT_RGB8);
}
- if (image.get_format()==Image::FORMAT_RGBA && flags&IMAGE_FLAG_FIX_BORDER_ALPHA) {
+ if (image.get_format()==Image::FORMAT_RGBA8 && flags&IMAGE_FLAG_FIX_BORDER_ALPHA) {
image.fix_alpha_edges();
}
- if (image.get_format()==Image::FORMAT_RGBA && flags&IMAGE_FLAG_PREMULT_ALPHA) {
+ if (image.get_format()==Image::FORMAT_RGBA8 && flags&IMAGE_FLAG_PREMULT_ALPHA) {
image.premultiply_alpha();
}
@@ -1490,7 +1484,7 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
image.normalmap_to_xy();
}
- //if ((image.get_format()==Image::FORMAT_RGB || image.get_format()==Image::FORMAT_RGBA) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) {
+ //if ((image.get_format()==Image::FORMAT_RGB8 || image.get_format()==Image::FORMAT_RGBA8) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) {
//
// print_line("CONVERT BECAUSE: "+itos(flags));
// image.srgb_to_linear();
diff --git a/tools/editor/plugins/baked_light_baker.cpp b/tools/editor/plugins/baked_light_baker.cpp
index f43bec1cd3..5cdae6aff3 100644
--- a/tools/editor/plugins/baked_light_baker.cpp
+++ b/tools/editor/plugins/baked_light_baker.cpp
@@ -33,7 +33,7 @@
#include "tools/editor/editor_node.h"
#include "tools/editor/editor_settings.h"
-
+#if 0
void baked_light_baker_add_64f(double *dst,double value);
void baked_light_baker_add_64i(int64_t *dst,int64_t value);
@@ -91,15 +91,15 @@ BakedLightBaker::MeshTexture* BakedLightBaker::_get_mat_tex(const Ref<Texture>&
if (image.empty())
return NULL;
- if (image.get_format()!=Image::FORMAT_RGBA) {
+ if (image.get_format()!=Image::FORMAT_RGBA8) {
if (image.get_format()>Image::FORMAT_INDEXED_ALPHA) {
Error err = image.decompress();
if (err)
return NULL;
}
- if (image.get_format()!=Image::FORMAT_RGBA)
- image.convert(Image::FORMAT_RGBA);
+ if (image.get_format()!=Image::FORMAT_RGBA8)
+ image.convert(Image::FORMAT_RGBA8);
}
if (imgtex->get_flags()&Texture::FLAG_CONVERT_TO_LINEAR) {
@@ -2619,7 +2619,7 @@ Error BakedLightBaker::transfer_to_lightmaps() {
copymem(w.ptr(),baked_textures[i].data.ptr(),baked_textures[i].data.size());
}
- Image img(baked_textures[i].width,baked_textures[i].height,0,Image::FORMAT_RGBA,dv);
+ Image img(baked_textures[i].width,baked_textures[i].height,0,Image::FORMAT_RGBA8,dv);
Ref<ImageTexture> tex = memnew( ImageTexture );
tex->create_from_image(img);
baked_light->set_lightmap_texture(i,tex);
@@ -2720,3 +2720,4 @@ BakedLightBaker::~BakedLightBaker() {
clear();
}
+#endif
diff --git a/tools/editor/plugins/baked_light_baker.h b/tools/editor/plugins/baked_light_baker.h
index d0fddf5563..99340fcbe8 100644
--- a/tools/editor/plugins/baked_light_baker.h
+++ b/tools/editor/plugins/baked_light_baker.h
@@ -34,6 +34,8 @@
#include "scene/3d/mesh_instance.h"
#include "os/thread.h"
+#if 0
+
class BakedLightBaker {
public:
@@ -375,3 +377,4 @@ public:
};
#endif // BAKED_LIGHT_BAKER_H
+#endif
diff --git a/tools/editor/plugins/baked_light_editor_plugin.cpp b/tools/editor/plugins/baked_light_editor_plugin.cpp
index a58a0c25e2..ed5aafeba0 100644
--- a/tools/editor/plugins/baked_light_editor_plugin.cpp
+++ b/tools/editor/plugins/baked_light_editor_plugin.cpp
@@ -33,7 +33,7 @@
#include "io/resource_saver.h"
-
+#if 0
void BakedLightEditor::_end_baking() {
@@ -145,7 +145,7 @@ void BakedLightEditor::_notification(int p_option) {
#if 1
//debug
- Image img(baker->baked_octree_texture_w,baker->baked_octree_texture_h,0,Image::FORMAT_RGBA,octree_texture);
+ Image img(baker->baked_octree_texture_w,baker->baked_octree_texture_h,0,Image::FORMAT_RGBA8,octree_texture);
Ref<ImageTexture> it = memnew( ImageTexture );
it->create_from_image(img);
ResourceSaver::save("baked_octree.png",it);
@@ -373,3 +373,4 @@ BakedLightEditorPlugin::~BakedLightEditorPlugin()
}
+#endif
diff --git a/tools/editor/plugins/baked_light_editor_plugin.h b/tools/editor/plugins/baked_light_editor_plugin.h
index 4985d7513e..a556bd447a 100644
--- a/tools/editor/plugins/baked_light_editor_plugin.h
+++ b/tools/editor/plugins/baked_light_editor_plugin.h
@@ -40,7 +40,7 @@
@author Juan Linietsky <reduzio@gmail.com>
*/
-
+#if 0
class MeshInstance;
@@ -116,5 +116,5 @@ public:
};
#endif // MULTIMESH_EDITOR_PLUGIN_H
-
+#endif
diff --git a/tools/editor/plugins/collision_polygon_editor_plugin.cpp b/tools/editor/plugins/collision_polygon_editor_plugin.cpp
index 0b06b3ba21..ccec7eaed1 100644
--- a/tools/editor/plugins/collision_polygon_editor_plugin.cpp
+++ b/tools/editor/plugins/collision_polygon_editor_plugin.cpp
@@ -33,6 +33,8 @@
#include "scene/3d/camera.h"
#include "canvas_item_editor_plugin.h"
+#if 0
+
void CollisionPolygonEditor::_notification(int p_what) {
switch(p_what) {
@@ -642,3 +644,4 @@ CollisionPolygonEditorPlugin::~CollisionPolygonEditorPlugin()
{
}
+#endif
diff --git a/tools/editor/plugins/collision_polygon_editor_plugin.h b/tools/editor/plugins/collision_polygon_editor_plugin.h
index 45e287ef00..4c1f45eca9 100644
--- a/tools/editor/plugins/collision_polygon_editor_plugin.h
+++ b/tools/editor/plugins/collision_polygon_editor_plugin.h
@@ -40,6 +40,8 @@
/**
@author Juan Linietsky <reduzio@gmail.com>
*/
+
+#if 0
class CanvasItemEditor;
class CollisionPolygonEditor : public HBoxContainer {
@@ -117,5 +119,5 @@ public:
~CollisionPolygonEditorPlugin();
};
-
+#endif
#endif // COLLISION_POLYGON_EDITOR_PLUGIN_H
diff --git a/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp b/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp
index b6f3db73f7..9bc624ef65 100644
--- a/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp
+++ b/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp
@@ -28,6 +28,7 @@
/*************************************************************************/
#include "cube_grid_theme_editor_plugin.h"
+#if 0
#include "scene/3d/mesh_instance.h"
#include "scene/3d/physics_body.h"
#include "scene/main/viewport.h"
@@ -353,4 +354,4 @@ MeshLibraryEditorPlugin::MeshLibraryEditorPlugin(EditorNode *p_node) {
theme_editor->hide();
}
-
+#endif
diff --git a/tools/editor/plugins/cube_grid_theme_editor_plugin.h b/tools/editor/plugins/cube_grid_theme_editor_plugin.h
index 72ee171e19..a2875d24c2 100644
--- a/tools/editor/plugins/cube_grid_theme_editor_plugin.h
+++ b/tools/editor/plugins/cube_grid_theme_editor_plugin.h
@@ -32,7 +32,7 @@
#include "scene/resources/mesh_library.h"
#include "tools/editor/editor_node.h"
-
+#if 0
class MeshLibraryEditor : public Control {
OBJ_TYPE( MeshLibraryEditor, Control );
@@ -93,3 +93,4 @@ public:
#endif // CUBE_GRID_THEME_EDITOR_PLUGIN_H
+#endif
diff --git a/tools/editor/plugins/editor_preview_plugins.cpp b/tools/editor/plugins/editor_preview_plugins.cpp
index b1bce60484..66f766a0be 100644
--- a/tools/editor/plugins/editor_preview_plugins.cpp
+++ b/tools/editor/plugins/editor_preview_plugins.cpp
@@ -37,6 +37,7 @@
#include "scene/resources/bit_mask.h"
#include "tools/editor/editor_scale.h"
+#if 0
bool EditorTexturePreviewPlugin::handles(const String& p_type) const {
return (ObjectTypeDB::is_type(p_type,"ImageTexture") || ObjectTypeDB::is_type(p_type, "AtlasTexture"));
@@ -69,8 +70,8 @@ Ref<Texture> EditorTexturePreviewPlugin::generate(const RES& p_from) {
if (img.is_compressed()) {
if (img.decompress()!=OK)
return Ref<Texture>();
- } else if (img.get_format()!=Image::FORMAT_RGB && img.get_format()!=Image::FORMAT_RGBA) {
- img.convert(Image::FORMAT_RGBA);
+ } else if (img.get_format()!=Image::FORMAT_RGB8 && img.get_format()!=Image::FORMAT_RGBA8) {
+ img.convert(Image::FORMAT_RGBA8);
}
int width,height;
@@ -138,15 +139,15 @@ Ref<Texture> EditorBitmapPreviewPlugin::generate(const RES& p_from) {
}
- Image img(bm->get_size().width,bm->get_size().height,0,Image::FORMAT_GRAYSCALE,data);
+ Image img(bm->get_size().width,bm->get_size().height,0,Image::FORMAT_L8,data);
int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size");
thumbnail_size*=EDSCALE;
if (img.is_compressed()) {
if (img.decompress()!=OK)
return Ref<Texture>();
- } else if (img.get_format()!=Image::FORMAT_RGB && img.get_format()!=Image::FORMAT_RGBA) {
- img.convert(Image::FORMAT_RGBA);
+ } else if (img.get_format()!=Image::FORMAT_RGB8 && img.get_format()!=Image::FORMAT_RGBA8) {
+ img.convert(Image::FORMAT_RGBA8);
}
int width,height;
@@ -434,7 +435,7 @@ Ref<Texture> EditorScriptPreviewPlugin::generate(const RES& p_from) {
int col=0;
int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size");
thumbnail_size*=EDSCALE;
- Image img(thumbnail_size,thumbnail_size,0,Image::FORMAT_RGBA);
+ Image img(thumbnail_size,thumbnail_size,0,Image::FORMAT_RGBA8);
@@ -778,7 +779,7 @@ Ref<Texture> EditorSamplePreviewPlugin::generate(const RES& p_from) {
imgdata = DVector<uint8_t>::Write();
Ref<ImageTexture> ptex = Ref<ImageTexture>( memnew( ImageTexture));
- ptex->create_from_image(Image(w,h,0,Image::FORMAT_RGB,img),0);
+ ptex->create_from_image(Image(w,h,0,Image::FORMAT_RGB8,img),0);
return ptex;
}
@@ -888,6 +889,7 @@ EditorMeshPreviewPlugin::EditorMeshPreviewPlugin() {
}
+
EditorMeshPreviewPlugin::~EditorMeshPreviewPlugin() {
//VS::get_singleton()->free(sphere);
@@ -901,3 +903,4 @@ EditorMeshPreviewPlugin::~EditorMeshPreviewPlugin() {
VS::get_singleton()->free(scenario);
}
+#endif
diff --git a/tools/editor/plugins/editor_preview_plugins.h b/tools/editor/plugins/editor_preview_plugins.h
index b33aefaa23..9807d835a2 100644
--- a/tools/editor/plugins/editor_preview_plugins.h
+++ b/tools/editor/plugins/editor_preview_plugins.h
@@ -31,6 +31,7 @@
#include "tools/editor/editor_resource_preview.h"
+#if 0
class EditorTexturePreviewPlugin : public EditorResourcePreviewGenerator {
public:
@@ -123,5 +124,5 @@ public:
~EditorMeshPreviewPlugin();
};
-
+#endif
#endif // EDITORPREVIEWPLUGINS_H
diff --git a/tools/editor/plugins/material_editor_plugin.cpp b/tools/editor/plugins/material_editor_plugin.cpp
index 876fab0d6e..1036016194 100644
--- a/tools/editor/plugins/material_editor_plugin.cpp
+++ b/tools/editor/plugins/material_editor_plugin.cpp
@@ -1,6 +1,8 @@
#include "material_editor_plugin.h"
#include "scene/main/viewport.h"
+#if 0
+
void MaterialEditor::_input_event(InputEvent p_event) {
@@ -379,3 +381,4 @@ MaterialEditorPlugin::~MaterialEditorPlugin()
}
+#endif
diff --git a/tools/editor/plugins/material_editor_plugin.h b/tools/editor/plugins/material_editor_plugin.h
index 49e92493b3..68b3b3b1a7 100644
--- a/tools/editor/plugins/material_editor_plugin.h
+++ b/tools/editor/plugins/material_editor_plugin.h
@@ -8,7 +8,7 @@
#include "scene/3d/mesh_instance.h"
#include "scene/3d/camera.h"
-
+#if 0
class MaterialEditor : public Control {
OBJ_TYPE(MaterialEditor, Control);
@@ -69,3 +69,4 @@ public:
};
#endif // MATERIAL_EDITOR_PLUGIN_H
+#endif
diff --git a/tools/editor/plugins/mesh_editor_plugin.cpp b/tools/editor/plugins/mesh_editor_plugin.cpp
index b70cbad25f..cd7860bcab 100644
--- a/tools/editor/plugins/mesh_editor_plugin.cpp
+++ b/tools/editor/plugins/mesh_editor_plugin.cpp
@@ -28,6 +28,7 @@
/*************************************************************************/
#include "mesh_editor_plugin.h"
+#if 0
void MeshEditor::_input_event(InputEvent p_event) {
@@ -241,3 +242,4 @@ MeshEditorPlugin::MeshEditorPlugin(EditorNode *p_node) {
MeshEditorPlugin::~MeshEditorPlugin()
{
}
+#endif
diff --git a/tools/editor/plugins/mesh_editor_plugin.h b/tools/editor/plugins/mesh_editor_plugin.h
index 0715a96e74..97fd9ae771 100644
--- a/tools/editor/plugins/mesh_editor_plugin.h
+++ b/tools/editor/plugins/mesh_editor_plugin.h
@@ -29,6 +29,8 @@
#ifndef MESH_EDITOR_PLUGIN_H
#define MESH_EDITOR_PLUGIN_H
+#if 0
+
#include "tools/editor/editor_plugin.h"
#include "tools/editor/editor_node.h"
#include "scene/resources/material.h"
@@ -93,3 +95,4 @@ public:
};
#endif // MESH_EDITOR_PLUGIN_H
+#endif
diff --git a/tools/editor/plugins/particles_2d_editor_plugin.cpp b/tools/editor/plugins/particles_2d_editor_plugin.cpp
index ce25f34c1f..4d93f2019e 100644
--- a/tools/editor/plugins/particles_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/particles_2d_editor_plugin.cpp
@@ -69,8 +69,8 @@ void Particles2DEditorPlugin::_file_selected(const String& p_file) {
ERR_EXPLAIN(TTR("Error loading image:")+" "+p_file);
ERR_FAIL_COND(err!=OK);
- img.convert(Image::FORMAT_GRAYSCALE_ALPHA);
- ERR_FAIL_COND(img.get_format()!=Image::FORMAT_GRAYSCALE_ALPHA);
+ img.convert(Image::FORMAT_LA8);
+ ERR_FAIL_COND(img.get_format()!=Image::FORMAT_LA8);
Size2i s = Size2(img.get_width(),img.get_height());
ERR_FAIL_COND(s.width==0 || s.height==0);
diff --git a/tools/editor/plugins/particles_editor_plugin.cpp b/tools/editor/plugins/particles_editor_plugin.cpp
index 7e20cc3f54..d8330c4b0c 100644
--- a/tools/editor/plugins/particles_editor_plugin.cpp
+++ b/tools/editor/plugins/particles_editor_plugin.cpp
@@ -26,6 +26,8 @@
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
+
+#if 0
#include "particles_editor_plugin.h"
#include "io/resource_loader.h"
#include "servers/visual/particle_system_sw.h"
@@ -456,3 +458,4 @@ ParticlesEditorPlugin::~ParticlesEditorPlugin()
}
+#endif
diff --git a/tools/editor/plugins/particles_editor_plugin.h b/tools/editor/plugins/particles_editor_plugin.h
index ff80bffc29..eec01d03a1 100644
--- a/tools/editor/plugins/particles_editor_plugin.h
+++ b/tools/editor/plugins/particles_editor_plugin.h
@@ -37,7 +37,7 @@
/**
@author Juan Linietsky <reduzio@gmail.com>
*/
-
+#if 0
class ParticlesEditor : public Control {
OBJ_TYPE(ParticlesEditor, Control );
@@ -113,3 +113,4 @@ public:
};
#endif // PARTICLES_EDITOR_PLUGIN_H
+#endif
diff --git a/tools/editor/plugins/path_editor_plugin.cpp b/tools/editor/plugins/path_editor_plugin.cpp
index 33ef71efab..aa7071298a 100644
--- a/tools/editor/plugins/path_editor_plugin.cpp
+++ b/tools/editor/plugins/path_editor_plugin.cpp
@@ -31,6 +31,7 @@
#include "scene/resources/curve.h"
#include "os/keyboard.h"
+#if 0
String PathSpatialGizmo::get_handle_name(int p_idx) const {
Ref<Curve3D> c = path->get_curve();
@@ -593,3 +594,4 @@ PathEditorPlugin::~PathEditorPlugin()
{
}
+#endif
diff --git a/tools/editor/plugins/path_editor_plugin.h b/tools/editor/plugins/path_editor_plugin.h
index 0afd957af7..ee2196b47f 100644
--- a/tools/editor/plugins/path_editor_plugin.h
+++ b/tools/editor/plugins/path_editor_plugin.h
@@ -32,6 +32,7 @@
#include "tools/editor/spatial_editor_gizmos.h"
#include "scene/3d/path.h"
+# if 0
class PathSpatialGizmo : public EditorSpatialGizmo {
OBJ_TYPE(PathSpatialGizmo,EditorSpatialGizmo);
@@ -95,5 +96,5 @@ public:
};
-
+#endif
#endif // PATH_EDITOR_PLUGIN_H
diff --git a/tools/editor/plugins/polygon_2d_editor_plugin.cpp b/tools/editor/plugins/polygon_2d_editor_plugin.cpp
index 19d1ccc06f..cd19a908a8 100644
--- a/tools/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -850,7 +850,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
uv_edit = memnew( AcceptDialog );
add_child(uv_edit);
uv_edit->set_title(TTR("Polygon 2D UV Editor"));
- uv_edit->set_self_opacity(0.9);
+ uv_edit->set_self_modulate(Color(1,1,1,0.9));
VBoxContainer *uv_main_vb = memnew( VBoxContainer );
uv_edit->add_child(uv_main_vb);
diff --git a/tools/editor/plugins/sample_editor_plugin.cpp b/tools/editor/plugins/sample_editor_plugin.cpp
index 7965fa54ae..5bdd7c4e61 100644
--- a/tools/editor/plugins/sample_editor_plugin.cpp
+++ b/tools/editor/plugins/sample_editor_plugin.cpp
@@ -311,7 +311,7 @@ void SampleEditor::generate_preview_texture(const Ref<Sample>& p_sample,Ref<Imag
imgdata = DVector<uint8_t>::Write();
- p_texture->set_data(Image(w,h,0,Image::FORMAT_RGB,img));
+ p_texture->set_data(Image(w,h,0,Image::FORMAT_RGB8,img));
}
@@ -392,7 +392,7 @@ SampleEditor::SampleEditor() {
add_child(stop);
peakdisplay=Ref<ImageTexture>( memnew( ImageTexture) );
- peakdisplay->create( EDITOR_DEF("audio/sample_editor_preview_width",512),EDITOR_DEF("audio/sample_editor_preview_height",128),Image::FORMAT_RGB);
+ peakdisplay->create( EDITOR_DEF("audio/sample_editor_preview_width",512),EDITOR_DEF("audio/sample_editor_preview_height",128),Image::FORMAT_RGB8);
sample_texframe->set_expand(true);
sample_texframe->set_texture(peakdisplay);
diff --git a/tools/editor/plugins/sample_library_editor_plugin.cpp b/tools/editor/plugins/sample_library_editor_plugin.cpp
index 2a6940332c..ade0c475e1 100644
--- a/tools/editor/plugins/sample_library_editor_plugin.cpp
+++ b/tools/editor/plugins/sample_library_editor_plugin.cpp
@@ -236,7 +236,7 @@ void SampleLibraryEditor::_update_library() {
// Preview/edit
Ref<ImageTexture> preview( memnew( ImageTexture ));
- preview->create(128,16,Image::FORMAT_RGB);
+ preview->create(128,16,Image::FORMAT_RGB8);
SampleEditor::generate_preview_texture(smp,preview);
ti->set_cell_mode(1,TreeItem::CELL_MODE_ICON);
ti->set_selectable(1,false);
diff --git a/tools/editor/plugins/shader_editor_plugin.cpp b/tools/editor/plugins/shader_editor_plugin.cpp
index b3317e8313..5541ae987f 100644
--- a/tools/editor/plugins/shader_editor_plugin.cpp
+++ b/tools/editor/plugins/shader_editor_plugin.cpp
@@ -38,7 +38,7 @@
#include "tools/editor/property_editor.h"
#include "os/os.h"
-
+#if 0
/*** SETTINGS EDITOR ****/
@@ -654,3 +654,4 @@ ShaderEditorPlugin::ShaderEditorPlugin(EditorNode *p_node, bool p_2d) {
ShaderEditorPlugin::~ShaderEditorPlugin() {
}
+#endif
diff --git a/tools/editor/plugins/shader_editor_plugin.h b/tools/editor/plugins/shader_editor_plugin.h
index 9219a1fbc2..ef7cc6772e 100644
--- a/tools/editor/plugins/shader_editor_plugin.h
+++ b/tools/editor/plugins/shader_editor_plugin.h
@@ -38,7 +38,7 @@
#include "scene/resources/shader.h"
#include "servers/visual/shader_language.h"
-
+#if 0
class ShaderTextEditor : public CodeTextEditor {
OBJ_TYPE( ShaderTextEditor, CodeTextEditor );
@@ -154,4 +154,6 @@ public:
~ShaderEditorPlugin();
};
+
+#endif
#endif
diff --git a/tools/editor/plugins/shader_graph_editor_plugin.cpp b/tools/editor/plugins/shader_graph_editor_plugin.cpp
index 3ab906f84e..f864c6885f 100644
--- a/tools/editor/plugins/shader_graph_editor_plugin.cpp
+++ b/tools/editor/plugins/shader_graph_editor_plugin.cpp
@@ -28,6 +28,7 @@
/*************************************************************************/
#include "shader_graph_editor_plugin.h"
+#if 0
#include "scene/gui/check_box.h"
#include "scene/gui/menu_button.h"
@@ -1377,7 +1378,7 @@ ToolButton *ShaderGraphView::make_editor(String text,GraphNode* gn,int p_id,int
edit->set_icon(ped_popup->get_icon("Matrix", "EditorIcons"));
break;
case Variant::COLOR: {
- Image icon_color = Image(15,15,false,Image::FORMAT_RGB);
+ Image icon_color = Image(15,15,false,Image::FORMAT_RGB8);
Color c = graph->default_get_value(type,p_id,param);
for (int x=1;x<14;x++)
for (int y=1;y<14;y++)
@@ -2945,3 +2946,4 @@ ShaderGraphEditorPlugin::~ShaderGraphEditorPlugin()
+#endif
diff --git a/tools/editor/plugins/shader_graph_editor_plugin.h b/tools/editor/plugins/shader_graph_editor_plugin.h
index 67ee5e2d45..dafafdd1c8 100644
--- a/tools/editor/plugins/shader_graph_editor_plugin.h
+++ b/tools/editor/plugins/shader_graph_editor_plugin.h
@@ -43,7 +43,7 @@
@author Juan Linietsky <reduzio@gmail.com>
*/
-
+#if 0
class GraphColorRampEdit : public Control {
OBJ_TYPE(GraphColorRampEdit,Control);
@@ -239,4 +239,4 @@ public:
};
#endif
-
+#endif
diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp
index 9701b8030d..afea6f93dd 100644
--- a/tools/editor/plugins/spatial_editor_plugin.cpp
+++ b/tools/editor/plugins/spatial_editor_plugin.cpp
@@ -274,7 +274,7 @@ ObjectID SpatialEditorViewport::_select_ray(const Point2& p_pos, bool p_append,b
Vector3 ray=_get_ray(p_pos);
Vector3 pos=_get_ray_pos(p_pos);
- Vector<RID> instances=VisualServer::get_singleton()->instances_cull_ray(pos,ray,get_tree()->get_root()->get_world()->get_scenario() );
+ Vector<ObjectID> instances=VisualServer::get_singleton()->instances_cull_ray(pos,ray,get_tree()->get_root()->get_world()->get_scenario() );
Set<Ref<SpatialEditorGizmo> > found_gizmos;
//uint32_t closest=0;
@@ -286,8 +286,7 @@ ObjectID SpatialEditorViewport::_select_ray(const Point2& p_pos, bool p_append,b
for (int i=0;i<instances.size();i++) {
- uint32_t id=VisualServer::get_singleton()->instance_get_object_instance_ID(instances[i]);
- Object *obj=ObjectDB::get_instance(id);
+ Object *obj=ObjectDB::get_instance(instances[i]);
if (!obj)
continue;
@@ -405,15 +404,15 @@ void SpatialEditorViewport::_find_items_at_pos(const Point2& p_pos,bool &r_inclu
Vector3 ray=_get_ray(p_pos);
Vector3 pos=_get_ray_pos(p_pos);
- Vector<RID> instances=VisualServer::get_singleton()->instances_cull_ray(pos,ray,get_tree()->get_root()->get_world()->get_scenario() );
+ Vector<ObjectID> instances=VisualServer::get_singleton()->instances_cull_ray(pos,ray,get_tree()->get_root()->get_world()->get_scenario() );
Set<Ref<SpatialEditorGizmo> > found_gizmos;
r_includes_current=false;
for (int i=0;i<instances.size();i++) {
- uint32_t id=VisualServer::get_singleton()->instance_get_object_instance_ID(instances[i]);
- Object *obj=ObjectDB::get_instance(id);
+ Object *obj=ObjectDB::get_instance(instances[i]);
+
if (!obj)
continue;
@@ -534,14 +533,12 @@ void SpatialEditorViewport::_select_region() {
frustum.push_back( far );
- Vector<RID> instances=VisualServer::get_singleton()->instances_cull_convex(frustum,get_tree()->get_root()->get_world()->get_scenario());
+ Vector<ObjectID> instances=VisualServer::get_singleton()->instances_cull_convex(frustum,get_tree()->get_root()->get_world()->get_scenario());
for (int i=0;i<instances.size();i++) {
- uint32_t id=VisualServer::get_singleton()->instance_get_object_instance_ID(instances[i]);
-
- Object *obj=ObjectDB::get_instance(id);
+ Object *obj=ObjectDB::get_instance(instances[i]);
if (!obj)
continue;
Spatial *sp = obj->cast_to<Spatial>();
@@ -877,7 +874,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
if (b.mod.control) {
- Vector<RID> instances=VisualServer::get_singleton()->instances_cull_ray(ray_origin,ray_dir,get_tree()->get_root()->get_world()->get_scenario() );
+ Vector<ObjectID> instances=VisualServer::get_singleton()->instances_cull_ray(ray_origin,ray_dir,get_tree()->get_root()->get_world()->get_scenario() );
Plane p(ray_origin,_get_camera_normal());
@@ -886,8 +883,9 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
for (int i=0;i<instances.size();i++) {
- uint32_t id=VisualServer::get_singleton()->instance_get_object_instance_ID(instances[i]);
- Object *obj=ObjectDB::get_instance(id);
+
+ Object *obj=ObjectDB::get_instance(instances[i]);
+
if (!obj)
continue;
@@ -2061,9 +2059,9 @@ void SpatialEditorViewport::_menu_option(int p_option) {
bool current = view_menu->get_popup()->is_item_checked( idx );
current=!current;
if (current)
- camera->set_visible_layers( ((1<<20)-1)|(1<<(GIZMO_BASE_LAYER+index))|(1<<GIZMO_EDIT_LAYER)|(1<<GIZMO_GRID_LAYER) );
+ camera->set_cull_mask( ((1<<20)-1)|(1<<(GIZMO_BASE_LAYER+index))|(1<<GIZMO_EDIT_LAYER)|(1<<GIZMO_GRID_LAYER) );
else
- camera->set_visible_layers( ((1<<20)-1)|(1<<(GIZMO_BASE_LAYER+index))|(1<<GIZMO_GRID_LAYER) );
+ camera->set_cull_mask( ((1<<20)-1)|(1<<(GIZMO_BASE_LAYER+index))|(1<<GIZMO_GRID_LAYER) );
view_menu->get_popup()->set_item_checked( idx, current );
} break;
@@ -2361,7 +2359,7 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
surface->set_area_as_parent_rect();
camera = memnew(Camera);
camera->set_disable_gizmo(true);
- camera->set_visible_layers( ((1<<20)-1)|(1<<(GIZMO_BASE_LAYER+p_index))|(1<<GIZMO_EDIT_LAYER)|(1<<GIZMO_GRID_LAYER) );
+ camera->set_cull_mask( ((1<<20)-1)|(1<<(GIZMO_BASE_LAYER+p_index))|(1<<GIZMO_EDIT_LAYER)|(1<<GIZMO_GRID_LAYER) );
//camera->set_environment(SpatialEditor::get_singleton()->get_viewport_environment());
viewport->add_child(camera);
camera->make_current();
@@ -2370,7 +2368,7 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
view_menu = memnew( MenuButton );
surface->add_child(view_menu);
view_menu->set_pos( Point2(4,4));
- view_menu->set_self_opacity(0.5);
+ view_menu->set_self_modulate(Color(1,1,1,0.5));
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/top_view"), VIEW_TOP);
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/bottom_view"), VIEW_BOTTOM);
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/left_view"), VIEW_LEFT);
@@ -2550,10 +2548,10 @@ void SpatialEditor::_generate_selection_box() {
}
Ref<FixedMaterial> mat = memnew( FixedMaterial );
- mat->set_flag(Material::FLAG_UNSHADED,true);
+ /*mat->set_flag(Material::FLAG_UNSHADED,true);
mat->set_parameter(FixedMaterial::PARAM_DIFFUSE,Color(1,1,1));
mat->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA,true);
- mat->set_fixed_flag(FixedMaterial::FLAG_USE_COLOR_ARRAY,true);
+ mat->set_fixed_flag(FixedMaterial::FLAG_USE_COLOR_ARRAY,true);*/
st->set_material(mat);
selection_box = st->commit();
}
@@ -2685,14 +2683,14 @@ void SpatialEditor::set_state(const Dictionary& p_state) {
}
if (d.has("ambient_light_color")) {
settings_ambient_color->set_color(d["ambient_light_color"]);
- viewport_environment->fx_set_param(Environment::FX_PARAM_AMBIENT_LIGHT_COLOR,d["ambient_light_color"]);
+ //viewport_environment->fx_set_param(Environment::FX_PARAM_AMBIENT_LIGHT_COLOR,d["ambient_light_color"]);
}
if (d.has("default_srgb")) {
bool use = d["default_srgb"];
- viewport_environment->set_enable_fx(Environment::FX_SRGB,use);
- view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_DEFAULT_SRGB), use );
+ //viewport_environment->set_enable_fx(Environment::FX_SRGB,use);
+ //view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_DEFAULT_SRGB), use );
}
if (d.has("show_grid")) {
bool use = d["show_grid"];
@@ -2892,9 +2890,9 @@ void SpatialEditor::_menu_item_pressed(int p_option) {
bool is_checked = view_menu->get_popup()->is_item_checked( view_menu->get_popup()->get_item_index(p_option) );
if (is_checked) {
- viewport_environment->set_enable_fx(Environment::FX_SRGB,false);
+ //viewport_environment->set_enable_fx(Environment::FX_SRGB,false);
} else {
- viewport_environment->set_enable_fx(Environment::FX_SRGB,true);
+ //viewport_environment->set_enable_fx(Environment::FX_SRGB,true);
}
is_checked = ! is_checked;
@@ -3140,11 +3138,11 @@ void SpatialEditor::_init_indicators() {
{
- indicator_mat = VisualServer::get_singleton()->fixed_material_create();
- VisualServer::get_singleton()->material_set_flag( indicator_mat, VisualServer::MATERIAL_FLAG_UNSHADED, true );
+ indicator_mat = VisualServer::get_singleton()->material_create();
+ /*VisualServer::get_singleton()->material_set_flag( indicator_mat, VisualServer::MATERIAL_FLAG_UNSHADED, true );
VisualServer::get_singleton()->material_set_flag( indicator_mat, VisualServer::MATERIAL_FLAG_ONTOP, false );
VisualServer::get_singleton()->fixed_material_set_flag(indicator_mat, VisualServer::FIXED_MATERIAL_FLAG_USE_ALPHA,true);
- VisualServer::get_singleton()->fixed_material_set_flag(indicator_mat, VisualServer::FIXED_MATERIAL_FLAG_USE_COLOR_ARRAY,true);
+ VisualServer::get_singleton()->fixed_material_set_flag(indicator_mat, VisualServer::FIXED_MATERIAL_FLAG_USE_COLOR_ARRAY,true);*/
DVector<Color> grid_colors[3];
DVector<Vector3> grid_points[3];
@@ -3186,7 +3184,7 @@ void SpatialEditor::_init_indicators() {
d.resize(VS::ARRAY_MAX);
d[VisualServer::ARRAY_VERTEX]=grid_points[i];
d[VisualServer::ARRAY_COLOR]=grid_colors[i];
- VisualServer::get_singleton()->mesh_add_surface(grid[i],VisualServer::PRIMITIVE_LINES,d);
+ VisualServer::get_singleton()->mesh_add_surface_from_arrays(grid[i],VisualServer::PRIMITIVE_LINES,d);
VisualServer::get_singleton()->mesh_surface_set_material(grid[i],0,indicator_mat);
grid_instance[i] = VisualServer::get_singleton()->instance_create2(grid[i],get_tree()->get_root()->get_world()->get_scenario());
@@ -3205,7 +3203,7 @@ void SpatialEditor::_init_indicators() {
d[VisualServer::ARRAY_VERTEX]=origin_points;
d[VisualServer::ARRAY_COLOR]=origin_colors;
- VisualServer::get_singleton()->mesh_add_surface(origin,VisualServer::PRIMITIVE_LINES,d);
+ VisualServer::get_singleton()->mesh_add_surface_from_arrays(origin,VisualServer::PRIMITIVE_LINES,d);
VisualServer::get_singleton()->mesh_surface_set_material(origin,0,indicator_mat);
@@ -3237,16 +3235,16 @@ void SpatialEditor::_init_indicators() {
cursor_points.push_back(Vector3(0,-cs,0));
cursor_points.push_back(Vector3(0,0,+cs));
cursor_points.push_back(Vector3(0,0,-cs));
- cursor_material=VisualServer::get_singleton()->fixed_material_create();
- VisualServer::get_singleton()->fixed_material_set_param(cursor_material,VS::FIXED_MATERIAL_PARAM_DIFFUSE,Color(0,1,1));
+ cursor_material=VisualServer::get_singleton()->material_create();
+ /*VisualServer::get_singleton()->fixed_material_set_param(cursor_material,VS::FIXED_MATERIAL_PARAM_DIFFUSE,Color(0,1,1));
VisualServer::get_singleton()->material_set_flag( cursor_material, VisualServer::MATERIAL_FLAG_UNSHADED, true );
VisualServer::get_singleton()->fixed_material_set_flag(cursor_material, VisualServer::FIXED_MATERIAL_FLAG_USE_ALPHA,true);
- VisualServer::get_singleton()->fixed_material_set_flag(cursor_material, VisualServer::FIXED_MATERIAL_FLAG_USE_COLOR_ARRAY,true);
+ VisualServer::get_singleton()->fixed_material_set_flag(cursor_material, VisualServer::FIXED_MATERIAL_FLAG_USE_COLOR_ARRAY,true);*/
Array d;
d.resize(VS::ARRAY_MAX);
d[VS::ARRAY_VERTEX]=cursor_points;
- VisualServer::get_singleton()->mesh_add_surface(cursor_mesh,VS::PRIMITIVE_LINES,d);
+ VisualServer::get_singleton()->mesh_add_surface_from_arrays(cursor_mesh,VS::PRIMITIVE_LINES,d);
VisualServer::get_singleton()->mesh_surface_set_material(cursor_mesh,0,cursor_material);
cursor_instance = VisualServer::get_singleton()->instance_create2(cursor_mesh,get_tree()->get_root()->get_world()->get_scenario());
@@ -3266,10 +3264,10 @@ void SpatialEditor::_init_indicators() {
float gizmo_alph = EditorSettings::get_singleton()->get("3d_editor/manipulator_gizmo_opacity");
gizmo_hl = Ref<FixedMaterial>( memnew( FixedMaterial ) );
- gizmo_hl->set_flag(Material::FLAG_UNSHADED, true);
+ /* gizmo_hl->set_flag(Material::FLAG_UNSHADED, true);
gizmo_hl->set_flag(Material::FLAG_ONTOP, true);
gizmo_hl->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA, true);
- gizmo_hl->set_parameter(FixedMaterial::PARAM_DIFFUSE,Color(1,1,1,gizmo_alph+0.2f));
+ gizmo_hl->set_parameter(FixedMaterial::PARAM_DIFFUSE,Color(1,1,1,gizmo_alph+0.2f));*/
for(int i=0;i<3;i++) {
@@ -3278,13 +3276,13 @@ void SpatialEditor::_init_indicators() {
Ref<FixedMaterial> mat = memnew( FixedMaterial );
- mat->set_flag(Material::FLAG_UNSHADED, true);
+ /* mat->set_flag(Material::FLAG_UNSHADED, true);
mat->set_flag(Material::FLAG_ONTOP, true);
mat->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA, true);
Color col;
col[i]=1.0;
col.a= gizmo_alph;
- mat->set_parameter(FixedMaterial::PARAM_DIFFUSE,col);
+ mat->set_parameter(FixedMaterial::PARAM_DIFFUSE,col);*/
gizmo_color[i]=mat;
@@ -3548,7 +3546,7 @@ void SpatialEditor::_notification(int p_what) {
if (p_what==NOTIFICATION_ENTER_TREE) {
- gizmos = memnew( SpatialEditorGizmos );
+ //gizmos = memnew( SpatialEditorGizmos );
_init_indicators();
_update_default_light_angle();
}
@@ -3556,7 +3554,7 @@ void SpatialEditor::_notification(int p_what) {
if (p_what==NOTIFICATION_EXIT_TREE) {
_finish_indicators();
- memdelete( gizmos );
+// memdelete( gizmos );
}
}
@@ -3602,7 +3600,7 @@ void SpatialEditor::_request_gizmo(Object* p_obj) {
}
if (!seg.is_valid()) {
- seg = gizmos->get_gizmo(sp);
+ // seg = gizmos->get_gizmo(sp);
}
if (seg.is_valid()) {
@@ -3724,7 +3722,7 @@ void SpatialEditor::clear() {
settings_default_light_rot_x=Math_PI*0.3;
settings_default_light_rot_y=Math_PI*0.2;
- viewport_environment->fx_set_param(Environment::FX_PARAM_AMBIENT_LIGHT_COLOR,Color(0.15,0.15,0.15));
+ //viewport_environment->fx_set_param(Environment::FX_PARAM_AMBIENT_LIGHT_COLOR,Color(0.15,0.15,0.15));
settings_ambient_color->set_color(Color(0.15,0.15,0.15));
if (!light_instance.is_valid())
_menu_item_pressed(MENU_VIEW_USE_DEFAULT_LIGHT);
@@ -3737,7 +3735,7 @@ void SpatialEditor::clear() {
void SpatialEditor::_update_ambient_light_color(const Color& p_color) {
- viewport_environment->fx_set_param(Environment::FX_PARAM_AMBIENT_LIGHT_COLOR,settings_ambient_color->get_color());
+// viewport_environment->fx_set_param(Environment::FX_PARAM_AMBIENT_LIGHT_COLOR,settings_ambient_color->get_color());
}
@@ -4006,8 +4004,8 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
settings_vbc->add_margin_child(TTR("Ambient Light Color:"),settings_ambient_color);
settings_ambient_color->connect("color_changed",this,"_update_ambient_light_color");
- viewport_environment->set_enable_fx(Environment::FX_AMBIENT_LIGHT,true);
- viewport_environment->fx_set_param(Environment::FX_PARAM_AMBIENT_LIGHT_COLOR,Color(0.15,0.15,0.15));
+// viewport_environment->set_enable_fx(Environment::FX_AMBIENT_LIGHT,true);
+// viewport_environment->fx_set_param(Environment::FX_PARAM_AMBIENT_LIGHT_COLOR,Color(0.15,0.15,0.15));
settings_ambient_color->set_color(Color(0.15,0.15,0.15));
diff --git a/tools/editor/plugins/spatial_editor_plugin.h b/tools/editor/plugins/spatial_editor_plugin.h
index 975092a01d..2a52eab777 100644
--- a/tools/editor/plugins/spatial_editor_plugin.h
+++ b/tools/editor/plugins/spatial_editor_plugin.h
@@ -467,7 +467,7 @@ private:
static SpatialEditor *singleton;
void _node_removed(Node* p_node);
- SpatialEditorGizmos *gizmos;
+ //SpatialEditorGizmos *gizmos;
SpatialEditor();
void _update_ambient_light_color(const Color& p_color);
diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp
index 18a4e845a0..4f6f624b1e 100644
--- a/tools/editor/project_manager.cpp
+++ b/tools/editor/project_manager.cpp
@@ -870,7 +870,7 @@ void ProjectManager::_load_recent_projects() {
TextureButton *favorite = memnew( TextureButton );
favorite->set_normal_texture(favorite_icon);
if (!is_favorite)
- favorite->set_opacity(0.2);
+ favorite->set_modulate(Color(1,1,1,0.2));
favorite->set_v_size_flags(SIZE_EXPAND);
favorite->connect("pressed",this,"_favorite_pressed",varray(hb));
favorite_box->add_child(favorite);
@@ -891,7 +891,7 @@ void ProjectManager::_load_recent_projects() {
vb->add_child(title);
Label *fpath = memnew( Label(path) );
vb->add_child(fpath);
- fpath->set_opacity(0.5);
+ fpath->set_modulate(Color(1,1,1,0.5));
fpath->add_color_override("font_color",font_color);
scroll_childs->add_child(hb);
diff --git a/tools/editor/pvrtc_compress.cpp b/tools/editor/pvrtc_compress.cpp
index 75b5c69bc2..bda06e1706 100644
--- a/tools/editor/pvrtc_compress.cpp
+++ b/tools/editor/pvrtc_compress.cpp
@@ -85,7 +85,7 @@ static void _compress_image(Image::CompressMode p_mode,Image *p_image) {
if (EditorSettings::get_singleton()->get("PVRTC/fast_conversion").operator bool()) {
args.push_back("-pvrtcfast");
}
- if (p_image->get_mipmaps()>0)
+ if (p_image->has_mipmaps())
args.push_back("-m");
Ref<ImageTexture> t = memnew( ImageTexture );
diff --git a/tools/editor/scene_tree_editor.cpp b/tools/editor/scene_tree_editor.cpp
index 53bfe8cc57..fdcced2fa6 100644
--- a/tools/editor/scene_tree_editor.cpp
+++ b/tools/editor/scene_tree_editor.cpp
@@ -953,7 +953,7 @@ Variant SceneTreeEditor::get_drag_data_fw(const Point2& p_point,Control* p_from)
Label *label = memnew( Label( selected[i]->get_name() ) );
hb->add_child(label);
vb->add_child(hb);
- hb->set_opacity(opacity_item);
+ hb->set_modulate(Color(1,1,1,opacity_item));
opacity_item -= opacity_step;
}
NodePath p = selected[i]->get_path();
diff --git a/tools/editor/spatial_editor_gizmos.cpp b/tools/editor/spatial_editor_gizmos.cpp
index 84803eb6db..716b03b7b7 100644
--- a/tools/editor/spatial_editor_gizmos.cpp
+++ b/tools/editor/spatial_editor_gizmos.cpp
@@ -41,6 +41,8 @@
// Keep small children away from this file.
// It's so ugly it will eat them alive
+#if 0
+
#define HANDLE_HALF_SIZE 0.05
void EditorSpatialGizmo::clear() {
@@ -3198,3 +3200,4 @@ SpatialEditorGizmos::SpatialEditorGizmos() {
}
+#endif
diff --git a/tools/editor/spatial_editor_gizmos.h b/tools/editor/spatial_editor_gizmos.h
index 3d7272f522..a7a6af4b18 100644
--- a/tools/editor/spatial_editor_gizmos.h
+++ b/tools/editor/spatial_editor_gizmos.h
@@ -52,7 +52,7 @@
class Camera;
-
+#if 0
class EditorSpatialGizmo : public SpatialEditorGizmo {
OBJ_TYPE(EditorSpatialGizmo,SpatialGizmo);
@@ -505,5 +505,5 @@ public:
SpatialEditorGizmos();
};
-
+#endif
#endif // SPATIAL_EDITOR_GIZMOS_H