Merge remote-tracking branch 'origin/gles3' into gles3-on-master
Various merge conflicts have been fixed manually and some mistakes might have been made - time will tell :)
This commit is contained in:
@@ -99,6 +99,7 @@
|
||||
#include "plugins/light_occluder_2d_editor_plugin.h"
|
||||
#include "plugins/color_ramp_editor_plugin.h"
|
||||
#include "plugins/collision_shape_2d_editor_plugin.h"
|
||||
#include "plugins/gi_probe_editor_plugin.h"
|
||||
#include "main/input_default.h"
|
||||
// end
|
||||
#include "tools/editor/editor_settings.h"
|
||||
@@ -267,16 +268,14 @@ void EditorNode::_notification(int p_what) {
|
||||
circle_step=0;
|
||||
|
||||
circle_step_msec=tick;
|
||||
circle_step_frame=frame+1;
|
||||
circle_step_frame=frame+1;
|
||||
|
||||
// update the circle itself only when its enabled
|
||||
if (!update_menu->get_popup()->is_item_checked(3)){
|
||||
update_menu->set_icon(gui_base->get_icon("Progress"+itos(circle_step+1),"EditorIcons"));
|
||||
}
|
||||
// update the circle itself only when its enabled
|
||||
if (!update_menu->get_popup()->is_item_checked(3)){
|
||||
update_menu->set_icon(gui_base->get_icon("Progress"+itos(circle_step+1),"EditorIcons"));
|
||||
}
|
||||
}
|
||||
|
||||
scene_root->set_size_override(true,Size2(Globals::get_singleton()->get("display/width"),Globals::get_singleton()->get("display/height")));
|
||||
|
||||
editor_selection->update();
|
||||
|
||||
{
|
||||
@@ -303,7 +302,7 @@ void EditorNode::_notification(int p_what) {
|
||||
}
|
||||
if (p_what==NOTIFICATION_ENTER_TREE) {
|
||||
|
||||
|
||||
get_tree()->get_root()->set_disable_3d(true);
|
||||
//MessageQueue::get_singleton()->push_call(this,"_get_scene_metadata");
|
||||
get_tree()->set_editor_hint(true);
|
||||
get_tree()->get_root()->set_as_audio_listener(false);
|
||||
@@ -910,10 +909,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;
|
||||
@@ -931,7 +931,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");
|
||||
@@ -943,7 +943,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);
|
||||
@@ -1246,7 +1246,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) {
|
||||
@@ -5376,6 +5376,8 @@ void EditorNode::_bind_methods() {
|
||||
|
||||
EditorNode::EditorNode() {
|
||||
|
||||
VisualServer::get_singleton()->textures_keep_original(true);
|
||||
|
||||
EditorHelp::generate_doc(); //before any editor classes are crated
|
||||
SceneState::set_disable_placeholders(true);
|
||||
editor_initialize_certificates(); //for asset sharing
|
||||
@@ -5676,6 +5678,7 @@ EditorNode::EditorNode() {
|
||||
scene_root_parent->set_custom_minimum_size(Size2(0,80)*EDSCALE);
|
||||
|
||||
|
||||
|
||||
//Ref<StyleBox> sp = scene_root_parent->get_stylebox("panel","TabContainer");
|
||||
//scene_root_parent->add_style_override("panel",sp);
|
||||
|
||||
@@ -5689,6 +5692,8 @@ EditorNode::EditorNode() {
|
||||
|
||||
|
||||
scene_root = memnew( Viewport );
|
||||
scene_root->set_disable_3d(true);
|
||||
|
||||
|
||||
|
||||
//scene_root_base->add_child(scene_root);
|
||||
@@ -5696,7 +5701,7 @@ EditorNode::EditorNode() {
|
||||
VisualServer::get_singleton()->viewport_set_hide_scenario(scene_root->get_viewport(),true);
|
||||
scene_root->set_disable_input(true);
|
||||
scene_root->set_as_audio_listener_2d(true);
|
||||
scene_root->set_size_override(true,Size2(Globals::get_singleton()->get("display/width"),Globals::get_singleton()->get("display/height")));
|
||||
//scene_root->set_size_override(true,Size2(Globals::get_singleton()->get("display/width"),Globals::get_singleton()->get("display/height")));
|
||||
|
||||
// scene_root->set_world_2d( Ref<World2D>( memnew( World2D )) );
|
||||
|
||||
@@ -5709,6 +5714,7 @@ EditorNode::EditorNode() {
|
||||
scene_root_parent->add_child(viewport);
|
||||
|
||||
|
||||
|
||||
PanelContainer *top_region = memnew( PanelContainer );
|
||||
top_region->add_style_override("panel",gui_base->get_stylebox("hover","Button"));
|
||||
HBoxContainer *left_menu_hb = memnew( HBoxContainer );
|
||||
@@ -6554,10 +6560,11 @@ 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( ShaderEditorPlugin(this) ) );
|
||||
/* 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) ) );
|
||||
@@ -6566,31 +6573,32 @@ 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) ) );
|
||||
add_editor_plugin( memnew( SpriteFramesEditorPlugin(this) ) );
|
||||
add_editor_plugin( memnew( TextureRegionEditorPlugin(this) ) );
|
||||
add_editor_plugin( memnew( Particles2DEditorPlugin(this) ) );
|
||||
add_editor_plugin( memnew( GIProbeEditorPlugin(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) );
|
||||
@@ -6599,14 +6607,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();
|
||||
@@ -6689,6 +6697,7 @@ EditorNode::EditorNode() {
|
||||
load_error_dialog->set_child_rect(load_errors);
|
||||
gui_base->add_child(load_error_dialog);
|
||||
|
||||
|
||||
//EditorImport::add_importer( Ref<EditorImporterCollada>( memnew(EditorImporterCollada )));
|
||||
|
||||
EditorFileSystem::get_singleton()->connect("sources_changed",this,"_sources_changed");
|
||||
|
||||
Reference in New Issue
Block a user