summaryrefslogtreecommitdiff
path: root/tools/editor
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor')
-rw-r--r--tools/editor/animation_editor.cpp327
-rw-r--r--tools/editor/animation_editor.h9
-rw-r--r--tools/editor/array_property_edit.cpp10
-rw-r--r--tools/editor/array_property_edit.h4
-rw-r--r--tools/editor/asset_library_editor_plugin.cpp86
-rw-r--r--tools/editor/asset_library_editor_plugin.h12
-rw-r--r--tools/editor/call_dialog.cpp31
-rw-r--r--tools/editor/call_dialog.h6
-rw-r--r--tools/editor/code_editor.cpp109
-rw-r--r--tools/editor/code_editor.h12
-rw-r--r--tools/editor/connections_dialog.cpp48
-rw-r--r--tools/editor/connections_dialog.h6
-rw-r--r--tools/editor/create_dialog.cpp89
-rw-r--r--tools/editor/create_dialog.h6
-rw-r--r--tools/editor/dependency_editor.cpp22
-rw-r--r--tools/editor/dependency_editor.h12
-rw-r--r--tools/editor/doc_code_font.h2
-rw-r--r--tools/editor/doc_font.h2
-rw-r--r--tools/editor/doc_title_font.h2
-rw-r--r--tools/editor/editor_asset_installer.cpp6
-rw-r--r--tools/editor/editor_asset_installer.h4
-rw-r--r--tools/editor/editor_autoload_settings.cpp102
-rw-r--r--tools/editor/editor_autoload_settings.h4
-rw-r--r--tools/editor/editor_data.cpp18
-rw-r--r--tools/editor/editor_data.h4
-rw-r--r--tools/editor/editor_dir_dialog.cpp16
-rw-r--r--tools/editor/editor_dir_dialog.h4
-rw-r--r--tools/editor/editor_file_dialog.cpp123
-rw-r--r--tools/editor/editor_file_dialog.h6
-rw-r--r--tools/editor/editor_file_system.cpp50
-rw-r--r--tools/editor/editor_file_system.h6
-rw-r--r--tools/editor/editor_fonts.cpp12
-rw-r--r--tools/editor/editor_fonts.h2
-rw-r--r--tools/editor/editor_help.cpp451
-rw-r--r--tools/editor/editor_help.h12
-rw-r--r--tools/editor/editor_icons.h2
-rw-r--r--tools/editor/editor_import_export.cpp148
-rw-r--r--tools/editor/editor_import_export.h16
-rw-r--r--tools/editor/editor_initialize_ssl.cpp5
-rw-r--r--tools/editor/editor_initialize_ssl.h2
-rw-r--r--tools/editor/editor_log.cpp14
-rw-r--r--tools/editor/editor_log.h4
-rw-r--r--tools/editor/editor_name_dialog.cpp8
-rw-r--r--tools/editor/editor_name_dialog.h6
-rw-r--r--tools/editor/editor_node.cpp456
-rw-r--r--tools/editor/editor_node.h15
-rw-r--r--tools/editor/editor_path.cpp112
-rw-r--r--tools/editor/editor_path.h12
-rw-r--r--tools/editor/editor_plugin.cpp100
-rw-r--r--tools/editor/editor_plugin.h9
-rw-r--r--tools/editor/editor_plugin_settings.cpp8
-rw-r--r--tools/editor/editor_plugin_settings.h4
-rw-r--r--tools/editor/editor_profiler.cpp40
-rw-r--r--tools/editor/editor_profiler.h4
-rw-r--r--tools/editor/editor_reimport_dialog.cpp4
-rw-r--r--tools/editor/editor_reimport_dialog.h4
-rw-r--r--tools/editor/editor_resource_preview.cpp30
-rw-r--r--tools/editor/editor_resource_preview.h6
-rw-r--r--tools/editor/editor_run.cpp36
-rw-r--r--tools/editor/editor_run.h2
-rw-r--r--tools/editor/editor_run_native.cpp6
-rw-r--r--tools/editor/editor_run_native.h4
-rw-r--r--tools/editor/editor_run_script.cpp6
-rw-r--r--tools/editor/editor_run_script.h4
-rw-r--r--tools/editor/editor_settings.cpp360
-rw-r--r--tools/editor/editor_settings.h4
-rw-r--r--tools/editor/editor_sub_scene.cpp14
-rw-r--r--tools/editor/editor_sub_scene.h4
-rw-r--r--tools/editor/editor_themes.cpp6
-rw-r--r--tools/editor/editor_themes.h2
-rw-r--r--tools/editor/file_type_cache.cpp6
-rw-r--r--tools/editor/file_type_cache.h4
-rw-r--r--tools/editor/fileserver/editor_file_server.cpp10
-rw-r--r--tools/editor/fileserver/editor_file_server.h4
-rw-r--r--tools/editor/filesystem_dock.cpp121
-rw-r--r--tools/editor/filesystem_dock.h12
-rw-r--r--tools/editor/groups_editor.cpp8
-rw-r--r--tools/editor/groups_editor.h4
-rw-r--r--tools/editor/icons/2x/icon_bit_map.pngbin0 -> 148 bytes
-rw-r--r--tools/editor/icons/2x/icon_cube_map.pngbin0 -> 159 bytes
-rw-r--r--tools/editor/icons/2x/icon_curve_2d.pngbin0 -> 591 bytes
-rw-r--r--tools/editor/icons/2x/icon_curve_3d.pngbin0 -> 522 bytes
-rw-r--r--tools/editor/icons/2x/icon_environment.pngbin0 -> 1270 bytes
-rw-r--r--tools/editor/icons/2x/icon_fixed_spatial_material.pngbin0 -> 1619 bytes
-rw-r--r--tools/editor/icons/2x/icon_g_i_probe.pngbin0 -> 680 bytes
-rw-r--r--tools/editor/icons/2x/icon_g_i_probe_data.pngbin0 -> 662 bytes
-rw-r--r--tools/editor/icons/2x/icon_image_sky_box.pngbin0 -> 904 bytes
-rw-r--r--tools/editor/icons/2x/icon_interp_wrap_clamp.pngbin0 -> 348 bytes
-rw-r--r--tools/editor/icons/2x/icon_interp_wrap_loop.pngbin0 -> 548 bytes
-rw-r--r--tools/editor/icons/2x/icon_joypad.png (renamed from tools/editor/icons/2x/icon_joystick.png)bin380 -> 380 bytes
-rw-r--r--tools/editor/icons/2x/icon_large_texture.pngbin0 -> 211 bytes
-rw-r--r--tools/editor/icons/2x/icon_load.pngbin503 -> 523 bytes
-rw-r--r--tools/editor/icons/2x/icon_mesh_library.pngbin0 -> 631 bytes
-rw-r--r--tools/editor/icons/2x/icon_navigation_mesh.pngbin0 -> 806 bytes
-rw-r--r--tools/editor/icons/2x/icon_navigation_polygon.pngbin0 -> 640 bytes
-rw-r--r--tools/editor/icons/2x/icon_open.pngbin0 -> 228 bytes
-rw-r--r--tools/editor/icons/2x/icon_packed_data_container.pngbin0 -> 253 bytes
-rw-r--r--tools/editor/icons/2x/icon_particles_shader.pngbin0 -> 657 bytes
-rw-r--r--tools/editor/icons/2x/icon_polygon_path_finder.pngbin0 -> 491 bytes
-rw-r--r--tools/editor/icons/2x/icon_reflection_probe.pngbin0 -> 533 bytes
-rw-r--r--tools/editor/icons/2x/icon_room.pngbin666 -> 567 bytes
-rw-r--r--tools/editor/icons/2x/icon_room_bounds.pngbin0 -> 631 bytes
-rw-r--r--tools/editor/icons/2x/icon_sample_library.pngbin0 -> 568 bytes
-rw-r--r--tools/editor/icons/2x/icon_script_create.pngbin541 -> 491 bytes
-rw-r--r--tools/editor/icons/2x/icon_short_cut.pngbin0 -> 473 bytes
-rw-r--r--tools/editor/icons/2x/icon_spatial_shader.pngbin0 -> 704 bytes
-rw-r--r--tools/editor/icons/2x/icon_sprite_frames.pngbin0 -> 691 bytes
-rw-r--r--tools/editor/icons/2x/icon_style_box_empty.pngbin0 -> 555 bytes
-rw-r--r--tools/editor/icons/2x/icon_style_box_flat.pngbin0 -> 695 bytes
-rw-r--r--tools/editor/icons/2x/icon_style_box_texture.pngbin0 -> 693 bytes
-rw-r--r--tools/editor/icons/2x/icon_test_cube.pngbin612 -> 596 bytes
-rw-r--r--tools/editor/icons/2x/icon_theme.pngbin0 -> 809 bytes
-rw-r--r--tools/editor/icons/2x/icon_tile_set.pngbin0 -> 242 bytes
-rw-r--r--tools/editor/icons/2x/icon_viewport_texture.pngbin0 -> 404 bytes
-rw-r--r--tools/editor/icons/2x/icon_world.pngbin0 -> 502 bytes
-rw-r--r--tools/editor/icons/2x/icon_world_2d.pngbin0 -> 584 bytes
-rw-r--r--tools/editor/icons/SCsub2
-rw-r--r--tools/editor/icons/icon_bit_map.pngbin0 -> 113 bytes
-rw-r--r--tools/editor/icons/icon_cube_map.pngbin0 -> 134 bytes
-rw-r--r--tools/editor/icons/icon_curve_2d.pngbin0 -> 342 bytes
-rw-r--r--tools/editor/icons/icon_curve_3d.pngbin0 -> 336 bytes
-rw-r--r--tools/editor/icons/icon_environment.pngbin0 -> 588 bytes
-rw-r--r--tools/editor/icons/icon_fixed_spatial_material.pngbin0 -> 681 bytes
-rw-r--r--tools/editor/icons/icon_g_i_probe.pngbin0 -> 341 bytes
-rw-r--r--tools/editor/icons/icon_g_i_probe_data.pngbin0 -> 350 bytes
-rw-r--r--tools/editor/icons/icon_image_sky_box.pngbin0 -> 434 bytes
-rw-r--r--tools/editor/icons/icon_interp_wrap_clamp.pngbin0 -> 233 bytes
-rw-r--r--tools/editor/icons/icon_interp_wrap_loop.pngbin0 -> 309 bytes
-rw-r--r--tools/editor/icons/icon_joypad.png (renamed from tools/editor/icons/icon_joystick.png)bin239 -> 239 bytes
-rw-r--r--tools/editor/icons/icon_large_texture.pngbin0 -> 156 bytes
-rw-r--r--tools/editor/icons/icon_load.pngbin301 -> 271 bytes
-rw-r--r--tools/editor/icons/icon_mesh_library.pngbin0 -> 349 bytes
-rw-r--r--tools/editor/icons/icon_navigation_mesh.pngbin0 -> 450 bytes
-rw-r--r--tools/editor/icons/icon_navigation_polygon.pngbin0 -> 384 bytes
-rw-r--r--tools/editor/icons/icon_open.pngbin0 -> 170 bytes
-rw-r--r--tools/editor/icons/icon_packed_data_container.pngbin0 -> 176 bytes
-rw-r--r--tools/editor/icons/icon_particles_shader.pngbin0 -> 367 bytes
-rw-r--r--tools/editor/icons/icon_polygon_path_finder.pngbin0 -> 307 bytes
-rw-r--r--tools/editor/icons/icon_reflection_probe.pngbin0 -> 370 bytes
-rw-r--r--tools/editor/icons/icon_room.pngbin333 -> 375 bytes
-rw-r--r--tools/editor/icons/icon_room_bounds.pngbin0 -> 363 bytes
-rw-r--r--tools/editor/icons/icon_sample_library.pngbin0 -> 333 bytes
-rw-r--r--tools/editor/icons/icon_script_create.pngbin341 -> 288 bytes
-rw-r--r--tools/editor/icons/icon_short_cut.pngbin0 -> 272 bytes
-rw-r--r--tools/editor/icons/icon_spatial_shader.pngbin0 -> 483 bytes
-rw-r--r--tools/editor/icons/icon_sprite_frames.pngbin0 -> 332 bytes
-rw-r--r--tools/editor/icons/icon_style_box_empty.pngbin0 -> 333 bytes
-rw-r--r--tools/editor/icons/icon_style_box_flat.pngbin0 -> 398 bytes
-rw-r--r--tools/editor/icons/icon_style_box_texture.pngbin0 -> 411 bytes
-rw-r--r--tools/editor/icons/icon_test_cube.pngbin392 -> 435 bytes
-rw-r--r--tools/editor/icons/icon_theme.pngbin0 -> 451 bytes
-rw-r--r--tools/editor/icons/icon_tile_set.pngbin0 -> 174 bytes
-rw-r--r--tools/editor/icons/icon_viewport_texture.pngbin0 -> 227 bytes
-rw-r--r--tools/editor/icons/icon_world.pngbin0 -> 254 bytes
-rw-r--r--tools/editor/icons/icon_world_2d.pngbin0 -> 328 bytes
-rw-r--r--tools/editor/icons/source/icon_bit_map.svg82
-rw-r--r--tools/editor/icons/source/icon_cube_map.svg120
-rw-r--r--tools/editor/icons/source/icon_curve_2d.svg82
-rw-r--r--tools/editor/icons/source/icon_curve_3d.svg82
-rw-r--r--tools/editor/icons/source/icon_environment.svg82
-rw-r--r--tools/editor/icons/source/icon_fixed_spatial_material.svg147
-rw-r--r--tools/editor/icons/source/icon_g_i_probe.svg110
-rw-r--r--tools/editor/icons/source/icon_g_i_probe_data.svg108
-rw-r--r--tools/editor/icons/source/icon_image_sky_box.svg116
-rw-r--r--tools/editor/icons/source/icon_interp_wrap_clamp.svg110
-rw-r--r--tools/editor/icons/source/icon_interp_wrap_loop.svg121
-rw-r--r--tools/editor/icons/source/icon_joypad.svg (renamed from tools/editor/icons/source/icon_joystick.svg)2
-rw-r--r--tools/editor/icons/source/icon_large_texture.svg80
-rw-r--r--tools/editor/icons/source/icon_load.svg84
-rw-r--r--tools/editor/icons/source/icon_mesh_library.svg78
-rw-r--r--tools/editor/icons/source/icon_navigation_mesh.svg78
-rw-r--r--tools/editor/icons/source/icon_navigation_polygon.svg88
-rw-r--r--tools/editor/icons/source/icon_packed_data_container.svg138
-rw-r--r--tools/editor/icons/source/icon_particles_shader.svg159
-rw-r--r--tools/editor/icons/source/icon_polygon_path_finder.svg77
-rw-r--r--tools/editor/icons/source/icon_reflection_probe.svg82
-rw-r--r--tools/editor/icons/source/icon_room.svg29
-rw-r--r--tools/editor/icons/source/icon_room_bounds.svg78
-rw-r--r--tools/editor/icons/source/icon_sample_library.svg87
-rw-r--r--tools/editor/icons/source/icon_script_create.svg29
-rw-r--r--tools/editor/icons/source/icon_shader.svg130
-rw-r--r--tools/editor/icons/source/icon_short_cut.svg89
-rw-r--r--tools/editor/icons/source/icon_spatial_shader.svg165
-rw-r--r--tools/editor/icons/source/icon_sprite_frames.svg119
-rw-r--r--tools/editor/icons/source/icon_style_box_empty.svg140
-rw-r--r--tools/editor/icons/source/icon_style_box_flat.svg149
-rw-r--r--tools/editor/icons/source/icon_style_box_texture.svg140
-rw-r--r--tools/editor/icons/source/icon_test_cube.svg20
-rw-r--r--tools/editor/icons/source/icon_theme.svg144
-rw-r--r--tools/editor/icons/source/icon_tile_set.svg80
-rw-r--r--tools/editor/icons/source/icon_viewport_texture.svg80
-rw-r--r--tools/editor/icons/source/icon_world.svg89
-rw-r--r--tools/editor/icons/source/icon_world_2d.svg82
-rw-r--r--tools/editor/inspector_dock.cpp2
-rw-r--r--tools/editor/inspector_dock.h4
-rw-r--r--tools/editor/io_plugins/editor_atlas.cpp2
-rw-r--r--tools/editor/io_plugins/editor_atlas.h2
-rw-r--r--tools/editor/io_plugins/editor_bitmask_import_plugin.cpp16
-rw-r--r--tools/editor/io_plugins/editor_bitmask_import_plugin.h4
-rw-r--r--tools/editor/io_plugins/editor_export_scene.cpp4
-rw-r--r--tools/editor/io_plugins/editor_export_scene.h4
-rw-r--r--tools/editor/io_plugins/editor_font_import_plugin.cpp50
-rw-r--r--tools/editor/io_plugins/editor_font_import_plugin.h4
-rw-r--r--tools/editor/io_plugins/editor_import_collada.cpp189
-rw-r--r--tools/editor/io_plugins/editor_import_collada.h4
-rw-r--r--tools/editor/io_plugins/editor_mesh_import_plugin.cpp18
-rw-r--r--tools/editor/io_plugins/editor_mesh_import_plugin.h4
-rw-r--r--tools/editor/io_plugins/editor_sample_import_plugin.cpp40
-rw-r--r--tools/editor/io_plugins/editor_sample_import_plugin.h8
-rw-r--r--tools/editor/io_plugins/editor_scene_import_plugin.cpp142
-rw-r--r--tools/editor/io_plugins/editor_scene_import_plugin.h10
-rw-r--r--tools/editor/io_plugins/editor_scene_importer_fbxconv.cpp61
-rw-r--r--tools/editor/io_plugins/editor_scene_importer_fbxconv.h6
-rw-r--r--tools/editor/io_plugins/editor_texture_import_plugin.cpp120
-rw-r--r--tools/editor/io_plugins/editor_texture_import_plugin.h8
-rw-r--r--tools/editor/io_plugins/editor_translation_import_plugin.cpp16
-rw-r--r--tools/editor/io_plugins/editor_translation_import_plugin.h4
-rw-r--r--tools/editor/multi_node_edit.cpp2
-rw-r--r--tools/editor/multi_node_edit.h4
-rw-r--r--tools/editor/node_dock.cpp4
-rw-r--r--tools/editor/node_dock.h2
-rw-r--r--tools/editor/output_strings.cpp12
-rw-r--r--tools/editor/output_strings.h4
-rw-r--r--tools/editor/pane_drag.cpp6
-rw-r--r--tools/editor/pane_drag.h6
-rw-r--r--tools/editor/plugins/animation_player_editor_plugin.cpp98
-rw-r--r--tools/editor/plugins/animation_player_editor_plugin.h8
-rw-r--r--tools/editor/plugins/animation_tree_editor_plugin.cpp90
-rw-r--r--tools/editor/plugins/animation_tree_editor_plugin.h8
-rw-r--r--tools/editor/plugins/baked_light_baker.cpp63
-rw-r--r--tools/editor/plugins/baked_light_baker.h9
-rw-r--r--tools/editor/plugins/baked_light_baker_cmpxchg.cpp2
-rw-r--r--tools/editor/plugins/baked_light_editor_plugin.cpp17
-rw-r--r--tools/editor/plugins/baked_light_editor_plugin.h16
-rw-r--r--tools/editor/plugins/camera_editor_plugin.cpp6
-rw-r--r--tools/editor/plugins/camera_editor_plugin.h6
-rw-r--r--tools/editor/plugins/canvas_item_editor_plugin.cpp226
-rw-r--r--tools/editor/plugins/canvas_item_editor_plugin.h15
-rw-r--r--tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp16
-rw-r--r--tools/editor/plugins/collision_polygon_2d_editor_plugin.h10
-rw-r--r--tools/editor/plugins/collision_polygon_editor_plugin.cpp41
-rw-r--r--tools/editor/plugins/collision_polygon_editor_plugin.h18
-rw-r--r--tools/editor/plugins/collision_shape_2d_editor_plugin.cpp10
-rw-r--r--tools/editor/plugins/collision_shape_2d_editor_plugin.h10
-rw-r--r--tools/editor/plugins/color_ramp_editor_plugin.cpp10
-rw-r--r--tools/editor/plugins/color_ramp_editor_plugin.h4
-rw-r--r--tools/editor/plugins/cube_grid_theme_editor_plugin.cpp23
-rw-r--r--tools/editor/plugins/cube_grid_theme_editor_plugin.h9
-rw-r--r--tools/editor/plugins/editor_preview_plugins.cpp83
-rw-r--r--tools/editor/plugins/editor_preview_plugins.h5
-rw-r--r--tools/editor/plugins/gi_probe_editor_plugin.cpp57
-rw-r--r--tools/editor/plugins/gi_probe_editor_plugin.h37
-rw-r--r--tools/editor/plugins/item_list_editor_plugin.cpp20
-rw-r--r--tools/editor/plugins/item_list_editor_plugin.h12
-rw-r--r--tools/editor/plugins/light_occluder_2d_editor_plugin.cpp18
-rw-r--r--tools/editor/plugins/light_occluder_2d_editor_plugin.h10
-rw-r--r--tools/editor/plugins/material_editor_plugin.cpp31
-rw-r--r--tools/editor/plugins/material_editor_plugin.h9
-rw-r--r--tools/editor/plugins/mesh_editor_plugin.cpp14
-rw-r--r--tools/editor/plugins/mesh_editor_plugin.h11
-rw-r--r--tools/editor/plugins/mesh_instance_editor_plugin.cpp14
-rw-r--r--tools/editor/plugins/mesh_instance_editor_plugin.h4
-rw-r--r--tools/editor/plugins/multimesh_editor_plugin.cpp70
-rw-r--r--tools/editor/plugins/multimesh_editor_plugin.h6
-rw-r--r--tools/editor/plugins/navigation_polygon_editor_plugin.cpp36
-rw-r--r--tools/editor/plugins/navigation_polygon_editor_plugin.h12
-rw-r--r--tools/editor/plugins/particles_2d_editor_plugin.cpp30
-rw-r--r--tools/editor/plugins/particles_2d_editor_plugin.h4
-rw-r--r--tools/editor/plugins/particles_editor_plugin.cpp25
-rw-r--r--tools/editor/plugins/particles_editor_plugin.h11
-rw-r--r--tools/editor/plugins/path_2d_editor_plugin.cpp18
-rw-r--r--tools/editor/plugins/path_2d_editor_plugin.h10
-rw-r--r--tools/editor/plugins/path_editor_plugin.cpp22
-rw-r--r--tools/editor/plugins/path_editor_plugin.h17
-rw-r--r--tools/editor/plugins/polygon_2d_editor_plugin.cpp101
-rw-r--r--tools/editor/plugins/polygon_2d_editor_plugin.h12
-rw-r--r--tools/editor/plugins/resource_preloader_editor_plugin.cpp34
-rw-r--r--tools/editor/plugins/resource_preloader_editor_plugin.h8
-rw-r--r--tools/editor/plugins/rich_text_editor_plugin.cpp10
-rw-r--r--tools/editor/plugins/rich_text_editor_plugin.h6
-rw-r--r--tools/editor/plugins/sample_editor_plugin.cpp26
-rw-r--r--tools/editor/plugins/sample_editor_plugin.h8
-rw-r--r--tools/editor/plugins/sample_library_editor_plugin.cpp32
-rw-r--r--tools/editor/plugins/sample_library_editor_plugin.h10
-rw-r--r--tools/editor/plugins/sample_player_editor_plugin.cpp8
-rw-r--r--tools/editor/plugins/sample_player_editor_plugin.h6
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp190
-rw-r--r--tools/editor/plugins/script_editor_plugin.h10
-rw-r--r--tools/editor/plugins/script_text_editor.cpp145
-rw-r--r--tools/editor/plugins/script_text_editor.h6
-rw-r--r--tools/editor/plugins/shader_editor_plugin.cpp272
-rw-r--r--tools/editor/plugins/shader_editor_plugin.h31
-rw-r--r--tools/editor/plugins/shader_graph_editor_plugin.cpp142
-rw-r--r--tools/editor/plugins/shader_graph_editor_plugin.h20
-rw-r--r--tools/editor/plugins/spatial_editor_plugin.cpp351
-rw-r--r--tools/editor/plugins/spatial_editor_plugin.h30
-rw-r--r--tools/editor/plugins/sprite_frames_editor_plugin.cpp56
-rw-r--r--tools/editor/plugins/sprite_frames_editor_plugin.h10
-rw-r--r--tools/editor/plugins/stream_editor_plugin.cpp8
-rw-r--r--tools/editor/plugins/stream_editor_plugin.h6
-rw-r--r--tools/editor/plugins/style_box_editor_plugin.cpp12
-rw-r--r--tools/editor/plugins/style_box_editor_plugin.h6
-rw-r--r--tools/editor/plugins/texture_editor_plugin.cpp8
-rw-r--r--tools/editor/plugins/texture_editor_plugin.h6
-rw-r--r--tools/editor/plugins/texture_region_editor_plugin.cpp77
-rw-r--r--tools/editor/plugins/texture_region_editor_plugin.h6
-rw-r--r--tools/editor/plugins/theme_editor_plugin.cpp26
-rw-r--r--tools/editor/plugins/theme_editor_plugin.h6
-rw-r--r--tools/editor/plugins/tile_map_editor_plugin.cpp157
-rw-r--r--tools/editor/plugins/tile_map_editor_plugin.h25
-rw-r--r--tools/editor/plugins/tile_set_editor_plugin.cpp12
-rw-r--r--tools/editor/plugins/tile_set_editor_plugin.h6
-rw-r--r--tools/editor/progress_dialog.cpp22
-rw-r--r--tools/editor/progress_dialog.h6
-rw-r--r--tools/editor/project_export.cpp138
-rw-r--r--tools/editor/project_export.h6
-rw-r--r--tools/editor/project_manager.cpp86
-rw-r--r--tools/editor/project_manager.h6
-rw-r--r--tools/editor/project_settings.cpp296
-rw-r--r--tools/editor/project_settings.h4
-rw-r--r--tools/editor/property_editor.cpp384
-rw-r--r--tools/editor/property_editor.h19
-rw-r--r--tools/editor/property_selector.cpp34
-rw-r--r--tools/editor/property_selector.h2
-rw-r--r--tools/editor/pvrtc_compress.cpp8
-rw-r--r--tools/editor/pvrtc_compress.h2
-rw-r--r--tools/editor/quick_open.cpp16
-rw-r--r--tools/editor/quick_open.h4
-rw-r--r--tools/editor/register_exporters.h2
-rw-r--r--tools/editor/reparent_dialog.cpp8
-rw-r--r--tools/editor/reparent_dialog.h4
-rw-r--r--tools/editor/resources_dock.cpp28
-rw-r--r--tools/editor/resources_dock.h4
-rw-r--r--tools/editor/run_settings_dialog.cpp8
-rw-r--r--tools/editor/run_settings_dialog.h4
-rw-r--r--tools/editor/scene_tree_dock.cpp82
-rw-r--r--tools/editor/scene_tree_dock.h4
-rw-r--r--tools/editor/scene_tree_editor.cpp122
-rw-r--r--tools/editor/scene_tree_editor.h7
-rw-r--r--tools/editor/script_create_dialog.cpp22
-rw-r--r--tools/editor/script_create_dialog.h4
-rw-r--r--tools/editor/script_editor_debugger.cpp89
-rw-r--r--tools/editor/script_editor_debugger.h5
-rw-r--r--tools/editor/settings_config_dialog.cpp28
-rw-r--r--tools/editor/settings_config_dialog.h4
-rw-r--r--tools/editor/spatial_editor_gizmos.cpp597
-rw-r--r--tools/editor/spatial_editor_gizmos.h148
347 files changed, 8729 insertions, 4341 deletions
diff --git a/tools/editor/animation_editor.cpp b/tools/editor/animation_editor.cpp
index a556031e5e..ba18d382ce 100644
--- a/tools/editor/animation_editor.cpp
+++ b/tools/editor/animation_editor.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -48,7 +48,7 @@
class AnimationCurveEdit : public Control {
- OBJ_TYPE( AnimationCurveEdit, Control );
+ GDCLASS( AnimationCurveEdit, Control );
public:
enum Mode {
MODE_DISABLED,
@@ -157,7 +157,7 @@ private:
}
}
- void _input_event(const InputEvent& p_ev) {
+ void _gui_input(const InputEvent& p_ev) {
if (p_ev.type==InputEvent::MOUSE_MOTION && p_ev.mouse_motion.button_mask&BUTTON_MASK_LEFT) {
if (mode==MODE_DISABLED)
@@ -198,8 +198,8 @@ public:
static void _bind_methods() {
- // ObjectTypeDB::bind_method("_update_obj",&AnimationKeyEdit::_update_obj);
- ObjectTypeDB::bind_method("_input_event",&AnimationCurveEdit::_input_event);
+ // ClassDB::bind_method("_update_obj",&AnimationKeyEdit::_update_obj);
+ ClassDB::bind_method("_gui_input",&AnimationCurveEdit::_gui_input);
ADD_SIGNAL(MethodInfo("transition_changed"));
}
@@ -243,15 +243,15 @@ public:
class AnimationKeyEdit : public Object {
- OBJ_TYPE(AnimationKeyEdit,Object);
+ GDCLASS(AnimationKeyEdit,Object);
public:
bool setting;
bool hidden;
static void _bind_methods() {
- ObjectTypeDB::bind_method("_update_obj",&AnimationKeyEdit::_update_obj);
- ObjectTypeDB::bind_method("_key_ofs_changed",&AnimationKeyEdit::_key_ofs_changed);
+ ClassDB::bind_method("_update_obj",&AnimationKeyEdit::_update_obj);
+ ClassDB::bind_method("_key_ofs_changed",&AnimationKeyEdit::_key_ofs_changed);
}
//PopupDialog *ke_dialog;
@@ -612,7 +612,7 @@ public:
if (res.is_valid()) {
hint=PROPERTY_HINT_RESOURCE_TYPE;
- hint_string=res->get_type();
+ hint_string=res->get_class();
}
}
@@ -1040,7 +1040,7 @@ void AnimationKeyEditor::_animation_optimize() {
- animation->optimize(optimize_linear_error->get_val(),optimize_angular_error->get_val(),optimize_max_angle->get_val());
+ animation->optimize(optimize_linear_error->get_value(),optimize_angular_error->get_value(),optimize_max_angle->get_value());
track_editor->update();
undo_redo->clear_history();
@@ -1049,7 +1049,7 @@ void AnimationKeyEditor::_animation_optimize() {
float AnimationKeyEditor::_get_zoom_scale() const {
- float zv = zoom->get_val();
+ float zv = zoom->get_value();
if (zv<1) {
zv = 1.0-zv;
return Math::pow(1.0+zv,8.0)*100;
@@ -1072,7 +1072,7 @@ void AnimationKeyEditor::_track_pos_draw() {
int settings_limit = size.width - right_data_size_cache;
int name_limit = settings_limit * name_column_ratio;
- float keys_from= h_scroll->get_val();
+ float keys_from= h_scroll->get_value();
float zoom_scale = _get_zoom_scale();
float keys_to=keys_from+(settings_limit-name_limit) / zoom_scale;
@@ -1081,7 +1081,7 @@ void AnimationKeyEditor::_track_pos_draw() {
//will move to separate control! (for speedup)
if (timeline_pos >= keys_from && timeline_pos<keys_to) {
//draw position
- int pixel = (timeline_pos - h_scroll->get_val()) * zoom_scale;
+ int pixel = (timeline_pos - h_scroll->get_value()) * zoom_scale;
pixel+=name_limit;
track_pos->draw_line(ofs+Point2(pixel,0),ofs+Point2(pixel,size.height),Color(1,0.3,0.3,0.8));
@@ -1090,7 +1090,6 @@ void AnimationKeyEditor::_track_pos_draw() {
void AnimationKeyEditor::_track_editor_draw() {
- VisualServer::get_singleton()->canvas_item_set_clip(track_editor->get_canvas_item(),true);
if (animation.is_valid() && animation->get_track_count()) {
if (selected_track < 0)
@@ -1157,6 +1156,12 @@ void AnimationKeyEditor::_track_editor_draw() {
Ref<Texture> add_key_icon = get_icon("TrackAddKey","EditorIcons");
Ref<Texture> add_key_icon_hl = get_icon("TrackAddKeyHl","EditorIcons");
Ref<Texture> down_icon = get_icon("select_arrow","Tree");
+
+ Ref<Texture> wrap_icon[2]={
+ get_icon("InterpWrapClamp","EditorIcons"),
+ get_icon("InterpWrapLoop","EditorIcons"),
+ };
+
Ref<Texture> interp_icon[3]={
get_icon("InterpRaw","EditorIcons"),
get_icon("InterpLinear","EditorIcons"),
@@ -1181,7 +1186,7 @@ void AnimationKeyEditor::_track_editor_draw() {
Ref<Texture> type_hover=get_icon("KeyHover","EditorIcons");
Ref<Texture> type_selected=get_icon("KeySelected","EditorIcons");
- int right_separator_ofs = down_icon->get_width() *2 + add_key_icon->get_width() + interp_icon[0]->get_width() + cont_icon[0]->get_width() + hsep*7;
+ int right_separator_ofs = down_icon->get_width() *3 + add_key_icon->get_width() + interp_icon[0]->get_width() + wrap_icon[0]->get_width() + cont_icon[0]->get_width() + hsep*9;
int h = font->get_height()+sep;
@@ -1227,8 +1232,8 @@ void AnimationKeyEditor::_track_editor_draw() {
if (l<=0)
l=0.001; //avoid crashor
- int end_px = (l - h_scroll->get_val()) * scale;
- int begin_px = -h_scroll->get_val() * scale;
+ int end_px = (l - h_scroll->get_value()) * scale;
+ int begin_px = -h_scroll->get_value() * scale;
Color notimecol;
notimecol.r=timecolor.gray();
notimecol.g=notimecol.r;
@@ -1254,7 +1259,7 @@ void AnimationKeyEditor::_track_editor_draw() {
- keys_from= h_scroll->get_val();
+ keys_from= h_scroll->get_value();
keys_to=keys_from+zoomw / scale;
{
@@ -1331,8 +1336,8 @@ void AnimationKeyEditor::_track_editor_draw() {
for(int i=0;i<zoomw;i++) {
- float pos = h_scroll->get_val() + double(i)/scale;
- float prev = h_scroll->get_val() + (double(i)-1.0)/scale;
+ float pos = h_scroll->get_value() + double(i)/scale;
+ float prev = h_scroll->get_value() + (double(i)-1.0)/scale;
int sc = int(Math::floor(pos*SC_ADJ));
@@ -1356,7 +1361,7 @@ void AnimationKeyEditor::_track_editor_draw() {
//this code sucks, i always forget how it works
- int idx = v_scroll->get_val() + i;
+ int idx = v_scroll->get_value() + i;
if (idx>=animation->get_track_count())
break;
int y = h+i*h+sep;
@@ -1421,6 +1426,20 @@ void AnimationKeyEditor::_track_editor_draw() {
icon_ofs.x-=hsep;
*/
+ track_ofs[0]=size.width-icon_ofs.x;
+ icon_ofs.x-=down_icon->get_width();
+ te->draw_texture(down_icon,icon_ofs);
+
+ int wrap_type = animation->track_get_interpolation_loop_wrap(idx)?1:0;
+ icon_ofs.x-=hsep;
+ icon_ofs.x-=wrap_icon[wrap_type]->get_width();
+ te->draw_texture(wrap_icon[wrap_type],icon_ofs);
+
+ icon_ofs.x-=hsep;
+ te->draw_line(Point2(icon_ofs.x,ofs.y+y),Point2(icon_ofs.x,ofs.y+y+h),sepcolor);
+
+ track_ofs[1]=size.width-icon_ofs.x;
+
icon_ofs.x-=down_icon->get_width();
te->draw_texture(down_icon,icon_ofs);
@@ -1433,6 +1452,8 @@ void AnimationKeyEditor::_track_editor_draw() {
icon_ofs.x-=hsep;
te->draw_line(Point2(icon_ofs.x,ofs.y+y),Point2(icon_ofs.x,ofs.y+y+h),sepcolor);
+ track_ofs[2]=size.width-icon_ofs.x;
+
if (animation->track_get_type(idx)==Animation::TYPE_VALUE) {
@@ -1453,10 +1474,14 @@ void AnimationKeyEditor::_track_editor_draw() {
icon_ofs.x-=hsep;
te->draw_line(Point2(icon_ofs.x,ofs.y+y),Point2(icon_ofs.x,ofs.y+y+h),sepcolor);
+ track_ofs[3]=size.width-icon_ofs.x;
+
icon_ofs.x-=hsep;
icon_ofs.x-=add_key_icon->get_width();
te->draw_texture((mouse_over.over==MouseOver::OVER_ADD_KEY && mouse_over.track==idx)?add_key_icon_hl:add_key_icon,icon_ofs);
+ track_ofs[4]=size.width-icon_ofs.x;
+
//draw the keys;
int tt = animation->track_get_type(idx);
float key_vofs = Math::floor((h - type_icon[tt]->get_height())/2);
@@ -1552,14 +1577,14 @@ void AnimationKeyEditor::_track_editor_draw() {
}
float motion = from_t+(click.to.x - click.at.x)/zoom_scale;
- if (step->get_val())
- motion = Math::stepify(motion,step->get_val());
+ if (step->get_value())
+ motion = Math::stepify(motion,step->get_value());
for(Map<SelectedKey,KeyInfo>::Element *E=selection.front();E;E=E->next()) {
int idx = E->key().track;
- int i = idx-v_scroll->get_val();
+ int i = idx-v_scroll->get_value();
if (i<0 || i>=fit)
continue;
int y = h+i*h+sep;
@@ -1621,6 +1646,14 @@ void AnimationKeyEditor::_track_menu_selected(int p_idx) {
undo_redo->add_do_method(animation.ptr(),"value_track_set_update_mode",cont_editing,p_idx);
undo_redo->add_undo_method(animation.ptr(),"value_track_set_update_mode",cont_editing,animation->value_track_get_update_mode(cont_editing));
undo_redo->commit_action();
+ } else if (wrap_editing!=-1) {
+
+ ERR_FAIL_INDEX(wrap_editing,animation->get_track_count());
+
+ undo_redo->create_action(TTR("Anim Track Change Wrap Mode"));
+ undo_redo->add_do_method(animation.ptr(),"track_set_interpolation_loop_wrap",wrap_editing,p_idx?true:false);
+ undo_redo->add_undo_method(animation.ptr(),"track_set_interpolation_loop_wrap",wrap_editing,animation->track_get_interpolation_loop_wrap(wrap_editing));
+ undo_redo->commit_action();
} else {
switch (p_idx) {
@@ -1811,7 +1844,7 @@ void AnimationKeyEditor::_anim_delete_keys() {
}
}
-void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
+void AnimationKeyEditor::_track_editor_gui_input(const InputEvent& p_input) {
Control *te=track_editor;
Ref<StyleBox> style = get_stylebox("normal","TextEdit");
@@ -1833,6 +1866,10 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
Ref<Texture> hsize_icon = get_icon("Hsize","EditorIcons");
Ref<Texture> add_key_icon = get_icon("TrackAddKey","EditorIcons");
+ Ref<Texture> wrap_icon[2]={
+ get_icon("InterpWrapClamp","EditorIcons"),
+ get_icon("InterpWrapLoop","EditorIcons"),
+ };
Ref<Texture> interp_icon[3]={
get_icon("InterpRaw","EditorIcons"),
get_icon("InterpLinear","EditorIcons"),
@@ -1848,7 +1885,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
get_icon("KeyXform","EditorIcons"),
get_icon("KeyCall","EditorIcons")
};
- int right_separator_ofs = down_icon->get_width() *2 + add_key_icon->get_width() + interp_icon[0]->get_width() + cont_icon[0]->get_width() + hsep*7;
+ int right_separator_ofs = down_icon->get_width() *3 + add_key_icon->get_width() + interp_icon[0]->get_width() + wrap_icon[0]->get_width() + cont_icon[0]->get_width() + hsep*9;
int h = font->get_height()+sep;
@@ -1896,8 +1933,8 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
if (v_scroll->is_visible()) {
- if (v_scroll->get_val() > selected_track)
- v_scroll->set_val(selected_track);
+ if (v_scroll->get_value() > selected_track)
+ v_scroll->set_value(selected_track);
}
@@ -1916,8 +1953,8 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
if (selected_track >= animation->get_track_count())
selected_track=animation->get_track_count()-1;
- if (v_scroll->is_visible() && v_scroll->get_page()+v_scroll->get_val() < selected_track+1) {
- v_scroll->set_val(selected_track-v_scroll->get_page()+1);
+ if (v_scroll->is_visible() && v_scroll->get_page()+v_scroll->get_value() < selected_track+1) {
+ v_scroll->set_value(selected_track-v_scroll->get_page()+1);
}
track_editor->update();
@@ -1934,18 +1971,18 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
if (mb.button_index==BUTTON_WHEEL_UP && mb.pressed) {
if (mb.mod.command) {
- zoom->set_val(zoom->get_val() + zoom->get_step());
+ zoom->set_value(zoom->get_value() + zoom->get_step());
} else {
- v_scroll->set_val( v_scroll->get_val() - v_scroll->get_page() / 8 );
+ v_scroll->set_value( v_scroll->get_value() - v_scroll->get_page() / 8 );
}
}
if (mb.button_index==BUTTON_WHEEL_DOWN && mb.pressed) {
if (mb.mod.command) {
- zoom->set_val(zoom->get_val() - zoom->get_step());
+ zoom->set_value(zoom->get_value() - zoom->get_step());
} else {
- v_scroll->set_val( v_scroll->get_val() + v_scroll->get_page() / 8 );
+ v_scroll->set_value( v_scroll->get_value() + v_scroll->get_page() / 8 );
}
}
@@ -1966,7 +2003,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
mpos.y -= h;
int idx = mpos.y / h;
- idx+=v_scroll->get_val();
+ idx+=v_scroll->get_value();
if (idx <0 || idx>=animation->get_track_count())
break;
@@ -1974,7 +2011,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
} else if (mpos.x < settings_limit) {
float pos = mpos.x - name_limit;
pos/=_get_zoom_scale();
- pos+=h_scroll->get_val();
+ pos+=h_scroll->get_value();
float w_time = (type_icon[0]->get_width() / _get_zoom_scale())/2.0;
int kidx = animation->track_find_key(idx,pos);
@@ -2054,6 +2091,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
interp_editing=-1;
cont_editing=-1;
+ wrap_editing=-1;
track_menu->popup();
}
@@ -2083,7 +2121,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
//seek
//int zoomw = settings_limit-name_limit;
float scale = _get_zoom_scale();
- float pos = h_scroll->get_val() + (mpos.x-name_limit) / scale;
+ float pos = h_scroll->get_value() + (mpos.x-name_limit) / scale;
if (animation->get_step())
pos=Math::stepify(pos,animation->get_step());
@@ -2105,7 +2143,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
mpos.y -= h;
int idx = mpos.y / h;
- idx+=v_scroll->get_val();
+ idx+=v_scroll->get_value();
if (idx <0)
break;
@@ -2146,7 +2184,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
float pos = mpos.x - name_limit;
pos/=_get_zoom_scale();
- pos+=h_scroll->get_val();
+ pos+=h_scroll->get_value();
float w_time = (type_icon[0]->get_width() / _get_zoom_scale())/2.0;
int kidx = animation->track_find_key(idx,pos);
@@ -2277,7 +2315,33 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
ofsx-=hsep*3+move_up_icon->get_width();
*/
- if (ofsx < down_icon->get_width() + interp_icon[0]->get_width() + hsep*2) {
+
+ if (ofsx < track_ofs[1]) {
+
+ track_menu->clear();
+ track_menu->set_size(Point2(1,1));
+ static const char *interp_name[2]={"Clamp Loop Interp","Wrap Loop Interp"};
+ for(int i=0;i<2;i++) {
+ track_menu->add_icon_item(wrap_icon[i],interp_name[i]);
+ }
+
+ int popup_y = ofs.y+((int(mpos.y)/h)+2)*h;
+ int popup_x = size.width-track_ofs[1];
+
+ track_menu->set_pos(te->get_global_pos()+Point2(popup_x,popup_y));
+
+
+ wrap_editing=idx;
+ interp_editing=-1;
+ cont_editing=-1;
+
+ track_menu->popup();
+
+ return;
+ }
+
+
+ if (ofsx < track_ofs[2]) {
track_menu->clear();
track_menu->set_size(Point2(1,1));
@@ -2286,24 +2350,22 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
track_menu->add_icon_item(interp_icon[i],interp_name[i]);
}
- int lofs = remove_icon->get_width() + move_up_icon->get_width() + move_down_icon->get_width() + down_icon->get_width() *2 + hsep*7;//interp_icon[0]->get_width() + cont_icon[0]->get_width() ;
int popup_y = ofs.y+((int(mpos.y)/h)+2)*h;
- int popup_x = ofs.x+size.width-lofs;
+ int popup_x = size.width-track_ofs[2];
track_menu->set_pos(te->get_global_pos()+Point2(popup_x,popup_y));
interp_editing=idx;
cont_editing=-1;
+ wrap_editing=-1;
track_menu->popup();
return;
}
- ofsx-=hsep*2+interp_icon[0]->get_width()+down_icon->get_width();
-
- if (ofsx < down_icon->get_width() + cont_icon[0]->get_width()) {
+ if (ofsx < track_ofs[3]) {
track_menu->clear();
track_menu->set_size(Point2(1,1));
@@ -2312,13 +2374,14 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
track_menu->add_icon_item(cont_icon[i],cont_name[i]);
}
- int lofs = settings_limit;
+
int popup_y = ofs.y+((int(mpos.y)/h)+2)*h;
- int popup_x = ofs.x+lofs;
+ int popup_x = size.width-track_ofs[3];
track_menu->set_pos(te->get_global_pos()+Point2(popup_x,popup_y));
interp_editing=-1;
+ wrap_editing=-1;
cont_editing=idx;
track_menu->popup();
@@ -2326,9 +2389,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
return;
}
- ofsx-=hsep*3+cont_icon[0]->get_width()+down_icon->get_width();
-
- if (ofsx < add_key_icon->get_width()) {
+ if (ofsx < track_ofs[4]) {
Animation::TrackType tt = animation->track_get_type(idx);
@@ -2403,7 +2464,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
float zoom_scale=_get_zoom_scale();
- float keys_from = h_scroll->get_val();
+ float keys_from = h_scroll->get_value();
float keys_to = keys_from + (settings_limit-name_limit) / zoom_scale;
float from_time = keys_from + ( click.at.x - (name_limit+ofs.x)) / zoom_scale;
@@ -2423,8 +2484,8 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
to_time = keys_to;
- int from_track = int(click.at.y-ofs.y-h-sep) / h + v_scroll->get_val();
- int to_track = int(click.to.y-ofs.y-h-sep) / h + v_scroll->get_val();
+ int from_track = int(click.at.y-ofs.y-h-sep) / h + v_scroll->get_value();
+ int to_track = int(click.to.y-ofs.y-h-sep) / h + v_scroll->get_value();
int from_mod = int(click.at.y-ofs.y-sep) % h;
int to_mod = int(click.to.y-ofs.y-sep) % h;
@@ -2452,8 +2513,8 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
break;
}
- int tracks_from = v_scroll->get_val();
- int tracks_to = v_scroll->get_val()+fit-1;
+ int tracks_from = v_scroll->get_value();
+ int tracks_to = v_scroll->get_value()+fit-1;
if (tracks_to>=animation->get_track_count())
tracks_to=animation->get_track_count()-1;
@@ -2536,8 +2597,8 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
}
float motion = from_t+(click.to.x - click.at.x)/_get_zoom_scale();
- if (step->get_val())
- motion = Math::stepify(motion,step->get_val());
+ if (step->get_value())
+ motion = Math::stepify(motion,step->get_value());
@@ -2700,7 +2761,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
//int zoomw = settings_limit-name_limit;
float scale = _get_zoom_scale();
- float pos = h_scroll->get_val() + (mpos.x-name_limit) / scale;
+ float pos = h_scroll->get_value() + (mpos.x-name_limit) / scale;
if (animation->get_step()) {
pos=Math::stepify(pos,animation->get_step());
@@ -2710,10 +2771,10 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
if (pos>=animation->get_length())
pos=animation->get_length();
- if (pos < h_scroll->get_val()) {
- h_scroll->set_val(pos);
- } else if (pos > h_scroll->get_val() + (settings_limit - name_limit) / scale) {
- h_scroll->set_val( pos - (settings_limit - name_limit) / scale );
+ if (pos < h_scroll->get_value()) {
+ h_scroll->set_value(pos);
+ } else if (pos > h_scroll->get_value() + (settings_limit - name_limit) / scale) {
+ h_scroll->set_value( pos - (settings_limit - name_limit) / scale );
}
timeline_pos=pos;
@@ -2727,18 +2788,18 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
click.to=Point2(mb.x,mb.y);
if (click.to.y<h && click.at.y>h && mb.relative_y<0) {
- float prev = v_scroll->get_val();
- v_scroll->set_val( v_scroll->get_val() -1 );
- if (prev!=v_scroll->get_val())
+ float prev = v_scroll->get_value();
+ v_scroll->set_value( v_scroll->get_value() -1 );
+ if (prev!=v_scroll->get_value())
click.at.y+=h;
}
if (click.to.y>size.height && click.at.y<size.height && mb.relative_y>0) {
- float prev = v_scroll->get_val();
- v_scroll->set_val( v_scroll->get_val() +1 );
- if (prev!=v_scroll->get_val())
+ float prev = v_scroll->get_value();
+ v_scroll->set_value( v_scroll->get_value() +1 );
+ if (prev!=v_scroll->get_value())
click.at.y-=h;
}
@@ -2755,7 +2816,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
int rel = mb.relative_x;
float relf = rel / _get_zoom_scale();
- h_scroll->set_val( h_scroll->get_val() - relf );
+ h_scroll->set_value( h_scroll->get_value() - relf );
}
if (mb.button_mask==0) {
@@ -2781,7 +2842,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
mpos.y -= h;
int idx = mpos.y / h;
- idx+=v_scroll->get_val();
+ idx+=v_scroll->get_value();
if (idx <0 || idx>=animation->get_track_count())
break;
@@ -2797,7 +2858,7 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
float pos = mpos.x - name_limit;
pos/=_get_zoom_scale();
- pos+=h_scroll->get_val();
+ pos+=h_scroll->get_value();
float w_time = (type_icon[0]->get_width() / _get_zoom_scale())/2.0;
int kidx = animation->track_find_key(idx,pos);
@@ -2940,7 +3001,15 @@ void AnimationKeyEditor::_track_editor_input_event(const InputEvent& p_input) {
*/
- if (ofsx < down_icon->get_width() + interp_icon[0]->get_width() + hsep*2) {
+ if (ofsx < down_icon->get_width() + wrap_icon[0]->get_width() + hsep*3) {
+
+ mouse_over.over=MouseOver::OVER_WRAP;
+ return;
+ }
+
+ ofsx-=hsep*3+wrap_icon[0]->get_width() + down_icon->get_width();
+
+ if (ofsx < down_icon->get_width() + interp_icon[0]->get_width() + hsep*3) {
mouse_over.over=MouseOver::OVER_INTERP;
return;
@@ -3012,7 +3081,7 @@ void AnimationKeyEditor::_notification(int p_what) {
tpp->add_item(TTR("In-Out"),TRACK_MENU_SET_ALL_TRANS_INOUT);
tpp->add_item(TTR("Out-In"),TRACK_MENU_SET_ALL_TRANS_OUTIN);
tpp->set_name(TTR("Transitions"));
- tpp->connect("item_pressed",this,"_menu_track");
+ tpp->connect("id_pressed",this,"_menu_track");
optimize_dialog->connect("confirmed",this,"_animation_optimize");
menu_track->get_popup()->add_child(tpp);
@@ -3068,8 +3137,13 @@ void AnimationKeyEditor::_notification(int p_what) {
get_icon("TrackTrigger","EditorIcons")
};
+ Ref<Texture> wrap_icon[2]={
+ get_icon("InterpWrapClamp","EditorIcons"),
+ get_icon("InterpWrapLoop","EditorIcons"),
+ };
+
//right_data_size_cache = remove_icon->get_width() + move_up_icon->get_width() + move_down_icon->get_width() + down_icon->get_width() *2 + interp_icon[0]->get_width() + cont_icon[0]->get_width() + add_key_icon->get_width() + hsep*11;
- right_data_size_cache = down_icon->get_width() *2 + add_key_icon->get_width() + interp_icon[0]->get_width() + cont_icon[0]->get_width() + hsep*7;
+ right_data_size_cache = down_icon->get_width() *3 + add_key_icon->get_width() + interp_icon[0]->get_width() + cont_icon[0]->get_width() + wrap_icon[0]->get_width() + hsep*8;
}
@@ -3112,8 +3186,8 @@ void AnimationKeyEditor::_update_paths() {
//timeline->set_max(animation->get_length());
//timeline->set_step(0.01);
track_editor->update();
- length->set_val(animation->get_length());
- step->set_val(animation->get_step());
+ length->set_value(animation->get_length());
+ step->set_value(animation->get_step());
}
}
@@ -3130,9 +3204,9 @@ void AnimationKeyEditor::_update_menu() {
if (animation.is_valid()) {
- length->set_val(animation->get_length());
+ length->set_value(animation->get_length());
loop->set_pressed(animation->has_loop());
- step->set_val(animation->get_step());
+ step->set_value(animation->get_step());
}
track_editor->update();
@@ -3233,7 +3307,7 @@ void AnimationKeyEditor::_query_insert(const InsertData& p_id) {
insert_data.push_back(p_id);
if (p_id.track_idx==-1) {
- if (bool(EDITOR_DEF("animation/confirm_insert_track",true))) {
+ if (bool(EDITOR_DEF("editors/animation/confirm_insert_track",true))) {
//potential new key, does not exist
if (insert_data.size()==1)
insert_confirm->set_text(vformat(TTR("Create NEW track for %s and insert key?"),p_id.query));
@@ -3710,7 +3784,7 @@ void AnimationKeyEditor::_scale() {
}
- float s = scale->get_val();
+ float s = scale->get_value();
if (s==0) {
ERR_PRINT("Can't scale to 0");
}
@@ -3841,48 +3915,48 @@ void AnimationKeyEditor::cleanup() {
void AnimationKeyEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_root_removed"),&AnimationKeyEditor::_root_removed);
- ObjectTypeDB::bind_method(_MD("_scale"),&AnimationKeyEditor::_scale);
- ObjectTypeDB::bind_method(_MD("set_root"),&AnimationKeyEditor::set_root);
+ ClassDB::bind_method(_MD("_root_removed"),&AnimationKeyEditor::_root_removed);
+ ClassDB::bind_method(_MD("_scale"),&AnimationKeyEditor::_scale);
+ ClassDB::bind_method(_MD("set_root"),&AnimationKeyEditor::set_root);
-// ObjectTypeDB::bind_method(_MD("_confirm_insert"),&AnimationKeyEditor::_confirm_insert);
- ObjectTypeDB::bind_method(_MD("_confirm_insert_list"),&AnimationKeyEditor::_confirm_insert_list);
+// ClassDB::bind_method(_MD("_confirm_insert"),&AnimationKeyEditor::_confirm_insert);
+ ClassDB::bind_method(_MD("_confirm_insert_list"),&AnimationKeyEditor::_confirm_insert_list);
- ObjectTypeDB::bind_method(_MD("_update_paths"),&AnimationKeyEditor::_update_paths);
- ObjectTypeDB::bind_method(_MD("_track_editor_draw"),&AnimationKeyEditor::_track_editor_draw);
+ ClassDB::bind_method(_MD("_update_paths"),&AnimationKeyEditor::_update_paths);
+ ClassDB::bind_method(_MD("_track_editor_draw"),&AnimationKeyEditor::_track_editor_draw);
- ObjectTypeDB::bind_method(_MD("_animation_changed"),&AnimationKeyEditor::_animation_changed);
- ObjectTypeDB::bind_method(_MD("_scroll_changed"),&AnimationKeyEditor::_scroll_changed);
- ObjectTypeDB::bind_method(_MD("_track_editor_input_event"),&AnimationKeyEditor::_track_editor_input_event);
- ObjectTypeDB::bind_method(_MD("_track_name_changed"),&AnimationKeyEditor::_track_name_changed);
- ObjectTypeDB::bind_method(_MD("_track_menu_selected"),&AnimationKeyEditor::_track_menu_selected);
- ObjectTypeDB::bind_method(_MD("_menu_add_track"),&AnimationKeyEditor::_menu_add_track);
- ObjectTypeDB::bind_method(_MD("_menu_track"),&AnimationKeyEditor::_menu_track);
- ObjectTypeDB::bind_method(_MD("_clear_selection_for_anim"),&AnimationKeyEditor::_clear_selection_for_anim);
- ObjectTypeDB::bind_method(_MD("_select_at_anim"),&AnimationKeyEditor::_select_at_anim);
- ObjectTypeDB::bind_method(_MD("_track_pos_draw"),&AnimationKeyEditor::_track_pos_draw);
- ObjectTypeDB::bind_method(_MD("_insert_delay"),&AnimationKeyEditor::_insert_delay);
- ObjectTypeDB::bind_method(_MD("_step_changed"),&AnimationKeyEditor::_step_changed);
+ ClassDB::bind_method(_MD("_animation_changed"),&AnimationKeyEditor::_animation_changed);
+ ClassDB::bind_method(_MD("_scroll_changed"),&AnimationKeyEditor::_scroll_changed);
+ ClassDB::bind_method(_MD("_track_editor_gui_input"),&AnimationKeyEditor::_track_editor_gui_input);
+ ClassDB::bind_method(_MD("_track_name_changed"),&AnimationKeyEditor::_track_name_changed);
+ ClassDB::bind_method(_MD("_track_menu_selected"),&AnimationKeyEditor::_track_menu_selected);
+ ClassDB::bind_method(_MD("_menu_add_track"),&AnimationKeyEditor::_menu_add_track);
+ ClassDB::bind_method(_MD("_menu_track"),&AnimationKeyEditor::_menu_track);
+ ClassDB::bind_method(_MD("_clear_selection_for_anim"),&AnimationKeyEditor::_clear_selection_for_anim);
+ ClassDB::bind_method(_MD("_select_at_anim"),&AnimationKeyEditor::_select_at_anim);
+ ClassDB::bind_method(_MD("_track_pos_draw"),&AnimationKeyEditor::_track_pos_draw);
+ ClassDB::bind_method(_MD("_insert_delay"),&AnimationKeyEditor::_insert_delay);
+ ClassDB::bind_method(_MD("_step_changed"),&AnimationKeyEditor::_step_changed);
- ObjectTypeDB::bind_method(_MD("_animation_loop_changed"),&AnimationKeyEditor::_animation_loop_changed);
- ObjectTypeDB::bind_method(_MD("_animation_len_changed"),&AnimationKeyEditor::_animation_len_changed);
- ObjectTypeDB::bind_method(_MD("_create_value_item"),&AnimationKeyEditor::_create_value_item);
- ObjectTypeDB::bind_method(_MD("_pane_drag"),&AnimationKeyEditor::_pane_drag);
+ ClassDB::bind_method(_MD("_animation_loop_changed"),&AnimationKeyEditor::_animation_loop_changed);
+ ClassDB::bind_method(_MD("_animation_len_changed"),&AnimationKeyEditor::_animation_len_changed);
+ ClassDB::bind_method(_MD("_create_value_item"),&AnimationKeyEditor::_create_value_item);
+ ClassDB::bind_method(_MD("_pane_drag"),&AnimationKeyEditor::_pane_drag);
- ObjectTypeDB::bind_method(_MD("_animation_len_update"),&AnimationKeyEditor::_animation_len_update);
+ ClassDB::bind_method(_MD("_animation_len_update"),&AnimationKeyEditor::_animation_len_update);
- ObjectTypeDB::bind_method(_MD("set_animation"),&AnimationKeyEditor::set_animation);
- ObjectTypeDB::bind_method(_MD("_animation_optimize"),&AnimationKeyEditor::_animation_optimize);
- ObjectTypeDB::bind_method(_MD("_curve_transition_changed"),&AnimationKeyEditor::_curve_transition_changed);
- ObjectTypeDB::bind_method(_MD("_toggle_edit_curves"),&AnimationKeyEditor::_toggle_edit_curves);
- ObjectTypeDB::bind_method(_MD("_add_call_track"),&AnimationKeyEditor::_add_call_track);
+ ClassDB::bind_method(_MD("set_animation"),&AnimationKeyEditor::set_animation);
+ ClassDB::bind_method(_MD("_animation_optimize"),&AnimationKeyEditor::_animation_optimize);
+ ClassDB::bind_method(_MD("_curve_transition_changed"),&AnimationKeyEditor::_curve_transition_changed);
+ ClassDB::bind_method(_MD("_toggle_edit_curves"),&AnimationKeyEditor::_toggle_edit_curves);
+ ClassDB::bind_method(_MD("_add_call_track"),&AnimationKeyEditor::_add_call_track);
ADD_SIGNAL( MethodInfo("resource_selected", PropertyInfo( Variant::OBJECT, "res"),PropertyInfo( Variant::STRING, "prop") ) );
@@ -3914,7 +3988,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
h_scroll = memnew( HScrollBar );
h_scroll->connect("value_changed",this,"_scroll_changed");
add_child(h_scroll);
- h_scroll->set_val(0);
+ h_scroll->set_value(0);
HBoxContainer *hb = memnew( HBoxContainer );
@@ -3936,7 +4010,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
zoom->set_step(0.01);
zoom->set_min(0.0);
zoom->set_max(2.0);
- zoom->set_val(1.0);
+ zoom->set_value(1.0);
zoom->set_h_size_flags(SIZE_EXPAND_FILL);
zoom->set_stretch_ratio(2);
hb->add_child(zoom);
@@ -3968,7 +4042,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
step->set_min(0.00);
step->set_max(128);
step->set_step(0.01);
- step->set_val(0.0);
+ step->set_value(0.0);
step->set_h_size_flags(SIZE_EXPAND_FILL);
step->set_stretch_ratio(1);
step->set_tooltip(TTR("Cursor step snap (in seconds)."));
@@ -3986,7 +4060,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
menu_add_track = memnew( MenuButton );
hb->add_child(menu_add_track);
- menu_add_track->get_popup()->connect("item_pressed",this,"_menu_add_track");
+ menu_add_track->get_popup()->connect("id_pressed",this,"_menu_add_track");
menu_add_track->set_tooltip(TTR("Add new tracks."));
move_up_button = memnew( ToolButton );
@@ -4014,7 +4088,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
menu_track = memnew( MenuButton );
hb->add_child(menu_track);
- menu_track->get_popup()->connect("item_pressed",this,"_menu_track");
+ menu_track->get_popup()->connect("id_pressed",this,"_menu_track");
menu_track->set_tooltip(TTR("Track tools"));
edit_button = memnew( ToolButton );
@@ -4030,18 +4104,18 @@ AnimationKeyEditor::AnimationKeyEditor() {
optimize_dialog->set_title(TTR("Anim. Optimizer"));
VBoxContainer *optimize_vb = memnew( VBoxContainer );
optimize_dialog->add_child(optimize_vb);
- optimize_dialog->set_child_rect(optimize_vb);
+
optimize_linear_error = memnew( SpinBox );
optimize_linear_error->set_max(1.0);
optimize_linear_error->set_min(0.001);
optimize_linear_error->set_step(0.001);
- optimize_linear_error->set_val(0.05);
+ optimize_linear_error->set_value(0.05);
optimize_vb->add_margin_child(TTR("Max. Linear Error:"),optimize_linear_error);
optimize_angular_error = memnew( SpinBox );
optimize_angular_error->set_max(1.0);
optimize_angular_error->set_min(0.001);
optimize_angular_error->set_step(0.001);
- optimize_angular_error->set_val(0.01);
+ optimize_angular_error->set_value(0.01);
optimize_vb->add_margin_child(TTR("Max. Angular Error:"),optimize_angular_error);
optimize_max_angle = memnew( SpinBox );
@@ -4049,7 +4123,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
optimize_max_angle->set_max(360.0);
optimize_max_angle->set_min(0.0);
optimize_max_angle->set_step(0.1);
- optimize_max_angle->set_val(22);
+ optimize_max_angle->set_value(22);
optimize_dialog->get_ok()->set_text(TTR("Optimize"));
@@ -4071,7 +4145,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
l->set_pos(Point2(0,3));
// dr_panel->add_child(l);*/
-// menu->get_popup()->connect("item_pressed",this,"_menu_callback");
+// menu->get_popup()->connect("id_pressed",this,"_menu_callback");
hb = memnew( HBoxContainer);
@@ -4082,7 +4156,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
track_editor = memnew( Control );
track_editor->connect("draw",this,"_track_editor_draw");
hb->add_child(track_editor);
- track_editor->connect("input_event",this,"_track_editor_input_event");
+ track_editor->connect("gui_input",this,"_track_editor_gui_input");
track_editor->set_focus_mode(Control::FOCUS_ALL);
track_editor->set_h_size_flags(SIZE_EXPAND_FILL);
@@ -4090,7 +4164,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
track_pos = memnew( Control );
track_pos->set_area_as_parent_rect();
- track_pos->set_ignore_mouse(true);
+ track_pos->set_mouse_filter(MOUSE_FILTER_IGNORE);
track_editor->add_child(track_pos);
track_pos->connect("draw",this,"_track_pos_draw");
@@ -4107,7 +4181,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
v_scroll = memnew( VScrollBar );
hb->add_child(v_scroll);
v_scroll->connect("value_changed",this,"_scroll_changed");
- v_scroll->set_val(0);
+ v_scroll->set_value(0);
key_editor_tab = memnew(TabContainer);
hb->add_child(key_editor_tab);
@@ -4127,7 +4201,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
add_child(type_menu);
for(int i=0;i<Variant::VARIANT_MAX;i++)
type_menu->add_item(Variant::get_type_name(Variant::Type(i)),i);
- type_menu->connect("item_pressed",this,"_create_value_item");
+ type_menu->connect("id_pressed",this,"_create_value_item");
VBoxContainer *curve_vb = memnew( VBoxContainer );
curve_vb->set_name(TTR("Transition"));
@@ -4166,7 +4240,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
track_name->connect("text_entered",this,"_track_name_changed");
track_menu = memnew( PopupMenu );
add_child(track_menu);
- track_menu->connect("item_pressed",this,"_track_menu_selected");
+ track_menu->connect("id_pressed",this,"_track_menu_selected");
key_editor_tab->hide();
@@ -4198,7 +4272,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
scale_dialog = memnew( ConfirmationDialog );
VBoxContainer *vbc = memnew( VBoxContainer );
scale_dialog->add_child(vbc);
- scale_dialog->set_child_rect(vbc);
+
scale = memnew( SpinBox );
scale->set_min(-99999);
scale->set_max(99999);
@@ -4215,7 +4289,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
add_child(cleanup_dialog);
VBoxContainer *cleanup_vb = memnew( VBoxContainer );
cleanup_dialog->add_child(cleanup_vb);
- cleanup_dialog->set_child_rect(cleanup_vb);
+
cleanup_keys = memnew( CheckButton );
cleanup_keys->set_text(TTR("Remove invalid keys"));
cleanup_keys->set_pressed(true);
@@ -4237,6 +4311,7 @@ AnimationKeyEditor::AnimationKeyEditor() {
add_constant_override("separation",get_constant("separation","VBoxContainer"));
+ track_editor->set_clip_contents(true);
}
diff --git a/tools/editor/animation_editor.h b/tools/editor/animation_editor.h
index 3078b3288b..0c9b0b5ac6 100644
--- a/tools/editor/animation_editor.h
+++ b/tools/editor/animation_editor.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -51,7 +51,7 @@ class AnimationCurveEdit;
class AnimationKeyEditor : public VBoxContainer {
- OBJ_TYPE( AnimationKeyEditor, VBoxContainer );
+ GDCLASS( AnimationKeyEditor, VBoxContainer );
/*
enum {
@@ -113,6 +113,7 @@ class AnimationKeyEditor : public VBoxContainer {
OVER_KEY,
OVER_VALUE,
OVER_INTERP,
+ OVER_WRAP,
OVER_UP,
OVER_DOWN,
OVER_REMOVE,
@@ -166,7 +167,9 @@ class AnimationKeyEditor : public VBoxContainer {
int track_name_editing;
int interp_editing;
int cont_editing;
+ int wrap_editing;
int selected_track;
+ int track_ofs[5];
int last_menu_track_opt;
LineEdit *track_name;
@@ -274,7 +277,7 @@ class AnimationKeyEditor : public VBoxContainer {
float _get_zoom_scale() const;
void _track_editor_draw();
- void _track_editor_input_event(const InputEvent& p_input);
+ void _track_editor_gui_input(const InputEvent& p_input);
void _track_pos_draw();
diff --git a/tools/editor/array_property_edit.cpp b/tools/editor/array_property_edit.cpp
index b6219ce67b..d7e980980c 100644
--- a/tools/editor/array_property_edit.cpp
+++ b/tools/editor/array_property_edit.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -258,10 +258,10 @@ Node *ArrayPropertyEdit::get_node() {
void ArrayPropertyEdit::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_set_size"),&ArrayPropertyEdit::_set_size);
- ObjectTypeDB::bind_method(_MD("_set_value"),&ArrayPropertyEdit::_set_value);
- ObjectTypeDB::bind_method(_MD("_notif_change"),&ArrayPropertyEdit::_notif_change);
- ObjectTypeDB::bind_method(_MD("_notif_changev"),&ArrayPropertyEdit::_notif_changev);
+ ClassDB::bind_method(_MD("_set_size"),&ArrayPropertyEdit::_set_size);
+ ClassDB::bind_method(_MD("_set_value"),&ArrayPropertyEdit::_set_value);
+ ClassDB::bind_method(_MD("_notif_change"),&ArrayPropertyEdit::_notif_change);
+ ClassDB::bind_method(_MD("_notif_changev"),&ArrayPropertyEdit::_notif_changev);
}
ArrayPropertyEdit::ArrayPropertyEdit()
diff --git a/tools/editor/array_property_edit.h b/tools/editor/array_property_edit.h
index a2aa24c8ed..f904f3c159 100644
--- a/tools/editor/array_property_edit.h
+++ b/tools/editor/array_property_edit.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -33,7 +33,7 @@
class ArrayPropertyEdit : public Reference {
- OBJ_TYPE(ArrayPropertyEdit,Reference);
+ GDCLASS(ArrayPropertyEdit,Reference);
int page;
ObjectID obj;
diff --git a/tools/editor/asset_library_editor_plugin.cpp b/tools/editor/asset_library_editor_plugin.cpp
index 3fd5d2b5d1..422bc0db58 100644
--- a/tools/editor/asset_library_editor_plugin.cpp
+++ b/tools/editor/asset_library_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -29,7 +29,7 @@
#include "asset_library_editor_plugin.h"
#include "editor_node.h"
#include "editor_settings.h"
-
+#include "io/json.h"
@@ -89,10 +89,10 @@ void EditorAssetLibraryItem::_author_clicked(){
void EditorAssetLibraryItem::_bind_methods() {
- ObjectTypeDB::bind_method("set_image",&EditorAssetLibraryItem::set_image);
- ObjectTypeDB::bind_method("_asset_clicked",&EditorAssetLibraryItem::_asset_clicked);
- ObjectTypeDB::bind_method("_category_clicked",&EditorAssetLibraryItem::_category_clicked);
- ObjectTypeDB::bind_method("_author_clicked",&EditorAssetLibraryItem::_author_clicked);
+ ClassDB::bind_method("set_image",&EditorAssetLibraryItem::set_image);
+ ClassDB::bind_method("_asset_clicked",&EditorAssetLibraryItem::_asset_clicked);
+ ClassDB::bind_method("_category_clicked",&EditorAssetLibraryItem::_category_clicked);
+ ClassDB::bind_method("_author_clicked",&EditorAssetLibraryItem::_author_clicked);
ADD_SIGNAL( MethodInfo("asset_selected"));
ADD_SIGNAL( MethodInfo("category_selected"));
ADD_SIGNAL( MethodInfo("author_selected"));
@@ -157,7 +157,7 @@ EditorAssetLibraryItem::EditorAssetLibraryItem() {
set_custom_minimum_size(Size2(250,100));
set_h_size_flags(SIZE_EXPAND_FILL);
- set_stop_mouse(false);
+ set_mouse_filter(MOUSE_FILTER_PASS);
}
//////////////////////////////////////////////////////////////////////////////
@@ -199,9 +199,9 @@ void EditorAssetLibraryItemDescription::set_image(int p_type,int p_index,const R
}
void EditorAssetLibraryItemDescription::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("set_image"),&EditorAssetLibraryItemDescription::set_image);
- ObjectTypeDB::bind_method(_MD("_link_click"),&EditorAssetLibraryItemDescription::_link_click);
- ObjectTypeDB::bind_method(_MD("_preview_click"),&EditorAssetLibraryItemDescription::_preview_click);
+ ClassDB::bind_method(_MD("set_image"),&EditorAssetLibraryItemDescription::set_image);
+ ClassDB::bind_method(_MD("_link_click"),&EditorAssetLibraryItemDescription::_link_click);
+ ClassDB::bind_method(_MD("_preview_click"),&EditorAssetLibraryItemDescription::_preview_click);
}
@@ -270,7 +270,7 @@ EditorAssetLibraryItemDescription::EditorAssetLibraryItemDescription() {
VBoxContainer *vbox = memnew( VBoxContainer );
add_child(vbox);
- set_child_rect(vbox);
+
HBoxContainer *hbox = memnew( HBoxContainer);
@@ -379,12 +379,12 @@ void EditorAssetLibraryItemDownload::_http_download_completed(int p_status, int
}
progress->set_max( download->get_body_size() );
- progress->set_val(download->get_downloaded_bytes());
+ progress->set_value(download->get_downloaded_bytes());
print_line("max: "+itos(download->get_body_size())+" bytes: "+itos(download->get_downloaded_bytes()));
install->set_disabled(false);
- progress->set_val(download->get_downloaded_bytes());
+ progress->set_value(download->get_downloaded_bytes());
status->set_text("Success! ("+String::humanize_size(download->get_downloaded_bytes())+")");
set_process(false);
@@ -411,7 +411,7 @@ void EditorAssetLibraryItemDownload::_notification(int p_what) {
if (p_what==NOTIFICATION_PROCESS) {
progress->set_max( download->get_body_size() );
- progress->set_val(download->get_downloaded_bytes());
+ progress->set_value(download->get_downloaded_bytes());
int cstatus = download->get_http_client_status();
@@ -472,10 +472,10 @@ void EditorAssetLibraryItemDownload::_make_request() {
void EditorAssetLibraryItemDownload::_bind_methods() {
- ObjectTypeDB::bind_method("_http_download_completed",&EditorAssetLibraryItemDownload::_http_download_completed);
- ObjectTypeDB::bind_method("_install",&EditorAssetLibraryItemDownload::_install);
- ObjectTypeDB::bind_method("_close",&EditorAssetLibraryItemDownload::_close);
- ObjectTypeDB::bind_method("_make_request",&EditorAssetLibraryItemDownload::_make_request);
+ ClassDB::bind_method("_http_download_completed",&EditorAssetLibraryItemDownload::_http_download_completed);
+ ClassDB::bind_method("_install",&EditorAssetLibraryItemDownload::_install);
+ ClassDB::bind_method("_close",&EditorAssetLibraryItemDownload::_close);
+ ClassDB::bind_method("_make_request",&EditorAssetLibraryItemDownload::_make_request);
ADD_SIGNAL(MethodInfo("install_asset",PropertyInfo(Variant::STRING,"zip_path"),PropertyInfo(Variant::STRING,"name")));
@@ -582,16 +582,16 @@ void EditorAssetLibrary::_notification(int p_what) {
switch(s) {
case HTTPClient::STATUS_RESOLVING: {
- load_status->set_val(0.1);
+ load_status->set_value(0.1);
} break;
case HTTPClient::STATUS_CONNECTING: {
- load_status->set_val(0.2);
+ load_status->set_value(0.2);
} break;
case HTTPClient::STATUS_REQUESTING: {
- load_status->set_val(0.3);
+ load_status->set_value(0.3);
} break;
case HTTPClient::STATUS_BODY: {
- load_status->set_val(0.4);
+ load_status->set_value(0.4);
} break;
default: {}
@@ -1076,8 +1076,16 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const
}
print_line("response: "+itos(p_status)+" code: "+itos(p_code));
+
Dictionary d;
- d.parse_json(str);
+ {
+ Variant js;
+ String errs;
+ int errl;
+ JSON::parse(str,js,errs,errl);
+ d=js;
+ }
+
print_line(Variant(d).get_construct_string());
@@ -1288,20 +1296,20 @@ void EditorAssetLibrary::_install_external_asset(String p_zip_path,String p_titl
void EditorAssetLibrary::_bind_methods() {
- ObjectTypeDB::bind_method("_http_request_completed",&EditorAssetLibrary::_http_request_completed);
- ObjectTypeDB::bind_method("_select_asset",&EditorAssetLibrary::_select_asset);
- ObjectTypeDB::bind_method("_select_author",&EditorAssetLibrary::_select_author);
- ObjectTypeDB::bind_method("_select_category",&EditorAssetLibrary::_select_category);
- ObjectTypeDB::bind_method("_image_request_completed",&EditorAssetLibrary::_image_request_completed);
- ObjectTypeDB::bind_method("_search",&EditorAssetLibrary::_search,DEFVAL(0));
- ObjectTypeDB::bind_method("_install_asset",&EditorAssetLibrary::_install_asset);
- ObjectTypeDB::bind_method("_manage_plugins",&EditorAssetLibrary::_manage_plugins);
- ObjectTypeDB::bind_method("_asset_open",&EditorAssetLibrary::_asset_open);
- ObjectTypeDB::bind_method("_asset_file_selected",&EditorAssetLibrary::_asset_file_selected);
- ObjectTypeDB::bind_method("_repository_changed",&EditorAssetLibrary::_repository_changed);
- ObjectTypeDB::bind_method("_support_toggled",&EditorAssetLibrary::_support_toggled);
- ObjectTypeDB::bind_method("_rerun_search",&EditorAssetLibrary::_rerun_search);
- ObjectTypeDB::bind_method("_install_external_asset",&EditorAssetLibrary::_install_external_asset);
+ ClassDB::bind_method("_http_request_completed",&EditorAssetLibrary::_http_request_completed);
+ ClassDB::bind_method("_select_asset",&EditorAssetLibrary::_select_asset);
+ ClassDB::bind_method("_select_author",&EditorAssetLibrary::_select_author);
+ ClassDB::bind_method("_select_category",&EditorAssetLibrary::_select_category);
+ ClassDB::bind_method("_image_request_completed",&EditorAssetLibrary::_image_request_completed);
+ ClassDB::bind_method("_search",&EditorAssetLibrary::_search,DEFVAL(0));
+ ClassDB::bind_method("_install_asset",&EditorAssetLibrary::_install_asset);
+ ClassDB::bind_method("_manage_plugins",&EditorAssetLibrary::_manage_plugins);
+ ClassDB::bind_method("_asset_open",&EditorAssetLibrary::_asset_open);
+ ClassDB::bind_method("_asset_file_selected",&EditorAssetLibrary::_asset_file_selected);
+ ClassDB::bind_method("_repository_changed",&EditorAssetLibrary::_repository_changed);
+ ClassDB::bind_method("_support_toggled",&EditorAssetLibrary::_support_toggled);
+ ClassDB::bind_method("_rerun_search",&EditorAssetLibrary::_rerun_search);
+ ClassDB::bind_method("_install_external_asset",&EditorAssetLibrary::_install_external_asset);
@@ -1418,7 +1426,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
support->get_popup()->add_check_item(TTR("Testing"),SUPPORT_TESTING);
support->get_popup()->set_item_checked(SUPPORT_OFFICIAL,true);
support->get_popup()->set_item_checked(SUPPORT_COMMUNITY,true);
- support->get_popup()->connect("item_pressed",this,"_support_toggled");
+ support->get_popup()->connect("id_pressed",this,"_support_toggled");
/////////
@@ -1446,7 +1454,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
library_scroll->add_child(library_vb_border);
library_vb_border->add_style_override("panel",border2);
library_vb_border->set_h_size_flags(SIZE_EXPAND_FILL);
- library_vb_border->set_stop_mouse(false);
+ library_vb_border->set_mouse_filter(MOUSE_FILTER_PASS);
diff --git a/tools/editor/asset_library_editor_plugin.h b/tools/editor/asset_library_editor_plugin.h
index fe40255af9..c7d6ad8bea 100644
--- a/tools/editor/asset_library_editor_plugin.h
+++ b/tools/editor/asset_library_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -52,7 +52,7 @@
class EditorAssetLibraryItem : public PanelContainer {
- OBJ_TYPE( EditorAssetLibraryItem, PanelContainer );
+ GDCLASS( EditorAssetLibraryItem, PanelContainer );
TextureButton *icon;
LinkButton* title;
@@ -88,7 +88,7 @@ public:
class EditorAssetLibraryItemDescription : public ConfirmationDialog {
- OBJ_TYPE(EditorAssetLibraryItemDescription, ConfirmationDialog);
+ GDCLASS(EditorAssetLibraryItemDescription, ConfirmationDialog);
EditorAssetLibraryItem *item;
RichTextLabel *description;
@@ -135,7 +135,7 @@ public:
class EditorAssetLibraryItemDownload : public PanelContainer {
- OBJ_TYPE(EditorAssetLibraryItemDownload, PanelContainer);
+ GDCLASS(EditorAssetLibraryItemDownload, PanelContainer);
TextureFrame *icon;
@@ -178,7 +178,7 @@ public:
};
class EditorAssetLibrary : public PanelContainer {
- OBJ_TYPE(EditorAssetLibrary,PanelContainer);
+ GDCLASS(EditorAssetLibrary,PanelContainer);
String host;
@@ -318,7 +318,7 @@ public:
class AssetLibraryEditorPlugin : public EditorPlugin {
- OBJ_TYPE( AssetLibraryEditorPlugin, EditorPlugin );
+ GDCLASS( AssetLibraryEditorPlugin, EditorPlugin );
EditorAssetLibrary *addon_library;
EditorNode *editor;
diff --git a/tools/editor/call_dialog.cpp b/tools/editor/call_dialog.cpp
index 0c6c64a33b..054a5098f0 100644
--- a/tools/editor/call_dialog.cpp
+++ b/tools/editor/call_dialog.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -28,6 +28,7 @@
/*************************************************************************/
#include "call_dialog.h"
+#if 0
#include "scene/gui/label.h"
#include "object_type_db.h"
#include "print_string.h"
@@ -35,7 +36,7 @@
class CallDialogParams : public Object {
- OBJ_TYPE( CallDialogParams, Object );
+ GDCLASS( CallDialogParams, Object );
public:
bool _set(const StringName& p_name, const Variant& p_value) {
@@ -170,11 +171,11 @@ void CallDialog::_update_method_list() {
List<String> inheritance_list;
- String type = object->get_type();
+ String type = object->get_class();
while(type!="") {
inheritance_list.push_back( type );
- type=ObjectTypeDB::type_inherits_from(type);
+ type=ClassDB::get_parent_class(type);
}
TreeItem *selected_item=NULL;
@@ -182,7 +183,7 @@ void CallDialog::_update_method_list() {
for(int i=0;i<inheritance_list.size();i++) {
String type=inheritance_list[i];
- String parent_type=ObjectTypeDB::type_inherits_from(type);
+ String parent_type=ClassDB::get_parent_class(type);
TreeItem *type_item=NULL;
@@ -192,7 +193,7 @@ void CallDialog::_update_method_list() {
N=E->next();
- if (parent_type!="" && ObjectTypeDB::get_method(parent_type,E->get().name)!=NULL) {
+ if (parent_type!="" && ClassDB::get_method(parent_type,E->get().name)!=NULL) {
E=N;
continue;
}
@@ -224,9 +225,9 @@ void CallDialog::_update_method_list() {
void CallDialog::_bind_methods() {
- ObjectTypeDB::bind_method("_call",&CallDialog::_call);
- ObjectTypeDB::bind_method("_cancel",&CallDialog::_cancel);
- ObjectTypeDB::bind_method("_item_selected", &CallDialog::_item_selected);
+ ClassDB::bind_method("_call",&CallDialog::_call);
+ ClassDB::bind_method("_cancel",&CallDialog::_cancel);
+ ClassDB::bind_method("_item_selected", &CallDialog::_item_selected);
}
@@ -239,7 +240,7 @@ void CallDialog::set_object(Object *p_object,StringName p_selected) {
return_value->clear();
_update_method_list();
- method_label->set_text(vformat(TTR("Method List For '%s':"),p_object->get_type()));
+ method_label->set_text(vformat(TTR("Method List For '%s':"),p_object->get_class()));
}
CallDialog::CallDialog() {
@@ -268,7 +269,6 @@ CallDialog::CallDialog() {
tree = memnew( Tree );
- tree->set_anchor( MARGIN_RIGHT, ANCHOR_RATIO );
tree->set_anchor( MARGIN_BOTTOM, ANCHOR_END );
tree->set_begin( Point2( 20,50 ) );
tree->set_margin(MARGIN_BOTTOM, 44 );
@@ -283,7 +283,7 @@ CallDialog::CallDialog() {
property_editor->set_anchor_and_margin( MARGIN_RIGHT, ANCHOR_END, 15 );
property_editor->set_anchor_and_margin( MARGIN_TOP, ANCHOR_BEGIN, 50 );
- property_editor->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.55 );
+// property_editor->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.55 );
property_editor->set_anchor_and_margin( MARGIN_BOTTOM, ANCHOR_END, 90 );
property_editor->get_scene_tree()->set_hide_root( true );
property_editor->hide_top_label();
@@ -296,21 +296,21 @@ CallDialog::CallDialog() {
add_child(method_label);
Label *label = memnew( Label );
- label->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.53 );
+ //label->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.53 );
label->set_anchor_and_margin( MARGIN_TOP, ANCHOR_BEGIN, 25 );
label->set_text(TTR("Arguments:"));
add_child(label);
return_label = memnew( Label );
- return_label->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.53 );
+ //return_label->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.53 );
return_label->set_anchor_and_margin( MARGIN_TOP, ANCHOR_END, 85 );
return_label->set_text(TTR("Return:"));
add_child(return_label);
return_value = memnew( LineEdit );
- return_value->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.55 );
+ //return_value->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.55 );
return_value->set_anchor_and_margin( MARGIN_RIGHT, ANCHOR_END, 15 );
return_value->set_anchor_and_margin( MARGIN_TOP, ANCHOR_END, 65 );
@@ -338,3 +338,4 @@ CallDialog::~CallDialog()
{
memdelete(call_params);
}
+#endif
diff --git a/tools/editor/call_dialog.h b/tools/editor/call_dialog.h
index a2ca925ff1..b0ebe68d86 100644
--- a/tools/editor/call_dialog.h
+++ b/tools/editor/call_dialog.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -39,12 +39,13 @@
@author Juan Linietsky <reduzio@gmail.com>
*/
+#if 0
class CallDialogParams;
class CallDialog : public Popup {
- OBJ_TYPE( CallDialog, Popup );
+ GDCLASS( CallDialog, Popup );
Label* method_label;
@@ -81,3 +82,4 @@ public:
};
#endif
+#endif
diff --git a/tools/editor/code_editor.cpp b/tools/editor/code_editor.cpp
index 626f86d33d..0d7dc558ac 100644
--- a/tools/editor/code_editor.cpp
+++ b/tools/editor/code_editor.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -459,19 +459,19 @@ void FindReplaceBar::set_text_edit(TextEdit *p_text_edit) {
void FindReplaceBar::_bind_methods() {
- ObjectTypeDB::bind_method("_unhandled_input",&FindReplaceBar::_unhandled_input);
+ ClassDB::bind_method("_unhandled_input",&FindReplaceBar::_unhandled_input);
- ObjectTypeDB::bind_method("_editor_text_changed",&FindReplaceBar::_editor_text_changed);
- ObjectTypeDB::bind_method("_search_text_changed",&FindReplaceBar::_search_text_changed);
- ObjectTypeDB::bind_method("_search_text_entered",&FindReplaceBar::_search_text_entered);
- ObjectTypeDB::bind_method("_replace_text_entered",&FindReplaceBar::_replace_text_entered);
- ObjectTypeDB::bind_method("_search_current",&FindReplaceBar::search_current);
- ObjectTypeDB::bind_method("_search_next",&FindReplaceBar::search_next);
- ObjectTypeDB::bind_method("_search_prev",&FindReplaceBar::search_prev);
- ObjectTypeDB::bind_method("_replace_pressed",&FindReplaceBar::_replace);
- ObjectTypeDB::bind_method("_replace_all_pressed",&FindReplaceBar::_replace_all);
- ObjectTypeDB::bind_method("_search_options_changed",&FindReplaceBar::_search_options_changed);
- ObjectTypeDB::bind_method("_hide_pressed",&FindReplaceBar::_hide_bar);
+ ClassDB::bind_method("_editor_text_changed",&FindReplaceBar::_editor_text_changed);
+ ClassDB::bind_method("_search_text_changed",&FindReplaceBar::_search_text_changed);
+ ClassDB::bind_method("_search_text_entered",&FindReplaceBar::_search_text_entered);
+ ClassDB::bind_method("_replace_text_entered",&FindReplaceBar::_replace_text_entered);
+ ClassDB::bind_method("_search_current",&FindReplaceBar::search_current);
+ ClassDB::bind_method("_search_next",&FindReplaceBar::search_next);
+ ClassDB::bind_method("_search_prev",&FindReplaceBar::search_prev);
+ ClassDB::bind_method("_replace_pressed",&FindReplaceBar::_replace);
+ ClassDB::bind_method("_replace_all_pressed",&FindReplaceBar::_replace_all);
+ ClassDB::bind_method("_search_options_changed",&FindReplaceBar::_search_options_changed);
+ ClassDB::bind_method("_hide_pressed",&FindReplaceBar::_hide_bar);
ADD_SIGNAL(MethodInfo("search"));
}
@@ -884,10 +884,10 @@ void FindReplaceDialog::search_next() {
void FindReplaceDialog::_bind_methods() {
- ObjectTypeDB::bind_method("_search_text_entered",&FindReplaceDialog::_search_text_entered);
- ObjectTypeDB::bind_method("_replace_text_entered",&FindReplaceDialog::_replace_text_entered);
- ObjectTypeDB::bind_method("_prompt_changed",&FindReplaceDialog::_prompt_changed);
- ObjectTypeDB::bind_method("_skip_pressed",&FindReplaceDialog::_skip_pressed);
+ ClassDB::bind_method("_search_text_entered",&FindReplaceDialog::_search_text_entered);
+ ClassDB::bind_method("_replace_text_entered",&FindReplaceDialog::_replace_text_entered);
+ ClassDB::bind_method("_prompt_changed",&FindReplaceDialog::_prompt_changed);
+ ClassDB::bind_method("_skip_pressed",&FindReplaceDialog::_skip_pressed);
ADD_SIGNAL(MethodInfo("search"));
ADD_SIGNAL(MethodInfo("skip"));
@@ -895,11 +895,11 @@ 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);
- set_child_rect(vb);
+
search_text = memnew( LineEdit );
@@ -995,7 +995,7 @@ FindReplaceDialog::FindReplaceDialog() {
/*** CODE EDITOR ****/
-void CodeTextEditor::_text_editor_input_event(const InputEvent& p_event) {
+void CodeTextEditor::_text_editor_gui_input(const InputEvent& p_event) {
if (p_event.type==InputEvent::MOUSE_BUTTON) {
@@ -1043,7 +1043,7 @@ void CodeTextEditor::_reset_zoom() {
Ref<DynamicFont> font = text_editor->get_font("font"); // reset source font size to default
if (font.is_valid()) {
- EditorSettings::get_singleton()->set("global/source_font_size",14);
+ EditorSettings::get_singleton()->set("interface/source_font_size",14);
font->set_size(14);
}
}
@@ -1097,7 +1097,7 @@ void CodeTextEditor::_font_resize_timeout() {
int size=font->get_size()+font_resize_val;
if (size>=8 && size<=96) {
- EditorSettings::get_singleton()->set("global/source_font_size",size);
+ EditorSettings::get_singleton()->set("interface/source_font_size",size);
font->set_size(size);
}
@@ -1107,20 +1107,20 @@ void CodeTextEditor::_font_resize_timeout() {
void CodeTextEditor::update_editor_settings() {
- text_editor->set_auto_brace_completion(EditorSettings::get_singleton()->get("text_editor/auto_brace_complete"));
- text_editor->set_scroll_pass_end_of_file(EditorSettings::get_singleton()->get("text_editor/scroll_past_end_of_file"));
- text_editor->set_tab_size(EditorSettings::get_singleton()->get("text_editor/tab_size"));
- text_editor->set_draw_tabs(EditorSettings::get_singleton()->get("text_editor/draw_tabs"));
- text_editor->set_show_line_numbers(EditorSettings::get_singleton()->get("text_editor/show_line_numbers"));
- text_editor->set_line_numbers_zero_padded(EditorSettings::get_singleton()->get("text_editor/line_numbers_zero_padded"));
- text_editor->set_show_line_length_guideline(EditorSettings::get_singleton()->get("text_editor/show_line_length_guideline"));
- text_editor->set_line_length_guideline_column(EditorSettings::get_singleton()->get("text_editor/line_length_guideline_column"));
- text_editor->set_syntax_coloring(EditorSettings::get_singleton()->get("text_editor/syntax_highlighting"));
- text_editor->set_highlight_all_occurrences(EditorSettings::get_singleton()->get("text_editor/highlight_all_occurrences"));
- text_editor->cursor_set_blink_enabled(EditorSettings::get_singleton()->get("text_editor/caret_blink"));
- text_editor->cursor_set_blink_speed(EditorSettings::get_singleton()->get("text_editor/caret_blink_speed"));
- text_editor->set_draw_breakpoint_gutter(EditorSettings::get_singleton()->get("text_editor/show_breakpoint_gutter"));
- text_editor->cursor_set_block_mode(EditorSettings::get_singleton()->get("text_editor/block_caret"));
+ text_editor->set_auto_brace_completion(EditorSettings::get_singleton()->get("text_editor/completion/auto_brace_complete"));
+ text_editor->set_scroll_pass_end_of_file(EditorSettings::get_singleton()->get("text_editor/cursor/scroll_past_end_of_file"));
+ text_editor->set_tab_size(EditorSettings::get_singleton()->get("text_editor/indent/tab_size"));
+ text_editor->set_draw_tabs(EditorSettings::get_singleton()->get("text_editor/indent/draw_tabs"));
+ text_editor->set_show_line_numbers(EditorSettings::get_singleton()->get("text_editor/line_numbers/show_line_numbers"));
+ text_editor->set_line_numbers_zero_padded(EditorSettings::get_singleton()->get("text_editor/line_numbers/line_numbers_zero_padded"));
+ text_editor->set_show_line_length_guideline(EditorSettings::get_singleton()->get("text_editor/line_numbers/show_line_length_guideline"));
+ text_editor->set_line_length_guideline_column(EditorSettings::get_singleton()->get("text_editor/line_numbers/line_length_guideline_column"));
+ text_editor->set_syntax_coloring(EditorSettings::get_singleton()->get("text_editor/highlighting/syntax_highlighting"));
+ text_editor->set_highlight_all_occurrences(EditorSettings::get_singleton()->get("text_editor/highlighting/highlight_all_occurrences"));
+ text_editor->cursor_set_blink_enabled(EditorSettings::get_singleton()->get("text_editor/cursor/caret_blink"));
+ text_editor->cursor_set_blink_speed(EditorSettings::get_singleton()->get("text_editor/cursor/caret_blink_speed"));
+ text_editor->set_draw_breakpoint_gutter(EditorSettings::get_singleton()->get("text_editor/line_numbers/show_breakpoint_gutter"));
+ text_editor->cursor_set_block_mode(EditorSettings::get_singleton()->get("text_editor/cursor/block_caret"));
}
void CodeTextEditor::set_error(const String& p_error) {
@@ -1137,7 +1137,7 @@ void CodeTextEditor::set_error(const String& p_error) {
void CodeTextEditor::_update_font() {
// FONTS
- String editor_font = EDITOR_DEF("text_editor/font", "");
+ String editor_font = EDITOR_DEF("text_editor/theme/font", "");
bool font_overridden = false;
if (editor_font!="") {
Ref<Font> fnt = ResourceLoader::load(editor_font);
@@ -1158,19 +1158,19 @@ void CodeTextEditor::_on_settings_change() {
// AUTO BRACE COMPLETION
text_editor->set_auto_brace_completion(
- EDITOR_DEF("text_editor/auto_brace_complete", true)
+ EDITOR_DEF("text_editor/completion/auto_brace_complete", true)
);
code_complete_timer->set_wait_time(
- EDITOR_DEF("text_editor/code_complete_delay",.3f)
+ EDITOR_DEF("text_editor/completion/code_complete_delay",.3f)
);
- enable_complete_timer = EDITOR_DEF("text_editor/enable_code_completion_delay",true);
+ enable_complete_timer = EDITOR_DEF("text_editor/completion/enable_code_completion_delay",true);
// call hint settings
text_editor->set_callhint_settings(
- EDITOR_DEF("text_editor/put_callhint_tooltip_below_current_line", true),
- EDITOR_DEF("text_editor/callhint_tooltip_offset", Vector2())
+ EDITOR_DEF("text_editor/completion/put_callhint_tooltip_below_current_line", true),
+ EDITOR_DEF("text_editor/completion/callhint_tooltip_offset", Vector2())
);
}
@@ -1195,14 +1195,14 @@ void CodeTextEditor::_notification(int p_what) {
void CodeTextEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_text_editor_input_event",&CodeTextEditor::_text_editor_input_event);
- ObjectTypeDB::bind_method("_line_col_changed",&CodeTextEditor::_line_col_changed);
- ObjectTypeDB::bind_method("_text_changed",&CodeTextEditor::_text_changed);
- ObjectTypeDB::bind_method("_on_settings_change",&CodeTextEditor::_on_settings_change);
- ObjectTypeDB::bind_method("_text_changed_idle_timeout",&CodeTextEditor::_text_changed_idle_timeout);
- ObjectTypeDB::bind_method("_code_complete_timer_timeout",&CodeTextEditor::_code_complete_timer_timeout);
- ObjectTypeDB::bind_method("_complete_request",&CodeTextEditor::_complete_request);
- ObjectTypeDB::bind_method("_font_resize_timeout",&CodeTextEditor::_font_resize_timeout);
+ ClassDB::bind_method("_text_editor_gui_input",&CodeTextEditor::_text_editor_gui_input);
+ ClassDB::bind_method("_line_col_changed",&CodeTextEditor::_line_col_changed);
+ ClassDB::bind_method("_text_changed",&CodeTextEditor::_text_changed);
+ ClassDB::bind_method("_on_settings_change",&CodeTextEditor::_on_settings_change);
+ ClassDB::bind_method("_text_changed_idle_timeout",&CodeTextEditor::_text_changed_idle_timeout);
+ ClassDB::bind_method("_code_complete_timer_timeout",&CodeTextEditor::_code_complete_timer_timeout);
+ ClassDB::bind_method("_complete_request",&CodeTextEditor::_complete_request);
+ ClassDB::bind_method("_font_resize_timeout",&CodeTextEditor::_font_resize_timeout);
ADD_SIGNAL(MethodInfo("validate_script"));
ADD_SIGNAL(MethodInfo("load_theme_settings"));
@@ -1252,14 +1252,14 @@ CodeTextEditor::CodeTextEditor() {
idle = memnew( Timer );
add_child(idle);
idle->set_one_shot(true);
- idle->set_wait_time(EDITOR_DEF("text_editor/idle_parse_delay",2));
+ idle->set_wait_time(EDITOR_DEF("text_editor/completion/idle_parse_delay",2));
code_complete_timer = memnew(Timer);
add_child(code_complete_timer);
code_complete_timer->set_one_shot(true);
- enable_complete_timer = EDITOR_DEF("text_editor/enable_code_completion_delay",true);
+ enable_complete_timer = EDITOR_DEF("text_editor/completion/enable_code_completion_delay",true);
- code_complete_timer->set_wait_time(EDITOR_DEF("text_editor/code_complete_delay",.3f));
+ code_complete_timer->set_wait_time(EDITOR_DEF("text_editor/completion/code_complete_delay",.3f));
error = memnew( Label );
status_bar->add_child(error);
@@ -1297,7 +1297,7 @@ CodeTextEditor::CodeTextEditor() {
col_nb->set_autowrap(true); // workaround to prevent resizing the label on each change
col_nb->set_custom_minimum_size(Size2(40,1)*EDSCALE);
- text_editor->connect("input_event", this,"_text_editor_input_event");
+ text_editor->connect("gui_input", this,"_text_editor_gui_input");
text_editor->connect("cursor_changed", this,"_line_col_changed");
text_editor->connect("text_changed", this,"_text_changed");
text_editor->connect("request_completion", this,"_complete_request");
@@ -1305,6 +1305,7 @@ CodeTextEditor::CodeTextEditor() {
cs.push_back(".");
cs.push_back(",");
cs.push_back("(");
+ cs.push_back("$");
text_editor->set_completion(true,cs);
idle->connect("timeout", this,"_text_changed_idle_timeout");
diff --git a/tools/editor/code_editor.h b/tools/editor/code_editor.h
index ce3b5bee26..a000f02010 100644
--- a/tools/editor/code_editor.h
+++ b/tools/editor/code_editor.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -42,7 +42,7 @@
class GotoLineDialog : public ConfirmationDialog {
- OBJ_TYPE(GotoLineDialog,ConfirmationDialog);
+ GDCLASS(GotoLineDialog,ConfirmationDialog);
Label *line_label;
LineEdit *line;
@@ -62,7 +62,7 @@ public:
class FindReplaceBar : public HBoxContainer {
- OBJ_TYPE(FindReplaceBar,HBoxContainer);
+ GDCLASS(FindReplaceBar,HBoxContainer);
LineEdit *search_text;
ToolButton *find_prev;
@@ -134,7 +134,7 @@ public:
class FindReplaceDialog : public ConfirmationDialog {
- OBJ_TYPE(FindReplaceDialog,ConfirmationDialog);
+ GDCLASS(FindReplaceDialog,ConfirmationDialog);
LineEdit *search_text;
LineEdit *replace_text;
@@ -194,7 +194,7 @@ typedef void (*CodeTextEditorCodeCompleteFunc)(void* p_ud,const String& p_code,
class CodeTextEditor : public VBoxContainer {
- OBJ_TYPE(CodeTextEditor,VBoxContainer);
+ GDCLASS(CodeTextEditor,VBoxContainer);
TextEdit *text_editor;
FindReplaceBar *find_replace_bar;
@@ -217,7 +217,7 @@ class CodeTextEditor : public VBoxContainer {
void _complete_request();
void _font_resize_timeout();
- void _text_editor_input_event(const InputEvent& p_event);
+ void _text_editor_gui_input(const InputEvent& p_event);
void _zoom_in();
void _zoom_out();
void _reset_zoom();
diff --git a/tools/editor/connections_dialog.cpp b/tools/editor/connections_dialog.cpp
index 1baad2c6b3..33612293d0 100644
--- a/tools/editor/connections_dialog.cpp
+++ b/tools/editor/connections_dialog.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -39,7 +39,7 @@
class ConnectDialogBinds : public Object {
- OBJ_TYPE( ConnectDialogBinds, Object );
+ GDCLASS( ConnectDialogBinds, Object );
public:
Vector<Variant> params;
@@ -127,7 +127,7 @@ void ConnectDialog::_tree_node_selected() {
if (E->get().name.length() && E->get().name[0]=='_')
continue; // hidden method, not show!
- if (ObjectTypeDB::has_method(node->get_type(),"Node") || ObjectTypeDB::has_method(node->get_type(),"Control",true))
+ if (ClassDB::has_method(node->get_type(),"Node") || ClassDB::has_method(node->get_type(),"Control",true))
continue; //avoid too much unnecesary stuff
String method=E->get().name+"(";
@@ -290,13 +290,13 @@ void ConnectDialog::set_dst_method(const StringName& p_method) {
void ConnectDialog::_bind_methods() {
- //ObjectTypeDB::bind_method("_ok",&ConnectDialog::_ok_pressed);
- ObjectTypeDB::bind_method("_cancel",&ConnectDialog::_cancel_pressed);
- //ObjectTypeDB::bind_method("_dst_method_list_selected",&ConnectDialog::_dst_method_list_selected);
- ObjectTypeDB::bind_method("_tree_node_selected",&ConnectDialog::_tree_node_selected);
+ //ClassDB::bind_method("_ok",&ConnectDialog::_ok_pressed);
+ ClassDB::bind_method("_cancel",&ConnectDialog::_cancel_pressed);
+ //ClassDB::bind_method("_dst_method_list_selected",&ConnectDialog::_dst_method_list_selected);
+ ClassDB::bind_method("_tree_node_selected",&ConnectDialog::_tree_node_selected);
- ObjectTypeDB::bind_method("_add_bind",&ConnectDialog::_add_bind);
- ObjectTypeDB::bind_method("_remove_bind",&ConnectDialog::_remove_bind);
+ ClassDB::bind_method("_add_bind",&ConnectDialog::_add_bind);
+ ClassDB::bind_method("_remove_bind",&ConnectDialog::_remove_bind);
ADD_SIGNAL( MethodInfo("connected") );
}
@@ -305,7 +305,7 @@ ConnectDialog::ConnectDialog() {
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
- set_child_rect(vbc);
+
HBoxContainer *main_hb = memnew( HBoxContainer );
vbc->add_child(main_hb);
@@ -395,7 +395,7 @@ ConnectDialog::ConnectDialog() {
make_callback = memnew( CheckButton );
make_callback->set_toggle_mode(true);
- make_callback->set_pressed( EDITOR_DEF("text_editor/create_signal_callbacks",true));
+ make_callback->set_pressed( EDITOR_DEF("text_editor/tools/create_signal_callbacks",true));
make_callback->set_text(TTR("Make Function"));
dstm_hb->add_child(make_callback);
@@ -421,7 +421,7 @@ ConnectDialog::ConnectDialog() {
-// dst_method_list->get_popup()->connect("item_pressed", this,"_dst_method_list_selected");
+// dst_method_list->get_popup()->connect("id_pressed", this,"_dst_method_list_selected");
tree->connect("node_selected", this,"_tree_node_selected");
set_as_toplevel(true);
@@ -616,7 +616,7 @@ void ConnectionsDock::update_tree() {
//node_signals.sort_custom<_ConnectionsDockMethodInfoSort>();
bool did_script=false;
- StringName base = node->get_type();
+ StringName base = node->get_class();
while(base) {
@@ -632,16 +632,16 @@ void ConnectionsDock::update_tree() {
if (scr->get_path().is_resource_file())
name=scr->get_path().get_file();
else
- name=scr->get_type();
+ name=scr->get_class();
- if (has_icon(scr->get_type(),"EditorIcons")) {
- icon=get_icon(scr->get_type(),"EditorIcons");
+ if (has_icon(scr->get_class(),"EditorIcons")) {
+ icon=get_icon(scr->get_class(),"EditorIcons");
}
}
} else {
- ObjectTypeDB::get_signal_list(base,&node_signals,true);
+ ClassDB::get_signal_list(base,&node_signals,true);
if (has_icon(base,"EditorIcons")) {
icon=get_icon(base,"EditorIcons");
}
@@ -740,7 +740,7 @@ void ConnectionsDock::update_tree() {
if (!did_script) {
did_script=true;
} else {
- base=ObjectTypeDB::type_inherits_from(base);
+ base=ClassDB::get_parent_class(base);
}
}
@@ -825,12 +825,12 @@ void ConnectionsDock::_something_activated() {
void ConnectionsDock::_bind_methods() {
- ObjectTypeDB::bind_method("_connect",&ConnectionsDock::_connect);
- ObjectTypeDB::bind_method("_something_selected",&ConnectionsDock::_something_selected);
- ObjectTypeDB::bind_method("_something_activated",&ConnectionsDock::_something_activated);
- ObjectTypeDB::bind_method("_close",&ConnectionsDock::_close);
- ObjectTypeDB::bind_method("_connect_pressed",&ConnectionsDock::_connect_pressed);
- ObjectTypeDB::bind_method("update_tree",&ConnectionsDock::update_tree);
+ ClassDB::bind_method("_connect",&ConnectionsDock::_connect);
+ ClassDB::bind_method("_something_selected",&ConnectionsDock::_something_selected);
+ ClassDB::bind_method("_something_activated",&ConnectionsDock::_something_activated);
+ ClassDB::bind_method("_close",&ConnectionsDock::_close);
+ ClassDB::bind_method("_connect_pressed",&ConnectionsDock::_connect_pressed);
+ ClassDB::bind_method("update_tree",&ConnectionsDock::update_tree);
}
diff --git a/tools/editor/connections_dialog.h b/tools/editor/connections_dialog.h
index 73f52abc9e..bfc75266e9 100644
--- a/tools/editor/connections_dialog.h
+++ b/tools/editor/connections_dialog.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -48,7 +48,7 @@ class ConnectDialogBinds;
class ConnectDialog : public ConfirmationDialog {
- OBJ_TYPE( ConnectDialog, ConfirmationDialog );
+ GDCLASS( ConnectDialog, ConfirmationDialog );
ConfirmationDialog *error;
@@ -97,7 +97,7 @@ public:
class ConnectionsDock : public VBoxContainer {
- OBJ_TYPE( ConnectionsDock , VBoxContainer );
+ GDCLASS( ConnectionsDock , VBoxContainer );
Button *connect_button;
EditorNode *editor;
diff --git a/tools/editor/create_dialog.cpp b/tools/editor/create_dialog.cpp
index 320939cb97..3e057ecf90 100644
--- a/tools/editor/create_dialog.cpp
+++ b/tools/editor/create_dialog.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -141,7 +141,7 @@ void CreateDialog::_sbox_input(const InputEvent& p_ie) {
p_ie.key.scancode == KEY_PAGEUP ||
p_ie.key.scancode == KEY_PAGEDOWN ) ) {
- search_options->call("_input_event",p_ie);
+ search_options->call("_gui_input",p_ie);
search_box->accept_event();
}
@@ -151,10 +151,10 @@ void CreateDialog::add_type(const String& p_type,HashMap<String,TreeItem*>& p_ty
if (p_types.has(p_type))
return;
- if (!ObjectTypeDB::is_type(p_type,base_type) || p_type==base_type)
+ if (!ClassDB::is_parent_class(p_type,base_type) || p_type==base_type)
return;
- String inherits=ObjectTypeDB::type_inherits_from(p_type);
+ String inherits=ClassDB::get_parent_class(p_type);
TreeItem *parent=p_root;
@@ -172,7 +172,7 @@ void CreateDialog::add_type(const String& p_type,HashMap<String,TreeItem*>& p_ty
TreeItem *item = search_options->create_item(parent);
item->set_text(0,p_type);
- if (!ObjectTypeDB::can_instance(p_type)) {
+ if (!ClassDB::can_instance(p_type)) {
item->set_custom_color(0, Color(0.5,0.5,0.5) );
item->set_selectable(0,false);
} else {
@@ -183,7 +183,7 @@ void CreateDialog::add_type(const String& p_type,HashMap<String,TreeItem*>& p_ty
}
- if (bool(EditorSettings::get_singleton()->get("scenetree_editor/start_create_dialog_fully_expanded"))) {
+ if (bool(EditorSettings::get_singleton()->get("docks/scene_tree/start_create_dialog_fully_expanded"))) {
item->set_collapsed(false);
} else {
// don't collapse search results
@@ -191,7 +191,7 @@ void CreateDialog::add_type(const String& p_type,HashMap<String,TreeItem*>& p_ty
// don't collapse the root node
collapse &= (item != p_root);
// don't collapse abstract nodes on the first tree level
- collapse &= ((parent != p_root) || (ObjectTypeDB::can_instance(p_type)));
+ collapse &= ((parent != p_root) || (ClassDB::can_instance(p_type)));
item->set_collapsed(collapse);
}
@@ -222,7 +222,7 @@ void CreateDialog::_update_search() {
*/
List<StringName> type_list;
- ObjectTypeDB::get_type_list(&type_list);
+ ClassDB::get_class_list(&type_list);
HashMap<String,TreeItem*> types;
@@ -245,7 +245,7 @@ void CreateDialog::_update_search() {
if (base_type=="Node" && type.begins_with("Editor"))
continue; // do not show editor nodes
- if (!ObjectTypeDB::can_instance(type))
+ if (!ClassDB::can_instance(type))
continue; // cant create what can't be instanced
if (search_box->get_text()=="") {
@@ -254,14 +254,14 @@ void CreateDialog::_update_search() {
bool found=false;
String type=I->get();
- while(type!="" && ObjectTypeDB::is_type(type,base_type) && type!=base_type) {
+ while(type!="" && ClassDB::is_parent_class(type,base_type) && type!=base_type) {
if (search_box->get_text().is_subsequence_ofi(type)) {
found=true;
break;
}
- type=ObjectTypeDB::type_inherits_from(type);
+ type=ClassDB::get_parent_class(type);
}
@@ -269,7 +269,7 @@ void CreateDialog::_update_search() {
add_type(I->get(),types,root,&to_select);
}
- if (EditorNode::get_editor_data().get_custom_types().has(type) && ObjectTypeDB::is_type(type, base_type)) {
+ if (EditorNode::get_editor_data().get_custom_types().has(type) && ClassDB::is_parent_class(type, base_type)) {
//there are custom types based on this... cool.
//print_line("there are custom types");
@@ -400,8 +400,11 @@ Object *CreateDialog::instance_selected() {
if (selected) {
- String custom = selected->get_metadata(0);
+ Variant md = selected->get_metadata(0);
+ String custom;
+ if (md.get_type()!=Variant::NIL)
+ custom=md;
if (custom!=String()) {
if (EditorNode::get_editor_data().get_custom_types().has(custom)) {
@@ -412,9 +415,9 @@ Object *CreateDialog::instance_selected() {
Ref<Script> script = EditorNode::get_editor_data().get_custom_types()[custom][i].script;
String name = selected->get_text(0);
- Object *ob = ObjectTypeDB::instance(custom);
+ Object *ob = ClassDB::instance(custom);
ERR_FAIL_COND_V(!ob,NULL);
- if (ob->is_type("Node")) {
+ if (ob->is_class("Node")) {
ob->call("set_name",name);
}
ob->set_script(script.get_ref_ptr());
@@ -427,7 +430,7 @@ Object *CreateDialog::instance_selected() {
}
} else {
- return ObjectTypeDB::instance(selected->get_text(0));
+ return ClassDB::instance(selected->get_text(0));
}
}
@@ -621,20 +624,20 @@ void CreateDialog::drop_data_fw(const Point2& p_point,const Variant& p_data,Cont
void CreateDialog::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_text_changed"),&CreateDialog::_text_changed);
- ObjectTypeDB::bind_method(_MD("_confirmed"),&CreateDialog::_confirmed);
- ObjectTypeDB::bind_method(_MD("_sbox_input"),&CreateDialog::_sbox_input);
- ObjectTypeDB::bind_method(_MD("_item_selected"),&CreateDialog::_item_selected);
- ObjectTypeDB::bind_method(_MD("_favorite_toggled"),&CreateDialog::_favorite_toggled);
- ObjectTypeDB::bind_method(_MD("_history_selected"),&CreateDialog::_history_selected);
- ObjectTypeDB::bind_method(_MD("_favorite_selected"),&CreateDialog::_favorite_selected);
- ObjectTypeDB::bind_method(_MD("_history_activated"),&CreateDialog::_history_activated);
- ObjectTypeDB::bind_method(_MD("_favorite_activated"),&CreateDialog::_favorite_activated);
+ ClassDB::bind_method(_MD("_text_changed"),&CreateDialog::_text_changed);
+ ClassDB::bind_method(_MD("_confirmed"),&CreateDialog::_confirmed);
+ ClassDB::bind_method(_MD("_sbox_input"),&CreateDialog::_sbox_input);
+ ClassDB::bind_method(_MD("_item_selected"),&CreateDialog::_item_selected);
+ ClassDB::bind_method(_MD("_favorite_toggled"),&CreateDialog::_favorite_toggled);
+ ClassDB::bind_method(_MD("_history_selected"),&CreateDialog::_history_selected);
+ ClassDB::bind_method(_MD("_favorite_selected"),&CreateDialog::_favorite_selected);
+ ClassDB::bind_method(_MD("_history_activated"),&CreateDialog::_history_activated);
+ ClassDB::bind_method(_MD("_favorite_activated"),&CreateDialog::_favorite_activated);
- ObjectTypeDB::bind_method("get_drag_data_fw",&CreateDialog::get_drag_data_fw);
- ObjectTypeDB::bind_method("can_drop_data_fw",&CreateDialog::can_drop_data_fw);
- ObjectTypeDB::bind_method("drop_data_fw",&CreateDialog::drop_data_fw);
+ ClassDB::bind_method("get_drag_data_fw",&CreateDialog::get_drag_data_fw);
+ ClassDB::bind_method("can_drop_data_fw",&CreateDialog::can_drop_data_fw);
+ ClassDB::bind_method("drop_data_fw",&CreateDialog::drop_data_fw);
ADD_SIGNAL(MethodInfo("create"));
@@ -646,7 +649,7 @@ CreateDialog::CreateDialog() {
HSplitContainer *hbc = memnew( HSplitContainer );
add_child(hbc);
- set_child_rect(hbc);
+
VBoxContainer *lvbc = memnew( VBoxContainer);
hbc->add_child(lvbc);
@@ -682,7 +685,7 @@ CreateDialog::CreateDialog() {
favorite->connect("pressed",this,"_favorite_toggled");
vbc->add_margin_child(TTR("Search:"),search_hb);
search_box->connect("text_changed",this,"_text_changed");
- search_box->connect("input_event",this,"_sbox_input");
+ search_box->connect("gui_input",this,"_sbox_input");
search_options = memnew( Tree );
vbc->add_margin_child(TTR("Matches:"),search_options,true);
get_ok()->set_text(TTR("Create"));
@@ -740,10 +743,10 @@ void CreateDialog::add_type(const String& p_type,HashMap<String,TreeItem*>& p_ty
if (p_types.has(p_type))
return;
- if (!ObjectTypeDB::is_type(p_type,base) || p_type==base)
+ if (!ClassDB::is_type(p_type,base) || p_type==base)
return;
- String inherits=ObjectTypeDB::type_inherits_from(p_type);
+ String inherits=ClassDB::type_inherits_from(p_type);
TreeItem *parent=p_root;
@@ -761,7 +764,7 @@ void CreateDialog::add_type(const String& p_type,HashMap<String,TreeItem*>& p_ty
TreeItem *item = tree->create_item(parent);
item->set_text(0,p_type);
- if (!ObjectTypeDB::can_instance(p_type)) {
+ if (!ClassDB::can_instance(p_type)) {
item->set_custom_color(0, Color(0.5,0.5,0.5) );
item->set_selectable(0,false);
}
@@ -782,7 +785,7 @@ void CreateDialog::update_tree() {
tree->clear();
List<String> type_list;
- ObjectTypeDB::get_type_list(&type_list);
+ ClassDB::get_type_list(&type_list);
HashMap<String,TreeItem*> types;
@@ -798,7 +801,7 @@ void CreateDialog::update_tree() {
String type=I->get();
- if (!ObjectTypeDB::can_instance(type))
+ if (!ClassDB::can_instance(type))
continue; // cant create what can't be instanced
if (filter->get_text()=="")
add_type(type,types,root);
@@ -806,14 +809,14 @@ void CreateDialog::update_tree() {
bool found=false;
String type=I->get();
- while(type!="" && ObjectTypeDB::is_type(type,base) && type!=base) {
+ while(type!="" && ClassDB::is_type(type,base) && type!=base) {
if (type.findn(filter->get_text())!=-1) {
found=true;
break;
}
- type=ObjectTypeDB::type_inherits_from(type);
+ type=ClassDB::type_inherits_from(type);
}
@@ -875,7 +878,7 @@ Object *CreateDialog::instance_selected() {
if (ct[i].name==name) {
- Object* obj = ObjectTypeDB::instance(base);
+ Object* obj = ClassDB::instance(base);
ERR_FAIL_COND_V(!obj,NULL);
obj->set_script(ct[i].script.get_ref_ptr());
if (ct[i].icon.is_valid())
@@ -891,16 +894,16 @@ Object *CreateDialog::instance_selected() {
}
- return ObjectTypeDB::instance(tree->get_selected()->get_text(0));
+ return ClassDB::instance(tree->get_selected()->get_text(0));
}
void CreateDialog::_bind_methods() {
- ObjectTypeDB::bind_method("_create",&CreateDialog::_create);
- ObjectTypeDB::bind_method("_cancel",&CreateDialog::_cancel);
- ObjectTypeDB::bind_method("_text_changed", &CreateDialog::_text_changed);
+ ClassDB::bind_method("_create",&CreateDialog::_create);
+ ClassDB::bind_method("_cancel",&CreateDialog::_cancel);
+ ClassDB::bind_method("_text_changed", &CreateDialog::_text_changed);
ADD_SIGNAL( MethodInfo("create"));
}
@@ -929,7 +932,7 @@ CreateDialog::CreateDialog() {
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
- set_child_rect(vbc);
+
get_ok()->set_text("Create");
diff --git a/tools/editor/create_dialog.h b/tools/editor/create_dialog.h
index 706a06ae16..5ecb4db2c3 100644
--- a/tools/editor/create_dialog.h
+++ b/tools/editor/create_dialog.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -45,7 +45,7 @@
class CreateDialog : public ConfirmationDialog {
- OBJ_TYPE(CreateDialog,ConfirmationDialog )
+ GDCLASS(CreateDialog,ConfirmationDialog )
Vector<String> favorite_list;
@@ -108,7 +108,7 @@ public:
class CreateDialog : public ConfirmationDialog {
- OBJ_TYPE( CreateDialog, ConfirmationDialog );
+ GDCLASS( CreateDialog, ConfirmationDialog );
Tree *tree;
Button *create;
diff --git a/tools/editor/dependency_editor.cpp b/tools/editor/dependency_editor.cpp
index 049bcefc75..20e185104b 100644
--- a/tools/editor/dependency_editor.cpp
+++ b/tools/editor/dependency_editor.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -250,9 +250,9 @@ void DependencyEditor::edit(const String& p_path) {
void DependencyEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_searched"),&DependencyEditor::_searched);
- ObjectTypeDB::bind_method(_MD("_load_pressed"),&DependencyEditor::_load_pressed);
- ObjectTypeDB::bind_method(_MD("_fix_all"),&DependencyEditor::_fix_all);
+ ClassDB::bind_method(_MD("_searched"),&DependencyEditor::_searched);
+ ClassDB::bind_method(_MD("_load_pressed"),&DependencyEditor::_load_pressed);
+ ClassDB::bind_method(_MD("_fix_all"),&DependencyEditor::_fix_all);
}
@@ -261,7 +261,7 @@ DependencyEditor::DependencyEditor() {
VBoxContainer *vb = memnew( VBoxContainer );
vb->set_name(TTR("Dependencies"));
add_child(vb);
- set_child_rect(vb);
+
tree = memnew( Tree );
tree->set_columns(2);
@@ -354,7 +354,7 @@ DependencyEditorOwners::DependencyEditorOwners() {
owners = memnew( ItemList );
add_child(owners);
- set_child_rect(owners);
+
}
@@ -459,7 +459,7 @@ DependencyRemoveDialog::DependencyRemoveDialog() {
VBoxContainer *vb = memnew( VBoxContainer );
add_child(vb);
- set_child_rect(vb);
+
text = memnew( Label );
vb->add_child(text);
@@ -522,7 +522,7 @@ DependencyErrorDialog::DependencyErrorDialog() {
VBoxContainer *vb = memnew( VBoxContainer );
add_child(vb);
- set_child_rect(vb);
+
files = memnew( Tree );
@@ -690,8 +690,8 @@ void OrphanResourcesDialog::_button_pressed(Object *p_item,int p_column, int p_i
void OrphanResourcesDialog::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_delete_confirm"),&OrphanResourcesDialog::_delete_confirm);
- ObjectTypeDB::bind_method(_MD("_button_pressed"),&OrphanResourcesDialog::_button_pressed);
+ ClassDB::bind_method(_MD("_delete_confirm"),&OrphanResourcesDialog::_delete_confirm);
+ ClassDB::bind_method(_MD("_button_pressed"),&OrphanResourcesDialog::_button_pressed);
}
@@ -699,7 +699,7 @@ OrphanResourcesDialog::OrphanResourcesDialog(){
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
- set_child_rect(vbc);
+
files = memnew( Tree );
files->set_columns(2);
files->set_column_titles_visible(true);
diff --git a/tools/editor/dependency_editor.h b/tools/editor/dependency_editor.h
index 60758f8f4e..a96ffe5fcf 100644
--- a/tools/editor/dependency_editor.h
+++ b/tools/editor/dependency_editor.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -37,7 +37,7 @@
class EditorFileSystemDirectory;
class DependencyEditor : public AcceptDialog {
- OBJ_TYPE(DependencyEditor,AcceptDialog);
+ GDCLASS(DependencyEditor,AcceptDialog);
Tree *tree;
@@ -71,7 +71,7 @@ public:
};
class DependencyEditorOwners : public AcceptDialog {
- OBJ_TYPE(DependencyEditorOwners,AcceptDialog);
+ GDCLASS(DependencyEditorOwners,AcceptDialog);
ItemList *owners;
String editing;
@@ -84,7 +84,7 @@ public:
};
class DependencyRemoveDialog : public ConfirmationDialog {
- OBJ_TYPE(DependencyRemoveDialog,ConfirmationDialog);
+ GDCLASS(DependencyRemoveDialog,ConfirmationDialog);
Label *text;
@@ -103,7 +103,7 @@ public:
class DependencyErrorDialog : public ConfirmationDialog {
- OBJ_TYPE(DependencyErrorDialog,ConfirmationDialog);
+ GDCLASS(DependencyErrorDialog,ConfirmationDialog);
String for_file;
@@ -122,7 +122,7 @@ public:
class OrphanResourcesDialog : public ConfirmationDialog {
- OBJ_TYPE(OrphanResourcesDialog,ConfirmationDialog);
+ GDCLASS(OrphanResourcesDialog,ConfirmationDialog);
DependencyEditor *dep_edit;
Tree *files;
diff --git a/tools/editor/doc_code_font.h b/tools/editor/doc_code_font.h
index 879c873ea1..55f335ab78 100644
--- a/tools/editor/doc_code_font.h
+++ b/tools/editor/doc_code_font.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/doc_font.h b/tools/editor/doc_font.h
index a3c3b58b21..b598ee26f8 100644
--- a/tools/editor/doc_font.h
+++ b/tools/editor/doc_font.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/doc_title_font.h b/tools/editor/doc_title_font.h
index 75a3f049f0..afa0f61eda 100644
--- a/tools/editor/doc_title_font.h
+++ b/tools/editor/doc_title_font.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/editor_asset_installer.cpp b/tools/editor/editor_asset_installer.cpp
index b6051886c0..54099ddce5 100644
--- a/tools/editor/editor_asset_installer.cpp
+++ b/tools/editor/editor_asset_installer.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -331,7 +331,7 @@ void EditorAssetInstaller::ok_pressed() {
void EditorAssetInstaller::_bind_methods() {
- ObjectTypeDB::bind_method("_item_edited",&EditorAssetInstaller::_item_edited);
+ ClassDB::bind_method("_item_edited",&EditorAssetInstaller::_item_edited);
}
@@ -339,7 +339,7 @@ EditorAssetInstaller::EditorAssetInstaller() {
VBoxContainer *vb = memnew( VBoxContainer );
add_child(vb);
- set_child_rect(vb);
+
tree = memnew( Tree );
vb->add_margin_child("Package Contents:",tree,true);
diff --git a/tools/editor/editor_asset_installer.h b/tools/editor/editor_asset_installer.h
index d6e71dbb3c..2d0486a6f6 100644
--- a/tools/editor/editor_asset_installer.h
+++ b/tools/editor/editor_asset_installer.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -34,7 +34,7 @@
#include "scene/gui/tree.h"
class EditorAssetInstaller : public ConfirmationDialog {
- OBJ_TYPE( EditorAssetInstaller, ConfirmationDialog );
+ GDCLASS( EditorAssetInstaller, ConfirmationDialog );
Tree *tree;
String package_path;
diff --git a/tools/editor/editor_autoload_settings.cpp b/tools/editor/editor_autoload_settings.cpp
index 97062b1480..516863eae2 100644
--- a/tools/editor/editor_autoload_settings.cpp
+++ b/tools/editor/editor_autoload_settings.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -62,7 +62,7 @@ bool EditorAutoloadSettings::_autoload_name_is_valid(const String& p_name, Strin
return false;
}
- if (ObjectTypeDB::type_exists(p_name)) {
+ if (ClassDB::class_exists(p_name)) {
if (r_error)
*r_error = TTR("Invalid name. Must not collide with an existing engine class name.");
@@ -116,13 +116,12 @@ void EditorAutoloadSettings::_autoload_add() {
UndoRedo* undo_redo = EditorNode::get_singleton()->get_undo_redo();
undo_redo->create_action(TTR("Add AutoLoad"));
- undo_redo->add_do_property(Globals::get_singleton(), name, "*" + path);
- undo_redo->add_do_method(Globals::get_singleton(), "set_persisting", name, true);
+ undo_redo->add_do_property(GlobalConfig::get_singleton(), name, "*" + path);
- if (Globals::get_singleton()->has(name)) {
- undo_redo->add_undo_property(Globals::get_singleton(), name, Globals::get_singleton()->get(name));
+ if (GlobalConfig::get_singleton()->has(name)) {
+ undo_redo->add_undo_property(GlobalConfig::get_singleton(), name, GlobalConfig::get_singleton()->get(name));
} else {
- undo_redo->add_undo_property(Globals::get_singleton(), name, Variant());
+ undo_redo->add_undo_property(GlobalConfig::get_singleton(), name, Variant());
}
undo_redo->add_do_method(this, "update_autoload");
@@ -171,7 +170,7 @@ void EditorAutoloadSettings::_autoload_edited() {
return;
}
- if (Globals::get_singleton()->has("autoload/" + name)) {
+ if (GlobalConfig::get_singleton()->has("autoload/" + name)) {
ti->set_text(0, old_name);
EditorNode::get_singleton()->show_warning(vformat(TTR("Autoload '%s' already exists!"), name));
return;
@@ -181,21 +180,18 @@ void EditorAutoloadSettings::_autoload_edited() {
name = "autoload/" + name;
- bool persisting = Globals::get_singleton()->get(selected_autoload);
- int order = Globals::get_singleton()->get(selected_autoload);
- String path = Globals::get_singleton()->get(selected_autoload);
+ int order = GlobalConfig::get_singleton()->get_order(selected_autoload);
+ String path = GlobalConfig::get_singleton()->get(selected_autoload);
undo_redo->create_action(TTR("Rename Autoload"));
- undo_redo->add_do_property(Globals::get_singleton(), name, path);
- undo_redo->add_do_method(Globals::get_singleton(), "set_persisting", name, persisting);
- undo_redo->add_do_method(Globals::get_singleton(), "set_order", name, order);
- undo_redo->add_do_method(Globals::get_singleton(), "clear", selected_autoload);
+ undo_redo->add_do_property(GlobalConfig::get_singleton(), name, path);
+ undo_redo->add_do_method(GlobalConfig::get_singleton(), "set_order", name, order);
+ undo_redo->add_do_method(GlobalConfig::get_singleton(), "clear", selected_autoload);
- undo_redo->add_undo_property(Globals::get_singleton(), selected_autoload, path);
- undo_redo->add_undo_method(Globals::get_singleton(), "set_persisting", selected_autoload, persisting);
- undo_redo->add_undo_method(Globals::get_singleton(), "set_order", selected_autoload, order);
- undo_redo->add_undo_method(Globals::get_singleton(), "clear", name);
+ undo_redo->add_undo_property(GlobalConfig::get_singleton(), selected_autoload, path);
+ undo_redo->add_undo_method(GlobalConfig::get_singleton(), "set_order", selected_autoload, order);
+ undo_redo->add_undo_method(GlobalConfig::get_singleton(), "clear", name);
undo_redo->add_do_method(this, "update_autoload");
undo_redo->add_undo_method(this, "update_autoload");
@@ -212,8 +208,8 @@ void EditorAutoloadSettings::_autoload_edited() {
bool checked = ti->is_checked(2);
String base = "autoload/" + ti->get_text(0);
- int order = Globals::get_singleton()->get_order(base);
- String path = Globals::get_singleton()->get(base);
+ int order = GlobalConfig::get_singleton()->get_order(base);
+ String path = GlobalConfig::get_singleton()->get(base);
if (path.begins_with("*"))
path = path.substr(1, path.length());
@@ -223,11 +219,11 @@ void EditorAutoloadSettings::_autoload_edited() {
undo_redo->create_action(TTR("Toggle AutoLoad Globals"));
- undo_redo->add_do_property(Globals::get_singleton(), base, path);
- undo_redo->add_undo_property(Globals::get_singleton(), base, Globals::get_singleton()->get(base));
+ undo_redo->add_do_property(GlobalConfig::get_singleton(), base, path);
+ undo_redo->add_undo_property(GlobalConfig::get_singleton(), base, GlobalConfig::get_singleton()->get(base));
- undo_redo->add_do_method(Globals::get_singleton(),"set_order", base, order);
- undo_redo->add_undo_method(Globals::get_singleton(),"set_order", base, order);
+ undo_redo->add_do_method(GlobalConfig::get_singleton(),"set_order", base, order);
+ undo_redo->add_undo_method(GlobalConfig::get_singleton(),"set_order", base, order);
undo_redo->add_do_method(this, "update_autoload");
undo_redo->add_undo_method(this, "update_autoload");
@@ -267,16 +263,16 @@ void EditorAutoloadSettings::_autoload_button_pressed(Object *p_item, int p_colu
String swap_name = "autoload/" + swap->get_text(0);
- int order = Globals::get_singleton()->get_order(name);
- int swap_order = Globals::get_singleton()->get_order(swap_name);
+ int order = GlobalConfig::get_singleton()->get_order(name);
+ int swap_order = GlobalConfig::get_singleton()->get_order(swap_name);
undo_redo->create_action(TTR("Move Autoload"));
- undo_redo->add_do_method(Globals::get_singleton(), "set_order", name, swap_order);
- undo_redo->add_undo_method(Globals::get_singleton(), "set_order", name, order);
+ undo_redo->add_do_method(GlobalConfig::get_singleton(), "set_order", name, swap_order);
+ undo_redo->add_undo_method(GlobalConfig::get_singleton(), "set_order", name, order);
- undo_redo->add_do_method(Globals::get_singleton(), "set_order", swap_name, order);
- undo_redo->add_undo_method(Globals::get_singleton(), "set_order", swap_name, swap_order);
+ undo_redo->add_do_method(GlobalConfig::get_singleton(), "set_order", swap_name, order);
+ undo_redo->add_undo_method(GlobalConfig::get_singleton(), "set_order", swap_name, swap_order);
undo_redo->add_do_method(this, "update_autoload");
undo_redo->add_undo_method(this, "update_autoload");
@@ -288,15 +284,15 @@ void EditorAutoloadSettings::_autoload_button_pressed(Object *p_item, int p_colu
} break;
case BUTTON_DELETE: {
- int order = Globals::get_singleton()->get_order(name);
+ int order = GlobalConfig::get_singleton()->get_order(name);
undo_redo->create_action(TTR("Remove Autoload"));
- undo_redo->add_do_property(Globals::get_singleton(), name, Variant());
+ undo_redo->add_do_property(GlobalConfig::get_singleton(), name, Variant());
- undo_redo->add_undo_property(Globals::get_singleton(), name, Globals::get_singleton()->get(name));
- undo_redo->add_undo_method(Globals::get_singleton(), "set_persisting", name, true);
- undo_redo->add_undo_method(Globals::get_singleton(), "set_order", order);
+ undo_redo->add_undo_property(GlobalConfig::get_singleton(), name, GlobalConfig::get_singleton()->get(name));
+ undo_redo->add_undo_method(GlobalConfig::get_singleton(), "set_persisting", name, true);
+ undo_redo->add_undo_method(GlobalConfig::get_singleton(), "set_order", order);
undo_redo->add_do_method(this, "update_autoload");
undo_redo->add_undo_method(this, "update_autoload");
@@ -327,7 +323,7 @@ void EditorAutoloadSettings::update_autoload() {
TreeItem *root = tree->create_item();
List<PropertyInfo> props;
- Globals::get_singleton()->get_property_list(&props);
+ GlobalConfig::get_singleton()->get_property_list(&props);
for (List<PropertyInfo>::Element *E = props.front(); E; E = E->next()) {
@@ -337,14 +333,14 @@ void EditorAutoloadSettings::update_autoload() {
continue;
String name = pi.name.get_slice("/", 1);
- String path = Globals::get_singleton()->get(pi.name);
+ String path = GlobalConfig::get_singleton()->get(pi.name);
if (name.empty())
continue;
AutoLoadInfo info;
info.name = pi.name;
- info.order = Globals::get_singleton()->get_order(pi.name);
+ info.order = GlobalConfig::get_singleton()->get_order(pi.name);
autoload_cache.push_back(info);
@@ -399,7 +395,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);
}
@@ -464,7 +460,7 @@ void EditorAutoloadSettings::drop_data_fw(const Point2& p_point, const Variant&
move_to_back = true;
}
- int order = Globals::get_singleton()->get_order("autoload/" + name);
+ int order = GlobalConfig::get_singleton()->get_order("autoload/" + name);
AutoLoadInfo aux;
List<AutoLoadInfo>::Element *E = NULL;
@@ -481,7 +477,7 @@ void EditorAutoloadSettings::drop_data_fw(const Point2& p_point, const Variant&
orders.resize(autoload_cache.size());
for (int i = 0; i < autoloads.size(); i++) {
- aux.order = Globals::get_singleton()->get_order("autoload/" + autoloads[i]);
+ aux.order = GlobalConfig::get_singleton()->get_order("autoload/" + autoloads[i]);
List<AutoLoadInfo>::Element *I = autoload_cache.find(aux);
@@ -511,8 +507,8 @@ void EditorAutoloadSettings::drop_data_fw(const Point2& p_point, const Variant&
i = 0;
for (List<AutoLoadInfo>::Element *E = autoload_cache.front(); E; E = E->next()) {
- undo_redo->add_do_method(Globals::get_singleton(), "set_order", E->get().name, orders[i++]);
- undo_redo->add_undo_method(Globals::get_singleton(), "set_order", E->get().name, E->get().order);
+ undo_redo->add_do_method(GlobalConfig::get_singleton(), "set_order", E->get().name, orders[i++]);
+ undo_redo->add_undo_method(GlobalConfig::get_singleton(), "set_order", E->get().name, E->get().order);
}
orders.clear();
@@ -528,17 +524,17 @@ void EditorAutoloadSettings::drop_data_fw(const Point2& p_point, const Variant&
void EditorAutoloadSettings::_bind_methods() {
- ObjectTypeDB::bind_method("_autoload_add", &EditorAutoloadSettings::_autoload_add);
- ObjectTypeDB::bind_method("_autoload_selected", &EditorAutoloadSettings::_autoload_selected);
- ObjectTypeDB::bind_method("_autoload_edited", &EditorAutoloadSettings::_autoload_edited);
- ObjectTypeDB::bind_method("_autoload_button_pressed", &EditorAutoloadSettings::_autoload_button_pressed);
- ObjectTypeDB::bind_method("_autoload_file_callback", &EditorAutoloadSettings::_autoload_file_callback);
+ ClassDB::bind_method("_autoload_add", &EditorAutoloadSettings::_autoload_add);
+ ClassDB::bind_method("_autoload_selected", &EditorAutoloadSettings::_autoload_selected);
+ ClassDB::bind_method("_autoload_edited", &EditorAutoloadSettings::_autoload_edited);
+ ClassDB::bind_method("_autoload_button_pressed", &EditorAutoloadSettings::_autoload_button_pressed);
+ ClassDB::bind_method("_autoload_file_callback", &EditorAutoloadSettings::_autoload_file_callback);
- ObjectTypeDB::bind_method("get_drag_data_fw", &EditorAutoloadSettings::get_drag_data_fw);
- ObjectTypeDB::bind_method("can_drop_data_fw", &EditorAutoloadSettings::can_drop_data_fw);
- ObjectTypeDB::bind_method("drop_data_fw", &EditorAutoloadSettings::drop_data_fw);
+ ClassDB::bind_method("get_drag_data_fw", &EditorAutoloadSettings::get_drag_data_fw);
+ ClassDB::bind_method("can_drop_data_fw", &EditorAutoloadSettings::can_drop_data_fw);
+ ClassDB::bind_method("drop_data_fw", &EditorAutoloadSettings::drop_data_fw);
- ObjectTypeDB::bind_method("update_autoload", &EditorAutoloadSettings::update_autoload);
+ ClassDB::bind_method("update_autoload", &EditorAutoloadSettings::update_autoload);
ADD_SIGNAL(MethodInfo("autoload_changed"));
}
diff --git a/tools/editor/editor_autoload_settings.h b/tools/editor/editor_autoload_settings.h
index b61c44b9c2..2afe239000 100644
--- a/tools/editor/editor_autoload_settings.h
+++ b/tools/editor/editor_autoload_settings.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -36,7 +36,7 @@
class EditorAutoloadSettings : public VBoxContainer {
- OBJ_TYPE( EditorAutoloadSettings, VBoxContainer );
+ GDCLASS( EditorAutoloadSettings, VBoxContainer );
enum {
BUTTON_MOVE_UP,
diff --git a/tools/editor/editor_data.cpp b/tools/editor/editor_data.cpp
index 8fc18b5b39..f27fe79a85 100644
--- a/tools/editor/editor_data.cpp
+++ b/tools/editor/editor_data.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -584,7 +584,7 @@ bool EditorData::check_and_update_scene(int p_idx) {
Error err = pscene->pack(edited_scene[p_idx].root);
ERR_FAIL_COND_V(err!=OK,false);
ep.step(TTR("Updating scene.."),1);
- Node *new_scene = pscene->instance(true);
+ Node *new_scene = pscene->instance(PackedScene::GEN_EDIT_STATE_MAIN);
ERR_FAIL_COND_V(!new_scene,false);
//transfer selection
@@ -667,7 +667,7 @@ String EditorData::get_scene_type(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx,edited_scene.size(),String());
if (!edited_scene[p_idx].root)
return "";
- return edited_scene[p_idx].root->get_type();
+ return edited_scene[p_idx].root->get_class();
}
void EditorData::move_edited_scene_to_index(int p_idx) {
@@ -903,12 +903,12 @@ Array EditorSelection::_get_selected_nodes() {
void EditorSelection::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_node_removed"),&EditorSelection::_node_removed);
- ObjectTypeDB::bind_method(_MD("clear"),&EditorSelection::clear);
- ObjectTypeDB::bind_method(_MD("add_node","node:Node"),&EditorSelection::add_node);
- ObjectTypeDB::bind_method(_MD("remove_node","node:Node"),&EditorSelection::remove_node);
- ObjectTypeDB::bind_method(_MD("get_selected_nodes"),&EditorSelection::_get_selected_nodes);
- ObjectTypeDB::bind_method(_MD("get_transformable_selected_nodes"),&EditorSelection::_get_transformable_selected_nodes);
+ ClassDB::bind_method(_MD("_node_removed"),&EditorSelection::_node_removed);
+ ClassDB::bind_method(_MD("clear"),&EditorSelection::clear);
+ ClassDB::bind_method(_MD("add_node","node:Node"),&EditorSelection::add_node);
+ ClassDB::bind_method(_MD("remove_node","node:Node"),&EditorSelection::remove_node);
+ ClassDB::bind_method(_MD("get_selected_nodes"),&EditorSelection::_get_selected_nodes);
+ ClassDB::bind_method(_MD("get_transformable_selected_nodes"),&EditorSelection::_get_transformable_selected_nodes);
ADD_SIGNAL( MethodInfo("selection_changed") );
}
diff --git a/tools/editor/editor_data.h b/tools/editor/editor_data.h
index 59f9d4e4f3..f0bc5983a2 100644
--- a/tools/editor/editor_data.h
+++ b/tools/editor/editor_data.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -218,7 +218,7 @@ public:
class EditorSelection : public Object {
- OBJ_TYPE(EditorSelection,Object);
+ GDCLASS(EditorSelection,Object);
public:
Map<Node*,Object*> selection;
diff --git a/tools/editor/editor_dir_dialog.cpp b/tools/editor/editor_dir_dialog.cpp
index a6a6e11142..56f9a0fb0b 100644
--- a/tools/editor/editor_dir_dialog.cpp
+++ b/tools/editor/editor_dir_dialog.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -46,7 +46,7 @@ void EditorDirDialog::_update_dir(TreeItem* p_item) {
List<String> dirs;
bool ishidden;
- bool show_hidden = EditorSettings::get_singleton()->get("file_dialog/show_hidden_files");
+ bool show_hidden = EditorSettings::get_singleton()->get("filesystem/file_dialog/show_hidden_files");
while(p!="") {
@@ -224,10 +224,10 @@ void EditorDirDialog::_make_dir_confirm() {
void EditorDirDialog::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_item_collapsed"),&EditorDirDialog::_item_collapsed);
- ObjectTypeDB::bind_method(_MD("_make_dir"),&EditorDirDialog::_make_dir);
- ObjectTypeDB::bind_method(_MD("_make_dir_confirm"),&EditorDirDialog::_make_dir_confirm);
- ObjectTypeDB::bind_method(_MD("reload"),&EditorDirDialog::reload);
+ ClassDB::bind_method(_MD("_item_collapsed"),&EditorDirDialog::_item_collapsed);
+ ClassDB::bind_method(_MD("_make_dir"),&EditorDirDialog::_make_dir);
+ ClassDB::bind_method(_MD("_make_dir_confirm"),&EditorDirDialog::_make_dir_confirm);
+ ClassDB::bind_method(_MD("reload"),&EditorDirDialog::reload);
ADD_SIGNAL(MethodInfo("dir_selected",PropertyInfo(Variant::STRING,"dir")));
}
@@ -243,7 +243,7 @@ EditorDirDialog::EditorDirDialog() {
tree = memnew( Tree );
add_child(tree);
- set_child_rect(tree);
+
tree->connect("item_activated",this,"_ok");
makedir = add_button(TTR("Create Folder"),OS::get_singleton()->get_swap_ok_cancel()?true:false,"makedir");
@@ -255,7 +255,7 @@ EditorDirDialog::EditorDirDialog() {
VBoxContainer *makevb= memnew( VBoxContainer );
makedialog->add_child(makevb);
- makedialog->set_child_rect(makevb);
+// makedialog->set_child_rect(makevb);
makedirname = memnew( LineEdit );
makevb->add_margin_child(TTR("Name:"),makedirname);
diff --git a/tools/editor/editor_dir_dialog.h b/tools/editor/editor_dir_dialog.h
index 69f9850c30..0577ff0442 100644
--- a/tools/editor/editor_dir_dialog.h
+++ b/tools/editor/editor_dir_dialog.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -34,7 +34,7 @@
#include "scene/gui/tree.h"
class EditorDirDialog : public ConfirmationDialog {
- OBJ_TYPE(EditorDirDialog,ConfirmationDialog);
+ GDCLASS(EditorDirDialog,ConfirmationDialog);
ConfirmationDialog *makedialog;
diff --git a/tools/editor/editor_file_dialog.cpp b/tools/editor/editor_file_dialog.cpp
index 90289a275e..99165c6ed6 100644
--- a/tools/editor/editor_file_dialog.cpp
+++ b/tools/editor/editor_file_dialog.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -87,10 +87,10 @@ void EditorFileDialog::_notification(int p_what) {
} else if (p_what==EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
- bool show_hidden=EditorSettings::get_singleton()->get("file_dialog/show_hidden_files");
+ bool show_hidden=EditorSettings::get_singleton()->get("filesystem/file_dialog/show_hidden_files");
if (show_hidden_files!=show_hidden)
set_show_hidden_files(show_hidden);
- set_display_mode((DisplayMode)EditorSettings::get_singleton()->get("file_dialog/display_mode").operator int());
+ set_display_mode((DisplayMode)EditorSettings::get_singleton()->get("filesystem/file_dialog/display_mode").operator int());
}
}
@@ -121,7 +121,7 @@ void EditorFileDialog::_unhandled_input(const InputEvent& p_event) {
if (ED_IS_SHORTCUT("file_dialog/toggle_hidden_files", p_event)) {
bool show=!show_hidden_files;
set_show_hidden_files(show);
- EditorSettings::get_singleton()->set("file_dialog/show_hidden_files",show);
+ EditorSettings::get_singleton()->set("filesystem/file_dialog/show_hidden_files",show);
handled=true;
}
if (ED_IS_SHORTCUT("file_dialog/toggle_favorite", p_event)) {
@@ -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) ));
@@ -490,7 +490,7 @@ void EditorFileDialog::_item_dc_selected(int p_item) {
void EditorFileDialog::update_file_list() {
- int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size");
+ int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size");
thumbnail_size*=EDSCALE;
Ref<Texture> folder_thumbnail;
Ref<Texture> file_thumbnail;
@@ -1160,55 +1160,55 @@ EditorFileDialog::DisplayMode EditorFileDialog::get_display_mode() const{
void EditorFileDialog::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_unhandled_input"),&EditorFileDialog::_unhandled_input);
-
- ObjectTypeDB::bind_method(_MD("_item_selected"),&EditorFileDialog::_item_selected);
- ObjectTypeDB::bind_method(_MD("_item_db_selected"),&EditorFileDialog::_item_dc_selected);
- ObjectTypeDB::bind_method(_MD("_dir_entered"),&EditorFileDialog::_dir_entered);
- ObjectTypeDB::bind_method(_MD("_file_entered"),&EditorFileDialog::_file_entered);
- ObjectTypeDB::bind_method(_MD("_action_pressed"),&EditorFileDialog::_action_pressed);
- ObjectTypeDB::bind_method(_MD("_cancel_pressed"),&EditorFileDialog::_cancel_pressed);
- ObjectTypeDB::bind_method(_MD("_filter_selected"),&EditorFileDialog::_filter_selected);
- ObjectTypeDB::bind_method(_MD("_save_confirm_pressed"),&EditorFileDialog::_save_confirm_pressed);
-
- ObjectTypeDB::bind_method(_MD("clear_filters"),&EditorFileDialog::clear_filters);
- ObjectTypeDB::bind_method(_MD("add_filter","filter"),&EditorFileDialog::add_filter);
- ObjectTypeDB::bind_method(_MD("get_current_dir"),&EditorFileDialog::get_current_dir);
- ObjectTypeDB::bind_method(_MD("get_current_file"),&EditorFileDialog::get_current_file);
- ObjectTypeDB::bind_method(_MD("get_current_path"),&EditorFileDialog::get_current_path);
- ObjectTypeDB::bind_method(_MD("set_current_dir","dir"),&EditorFileDialog::set_current_dir);
- ObjectTypeDB::bind_method(_MD("set_current_file","file"),&EditorFileDialog::set_current_file);
- ObjectTypeDB::bind_method(_MD("set_current_path","path"),&EditorFileDialog::set_current_path);
- ObjectTypeDB::bind_method(_MD("set_mode","mode"),&EditorFileDialog::set_mode);
- ObjectTypeDB::bind_method(_MD("get_mode"),&EditorFileDialog::get_mode);
- ObjectTypeDB::bind_method(_MD("get_vbox:VBoxContainer"),&EditorFileDialog::get_vbox);
- ObjectTypeDB::bind_method(_MD("set_access","access"),&EditorFileDialog::set_access);
- ObjectTypeDB::bind_method(_MD("get_access"),&EditorFileDialog::get_access);
- ObjectTypeDB::bind_method(_MD("set_show_hidden_files","show"),&EditorFileDialog::set_show_hidden_files);
- ObjectTypeDB::bind_method(_MD("is_showing_hidden_files"),&EditorFileDialog::is_showing_hidden_files);
- ObjectTypeDB::bind_method(_MD("_select_drive"),&EditorFileDialog::_select_drive);
- ObjectTypeDB::bind_method(_MD("_make_dir"),&EditorFileDialog::_make_dir);
- ObjectTypeDB::bind_method(_MD("_make_dir_confirm"),&EditorFileDialog::_make_dir_confirm);
- ObjectTypeDB::bind_method(_MD("_update_file_list"),&EditorFileDialog::update_file_list);
- ObjectTypeDB::bind_method(_MD("_update_dir"),&EditorFileDialog::update_dir);
- ObjectTypeDB::bind_method(_MD("_thumbnail_done"),&EditorFileDialog::_thumbnail_done);
- ObjectTypeDB::bind_method(_MD("set_display_mode","mode"),&EditorFileDialog::set_display_mode);
- ObjectTypeDB::bind_method(_MD("get_display_mode"),&EditorFileDialog::get_display_mode);
- ObjectTypeDB::bind_method(_MD("_thumbnail_result"),&EditorFileDialog::_thumbnail_result);
- ObjectTypeDB::bind_method(_MD("set_disable_overwrite_warning","disable"),&EditorFileDialog::set_disable_overwrite_warning);
- ObjectTypeDB::bind_method(_MD("is_overwrite_warning_disabled"),&EditorFileDialog::is_overwrite_warning_disabled);
-
- ObjectTypeDB::bind_method(_MD("_recent_selected"),&EditorFileDialog::_recent_selected);
- ObjectTypeDB::bind_method(_MD("_go_back"),&EditorFileDialog::_go_back);
- ObjectTypeDB::bind_method(_MD("_go_forward"),&EditorFileDialog::_go_forward);
- ObjectTypeDB::bind_method(_MD("_go_up"),&EditorFileDialog::_go_up);
-
- ObjectTypeDB::bind_method(_MD("_favorite_toggled"),&EditorFileDialog::_favorite_toggled);
- ObjectTypeDB::bind_method(_MD("_favorite_selected"),&EditorFileDialog::_favorite_selected);
- ObjectTypeDB::bind_method(_MD("_favorite_move_up"),&EditorFileDialog::_favorite_move_up);
- ObjectTypeDB::bind_method(_MD("_favorite_move_down"),&EditorFileDialog::_favorite_move_down);
-
- ObjectTypeDB::bind_method(_MD("invalidate"),&EditorFileDialog::invalidate);
+ ClassDB::bind_method(_MD("_unhandled_input"),&EditorFileDialog::_unhandled_input);
+
+ ClassDB::bind_method(_MD("_item_selected"),&EditorFileDialog::_item_selected);
+ ClassDB::bind_method(_MD("_item_db_selected"),&EditorFileDialog::_item_dc_selected);
+ ClassDB::bind_method(_MD("_dir_entered"),&EditorFileDialog::_dir_entered);
+ ClassDB::bind_method(_MD("_file_entered"),&EditorFileDialog::_file_entered);
+ ClassDB::bind_method(_MD("_action_pressed"),&EditorFileDialog::_action_pressed);
+ ClassDB::bind_method(_MD("_cancel_pressed"),&EditorFileDialog::_cancel_pressed);
+ ClassDB::bind_method(_MD("_filter_selected"),&EditorFileDialog::_filter_selected);
+ ClassDB::bind_method(_MD("_save_confirm_pressed"),&EditorFileDialog::_save_confirm_pressed);
+
+ ClassDB::bind_method(_MD("clear_filters"),&EditorFileDialog::clear_filters);
+ ClassDB::bind_method(_MD("add_filter","filter"),&EditorFileDialog::add_filter);
+ ClassDB::bind_method(_MD("get_current_dir"),&EditorFileDialog::get_current_dir);
+ ClassDB::bind_method(_MD("get_current_file"),&EditorFileDialog::get_current_file);
+ ClassDB::bind_method(_MD("get_current_path"),&EditorFileDialog::get_current_path);
+ ClassDB::bind_method(_MD("set_current_dir","dir"),&EditorFileDialog::set_current_dir);
+ ClassDB::bind_method(_MD("set_current_file","file"),&EditorFileDialog::set_current_file);
+ ClassDB::bind_method(_MD("set_current_path","path"),&EditorFileDialog::set_current_path);
+ ClassDB::bind_method(_MD("set_mode","mode"),&EditorFileDialog::set_mode);
+ ClassDB::bind_method(_MD("get_mode"),&EditorFileDialog::get_mode);
+ ClassDB::bind_method(_MD("get_vbox:VBoxContainer"),&EditorFileDialog::get_vbox);
+ ClassDB::bind_method(_MD("set_access","access"),&EditorFileDialog::set_access);
+ ClassDB::bind_method(_MD("get_access"),&EditorFileDialog::get_access);
+ ClassDB::bind_method(_MD("set_show_hidden_files","show"),&EditorFileDialog::set_show_hidden_files);
+ ClassDB::bind_method(_MD("is_showing_hidden_files"),&EditorFileDialog::is_showing_hidden_files);
+ ClassDB::bind_method(_MD("_select_drive"),&EditorFileDialog::_select_drive);
+ ClassDB::bind_method(_MD("_make_dir"),&EditorFileDialog::_make_dir);
+ ClassDB::bind_method(_MD("_make_dir_confirm"),&EditorFileDialog::_make_dir_confirm);
+ ClassDB::bind_method(_MD("_update_file_list"),&EditorFileDialog::update_file_list);
+ ClassDB::bind_method(_MD("_update_dir"),&EditorFileDialog::update_dir);
+ ClassDB::bind_method(_MD("_thumbnail_done"),&EditorFileDialog::_thumbnail_done);
+ ClassDB::bind_method(_MD("set_display_mode","mode"),&EditorFileDialog::set_display_mode);
+ ClassDB::bind_method(_MD("get_display_mode"),&EditorFileDialog::get_display_mode);
+ ClassDB::bind_method(_MD("_thumbnail_result"),&EditorFileDialog::_thumbnail_result);
+ ClassDB::bind_method(_MD("set_disable_overwrite_warning","disable"),&EditorFileDialog::set_disable_overwrite_warning);
+ ClassDB::bind_method(_MD("is_overwrite_warning_disabled"),&EditorFileDialog::is_overwrite_warning_disabled);
+
+ ClassDB::bind_method(_MD("_recent_selected"),&EditorFileDialog::_recent_selected);
+ ClassDB::bind_method(_MD("_go_back"),&EditorFileDialog::_go_back);
+ ClassDB::bind_method(_MD("_go_forward"),&EditorFileDialog::_go_forward);
+ ClassDB::bind_method(_MD("_go_up"),&EditorFileDialog::_go_up);
+
+ ClassDB::bind_method(_MD("_favorite_toggled"),&EditorFileDialog::_favorite_toggled);
+ ClassDB::bind_method(_MD("_favorite_selected"),&EditorFileDialog::_favorite_selected);
+ ClassDB::bind_method(_MD("_favorite_move_up"),&EditorFileDialog::_favorite_move_up);
+ ClassDB::bind_method(_MD("_favorite_move_down"),&EditorFileDialog::_favorite_move_down);
+
+ ClassDB::bind_method(_MD("invalidate"),&EditorFileDialog::invalidate);
ADD_SIGNAL(MethodInfo("file_selected",PropertyInfo( Variant::STRING,"path")));
ADD_SIGNAL(MethodInfo("files_selected",PropertyInfo( Variant::STRING_ARRAY,"paths")));
@@ -1289,7 +1289,6 @@ EditorFileDialog::EditorFileDialog() {
disable_overwrite_warning=false;
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
- set_child_rect(vbc);
mode=MODE_SAVE_FILE;
set_title(TTR("Save a File"));
@@ -1446,7 +1445,7 @@ EditorFileDialog::EditorFileDialog() {
makedialog->set_title(TTR("Create Folder"));
VBoxContainer *makevb= memnew( VBoxContainer );
makedialog->add_child(makevb);
- makedialog->set_child_rect(makevb);
+
makedirname = memnew( LineEdit );
makevb->add_margin_child(TTR("Name:"),makedirname);
add_child(makedialog);
@@ -1490,11 +1489,11 @@ EditorFileDialog::~EditorFileDialog() {
void EditorLineEditFileChooser::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_browse"),&EditorLineEditFileChooser::_browse);
- ObjectTypeDB::bind_method(_MD("_chosen"),&EditorLineEditFileChooser::_chosen);
- ObjectTypeDB::bind_method(_MD("get_button:Button"),&EditorLineEditFileChooser::get_button);
- ObjectTypeDB::bind_method(_MD("get_line_edit:LineEdit"),&EditorLineEditFileChooser::get_line_edit);
- ObjectTypeDB::bind_method(_MD("get_file_dialog:EditorFileDialog"),&EditorLineEditFileChooser::get_file_dialog);
+ ClassDB::bind_method(_MD("_browse"),&EditorLineEditFileChooser::_browse);
+ ClassDB::bind_method(_MD("_chosen"),&EditorLineEditFileChooser::_chosen);
+ ClassDB::bind_method(_MD("get_button:Button"),&EditorLineEditFileChooser::get_button);
+ ClassDB::bind_method(_MD("get_line_edit:LineEdit"),&EditorLineEditFileChooser::get_line_edit);
+ ClassDB::bind_method(_MD("get_file_dialog:EditorFileDialog"),&EditorLineEditFileChooser::get_file_dialog);
}
diff --git a/tools/editor/editor_file_dialog.h b/tools/editor/editor_file_dialog.h
index 14683856c0..e2a40cd5df 100644
--- a/tools/editor/editor_file_dialog.h
+++ b/tools/editor/editor_file_dialog.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -42,7 +42,7 @@
*/
class EditorFileDialog : public ConfirmationDialog {
- OBJ_TYPE( EditorFileDialog, ConfirmationDialog );
+ GDCLASS( EditorFileDialog, ConfirmationDialog );
public:
@@ -227,7 +227,7 @@ public:
class EditorLineEditFileChooser : public HBoxContainer {
- OBJ_TYPE( EditorLineEditFileChooser, HBoxContainer );
+ GDCLASS( EditorLineEditFileChooser, HBoxContainer );
Button *button;
LineEdit *line_edit;
EditorFileDialog *dialog;
diff --git a/tools/editor/editor_file_system.cpp b/tools/editor/editor_file_system.cpp
index be1af16576..5fb274f38f 100644
--- a/tools/editor/editor_file_system.cpp
+++ b/tools/editor/editor_file_system.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -203,18 +203,18 @@ EditorFileSystemDirectory *EditorFileSystemDirectory::get_parent() {
void EditorFileSystemDirectory::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_subdir_count"),&EditorFileSystemDirectory::get_subdir_count);
- ObjectTypeDB::bind_method(_MD("get_subdir","idx"),&EditorFileSystemDirectory::get_subdir);
- ObjectTypeDB::bind_method(_MD("get_file_count"),&EditorFileSystemDirectory::get_file_count);
- ObjectTypeDB::bind_method(_MD("get_file","idx"),&EditorFileSystemDirectory::get_file);
- ObjectTypeDB::bind_method(_MD("get_file_path","idx"),&EditorFileSystemDirectory::get_file_path);
- ObjectTypeDB::bind_method(_MD("get_file_type","idx"),&EditorFileSystemDirectory::get_file_type);
- ObjectTypeDB::bind_method(_MD("is_missing_sources","idx"),&EditorFileSystemDirectory::is_missing_sources);
- ObjectTypeDB::bind_method(_MD("get_name"),&EditorFileSystemDirectory::get_name);
- ObjectTypeDB::bind_method(_MD("get_path"),&EditorFileSystemDirectory::get_path);
- ObjectTypeDB::bind_method(_MD("get_parent:EditorFileSystemDirectory"),&EditorFileSystemDirectory::get_parent);
- ObjectTypeDB::bind_method(_MD("find_file_index","name"),&EditorFileSystemDirectory::find_file_index);
- ObjectTypeDB::bind_method(_MD("find_dir_index","name"),&EditorFileSystemDirectory::find_dir_index);
+ ClassDB::bind_method(_MD("get_subdir_count"),&EditorFileSystemDirectory::get_subdir_count);
+ ClassDB::bind_method(_MD("get_subdir","idx"),&EditorFileSystemDirectory::get_subdir);
+ ClassDB::bind_method(_MD("get_file_count"),&EditorFileSystemDirectory::get_file_count);
+ ClassDB::bind_method(_MD("get_file","idx"),&EditorFileSystemDirectory::get_file);
+ ClassDB::bind_method(_MD("get_file_path","idx"),&EditorFileSystemDirectory::get_file_path);
+ ClassDB::bind_method(_MD("get_file_type","idx"),&EditorFileSystemDirectory::get_file_type);
+ ClassDB::bind_method(_MD("is_missing_sources","idx"),&EditorFileSystemDirectory::is_missing_sources);
+ ClassDB::bind_method(_MD("get_name"),&EditorFileSystemDirectory::get_name);
+ ClassDB::bind_method(_MD("get_path"),&EditorFileSystemDirectory::get_path);
+ ClassDB::bind_method(_MD("get_parent:EditorFileSystemDirectory"),&EditorFileSystemDirectory::get_parent);
+ ClassDB::bind_method(_MD("find_file_index","name"),&EditorFileSystemDirectory::find_file_index);
+ ClassDB::bind_method(_MD("find_dir_index","name"),&EditorFileSystemDirectory::find_dir_index);
}
@@ -286,7 +286,7 @@ void EditorFileSystem::_scan_filesystem() {
sources_changed.clear();
file_cache.clear();
- String project=Globals::get_singleton()->get_resource_path();
+ String project=GlobalConfig::get_singleton()->get_resource_path();
String fscache = EditorSettings::get_singleton()->get_project_settings_path().plus_file("filesystem_cache");
FileAccess *f =FileAccess::open(fscache,FileAccess::READ);
@@ -488,7 +488,7 @@ bool EditorFileSystem::_update_scan_actions() {
void EditorFileSystem::scan() {
- if (bool(Globals::get_singleton()->get("debug/disable_scan")))
+ if (false /*&& bool(Globals::get_singleton()->get("debug/disable_scan"))*/)
return;
if (scanning || scanning_sources|| thread)
@@ -1088,7 +1088,7 @@ bool EditorFileSystem::_find_file(const String& p_file,EditorFileSystemDirectory
return false;
- String f = Globals::get_singleton()->localize_path(p_file);
+ String f = GlobalConfig::get_singleton()->localize_path(p_file);
if (!f.begins_with("res://"))
return false;
@@ -1204,7 +1204,7 @@ EditorFileSystemDirectory *EditorFileSystem::get_path(const String& p_path) {
return NULL;
- String f = Globals::get_singleton()->localize_path(p_path);
+ String f = GlobalConfig::get_singleton()->localize_path(p_path);
if (!f.begins_with("res://"))
return NULL;
@@ -1346,14 +1346,14 @@ void EditorFileSystem::update_file(const String& p_file) {
void EditorFileSystem::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("get_filesystem:EditorFileSystemDirectory"),&EditorFileSystem::get_filesystem);
- ObjectTypeDB::bind_method(_MD("is_scanning"),&EditorFileSystem::is_scanning);
- ObjectTypeDB::bind_method(_MD("get_scanning_progress"),&EditorFileSystem::get_scanning_progress);
- ObjectTypeDB::bind_method(_MD("scan"),&EditorFileSystem::scan);
- ObjectTypeDB::bind_method(_MD("scan_sources"),&EditorFileSystem::scan_sources);
- ObjectTypeDB::bind_method(_MD("update_file","path"),&EditorFileSystem::update_file);
- ObjectTypeDB::bind_method(_MD("get_path:EditorFileSystemDirectory","path"),&EditorFileSystem::get_path);
- ObjectTypeDB::bind_method(_MD("get_file_type","path"),&EditorFileSystem::get_file_type);
+ ClassDB::bind_method(_MD("get_filesystem:EditorFileSystemDirectory"),&EditorFileSystem::get_filesystem);
+ ClassDB::bind_method(_MD("is_scanning"),&EditorFileSystem::is_scanning);
+ ClassDB::bind_method(_MD("get_scanning_progress"),&EditorFileSystem::get_scanning_progress);
+ ClassDB::bind_method(_MD("scan"),&EditorFileSystem::scan);
+ ClassDB::bind_method(_MD("scan_sources"),&EditorFileSystem::scan_sources);
+ ClassDB::bind_method(_MD("update_file","path"),&EditorFileSystem::update_file);
+ ClassDB::bind_method(_MD("get_path:EditorFileSystemDirectory","path"),&EditorFileSystem::get_path);
+ ClassDB::bind_method(_MD("get_file_type","path"),&EditorFileSystem::get_file_type);
ADD_SIGNAL( MethodInfo("filesystem_changed") );
ADD_SIGNAL( MethodInfo("sources_changed",PropertyInfo(Variant::BOOL,"exist")) );
diff --git a/tools/editor/editor_file_system.h b/tools/editor/editor_file_system.h
index fb768fb358..97c253c70b 100644
--- a/tools/editor/editor_file_system.h
+++ b/tools/editor/editor_file_system.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -39,7 +39,7 @@ class FileAccess;
struct EditorProgressBG;
class EditorFileSystemDirectory : public Object {
- OBJ_TYPE( EditorFileSystemDirectory,Object );
+ GDCLASS( EditorFileSystemDirectory,Object );
String name;
uint64_t modified_time;
@@ -122,7 +122,7 @@ public:
class EditorFileSystem : public Node {
- OBJ_TYPE( EditorFileSystem, Node );
+ GDCLASS( EditorFileSystem, Node );
_THREAD_SAFE_CLASS_
diff --git a/tools/editor/editor_fonts.cpp b/tools/editor/editor_fonts.cpp
index bcf41cbac8..3e128e7759 100644
--- a/tools/editor/editor_fonts.cpp
+++ b/tools/editor/editor_fonts.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -122,7 +122,7 @@ void editor_register_fonts(Ref<Theme> p_theme) {
dfmono->set_font_ptr(_font_source_code_pro,_font_source_code_pro_size);
//dfd->set_force_autohinter(true); //just looks better..i think?
- MAKE_DROID_SANS(df,int(EditorSettings::get_singleton()->get("global/font_size"))*EDSCALE);
+ MAKE_DROID_SANS(df,int(EditorSettings::get_singleton()->get("interface/font_size"))*EDSCALE);
p_theme->set_default_theme_font(df);
@@ -131,9 +131,9 @@ void editor_register_fonts(Ref<Theme> p_theme) {
// Ref<BitmapFont> doc_title_font = make_font(_bi_font_doc_title_font_height,_bi_font_doc_title_font_ascent,0,_bi_font_doc_title_font_charcount,_bi_font_doc_title_font_characters,p_theme->get_icon("DocTitleFont","EditorIcons"));
// Ref<BitmapFont> doc_code_font = make_font(_bi_font_doc_code_font_height,_bi_font_doc_code_font_ascent,0,_bi_font_doc_code_font_charcount,_bi_font_doc_code_font_characters,p_theme->get_icon("DocCodeFont","EditorIcons"));
- MAKE_DROID_SANS(df_title,int(EDITOR_DEF("help/help_title_font_size",18))*EDSCALE);
+ MAKE_DROID_SANS(df_title,int(EDITOR_DEF("text_editor/help/help_title_font_size",18))*EDSCALE);
- MAKE_DROID_SANS(df_doc,int(EDITOR_DEF("help/help_font_size",16))*EDSCALE);
+ MAKE_DROID_SANS(df_doc,int(EDITOR_DEF("text_editor/help/help_font_size",16))*EDSCALE);
p_theme->set_font("doc","EditorFonts",df_doc);
@@ -142,7 +142,7 @@ void editor_register_fonts(Ref<Theme> p_theme) {
Ref<DynamicFont> df_code;
df_code.instance();
- df_code->set_size(int(EditorSettings::get_singleton()->get("global/source_font_size"))*EDSCALE);
+ df_code->set_size(int(EditorSettings::get_singleton()->get("interface/source_font_size"))*EDSCALE);
df_code->set_font_data(dfmono);
MAKE_FALLBACKS(df_code);
@@ -150,7 +150,7 @@ void editor_register_fonts(Ref<Theme> p_theme) {
Ref<DynamicFont> df_doc_code;
df_doc_code.instance();
- df_doc_code->set_size(int(EDITOR_DEF("help/help_source_font_size",14))*EDSCALE);
+ df_doc_code->set_size(int(EDITOR_DEF("text_editor/help/help_source_font_size",14))*EDSCALE);
df_doc_code->set_font_data(dfmono);
MAKE_FALLBACKS(df_doc_code);
diff --git a/tools/editor/editor_fonts.h b/tools/editor/editor_fonts.h
index 3b2422c3e3..0e8ce20609 100644
--- a/tools/editor/editor_fonts.h
+++ b/tools/editor/editor_fonts.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/editor_help.cpp b/tools/editor/editor_help.cpp
index 4f83dc2f66..11eeaffdb6 100644
--- a/tools/editor/editor_help.cpp
+++ b/tools/editor/editor_help.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -71,7 +71,7 @@ void EditorHelpSearch::_sbox_input(const InputEvent& p_ie) {
p_ie.key.scancode == KEY_PAGEUP ||
p_ie.key.scancode == KEY_PAGEDOWN ) ) {
- search_options->call("_input_event",p_ie);
+ search_options->call("_gui_input",p_ie);
search_box->accept_event();
}
@@ -88,7 +88,7 @@ void EditorHelpSearch::_update_search() {
*/
List<StringName> type_list;
- ObjectTypeDB::get_type_list(&type_list);
+ ClassDB::get_class_list(&type_list);
DocData *doc=EditorHelp::get_doc_data();
String term = search_box->get_text();
@@ -299,10 +299,10 @@ void EditorHelpSearch::_notification(int p_what) {
void EditorHelpSearch::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_text_changed"),&EditorHelpSearch::_text_changed);
- ObjectTypeDB::bind_method(_MD("_confirmed"),&EditorHelpSearch::_confirmed);
- ObjectTypeDB::bind_method(_MD("_sbox_input"),&EditorHelpSearch::_sbox_input);
- ObjectTypeDB::bind_method(_MD("_update_search"),&EditorHelpSearch::_update_search);
+ ClassDB::bind_method(_MD("_text_changed"),&EditorHelpSearch::_text_changed);
+ ClassDB::bind_method(_MD("_confirmed"),&EditorHelpSearch::_confirmed);
+ ClassDB::bind_method(_MD("_sbox_input"),&EditorHelpSearch::_sbox_input);
+ ClassDB::bind_method(_MD("_update_search"),&EditorHelpSearch::_update_search);
ADD_SIGNAL(MethodInfo("go_to_help"));
@@ -314,7 +314,7 @@ EditorHelpSearch::EditorHelpSearch() {
editor=EditorNode::get_singleton();
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
- set_child_rect(vbc);
+
HBoxContainer *sb_hb = memnew( HBoxContainer);
search_box = memnew( LineEdit );
sb_hb->add_child(search_box);
@@ -324,7 +324,7 @@ EditorHelpSearch::EditorHelpSearch() {
sb_hb->add_child(sb);
vbc->add_margin_child(TTR("Search:"),sb_hb);
search_box->connect("text_changed",this,"_text_changed");
- search_box->connect("input_event",this,"_sbox_input");
+ search_box->connect("gui_input",this,"_sbox_input");
search_options = memnew( Tree );
vbc->add_margin_child(TTR("Matches:"),search_options,true);
get_ok()->set_text(TTR("Open"));
@@ -349,7 +349,7 @@ void EditorHelpIndex::add_type(const String& p_type,HashMap<String,TreeItem*>& p
if (p_types.has(p_type))
return;
-// if (!ObjectTypeDB::is_type(p_type,base) || p_type==base)
+// if (!ClassDB::is_type(p_type,base) || p_type==base)
// return;
String inherits=EditorHelp::get_doc_data()->class_list[p_type].inherits;
@@ -488,17 +488,17 @@ void EditorHelpIndex::_sbox_input(const InputEvent& p_ie) {
p_ie.key.scancode == KEY_PAGEUP ||
p_ie.key.scancode == KEY_PAGEDOWN ) ) {
- class_list->call("_input_event",p_ie);
+ class_list->call("_gui_input",p_ie);
search_box->accept_event();
}
}
void EditorHelpIndex::_bind_methods() {
- ObjectTypeDB::bind_method("_tree_item_selected",&EditorHelpIndex::_tree_item_selected);
- ObjectTypeDB::bind_method("_text_changed",&EditorHelpIndex::_text_changed);
- ObjectTypeDB::bind_method("_sbox_input",&EditorHelpIndex::_sbox_input);
- ObjectTypeDB::bind_method("select_class",&EditorHelpIndex::select_class);
+ ClassDB::bind_method("_tree_item_selected",&EditorHelpIndex::_tree_item_selected);
+ ClassDB::bind_method("_text_changed",&EditorHelpIndex::_text_changed);
+ ClassDB::bind_method("_sbox_input",&EditorHelpIndex::_sbox_input);
+ ClassDB::bind_method("select_class",&EditorHelpIndex::select_class);
ADD_SIGNAL( MethodInfo("open_class"));
}
@@ -508,7 +508,6 @@ EditorHelpIndex::EditorHelpIndex() {
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
- set_child_rect(vbc);
search_box = memnew( LineEdit );
vbc->add_margin_child(TTR("Search:"), search_box);
@@ -517,7 +516,7 @@ EditorHelpIndex::EditorHelpIndex() {
register_text_enter(search_box);
search_box->connect("text_changed", this, "_text_changed");
- search_box->connect("input_event", this, "_sbox_input");
+ search_box->connect("gui_input", this, "_sbox_input");
class_list = memnew( Tree );
vbc->add_margin_child(TTR("Class List:")+" ", class_list, true);
@@ -660,7 +659,7 @@ void EditorHelp::_add_type(const String& p_type) {
t="void";
bool can_ref = (t!="int" && t!="real" && t!="bool" && t!="void");
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/base_type_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/base_type_color"));
if (can_ref)
class_desc->push_meta("#"+t); //class
class_desc->add_text(t);
@@ -719,9 +718,9 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
h_color=Color(1,1,1,1);
class_desc->push_font(doc_title_font);
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
class_desc->add_text(TTR("Class:")+" ");
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/base_type_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/base_type_color"));
_add_text(p_class);
class_desc->pop();
class_desc->pop();
@@ -730,7 +729,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
if (cd.inherits!="") {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
class_desc->push_font(doc_title_font);
class_desc->add_text(TTR("Inherits:")+" ");
class_desc->pop();
@@ -754,7 +753,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
class_desc->add_newline();
}
- if (ObjectTypeDB::type_exists(cd.name)) {
+ if (ClassDB::class_exists(cd.name)) {
bool found = false;
bool prev = false;
@@ -764,7 +763,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
if (E->get().inherits == cd.name) {
if (!found) {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
class_desc->push_font(doc_title_font);
class_desc->add_text(TTR("Inherited by:")+" ");
class_desc->pop();
@@ -795,7 +794,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
if (cd.brief_description!="") {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
class_desc->push_font(doc_title_font);
class_desc->add_text(TTR("Brief Description:"));
class_desc->pop();
@@ -803,7 +802,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
//class_desc->add_newline();
class_desc->add_newline();
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
class_desc->push_font( doc_font );
class_desc->push_indent(1);
_add_text(cd.brief_description);
@@ -814,16 +813,111 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
class_desc->add_newline();
}
+ Set<String> skip_methods;
+ bool property_descr=false;
+
+ if (cd.properties.size()) {
+
+
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ class_desc->push_font(doc_title_font);
+ class_desc->add_text(TTR("Members:"));
+ class_desc->pop();
+ class_desc->pop();
+// class_desc->add_newline();
+
+ class_desc->push_indent(1);
+ class_desc->push_table(2);
+ class_desc->set_table_column_expand(1,1);
+
+ for(int i=0;i<cd.properties.size();i++) {
+ property_line[cd.properties[i].name]=class_desc->get_line_count()-2; //gets overriden if description
+
+ class_desc->push_cell();
+ class_desc->push_align(RichTextLabel::ALIGN_RIGHT);
+ class_desc->push_font(doc_code_font);
+ _add_type(cd.properties[i].type);
+ class_desc->add_text(" ");
+ class_desc->pop();
+ class_desc->pop();
+ class_desc->pop();
+
+ bool describe=false;
+
+ if (cd.properties[i].setter!="") {
+ skip_methods.insert(cd.properties[i].setter);
+ describe=true;
+
+ }
+ if (cd.properties[i].getter!="") {
+ skip_methods.insert(cd.properties[i].getter);
+ describe=true;
+ }
+
+ if (cd.properties[i].description!="") {
+ describe=true;
+
+ }
+ class_desc->push_cell();
+ if (describe) {
+ class_desc->push_meta("@"+cd.properties[i].name);
+ }
+
+ class_desc->push_font(doc_code_font);
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
+ _add_text(cd.properties[i].name);
+
+ if (describe) {
+ class_desc->pop();
+ }
+
+
+ if (cd.properties[i].brief_description!="") {
+ class_desc->push_font(doc_font);
+ class_desc->add_text(" ");
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/comment_color"));
+ _add_text(cd.properties[i].description);
+ class_desc->pop();
+ class_desc->pop();
+
+ }
+
+ if (describe) {
+ property_descr=true;
+ }
+
+
+ class_desc->pop();
+ class_desc->pop();
+ class_desc->pop();
+
+ }
+
+
+ class_desc->pop(); //table
+ class_desc->pop();
+ class_desc->add_newline();
+ class_desc->add_newline();
+ }
+
+
bool method_descr=false;
- bool sort_methods = EditorSettings::get_singleton()->get("help/sort_functions_alphabetically");
+ bool sort_methods = EditorSettings::get_singleton()->get("text_editor/help/sort_functions_alphabetically");
+
+ Vector<DocData::MethodDoc> methods;
+ for(int i=0;i<cd.methods.size();i++) {
+ if (skip_methods.has(cd.methods[i].name))
+ continue;
+ methods.push_back(cd.methods[i]);
+ }
- if (cd.methods.size()) {
+ if (methods.size()) {
if (sort_methods)
- cd.methods.sort();
+ methods.sort();
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
class_desc->push_font(doc_title_font);
class_desc->add_text(TTR("Public Methods:"));
class_desc->pop();
@@ -836,15 +930,15 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
class_desc->push_table(2);
class_desc->set_table_column_expand(1,1);
- for(int i=0;i<cd.methods.size();i++) {
+ for(int i=0;i<methods.size();i++) {
class_desc->push_cell();
- method_line[cd.methods[i].name]=class_desc->get_line_count()-2; //gets overriden if description
+ method_line[methods[i].name]=class_desc->get_line_count()-2; //gets overriden if description
class_desc->push_align(RichTextLabel::ALIGN_RIGHT);
class_desc->push_font(doc_code_font);
- _add_type(cd.methods[i].return_type);
+ _add_type(methods[i].return_type);
//class_desc->add_text(" ");
class_desc->pop(); //align
class_desc->pop(); //font
@@ -852,53 +946,53 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
class_desc->push_cell();
class_desc->push_font(doc_code_font);
- if (cd.methods[i].description!="") {
+ if (methods[i].description!="") {
method_descr=true;
- class_desc->push_meta("@"+cd.methods[i].name);
+ class_desc->push_meta("@"+methods[i].name);
}
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color"));
- _add_text(cd.methods[i].name);
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
+ _add_text(methods[i].name);
class_desc->pop();
- if (cd.methods[i].description!="")
+ if (methods[i].description!="")
class_desc->pop();
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color"));
- class_desc->add_text(cd.methods[i].arguments.size()?"( ":"(");
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
+ class_desc->add_text(methods[i].arguments.size()?"( ":"(");
class_desc->pop();
- for(int j=0;j<cd.methods[i].arguments.size();j++) {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color"));
+ for(int j=0;j<methods[i].arguments.size();j++) {
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
if (j>0)
class_desc->add_text(", ");
- _add_type(cd.methods[i].arguments[j].type);
+ _add_type(methods[i].arguments[j].type);
class_desc->add_text(" ");
- _add_text(cd.methods[i].arguments[j].name);
- if (cd.methods[i].arguments[j].default_value!="") {
+ _add_text(methods[i].arguments[j].name);
+ if (methods[i].arguments[j].default_value!="") {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
class_desc->add_text("=");
class_desc->pop();
- _add_text(cd.methods[i].arguments[j].default_value);
+ _add_text(methods[i].arguments[j].default_value);
}
class_desc->pop();
}
- if (cd.methods[i].qualifiers.find("vararg")!=-1) {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color"));
+ if (methods[i].qualifiers.find("vararg")!=-1) {
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
class_desc->add_text(",");
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
class_desc->add_text(" ... ");
class_desc->pop();
class_desc->pop();
}
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color"));
- class_desc->add_text(cd.methods[i].arguments.size()?" )":")");
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
+ class_desc->add_text(methods[i].arguments.size()?" )":")");
class_desc->pop();
- if (cd.methods[i].qualifiers!="") {
+ if (methods[i].qualifiers!="") {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
class_desc->add_text(" ");
- _add_text(cd.methods[i].qualifiers);
+ _add_text(methods[i].qualifiers);
class_desc->pop();
}
@@ -914,53 +1008,11 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
}
- if (cd.properties.size()) {
-
-
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
- class_desc->push_font(doc_title_font);
- class_desc->add_text(TTR("Members:"));
- class_desc->pop();
- class_desc->pop();
- class_desc->add_newline();
-
- class_desc->push_indent(1);
-
- //class_desc->add_newline();
-
- for(int i=0;i<cd.properties.size();i++) {
-
- property_line[cd.properties[i].name]=class_desc->get_line_count()-2; //gets overriden if description
- class_desc->push_font(doc_code_font);
- _add_type(cd.properties[i].type);
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color"));
- class_desc->add_text(" ");
- _add_text(cd.properties[i].name);
- class_desc->pop();
- class_desc->pop();
-
- if (cd.properties[i].description!="") {
- class_desc->push_font(doc_font);
- class_desc->add_text(" ");
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/comment_color"));
- _add_text(cd.properties[i].description);
- class_desc->pop();
- class_desc->pop();
-
- }
-
- class_desc->add_newline();
- }
-
-
- class_desc->pop();
- class_desc->add_newline();
- }
if (cd.theme_properties.size()) {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
class_desc->push_font(doc_title_font);
class_desc->add_text(TTR("GUI Theme Items:"));
class_desc->pop();
@@ -976,7 +1028,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
theme_property_line[cd.theme_properties[i].name]=class_desc->get_line_count()-2; //gets overriden if description
class_desc->push_font(doc_code_font);
_add_type(cd.theme_properties[i].type);
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
class_desc->add_text(" ");
_add_text(cd.theme_properties[i].name);
class_desc->pop();
@@ -985,7 +1037,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
if (cd.theme_properties[i].description!="") {
class_desc->push_font(doc_font);
class_desc->add_text(" ");
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/comment_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/comment_color"));
_add_text(cd.theme_properties[i].description);
class_desc->pop();
class_desc->pop();
@@ -1004,7 +1056,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
if (sort_methods) {
cd.signals.sort();
}
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
class_desc->push_font(doc_title_font);
class_desc->add_text(TTR("Signals:"));
class_desc->pop();
@@ -1021,14 +1073,14 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
class_desc->push_font(doc_code_font); // monofont
//_add_type("void");
//class_desc->add_text(" ");
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
_add_text(cd.signals[i].name);
class_desc->pop();
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
class_desc->add_text(cd.signals[i].arguments.size()?"( ":"(");
class_desc->pop();
for(int j=0;j<cd.signals[i].arguments.size();j++) {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
if (j>0)
class_desc->add_text(", ");
_add_type(cd.signals[i].arguments[j].type);
@@ -1036,7 +1088,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
_add_text(cd.signals[i].arguments[j].name);
if (cd.signals[i].arguments[j].default_value!="") {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
class_desc->add_text("=");
class_desc->pop();
_add_text(cd.signals[i].arguments[j].default_value);
@@ -1045,13 +1097,13 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
class_desc->pop();
}
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
class_desc->add_text(cd.signals[i].arguments.size()?" )":")");
class_desc->pop();
class_desc->pop(); // end monofont
if (cd.signals[i].description!="") {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/comment_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/comment_color"));
class_desc->add_text(" ");
_add_text(cd.signals[i].description);
class_desc->pop();
@@ -1069,7 +1121,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
if (cd.constants.size()) {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
class_desc->push_font(doc_title_font);
class_desc->add_text(TTR("Constants:"));
class_desc->pop();
@@ -1083,20 +1135,20 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
constant_line[cd.constants[i].name]=class_desc->get_line_count()-2;
class_desc->push_font(doc_code_font);
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/base_type_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/base_type_color"));
_add_text(cd.constants[i].name);
class_desc->pop();
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
class_desc->add_text(" = ");
class_desc->pop();
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
_add_text(cd.constants[i].value);
class_desc->pop();
class_desc->pop();
if (cd.constants[i].description!="") {
class_desc->push_font(doc_font);
class_desc->add_text(" ");
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/comment_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/comment_color"));
_add_text(cd.constants[i].description);
class_desc->pop();
class_desc->pop();
@@ -1114,7 +1166,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
if (cd.description!="") {
description_line=class_desc->get_line_count()-2;
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
class_desc->push_font(doc_title_font);
class_desc->add_text(TTR("Description:"));
class_desc->pop();
@@ -1122,7 +1174,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
class_desc->add_newline();
class_desc->add_newline();
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
class_desc->push_font( doc_font );
class_desc->push_indent(1);
_add_text(cd.description);
@@ -1133,9 +1185,92 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
class_desc->add_newline();
}
+ if (property_descr) {
+
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ class_desc->push_font(doc_title_font);
+ class_desc->add_text(TTR("Property Description:"));
+ class_desc->pop();
+ class_desc->pop();
+
+ class_desc->add_newline();
+ class_desc->add_newline();
+
+
+ for(int i=0;i<cd.properties.size();i++) {
+
+ method_line[cd.properties[i].name]=class_desc->get_line_count()-2;
+
+ class_desc->push_font(doc_code_font);
+ _add_type(cd.properties[i].type);
+
+ class_desc->add_text(" ");
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
+ _add_text(cd.properties[i].name);
+ class_desc->pop(); //color
+
+ class_desc->add_text(" ");
+
+ class_desc->pop(); //font
+
+ if (cd.properties[i].setter!="") {
+
+ class_desc->push_font( doc_font );
+
+ class_desc->push_indent(2);
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ class_desc->add_text("Setter: ");
+ class_desc->pop();
+
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
+ class_desc->add_text(cd.properties[i].setter+"(value)");
+ class_desc->pop(); //color
+
+ class_desc->pop(); //indent
+
+ class_desc->pop(); //font
+
+ }
+
+ if (cd.properties[i].getter!="") {
+
+ class_desc->push_font( doc_font );
+
+ class_desc->push_indent(2);
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
+ class_desc->add_text("Getter: ");
+ class_desc->pop();
+
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
+ class_desc->add_text(cd.properties[i].getter+"()");
+ class_desc->pop(); //color
+
+ class_desc->pop(); //indent
+
+ class_desc->pop(); //font
+
+ }
+
+ class_desc->add_newline();
+
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
+ class_desc->push_font( doc_font );
+ class_desc->push_indent(1);
+ _add_text(cd.properties[i].description);
+ class_desc->pop();
+ class_desc->pop();
+ class_desc->pop();
+ class_desc->add_newline();
+ class_desc->add_newline();
+ class_desc->add_newline();
+
+ }
+
+ }
+
if (method_descr) {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
class_desc->push_font(doc_title_font);
class_desc->add_text(TTR("Method Description:"));
class_desc->pop();
@@ -1145,46 +1280,46 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
class_desc->add_newline();
- for(int i=0;i<cd.methods.size();i++) {
+ for(int i=0;i<methods.size();i++) {
- method_line[cd.methods[i].name]=class_desc->get_line_count()-2;
+ method_line[methods[i].name]=class_desc->get_line_count()-2;
class_desc->push_font(doc_code_font);
- _add_type(cd.methods[i].return_type);
+ _add_type(methods[i].return_type);
class_desc->add_text(" ");
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color"));
- _add_text(cd.methods[i].name);
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
+ _add_text(methods[i].name);
class_desc->pop();
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color"));
- class_desc->add_text(cd.methods[i].arguments.size()?"( ":"(");
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
+ class_desc->add_text(methods[i].arguments.size()?"( ":"(");
class_desc->pop();
- for(int j=0;j<cd.methods[i].arguments.size();j++) {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color"));
+ for(int j=0;j<methods[i].arguments.size();j++) {
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
if (j>0)
class_desc->add_text(", ");
- _add_type(cd.methods[i].arguments[j].type);
+ _add_type(methods[i].arguments[j].type);
class_desc->add_text(" ");
- _add_text(cd.methods[i].arguments[j].name);
- if (cd.methods[i].arguments[j].default_value!="") {
+ _add_text(methods[i].arguments[j].name);
+ if (methods[i].arguments[j].default_value!="") {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
class_desc->add_text("=");
class_desc->pop();
- _add_text(cd.methods[i].arguments[j].default_value);
+ _add_text(methods[i].arguments[j].default_value);
}
class_desc->pop();
}
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/symbol_color"));
- class_desc->add_text(cd.methods[i].arguments.size()?" )":")");
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color"));
+ class_desc->add_text(methods[i].arguments.size()?" )":")");
class_desc->pop();
- if (cd.methods[i].qualifiers!="") {
+ if (methods[i].qualifiers!="") {
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
class_desc->add_text(" ");
- _add_text(cd.methods[i].qualifiers);
+ _add_text(methods[i].qualifiers);
class_desc->pop();
}
@@ -1192,10 +1327,10 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) {
class_desc->pop();
class_desc->add_newline();
- class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/text_color"));
+ class_desc->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
class_desc->push_font( doc_font );
class_desc->push_indent(1);
- _add_text(cd.methods[i].description);
+ _add_text(methods[i].description);
class_desc->pop();
class_desc->pop();
class_desc->pop();
@@ -1272,7 +1407,7 @@ static void _add_text_to_rt(const String& p_bbcode,RichTextLabel *p_rt) {
DocData *doc = EditorHelp::get_doc_data();
String base_path;
- /*p_rt->push_color(EditorSettings::get_singleton()->get("text_editor/text_color"));
+ /*p_rt->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/text_color"));
p_rt->push_font( get_font("normal","Fonts") );
p_rt->push_indent(1);*/
int pos = 0;
@@ -1388,7 +1523,7 @@ static void _add_text_to_rt(const String& p_bbcode,RichTextLabel *p_rt) {
} else if (tag.begins_with("method ")) {
String m = tag.substr(7,tag.length());
- p_rt->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
+ p_rt->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
p_rt->push_meta("@"+m);
p_rt->add_text(m+"()");
p_rt->pop();
@@ -1398,7 +1533,7 @@ static void _add_text_to_rt(const String& p_bbcode,RichTextLabel *p_rt) {
} else if (doc->class_list.has(tag)) {
- p_rt->push_color(EditorSettings::get_singleton()->get("text_editor/keyword_color"));
+ p_rt->push_color(EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color"));
p_rt->push_meta("#"+tag);
p_rt->add_text(tag);
p_rt->pop();
@@ -1414,7 +1549,7 @@ static void _add_text_to_rt(const String& p_bbcode,RichTextLabel *p_rt) {
} else if (tag=="i") {
//use italics font
- Color text_color = EditorSettings::get_singleton()->get("text_editor/text_color");
+ Color text_color = EditorSettings::get_singleton()->get("text_editor/highlighting/text_color");
//no italics so emphasize with color
text_color.r*=1.1;
text_color.g*=1.1;
@@ -1629,7 +1764,7 @@ void EditorHelp::_search_cbk() {
_search(search->get_text());
}
-String EditorHelp::get_class_name() {
+String EditorHelp::get_class() {
return edited_class;
}
@@ -1640,27 +1775,27 @@ void EditorHelp::search_again() {
int EditorHelp::get_scroll() const {
- return class_desc->get_v_scroll()->get_val();
+ return class_desc->get_v_scroll()->get_value();
}
void EditorHelp::set_scroll(int p_scroll) {
- class_desc->get_v_scroll()->set_val(p_scroll);
+ class_desc->get_v_scroll()->set_value(p_scroll);
}
void EditorHelp::_bind_methods() {
- ObjectTypeDB::bind_method("_class_list_select",&EditorHelp::_class_list_select);
- ObjectTypeDB::bind_method("_class_desc_select",&EditorHelp::_class_desc_select);
- ObjectTypeDB::bind_method("_class_desc_input",&EditorHelp::_class_desc_input);
-// ObjectTypeDB::bind_method("_button_pressed",&EditorHelp::_button_pressed);
- ObjectTypeDB::bind_method("_scroll_changed",&EditorHelp::_scroll_changed);
- ObjectTypeDB::bind_method("_request_help",&EditorHelp::_request_help);
- ObjectTypeDB::bind_method("_unhandled_key_input",&EditorHelp::_unhandled_key_input);
- ObjectTypeDB::bind_method("_search",&EditorHelp::_search);
- ObjectTypeDB::bind_method("_search_cbk",&EditorHelp::_search_cbk);
- ObjectTypeDB::bind_method("_help_callback",&EditorHelp::_help_callback);
+ ClassDB::bind_method("_class_list_select",&EditorHelp::_class_list_select);
+ ClassDB::bind_method("_class_desc_select",&EditorHelp::_class_desc_select);
+ ClassDB::bind_method("_class_desc_input",&EditorHelp::_class_desc_input);
+// ClassDB::bind_method("_button_pressed",&EditorHelp::_button_pressed);
+ ClassDB::bind_method("_scroll_changed",&EditorHelp::_scroll_changed);
+ ClassDB::bind_method("_request_help",&EditorHelp::_request_help);
+ ClassDB::bind_method("_unhandled_key_input",&EditorHelp::_unhandled_key_input);
+ ClassDB::bind_method("_search",&EditorHelp::_search);
+ ClassDB::bind_method("_search_cbk",&EditorHelp::_search_cbk);
+ ClassDB::bind_method("_help_callback",&EditorHelp::_help_callback);
ADD_SIGNAL(MethodInfo("go_to_help"));
@@ -1672,7 +1807,7 @@ EditorHelp::EditorHelp() {
VBoxContainer *vbc = this;
- EDITOR_DEF("help/sort_functions_alphabetically",true);
+ EDITOR_DEF("text_editor/help/sort_functions_alphabetically",true);
//class_list->connect("meta_clicked",this,"_class_list_select");
//class_list->set_selection_enabled(true);
@@ -1680,7 +1815,7 @@ EditorHelp::EditorHelp() {
{
Panel *pc = memnew( Panel );
Ref<StyleBoxFlat> style( memnew( StyleBoxFlat ) );
- style->set_bg_color( EditorSettings::get_singleton()->get("text_editor/background_color") );
+ style->set_bg_color( EditorSettings::get_singleton()->get("text_editor/highlighting/background_color") );
pc->set_v_size_flags(SIZE_EXPAND_FILL);
pc->add_style_override("panel", style); //get_stylebox("normal","TextEdit"));
vbc->add_child(pc);
@@ -1688,7 +1823,7 @@ EditorHelp::EditorHelp() {
pc->add_child(class_desc);
class_desc->set_area_as_parent_rect(8);
class_desc->connect("meta_clicked",this,"_class_desc_select");
- class_desc->connect("input_event",this,"_class_desc_input");
+ class_desc->connect("gui_input",this,"_class_desc_input");
}
class_desc->get_v_scroll()->connect("value_changed",this,"_scroll_changed");
@@ -1703,14 +1838,14 @@ EditorHelp::EditorHelp() {
add_child(search_dialog);
VBoxContainer *search_vb = memnew( VBoxContainer );
search_dialog->add_child(search_vb);
- search_dialog->set_child_rect(search_vb);
+
search = memnew( LineEdit );
search_dialog->register_text_enter(search);
search_vb->add_margin_child(TTR("Search Text"),search);
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) );
@@ -1765,7 +1900,7 @@ void EditorHelpBit::_meta_clicked(String p_select) {
void EditorHelpBit::_bind_methods() {
- ObjectTypeDB::bind_method("_meta_clicked",&EditorHelpBit::_meta_clicked);
+ ClassDB::bind_method("_meta_clicked",&EditorHelpBit::_meta_clicked);
ADD_SIGNAL(MethodInfo("request_hide"));
}
diff --git a/tools/editor/editor_help.h b/tools/editor/editor_help.h
index b0dc2809fe..85bac27705 100644
--- a/tools/editor/editor_help.h
+++ b/tools/editor/editor_help.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -47,7 +47,7 @@ class EditorNode;
class EditorHelpSearch : public ConfirmationDialog {
- OBJ_TYPE(EditorHelpSearch,ConfirmationDialog )
+ GDCLASS(EditorHelpSearch,ConfirmationDialog )
EditorNode *editor;
LineEdit *search_box;
@@ -75,7 +75,7 @@ public:
};
class EditorHelpIndex : public ConfirmationDialog {
- OBJ_TYPE( EditorHelpIndex, ConfirmationDialog );
+ GDCLASS( EditorHelpIndex, ConfirmationDialog );
LineEdit *search_box;
Tree *class_list;
@@ -104,7 +104,7 @@ public:
class EditorHelp : public VBoxContainer {
- OBJ_TYPE( EditorHelp, VBoxContainer );
+ GDCLASS( EditorHelp, VBoxContainer );
enum Page {
@@ -187,7 +187,7 @@ public:
void popup_search();
void search_again();
- String get_class_name();
+ String get_class();
void set_focused() { class_desc->grab_focus(); }
@@ -202,7 +202,7 @@ public:
class EditorHelpBit : public Panel {
- OBJ_TYPE( EditorHelpBit, Panel);
+ GDCLASS( EditorHelpBit, Panel);
RichTextLabel *rich_text;
void _go_to_help(String p_what);
diff --git a/tools/editor/editor_icons.h b/tools/editor/editor_icons.h
index 191b908682..7e8d8c0828 100644
--- a/tools/editor/editor_icons.h
+++ b/tools/editor/editor_icons.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/editor_import_export.cpp b/tools/editor/editor_import_export.cpp
index d90a175811..1804016f47 100644
--- a/tools/editor/editor_import_export.cpp
+++ b/tools/editor/editor_import_export.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -46,8 +46,8 @@
String EditorImportPlugin::validate_source_path(const String& p_path) {
- String gp = Globals::get_singleton()->globalize_path(p_path);
- String rp = Globals::get_singleton()->get_resource_path();
+ String gp = GlobalConfig::get_singleton()->globalize_path(p_path);
+ String rp = GlobalConfig::get_singleton()->get_resource_path();
if (!rp.ends_with("/"))
rp+="/";
@@ -57,7 +57,7 @@ String EditorImportPlugin::validate_source_path(const String& p_path) {
String EditorImportPlugin::expand_source_path(const String& p_path) {
if (p_path.is_rel_path()) {
- return Globals::get_singleton()->get_resource_path().plus_file(p_path).simplify_path();
+ return GlobalConfig::get_singleton()->get_resource_path().plus_file(p_path).simplify_path();
} else {
return p_path;
}
@@ -77,17 +77,17 @@ String EditorImportPlugin::_expand_source_path(const String& p_path) {
void EditorImportPlugin::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("validate_source_path","path"),&EditorImportPlugin::_validate_source_path);
- ObjectTypeDB::bind_method(_MD("expand_source_path","path"),&EditorImportPlugin::_expand_source_path);
+ ClassDB::bind_method(_MD("validate_source_path","path"),&EditorImportPlugin::_validate_source_path);
+ ClassDB::bind_method(_MD("expand_source_path","path"),&EditorImportPlugin::_expand_source_path);
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::STRING,"get_name"));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::STRING,"get_visible_name"));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo("import_dialog",PropertyInfo(Variant::STRING,"from")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::INT,"import",PropertyInfo(Variant::STRING,"path"),PropertyInfo(Variant::OBJECT,"from",PROPERTY_HINT_RESOURCE_TYPE,"ResourceImportMetadata")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::RAW_ARRAY,"custom_export",PropertyInfo(Variant::STRING,"path"),PropertyInfo(Variant::OBJECT,"platform",PROPERTY_HINT_RESOURCE_TYPE,"EditorExportPlatform")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo("import_from_drop",PropertyInfo(Variant::STRING_ARRAY,"files"),PropertyInfo(Variant::STRING,"dest_path")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo("reimport_multiple_files",PropertyInfo(Variant::STRING_ARRAY,"files")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::BOOL,"can_reimport_multiple_files"));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::STRING,"get_name"));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::STRING,"get_visible_name"));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo("import_dialog",PropertyInfo(Variant::STRING,"from")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::INT,"import",PropertyInfo(Variant::STRING,"path"),PropertyInfo(Variant::OBJECT,"from",PROPERTY_HINT_RESOURCE_TYPE,"ResourceImportMetadata")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::RAW_ARRAY,"custom_export",PropertyInfo(Variant::STRING,"path"),PropertyInfo(Variant::OBJECT,"platform",PROPERTY_HINT_RESOURCE_TYPE,"EditorExportPlatform")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo("import_from_drop",PropertyInfo(Variant::STRING_ARRAY,"files"),PropertyInfo(Variant::STRING,"dest_path")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo("reimport_multiple_files",PropertyInfo(Variant::STRING_ARRAY,"files")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::BOOL,"can_reimport_multiple_files"));
// BIND_VMETHOD( mi );
}
@@ -765,7 +765,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func
{
MD5_CTX ctx;
MD5Init(&ctx);
- String path = Globals::get_singleton()->get_resource_path()+"::"+String(E->get())+"::"+get_name();
+ String path = GlobalConfig::get_singleton()->get_resource_path()+"::"+String(E->get())+"::"+get_name();
MD5Update(&ctx,(unsigned char*)path.utf8().get_data(),path.utf8().length());
MD5Final(&ctx);
md5 = String::md5(ctx.digest);
@@ -783,7 +783,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func
if (atlas_valid) {
//compare options
- Dictionary options;
+ /*Dictionary options;
options.parse_json(f->get_line());
if (!options.has("lossy_quality") || float(options["lossy_quality"])!=group_lossy_quality)
atlas_valid=false;
@@ -794,7 +794,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func
if (!atlas_valid)
print_line("JSON INVALID");
-
+*/
}
@@ -874,11 +874,11 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func
int flags=0;
- if (Globals::get_singleton()->get("image_loader/filter"))
+ if (GlobalConfig::get_singleton()->get("image_loader/filter"))
flags|=EditorTextureImportPlugin::IMAGE_FLAG_FILTER;
- if (!Globals::get_singleton()->get("image_loader/gen_mipmaps"))
+ if (!GlobalConfig::get_singleton()->get("image_loader/gen_mipmaps"))
flags|=EditorTextureImportPlugin::IMAGE_FLAG_NO_MIPMAPS;
- if (!Globals::get_singleton()->get("image_loader/repeat"))
+ if (!GlobalConfig::get_singleton()->get("image_loader/repeat"))
flags|=EditorTextureImportPlugin::IMAGE_FLAG_REPEAT;
flags|=EditorTextureImportPlugin::IMAGE_FLAG_FIX_BORDER_ALPHA;
@@ -921,7 +921,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func
options["lossy_quality"]=group_lossy_quality;
options["shrink"]=EditorImportExport::get_singleton()->image_export_group_get_shrink(E->get());
options["image_format"]=group_format;
- f->store_line(options.to_json());
+// f->store_line(options.to_json());
f->store_line(image_list_md5);
}
@@ -987,7 +987,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func
StringName engine_cfg="res://engine.cfg";
StringName boot_splash;
{
- String splash=Globals::get_singleton()->get("application/boot_splash"); //avoid splash from being converted
+ String splash=GlobalConfig::get_singleton()->get("application/boot_splash"); //avoid splash from being converted
splash=splash.strip_edges();
if (splash!=String()) {
if (!splash.begins_with("res://"))
@@ -998,7 +998,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func
}
StringName custom_cursor;
{
- String splash=Globals::get_singleton()->get("display/custom_mouse_cursor"); //avoid splash from being converted
+ String splash=GlobalConfig::get_singleton()->get("display/custom_mouse_cursor"); //avoid splash from being converted
splash=splash.strip_edges();
if (splash!=String()) {
if (!splash.begins_with("res://"))
@@ -1084,7 +1084,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func
String remap_file="engine.cfb";
String engine_cfb =EditorSettings::get_singleton()->get_settings_path()+"/tmp/tmp"+remap_file;
- Globals::get_singleton()->save_custom(engine_cfb,custom);
+ GlobalConfig::get_singleton()->save_custom(engine_cfb,custom);
Vector<uint8_t> data = FileAccess::get_file_as_array(engine_cfb);
Error err = p_func(p_udata,"res://"+remap_file,data,counter,files.size());
@@ -1115,8 +1115,8 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags
host="localhost";
if (p_flags&EXPORT_DUMB_CLIENT) {
- int port = EditorSettings::get_singleton()->get("file_server/port");
- String passwd = EditorSettings::get_singleton()->get("file_server/password");
+ int port = EditorSettings::get_singleton()->get("filesystem/file_server/port");
+ String passwd = EditorSettings::get_singleton()->get("filesystem/file_server/password");
r_flags.push_back("-rfs");
r_flags.push_back(host+":"+itos(port));
if (passwd!="") {
@@ -1129,7 +1129,7 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags
r_flags.push_back("-rdebug");
- r_flags.push_back(host+":"+String::num(GLOBAL_DEF("debug/debug_port", 6007)));
+ r_flags.push_back(host+":"+String::num(GLOBAL_DEF("network/debug/remote_port", 6007)));
List<String> breakpoints;
ScriptEditor::get_singleton()->get_breakpoints(&breakpoints);
@@ -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());
@@ -2199,49 +2199,49 @@ DVector<String> EditorImportExport::_get_export_platforms() {
void EditorImportExport::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("add_import_plugin","plugin:EditorImportPlugin"),&EditorImportExport::add_import_plugin);
- ObjectTypeDB::bind_method(_MD("remove_import_plugin","plugin:EditorImportPlugin"),&EditorImportExport::remove_import_plugin);
- ObjectTypeDB::bind_method(_MD("get_import_plugin_count"),&EditorImportExport::get_import_plugin_count);
- ObjectTypeDB::bind_method(_MD("get_import_plugin:EditorImportPlugin","idx"),&EditorImportExport::get_import_plugin);
- ObjectTypeDB::bind_method(_MD("get_import_plugin_by_name:EditorImportPlugin","name"),&EditorImportExport::get_import_plugin_by_name);
-
- ObjectTypeDB::bind_method(_MD("add_export_plugin","plugin:EditorExportPlugin"),&EditorImportExport::add_export_plugin);
- ObjectTypeDB::bind_method(_MD("remove_export_plugin","plugin:EditorExportPlugin"),&EditorImportExport::remove_export_plugin);
- ObjectTypeDB::bind_method(_MD("get_export_plugin_count"),&EditorImportExport::get_export_plugin_count);
- ObjectTypeDB::bind_method(_MD("get_export_plugin:EditorExportPlugin","idx"),&EditorImportExport::get_export_plugin);
-
- ObjectTypeDB::bind_method(_MD("set_export_file_action","file","action"),&EditorImportExport::set_export_file_action);
- ObjectTypeDB::bind_method(_MD("get_export_file_action","file"),&EditorImportExport::get_export_file_action);
- ObjectTypeDB::bind_method(_MD("get_export_file_list"),&EditorImportExport::_get_export_file_list);
-
- ObjectTypeDB::bind_method(_MD("add_export_platform","platform:EditorExportplatform"),&EditorImportExport::add_export_platform);
- //ObjectTypeDB::bind_method(_MD("remove_export_platform","platform:EditorExportplatform"),&EditorImportExport::add_export_platform);
- ObjectTypeDB::bind_method(_MD("get_export_platform:EditorExportPlatform","name"),&EditorImportExport::get_export_platform);
- ObjectTypeDB::bind_method(_MD("get_export_platforms"),&EditorImportExport::_get_export_platforms);
-
- ObjectTypeDB::bind_method(_MD("set_export_filter","filter"),&EditorImportExport::set_export_filter);
- ObjectTypeDB::bind_method(_MD("get_export_filter"),&EditorImportExport::get_export_filter);
-
- ObjectTypeDB::bind_method(_MD("set_export_custom_filter","filter"),&EditorImportExport::set_export_custom_filter);
- ObjectTypeDB::bind_method(_MD("get_export_custom_filter"),&EditorImportExport::get_export_custom_filter);
-
- ObjectTypeDB::bind_method(_MD("set_export_custom_filter_exclude","filter_exclude"),&EditorImportExport::set_export_custom_filter_exclude);
- ObjectTypeDB::bind_method(_MD("get_export_custom_filter_exclude"),&EditorImportExport::get_export_custom_filter_exclude);
-
-
- ObjectTypeDB::bind_method(_MD("image_export_group_create"),&EditorImportExport::image_export_group_create);
- ObjectTypeDB::bind_method(_MD("image_export_group_remove"),&EditorImportExport::image_export_group_remove);
- ObjectTypeDB::bind_method(_MD("image_export_group_set_image_action"),&EditorImportExport::image_export_group_set_image_action);
- ObjectTypeDB::bind_method(_MD("image_export_group_set_make_atlas"),&EditorImportExport::image_export_group_set_make_atlas);
- ObjectTypeDB::bind_method(_MD("image_export_group_set_shrink"),&EditorImportExport::image_export_group_set_shrink);
- ObjectTypeDB::bind_method(_MD("image_export_group_get_image_action"),&EditorImportExport::image_export_group_get_image_action);
- ObjectTypeDB::bind_method(_MD("image_export_group_get_make_atlas"),&EditorImportExport::image_export_group_get_make_atlas);
- ObjectTypeDB::bind_method(_MD("image_export_group_get_shrink"),&EditorImportExport::image_export_group_get_shrink);
- ObjectTypeDB::bind_method(_MD("image_add_to_export_group"),&EditorImportExport::image_add_to_export_group);
- ObjectTypeDB::bind_method(_MD("script_set_action"),&EditorImportExport::script_set_action);
- ObjectTypeDB::bind_method(_MD("script_set_encryption_key"),&EditorImportExport::script_set_encryption_key);
- ObjectTypeDB::bind_method(_MD("script_get_action"),&EditorImportExport::script_get_action);
- ObjectTypeDB::bind_method(_MD("script_get_encryption_key"),&EditorImportExport::script_get_encryption_key);
+ ClassDB::bind_method(_MD("add_import_plugin","plugin:EditorImportPlugin"),&EditorImportExport::add_import_plugin);
+ ClassDB::bind_method(_MD("remove_import_plugin","plugin:EditorImportPlugin"),&EditorImportExport::remove_import_plugin);
+ ClassDB::bind_method(_MD("get_import_plugin_count"),&EditorImportExport::get_import_plugin_count);
+ ClassDB::bind_method(_MD("get_import_plugin:EditorImportPlugin","idx"),&EditorImportExport::get_import_plugin);
+ ClassDB::bind_method(_MD("get_import_plugin_by_name:EditorImportPlugin","name"),&EditorImportExport::get_import_plugin_by_name);
+
+ ClassDB::bind_method(_MD("add_export_plugin","plugin:EditorExportPlugin"),&EditorImportExport::add_export_plugin);
+ ClassDB::bind_method(_MD("remove_export_plugin","plugin:EditorExportPlugin"),&EditorImportExport::remove_export_plugin);
+ ClassDB::bind_method(_MD("get_export_plugin_count"),&EditorImportExport::get_export_plugin_count);
+ ClassDB::bind_method(_MD("get_export_plugin:EditorExportPlugin","idx"),&EditorImportExport::get_export_plugin);
+
+ ClassDB::bind_method(_MD("set_export_file_action","file","action"),&EditorImportExport::set_export_file_action);
+ ClassDB::bind_method(_MD("get_export_file_action","file"),&EditorImportExport::get_export_file_action);
+ ClassDB::bind_method(_MD("get_export_file_list"),&EditorImportExport::_get_export_file_list);
+
+ ClassDB::bind_method(_MD("add_export_platform","platform:EditorExportplatform"),&EditorImportExport::add_export_platform);
+ //ClassDB::bind_method(_MD("remove_export_platform","platform:EditorExportplatform"),&EditorImportExport::add_export_platform);
+ ClassDB::bind_method(_MD("get_export_platform:EditorExportPlatform","name"),&EditorImportExport::get_export_platform);
+ ClassDB::bind_method(_MD("get_export_platforms"),&EditorImportExport::_get_export_platforms);
+
+ ClassDB::bind_method(_MD("set_export_filter","filter"),&EditorImportExport::set_export_filter);
+ ClassDB::bind_method(_MD("get_export_filter"),&EditorImportExport::get_export_filter);
+
+ ClassDB::bind_method(_MD("set_export_custom_filter","filter"),&EditorImportExport::set_export_custom_filter);
+ ClassDB::bind_method(_MD("get_export_custom_filter"),&EditorImportExport::get_export_custom_filter);
+
+ ClassDB::bind_method(_MD("set_export_custom_filter_exclude","filter_exclude"),&EditorImportExport::set_export_custom_filter_exclude);
+ ClassDB::bind_method(_MD("get_export_custom_filter_exclude"),&EditorImportExport::get_export_custom_filter_exclude);
+
+
+ ClassDB::bind_method(_MD("image_export_group_create"),&EditorImportExport::image_export_group_create);
+ ClassDB::bind_method(_MD("image_export_group_remove"),&EditorImportExport::image_export_group_remove);
+ ClassDB::bind_method(_MD("image_export_group_set_image_action"),&EditorImportExport::image_export_group_set_image_action);
+ ClassDB::bind_method(_MD("image_export_group_set_make_atlas"),&EditorImportExport::image_export_group_set_make_atlas);
+ ClassDB::bind_method(_MD("image_export_group_set_shrink"),&EditorImportExport::image_export_group_set_shrink);
+ ClassDB::bind_method(_MD("image_export_group_get_image_action"),&EditorImportExport::image_export_group_get_image_action);
+ ClassDB::bind_method(_MD("image_export_group_get_make_atlas"),&EditorImportExport::image_export_group_get_make_atlas);
+ ClassDB::bind_method(_MD("image_export_group_get_shrink"),&EditorImportExport::image_export_group_get_shrink);
+ ClassDB::bind_method(_MD("image_add_to_export_group"),&EditorImportExport::image_add_to_export_group);
+ ClassDB::bind_method(_MD("script_set_action"),&EditorImportExport::script_set_action);
+ ClassDB::bind_method(_MD("script_set_encryption_key"),&EditorImportExport::script_set_encryption_key);
+ ClassDB::bind_method(_MD("script_get_action"),&EditorImportExport::script_get_action);
+ ClassDB::bind_method(_MD("script_get_encryption_key"),&EditorImportExport::script_get_encryption_key);
diff --git a/tools/editor/editor_import_export.h b/tools/editor/editor_import_export.h
index e21fd8c8f8..fb75373f17 100644
--- a/tools/editor/editor_import_export.h
+++ b/tools/editor/editor_import_export.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -40,7 +40,7 @@ struct EditorProgress;
class EditorImportPlugin : public Reference {
- OBJ_TYPE( EditorImportPlugin, Reference);
+ GDCLASS( EditorImportPlugin, Reference);
protected:
@@ -70,7 +70,7 @@ public:
class EditorExportPlugin : public Reference {
- OBJ_TYPE( EditorExportPlugin, Reference);
+ GDCLASS( EditorExportPlugin, Reference);
protected:
static void _bind_methods();
@@ -84,7 +84,7 @@ public:
class EditorExportPlatform : public Reference {
- OBJ_TYPE( EditorExportPlatform,Reference );
+ GDCLASS( EditorExportPlatform,Reference );
public:
@@ -187,7 +187,7 @@ public:
class EditorExportPlatformPC : public EditorExportPlatform {
- OBJ_TYPE( EditorExportPlatformPC,EditorExportPlatform );
+ GDCLASS( EditorExportPlatformPC,EditorExportPlatform );
public:
@@ -247,7 +247,7 @@ public:
class EditorImportExport : public Node {
- OBJ_TYPE(EditorImportExport,Node);
+ GDCLASS(EditorImportExport,Node);
public:
enum FileAction {
@@ -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_initialize_ssl.cpp b/tools/editor/editor_initialize_ssl.cpp
index c0b55b302f..b7f8e2aad5 100644
--- a/tools/editor/editor_initialize_ssl.cpp
+++ b/tools/editor/editor_initialize_ssl.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -35,10 +35,11 @@ void editor_initialize_certificates() {
ByteArray data;
- data.resize(_certs_uncompressed_size);
+ data.resize(_certs_uncompressed_size+1);
{
ByteArray::Write w = data.write();
Compression::decompress(w.ptr(),_certs_uncompressed_size,_certs_compressed,_certs_compressed_size,Compression::MODE_DEFLATE);
+ w[_certs_uncompressed_size]=0; //make sure it ends at zero
}
StreamPeerSSL::load_certs_from_memory(data);
diff --git a/tools/editor/editor_initialize_ssl.h b/tools/editor/editor_initialize_ssl.h
index 082d546832..0b34ac1d7e 100644
--- a/tools/editor/editor_initialize_ssl.h
+++ b/tools/editor/editor_initialize_ssl.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/editor_log.cpp b/tools/editor/editor_log.cpp
index 02af9712a8..06459928f0 100644
--- a/tools/editor/editor_log.cpp
+++ b/tools/editor/editor_log.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -67,6 +67,10 @@ void EditorLog::_error_handler(void *p_self, const char*p_func, const char*p_fil
icon = self->get_icon("ScriptError","EditorIcons");
} break;
+ case ERR_HANDLER_SHADER: {
+
+ icon = self->get_icon("Shader","EditorIcons");
+ } break;
}
@@ -160,9 +164,9 @@ void EditorLog::_undo_redo_cbk(void *p_self,const String& p_name) {
void EditorLog::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_clear_request"),&EditorLog::_clear_request );
- ObjectTypeDB::bind_method("_override_logger_styles",&EditorLog::_override_logger_styles );
- //ObjectTypeDB::bind_method(_MD("_dragged"),&EditorLog::_dragged );
+ ClassDB::bind_method(_MD("_clear_request"),&EditorLog::_clear_request );
+ ClassDB::bind_method("_override_logger_styles",&EditorLog::_override_logger_styles );
+ //ClassDB::bind_method(_MD("_dragged"),&EditorLog::_dragged );
ADD_SIGNAL( MethodInfo("clear_request"));
}
@@ -203,7 +207,7 @@ EditorLog::EditorLog() {
log->set_selection_enabled(true);
log->set_focus_mode(FOCUS_CLICK);
pc->add_child(log);
- add_message(VERSION_FULL_NAME" (c) 2008-2016 Juan Linietsky, Ariel Manzur.");
+ add_message(VERSION_FULL_NAME" (c) 2008-2017 Juan Linietsky, Ariel Manzur.");
//log->add_text("Initialization Complete.\n"); //because it looks cool.
eh.errfunc=_error_handler;
diff --git a/tools/editor/editor_log.h b/tools/editor/editor_log.h
index bbf35b63cb..e59b877ea0 100644
--- a/tools/editor/editor_log.h
+++ b/tools/editor/editor_log.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -42,7 +42,7 @@
#include "os/thread.h"
class EditorLog : public VBoxContainer {
- OBJ_TYPE( EditorLog, VBoxContainer );
+ GDCLASS( EditorLog, VBoxContainer );
Button *clearbutton;
Label *title;
diff --git a/tools/editor/editor_name_dialog.cpp b/tools/editor/editor_name_dialog.cpp
index c221b908e0..e7dcea4d40 100644
--- a/tools/editor/editor_name_dialog.cpp
+++ b/tools/editor/editor_name_dialog.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -31,7 +31,7 @@
#include "object_type_db.h"
#include "os/keyboard.h"
-void EditorNameDialog::_line_input_event(const InputEvent& p_event) {
+void EditorNameDialog::_line_gui_input(const InputEvent& p_event) {
if (p_event.type == InputEvent::KEY) {
@@ -72,7 +72,7 @@ void EditorNameDialog::ok_pressed() {
void EditorNameDialog::_bind_methods() {
- ObjectTypeDB::bind_method("_line_input_event",&EditorNameDialog::_line_input_event);
+ ClassDB::bind_method("_line_gui_input",&EditorNameDialog::_line_gui_input);
ADD_SIGNAL(MethodInfo("name_confirmed",PropertyInfo( Variant::STRING,"name")));
}
@@ -85,5 +85,5 @@ EditorNameDialog::EditorNameDialog()
name->set_margin(MARGIN_TOP,5);
name->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_BEGIN,5);
name->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_END,5);
- name->connect("input_event", this, "_line_input_event");
+ name->connect("gui_input", this, "_line_gui_input");
}
diff --git a/tools/editor/editor_name_dialog.h b/tools/editor/editor_name_dialog.h
index 9e66908899..d6bc7eca94 100644
--- a/tools/editor/editor_name_dialog.h
+++ b/tools/editor/editor_name_dialog.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -35,11 +35,11 @@
class EditorNameDialog : public ConfirmationDialog {
- OBJ_TYPE( EditorNameDialog, ConfirmationDialog );
+ GDCLASS( EditorNameDialog, ConfirmationDialog );
LineEdit *name;
- void _line_input_event(const InputEvent& p_event);
+ void _line_gui_input(const InputEvent& p_event);
protected:
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index 5a3deb7b9d..5fd8f244f7 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -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"
@@ -119,7 +120,7 @@ EditorNode *EditorNode::singleton=NULL;
void EditorNode::_update_scene_tabs() {
- bool show_rb = EditorSettings::get_singleton()->get("global/show_script_in_scene_tabs");
+ bool show_rb = EditorSettings::get_singleton()->get("interface/show_script_in_scene_tabs");
scene_tabs->clear_tabs();
Ref<Texture> script_icon = gui_base->get_icon("Script","EditorIcons");
@@ -156,7 +157,7 @@ void EditorNode::_update_scene_tabs() {
void EditorNode::_update_title() {
- String appname = Globals::get_singleton()->get("application/name");
+ String appname = GlobalConfig::get_singleton()->get("application/name");
String title = appname.empty()?String(VERSION_FULL_NAME):String(_MKSTR(VERSION_NAME) + String(" - ") + appname);
String edited = editor_data.get_edited_scene_root()?editor_data.get_edited_scene_root()->get_filename():String();
if (!edited.empty())
@@ -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();
{
@@ -286,16 +285,16 @@ void EditorNode::_notification(int p_what) {
if (peak<-80)
peak=-80;
- float vu = audio_vu->get_val();
+ float vu = audio_vu->get_value();
if (peak > vu) {
- audio_vu->set_val(peak);
+ audio_vu->set_value(peak);
} else {
float new_vu = vu - get_process_delta_time()*70.0;
if (new_vu<-80)
new_vu=-80;
if (new_vu !=-80 && vu !=-80)
- audio_vu->set_val(new_vu);
+ audio_vu->set_value(new_vu);
}
}
@@ -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);
@@ -392,7 +391,7 @@ void EditorNode::_notification(int p_what) {
}
*/
- if (bool(EDITOR_DEF("resources/auto_reload_modified_images",true))) {
+ if (bool(EDITOR_DEF("filesystem/resources/auto_reload_modified_images",true))) {
_menu_option_confirm(DEPENDENCY_LOAD_CHANGED_IMAGES,true);
}
@@ -408,7 +407,7 @@ void EditorNode::_notification(int p_what) {
};
if (p_what == EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED) {
- scene_tabs->set_tab_close_display_policy( (bool(EDITOR_DEF("global/always_show_close_button_in_scene_tabs", false)) ? Tabs::CLOSE_BUTTON_SHOW_ALWAYS : Tabs::CLOSE_BUTTON_SHOW_ACTIVE_ONLY) );
+ scene_tabs->set_tab_close_display_policy( (bool(EDITOR_DEF("interface/always_show_close_button_in_scene_tabs", false)) ? Tabs::CLOSE_BUTTON_SHOW_ALWAYS : Tabs::CLOSE_BUTTON_SHOW_ACTIVE_ONLY) );
}
}
@@ -435,7 +434,7 @@ void EditorNode::_fs_changed() {
void EditorNode::_sources_changed(bool p_exist) {
- if (p_exist && bool(EditorSettings::get_singleton()->get("import/automatic_reimport_on_sources_changed"))) {
+ if (p_exist && bool(EditorSettings::get_singleton()->get("filesystem/import/automatic_reimport_on_sources_changed"))) {
p_exist=false;
List<String> changed_sources;
@@ -556,12 +555,12 @@ void EditorNode::save_resource_in_path(const Ref<Resource>& p_resource,const Str
editor_data.apply_changes_in_editors();
int flg=0;
- if (EditorSettings::get_singleton()->get("on_save/compress_binary_resources"))
+ if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources"))
flg|=ResourceSaver::FLAG_COMPRESS;
- //if (EditorSettings::get_singleton()->get("on_save/save_paths_as_relative"))
+ //if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative"))
// flg|=ResourceSaver::FLAG_RELATIVE_PATHS;
- String path = Globals::get_singleton()->localize_path(p_path);
+ String path = GlobalConfig::get_singleton()->localize_path(p_path);
Error err = ResourceSaver::save(path,p_resource,flg|ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS);
if (err!=OK) {
@@ -598,7 +597,7 @@ void EditorNode::save_resource_as(const Ref<Resource>& p_resource,const String&
List<String> preferred;
for(int i=0;i<extensions.size();i++) {
- if (p_resource->is_type("Script") && (extensions[i]=="tres" || extensions[i]=="res" || extensions[i]=="xml")) {
+ if (p_resource->is_class("Script") && (extensions[i]=="tres" || extensions[i]=="res" || extensions[i]=="xml")) {
//this serves no purpose and confused people
continue;
}
@@ -615,7 +614,7 @@ void EditorNode::save_resource_as(const Ref<Resource>& p_resource,const String&
file->set_current_file(p_resource->get_path().get_file());
} else {
if (extensions.size()) {
- file->set_current_file("new_"+p_resource->get_type().to_lower()+"."+preferred.front()->get().to_lower());
+ file->set_current_file("new_"+p_resource->get_class().to_lower()+"."+preferred.front()->get().to_lower());
} else {
file->set_current_file(String());
}
@@ -633,7 +632,7 @@ void EditorNode::save_resource_as(const Ref<Resource>& p_resource,const String&
String existing;
if (extensions.size()) {
- existing="new_"+p_resource->get_type().to_lower()+"."+preferred.front()->get().to_lower();
+ existing="new_"+p_resource->get_class().to_lower()+"."+preferred.front()->get().to_lower();
}
file->set_current_path(existing);
@@ -865,12 +864,12 @@ void EditorNode::_save_edited_subresources(Node* scene,Map<RES,bool>& processed,
void EditorNode::_find_node_types(Node* p_node, int&count_2d, int&count_3d) {
- if (p_node->is_type("Viewport") || (p_node!=editor_data.get_edited_scene_root() && p_node->get_owner()!=editor_data.get_edited_scene_root()))
+ if (p_node->is_class("Viewport") || (p_node!=editor_data.get_edited_scene_root() && p_node->get_owner()!=editor_data.get_edited_scene_root()))
return;
- if (p_node->is_type("CanvasItem"))
+ if (p_node->is_class("CanvasItem"))
count_2d++;
- else if (p_node->is_type("Spatial"))
+ else if (p_node->is_class("Spatial"))
count_3d++;
for(int i=0;i<p_node->get_child_count();i++)
@@ -910,11 +909,12 @@ 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);
- int preview_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size");;
+#if 0
+ Image img = VS::get_singleton()->viewport_texture(scree_capture(viewport);
+ int preview_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size");;
preview_size*=EDSCALE;
int width,height;
if (img.get_width() > preview_size && img.get_width() >= img.get_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);
@@ -1003,9 +1003,9 @@ void EditorNode::_save_scene(String p_file, int idx) {
sdata->set_import_metadata(editor_data.get_edited_scene_import_metadata(idx));
int flg=0;
- if (EditorSettings::get_singleton()->get("on_save/compress_binary_resources"))
+ if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources"))
flg|=ResourceSaver::FLAG_COMPRESS;
- //if (EditorSettings::get_singleton()->get("on_save/save_paths_as_relative"))
+ //if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative"))
// flg|=ResourceSaver::FLAG_RELATIVE_PATHS;
flg|=ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS;
@@ -1015,7 +1015,7 @@ void EditorNode::_save_scene(String p_file, int idx) {
_save_edited_subresources(scene,processed,flg);
editor_data.save_editor_external_data();
if (err==OK) {
- scene->set_filename( Globals::get_singleton()->localize_path(p_file) );
+ scene->set_filename( GlobalConfig::get_singleton()->localize_path(p_file) );
//EditorFileSystem::get_singleton()->update_file(p_file,sdata->get_type());
if (idx < 0 || idx == editor_data.get_edited_scene())
set_current_version(editor_data.get_undo_redo().get_version());
@@ -1059,7 +1059,7 @@ void EditorNode::_import_action(const String& p_action) {
EditorImport::generate_version_hashes(src);
- Node *dst = SceneLoader::load(editor_data.get_imported_scene(Globals::get_singleton()->localize_path(_tmp_import_path)));
+ Node *dst = SceneLoader::load(editor_data.get_imported_scene(GlobalConfig::get_singleton()->localize_path(_tmp_import_path)));
if (!dst) {
@@ -1167,9 +1167,8 @@ void EditorNode::_dialog_action(String p_file) {
} break;
case SETTINGS_PICK_MAIN_SCENE: {
- Globals::get_singleton()->set("application/main_scene",p_file);
- Globals::get_singleton()->set_persisting("application/main_scene",true);
- Globals::get_singleton()->save();
+ GlobalConfig::get_singleton()->set("application/main_scene",p_file);
+ GlobalConfig::get_singleton()->save();
//would be nice to show the project manager opened with the hilighted field..
} break;
case FILE_SAVE_OPTIMIZED: {
@@ -1246,7 +1245,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) {
@@ -1511,8 +1510,8 @@ void EditorNode::_prepare_history() {
already.insert(id);
Ref<Texture> icon = gui_base->get_icon("Object","EditorIcons");
- if (gui_base->has_icon(obj->get_type(),"EditorIcons"))
- icon=gui_base->get_icon(obj->get_type(),"EditorIcons");
+ if (gui_base->has_icon(obj->get_class(),"EditorIcons"))
+ icon=gui_base->get_icon(obj->get_class(),"EditorIcons");
else
icon=base_icon;
@@ -1524,12 +1523,12 @@ void EditorNode::_prepare_history() {
else if (r->get_name()!=String()) {
text=r->get_name();
} else {
- text=r->get_type();
+ text=r->get_class();
}
} else if (obj->cast_to<Node>()) {
text=obj->cast_to<Node>()->get_name();
} else {
- text=obj->get_type();
+ text=obj->get_class();
}
if (i==editor_history.get_history_pos()) {
@@ -1617,8 +1616,8 @@ void EditorNode::_edit_current() {
object_menu->set_disabled(true);
- bool is_resource = current_obj->is_type("Resource");
- bool is_node = current_obj->is_type("Node");
+ bool is_resource = current_obj->is_class("Resource");
+ bool is_node = current_obj->is_class("Node");
resource_save_button->set_disabled(!is_resource);
if (is_resource) {
@@ -1668,7 +1667,7 @@ void EditorNode::_edit_current() {
if (main_plugin) {
// special case if use of external editor is true
- if (main_plugin->get_name() == "Script" && bool(EditorSettings::get_singleton()->get("external_editor/use_external_editor"))){
+ if (main_plugin->get_name() == "Script" && bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor"))){
main_plugin->edit(current_obj);
}
@@ -1848,7 +1847,6 @@ void EditorNode::_run(bool p_current,const String& p_custom) {
run_filename=scene->get_filename();
} else {
- args=run_settings_dialog->get_custom_arguments();
current_filename=scene->get_filename();
}
@@ -1893,7 +1891,7 @@ void EditorNode::_run(bool p_current,const String& p_custom) {
}
- if (bool(EDITOR_DEF("run/auto_save_before_running",true))) {
+ if (bool(EDITOR_DEF("run/auto_save/save_before_running",true))) {
if (unsaved_cache) {
@@ -1923,9 +1921,14 @@ void EditorNode::_run(bool p_current,const String& p_custom) {
log->clear();
}
+ if (bool(EDITOR_DEF("run/always_open_output_on_play", true))) {
+ make_bottom_panel_item_visible(log);
+ }
List<String> breakpoints;
editor_data.get_editor_breakpoints(&breakpoints);
+
+ args = GlobalConfig::get_singleton()->get("editor/main_run_args");
Error error = editor_run.run(run_filename,args,breakpoints,current_filename);
@@ -2494,7 +2497,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
}
instanced_scene->generate_instance_state();
- instanced_scene->set_filename( Globals::get_singleton()->localize_path(external_file) );
+ instanced_scene->set_filename( GlobalConfig::get_singleton()->localize_path(external_file) );
editor_data.get_undo_redo().create_action("Instance Scene");
editor_data.get_undo_redo().add_do_method(parent,"add_child",instanced_scene);
@@ -2577,7 +2580,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
if (current) {
_editor_select(EDITOR_SCRIPT);
- emit_signal("request_help",current->get_type());
+ emit_signal("request_help",current->get_class());
}
@@ -2635,12 +2638,6 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
_set_editing_top_editors(current);
} break;
- case OBJECT_CALL_METHOD: {
-
- editor_data.apply_changes_in_editors();;
- call_dialog->set_object(current);
- call_dialog->popup_centered_ratio();
- } break;
case RUN_PLAY: {
_menu_option_confirm(RUN_STOP,true);
_call_build();
@@ -2685,7 +2682,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
} break;
case RUN_PLAY_NATIVE: {
- bool autosave = EDITOR_DEF("run/auto_save_before_running",true);
+ bool autosave = EDITOR_DEF("run/auto_save/save_before_running",true);
if (autosave) {
_menu_option_confirm(FILE_SAVE_ALL_SCENES, false);
}
@@ -3078,11 +3075,9 @@ void EditorNode::_update_addon_config() {
}
if (enabled_addons.size()==0) {
- Globals::get_singleton()->set("editor_plugins/enabled",Variant());
- Globals::get_singleton()->set_persisting("editor_plugins/enabled",false);
+ GlobalConfig::get_singleton()->set("editor_plugins/enabled",Variant());
} else {
- Globals::get_singleton()->set("editor_plugins/enabled",enabled_addons);
- Globals::get_singleton()->set_persisting("editor_plugins/enabled",true);
+ GlobalConfig::get_singleton()->set("editor_plugins/enabled",enabled_addons);
}
project_settings->queue_save();
@@ -3275,7 +3270,7 @@ Error EditorNode::save_translatable_strings(const String& p_to_file) {
OS::Time time = OS::get_singleton()->get_time();
f->store_line("# Translation Strings Dump.");
f->store_line("# Created By.");
- f->store_line("# \t" VERSION_FULL_NAME " (c) 2008-2016 Juan Linietsky, Ariel Manzur.");
+ f->store_line("# \t" VERSION_FULL_NAME " (c) 2008-2017 Juan Linietsky, Ariel Manzur.");
f->store_line("# From Scene: ");
f->store_line("# \t"+get_edited_scene()->get_filename());
f->store_line("");
@@ -3347,7 +3342,7 @@ Error EditorNode::save_optimized_copy(const String& p_scene,const String& p_pres
}
- String src_scene=Globals::get_singleton()->localize_path(get_edited_scene()->get_filename());
+ String src_scene=GlobalConfig::get_singleton()->localize_path(get_edited_scene()->get_filename());
String path=p_scene;
@@ -3358,13 +3353,13 @@ Error EditorNode::save_optimized_copy(const String& p_scene,const String& p_pres
print_line("rel path!?");
path=src_scene.get_base_dir()+"/"+path;
}
- path = Globals::get_singleton()->localize_path(path);
+ path = GlobalConfig::get_singleton()->localize_path(path);
print_line("path: "+path);
String preset = "optimizer_presets/"+p_preset;
- if (!Globals::get_singleton()->has(preset)) {
+ if (!GlobalConfig::get_singleton()->has(preset)) {
//accept->"()->hide();
accept->get_ok()->set_text("I see..");
@@ -3375,7 +3370,7 @@ Error EditorNode::save_optimized_copy(const String& p_scene,const String& p_pres
}
- Dictionary d = Globals::get_singleton()->get(preset);
+ Dictionary d = GlobalConfig::get_singleton()->get(preset);
ERR_FAIL_COND_V(!d.has("__type__"),ERR_INVALID_DATA);
String type=d["__type__"];
@@ -3464,8 +3459,8 @@ Dictionary EditorNode::_get_main_scene_state() {
Dictionary state;
state["main_tab"]=_get_current_main_editor();
- state["scene_tree_offset"]=scene_tree_dock->get_tree_editor()->get_scene_tree()->get_vscroll_bar()->get_val();
- state["property_edit_offset"]=get_property_editor()->get_scene_tree()->get_vscroll_bar()->get_val();
+ state["scene_tree_offset"]=scene_tree_dock->get_tree_editor()->get_scene_tree()->get_vscroll_bar()->get_value();
+ state["property_edit_offset"]=get_property_editor()->get_scene_tree()->get_vscroll_bar()->get_value();
state["saved_version"]=saved_version;
state["node_filter"]=scene_tree_dock->get_filter();
//print_line(" getting main tab: "+itos(state["main_tab"]));
@@ -3531,9 +3526,9 @@ void EditorNode::_set_main_scene_state(Dictionary p_state,Node* p_for_scene) {
if (p_state.has("scene_tree_offset"))
- scene_tree_dock->get_tree_editor()->get_scene_tree()->get_vscroll_bar()->set_val(p_state["scene_tree_offset"]);
+ scene_tree_dock->get_tree_editor()->get_scene_tree()->get_vscroll_bar()->set_value(p_state["scene_tree_offset"]);
if (p_state.has("property_edit_offset"))
- get_property_editor()->get_scene_tree()->get_vscroll_bar()->set_val(p_state["property_edit_offset"]);
+ get_property_editor()->get_scene_tree()->get_vscroll_bar()->set_value(p_state["property_edit_offset"]);
if (p_state.has("node_filter"))
scene_tree_dock->set_filter(p_state["node_filter"]);
@@ -3661,7 +3656,7 @@ Error EditorNode::load_scene(const String& p_scene, bool p_ignore_broken_deps,bo
if (p_clear_errors)
load_errors->clear();
- String lpath = Globals::get_singleton()->localize_path(p_scene);
+ String lpath = GlobalConfig::get_singleton()->localize_path(p_scene);
if (!lpath.begins_with("res://")) {
@@ -3750,7 +3745,7 @@ Error EditorNode::load_scene(const String& p_scene, bool p_ignore_broken_deps,bo
sdata->set_path(lpath,true); //take over path
}
- Node*new_scene=sdata->instance(true);
+ Node*new_scene=sdata->instance(PackedScene::GEN_EDIT_STATE_MAIN);
if (!new_scene) {
@@ -3952,7 +3947,7 @@ void EditorNode::animation_editor_make_visible(bool p_visible) {
#endif
void EditorNode::_add_to_recent_scenes(const String& p_scene) {
- String base="_"+Globals::get_singleton()->get_resource_path().replace("\\","::").replace("/","::");
+ String base="_"+GlobalConfig::get_singleton()->get_resource_path().replace("\\","::").replace("/","::");
Vector<String> rc = EDITOR_DEF(base+"/_recent_scenes",Array());
String name = p_scene;
name=name.replace("res://","");
@@ -3970,7 +3965,7 @@ void EditorNode::_add_to_recent_scenes(const String& p_scene) {
void EditorNode::_open_recent_scene(int p_idx) {
- String base="_"+Globals::get_singleton()->get_resource_path().replace("\\","::").replace("/","::");
+ String base="_"+GlobalConfig::get_singleton()->get_resource_path().replace("\\","::").replace("/","::");
Vector<String> rc = EDITOR_DEF(base+"/_recent_scenes",Array());
ERR_FAIL_INDEX(p_idx,rc.size());
@@ -4026,13 +4021,13 @@ void EditorNode::_save_optimized() {
}
- project_settings->add_remapped_path(Globals::get_singleton()->localize_path(get_edited_scene()->get_filename()),Globals::get_singleton()->localize_path(path),platform);
+ project_settings->add_remapped_path(GlobalConfig::get_singleton()->localize_path(get_edited_scene()->get_filename()),GlobalConfig::get_singleton()->localize_path(path),platform);
#endif
}
void EditorNode::_update_recent_scenes() {
- String base="_"+Globals::get_singleton()->get_resource_path().replace("\\","::").replace("/","::");
+ String base="_"+GlobalConfig::get_singleton()->get_resource_path().replace("\\","::").replace("/","::");
Vector<String> rc = EDITOR_DEF(base+"/_recent_scenes",Array());
recent_scenes->clear();
for(int i=0;i<rc.size();i++) {
@@ -4146,25 +4141,25 @@ bool EditorNode::is_scene_in_use(const String& p_path) {
void EditorNode::register_editor_types() {
- ObjectTypeDB::register_type<EditorPlugin>();
- ObjectTypeDB::register_type<EditorImportPlugin>();
- ObjectTypeDB::register_type<EditorExportPlugin>();
- ObjectTypeDB::register_type<EditorScenePostImport>();
- ObjectTypeDB::register_type<EditorScript>();
- ObjectTypeDB::register_type<EditorSelection>();
- ObjectTypeDB::register_type<EditorFileDialog>();
- //ObjectTypeDB::register_type<EditorImportExport>();
- ObjectTypeDB::register_type<EditorSettings>();
- ObjectTypeDB::register_type<EditorSpatialGizmo>();
- ObjectTypeDB::register_type<EditorResourcePreview>();
- ObjectTypeDB::register_type<EditorResourcePreviewGenerator>();
- ObjectTypeDB::register_type<EditorFileSystem>();
- ObjectTypeDB::register_type<EditorFileSystemDirectory>();
+ ClassDB::register_class<EditorPlugin>();
+ ClassDB::register_class<EditorImportPlugin>();
+ ClassDB::register_class<EditorExportPlugin>();
+ ClassDB::register_class<EditorScenePostImport>();
+ ClassDB::register_class<EditorScript>();
+ ClassDB::register_class<EditorSelection>();
+ ClassDB::register_class<EditorFileDialog>();
+ //ClassDB::register_type<EditorImportExport>();
+ ClassDB::register_class<EditorSettings>();
+ ClassDB::register_class<EditorSpatialGizmo>();
+ ClassDB::register_class<EditorResourcePreview>();
+ ClassDB::register_class<EditorResourcePreviewGenerator>();
+ ClassDB::register_class<EditorFileSystem>();
+ ClassDB::register_class<EditorFileSystemDirectory>();
- //ObjectTypeDB::register_type<EditorImporter>();
-// ObjectTypeDB::register_type<EditorPostImport>();
+ //ClassDB::register_type<EditorImporter>();
+// ClassDB::register_type<EditorPostImport>();
}
void EditorNode::unregister_editor_types() {
@@ -5085,7 +5080,7 @@ Variant EditorNode::drag_resource(const Ref<Resource>& p_res,Control* p_from) {
} else if (p_res->get_name()!="") {
label->set_text(p_res->get_name());
} else {
- label->set_text(p_res->get_type());
+ label->set_text(p_res->get_class());
}
@@ -5284,79 +5279,79 @@ void EditorNode::_call_build() {
void EditorNode::_bind_methods() {
- ObjectTypeDB::bind_method("_menu_option",&EditorNode::_menu_option);
- ObjectTypeDB::bind_method("_menu_confirm_current",&EditorNode::_menu_confirm_current);
- ObjectTypeDB::bind_method("_dialog_action",&EditorNode::_dialog_action);
- ObjectTypeDB::bind_method("_resource_selected",&EditorNode::_resource_selected,DEFVAL(""));
- ObjectTypeDB::bind_method("_property_editor_forward",&EditorNode::_property_editor_forward);
- ObjectTypeDB::bind_method("_property_editor_back",&EditorNode::_property_editor_back);
- ObjectTypeDB::bind_method("_editor_select",&EditorNode::_editor_select);
- ObjectTypeDB::bind_method("_node_renamed",&EditorNode::_node_renamed);
- ObjectTypeDB::bind_method("edit_node",&EditorNode::edit_node);
- ObjectTypeDB::bind_method("_imported",&EditorNode::_imported);
- ObjectTypeDB::bind_method("_unhandled_input",&EditorNode::_unhandled_input);
-
- ObjectTypeDB::bind_method("_get_scene_metadata",&EditorNode::_get_scene_metadata);
- ObjectTypeDB::bind_method("set_edited_scene",&EditorNode::set_edited_scene);
- ObjectTypeDB::bind_method("open_request",&EditorNode::open_request);
- ObjectTypeDB::bind_method("_instance_request",&EditorNode::_instance_request);
- ObjectTypeDB::bind_method("update_keying",&EditorNode::update_keying);
- ObjectTypeDB::bind_method("_property_keyed",&EditorNode::_property_keyed);
- ObjectTypeDB::bind_method("_transform_keyed",&EditorNode::_transform_keyed);
- ObjectTypeDB::bind_method("_close_messages",&EditorNode::_close_messages);
- ObjectTypeDB::bind_method("_show_messages",&EditorNode::_show_messages);
- ObjectTypeDB::bind_method("_vp_resized",&EditorNode::_vp_resized);
- ObjectTypeDB::bind_method("_quick_opened",&EditorNode::_quick_opened);
- ObjectTypeDB::bind_method("_quick_run",&EditorNode::_quick_run);
-
- ObjectTypeDB::bind_method("_resource_created",&EditorNode::_resource_created);
-
- ObjectTypeDB::bind_method("_import_action",&EditorNode::_import_action);
- //ObjectTypeDB::bind_method("_import",&EditorNode::_import);
-// ObjectTypeDB::bind_method("_import_conflicts_solved",&EditorNode::_import_conflicts_solved);
- ObjectTypeDB::bind_method("_open_recent_scene",&EditorNode::_open_recent_scene);
-// ObjectTypeDB::bind_method("_open_recent_scene_confirm",&EditorNode::_open_recent_scene_confirm);
-
- ObjectTypeDB::bind_method("_save_optimized",&EditorNode::_save_optimized);
-
- ObjectTypeDB::bind_method("stop_child_process",&EditorNode::stop_child_process);
-
- ObjectTypeDB::bind_method("_sources_changed",&EditorNode::_sources_changed);
- ObjectTypeDB::bind_method("_fs_changed",&EditorNode::_fs_changed);
- ObjectTypeDB::bind_method("_dock_select_draw",&EditorNode::_dock_select_draw);
- ObjectTypeDB::bind_method("_dock_select_input",&EditorNode::_dock_select_input);
- ObjectTypeDB::bind_method("_dock_pre_popup",&EditorNode::_dock_pre_popup);
- ObjectTypeDB::bind_method("_dock_split_dragged",&EditorNode::_dock_split_dragged);
- ObjectTypeDB::bind_method("_save_docks",&EditorNode::_save_docks);
- ObjectTypeDB::bind_method("_dock_popup_exit",&EditorNode::_dock_popup_exit);
- ObjectTypeDB::bind_method("_dock_move_left",&EditorNode::_dock_move_left);
- ObjectTypeDB::bind_method("_dock_move_right",&EditorNode::_dock_move_right);
-
- ObjectTypeDB::bind_method("_layout_menu_option",&EditorNode::_layout_menu_option);
-
- ObjectTypeDB::bind_method("set_current_scene",&EditorNode::set_current_scene);
- ObjectTypeDB::bind_method("set_current_version",&EditorNode::set_current_version);
- ObjectTypeDB::bind_method("_scene_tab_changed",&EditorNode::_scene_tab_changed);
- ObjectTypeDB::bind_method("_scene_tab_closed",&EditorNode::_scene_tab_closed);
- ObjectTypeDB::bind_method("_scene_tab_script_edited",&EditorNode::_scene_tab_script_edited);
- ObjectTypeDB::bind_method("_set_main_scene_state",&EditorNode::_set_main_scene_state);
- ObjectTypeDB::bind_method("_update_scene_tabs",&EditorNode::_update_scene_tabs);
-
- ObjectTypeDB::bind_method("_prepare_history",&EditorNode::_prepare_history);
- ObjectTypeDB::bind_method("_select_history",&EditorNode::_select_history);
-
- ObjectTypeDB::bind_method("_toggle_search_bar",&EditorNode::_toggle_search_bar);
- ObjectTypeDB::bind_method("_clear_search_box",&EditorNode::_clear_search_box);
- ObjectTypeDB::bind_method("_clear_undo_history",&EditorNode::_clear_undo_history);
- ObjectTypeDB::bind_method("_dropped_files",&EditorNode::_dropped_files);
- ObjectTypeDB::bind_method("_toggle_distraction_free_mode",&EditorNode::_toggle_distraction_free_mode);
-
-
-
- ObjectTypeDB::bind_method(_MD("add_editor_import_plugin", "plugin"), &EditorNode::add_editor_import_plugin);
- ObjectTypeDB::bind_method(_MD("remove_editor_import_plugin", "plugin"), &EditorNode::remove_editor_import_plugin);
- ObjectTypeDB::bind_method(_MD("get_gui_base"), &EditorNode::get_gui_base);
- ObjectTypeDB::bind_method(_MD("_bottom_panel_switch"), &EditorNode::_bottom_panel_switch);
+ ClassDB::bind_method("_menu_option",&EditorNode::_menu_option);
+ ClassDB::bind_method("_menu_confirm_current",&EditorNode::_menu_confirm_current);
+ ClassDB::bind_method("_dialog_action",&EditorNode::_dialog_action);
+ ClassDB::bind_method("_resource_selected",&EditorNode::_resource_selected,DEFVAL(""));
+ ClassDB::bind_method("_property_editor_forward",&EditorNode::_property_editor_forward);
+ ClassDB::bind_method("_property_editor_back",&EditorNode::_property_editor_back);
+ ClassDB::bind_method("_editor_select",&EditorNode::_editor_select);
+ ClassDB::bind_method("_node_renamed",&EditorNode::_node_renamed);
+ ClassDB::bind_method("edit_node",&EditorNode::edit_node);
+ ClassDB::bind_method("_imported",&EditorNode::_imported);
+ ClassDB::bind_method("_unhandled_input",&EditorNode::_unhandled_input);
+
+ ClassDB::bind_method("_get_scene_metadata",&EditorNode::_get_scene_metadata);
+ ClassDB::bind_method("set_edited_scene",&EditorNode::set_edited_scene);
+ ClassDB::bind_method("open_request",&EditorNode::open_request);
+ ClassDB::bind_method("_instance_request",&EditorNode::_instance_request);
+ ClassDB::bind_method("update_keying",&EditorNode::update_keying);
+ ClassDB::bind_method("_property_keyed",&EditorNode::_property_keyed);
+ ClassDB::bind_method("_transform_keyed",&EditorNode::_transform_keyed);
+ ClassDB::bind_method("_close_messages",&EditorNode::_close_messages);
+ ClassDB::bind_method("_show_messages",&EditorNode::_show_messages);
+ ClassDB::bind_method("_vp_resized",&EditorNode::_vp_resized);
+ ClassDB::bind_method("_quick_opened",&EditorNode::_quick_opened);
+ ClassDB::bind_method("_quick_run",&EditorNode::_quick_run);
+
+ ClassDB::bind_method("_resource_created",&EditorNode::_resource_created);
+
+ ClassDB::bind_method("_import_action",&EditorNode::_import_action);
+ //ClassDB::bind_method("_import",&EditorNode::_import);
+// ClassDB::bind_method("_import_conflicts_solved",&EditorNode::_import_conflicts_solved);
+ ClassDB::bind_method("_open_recent_scene",&EditorNode::_open_recent_scene);
+// ClassDB::bind_method("_open_recent_scene_confirm",&EditorNode::_open_recent_scene_confirm);
+
+ ClassDB::bind_method("_save_optimized",&EditorNode::_save_optimized);
+
+ ClassDB::bind_method("stop_child_process",&EditorNode::stop_child_process);
+
+ ClassDB::bind_method("_sources_changed",&EditorNode::_sources_changed);
+ ClassDB::bind_method("_fs_changed",&EditorNode::_fs_changed);
+ ClassDB::bind_method("_dock_select_draw",&EditorNode::_dock_select_draw);
+ ClassDB::bind_method("_dock_select_input",&EditorNode::_dock_select_input);
+ ClassDB::bind_method("_dock_pre_popup",&EditorNode::_dock_pre_popup);
+ ClassDB::bind_method("_dock_split_dragged",&EditorNode::_dock_split_dragged);
+ ClassDB::bind_method("_save_docks",&EditorNode::_save_docks);
+ ClassDB::bind_method("_dock_popup_exit",&EditorNode::_dock_popup_exit);
+ ClassDB::bind_method("_dock_move_left",&EditorNode::_dock_move_left);
+ ClassDB::bind_method("_dock_move_right",&EditorNode::_dock_move_right);
+
+ ClassDB::bind_method("_layout_menu_option",&EditorNode::_layout_menu_option);
+
+ ClassDB::bind_method("set_current_scene",&EditorNode::set_current_scene);
+ ClassDB::bind_method("set_current_version",&EditorNode::set_current_version);
+ ClassDB::bind_method("_scene_tab_changed",&EditorNode::_scene_tab_changed);
+ ClassDB::bind_method("_scene_tab_closed",&EditorNode::_scene_tab_closed);
+ ClassDB::bind_method("_scene_tab_script_edited",&EditorNode::_scene_tab_script_edited);
+ ClassDB::bind_method("_set_main_scene_state",&EditorNode::_set_main_scene_state);
+ ClassDB::bind_method("_update_scene_tabs",&EditorNode::_update_scene_tabs);
+
+ ClassDB::bind_method("_prepare_history",&EditorNode::_prepare_history);
+ ClassDB::bind_method("_select_history",&EditorNode::_select_history);
+
+ ClassDB::bind_method("_toggle_search_bar",&EditorNode::_toggle_search_bar);
+ ClassDB::bind_method("_clear_search_box",&EditorNode::_clear_search_box);
+ ClassDB::bind_method("_clear_undo_history",&EditorNode::_clear_undo_history);
+ ClassDB::bind_method("_dropped_files",&EditorNode::_dropped_files);
+ ClassDB::bind_method("_toggle_distraction_free_mode",&EditorNode::_toggle_distraction_free_mode);
+
+
+
+ ClassDB::bind_method(_MD("add_editor_import_plugin", "plugin"), &EditorNode::add_editor_import_plugin);
+ ClassDB::bind_method(_MD("remove_editor_import_plugin", "plugin"), &EditorNode::remove_editor_import_plugin);
+ ClassDB::bind_method(_MD("get_gui_base"), &EditorNode::get_gui_base);
+ ClassDB::bind_method(_MD("_bottom_panel_switch"), &EditorNode::_bottom_panel_switch);
ADD_SIGNAL( MethodInfo("play_pressed") );
@@ -5370,8 +5365,17 @@ void EditorNode::_bind_methods() {
}
+static Node* _resource_get_edited_scene() {
+
+ return EditorNode::get_singleton()->get_edited_scene();
+}
+
EditorNode::EditorNode() {
+ Resource::_get_local_scene_func=_resource_get_edited_scene;
+
+ 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
@@ -5406,7 +5410,7 @@ EditorNode::EditorNode() {
bool use_single_dock_column = false;
{
- int dpi_mode = EditorSettings::get_singleton()->get("global/hidpi_mode");
+ int dpi_mode = EditorSettings::get_singleton()->get("interface/hidpi_mode");
if (dpi_mode==0) {
editor_set_scale( OS::get_singleton()->get_screen_dpi(0) > 150 && OS::get_singleton()->get_screen_size(OS::get_singleton()->get_current_screen()).x>2000 ? 2.0 : 1.0 );
@@ -5425,9 +5429,9 @@ EditorNode::EditorNode() {
ResourceLoader::set_abort_on_missing_resources(false);
- FileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("file_dialog/show_hidden_files"));
- EditorFileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("file_dialog/show_hidden_files"));
- EditorFileDialog::set_default_display_mode((EditorFileDialog::DisplayMode)EditorSettings::get_singleton()->get("file_dialog/display_mode").operator int());
+ FileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("filesystem/file_dialog/show_hidden_files"));
+ EditorFileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("filesystem/file_dialog/show_hidden_files"));
+ EditorFileDialog::set_default_display_mode((EditorFileDialog::DisplayMode)EditorSettings::get_singleton()->get("filesystem/file_dialog/display_mode").operator int());
ResourceLoader::set_error_notify_func(this,_load_error_notify);
ResourceLoader::set_dependency_error_notify_func(this,_dependency_error_report);
@@ -5458,11 +5462,11 @@ EditorNode::EditorNode() {
editor_import_export->load_config();
- GLOBAL_DEF("editor/main_run_args","$exec -path $path -scene $scene $main_scene");
+ GLOBAL_DEF("editor/main_run_args","$scene");
- ObjectTypeDB::set_type_enabled("CollisionShape",true);
- ObjectTypeDB::set_type_enabled("CollisionShape2D",true);
- ObjectTypeDB::set_type_enabled("CollisionPolygon2D",true);
+ ClassDB::set_class_enabled("CollisionShape",true);
+ ClassDB::set_class_enabled("CollisionShape2D",true);
+ ClassDB::set_class_enabled("CollisionPolygon2D",true);
Control *theme_base = memnew( Control );
add_child(theme_base);
@@ -5615,14 +5619,14 @@ EditorNode::EditorNode() {
dock_select = memnew( Control );
dock_select->set_custom_minimum_size(Size2(128,64)*EDSCALE);
- dock_select->connect("input_event",this,"_dock_select_input");
+ dock_select->connect("gui_input",this,"_dock_select_input");
dock_select->connect("draw",this,"_dock_select_draw");
dock_select->connect("mouse_exit",this,"_dock_popup_exit");
dock_select->set_v_size_flags(Control::SIZE_EXPAND_FILL);
dock_vb->add_child(dock_select);
- dock_select_popoup->set_child_rect(dock_vb);
+
dock_select_popoup->set_as_minsize();
dock_select_rect_over=-1;
dock_popup_selected=-1;
@@ -5661,7 +5665,7 @@ EditorNode::EditorNode() {
scene_tabs=memnew( Tabs );
scene_tabs->add_tab("unsaved");
scene_tabs->set_tab_align(Tabs::ALIGN_CENTER);
- scene_tabs->set_tab_close_display_policy( (bool(EDITOR_DEF("global/always_show_close_button_in_scene_tabs", false)) ? Tabs::CLOSE_BUTTON_SHOW_ALWAYS : Tabs::CLOSE_BUTTON_SHOW_ACTIVE_ONLY) );
+ scene_tabs->set_tab_close_display_policy( (bool(EDITOR_DEF("interface/always_show_close_button_in_scene_tabs", false)) ? Tabs::CLOSE_BUTTON_SHOW_ALWAYS : Tabs::CLOSE_BUTTON_SHOW_ACTIVE_ONLY) );
scene_tabs->connect("tab_changed",this,"_scene_tab_changed");
scene_tabs->connect("right_button_pressed",this,"_scene_tab_script_edited");
scene_tabs->connect("tab_close", this, "_scene_tab_closed");
@@ -5672,6 +5676,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);
@@ -5685,6 +5690,8 @@ EditorNode::EditorNode() {
scene_root = memnew( Viewport );
+ scene_root->set_disable_3d(true);
+
//scene_root_base->add_child(scene_root);
@@ -5692,7 +5699,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(GlobalConfig::get_singleton()->get("display/width"),GlobalConfig::get_singleton()->get("display/height")));
// scene_root->set_world_2d( Ref<World2D>( memnew( World2D )) );
@@ -5705,6 +5712,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 );
@@ -5764,11 +5772,11 @@ EditorNode::EditorNode() {
pm_export->add_separator();
pm_export->add_shortcut(ED_SHORTCUT("editor/convert_to_MeshLibrary", TTR("MeshLibrary..")), FILE_EXPORT_MESH_LIBRARY);
pm_export->add_shortcut(ED_SHORTCUT("editor/convert_to_TileSet", TTR("TileSet..")), FILE_EXPORT_TILESET);
- pm_export->connect("item_pressed",this,"_menu_option");
+ pm_export->connect("id_pressed",this,"_menu_option");
p->add_separator();
- p->add_item(TTR("Undo"),EDIT_UNDO,KEY_MASK_CMD+KEY_Z);
- p->add_item(TTR("Redo"),EDIT_REDO,KEY_MASK_CMD+KEY_MASK_SHIFT+KEY_Z);
+ p->add_shortcut(ED_SHORTCUT("editor/undo", TTR("Undo"),KEY_MASK_CMD+KEY_Z),EDIT_UNDO,true);
+ p->add_shortcut(ED_SHORTCUT("editor/redo", TTR("Redo"),KEY_MASK_SHIFT+KEY_MASK_CMD+KEY_Z),EDIT_REDO,true);
p->add_separator();
p->add_item(TTR("Run Script"),FILE_RUN_SCRIPT,KEY_MASK_SHIFT+KEY_MASK_CMD+KEY_R);
p->add_separator();
@@ -5786,7 +5794,7 @@ EditorNode::EditorNode() {
recent_scenes = memnew( PopupMenu );
recent_scenes->set_name("RecentScenes");
p->add_child(recent_scenes);
- recent_scenes->connect("item_pressed",this,"_open_recent_scene");
+ recent_scenes->connect("id_pressed",this,"_open_recent_scene");
{
Control *sp = memnew( Control );
@@ -5843,7 +5851,7 @@ EditorNode::EditorNode() {
left_menu_hb->add_child( import_menu );
p=import_menu->get_popup();
- p->connect("item_pressed",this,"_menu_option");
+ p->connect("id_pressed",this,"_menu_option");
tool_menu = memnew( MenuButton );
tool_menu->set_tooltip(TTR("Miscellaneous project or scene-wide tools."));
@@ -5853,7 +5861,7 @@ EditorNode::EditorNode() {
left_menu_hb->add_child( tool_menu );
p=tool_menu->get_popup();
- p->connect("item_pressed",this,"_menu_option");
+ p->connect("id_pressed",this,"_menu_option");
p->add_item(TTR("Orphan Resource Explorer"),TOOLS_ORPHAN_RESOURCES);
export_button = memnew( ToolButton );
@@ -5872,7 +5880,7 @@ EditorNode::EditorNode() {
play_cc = memnew( CenterContainer );
- play_cc->set_ignore_mouse(true);
+ play_cc->set_mouse_filter(Control::MOUSE_FILTER_IGNORE);
gui_base->add_child( play_cc );
play_cc->set_area_as_parent_rect();
play_cc->set_anchor_and_margin(MARGIN_BOTTOM,Control::ANCHOR_BEGIN,10);
@@ -5923,7 +5931,7 @@ EditorNode::EditorNode() {
native_play_button->set_text("NTV");
menu_hb->add_child(native_play_button);
native_play_button->hide();
- native_play_button->get_popup()->connect("item_pressed",this,"_run_in_device");
+ native_play_button->get_popup()->connect("id_pressed",this,"_run_in_device");
run_native->connect("native_run",this,"_menu_option",varray(RUN_PLAY_NATIVE));
// VSeparator *s1 = memnew( VSeparator );
@@ -5957,6 +5965,7 @@ EditorNode::EditorNode() {
debug_button->set_tooltip(TTR("Debug options"));
p=debug_button->get_popup();
+ p->set_hide_on_item_selection(false);
p->add_check_item(TTR("Deploy with Remote Debug"),RUN_DEPLOY_REMOTE_DEBUG);
p->set_item_tooltip(p->get_item_count()-1,TTR("When exporting or deploying, the resulting executable will attempt to connect to the IP of this computer in order to be debugged."));
p->add_check_item(TTR("Small Deploy with Network FS"),RUN_FILE_SERVER);
@@ -5971,7 +5980,7 @@ EditorNode::EditorNode() {
p->set_item_tooltip(p->get_item_count()-1,TTR("When this option is turned on, any changes made to the scene in the editor will be replicated in the running game.\nWhen used remotely on a device, this is more efficient with network filesystem."));
p->add_check_item(TTR("Sync Script Changes"),RUN_RELOAD_SCRIPTS);
p->set_item_tooltip(p->get_item_count()-1,TTR("When this option is turned on, any script that is saved will be reloaded on the running game.\nWhen used remotely on a device, this is more efficient with network filesystem."));
- p->connect("item_pressed",this,"_menu_option");
+ p->connect("id_pressed",this,"_menu_option");
/*
run_settings_button = memnew( ToolButton );
@@ -6015,7 +6024,7 @@ EditorNode::EditorNode() {
audio_vu->set_max(24);
audio_vu->set_min(-80);
audio_vu->set_step(0.01);
- audio_vu->set_val(0);
+ audio_vu->set_value(0);
{
Control *sp = memnew( Control );
@@ -6045,7 +6054,7 @@ EditorNode::EditorNode() {
editor_layouts = memnew( PopupMenu );
editor_layouts->set_name("Layouts");
p->add_child(editor_layouts);
- editor_layouts->connect("item_pressed",this,"_layout_menu_option");
+ editor_layouts->connect("id_pressed",this,"_layout_menu_option");
p->add_submenu_item(TTR("Editor Layout"), "Layouts");
p->add_shortcut(ED_SHORTCUT("editor/fullscreen_mode",TTR("Toggle Fullscreen"),KEY_MASK_SHIFT|KEY_F11),SETTINGS_TOGGLE_FULLSCREN);
@@ -6157,7 +6166,7 @@ EditorNode::EditorNode() {
prop_editor_hb->add_child(resource_save_button);
resource_save_button->get_popup()->add_item(TTR("Save"),RESOURCE_SAVE);
resource_save_button->get_popup()->add_item(TTR("Save As.."),RESOURCE_SAVE_AS);
- resource_save_button->get_popup()->connect("item_pressed",this,"_menu_option");
+ resource_save_button->get_popup()->connect("id_pressed",this,"_menu_option");
resource_save_button->set_focus_mode(Control::FOCUS_NONE);
resource_save_button->set_disabled(true);
@@ -6185,7 +6194,7 @@ EditorNode::EditorNode() {
editor_history_menu->set_icon( gui_base->get_icon("History","EditorIcons"));
prop_editor_hb->add_child(editor_history_menu);
editor_history_menu->connect("about_to_show",this,"_prepare_history");
- editor_history_menu->get_popup()->connect("item_pressed",this,"_select_history");
+ editor_history_menu->get_popup()->connect("id_pressed",this,"_select_history");
prop_editor_hb = memnew( HBoxContainer ); //again...
@@ -6252,7 +6261,7 @@ EditorNode::EditorNode() {
scenes_dock = memnew( FileSystemDock(this) );
scenes_dock->set_name(TTR("FileSystem"));
- scenes_dock->set_display_mode(int(EditorSettings::get_singleton()->get("filesystem_dock/display_mode")));
+ scenes_dock->set_display_mode(int(EditorSettings::get_singleton()->get("docks/filesystem/display_mode")));
if (use_single_dock_column) {
dock_slot[DOCK_SLOT_RIGHT_BL]->add_child(scenes_dock);
@@ -6338,9 +6347,7 @@ EditorNode::EditorNode() {
- call_dialog = memnew( CallDialog );
- call_dialog->hide();
- gui_base->add_child( call_dialog );
+
@@ -6421,7 +6428,7 @@ EditorNode::EditorNode() {
about->get_ok()->set_text(TTR("Thanks!"));
about->set_hide_on_ok(true);
Label *about_text = memnew( Label );
- about_text->set_text(VERSION_FULL_NAME"\n(c) 2008-2016 Juan Linietsky, Ariel Manzur.\n");
+ about_text->set_text(VERSION_FULL_NAME"\n(c) 2008-2017 Juan Linietsky, Ariel Manzur.\n");
about_text->set_pos(Point2(gui_base->get_icon("Logo","EditorIcons")->get_size().width+30,20));
gui_base->add_child(about);
about->add_child(about_text);
@@ -6496,11 +6503,11 @@ EditorNode::EditorNode() {
- file_menu->get_popup()->connect("item_pressed", this,"_menu_option");
- object_menu->get_popup()->connect("item_pressed", this,"_menu_option");
+ file_menu->get_popup()->connect("id_pressed", this,"_menu_option");
+ object_menu->get_popup()->connect("id_pressed", this,"_menu_option");
- update_menu->get_popup()->connect("item_pressed", this,"_menu_option");
- settings_menu->get_popup()->connect("item_pressed", this,"_menu_option");
+ update_menu->get_popup()->connect("id_pressed", this,"_menu_option");
+ settings_menu->get_popup()->connect("id_pressed", this,"_menu_option");
file->connect("file_selected", this,"_dialog_action");
@@ -6549,10 +6556,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) ) );
@@ -6561,31 +6569,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) );
@@ -6594,14 +6603,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();
@@ -6621,8 +6630,8 @@ EditorNode::EditorNode() {
Physics2DServer::get_singleton()->set_active(false); // no physics by default if editor
ScriptServer::set_scripting_enabled(false); // no scripting by default if editor
- Globals::get_singleton()->set("debug/indicators_enabled",true);
- Globals::get_singleton()->set("render/room_cull_enabled",false);
+
+// GlobalConfig::get_singleton()->set("render/room_cull_enabled",false);
reference_resource_mem=true;
save_external_resources_mem=true;
@@ -6636,7 +6645,7 @@ EditorNode::EditorNode() {
//store project name in ssettings
String project_name;
//figure it out from path
- project_name=Globals::get_singleton()->get_resource_path().replace("\\","/");
+ project_name=GlobalConfig::get_singleton()->get_resource_path().replace("\\","/");
print_line("path: "+project_name);
if (project_name.length() && project_name[project_name.length()-1]=='/')
project_name=project_name.substr(0,project_name.length()-1);
@@ -6644,7 +6653,7 @@ EditorNode::EditorNode() {
project_name=project_name.replace("/","::");
if (project_name!="") {
- EditorSettings::get_singleton()->set("projects/"+project_name,Globals::get_singleton()->get_resource_path());
+ EditorSettings::get_singleton()->set("projects/"+project_name,GlobalConfig::get_singleton()->get_resource_path());
EditorSettings::get_singleton()->raise_order("projects/"+project_name);
EditorSettings::get_singleton()->save();
}
@@ -6681,9 +6690,10 @@ EditorNode::EditorNode() {
load_error_dialog = memnew( AcceptDialog );
load_error_dialog->add_child(load_errors);
load_error_dialog->set_title(TTR("Load Errors"));
- load_error_dialog->set_child_rect(load_errors);
+ //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");
@@ -6696,7 +6706,7 @@ EditorNode::EditorNode() {
theme_base->get_theme()->get_icon_list(ei,&tl);
for(List<StringName>::Element *E=tl.front();E;E=E->next()) {
- if (!ObjectTypeDB::type_exists(E->get()))
+ if (!ClassDB::class_exists(E->get()))
continue;
icon_type_cache[E->get()]=theme_base->get_theme()->get_icon(E->get(),ei);
}
@@ -6725,7 +6735,7 @@ EditorNode::EditorNode() {
{
_initializing_addons=true;
- Vector<String> addons = Globals::get_singleton()->get("editor_plugins/enabled");
+ Vector<String> addons = GlobalConfig::get_singleton()->get("editor_plugins/enabled");
for(int i=0;i<addons.size();i++) {
set_addon_plugin_enabled(addons[i],true);
@@ -6774,12 +6784,12 @@ void EditorPluginList::edit(Object* p_object) {
}
-bool EditorPluginList::forward_input_event(const Matrix32& p_canvas_xform,const InputEvent& p_event) {
+bool EditorPluginList::forward_gui_input(const Matrix32& p_canvas_xform,const InputEvent& p_event) {
bool discard = false;
for (int i = 0; i < plugins_list.size(); i++) {
- if (plugins_list[i]->forward_canvas_input_event(p_canvas_xform,p_event)) {
+ if (plugins_list[i]->forward_canvas_gui_input(p_canvas_xform,p_event)) {
discard = true;
}
}
@@ -6787,11 +6797,11 @@ bool EditorPluginList::forward_input_event(const Matrix32& p_canvas_xform,const
return discard;
}
-bool EditorPluginList::forward_spatial_input_event(Camera* p_camera, const InputEvent& p_event) {
+bool EditorPluginList::forward_spatial_gui_input(Camera* p_camera, const InputEvent& p_event) {
bool discard = false;
for (int i = 0; i < plugins_list.size(); i++) {
- if (plugins_list[i]->forward_spatial_input_event(p_camera, p_event)) {
+ if (plugins_list[i]->forward_spatial_gui_input(p_camera, p_event)) {
discard = true;
}
}
diff --git a/tools/editor/editor_node.h b/tools/editor/editor_node.h
index 6392b96f8f..fcfd5ca389 100644
--- a/tools/editor/editor_node.h
+++ b/tools/editor/editor_node.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -79,7 +79,7 @@
#include "fileserver/editor_file_server.h"
#include "editor_resource_preview.h"
-
+#include "scene/gui/viewport_container.h"
#include "progress_dialog.h"
@@ -101,7 +101,7 @@ class EditorPluginList;
class EditorNode : public Node {
- OBJ_TYPE( EditorNode, Node );
+ GDCLASS( EditorNode, Node );
public:
enum DockSlot {
@@ -159,7 +159,6 @@ private:
OBJECT_COPY_PARAMS,
OBJECT_PASTE_PARAMS,
OBJECT_UNIQUE_RESOURCES,
- OBJECT_CALL_METHOD,
OBJECT_REQUEST_HELP,
RUN_PLAY,
@@ -208,7 +207,7 @@ private:
//Ref<ResourceImportMetadata> scene_import_metadata;
- Control* scene_root_parent;
+ PanelContainer* scene_root_parent;
Control *gui_base;
VBoxContainer *main_vbox;
@@ -287,7 +286,7 @@ private:
CreateDialog *create_dialog;
- CallDialog *call_dialog;
+// CallDialog *call_dialog;
ConfirmationDialog *confirmation;
ConfirmationDialog *import_confirmation;
ConfirmationDialog *open_recent_confirmation;
@@ -793,8 +792,8 @@ public:
void make_visible(bool p_visible);
void edit(Object *p_object);
- bool forward_input_event(const Matrix32& p_canvas_xform,const InputEvent& p_event);
- bool forward_spatial_input_event(Camera* p_camera, const InputEvent& p_event);
+ bool forward_gui_input(const Matrix32& p_canvas_xform,const InputEvent& p_event);
+ bool forward_spatial_gui_input(Camera* p_camera, const InputEvent& p_event);
void forward_draw_over_canvas(const Matrix32& p_canvas_xform,Control* p_canvas);
void clear();
bool empty();
diff --git a/tools/editor/editor_path.cpp b/tools/editor/editor_path.cpp
index 6b804b6a24..b359522e4f 100644
--- a/tools/editor/editor_path.cpp
+++ b/tools/editor/editor_path.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -27,33 +27,106 @@
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/*************************************************************************/
#include "editor_path.h"
+#include "editor_scale.h"
+#include "editor_node.h"
+void EditorPath::_add_children_to_popup(Object* p_obj,int p_depth) {
+
+ if (p_depth>8)
+ return;
+
+ List<PropertyInfo> pinfo;
+ p_obj->get_property_list(&pinfo);
+ for (List<PropertyInfo>::Element *E=pinfo.front();E;E=E->next()) {
+
+ if (!(E->get().usage&PROPERTY_USAGE_EDITOR))
+ continue;
+ if (E->get().hint!=PROPERTY_HINT_RESOURCE_TYPE)
+ continue;
+
+ Variant value = p_obj->get(E->get().name);
+ if (value.get_type()!=Variant::OBJECT)
+ continue;
+ Object *obj = value;
+ if (!obj)
+ continue;
+
+ Ref<Texture> icon;
+
+ if (has_icon(obj->get_class(),"EditorIcons"))
+ icon=get_icon(obj->get_class(),"EditorIcons");
+ else
+ icon=get_icon("Object","EditorIcons");
+
+ int index = popup->get_item_count();
+ popup->add_icon_item(icon,E->get().name.capitalize(),objects.size());
+ popup->set_item_h_offset(index,p_depth*10*EDSCALE);
+ objects.push_back(obj->get_instance_ID());
+
+ _add_children_to_popup(obj,p_depth+1);
+ }
+}
+
+void EditorPath::_gui_input(const InputEvent& p_event) {
+
+ if (p_event.type==InputEvent::MOUSE_BUTTON && p_event.mouse_button.button_index==BUTTON_LEFT && p_event.mouse_button.pressed) {
+
+
+ Object *obj = ObjectDB::get_instance(history->get_path_object( history->get_path_size()-1));
+ if (!obj)
+ return;
+
+
+
+ objects.clear();
+ popup->clear();
+ _add_children_to_popup(obj);
+ popup->set_pos( get_global_pos() + Vector2(0,get_size().height));
+ popup->set_size( Size2(get_size().width,1));
+ popup->popup();
+ }
+}
void EditorPath::_notification(int p_what) {
switch(p_what) {
+ case NOTIFICATION_MOUSE_ENTER: {
+ mouse_over=true;
+ update();
+ } break;
+ case NOTIFICATION_MOUSE_EXIT: {
+ mouse_over=false;
+ update();
+ } break;
case NOTIFICATION_DRAW: {
RID ci=get_canvas_item();
Ref<Font> label_font = get_font("font","Label");
Size2i size = get_size();
Ref<Texture> sn = get_icon("SmallNext","EditorIcons");
+ Ref<StyleBox> sb = get_stylebox("pressed","Button");
+
+
+ int ofs=sb->get_margin(MARGIN_LEFT);
+
+ if (mouse_over) {
+ draw_style_box(sb,Rect2(Point2(),get_size()));
+ }
- int ofs=5;
for(int i=0;i<history->get_path_size();i++) {
Object *obj = ObjectDB::get_instance(history->get_path_object(i));
if (!obj)
continue;
- String type = obj->get_type();
+ String type = obj->get_class();
Ref<Texture> icon;
- if (has_icon(obj->get_type(),"EditorIcons"))
- icon=get_icon(obj->get_type(),"EditorIcons");
+ if (has_icon(obj->get_class(),"EditorIcons"))
+ icon=get_icon(obj->get_class(),"EditorIcons");
else
icon=get_icon("Object","EditorIcons");
@@ -78,17 +151,17 @@ void EditorPath::_notification(int p_what) {
name=r->get_name();
if (name=="")
- name=r->get_type();
+ name=r->get_class();
} else if (obj->cast_to<Node>()) {
name=obj->cast_to<Node>()->get_name();
} else if (obj->cast_to<Resource>() && obj->cast_to<Resource>()->get_name()!="") {
name=obj->cast_to<Resource>()->get_name();
} else {
- name=obj->get_type();
+ name=obj->get_class();
}
- set_tooltip(obj->get_type());
+ set_tooltip(obj->get_class());
label_font->draw(ci,Point2i(ofs,(size.height-label_font->get_height())/2+label_font->get_ascent()),name,Color(1,1,1),left);
@@ -108,11 +181,34 @@ void EditorPath::_notification(int p_what) {
void EditorPath::update_path() {
+
update();
}
+void EditorPath::_popup_select(int p_idx) {
+
+ ERR_FAIL_INDEX(p_idx,objects.size());
+
+ Object* obj = ObjectDB::get_instance(objects[p_idx]);
+ if (!obj)
+ return;
+
+ EditorNode::get_singleton()->push_item(obj);
+}
+
+void EditorPath::_bind_methods() {
+
+ ClassDB::bind_method("_gui_input",&EditorPath::_gui_input);
+ ClassDB::bind_method("_popup_select",&EditorPath::_popup_select);
+}
+
EditorPath::EditorPath(EditorHistory *p_history) {
history=p_history;
+ mouse_over=false;
+ popup = memnew( PopupMenu );
+ popup->connect("id_pressed",this,"_popup_select");
+ add_child(popup);
+
}
diff --git a/tools/editor/editor_path.h b/tools/editor/editor_path.h
index 11e1005ba3..fd5b469d07 100644
--- a/tools/editor/editor_path.h
+++ b/tools/editor/editor_path.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -30,19 +30,27 @@
#define EDITOR_PATH_H
#include "scene/gui/control.h"
+#include "scene/gui/popup_menu.h"
#include "editor_data.h"
class EditorPath : public Control {
- OBJ_TYPE(EditorPath,Control);
+ GDCLASS(EditorPath,Control);
EditorHistory *history;
+ Vector<ObjectID> objects;
+ PopupMenu *popup;
+ bool mouse_over;
EditorPath();
+ void _popup_select(int p_idx);
+ void _gui_input(const InputEvent& p_event);
+ void _add_children_to_popup(Object* p_obj,int p_depth=0);
protected:
+ static void _bind_methods();
void _notification(int p_what);
public:
diff --git a/tools/editor/editor_plugin.cpp b/tools/editor/editor_plugin.cpp
index 4b82d5e59c..5722fc556a 100644
--- a/tools/editor/editor_plugin.cpp
+++ b/tools/editor/editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -76,6 +76,11 @@ Control * EditorPlugin::get_editor_viewport() {
return EditorNode::get_singleton()->get_viewport();
}
+void EditorPlugin::edit_resource(const Ref<Resource>& p_resource){
+
+ EditorNode::get_singleton()->edit_resource(p_resource);
+}
+
void EditorPlugin::add_control_to_container(CustomControlContainer p_location,Control *p_control) {
switch(p_location) {
@@ -136,10 +141,10 @@ Ref<SpatialEditorGizmo> EditorPlugin::create_spatial_gizmo(Spatial* p_spatial) {
return Ref<SpatialEditorGizmo>();
}
-bool EditorPlugin::forward_canvas_input_event(const Matrix32& p_canvas_xform,const InputEvent& p_event) {
+bool EditorPlugin::forward_canvas_gui_input(const Matrix32& p_canvas_xform,const InputEvent& p_event) {
- if (get_script_instance() && get_script_instance()->has_method("forward_canvas_input_event")) {
- return get_script_instance()->call("forward_canvas_input_event",p_canvas_xform,p_event);
+ if (get_script_instance() && get_script_instance()->has_method("forward_canvas_gui_input")) {
+ return get_script_instance()->call("forward_canvas_gui_input",p_canvas_xform,p_event);
}
return false;
}
@@ -155,10 +160,10 @@ void EditorPlugin::update_canvas() {
CanvasItemEditor::get_singleton()->get_viewport_control()->update();
}
-bool EditorPlugin::forward_spatial_input_event(Camera* p_camera,const InputEvent& p_event) {
+bool EditorPlugin::forward_spatial_gui_input(Camera* p_camera,const InputEvent& p_event) {
- if (get_script_instance() && get_script_instance()->has_method("forward_spatial_input_event")) {
- return get_script_instance()->call("forward_spatial_input_event",p_camera,p_event);
+ if (get_script_instance() && get_script_instance()->has_method("forward_spatial_gui_input")) {
+ return get_script_instance()->call("forward_spatial_gui_input",p_camera,p_event);
}
return false;
@@ -341,56 +346,57 @@ EditorFileSystem *EditorPlugin::get_resource_file_system() {
void EditorPlugin::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("add_control_to_container","container","control:Control"),&EditorPlugin::add_control_to_container);
- ObjectTypeDB::bind_method(_MD("add_control_to_bottom_panel:ToolButton","control:Control","title"),&EditorPlugin::add_control_to_bottom_panel);
- ObjectTypeDB::bind_method(_MD("add_control_to_dock","slot","control:Control"),&EditorPlugin::add_control_to_dock);
- ObjectTypeDB::bind_method(_MD("remove_control_from_docks","control:Control"),&EditorPlugin::remove_control_from_docks);
- ObjectTypeDB::bind_method(_MD("remove_control_from_bottom_panel","control:Control"),&EditorPlugin::remove_control_from_bottom_panel);
- ObjectTypeDB::bind_method(_MD("add_custom_type","type","base","script:Script","icon:Texture"),&EditorPlugin::add_custom_type);
- ObjectTypeDB::bind_method(_MD("remove_custom_type","type"),&EditorPlugin::remove_custom_type);
- ObjectTypeDB::bind_method(_MD("get_editor_viewport:Control"), &EditorPlugin::get_editor_viewport);
+ ClassDB::bind_method(_MD("add_control_to_container","container","control:Control"),&EditorPlugin::add_control_to_container);
+ ClassDB::bind_method(_MD("add_control_to_bottom_panel:ToolButton","control:Control","title"),&EditorPlugin::add_control_to_bottom_panel);
+ ClassDB::bind_method(_MD("add_control_to_dock","slot","control:Control"),&EditorPlugin::add_control_to_dock);
+ ClassDB::bind_method(_MD("remove_control_from_docks","control:Control"),&EditorPlugin::remove_control_from_docks);
+ ClassDB::bind_method(_MD("remove_control_from_bottom_panel","control:Control"),&EditorPlugin::remove_control_from_bottom_panel);
+ ClassDB::bind_method(_MD("add_custom_type","type","base","script:Script","icon:Texture"),&EditorPlugin::add_custom_type);
+ ClassDB::bind_method(_MD("remove_custom_type","type"),&EditorPlugin::remove_custom_type);
+ ClassDB::bind_method(_MD("get_editor_viewport:Control"), &EditorPlugin::get_editor_viewport);
- ObjectTypeDB::bind_method(_MD("add_import_plugin","plugin:EditorImportPlugin"),&EditorPlugin::add_import_plugin);
- ObjectTypeDB::bind_method(_MD("remove_import_plugin","plugin:EditorImportPlugin"),&EditorPlugin::remove_import_plugin);
+ ClassDB::bind_method(_MD("add_import_plugin","plugin:EditorImportPlugin"),&EditorPlugin::add_import_plugin);
+ ClassDB::bind_method(_MD("remove_import_plugin","plugin:EditorImportPlugin"),&EditorPlugin::remove_import_plugin);
- ObjectTypeDB::bind_method(_MD("add_export_plugin","plugin:EditorExportPlugin"),&EditorPlugin::add_export_plugin);
- ObjectTypeDB::bind_method(_MD("remove_export_plugin","plugin:EditorExportPlugin"),&EditorPlugin::remove_export_plugin);
+ ClassDB::bind_method(_MD("add_export_plugin","plugin:EditorExportPlugin"),&EditorPlugin::add_export_plugin);
+ ClassDB::bind_method(_MD("remove_export_plugin","plugin:EditorExportPlugin"),&EditorPlugin::remove_export_plugin);
- ObjectTypeDB::bind_method(_MD("get_resource_previewer:EditorResourcePreview"),&EditorPlugin::get_resource_previewer);
- ObjectTypeDB::bind_method(_MD("get_resource_filesystem:EditorFileSystem"),&EditorPlugin::get_resource_file_system);
+ ClassDB::bind_method(_MD("get_resource_previewer:EditorResourcePreview"),&EditorPlugin::get_resource_previewer);
+ ClassDB::bind_method(_MD("get_resource_filesystem:EditorFileSystem"),&EditorPlugin::get_resource_file_system);
- ObjectTypeDB::bind_method(_MD("inspect_object","object","for_property"),&EditorPlugin::inspect_object,DEFVAL(String()));
- ObjectTypeDB::bind_method(_MD("update_canvas"),&EditorPlugin::update_canvas);
+ ClassDB::bind_method(_MD("inspect_object","object","for_property"),&EditorPlugin::inspect_object,DEFVAL(String()));
+ ClassDB::bind_method(_MD("update_canvas"),&EditorPlugin::update_canvas);
- ObjectTypeDB::bind_method(_MD("make_bottom_panel_item_visible","item:Control"), &EditorPlugin::make_bottom_panel_item_visible);
- ObjectTypeDB::bind_method(_MD("hide_bottom_panel"), &EditorPlugin::hide_bottom_panel);
+ ClassDB::bind_method(_MD("make_bottom_panel_item_visible","item:Control"), &EditorPlugin::make_bottom_panel_item_visible);
+ ClassDB::bind_method(_MD("hide_bottom_panel"), &EditorPlugin::hide_bottom_panel);
- ObjectTypeDB::bind_method(_MD("get_base_control:Control"),&EditorPlugin::get_base_control);
- ObjectTypeDB::bind_method(_MD("get_undo_redo:UndoRedo"),&EditorPlugin::_get_undo_redo);
- ObjectTypeDB::bind_method(_MD("get_selection:EditorSelection"),&EditorPlugin::get_selection);
- ObjectTypeDB::bind_method(_MD("get_editor_settings:EditorSettings"),&EditorPlugin::get_editor_settings);
- ObjectTypeDB::bind_method(_MD("queue_save_layout"),&EditorPlugin::queue_save_layout);
+ ClassDB::bind_method(_MD("get_base_control:Control"),&EditorPlugin::get_base_control);
+ ClassDB::bind_method(_MD("get_undo_redo:UndoRedo"),&EditorPlugin::_get_undo_redo);
+ ClassDB::bind_method(_MD("get_selection:EditorSelection"),&EditorPlugin::get_selection);
+ ClassDB::bind_method(_MD("get_editor_settings:EditorSettings"),&EditorPlugin::get_editor_settings);
+ ClassDB::bind_method(_MD("queue_save_layout"),&EditorPlugin::queue_save_layout);
+ ClassDB::bind_method(_MD("edit_resource"),&EditorPlugin::edit_resource);
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::BOOL,"forward_canvas_input_event",PropertyInfo(Variant::MATRIX32,"canvas_xform"),PropertyInfo(Variant::INPUT_EVENT,"event")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo("forward_draw_over_canvas",PropertyInfo(Variant::MATRIX32,"canvas_xform"),PropertyInfo(Variant::OBJECT,"canvas:Control")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::BOOL,"forward_spatial_input_event",PropertyInfo(Variant::OBJECT,"camera",PROPERTY_HINT_RESOURCE_TYPE,"Camera"),PropertyInfo(Variant::INPUT_EVENT,"event")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::BOOL,"forward_canvas_gui_input",PropertyInfo(Variant::MATRIX32,"canvas_xform"),PropertyInfo(Variant::INPUT_EVENT,"event")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo("forward_draw_over_canvas",PropertyInfo(Variant::MATRIX32,"canvas_xform"),PropertyInfo(Variant::OBJECT,"canvas:Control")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::BOOL,"forward_spatial_gui_input",PropertyInfo(Variant::OBJECT,"camera",PROPERTY_HINT_RESOURCE_TYPE,"Camera"),PropertyInfo(Variant::INPUT_EVENT,"event")));
MethodInfo gizmo = MethodInfo(Variant::OBJECT,"create_spatial_gizmo",PropertyInfo(Variant::OBJECT,"for_spatial:Spatial"));
gizmo.return_val.hint=PROPERTY_HINT_RESOURCE_TYPE;
gizmo.return_val.hint_string="EditorSpatialGizmo";
- ObjectTypeDB::add_virtual_method(get_type_static(),gizmo);
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::STRING,"get_name"));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::BOOL,"has_main_screen"));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo("make_visible",PropertyInfo(Variant::BOOL,"visible")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo("edit",PropertyInfo(Variant::OBJECT,"object")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::BOOL,"handles",PropertyInfo(Variant::OBJECT,"object")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::DICTIONARY,"get_state"));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo("set_state",PropertyInfo(Variant::DICTIONARY,"state")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo("clear"));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo("save_external_data"));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo("apply_changes"));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::STRING_ARRAY,"get_breakpoints"));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo("set_window_layout",PropertyInfo(Variant::OBJECT,"layout",PROPERTY_HINT_RESOURCE_TYPE,"ConfigFile")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo("get_window_layout",PropertyInfo(Variant::OBJECT,"layout",PROPERTY_HINT_RESOURCE_TYPE,"ConfigFile")));
+ ClassDB::add_virtual_method(get_class_static(),gizmo);
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::STRING,"get_name"));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::BOOL,"has_main_screen"));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo("make_visible",PropertyInfo(Variant::BOOL,"visible")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo("edit",PropertyInfo(Variant::OBJECT,"object")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::BOOL,"handles",PropertyInfo(Variant::OBJECT,"object")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::DICTIONARY,"get_state"));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo("set_state",PropertyInfo(Variant::DICTIONARY,"state")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo("clear"));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo("save_external_data"));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo("apply_changes"));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::STRING_ARRAY,"get_breakpoints"));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo("set_window_layout",PropertyInfo(Variant::OBJECT,"layout",PROPERTY_HINT_RESOURCE_TYPE,"ConfigFile")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo("get_window_layout",PropertyInfo(Variant::OBJECT,"layout",PROPERTY_HINT_RESOURCE_TYPE,"ConfigFile")));
BIND_CONSTANT( CONTAINER_TOOLBAR );
BIND_CONSTANT( CONTAINER_SPATIAL_EDITOR_MENU );
diff --git a/tools/editor/editor_plugin.h b/tools/editor/editor_plugin.h
index 2700c49a6c..cfa309be11 100644
--- a/tools/editor/editor_plugin.h
+++ b/tools/editor/editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -53,7 +53,7 @@ class EditorFileSystem;
class EditorPlugin : public Node {
- OBJ_TYPE( EditorPlugin, Node );
+ GDCLASS( EditorPlugin, Node );
friend class EditorData;
UndoRedo *undo_redo;
@@ -101,11 +101,12 @@ public:
void remove_control_from_docks(Control *p_control);
void remove_control_from_bottom_panel(Control *p_control);
Control* get_editor_viewport();
+ void edit_resource(const Ref<Resource>& p_resource);
virtual Ref<SpatialEditorGizmo> create_spatial_gizmo(Spatial* p_spatial);
- virtual bool forward_canvas_input_event(const Matrix32& p_canvas_xform, const InputEvent& p_event);
+ virtual bool forward_canvas_gui_input(const Matrix32& p_canvas_xform, const InputEvent& p_event);
virtual void forward_draw_over_canvas(const Matrix32& p_canvas_xform,Control *p_canvas);
- virtual bool forward_spatial_input_event(Camera* p_camera,const InputEvent& p_event);
+ virtual bool forward_spatial_gui_input(Camera* p_camera,const InputEvent& p_event);
virtual String get_name() const;
virtual bool has_main_screen() const;
virtual void make_visible(bool p_visible);
diff --git a/tools/editor/editor_plugin_settings.cpp b/tools/editor/editor_plugin_settings.cpp
index 5342007e6d..208e576a8a 100644
--- a/tools/editor/editor_plugin_settings.cpp
+++ b/tools/editor/editor_plugin_settings.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -81,7 +81,7 @@ void EditorPluginSettings::update_plugins() {
plugins.sort();
- Vector<String> active_plugins = Globals::get_singleton()->get("plugins/active");
+ Vector<String> active_plugins = GlobalConfig::get_singleton()->get("plugins/active");
for(int i=0;i<plugins.size();i++) {
@@ -171,8 +171,8 @@ void EditorPluginSettings::_plugin_activity_changed() {
void EditorPluginSettings::_bind_methods() {
- ObjectTypeDB::bind_method("update_plugins",&EditorPluginSettings::update_plugins);
- ObjectTypeDB::bind_method("_plugin_activity_changed",&EditorPluginSettings::_plugin_activity_changed);
+ ClassDB::bind_method("update_plugins",&EditorPluginSettings::update_plugins);
+ ClassDB::bind_method("_plugin_activity_changed",&EditorPluginSettings::_plugin_activity_changed);
}
EditorPluginSettings::EditorPluginSettings() {
diff --git a/tools/editor/editor_plugin_settings.h b/tools/editor/editor_plugin_settings.h
index 4a982e40e2..e24880a21d 100644
--- a/tools/editor/editor_plugin_settings.h
+++ b/tools/editor/editor_plugin_settings.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -37,7 +37,7 @@
class EditorPluginSettings : public VBoxContainer {
- OBJ_TYPE(EditorPluginSettings,VBoxContainer);
+ GDCLASS(EditorPluginSettings,VBoxContainer);
Button* update_list;
Tree *plugin_list;
diff --git a/tools/editor/editor_profiler.cpp b/tools/editor/editor_profiler.cpp
index 13327f0be9..162e1d05f5 100644
--- a/tools/editor/editor_profiler.cpp
+++ b/tools/editor/editor_profiler.cpp
@@ -28,7 +28,7 @@ void EditorProfiler::add_frame_metric(const Metric& p_metric,bool p_final) {
if (!seeking) {
- cursor_metric_edit->set_val(frame_metrics[last_metric].frame_number);
+ cursor_metric_edit->set_value(frame_metrics[last_metric].frame_number);
if (hover_metric!=-1) {
hover_metric++;
if (hover_metric>=frame_metrics.size()) {
@@ -70,7 +70,7 @@ void EditorProfiler::clear() {
updating_frame=true;
cursor_metric_edit->set_min(0);
cursor_metric_edit->set_max(0);
- cursor_metric_edit->set_val(0);
+ cursor_metric_edit->set_value(0);
updating_frame=false;
hover_metric=-1;
seeking=false;
@@ -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,9 +336,9 @@ void EditorProfiler::_update_plot() {
}
- wr = DVector<uint8_t>::Write();
+ wr = PoolVector<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) {
@@ -453,7 +453,7 @@ void EditorProfiler::_graph_tex_draw() {
if (seeking) {
int max_frames = frame_metrics.size();
- int frame = cursor_metric_edit->get_val() - (frame_metrics[last_metric].frame_number-max_frames+1);
+ int frame = cursor_metric_edit->get_value() - (frame_metrics[last_metric].frame_number-max_frames+1);
if (frame<0)
frame=0;
@@ -559,7 +559,7 @@ void EditorProfiler::_graph_tex_input(const InputEvent& p_ev){
}
if (valid)
- cursor_metric_edit->set_val(frame_metrics[metric].frame_number);
+ cursor_metric_edit->set_value(frame_metrics[metric].frame_number);
updating_frame=false;
@@ -590,7 +590,7 @@ int EditorProfiler::_get_cursor_index() const {
if (!frame_metrics[last_metric].valid)
return 0;
- int diff = (frame_metrics[last_metric].frame_number-cursor_metric_edit->get_val());
+ int diff = (frame_metrics[last_metric].frame_number-cursor_metric_edit->get_value());
int idx = last_metric - diff;
while (idx<0) {
@@ -617,16 +617,16 @@ void EditorProfiler::_combo_changed(int) {
void EditorProfiler::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_update_frame"),&EditorProfiler::_update_frame);
- ObjectTypeDB::bind_method(_MD("_update_plot"),&EditorProfiler::_update_plot);
- ObjectTypeDB::bind_method(_MD("_activate_pressed"),&EditorProfiler::_activate_pressed);
- ObjectTypeDB::bind_method(_MD("_graph_tex_draw"),&EditorProfiler::_graph_tex_draw);
- ObjectTypeDB::bind_method(_MD("_graph_tex_input"),&EditorProfiler::_graph_tex_input);
- ObjectTypeDB::bind_method(_MD("_graph_tex_mouse_exit"),&EditorProfiler::_graph_tex_mouse_exit);
- ObjectTypeDB::bind_method(_MD("_cursor_metric_changed"),&EditorProfiler::_cursor_metric_changed);
- ObjectTypeDB::bind_method(_MD("_combo_changed"),&EditorProfiler::_combo_changed);
+ ClassDB::bind_method(_MD("_update_frame"),&EditorProfiler::_update_frame);
+ ClassDB::bind_method(_MD("_update_plot"),&EditorProfiler::_update_plot);
+ ClassDB::bind_method(_MD("_activate_pressed"),&EditorProfiler::_activate_pressed);
+ ClassDB::bind_method(_MD("_graph_tex_draw"),&EditorProfiler::_graph_tex_draw);
+ ClassDB::bind_method(_MD("_graph_tex_input"),&EditorProfiler::_graph_tex_input);
+ ClassDB::bind_method(_MD("_graph_tex_mouse_exit"),&EditorProfiler::_graph_tex_mouse_exit);
+ ClassDB::bind_method(_MD("_cursor_metric_changed"),&EditorProfiler::_cursor_metric_changed);
+ ClassDB::bind_method(_MD("_combo_changed"),&EditorProfiler::_combo_changed);
- ObjectTypeDB::bind_method(_MD("_item_edited"),&EditorProfiler::_item_edited);
+ ClassDB::bind_method(_MD("_item_edited"),&EditorProfiler::_item_edited);
ADD_SIGNAL( MethodInfo("enable_profiling",PropertyInfo(Variant::BOOL,"enable")));
ADD_SIGNAL( MethodInfo("break_request"));
@@ -710,10 +710,10 @@ EditorProfiler::EditorProfiler()
graph = memnew( TextureFrame );
graph->set_expand(true);
- graph->set_stop_mouse(true);
- graph->set_ignore_mouse(false);
+ graph->set_mouse_filter(MOUSE_FILTER_STOP);
+ //graph->set_ignore_mouse(false);
graph->connect("draw",this,"_graph_tex_draw");
- graph->connect("input_event",this,"_graph_tex_input");
+ graph->connect("gui_input",this,"_graph_tex_input");
graph->connect("mouse_exit",this,"_graph_tex_mouse_exit");
h_split->add_child(graph);
diff --git a/tools/editor/editor_profiler.h b/tools/editor/editor_profiler.h
index f5cea118ce..233bc2e0fd 100644
--- a/tools/editor/editor_profiler.h
+++ b/tools/editor/editor_profiler.h
@@ -14,7 +14,7 @@
class EditorProfiler : public VBoxContainer {
- OBJ_TYPE(EditorProfiler,VBoxContainer)
+ GDCLASS(EditorProfiler,VBoxContainer)
public:
@@ -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/editor_reimport_dialog.cpp b/tools/editor/editor_reimport_dialog.cpp
index b6311a7604..c6a8f13dc7 100644
--- a/tools/editor/editor_reimport_dialog.cpp
+++ b/tools/editor/editor_reimport_dialog.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -135,7 +135,7 @@ EditorReImportDialog::EditorReImportDialog() {
tree = memnew( Tree );
add_child(tree);
tree->set_hide_root(true);
- set_child_rect(tree);
+ //set_child_rect(tree);
set_title(TTR("Re-Import Changed Resources"));
error = memnew( AcceptDialog);
add_child(error);
diff --git a/tools/editor/editor_reimport_dialog.h b/tools/editor/editor_reimport_dialog.h
index 0c2d0eb52c..68e1ca0597 100644
--- a/tools/editor/editor_reimport_dialog.h
+++ b/tools/editor/editor_reimport_dialog.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -34,7 +34,7 @@
class EditorReImportDialog : public ConfirmationDialog {
- OBJ_TYPE(EditorReImportDialog,ConfirmationDialog);
+ GDCLASS(EditorReImportDialog,ConfirmationDialog);
Tree *tree;
Vector<TreeItem*> items;
diff --git a/tools/editor/editor_resource_preview.cpp b/tools/editor/editor_resource_preview.cpp
index 6afc3e2a34..76ae53d821 100644
--- a/tools/editor/editor_resource_preview.cpp
+++ b/tools/editor/editor_resource_preview.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -69,9 +69,9 @@ Ref<Texture> EditorResourcePreviewGenerator::generate_from_path(const String& p_
void EditorResourcePreviewGenerator::_bind_methods() {
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::BOOL,"handles",PropertyInfo(Variant::STRING,"type")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::OBJECT,"generate:Texture",PropertyInfo(Variant::OBJECT,"from",PROPERTY_HINT_RESOURCE_TYPE,"Resource")));
- ObjectTypeDB::add_virtual_method(get_type_static(),MethodInfo(Variant::OBJECT,"generate_from_path:Texture",PropertyInfo(Variant::STRING,"path",PROPERTY_HINT_FILE)));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::BOOL,"handles",PropertyInfo(Variant::STRING,"type")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::OBJECT,"generate:Texture",PropertyInfo(Variant::OBJECT,"from",PROPERTY_HINT_RESOURCE_TYPE,"Resource")));
+ ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::OBJECT,"generate_from_path:Texture",PropertyInfo(Variant::STRING,"path",PROPERTY_HINT_FILE)));
}
@@ -127,7 +127,7 @@ Ref<Texture> EditorResourcePreview::_generate_preview(const QueueItem& p_item,co
String type;
if (p_item.resource.is_valid())
- type=p_item.resource->get_type();
+ type=p_item.resource->get_class();
else
type=ResourceLoader::get_resource_type(p_item.path);
//print_line("resource type is: "+type);
@@ -154,7 +154,7 @@ Ref<Texture> EditorResourcePreview::_generate_preview(const QueueItem& p_item,co
// cache the preview in case it's a resource on disk
if (generated.is_valid()) {
//print_line("was generated");
- int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size");
+ int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size");
thumbnail_size*=EDSCALE;
//wow it generated a preview... save cache
ResourceSaver::save(cache_base+".png",generated);
@@ -207,7 +207,7 @@ void EditorResourcePreview::_thread() {
//print_line("pop from queue "+item.path);
- int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size");
+ int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size");
thumbnail_size*=EDSCALE;
@@ -221,7 +221,7 @@ void EditorResourcePreview::_thread() {
String temp_path=EditorSettings::get_singleton()->get_settings_path().plus_file("tmp");
- String cache_base = Globals::get_singleton()->globalize_path(item.path).md5_text();
+ String cache_base = GlobalConfig::get_singleton()->globalize_path(item.path).md5_text();
cache_base = temp_path.plus_file("resthumb-"+cache_base);
//does not have it, try to load a cached thumbnail
@@ -267,6 +267,8 @@ void EditorResourcePreview::_thread() {
memdelete(f);
}
+ cache_valid=false;
+
if (cache_valid) {
texture = ResourceLoader::load(cache_base+".png","ImageTexture",true);
@@ -374,13 +376,13 @@ EditorResourcePreview* EditorResourcePreview::get_singleton() {
void EditorResourcePreview::_bind_methods() {
- ObjectTypeDB::bind_method("_preview_ready",&EditorResourcePreview::_preview_ready);
+ ClassDB::bind_method("_preview_ready",&EditorResourcePreview::_preview_ready);
- ObjectTypeDB::bind_method(_MD("queue_resource_preview","path","receiver","receiver_func","userdata:Variant"),&EditorResourcePreview::queue_resource_preview);
- ObjectTypeDB::bind_method(_MD("queue_edited_resource_preview","resource:Resource","receiver","receiver_func","userdata:Variant"),&EditorResourcePreview::queue_edited_resource_preview);
- ObjectTypeDB::bind_method(_MD("add_preview_generator","generator:EditorResourcePreviewGenerator"),&EditorResourcePreview::add_preview_generator);
- ObjectTypeDB::bind_method(_MD("remove_preview_generator","generator:EditorResourcePreviewGenerator"),&EditorResourcePreview::remove_preview_generator);
- ObjectTypeDB::bind_method(_MD("check_for_invalidation","path"),&EditorResourcePreview::check_for_invalidation);
+ ClassDB::bind_method(_MD("queue_resource_preview","path","receiver","receiver_func","userdata:Variant"),&EditorResourcePreview::queue_resource_preview);
+ ClassDB::bind_method(_MD("queue_edited_resource_preview","resource:Resource","receiver","receiver_func","userdata:Variant"),&EditorResourcePreview::queue_edited_resource_preview);
+ ClassDB::bind_method(_MD("add_preview_generator","generator:EditorResourcePreviewGenerator"),&EditorResourcePreview::add_preview_generator);
+ ClassDB::bind_method(_MD("remove_preview_generator","generator:EditorResourcePreviewGenerator"),&EditorResourcePreview::remove_preview_generator);
+ ClassDB::bind_method(_MD("check_for_invalidation","path"),&EditorResourcePreview::check_for_invalidation);
ADD_SIGNAL(MethodInfo("preview_invalidated",PropertyInfo(Variant::STRING,"path")));
diff --git a/tools/editor/editor_resource_preview.h b/tools/editor/editor_resource_preview.h
index 2756360130..e4a593330d 100644
--- a/tools/editor/editor_resource_preview.h
+++ b/tools/editor/editor_resource_preview.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -55,7 +55,7 @@
class EditorResourcePreviewGenerator : public Reference {
- OBJ_TYPE(EditorResourcePreviewGenerator,Reference );
+ GDCLASS(EditorResourcePreviewGenerator,Reference );
protected:
@@ -72,7 +72,7 @@ public:
class EditorResourcePreview : public Node {
- OBJ_TYPE(EditorResourcePreview,Node);
+ GDCLASS(EditorResourcePreview,Node);
static EditorResourcePreview* singleton;
diff --git a/tools/editor/editor_run.cpp b/tools/editor/editor_run.cpp
index 5fbb4ae2a0..7d79412b3b 100644
--- a/tools/editor/editor_run.cpp
+++ b/tools/editor/editor_run.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -39,7 +39,7 @@ Error EditorRun::run(const String& p_scene,const String p_custom_args,const List
List<String> args;
- String resource_path = Globals::get_singleton()->get_resource_path();
+ String resource_path = GlobalConfig::get_singleton()->get_resource_path();
if (resource_path!="") {
args.push_back("-path");
@@ -49,21 +49,12 @@ Error EditorRun::run(const String& p_scene,const String p_custom_args,const List
if (true) {
args.push_back("-rdebug");
- args.push_back("localhost:"+String::num(GLOBAL_DEF("debug/debug_port", 6007)));
+ args.push_back("localhost:"+String::num(GLOBAL_GET("network/debug/remote_port")));
}
args.push_back("-epid");
args.push_back(String::num(OS::get_singleton()->get_process_ID()));
- if (p_custom_args!="") {
-
- Vector<String> cargs=p_custom_args.split(" ",false);
- for(int i=0;i<cargs.size();i++) {
-
- args.push_back(cargs[i].replace("%20"," ").replace("$scene",p_edited_scene.replace(" ","%20")));
- }
- }
-
if (debug_collisions) {
args.push_back("-debugcol");
}
@@ -72,7 +63,7 @@ Error EditorRun::run(const String& p_scene,const String p_custom_args,const List
args.push_back("-debugnav");
}
- int screen = EditorSettings::get_singleton()->get("game_window_placement/screen");
+ int screen = EditorSettings::get_singleton()->get("run/window_placement/screen");
if (screen==0) {
screen=OS::get_singleton()->get_current_screen();
@@ -87,19 +78,19 @@ Error EditorRun::run(const String& p_scene,const String p_custom_args,const List
Size2 desired_size;
- desired_size.x=Globals::get_singleton()->get("display/width");
- desired_size.y=Globals::get_singleton()->get("display/height");
+ desired_size.x=GlobalConfig::get_singleton()->get("display/width");
+ desired_size.y=GlobalConfig::get_singleton()->get("display/height");
Size2 test_size;
- test_size.x=Globals::get_singleton()->get("display/test_width");
- test_size.y=Globals::get_singleton()->get("display/test_height");
+ test_size.x=GlobalConfig::get_singleton()->get("display/test_width");
+ test_size.y=GlobalConfig::get_singleton()->get("display/test_height");
if (test_size.x>0 && test_size.y>0) {
desired_size=test_size;
}
- int window_placement=EditorSettings::get_singleton()->get("game_window_placement/rect");
+ int window_placement=EditorSettings::get_singleton()->get("run/window_placement/rect");
switch(window_placement) {
case 0: { // default
@@ -113,7 +104,7 @@ Error EditorRun::run(const String& p_scene,const String p_custom_args,const List
args.push_back(itos(pos.x)+"x"+itos(pos.y));
} break;
case 2: { // custom pos
- Vector2 pos = EditorSettings::get_singleton()->get("game_window_placement/rect_custom_position");
+ Vector2 pos = EditorSettings::get_singleton()->get("run/window_placement/rect_custom_position");
pos+=screen_rect.pos;
args.push_back("-p");
args.push_back(itos(pos.x)+"x"+itos(pos.y));
@@ -150,7 +141,12 @@ Error EditorRun::run(const String& p_scene,const String p_custom_args,const List
args.push_back(bpoints);
}
- args.push_back(p_scene);
+ if (p_custom_args!="") {
+ Vector<String> cargs=p_custom_args.split(" ",false);
+ for(int i=0;i<cargs.size();i++) {
+ args.push_back(cargs[i].replace("$scene",p_scene).replace(" ","%20"));
+ }
+ }
String exec = OS::get_singleton()->get_executable_path();
diff --git a/tools/editor/editor_run.h b/tools/editor/editor_run.h
index 5aa2adf801..78fa892488 100644
--- a/tools/editor/editor_run.h
+++ b/tools/editor/editor_run.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/editor_run_native.cpp b/tools/editor/editor_run_native.cpp
index 330103923d..caa1bf5db7 100644
--- a/tools/editor/editor_run_native.cpp
+++ b/tools/editor/editor_run_native.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -54,7 +54,7 @@ void EditorRunNative::_notification(int p_what) {
Ref<ImageTexture> small_icon = memnew( ImageTexture);
small_icon->create_from_image(im);
MenuButton *mb = memnew( MenuButton );
- mb->get_popup()->connect("item_pressed",this,"_run_native",varray(E->get()));
+ mb->get_popup()->connect("id_pressed",this,"_run_native",varray(E->get()));
mb->connect("pressed",this,"_run_native",varray(-1, E->get()));
mb->set_icon(small_icon);
add_child(mb);
@@ -129,7 +129,7 @@ void EditorRunNative::_run_native(int p_idx,const String& p_platform) {
void EditorRunNative::_bind_methods() {
- ObjectTypeDB::bind_method("_run_native",&EditorRunNative::_run_native);
+ ClassDB::bind_method("_run_native",&EditorRunNative::_run_native);
ADD_SIGNAL(MethodInfo("native_run"));
}
diff --git a/tools/editor/editor_run_native.h b/tools/editor/editor_run_native.h
index 04dad6b6aa..c62021148b 100644
--- a/tools/editor/editor_run_native.h
+++ b/tools/editor/editor_run_native.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -34,7 +34,7 @@
class EditorRunNative : public HBoxContainer {
- OBJ_TYPE(EditorRunNative,BoxContainer);
+ GDCLASS(EditorRunNative,BoxContainer);
Map<StringName,MenuButton*> menus;
bool first;
diff --git a/tools/editor/editor_run_script.cpp b/tools/editor/editor_run_script.cpp
index 765f36d3bc..c8f3f9fc5d 100644
--- a/tools/editor/editor_run_script.cpp
+++ b/tools/editor/editor_run_script.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -86,8 +86,8 @@ void EditorScript::set_editor(EditorNode *p_editor) {
void EditorScript::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("add_root_node","node"),&EditorScript::add_root_node);
- ObjectTypeDB::bind_method(_MD("get_scene"),&EditorScript::get_scene);
+ ClassDB::bind_method(_MD("add_root_node","node"),&EditorScript::add_root_node);
+ ClassDB::bind_method(_MD("get_scene"),&EditorScript::get_scene);
BIND_VMETHOD( MethodInfo("_run") );
diff --git a/tools/editor/editor_run_script.h b/tools/editor/editor_run_script.h
index 144fad5ab1..3ab8525cc6 100644
--- a/tools/editor/editor_run_script.h
+++ b/tools/editor/editor_run_script.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -35,7 +35,7 @@
class EditorNode;
class EditorScript : public Reference {
- OBJ_TYPE( EditorScript, Reference );
+ GDCLASS( EditorScript, Reference );
EditorNode *editor;
protected:
diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp
index 2a355d95f3..ef2aaeda53 100644
--- a/tools/editor/editor_settings.cpp
+++ b/tools/editor/editor_settings.cpp
@@ -3,9 +3,9 @@
/*************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
-/* http://www.godotengine.org */
+/* http:/www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -123,8 +123,10 @@ bool EditorSettings::_get(const StringName& p_name,Variant &r_ret) const {
}
const VariantContainer *v=props.getptr(p_name);
- if (!v)
+ if (!v) {
+ //print_line("WARNING NOT FOUND: "+String(p_name));
return false;
+ }
r_ret = v->variant;
return true;
}
@@ -257,7 +259,7 @@ void EditorSettings::create() {
}
};
- ObjectTypeDB::register_type<EditorSettings>(); //otherwise it can't be unserialized
+ ClassDB::register_class<EditorSettings>(); //otherwise it can't be unserialized
String config_file_path;
if (config_path!=""){
@@ -307,7 +309,7 @@ void EditorSettings::create() {
dir->change_dir("config");
- String pcp=Globals::get_singleton()->get_resource_path();
+ String pcp=GlobalConfig::get_singleton()->get_resource_path();
if (pcp.ends_with("/"))
pcp=config_path.substr(0,pcp.size()-1);
pcp=pcp.get_file()+"-"+pcp.md5_text();
@@ -323,20 +325,13 @@ void EditorSettings::create() {
// path at least is validated, so validate config file
- config_file_path = config_path+"/"+config_dir+"/editor_settings.tres";
+ config_file_path = config_path+"/"+config_dir+"/editor_config.tres";
String open_path = config_file_path;
- if (!dir->file_exists("editor_settings.tres")) {
-
- open_path = config_path+"/"+config_dir+"/editor_settings.xml";
-
- if (!dir->file_exists("editor_settings.xml")) {
+ if (!dir->file_exists("editor_config.tres")) {
- memdelete(dir);
- WARN_PRINT("Config file does not exist, creating.");
- goto fail;
- }
+ goto fail;
}
memdelete(dir);
@@ -402,9 +397,9 @@ String EditorSettings::get_settings_path() const {
void EditorSettings::setup_language() {
- String lang = get("global/editor_language");
+ String lang = get("interface/editor_language");
if (lang=="en")
- return; //none to do
+ return;//none to do
for(int i=0;i<translations.size();i++) {
if (translations[i]->get_locale()==lang) {
@@ -506,158 +501,159 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
best="en";
}
- set("global/editor_language",best);
- hints["global/editor_language"]=PropertyInfo(Variant::STRING,"global/editor_language",PROPERTY_HINT_ENUM,lang_hint,PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED);
+ set("interface/editor_language",best);
+ hints["interface/editor_language"]=PropertyInfo(Variant::STRING,"interface/editor_language",PROPERTY_HINT_ENUM,lang_hint,PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED);
}
- set("global/hidpi_mode",0);
- hints["global/hidpi_mode"]=PropertyInfo(Variant::INT,"global/hidpi_mode",PROPERTY_HINT_ENUM,"Auto,VeryLoDPI,LoDPI,MidDPI,HiDPI",PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED);
- set("global/show_script_in_scene_tabs",false);
- set("global/font_size",14);
- hints["global/font_size"]=PropertyInfo(Variant::INT,"global/font_size",PROPERTY_HINT_RANGE,"10,40,1",PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED);
- set("global/source_font_size",14);
- hints["global/source_font_size"]=PropertyInfo(Variant::INT,"global/source_font_size",PROPERTY_HINT_RANGE,"8,96,1",PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED);
- set("global/custom_font","");
- hints["global/custom_font"]=PropertyInfo(Variant::STRING,"global/custom_font",PROPERTY_HINT_GLOBAL_FILE,"*.fnt",PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED);
- set("global/custom_theme","");
- hints["global/custom_theme"]=PropertyInfo(Variant::STRING,"global/custom_theme",PROPERTY_HINT_GLOBAL_FILE,"*.res,*.tres,*.theme",PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED);
-
-
- set("global/autoscan_project_path","");
- hints["global/autoscan_project_path"]=PropertyInfo(Variant::STRING,"global/autoscan_project_path",PROPERTY_HINT_GLOBAL_DIR);
- set("global/default_project_path","");
- hints["global/default_project_path"]=PropertyInfo(Variant::STRING,"global/default_project_path",PROPERTY_HINT_GLOBAL_DIR);
- set("global/default_project_export_path","");
+ set("interface/hidpi_mode",0);
+ hints["interface/hidpi_mode"]=PropertyInfo(Variant::INT,"interface/hidpi_mode",PROPERTY_HINT_ENUM,"Auto,VeryLoDPI,LoDPI,MidDPI,HiDPI",PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED);
+ set("interface/show_script_in_scene_tabs",false);
+ set("interface/font_size",14);
+ hints["interface/font_size"]=PropertyInfo(Variant::INT,"interface/font_size",PROPERTY_HINT_RANGE,"10,40,1",PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED);
+ set("interface/source_font_size",14);
+ hints["interface/source_font_size"]=PropertyInfo(Variant::INT,"interface/source_font_size",PROPERTY_HINT_RANGE,"8,96,1",PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED);
+ set("interface/custom_font","");
+ hints["interface/custom_font"]=PropertyInfo(Variant::STRING,"interface/custom_font",PROPERTY_HINT_GLOBAL_FILE,"*.fnt",PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED);
+ set("interface/custom_theme","");
+ hints["interface/custom_theme"]=PropertyInfo(Variant::STRING,"interface/custom_theme",PROPERTY_HINT_GLOBAL_FILE,"*.res,*.tres,*.theme",PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED);
+
+
+ set("filesystem/directories/autoscan_project_path","");
+ hints["filesystem/directories/autoscan_project_path"]=PropertyInfo(Variant::STRING,"filesystem/directories/autoscan_project_path",PROPERTY_HINT_GLOBAL_DIR);
+ set("filesystem/directories/default_project_path","");
+ hints["filesystem/directories/default_project_path"]=PropertyInfo(Variant::STRING,"filesystem/directories/default_project_path",PROPERTY_HINT_GLOBAL_DIR);
+ set("filesystem/directories/default_project_export_path","");
hints["global/default_project_export_path"]=PropertyInfo(Variant::STRING,"global/default_project_export_path",PROPERTY_HINT_GLOBAL_DIR);
- set("global/show_script_in_scene_tabs",false);
-
-
- set("text_editor/color_theme","Default");
- hints["text_editor/color_theme"]=PropertyInfo(Variant::STRING,"text_editor/color_theme",PROPERTY_HINT_ENUM,"Default");
-
- _load_default_text_editor_theme();
-
- set("text_editor/syntax_highlighting", true);
+ set("interface/show_script_in_scene_tabs",false);
- set("text_editor/highlight_all_occurrences", true);
- set("text_editor/scroll_past_end_of_file", false);
- set("text_editor/tab_size", 4);
- hints["text_editor/tab_size"]=PropertyInfo(Variant::INT,"text_editor/tab_size",PROPERTY_HINT_RANGE,"1, 64, 1"); // size of 0 crashes.
- set("text_editor/draw_tabs", true);
+ set("text_editor/theme/color_theme","Default");
+ hints["text_editor/theme/color_theme"]=PropertyInfo(Variant::STRING,"text_editor/theme/color_theme",PROPERTY_HINT_ENUM,"Default");
- set("text_editor/line_numbers_zero_padded", false);
+ set("text_editor/theme/line_spacing",4);
- set("text_editor/show_line_numbers", true);
- set("text_editor/show_breakpoint_gutter", true);
- set("text_editor/show_line_length_guideline", false);
- set("text_editor/line_length_guideline_column", 80);
- hints["text_editor/line_length_guideline_column"]=PropertyInfo(Variant::INT,"text_editor/line_length_guideline_column",PROPERTY_HINT_RANGE,"20, 160, 10");
-
- set("text_editor/trim_trailing_whitespace_on_save", false);
- set("text_editor/idle_parse_delay",2);
- set("text_editor/create_signal_callbacks",true);
- set("text_editor/autosave_interval_secs",0);
-
- set("text_editor/block_caret", false);
- set("text_editor/caret_blink", false);
- set("text_editor/caret_blink_speed", 0.65);
- hints["text_editor/caret_blink_speed"]=PropertyInfo(Variant::REAL,"text_editor/caret_blink_speed",PROPERTY_HINT_RANGE,"0.1, 10, 0.1");
-
- set("text_editor/font","");
- hints["text_editor/font"]=PropertyInfo(Variant::STRING,"text_editor/font",PROPERTY_HINT_GLOBAL_FILE,"*.fnt");
- set("text_editor/auto_brace_complete", false);
- set("text_editor/restore_scripts_on_load",true);
-
-
- //set("scenetree_editor/display_old_action_buttons",false);
- set("scenetree_editor/start_create_dialog_fully_expanded",false);
- set("scenetree_editor/draw_relationship_lines",false);
- set("scenetree_editor/relationship_line_color",Color::html("464646"));
-
- set("grid_map/pick_distance", 5000.0);
-
- set("3d_editor/grid_color",Color(0,1,0,0.2));
- hints["3d_editor/grid_color"]=PropertyInfo(Variant::COLOR,"3d_editor/grid_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED);
-
- set("3d_editor/default_fov",45.0);
- set("3d_editor/default_z_near",0.1);
- set("3d_editor/default_z_far",500.0);
-
- set("3d_editor/navigation_scheme",0);
- hints["3d_editor/navigation_scheme"]=PropertyInfo(Variant::INT,"3d_editor/navigation_scheme",PROPERTY_HINT_ENUM,"Godot,Maya,Modo");
- set("3d_editor/zoom_style",0);
- hints["3d_editor/zoom_style"]=PropertyInfo(Variant::INT,"3d_editor/zoom_style",PROPERTY_HINT_ENUM,"Vertical, Horizontal");
- set("3d_editor/orbit_modifier",0);
- hints["3d_editor/orbit_modifier"]=PropertyInfo(Variant::INT,"3d_editor/orbit_modifier",PROPERTY_HINT_ENUM,"None,Shift,Alt,Meta,Ctrl");
- set("3d_editor/pan_modifier",1);
- hints["3d_editor/pan_modifier"]=PropertyInfo(Variant::INT,"3d_editor/pan_modifier",PROPERTY_HINT_ENUM,"None,Shift,Alt,Meta,Ctrl");
- set("3d_editor/zoom_modifier",4);
- hints["3d_editor/zoom_modifier"]=PropertyInfo(Variant::INT,"3d_editor/zoom_modifier",PROPERTY_HINT_ENUM,"None,Shift,Alt,Meta,Ctrl");
- set("3d_editor/emulate_numpad",false);
- set("3d_editor/emulate_3_button_mouse", false);
-
- set("2d_editor/bone_width",5);
- set("2d_editor/bone_color1",Color(1.0,1.0,1.0,0.9));
- set("2d_editor/bone_color2",Color(0.75,0.75,0.75,0.9));
- set("2d_editor/bone_selected_color",Color(0.9,0.45,0.45,0.9));
- set("2d_editor/bone_ik_color",Color(0.9,0.9,0.45,0.9));
-
- set("2d_editor/keep_margins_when_changing_anchors", false);
+ _load_default_text_editor_theme();
- set("game_window_placement/rect",0);
- hints["game_window_placement/rect"]=PropertyInfo(Variant::INT,"game_window_placement/rect",PROPERTY_HINT_ENUM,"Default,Centered,Custom Position,Force Maximized,Force Full Screen");
+ set("text_editor/highlighting/syntax_highlighting", true);
+
+ set("text_editor/highlighting/highlight_all_occurrences", true);
+ set("text_editor/cursor/scroll_past_end_of_file", false);
+
+ set("text_editor/indent/tab_size", 4);
+ hints["text_editor/indent/tab_size"]=PropertyInfo(Variant::INT,"text_editor/indent/tab_size",PROPERTY_HINT_RANGE,"1, 64, 1"); // size of 0 crashes.
+ set("text_editor/indent/draw_tabs", true);
+
+ set("text_editor/line_numbers/show_line_numbers", true);
+ set("text_editor/line_numbers/line_numbers_zero_padded", false);
+ set("text_editor/line_numbers/show_breakpoint_gutter", true);
+ set("text_editor/line_numbers/show_line_length_guideline", false);
+ set("text_editor/line_numbers/line_length_guideline_column", 80);
+ hints["text_editor/line_numbers/line_length_guideline_column"]=PropertyInfo(Variant::INT,"text_editor/line_numbers/line_length_guideline_column",PROPERTY_HINT_RANGE,"20, 160, 10");
+
+ set("text_editor/files/trim_trailing_whitespace_on_save", false);
+ set("text_editor/completion/idle_parse_delay",2);
+ set("text_editor/tools/create_signal_callbacks",true);
+ set("text_editor/files/autosave_interval_secs",0);
+
+ set("text_editor/cursor/block_caret", false);
+ set("text_editor/cursor/caret_blink", false);
+ set("text_editor/cursor/caret_blink_speed", 0.65);
+ hints["text_editor/cursor/caret_blink_speed"]=PropertyInfo(Variant::REAL,"text_editor/cursor/caret_blink_speed",PROPERTY_HINT_RANGE,"0.1, 10, 0.1");
+
+ set("text_editor/theme/font","");
+ hints["text_editor/theme/font"]=PropertyInfo(Variant::STRING,"text_editor/theme/font",PROPERTY_HINT_GLOBAL_FILE,"*.fnt");
+ set("text_editor/completion/auto_brace_complete", false);
+ set("text_editor/files/restore_scripts_on_load",true);
+
+
+ //set("docks/scene_tree/display_old_action_buttons",false);
+ set("docks/scene_tree/start_create_dialog_fully_expanded",false);
+ set("docks/scene_tree/draw_relationship_lines",false);
+ set("docks/scene_tree/relationship_line_color",Color::html("464646"));
+
+ set("editors/grid_map/pick_distance", 5000.0);
+
+ set("editors/3d/grid_color",Color(0,1,0,0.2));
+ hints["editors/3d/grid_color"]=PropertyInfo(Variant::COLOR,"editors/3d/grid_color", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_DEFAULT|PROPERTY_USAGE_RESTART_IF_CHANGED);
+
+ set("editors/3d/default_fov",45.0);
+ set("editors/3d/default_z_near",0.1);
+ set("editors/3d/default_z_far",500.0);
+
+ set("editors/3d/navigation_scheme",0);
+ hints["editors/3d/navigation_scheme"]=PropertyInfo(Variant::INT,"editors/3d/navigation_scheme",PROPERTY_HINT_ENUM,"Godot,Maya,Modo");
+ set("editors/3d/zoom_style",0);
+ hints["editors/3d/zoom_style"]=PropertyInfo(Variant::INT,"editors/3d/zoom_style",PROPERTY_HINT_ENUM,"Vertical, Horizontal");
+ set("editors/3d/orbit_modifier",0);
+ hints["editors/3d/orbit_modifier"]=PropertyInfo(Variant::INT,"editors/3d/orbit_modifier",PROPERTY_HINT_ENUM,"None,Shift,Alt,Meta,Ctrl");
+ set("editors/3d/pan_modifier",1);
+ hints["editors/3d/pan_modifier"]=PropertyInfo(Variant::INT,"editors/3d/pan_modifier",PROPERTY_HINT_ENUM,"None,Shift,Alt,Meta,Ctrl");
+ set("editors/3d/zoom_modifier",4);
+ hints["editors/3d/zoom_modifier"]=PropertyInfo(Variant::INT,"editors/3d/zoom_modifier",PROPERTY_HINT_ENUM,"None,Shift,Alt,Meta,Ctrl");
+ set("editors/3d/emulate_numpad",false);
+ set("editors/3d/emulate_3_button_mouse", false);
+
+ set("editors/2d/bone_width",5);
+ set("editors/2d/bone_color1",Color(1.0,1.0,1.0,0.9));
+ set("editors/2d/bone_color2",Color(0.75,0.75,0.75,0.9));
+ set("editors/2d/bone_selected_color",Color(0.9,0.45,0.45,0.9));
+ set("editors/2d/bone_ik_color",Color(0.9,0.9,0.45,0.9));
+
+ set("editors/2d/keep_margins_when_changing_anchors", false);
+
+ set("run/window_placement/rect",0);
+ hints["run/window_placement/rect"]=PropertyInfo(Variant::INT,"run/window_placement/rect",PROPERTY_HINT_ENUM,"Default,Centered,Custom Position,Force Maximized,Force Full Screen");
String screen_hints=TTR("Default (Same as Editor)");
for(int i=0;i<OS::get_singleton()->get_screen_count();i++) {
screen_hints+=",Monitor "+itos(i+1);
}
- set("game_window_placement/rect_custom_position",Vector2());
- set("game_window_placement/screen",0);
- hints["game_window_placement/screen"]=PropertyInfo(Variant::INT,"game_window_placement/screen",PROPERTY_HINT_ENUM,screen_hints);
+ set("run/window_placement/rect_custom_position",Vector2());
+ set("run/window_placement/screen",0);
+ hints["run/window_placement/screen"]=PropertyInfo(Variant::INT,"run/window_placement/screen",PROPERTY_HINT_ENUM,screen_hints);
- set("on_save/compress_binary_resources",true);
- set("on_save/save_modified_external_resources",true);
- //set("on_save/save_paths_as_relative",false);
- //set("on_save/save_paths_without_extension",false);
+ set("filesystem/on_save/compress_binary_resources",true);
+ set("filesystem/on_save/save_modified_external_resources",true);
+ //set("filesystem/on_save/save_paths_as_relative",false);
+ //set("filesystem/on_save/save_paths_without_extension",false);
- set("text_editor/create_signal_callbacks",true);
+ set("text_editor/tools/create_signal_callbacks",true);
- set("file_dialog/show_hidden_files", false);
- set("file_dialog/display_mode", 0);
- hints["file_dialog/display_mode"]=PropertyInfo(Variant::INT,"file_dialog/display_mode",PROPERTY_HINT_ENUM,"Thumbnails,List");
- set("file_dialog/thumbnail_size", 64);
- hints["file_dialog/thumbnail_size"]=PropertyInfo(Variant::INT,"file_dialog/thumbnail_size",PROPERTY_HINT_RANGE,"32,128,16");
+ set("filesystem/file_dialog/show_hidden_files", false);
+ set("filesystem/file_dialog/display_mode", 0);
+ hints["filesystem/file_dialog/display_mode"]=PropertyInfo(Variant::INT,"filesystem/file_dialog/display_mode",PROPERTY_HINT_ENUM,"Thumbnails,List");
+ set("filesystem/file_dialog/thumbnail_size", 64);
+ hints["filesystem/file_dialog/thumbnail_size"]=PropertyInfo(Variant::INT,"filesystem/file_dialog/thumbnail_size",PROPERTY_HINT_RANGE,"32,128,16");
- set("filesystem_dock/display_mode", 0);
- hints["filesystem_dock/display_mode"]=PropertyInfo(Variant::INT,"filesystem_dock/display_mode",PROPERTY_HINT_ENUM,"Thumbnails,List");
- set("filesystem_dock/thumbnail_size", 64);
- hints["filesystem_dock/thumbnail_size"]=PropertyInfo(Variant::INT,"filesystem_dock/thumbnail_size",PROPERTY_HINT_RANGE,"32,128,16");
+ set("docks/filesystem/display_mode", 0);
+ hints["docks/filesystem/display_mode"]=PropertyInfo(Variant::INT,"docks/filesystem/display_mode",PROPERTY_HINT_ENUM,"Thumbnails,List");
+ set("docks/filesystem/thumbnail_size", 64);
+ hints["docks/filesystem/thumbnail_size"]=PropertyInfo(Variant::INT,"docks/filesystem/thumbnail_size",PROPERTY_HINT_RANGE,"32,128,16");
- set("animation/autorename_animation_tracks",true);
- set("animation/confirm_insert_track",true);
+ set("editors/animation/autorename_animation_tracks",true);
+ set("editors/animation/confirm_insert_track",true);
- set("property_editor/texture_preview_width",48);
- set("property_editor/auto_refresh_interval",0.3);
- set("help/doc_path","");
+ set("docks/property_editor/texture_preview_width",48);
+ set("docks/property_editor/auto_refresh_interval",0.3);
+ set("text_editor/help/doc_path","");
- set("import/ask_save_before_reimport",false);
+ set("filesystem/import/ask_save_before_reimport",false);
- set("import/pvrtc_texture_tool","");
+ set("filesystem/import/pvrtc_texture_tool","");
#ifdef WINDOWS_ENABLED
- hints["import/pvrtc_texture_tool"]=PropertyInfo(Variant::STRING,"import/pvrtc_texture_tool",PROPERTY_HINT_GLOBAL_FILE,"*.exe");
+ hints["filesystem/import/pvrtc_texture_tool"]=PropertyInfo(Variant::STRING,"import/pvrtc_texture_tool",PROPERTY_HINT_GLOBAL_FILE,"*.exe");
#else
hints["import/pvrtc_texture_tool"]=PropertyInfo(Variant::STRING,"import/pvrtc_texture_tool",PROPERTY_HINT_GLOBAL_FILE,"");
#endif
- // TODO: Rename to "import/pvrtc_fast_conversion" to match other names?
- set("PVRTC/fast_conversion",false);
+ // TODO: Rename to "filesystem/import/pvrtc_fast_conversion" to match other names?
+ set("filesystem/import/pvrtc_fast_conversion",false);
- set("run/auto_save_before_running",true);
- set("resources/save_compressed_resources",true);
- set("resources/auto_reload_modified_images",true);
+ set("run/auto_save/save_before_running",true);
+ set("filesystem/resources/save_compressed_resources",true);
+ set("filesystem/resources/auto_reload_modified_images",true);
- set("import/automatic_reimport_on_sources_changed",true);
+ set("filesystem/import/automatic_reimport_on_sources_changed",true);
if (p_extra_config.is_valid()) {
@@ -691,34 +687,34 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
}
void EditorSettings::_load_default_text_editor_theme() {
- set("text_editor/background_color",Color::html("3b000000"));
- set("text_editor/completion_background_color", Color::html("2C2A32"));
- set("text_editor/completion_selected_color", Color::html("434244"));
- set("text_editor/completion_existing_color", Color::html("21dfdfdf"));
- set("text_editor/completion_scroll_color", Color::html("ffffff"));
- set("text_editor/completion_font_color", Color::html("aaaaaa"));
- set("text_editor/caret_color",Color::html("aaaaaa"));
- set("text_editor/caret_background_color", Color::html("000000"));
- set("text_editor/line_number_color",Color::html("66aaaaaa"));
- set("text_editor/text_color",Color::html("aaaaaa"));
- set("text_editor/text_selected_color",Color::html("000000"));
- set("text_editor/keyword_color",Color::html("ffffb3"));
- set("text_editor/base_type_color",Color::html("a4ffd4"));
- set("text_editor/engine_type_color",Color::html("83d3ff"));
- set("text_editor/function_color",Color::html("66a2ce"));
- set("text_editor/member_variable_color",Color::html("e64e59"));
- set("text_editor/comment_color",Color::html("676767"));
- set("text_editor/string_color",Color::html("ef6ebe"));
- set("text_editor/number_color",Color::html("EB9532"));
- set("text_editor/symbol_color",Color::html("badfff"));
- set("text_editor/selection_color",Color::html("7b5dbe"));
- set("text_editor/brace_mismatch_color",Color(1,0.2,0.2));
- set("text_editor/current_line_color",Color(0.3,0.5,0.8,0.15));
- set("text_editor/mark_color", Color(1.0,0.4,0.4,0.4));
- set("text_editor/breakpoint_color", Color(0.8,0.8,0.4,0.2));
- set("text_editor/word_highlighted_color",Color(0.8,0.9,0.9,0.15));
- set("text_editor/search_result_color",Color(0.05,0.25,0.05,1));
- set("text_editor/search_result_border_color",Color(0.1,0.45,0.1,1));
+ set("text_editor/highlighting/background_color",Color::html("3b000000"));
+ set("text_editor/highlighting/completion_background_color", Color::html("2C2A32"));
+ set("text_editor/highlighting/completion_selected_color", Color::html("434244"));
+ set("text_editor/highlighting/completion_existing_color", Color::html("21dfdfdf"));
+ set("text_editor/highlighting/completion_scroll_color", Color::html("ffffff"));
+ set("text_editor/highlighting/completion_font_color", Color::html("aaaaaa"));
+ set("text_editor/highlighting/caret_color",Color::html("aaaaaa"));
+ set("text_editor/highlighting/caret_background_color", Color::html("000000"));
+ set("text_editor/highlighting/line_number_color",Color::html("66aaaaaa"));
+ set("text_editor/highlighting/text_color",Color::html("aaaaaa"));
+ set("text_editor/highlighting/text_selected_color",Color::html("000000"));
+ set("text_editor/highlighting/keyword_color",Color::html("ffffb3"));
+ set("text_editor/highlighting/base_type_color",Color::html("a4ffd4"));
+ set("text_editor/highlighting/engine_type_color",Color::html("83d3ff"));
+ set("text_editor/highlighting/function_color",Color::html("66a2ce"));
+ set("text_editor/highlighting/member_variable_color",Color::html("e64e59"));
+ set("text_editor/highlighting/comment_color",Color::html("676767"));
+ set("text_editor/highlighting/string_color",Color::html("ef6ebe"));
+ set("text_editor/highlighting/number_color",Color::html("EB9532"));
+ set("text_editor/highlighting/symbol_color",Color::html("badfff"));
+ set("text_editor/highlighting/selection_color",Color::html("7b5dbe"));
+ set("text_editor/highlighting/brace_mismatch_color",Color(1,0.2,0.2));
+ set("text_editor/highlighting/current_line_color",Color(0.3,0.5,0.8,0.15));
+ set("text_editor/highlighting/mark_color", Color(1.0,0.4,0.4,0.4));
+ set("text_editor/highlighting/breakpoint_color", Color(0.8,0.8,0.4,0.2));
+ set("text_editor/highlighting/word_highlighted_color",Color(0.8,0.9,0.9,0.15));
+ set("text_editor/highlighting/search_result_color",Color(0.05,0.25,0.05,1));
+ set("text_editor/highlighting/search_result_border_color",Color(0.1,0.45,0.1,1));
}
void EditorSettings::notify_changes() {
@@ -854,16 +850,16 @@ void EditorSettings::list_text_editor_themes() {
d->list_dir_end();
memdelete(d);
}
- add_property_hint(PropertyInfo(Variant::STRING,"text_editor/color_theme",PROPERTY_HINT_ENUM,themes));
+ add_property_hint(PropertyInfo(Variant::STRING,"text_editor/theme/color_theme",PROPERTY_HINT_ENUM,themes));
}
void EditorSettings::load_text_editor_theme() {
- if (get("text_editor/color_theme") == "Default") {
+ if (get("text_editor/theme/color_theme") == "Default") {
_load_default_text_editor_theme(); // sorry for "Settings changed" console spam
return;
}
- String theme_path = get_settings_path() + "/text_editor_themes/" + get("text_editor/color_theme") + ".tet";
+ String theme_path = get_settings_path() + "/text_editor_themes/" + get("text_editor/theme/color_theme") + ".tet";
Ref<ConfigFile> cf = memnew( ConfigFile );
Error err = cf->load(theme_path);
@@ -913,7 +909,7 @@ bool EditorSettings::import_text_editor_theme(String p_file) {
bool EditorSettings::save_text_editor_theme() {
- String p_file = get("text_editor/color_theme");
+ String p_file = get("text_editor/theme/color_theme");
if (p_file.get_file().to_lower() == "default") {
return false;
@@ -937,7 +933,7 @@ bool EditorSettings::save_text_editor_theme_as(String p_file) {
String theme_name = p_file.substr(0, p_file.length() - 4).get_file();
if (p_file.get_base_dir() == get_settings_path() + "/text_editor_themes") {
- set("text_editor/color_theme", theme_name);
+ set("text_editor/theme/color_theme", theme_name);
load_text_editor_theme();
}
return true;
@@ -1051,17 +1047,17 @@ void EditorSettings::set_last_selected_language(String p_language)
void EditorSettings::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("erase","property"),&EditorSettings::erase);
- ObjectTypeDB::bind_method(_MD("get_settings_path"),&EditorSettings::get_settings_path);
- ObjectTypeDB::bind_method(_MD("get_project_settings_path"),&EditorSettings::get_project_settings_path);
+ ClassDB::bind_method(_MD("erase","property"),&EditorSettings::erase);
+ ClassDB::bind_method(_MD("get_settings_path"),&EditorSettings::get_settings_path);
+ ClassDB::bind_method(_MD("get_project_settings_path"),&EditorSettings::get_project_settings_path);
- ObjectTypeDB::bind_method(_MD("add_property_info", "info"),&EditorSettings::_add_property_info_bind);
+ ClassDB::bind_method(_MD("add_property_info", "info"),&EditorSettings::_add_property_info_bind);
- ObjectTypeDB::bind_method(_MD("set_favorite_dirs","dirs"),&EditorSettings::set_favorite_dirs);
- ObjectTypeDB::bind_method(_MD("get_favorite_dirs"),&EditorSettings::get_favorite_dirs);
+ ClassDB::bind_method(_MD("set_favorite_dirs","dirs"),&EditorSettings::set_favorite_dirs);
+ ClassDB::bind_method(_MD("get_favorite_dirs"),&EditorSettings::get_favorite_dirs);
- ObjectTypeDB::bind_method(_MD("set_recent_dirs","dirs"),&EditorSettings::set_recent_dirs);
- ObjectTypeDB::bind_method(_MD("get_recent_dirs"),&EditorSettings::get_recent_dirs);
+ ClassDB::bind_method(_MD("set_recent_dirs","dirs"),&EditorSettings::set_recent_dirs);
+ ClassDB::bind_method(_MD("get_recent_dirs"),&EditorSettings::get_recent_dirs);
ADD_SIGNAL(MethodInfo("settings_changed"));
diff --git a/tools/editor/editor_settings.h b/tools/editor/editor_settings.h
index a976602304..c11feef667 100644
--- a/tools/editor/editor_settings.h
+++ b/tools/editor/editor_settings.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -41,7 +41,7 @@ class EditorPlugin;
class EditorSettings : public Resource {
- OBJ_TYPE( EditorSettings, Resource );
+ GDCLASS( EditorSettings, Resource );
private:
_THREAD_SAFE_CLASS_
diff --git a/tools/editor/editor_sub_scene.cpp b/tools/editor/editor_sub_scene.cpp
index d32dbcd2e6..8f1f24f769 100644
--- a/tools/editor/editor_sub_scene.cpp
+++ b/tools/editor/editor_sub_scene.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -90,8 +90,8 @@ void EditorSubScene::_fill_tree(Node* p_node,TreeItem *p_parent) {
it->set_text(0,p_node->get_name());
it->set_editable(0,false);
it->set_selectable(0,true);
- if (has_icon(p_node->get_type(),"EditorIcons")) {
- it->set_icon(0,get_icon(p_node->get_type(),"EditorIcons"));
+ if (has_icon(p_node->get_class(),"EditorIcons")) {
+ it->set_icon(0,get_icon(p_node->get_class(),"EditorIcons"));
}
@@ -186,9 +186,9 @@ void EditorSubScene::clear() {
void EditorSubScene::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_path_selected"),&EditorSubScene::_path_selected);
- ObjectTypeDB::bind_method(_MD("_path_changed"),&EditorSubScene::_path_changed);
- ObjectTypeDB::bind_method(_MD("_path_browse"),&EditorSubScene::_path_browse);
+ ClassDB::bind_method(_MD("_path_selected"),&EditorSubScene::_path_selected);
+ ClassDB::bind_method(_MD("_path_changed"),&EditorSubScene::_path_changed);
+ ClassDB::bind_method(_MD("_path_browse"),&EditorSubScene::_path_browse);
ADD_SIGNAL( MethodInfo("subscene_selected"));
}
@@ -203,7 +203,7 @@ EditorSubScene::EditorSubScene() {
VBoxContainer *vb = memnew( VBoxContainer );
add_child(vb);
- set_child_rect(vb);
+// set_child_rect(vb);
HBoxContainer *hb = memnew( HBoxContainer );
path = memnew( LineEdit );
diff --git a/tools/editor/editor_sub_scene.h b/tools/editor/editor_sub_scene.h
index 3dd86eefda..cc9faffc77 100644
--- a/tools/editor/editor_sub_scene.h
+++ b/tools/editor/editor_sub_scene.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -35,7 +35,7 @@
class EditorSubScene : public ConfirmationDialog {
- OBJ_TYPE(EditorSubScene,ConfirmationDialog);
+ GDCLASS(EditorSubScene,ConfirmationDialog);
LineEdit *path;
diff --git a/tools/editor/editor_themes.cpp b/tools/editor/editor_themes.cpp
index 08f14ec167..56654cad7a 100644
--- a/tools/editor/editor_themes.cpp
+++ b/tools/editor/editor_themes.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -62,12 +62,12 @@ Ref<Theme> create_custom_theme()
{
Ref<Theme> theme;
- String custom_theme = EditorSettings::get_singleton()->get("global/custom_theme");
+ String custom_theme = EditorSettings::get_singleton()->get("interface/custom_theme");
if (custom_theme!="") {
theme = ResourceLoader::load(custom_theme);
}
- String global_font = EditorSettings::get_singleton()->get("global/custom_font");
+ String global_font = EditorSettings::get_singleton()->get("interface/custom_font");
if (global_font!="") {
Ref<Font> fnt = ResourceLoader::load(global_font);
if (fnt.is_valid()) {
diff --git a/tools/editor/editor_themes.h b/tools/editor/editor_themes.h
index db49801600..83e7dde78a 100644
--- a/tools/editor/editor_themes.h
+++ b/tools/editor/editor_themes.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/file_type_cache.cpp b/tools/editor/file_type_cache.cpp
index 8a47f49b03..176205a7df 100644
--- a/tools/editor/file_type_cache.cpp
+++ b/tools/editor/file_type_cache.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -55,7 +55,7 @@ void FileTypeCache::set_file_type(const String& p_path,const String& p_type){
void FileTypeCache::load() {
GLOBAL_LOCK_FUNCTION
- String project=Globals::get_singleton()->get_resource_path();
+ String project=GlobalConfig::get_singleton()->get_resource_path();
FileAccess *f =FileAccess::open(project+"/file_type_cache.cch",FileAccess::READ);
if (!f) {
@@ -81,7 +81,7 @@ void FileTypeCache::load() {
void FileTypeCache::save() {
GLOBAL_LOCK_FUNCTION
- String project=Globals::get_singleton()->get_resource_path();
+ String project=GlobalConfig::get_singleton()->get_resource_path();
FileAccess *f =FileAccess::open(project+"/file_type_cache.cch",FileAccess::WRITE);
if (!f) {
diff --git a/tools/editor/file_type_cache.h b/tools/editor/file_type_cache.h
index 18451cbe19..25755f168c 100644
--- a/tools/editor/file_type_cache.h
+++ b/tools/editor/file_type_cache.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -33,7 +33,7 @@
class FileTypeCache : Object {
- OBJ_TYPE(FileTypeCache,Object);
+ GDCLASS(FileTypeCache,Object);
HashMap<String,String> file_type_map;
diff --git a/tools/editor/fileserver/editor_file_server.cpp b/tools/editor/fileserver/editor_file_server.cpp
index c464e10fc2..d640b0ad1d 100644
--- a/tools/editor/fileserver/editor_file_server.cpp
+++ b/tools/editor/fileserver/editor_file_server.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -321,8 +321,8 @@ void EditorFileServer::start() {
stop();
- port=EDITOR_DEF("file_server/port",6010);
- password=EDITOR_DEF("file_server/password","");
+ port=EDITOR_DEF("filesystem/file_server/port",6010);
+ password=EDITOR_DEF("filesystem/file_server/password","");
cmd=CMD_ACTIVATE;
}
@@ -346,8 +346,8 @@ EditorFileServer::EditorFileServer() {
cmd=CMD_NONE;
thread=Thread::create(_thread_start,this);
- EDITOR_DEF("file_server/port",6010);
- EDITOR_DEF("file_server/password","");
+ EDITOR_DEF("filesystem/file_server/port",6010);
+ EDITOR_DEF("filesystem/file_server/password","");
}
EditorFileServer::~EditorFileServer() {
diff --git a/tools/editor/fileserver/editor_file_server.h b/tools/editor/fileserver/editor_file_server.h
index fcb3d8546c..31f8ae84b8 100644
--- a/tools/editor/fileserver/editor_file_server.h
+++ b/tools/editor/fileserver/editor_file_server.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -37,7 +37,7 @@
class EditorFileServer : public Object {
- OBJ_TYPE(EditorFileServer,Object);
+ GDCLASS(EditorFileServer,Object);
enum Command {
CMD_NONE,
diff --git a/tools/editor/filesystem_dock.cpp b/tools/editor/filesystem_dock.cpp
index 5b1e80fc3b..d52247573e 100644
--- a/tools/editor/filesystem_dock.cpp
+++ b/tools/editor/filesystem_dock.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -38,14 +38,16 @@
#include "editor_settings.h"
#include "scene/main/viewport.h"
-
bool FileSystemDock::_create_tree(TreeItem *p_parent,EditorFileSystemDirectory *p_dir) {
-
TreeItem *item = tree->create_item(p_parent);
String dname=p_dir->get_name();
if (dname=="")
dname="res://";
+ else {
+ // collapse every tree item but the root folder
+ item->set_collapsed(true);
+ }
item->set_text(0,dname);
item->set_icon(0,get_icon("Folder","EditorIcons"));
@@ -160,7 +162,8 @@ void FileSystemDock::_notification(int p_what) {
button_hist_next->set_icon( get_icon("Forward","EditorIcons"));
button_hist_prev->set_icon( get_icon("Back","EditorIcons"));
- file_options->connect("item_pressed",this,"_file_option");
+ file_options->connect("id_pressed",this,"_file_option");
+ folder_options->connect("id_pressed",this,"_folder_option");
button_back->connect("pressed",this,"_go_to_tree",varray(),CONNECT_DEFERRED);
@@ -174,7 +177,7 @@ void FileSystemDock::_notification(int p_what) {
} break;
case NOTIFICATION_PROCESS: {
if (EditorFileSystem::get_singleton()->is_scanning()) {
- scanning_progress->set_val(EditorFileSystem::get_singleton()->get_scanning_progress()*100);
+ scanning_progress->set_value(EditorFileSystem::get_singleton()->get_scanning_progress()*100);
}
} break;
case NOTIFICATION_EXIT_TREE: {
@@ -201,7 +204,7 @@ void FileSystemDock::_notification(int p_what) {
} break;
case EditorSettings::NOTIFICATION_EDITOR_SETTINGS_CHANGED: {
- int new_mode = int(EditorSettings::get_singleton()->get("filesystem_dock/display_mode"));
+ int new_mode = int(EditorSettings::get_singleton()->get("docks/filesystem/display_mode"));
if (new_mode != display_mode) {
set_display_mode(new_mode);
@@ -323,7 +326,7 @@ void FileSystemDock::_change_file_display() {
button_display_mode->set_icon( get_icon("FileList","EditorIcons"));
}
- EditorSettings::get_singleton()->set("filesystem_dock/display_mode", display_mode);
+ EditorSettings::get_singleton()->set("docks/filesystem/display_mode", display_mode);
_update_files(true);
}
@@ -397,7 +400,7 @@ void FileSystemDock::_update_files(bool p_keep_selection) {
if (!efd)
return;
- int thumbnail_size = EditorSettings::get_singleton()->get("filesystem_dock/thumbnail_size");
+ int thumbnail_size = EditorSettings::get_singleton()->get("docks/filesystem/thumbnail_size");
thumbnail_size*=EDSCALE;
Ref<Texture> folder_thumbnail;
Ref<Texture> file_thumbnail;
@@ -668,9 +671,9 @@ void FileSystemDock::_set_scannig_mode() {
scanning_vb->show();
set_process(true);
if (EditorFileSystem::get_singleton()->is_scanning()) {
- scanning_progress->set_val(EditorFileSystem::get_singleton()->get_scanning_progress()*100);
+ scanning_progress->set_value(EditorFileSystem::get_singleton()->get_scanning_progress()*100);
} else {
- scanning_progress->set_val(0);
+ scanning_progress->set_value(0);
}
}
@@ -927,7 +930,7 @@ void FileSystemDock::_file_option(int p_option) {
String path = files->get_item_metadata(idx);
if (p_option == FILE_SHOW_IN_EXPLORER) {
- String dir = Globals::get_singleton()->globalize_path(path);
+ String dir = GlobalConfig::get_singleton()->globalize_path(path);
dir = dir.substr(0, dir.find_last("/"));
OS::get_singleton()->shell_open(String("file://")+dir);
return;
@@ -1096,6 +1099,30 @@ void FileSystemDock::_file_option(int p_option) {
}
}
+void FileSystemDock::_folder_option(int p_option) {
+
+ TreeItem *item = tree->get_selected();
+ TreeItem *child = item->get_children();
+
+ switch(p_option) {
+
+ case FOLDER_EXPAND_ALL:
+ item->set_collapsed(false);
+ while(child) {
+ child->set_collapsed(false);
+ child = child->get_next();
+ }
+ break;
+
+ case FOLDER_COLLAPSE_ALL:
+ while(child) {
+ child->set_collapsed(true);
+ child = child->get_next();
+ }
+ break;
+ }
+}
+
void FileSystemDock::_open_pressed(){
@@ -1126,6 +1153,17 @@ void FileSystemDock::_open_pressed(){
}
+void FileSystemDock::_dir_rmb_pressed(const Vector2& p_pos) {
+ folder_options->clear();
+ folder_options->set_size(Size2(1,1));
+
+ folder_options->add_item(TTR("Expand all"),FOLDER_EXPAND_ALL);
+ folder_options->add_item(TTR("Collapse all"),FOLDER_COLLAPSE_ALL);
+
+ folder_options->set_pos(files->get_global_pos() + p_pos);
+ folder_options->popup();
+}
+
void FileSystemDock::_search_changed(const String& p_text) {
@@ -1581,33 +1619,35 @@ void FileSystemDock::_files_list_rmb_select(int p_item,const Vector2& p_pos) {
void FileSystemDock::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_update_tree"),&FileSystemDock::_update_tree);
- ObjectTypeDB::bind_method(_MD("_rescan"),&FileSystemDock::_rescan);
- ObjectTypeDB::bind_method(_MD("_favorites_pressed"),&FileSystemDock::_favorites_pressed);
-// ObjectTypeDB::bind_method(_MD("_instance_pressed"),&ScenesDock::_instance_pressed);
- ObjectTypeDB::bind_method(_MD("_open_pressed"),&FileSystemDock::_open_pressed);
-
- ObjectTypeDB::bind_method(_MD("_thumbnail_done"),&FileSystemDock::_thumbnail_done);
- ObjectTypeDB::bind_method(_MD("_select_file"), &FileSystemDock::_select_file);
- ObjectTypeDB::bind_method(_MD("_go_to_tree"), &FileSystemDock::_go_to_tree);
- ObjectTypeDB::bind_method(_MD("_go_to_dir"), &FileSystemDock::_go_to_dir);
- ObjectTypeDB::bind_method(_MD("_change_file_display"), &FileSystemDock::_change_file_display);
- ObjectTypeDB::bind_method(_MD("_fw_history"), &FileSystemDock::_fw_history);
- ObjectTypeDB::bind_method(_MD("_bw_history"), &FileSystemDock::_bw_history);
- ObjectTypeDB::bind_method(_MD("_fs_changed"), &FileSystemDock::_fs_changed);
- ObjectTypeDB::bind_method(_MD("_dir_selected"), &FileSystemDock::_dir_selected);
- ObjectTypeDB::bind_method(_MD("_file_option"), &FileSystemDock::_file_option);
- ObjectTypeDB::bind_method(_MD("_move_operation"), &FileSystemDock::_move_operation);
- ObjectTypeDB::bind_method(_MD("_rename_operation"), &FileSystemDock::_rename_operation);
-
- ObjectTypeDB::bind_method(_MD("_search_changed"), &FileSystemDock::_search_changed);
-
- ObjectTypeDB::bind_method(_MD("get_drag_data_fw"), &FileSystemDock::get_drag_data_fw);
- ObjectTypeDB::bind_method(_MD("can_drop_data_fw"), &FileSystemDock::can_drop_data_fw);
- ObjectTypeDB::bind_method(_MD("drop_data_fw"), &FileSystemDock::drop_data_fw);
- ObjectTypeDB::bind_method(_MD("_files_list_rmb_select"),&FileSystemDock::_files_list_rmb_select);
-
- ObjectTypeDB::bind_method(_MD("_preview_invalidated"),&FileSystemDock::_preview_invalidated);
+ ClassDB::bind_method(_MD("_update_tree"),&FileSystemDock::_update_tree);
+ ClassDB::bind_method(_MD("_rescan"),&FileSystemDock::_rescan);
+ ClassDB::bind_method(_MD("_favorites_pressed"),&FileSystemDock::_favorites_pressed);
+// ClassDB::bind_method(_MD("_instance_pressed"),&ScenesDock::_instance_pressed);
+ ClassDB::bind_method(_MD("_open_pressed"),&FileSystemDock::_open_pressed);
+ ClassDB::bind_method(_MD("_dir_rmb_pressed"),&FileSystemDock::_dir_rmb_pressed);
+
+ ClassDB::bind_method(_MD("_thumbnail_done"),&FileSystemDock::_thumbnail_done);
+ ClassDB::bind_method(_MD("_select_file"), &FileSystemDock::_select_file);
+ ClassDB::bind_method(_MD("_go_to_tree"), &FileSystemDock::_go_to_tree);
+ ClassDB::bind_method(_MD("_go_to_dir"), &FileSystemDock::_go_to_dir);
+ ClassDB::bind_method(_MD("_change_file_display"), &FileSystemDock::_change_file_display);
+ ClassDB::bind_method(_MD("_fw_history"), &FileSystemDock::_fw_history);
+ ClassDB::bind_method(_MD("_bw_history"), &FileSystemDock::_bw_history);
+ ClassDB::bind_method(_MD("_fs_changed"), &FileSystemDock::_fs_changed);
+ ClassDB::bind_method(_MD("_dir_selected"), &FileSystemDock::_dir_selected);
+ ClassDB::bind_method(_MD("_file_option"), &FileSystemDock::_file_option);
+ ClassDB::bind_method(_MD("_folder_option"), &FileSystemDock::_folder_option);
+ ClassDB::bind_method(_MD("_move_operation"), &FileSystemDock::_move_operation);
+ ClassDB::bind_method(_MD("_rename_operation"), &FileSystemDock::_rename_operation);
+
+ ClassDB::bind_method(_MD("_search_changed"), &FileSystemDock::_search_changed);
+
+ ClassDB::bind_method(_MD("get_drag_data_fw"), &FileSystemDock::get_drag_data_fw);
+ ClassDB::bind_method(_MD("can_drop_data_fw"), &FileSystemDock::can_drop_data_fw);
+ ClassDB::bind_method(_MD("drop_data_fw"), &FileSystemDock::drop_data_fw);
+ ClassDB::bind_method(_MD("_files_list_rmb_select"),&FileSystemDock::_files_list_rmb_select);
+
+ ClassDB::bind_method(_MD("_preview_invalidated"),&FileSystemDock::_preview_invalidated);
ADD_SIGNAL(MethodInfo("instance", PropertyInfo(Variant::STRING_ARRAY, "files")));
@@ -1686,6 +1726,9 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
file_options = memnew( PopupMenu );
add_child(file_options);
+ folder_options = memnew ( PopupMenu );
+ add_child(folder_options);
+
split_box = memnew( VSplitContainer );
add_child(split_box);
split_box->set_v_size_flags(SIZE_EXPAND_FILL);
@@ -1695,12 +1738,14 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) {
tree->set_hide_root(true);
split_box->add_child(tree);
tree->set_drag_forwarding(this);
+ tree->set_allow_rmb_select(true);
//tree->set_v_size_flags(SIZE_EXPAND_FILL);
tree->connect("item_edited",this,"_favorite_toggled");
tree->connect("item_activated",this,"_open_pressed");
tree->connect("cell_selected",this,"_dir_selected");
+ tree->connect("item_rmb_selected",this,"_dir_rmb_pressed");
files = memnew( ItemList );
files->set_v_size_flags(SIZE_EXPAND_FILL);
diff --git a/tools/editor/filesystem_dock.h b/tools/editor/filesystem_dock.h
index f5b96760fc..804017be73 100644
--- a/tools/editor/filesystem_dock.h
+++ b/tools/editor/filesystem_dock.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -52,7 +52,7 @@ class EditorNode;
class FileSystemDock : public VBoxContainer {
- OBJ_TYPE( FileSystemDock, VBoxContainer );
+ GDCLASS( FileSystemDock, VBoxContainer );
public:
enum DisplayMode {
@@ -73,6 +73,11 @@ private:
FILE_COPY_PATH
};
+ enum FolderMenu {
+ FOLDER_EXPAND_ALL,
+ FOLDER_COLLAPSE_ALL
+ };
+
VBoxContainer *scanning_vb;
ProgressBar *scanning_progress;
@@ -97,6 +102,7 @@ private:
DisplayMode display_mode;
PopupMenu *file_options;
+ PopupMenu *folder_options;
DependencyEditor *deps_editor;
DependencyEditorOwners *owners_editor;
@@ -134,6 +140,7 @@ private:
void _file_option(int p_option);
+ void _folder_option(int p_option);
void _update_files(bool p_keep_selection);
void _change_file_display();
@@ -151,6 +158,7 @@ private:
void _favorites_pressed();
void _open_pressed();
+ void _dir_rmb_pressed(const Vector2& local_mouse_pos);
void _search_changed(const String& p_text);
diff --git a/tools/editor/groups_editor.cpp b/tools/editor/groups_editor.cpp
index 5b7bc1da78..07b2bca385 100644
--- a/tools/editor/groups_editor.cpp
+++ b/tools/editor/groups_editor.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -147,9 +147,9 @@ void GroupsEditor::set_current(Node* p_node) {
void GroupsEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_add_group",&GroupsEditor::_add_group);
- ObjectTypeDB::bind_method("_remove_group",&GroupsEditor::_remove_group);
- ObjectTypeDB::bind_method("update_tree",&GroupsEditor::update_tree);
+ ClassDB::bind_method("_add_group",&GroupsEditor::_add_group);
+ ClassDB::bind_method("_remove_group",&GroupsEditor::_remove_group);
+ ClassDB::bind_method("update_tree",&GroupsEditor::update_tree);
}
GroupsEditor::GroupsEditor() {
diff --git a/tools/editor/groups_editor.h b/tools/editor/groups_editor.h
index 6edb577140..9ab75c6cfd 100644
--- a/tools/editor/groups_editor.h
+++ b/tools/editor/groups_editor.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -41,7 +41,7 @@
class GroupsEditor : public VBoxContainer {
- OBJ_TYPE(GroupsEditor,VBoxContainer);
+ GDCLASS(GroupsEditor,VBoxContainer);
Node *node;
diff --git a/tools/editor/icons/2x/icon_bit_map.png b/tools/editor/icons/2x/icon_bit_map.png
new file mode 100644
index 0000000000..7372b85944
--- /dev/null
+++ b/tools/editor/icons/2x/icon_bit_map.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_cube_map.png b/tools/editor/icons/2x/icon_cube_map.png
new file mode 100644
index 0000000000..0edf82a88e
--- /dev/null
+++ b/tools/editor/icons/2x/icon_cube_map.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_curve_2d.png b/tools/editor/icons/2x/icon_curve_2d.png
new file mode 100644
index 0000000000..69a6f9a9dc
--- /dev/null
+++ b/tools/editor/icons/2x/icon_curve_2d.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_curve_3d.png b/tools/editor/icons/2x/icon_curve_3d.png
new file mode 100644
index 0000000000..e989df4769
--- /dev/null
+++ b/tools/editor/icons/2x/icon_curve_3d.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_environment.png b/tools/editor/icons/2x/icon_environment.png
new file mode 100644
index 0000000000..4c4c30b0e5
--- /dev/null
+++ b/tools/editor/icons/2x/icon_environment.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_fixed_spatial_material.png b/tools/editor/icons/2x/icon_fixed_spatial_material.png
new file mode 100644
index 0000000000..b95e78d6cc
--- /dev/null
+++ b/tools/editor/icons/2x/icon_fixed_spatial_material.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_g_i_probe.png b/tools/editor/icons/2x/icon_g_i_probe.png
new file mode 100644
index 0000000000..921f1cca42
--- /dev/null
+++ b/tools/editor/icons/2x/icon_g_i_probe.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_g_i_probe_data.png b/tools/editor/icons/2x/icon_g_i_probe_data.png
new file mode 100644
index 0000000000..69c4ed7184
--- /dev/null
+++ b/tools/editor/icons/2x/icon_g_i_probe_data.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_image_sky_box.png b/tools/editor/icons/2x/icon_image_sky_box.png
new file mode 100644
index 0000000000..487178afab
--- /dev/null
+++ b/tools/editor/icons/2x/icon_image_sky_box.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_interp_wrap_clamp.png b/tools/editor/icons/2x/icon_interp_wrap_clamp.png
new file mode 100644
index 0000000000..93a5bc56ee
--- /dev/null
+++ b/tools/editor/icons/2x/icon_interp_wrap_clamp.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_interp_wrap_loop.png b/tools/editor/icons/2x/icon_interp_wrap_loop.png
new file mode 100644
index 0000000000..3e656f7b07
--- /dev/null
+++ b/tools/editor/icons/2x/icon_interp_wrap_loop.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_joystick.png b/tools/editor/icons/2x/icon_joypad.png
index 285d048544..285d048544 100644
--- a/tools/editor/icons/2x/icon_joystick.png
+++ b/tools/editor/icons/2x/icon_joypad.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_large_texture.png b/tools/editor/icons/2x/icon_large_texture.png
new file mode 100644
index 0000000000..dd1ec86d39
--- /dev/null
+++ b/tools/editor/icons/2x/icon_large_texture.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_load.png b/tools/editor/icons/2x/icon_load.png
index 729eedd2dd..759381d636 100644
--- a/tools/editor/icons/2x/icon_load.png
+++ b/tools/editor/icons/2x/icon_load.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_mesh_library.png b/tools/editor/icons/2x/icon_mesh_library.png
new file mode 100644
index 0000000000..2495e4a037
--- /dev/null
+++ b/tools/editor/icons/2x/icon_mesh_library.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_navigation_mesh.png b/tools/editor/icons/2x/icon_navigation_mesh.png
new file mode 100644
index 0000000000..35b893c3bb
--- /dev/null
+++ b/tools/editor/icons/2x/icon_navigation_mesh.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_navigation_polygon.png b/tools/editor/icons/2x/icon_navigation_polygon.png
new file mode 100644
index 0000000000..3f4845e206
--- /dev/null
+++ b/tools/editor/icons/2x/icon_navigation_polygon.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_open.png b/tools/editor/icons/2x/icon_open.png
new file mode 100644
index 0000000000..2e797c448b
--- /dev/null
+++ b/tools/editor/icons/2x/icon_open.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_packed_data_container.png b/tools/editor/icons/2x/icon_packed_data_container.png
new file mode 100644
index 0000000000..958e41ede2
--- /dev/null
+++ b/tools/editor/icons/2x/icon_packed_data_container.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_particles_shader.png b/tools/editor/icons/2x/icon_particles_shader.png
new file mode 100644
index 0000000000..26ce8f6809
--- /dev/null
+++ b/tools/editor/icons/2x/icon_particles_shader.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_polygon_path_finder.png b/tools/editor/icons/2x/icon_polygon_path_finder.png
new file mode 100644
index 0000000000..ee6423c265
--- /dev/null
+++ b/tools/editor/icons/2x/icon_polygon_path_finder.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_reflection_probe.png b/tools/editor/icons/2x/icon_reflection_probe.png
new file mode 100644
index 0000000000..5604b403df
--- /dev/null
+++ b/tools/editor/icons/2x/icon_reflection_probe.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_room.png b/tools/editor/icons/2x/icon_room.png
index e5e5bb52f8..946f95e955 100644
--- a/tools/editor/icons/2x/icon_room.png
+++ b/tools/editor/icons/2x/icon_room.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_room_bounds.png b/tools/editor/icons/2x/icon_room_bounds.png
new file mode 100644
index 0000000000..94da9c437d
--- /dev/null
+++ b/tools/editor/icons/2x/icon_room_bounds.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_sample_library.png b/tools/editor/icons/2x/icon_sample_library.png
new file mode 100644
index 0000000000..3f76a78aca
--- /dev/null
+++ b/tools/editor/icons/2x/icon_sample_library.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_script_create.png b/tools/editor/icons/2x/icon_script_create.png
index 67f80e8760..f1e25efe1c 100644
--- a/tools/editor/icons/2x/icon_script_create.png
+++ b/tools/editor/icons/2x/icon_script_create.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_short_cut.png b/tools/editor/icons/2x/icon_short_cut.png
new file mode 100644
index 0000000000..58c3e08ca4
--- /dev/null
+++ b/tools/editor/icons/2x/icon_short_cut.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_spatial_shader.png b/tools/editor/icons/2x/icon_spatial_shader.png
new file mode 100644
index 0000000000..68f6cf8dac
--- /dev/null
+++ b/tools/editor/icons/2x/icon_spatial_shader.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_sprite_frames.png b/tools/editor/icons/2x/icon_sprite_frames.png
new file mode 100644
index 0000000000..263f5c4aad
--- /dev/null
+++ b/tools/editor/icons/2x/icon_sprite_frames.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_style_box_empty.png b/tools/editor/icons/2x/icon_style_box_empty.png
new file mode 100644
index 0000000000..e790af4de4
--- /dev/null
+++ b/tools/editor/icons/2x/icon_style_box_empty.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_style_box_flat.png b/tools/editor/icons/2x/icon_style_box_flat.png
new file mode 100644
index 0000000000..1cd5c7f69a
--- /dev/null
+++ b/tools/editor/icons/2x/icon_style_box_flat.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_style_box_texture.png b/tools/editor/icons/2x/icon_style_box_texture.png
new file mode 100644
index 0000000000..a93e0228bd
--- /dev/null
+++ b/tools/editor/icons/2x/icon_style_box_texture.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_test_cube.png b/tools/editor/icons/2x/icon_test_cube.png
index 13d54db87d..f2e523be3f 100644
--- a/tools/editor/icons/2x/icon_test_cube.png
+++ b/tools/editor/icons/2x/icon_test_cube.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_theme.png b/tools/editor/icons/2x/icon_theme.png
new file mode 100644
index 0000000000..55b51428dd
--- /dev/null
+++ b/tools/editor/icons/2x/icon_theme.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_tile_set.png b/tools/editor/icons/2x/icon_tile_set.png
new file mode 100644
index 0000000000..9fbd0b4719
--- /dev/null
+++ b/tools/editor/icons/2x/icon_tile_set.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_viewport_texture.png b/tools/editor/icons/2x/icon_viewport_texture.png
new file mode 100644
index 0000000000..f798f1d221
--- /dev/null
+++ b/tools/editor/icons/2x/icon_viewport_texture.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_world.png b/tools/editor/icons/2x/icon_world.png
new file mode 100644
index 0000000000..51b587c01e
--- /dev/null
+++ b/tools/editor/icons/2x/icon_world.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_world_2d.png b/tools/editor/icons/2x/icon_world_2d.png
new file mode 100644
index 0000000000..e9cfa10461
--- /dev/null
+++ b/tools/editor/icons/2x/icon_world_2d.png
Binary files differ
diff --git a/tools/editor/icons/SCsub b/tools/editor/icons/SCsub
index af6ebd67fd..f86ae2b10d 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/icons/icon_bit_map.png b/tools/editor/icons/icon_bit_map.png
new file mode 100644
index 0000000000..50dd8157d1
--- /dev/null
+++ b/tools/editor/icons/icon_bit_map.png
Binary files differ
diff --git a/tools/editor/icons/icon_cube_map.png b/tools/editor/icons/icon_cube_map.png
new file mode 100644
index 0000000000..9c4c6fdc9f
--- /dev/null
+++ b/tools/editor/icons/icon_cube_map.png
Binary files differ
diff --git a/tools/editor/icons/icon_curve_2d.png b/tools/editor/icons/icon_curve_2d.png
new file mode 100644
index 0000000000..ce46dcaad4
--- /dev/null
+++ b/tools/editor/icons/icon_curve_2d.png
Binary files differ
diff --git a/tools/editor/icons/icon_curve_3d.png b/tools/editor/icons/icon_curve_3d.png
new file mode 100644
index 0000000000..561837e4de
--- /dev/null
+++ b/tools/editor/icons/icon_curve_3d.png
Binary files differ
diff --git a/tools/editor/icons/icon_environment.png b/tools/editor/icons/icon_environment.png
new file mode 100644
index 0000000000..c8c4da3e8f
--- /dev/null
+++ b/tools/editor/icons/icon_environment.png
Binary files differ
diff --git a/tools/editor/icons/icon_fixed_spatial_material.png b/tools/editor/icons/icon_fixed_spatial_material.png
new file mode 100644
index 0000000000..2e52c45a46
--- /dev/null
+++ b/tools/editor/icons/icon_fixed_spatial_material.png
Binary files differ
diff --git a/tools/editor/icons/icon_g_i_probe.png b/tools/editor/icons/icon_g_i_probe.png
new file mode 100644
index 0000000000..a15ae18675
--- /dev/null
+++ b/tools/editor/icons/icon_g_i_probe.png
Binary files differ
diff --git a/tools/editor/icons/icon_g_i_probe_data.png b/tools/editor/icons/icon_g_i_probe_data.png
new file mode 100644
index 0000000000..0aabcc49cb
--- /dev/null
+++ b/tools/editor/icons/icon_g_i_probe_data.png
Binary files differ
diff --git a/tools/editor/icons/icon_image_sky_box.png b/tools/editor/icons/icon_image_sky_box.png
new file mode 100644
index 0000000000..cf80258577
--- /dev/null
+++ b/tools/editor/icons/icon_image_sky_box.png
Binary files differ
diff --git a/tools/editor/icons/icon_interp_wrap_clamp.png b/tools/editor/icons/icon_interp_wrap_clamp.png
new file mode 100644
index 0000000000..1024bd7d29
--- /dev/null
+++ b/tools/editor/icons/icon_interp_wrap_clamp.png
Binary files differ
diff --git a/tools/editor/icons/icon_interp_wrap_loop.png b/tools/editor/icons/icon_interp_wrap_loop.png
new file mode 100644
index 0000000000..3a7ddacdb2
--- /dev/null
+++ b/tools/editor/icons/icon_interp_wrap_loop.png
Binary files differ
diff --git a/tools/editor/icons/icon_joystick.png b/tools/editor/icons/icon_joypad.png
index 5df471109a..5df471109a 100644
--- a/tools/editor/icons/icon_joystick.png
+++ b/tools/editor/icons/icon_joypad.png
Binary files differ
diff --git a/tools/editor/icons/icon_large_texture.png b/tools/editor/icons/icon_large_texture.png
new file mode 100644
index 0000000000..1727e2409f
--- /dev/null
+++ b/tools/editor/icons/icon_large_texture.png
Binary files differ
diff --git a/tools/editor/icons/icon_load.png b/tools/editor/icons/icon_load.png
index 98da8135f2..81835efa25 100644
--- a/tools/editor/icons/icon_load.png
+++ b/tools/editor/icons/icon_load.png
Binary files differ
diff --git a/tools/editor/icons/icon_mesh_library.png b/tools/editor/icons/icon_mesh_library.png
new file mode 100644
index 0000000000..0bb37b1da3
--- /dev/null
+++ b/tools/editor/icons/icon_mesh_library.png
Binary files differ
diff --git a/tools/editor/icons/icon_navigation_mesh.png b/tools/editor/icons/icon_navigation_mesh.png
new file mode 100644
index 0000000000..e3bb7f775f
--- /dev/null
+++ b/tools/editor/icons/icon_navigation_mesh.png
Binary files differ
diff --git a/tools/editor/icons/icon_navigation_polygon.png b/tools/editor/icons/icon_navigation_polygon.png
new file mode 100644
index 0000000000..bfc4bfb542
--- /dev/null
+++ b/tools/editor/icons/icon_navigation_polygon.png
Binary files differ
diff --git a/tools/editor/icons/icon_open.png b/tools/editor/icons/icon_open.png
new file mode 100644
index 0000000000..cc05e98ebb
--- /dev/null
+++ b/tools/editor/icons/icon_open.png
Binary files differ
diff --git a/tools/editor/icons/icon_packed_data_container.png b/tools/editor/icons/icon_packed_data_container.png
new file mode 100644
index 0000000000..af89da48a9
--- /dev/null
+++ b/tools/editor/icons/icon_packed_data_container.png
Binary files differ
diff --git a/tools/editor/icons/icon_particles_shader.png b/tools/editor/icons/icon_particles_shader.png
new file mode 100644
index 0000000000..3b5c5644b2
--- /dev/null
+++ b/tools/editor/icons/icon_particles_shader.png
Binary files differ
diff --git a/tools/editor/icons/icon_polygon_path_finder.png b/tools/editor/icons/icon_polygon_path_finder.png
new file mode 100644
index 0000000000..9d76d872db
--- /dev/null
+++ b/tools/editor/icons/icon_polygon_path_finder.png
Binary files differ
diff --git a/tools/editor/icons/icon_reflection_probe.png b/tools/editor/icons/icon_reflection_probe.png
new file mode 100644
index 0000000000..a6646114fb
--- /dev/null
+++ b/tools/editor/icons/icon_reflection_probe.png
Binary files differ
diff --git a/tools/editor/icons/icon_room.png b/tools/editor/icons/icon_room.png
index 9390391279..840db145fd 100644
--- a/tools/editor/icons/icon_room.png
+++ b/tools/editor/icons/icon_room.png
Binary files differ
diff --git a/tools/editor/icons/icon_room_bounds.png b/tools/editor/icons/icon_room_bounds.png
new file mode 100644
index 0000000000..15b198e821
--- /dev/null
+++ b/tools/editor/icons/icon_room_bounds.png
Binary files differ
diff --git a/tools/editor/icons/icon_sample_library.png b/tools/editor/icons/icon_sample_library.png
new file mode 100644
index 0000000000..5921aa86e7
--- /dev/null
+++ b/tools/editor/icons/icon_sample_library.png
Binary files differ
diff --git a/tools/editor/icons/icon_script_create.png b/tools/editor/icons/icon_script_create.png
index f5d8b0cfd6..86c19f748b 100644
--- a/tools/editor/icons/icon_script_create.png
+++ b/tools/editor/icons/icon_script_create.png
Binary files differ
diff --git a/tools/editor/icons/icon_short_cut.png b/tools/editor/icons/icon_short_cut.png
new file mode 100644
index 0000000000..22e15c3889
--- /dev/null
+++ b/tools/editor/icons/icon_short_cut.png
Binary files differ
diff --git a/tools/editor/icons/icon_spatial_shader.png b/tools/editor/icons/icon_spatial_shader.png
new file mode 100644
index 0000000000..7608fc9036
--- /dev/null
+++ b/tools/editor/icons/icon_spatial_shader.png
Binary files differ
diff --git a/tools/editor/icons/icon_sprite_frames.png b/tools/editor/icons/icon_sprite_frames.png
new file mode 100644
index 0000000000..5576b24f2e
--- /dev/null
+++ b/tools/editor/icons/icon_sprite_frames.png
Binary files differ
diff --git a/tools/editor/icons/icon_style_box_empty.png b/tools/editor/icons/icon_style_box_empty.png
new file mode 100644
index 0000000000..f595eaaa57
--- /dev/null
+++ b/tools/editor/icons/icon_style_box_empty.png
Binary files differ
diff --git a/tools/editor/icons/icon_style_box_flat.png b/tools/editor/icons/icon_style_box_flat.png
new file mode 100644
index 0000000000..6ec6a6dd35
--- /dev/null
+++ b/tools/editor/icons/icon_style_box_flat.png
Binary files differ
diff --git a/tools/editor/icons/icon_style_box_texture.png b/tools/editor/icons/icon_style_box_texture.png
new file mode 100644
index 0000000000..f649508418
--- /dev/null
+++ b/tools/editor/icons/icon_style_box_texture.png
Binary files differ
diff --git a/tools/editor/icons/icon_test_cube.png b/tools/editor/icons/icon_test_cube.png
index 6a16fb5092..4d11a69c3e 100644
--- a/tools/editor/icons/icon_test_cube.png
+++ b/tools/editor/icons/icon_test_cube.png
Binary files differ
diff --git a/tools/editor/icons/icon_theme.png b/tools/editor/icons/icon_theme.png
new file mode 100644
index 0000000000..55d799c722
--- /dev/null
+++ b/tools/editor/icons/icon_theme.png
Binary files differ
diff --git a/tools/editor/icons/icon_tile_set.png b/tools/editor/icons/icon_tile_set.png
new file mode 100644
index 0000000000..a1c3fccddd
--- /dev/null
+++ b/tools/editor/icons/icon_tile_set.png
Binary files differ
diff --git a/tools/editor/icons/icon_viewport_texture.png b/tools/editor/icons/icon_viewport_texture.png
new file mode 100644
index 0000000000..ae744cc407
--- /dev/null
+++ b/tools/editor/icons/icon_viewport_texture.png
Binary files differ
diff --git a/tools/editor/icons/icon_world.png b/tools/editor/icons/icon_world.png
new file mode 100644
index 0000000000..d54b979cad
--- /dev/null
+++ b/tools/editor/icons/icon_world.png
Binary files differ
diff --git a/tools/editor/icons/icon_world_2d.png b/tools/editor/icons/icon_world_2d.png
new file mode 100644
index 0000000000..ebe54262ff
--- /dev/null
+++ b/tools/editor/icons/icon_world_2d.png
Binary files differ
diff --git a/tools/editor/icons/source/icon_bit_map.svg b/tools/editor/icons/source/icon_bit_map.svg
new file mode 100644
index 0000000000..fbaf573af6
--- /dev/null
+++ b/tools/editor/icons/source/icon_bit_map.svg
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collision_shape.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_bit_map.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="32"
+ inkscape:cx="-0.178935"
+ inkscape:cy="8.367044"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:object-paths="false"
+ inkscape:snap-intersection-paths="false"
+ inkscape:object-nodes="true"
+ inkscape:snap-smooth-nodes="true"
+ inkscape:snap-midpoints="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 1 1 L 1 3 L 3 3 L 3 1 L 1 1 z M 3 3 L 3 5 L 5 5 L 5 3 L 3 3 z M 5 3 L 7 3 L 7 1 L 5 1 L 5 3 z M 7 3 L 7 5 L 9 5 L 9 3 L 7 3 z M 9 3 L 11 3 L 11 1 L 9 1 L 9 3 z M 11 3 L 11 5 L 13 5 L 13 3 L 11 3 z M 13 3 L 15 3 L 15 1 L 13 1 L 13 3 z M 13 5 L 13 7 L 15 7 L 15 5 L 13 5 z M 13 7 L 11 7 L 11 9 L 13 9 L 13 7 z M 13 9 L 13 11 L 15 11 L 15 9 L 13 9 z M 13 11 L 11 11 L 11 13 L 13 13 L 13 11 z M 13 13 L 13 15 L 15 15 L 15 13 L 13 13 z M 11 13 L 9 13 L 9 15 L 11 15 L 11 13 z M 9 13 L 9 11 L 7 11 L 7 13 L 9 13 z M 7 13 L 5 13 L 5 15 L 7 15 L 7 13 z M 5 13 L 5 11 L 3 11 L 3 13 L 5 13 z M 3 13 L 1 13 L 1 15 L 3 15 L 3 13 z M 3 11 L 3 9 L 1 9 L 1 11 L 3 11 z M 3 9 L 5 9 L 5 7 L 3 7 L 3 9 z M 3 7 L 3 5 L 1 5 L 1 7 L 3 7 z M 5 7 L 7 7 L 7 5 L 5 5 L 5 7 z M 7 7 L 7 9 L 9 9 L 9 7 L 7 7 z M 9 7 L 11 7 L 11 5 L 9 5 L 9 7 z M 9 9 L 9 11 L 11 11 L 11 9 L 9 9 z M 7 9 L 5 9 L 5 11 L 7 11 L 7 9 z "
+ id="rect4170"
+ transform="translate(0,1036.3622)" />
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_cube_map.svg b/tools/editor/icons/source/icon_cube_map.svg
new file mode 100644
index 0000000000..4fd86b1233
--- /dev/null
+++ b/tools/editor/icons/source/icon_cube_map.svg
@@ -0,0 +1,120 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ sodipodi:docname="icon_cube_map.svg"
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_box_shape.png"
+ inkscape:version="0.91 r13725"
+ version="1.1"
+ id="svg2"
+ viewBox="0 0 16 16"
+ height="16"
+ width="16">
+ <sodipodi:namedview
+ inkscape:snap-smooth-nodes="true"
+ inkscape:object-nodes="true"
+ inkscape:snap-intersection-paths="false"
+ inkscape:object-paths="false"
+ inkscape:window-maximized="1"
+ inkscape:window-y="27"
+ inkscape:window-x="0"
+ inkscape:window-height="1016"
+ inkscape:window-width="1920"
+ inkscape:snap-center="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:bbox-nodes="true"
+ inkscape:bbox-paths="true"
+ inkscape:snap-bbox="true"
+ units="px"
+ showgrid="true"
+ inkscape:current-layer="layer1"
+ inkscape:document-units="px"
+ inkscape:cy="11.01934"
+ inkscape:cx="19.581751"
+ inkscape:zoom="16"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ inkscape:snap-midpoints="true">
+ <inkscape:grid
+ id="grid3336"
+ type="xygrid"
+ empspacing="4" />
+ </sodipodi:namedview>
+ <defs
+ id="defs4" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ transform="translate(0,-1036.3622)"
+ id="layer1"
+ inkscape:groupmode="layer"
+ inkscape:label="Layer 1">
+ <rect
+ style="opacity:1;fill:#84ffb1;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4161"
+ width="4"
+ height="4"
+ x="0"
+ y="1042.3622" />
+ <rect
+ y="1042.3622"
+ x="4"
+ height="4"
+ width="4"
+ id="rect4167"
+ style="opacity:1;fill:#ff8484;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ style="opacity:1;fill:#84ffb1;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4169"
+ width="4"
+ height="4"
+ x="8"
+ y="1042.3622" />
+ <rect
+ y="1042.3622"
+ x="12"
+ height="4"
+ width="4"
+ id="rect4171"
+ style="opacity:1;fill:#ff8484;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ style="opacity:1;fill:#84c2ff;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4173"
+ width="4"
+ height="4"
+ x="4"
+ y="1038.3622" />
+ <rect
+ y="1046.3622"
+ x="4"
+ height="4"
+ width="4"
+ id="rect4175"
+ style="opacity:1;fill:#84c2ff;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_curve_2d.svg b/tools/editor/icons/source/icon_curve_2d.svg
new file mode 100644
index 0000000000..34719e37de
--- /dev/null
+++ b/tools/editor/icons/source/icon_curve_2d.svg
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ sodipodi:docname="icon_curve_2d.svg"
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_box_shape.png"
+ inkscape:version="0.91 r13725"
+ version="1.1"
+ id="svg2"
+ viewBox="0 0 16 16"
+ height="16"
+ width="16">
+ <sodipodi:namedview
+ inkscape:snap-smooth-nodes="false"
+ inkscape:object-nodes="false"
+ inkscape:snap-intersection-paths="false"
+ inkscape:object-paths="false"
+ inkscape:window-maximized="1"
+ inkscape:window-y="27"
+ inkscape:window-x="0"
+ inkscape:window-height="1016"
+ inkscape:window-width="1920"
+ inkscape:snap-center="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:bbox-nodes="true"
+ inkscape:bbox-paths="true"
+ inkscape:snap-bbox="true"
+ units="px"
+ showgrid="true"
+ inkscape:current-layer="layer1"
+ inkscape:document-units="px"
+ inkscape:cy="7.8406355"
+ inkscape:cx="5.0331401"
+ inkscape:zoom="22.627416"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base">
+ <inkscape:grid
+ id="grid3336"
+ type="xygrid"
+ empspacing="4" />
+ </sodipodi:namedview>
+ <defs
+ id="defs4" />
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ transform="translate(0,-1036.3622)"
+ id="layer1"
+ inkscape:groupmode="layer"
+ inkscape:label="Layer 1">
+ <path
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+ d="m 14,1037.3613 c -3.166667,0 -5.1044619,0.854 -6.0820312,2.3203 C 6.9403994,1041.148 7,1042.8613 7,1044.3613 c 0,1.5 -0.059601,2.7867 -0.5820312,3.5703 -0.5224307,0.7837 -1.5846355,1.4297 -4.4179688,1.4297 a 1.0001,1.0001 0 1 0 0,2 c 3.1666667,0 5.1044619,-0.8539 6.0820312,-2.3203 C 9.0596006,1047.5747 9,1045.8613 9,1044.3613 c 0,-1.5 0.059601,-2.7866 0.5820312,-3.5703 0.5224308,-0.7836 1.5846358,-1.4297 4.4179688,-1.4297 a 1.0001,1.0001 0 1 0 0,-2 z"
+ id="path4154"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_curve_3d.svg b/tools/editor/icons/source/icon_curve_3d.svg
new file mode 100644
index 0000000000..66034968b2
--- /dev/null
+++ b/tools/editor/icons/source/icon_curve_3d.svg
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collision_shape.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_curve_3d.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="45.254834"
+ inkscape:cx="8.9774722"
+ inkscape:cy="7.1326353"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:object-paths="false"
+ inkscape:snap-intersection-paths="false"
+ inkscape:object-nodes="true"
+ inkscape:snap-smooth-nodes="true"
+ inkscape:snap-midpoints="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+ d="m 8.0039062,1037.3555 a 1.0001,1.0001 0 0 0 -0.4511718,0.1113 l -6,3 a 1.0001,1.0001 0 0 0 0,1.7891 l 6,3 a 1.0001,1.0001 0 0 0 0.8945312,0 L 13,1042.9805 l 0,3.7636 -5,2.5 -5.5527344,-2.7773 a 1.0001331,1.0001331 0 0 0 -0.8945312,1.7891 l 6,3 a 1.0001,1.0001 0 0 0 0.8945312,0 l 6.0000004,-3 A 1.0001,1.0001 0 0 0 15,1047.3613 l 0,-6 a 1.0001,1.0001 0 0 0 -1.447266,-0.8945 L 8,1043.2441 l -3.7636719,-1.8828 4.2109375,-2.1054 a 1.0001,1.0001 0 0 0 -0.4433594,-1.9004 z"
+ id="path4160"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_environment.svg b/tools/editor/icons/source/icon_environment.svg
new file mode 100644
index 0000000000..45add2c7f7
--- /dev/null
+++ b/tools/editor/icons/source/icon_environment.svg
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/icon_node_2d.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_environment.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="16"
+ inkscape:cx="10.741006"
+ inkscape:cy="10.690232"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:object-paths="true"
+ inkscape:snap-intersection-paths="true"
+ inkscape:object-nodes="true"
+ inkscape:snap-smooth-nodes="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336"
+ empspacing="4" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ style="opacity:1;fill:#e1e1e1;fill-opacity:0.99215686;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843"
+ d="M 8 1 A 7 7 0 0 0 1 8 A 7 7 0 0 0 8 15 A 7 7 0 0 0 15 8 A 7 7 0 0 0 8 1 z M 7.0273438 2.0820312 C 6.3462908 2.6213949 5.3431503 3.5860946 4.6757812 5 L 2.8105469 5 A 6 6 0 0 1 7.0273438 2.0820312 z M 8.9785156 2.0859375 A 6 6 0 0 1 13.1875 5 L 11.324219 5 C 10.658501 3.5895934 9.6595492 2.6261235 8.9785156 2.0859375 z M 8 2.6054688 C 8.3858776 2.856627 9.3974911 3.6104334 10.185547 5 L 5.8144531 5 C 6.6025089 3.6104334 7.6141224 2.856627 8 2.6054688 z M 2.3515625 6 L 4.2949219 6 C 4.1145279 6.6059544 4 7.2695302 4 8 C 4 8.7306855 4.1144398 9.3938115 4.2949219 10 L 2.3496094 10 A 6 6 0 0 1 2 8 A 6 6 0 0 1 2.3515625 6 z M 5.3398438 6 L 10.660156 6 C 10.868048 6.5934731 11 7.2583063 11 8 C 11 8.7421382 10.866303 9.4061377 10.658203 10 L 5.3417969 10 C 5.1336971 9.4061377 5 8.7421382 5 8 C 5 7.2583063 5.1319522 6.5934731 5.3398438 6 z M 11.705078 6 L 13.650391 6 A 6 6 0 0 1 14 8 A 6 6 0 0 1 13.648438 10 L 11.705078 10 C 11.88556 9.3938115 12 8.7306855 12 8 C 12 7.2695302 11.885472 6.6059544 11.705078 6 z M 2.8125 11 L 4.6777344 11 C 5.343895 12.410381 6.3427806 13.374042 7.0234375 13.914062 A 6 6 0 0 1 2.8125 11 z M 5.8144531 11 L 10.185547 11 C 9.3971916 12.390235 8.3853773 13.145488 8 13.396484 C 7.6146227 13.145488 6.6028084 12.390235 5.8144531 11 z M 11.322266 11 L 13.189453 11 A 6 6 0 0 1 8.9707031 13.917969 C 9.651376 13.378771 10.654456 12.413873 11.322266 11 z "
+ transform="translate(0,1036.3622)"
+ id="path4158" />
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_fixed_spatial_material.svg b/tools/editor/icons/source/icon_fixed_spatial_material.svg
new file mode 100644
index 0000000000..575b0d06c6
--- /dev/null
+++ b/tools/editor/icons/source/icon_fixed_spatial_material.svg
@@ -0,0 +1,147 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collision_shape.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_fixed_spatial_material.svg">
+ <defs
+ id="defs4">
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4257">
+ <stop
+ style="stop-color:#ff70ac;stop-opacity:1"
+ offset="0"
+ id="stop4259" />
+ <stop
+ id="stop4273"
+ offset="0.17862372"
+ style="stop-color:#9f70ff;stop-opacity:1" />
+ <stop
+ id="stop4271"
+ offset="0.3572498"
+ style="stop-color:#70deff;stop-opacity:1" />
+ <stop
+ id="stop4269"
+ offset="0.53587586"
+ style="stop-color:#70ffb9;stop-opacity:1" />
+ <stop
+ id="stop4267"
+ offset="0.71450192"
+ style="stop-color:#9dff70;stop-opacity:1" />
+ <stop
+ id="stop4265"
+ offset="0.89312798"
+ style="stop-color:#ffeb70;stop-opacity:1" />
+ <stop
+ style="stop-color:#ff7070;stop-opacity:1"
+ offset="1"
+ id="stop4261" />
+ </linearGradient>
+ <clipPath
+ id="clipPath4189"
+ clipPathUnits="userSpaceOnUse">
+ <path
+ inkscape:connector-curvature="0"
+ id="path4191"
+ d="m 6.3750001,1025.8622 a 1.6876688,1.5001498 0 0 0 -1.6875,1.5 l 0,18 a 1.6876688,1.5001498 0 0 0 1.6875,1.5 l 10.1217039,0 c -0.747392,-0.8796 -1.304338,-1.8888 -1.562256,-3 l -6.8719479,0 0,-15 16.8749999,0 0,3.3486 a 3.4281247,3.0472216 0 0 1 1.282105,1.1279 c 0.537834,0.828 1.294284,1.677 2.092895,2.5723 l 0,-8.5488 a 1.6876688,1.5001498 0 0 0 -1.6875,-1.5 l -20.2499999,0 z m 11.8124999,4.5 0,1.5 -1.6875,0 0,1.5 -3.375,0 0,1.5 -1.6875,0 0,1.5 -1.6874999,0 0,1.5 3.3749999,0 3.375,0 0.02637,0 c 0.246127,-0.317 0.496441,-0.6239 0.738282,-0.9053 1.145331,-1.3327 2.270672,-2.4711 3.015746,-3.6182 a 3.4281247,3.0472216 0 0 1 1.282105,-1.1279 l 0,-0.3486 -1.6875,0 0,-1.5 -1.6875,0 z m 5.0625,4.5 c -1.948558,3 -5.0625,5.0146 -5.0625,7.5 0,2.4853 2.266559,4.5 5.0625,4.5 2.795941,0 5.0625,-2.0147 5.0625,-4.5 0,-2.4854 -3.113942,-4.5 -5.0625,-7.5 z"
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate" />
+ </clipPath>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4257"
+ id="radialGradient4263"
+ cx="13.333239"
+ cy="1043.3622"
+ fx="13.333239"
+ fy="1043.3622"
+ r="7"
+ gradientUnits="userSpaceOnUse"
+ gradientTransform="matrix(-0.93305925,0.79975529,-0.85714494,-0.99999821,914.75331,2076.0592)" />
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="22.627417"
+ inkscape:cx="12.314693"
+ inkscape:cy="10.250946"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:object-paths="false"
+ inkscape:snap-intersection-paths="false"
+ inkscape:object-nodes="false"
+ inkscape:snap-smooth-nodes="false"
+ inkscape:snap-midpoints="false">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ inkscape:connector-curvature="0"
+ style="fill:url(#radialGradient4263);fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 8,1037.3622 -7,3 0,8 7,3 7,-3 0,-8 -7,-3 z"
+ id="path4151" />
+ <path
+ style="fill:#ffffff;fill-opacity:0.72222221;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 1,1040.3622 7,3 7,-3 -7,-3 z"
+ id="path4149"
+ inkscape:connector-curvature="0" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path4145"
+ d="m 8,1051.3622 7,-3 0,-8 -7,3 z"
+ style="fill:#000000;fill-opacity:0.46969697;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ sodipodi:nodetypes="ccccc" />
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_g_i_probe.svg b/tools/editor/icons/source/icon_g_i_probe.svg
new file mode 100644
index 0000000000..d803a5f63d
--- /dev/null
+++ b/tools/editor/icons/source/icon_g_i_probe.svg
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collision_shape.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_g_i_probe.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="32"
+ inkscape:cx="4.4024065"
+ inkscape:cy="8.249577"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:object-paths="false"
+ inkscape:snap-intersection-paths="false"
+ inkscape:object-nodes="true"
+ inkscape:snap-smooth-nodes="true"
+ inkscape:snap-midpoints="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ style="opacity:1;fill:#fc9c9c;fill-opacity:0.99607843;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.99607843"
+ d="m 11,1040.3622 a 3.9999826,3.9999826 0 0 0 -4,4 3.9999826,3.9999826 0 0 0 4,4 3.9999826,3.9999826 0 0 0 4,-4 3.9999826,3.9999826 0 0 0 -4,-4 z m 0,2 a 2.0000174,2.0000174 0 0 1 2,2 2.0000174,2.0000174 0 0 1 -2,2 2.0000174,2.0000174 0 0 1 -2,-2 2.0000174,2.0000174 0 0 1 2,-2 z"
+ id="path4255"
+ inkscape:connector-curvature="0" />
+ <rect
+ style="opacity:1;fill:#fc9c9c;fill-opacity:0.99607843;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.99607843"
+ id="rect4265"
+ width="4"
+ height="2.0000348"
+ x="9"
+ y="1046.3622" />
+ <rect
+ style="opacity:1;fill:#fc9c9c;fill-opacity:0.99607843;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.99607843"
+ id="rect4269"
+ width="2"
+ height="1.0000174"
+ x="10"
+ y="1050.3622" />
+ <rect
+ y="1047.3622"
+ x="9"
+ height="2.0000348"
+ width="4"
+ id="rect4274"
+ style="opacity:1;fill:#fc9c9c;fill-opacity:0.99607843;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.99607843"
+ ry="1.0000174" />
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#fc9c9c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 6,1050.3622 -4,0 0,-12 10,0"
+ id="path4293"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccc" />
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_g_i_probe_data.svg b/tools/editor/icons/source/icon_g_i_probe_data.svg
new file mode 100644
index 0000000000..96fa62723c
--- /dev/null
+++ b/tools/editor/icons/source/icon_g_i_probe_data.svg
@@ -0,0 +1,108 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collision_shape.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_g_i_probe_data.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="32"
+ inkscape:cx="11.914815"
+ inkscape:cy="6.460794"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:object-paths="false"
+ inkscape:snap-intersection-paths="false"
+ inkscape:object-nodes="true"
+ inkscape:snap-smooth-nodes="true"
+ inkscape:snap-midpoints="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.99607843"
+ d="M 11 4 A 3.9999826 3.9999826 0 0 0 7 8 A 3.9999826 3.9999826 0 0 0 9 11.458984 L 9 12 C 9 12.55401 9.4459904 13 10 13 L 12 13 C 12.55401 13 13 12.55401 13 12 L 13 11.458984 A 3.9999826 3.9999826 0 0 0 15 8 A 3.9999826 3.9999826 0 0 0 11 4 z M 11 6 A 2.0000174 2.0000174 0 0 1 13 8 A 2.0000174 2.0000174 0 0 1 11 10 A 2.0000174 2.0000174 0 0 1 9 8 A 2.0000174 2.0000174 0 0 1 11 6 z M 10 14 L 10 15 L 12 15 L 12 14 L 10 14 z "
+ transform="translate(0,1036.3622)"
+ id="path4255" />
+ <path
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+ d="m 2,1037.3613 a 1.0001,1.0001 0 0 0 -1,1 l 0,12 a 1.0001,1.0001 0 0 0 1,1 l 4,0 0,-2 -3,0 0,-10 9,0 0,-2 -10,0 z"
+ id="path4293"
+ inkscape:connector-curvature="0" />
+ <rect
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4170"
+ width="2"
+ height="2"
+ x="4"
+ y="1040.3622" />
+ <rect
+ y="1043.3622"
+ x="4"
+ height="2"
+ width="2"
+ id="rect4172"
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4174"
+ width="2"
+ height="2"
+ x="4"
+ y="1046.3622" />
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_image_sky_box.svg b/tools/editor/icons/source/icon_image_sky_box.svg
new file mode 100644
index 0000000000..9a89c04e58
--- /dev/null
+++ b/tools/editor/icons/source/icon_image_sky_box.svg
@@ -0,0 +1,116 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:xlink="http://www.w3.org/1999/xlink"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ sodipodi:docname="icon_image_sky_box.svg"
+ inkscape:export-ydpi="90"
+ inkscape:export-xdpi="90"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_box_shape.png"
+ inkscape:version="0.91 r13725"
+ version="1.1"
+ id="svg2"
+ viewBox="0 0 16 16"
+ height="16"
+ width="16">
+ <sodipodi:namedview
+ inkscape:snap-smooth-nodes="true"
+ inkscape:object-nodes="true"
+ inkscape:snap-intersection-paths="false"
+ inkscape:object-paths="false"
+ inkscape:window-maximized="1"
+ inkscape:window-y="27"
+ inkscape:window-x="0"
+ inkscape:window-height="1016"
+ inkscape:window-width="1920"
+ inkscape:snap-center="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:bbox-nodes="true"
+ inkscape:bbox-paths="true"
+ inkscape:snap-bbox="true"
+ units="px"
+ showgrid="true"
+ inkscape:current-layer="layer1"
+ inkscape:document-units="px"
+ inkscape:cy="9.413879"
+ inkscape:cx="10.701686"
+ inkscape:zoom="32"
+ inkscape:pageshadow="2"
+ inkscape:pageopacity="0.0"
+ borderopacity="1.0"
+ bordercolor="#666666"
+ pagecolor="#ffffff"
+ id="base"
+ inkscape:snap-midpoints="true">
+ <inkscape:grid
+ id="grid3336"
+ type="xygrid"
+ empspacing="4" />
+ </sodipodi:namedview>
+ <defs
+ id="defs4">
+ <linearGradient
+ inkscape:collect="always"
+ id="linearGradient4142">
+ <stop
+ style="stop-color:#84c2ff;stop-opacity:1"
+ offset="0"
+ id="stop4144" />
+ <stop
+ style="stop-color:#46a3ff;stop-opacity:1"
+ offset="1"
+ id="stop4146" />
+ </linearGradient>
+ <radialGradient
+ inkscape:collect="always"
+ xlink:href="#linearGradient4142"
+ id="radialGradient4148"
+ cx="9.9399967"
+ cy="1051.0801"
+ fx="9.9399967"
+ fy="1051.0801"
+ r="7"
+ gradientTransform="matrix(1.3337828e-5,-1.9999995,1.5714282,2.7945105e-6,-1643.697,1071.2392)"
+ gradientUnits="userSpaceOnUse" />
+ </defs>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ transform="translate(0,-1036.3622)"
+ id="layer1"
+ inkscape:groupmode="layer"
+ inkscape:label="Layer 1">
+ <rect
+ style="opacity:1;fill:url(#radialGradient4148);fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4140"
+ width="14"
+ height="13.999983"
+ x="1"
+ y="1037.3622"
+ ry="2.0000174" />
+ <path
+ style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 6 4 A 1 1 0 0 0 5 5 A 1 1 0 0 0 6 6 A 1 1 0 0 0 7 5 A 1 1 0 0 0 6 4 z M 11 5 A 2 2 0 0 0 9 7 A 1 1 0 0 0 8 8 A 1 1 0 0 0 9 9 L 13 9 A 1 1 0 0 0 14 8 A 1 1 0 0 0 13 7 A 2 2 0 0 0 11 5 z M 3 9 A 1 1 0 0 0 2 10 A 1 1 0 0 0 3 11 L 5 11 A 1 1 0 0 0 4 12 A 1 1 0 0 0 5 13 L 8 13 A 1 1 0 0 0 9 12 A 1 1 0 0 0 8 11 L 6 11 A 1 1 0 0 0 7 10 A 1 1 0 0 0 6 9 L 3 9 z "
+ transform="translate(0,1036.3622)"
+ id="path4150" />
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_interp_wrap_clamp.svg b/tools/editor/icons/source/icon_interp_wrap_clamp.svg
new file mode 100644
index 0000000000..068e79ace0
--- /dev/null
+++ b/tools/editor/icons/source/icon_interp_wrap_clamp.svg
@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="8"
+ viewBox="0 0 16 8"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_bone.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_interp_wrap_clamp.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="45.254834"
+ inkscape:cx="8.8989222"
+ inkscape:cy="4.5067976"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ showguides="true"
+ inkscape:snap-smooth-nodes="true"
+ inkscape:object-nodes="true"
+ inkscape:object-paths="true"
+ inkscape:snap-intersection-paths="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1044.3622)">
+ <rect
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4154"
+ width="2"
+ height="5.9999828"
+ x="1"
+ y="1045.3622"
+ rx="1.7382812e-05"
+ ry="1.7382812e-05" />
+ <rect
+ ry="1.7382812e-05"
+ rx="1.7382812e-05"
+ y="1045.3622"
+ x="13"
+ height="5.9999828"
+ width="2"
+ id="rect4156"
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#e0e0e0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
+ d="m 5,1048.3622 6,0"
+ id="path4158"
+ inkscape:connector-curvature="0" />
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#e0e0e0;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 6,1046.3622 -2,2 2,2"
+ id="path4160"
+ inkscape:connector-curvature="0" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path4162"
+ d="m 10,1046.3622 2,2 -2,2"
+ style="fill:none;fill-rule:evenodd;stroke:#e0e0e0;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_interp_wrap_loop.svg b/tools/editor/icons/source/icon_interp_wrap_loop.svg
new file mode 100644
index 0000000000..bfca46331b
--- /dev/null
+++ b/tools/editor/icons/source/icon_interp_wrap_loop.svg
@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="8"
+ viewBox="0 0 16 8"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_bone.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_interp_wrap_loop.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="45.254834"
+ inkscape:cx="7.8700453"
+ inkscape:cy="4.2719762"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ showguides="true"
+ inkscape:snap-smooth-nodes="true"
+ inkscape:object-nodes="true"
+ inkscape:object-paths="true"
+ inkscape:snap-intersection-paths="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1044.3622)">
+ <path
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 12 1 L 12 3 A 1.0000174 1.0000174 0 0 1 13 4 A 1.0000174 1.0000174 0 0 1 12 5 L 12 7 A 3 3 0 0 0 15 4 A 3 3 0 0 0 12 1 z "
+ id="path4159"
+ transform="translate(0,1044.3622)" />
+ <path
+ cx="12"
+ cy="1048.3622"
+ r="3"
+ id="path4161"
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 4 1 A 3 3 0 0 0 1 4 A 3 3 0 0 0 4 7 L 4 5 A 1.0000174 1.0000174 0 0 1 3 4 A 1.0000174 1.0000174 0 0 1 4 3 L 4 1 z "
+ id="path4176"
+ transform="translate(0,1044.3622)" />
+ <rect
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4180"
+ width="3"
+ height="2"
+ x="9"
+ y="1045.3622"
+ rx="6.5185495e-06"
+ ry="1.7382799e-05" />
+ <rect
+ ry="1.7382799e-05"
+ rx="6.5185495e-06"
+ y="1049.3622"
+ x="4"
+ height="2"
+ width="3"
+ id="rect4182"
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ style="fill:#e0e0e0;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
+ d="m 7,1048.3622 0,4 3,-2 z"
+ id="path4186"
+ inkscape:connector-curvature="0" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path4190"
+ d="m 9,1044.3622 0,4 -3,-2 z"
+ style="fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_joystick.svg b/tools/editor/icons/source/icon_joypad.svg
index 5395060175..fb84462919 100644
--- a/tools/editor/icons/source/icon_joystick.svg
+++ b/tools/editor/icons/source/icon_joypad.svg
@@ -18,7 +18,7 @@
inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_key.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
- sodipodi:docname="icon_joystick.svg">
+ sodipodi:docname="icon_joypad.svg">
<defs
id="defs4" />
<sodipodi:namedview
diff --git a/tools/editor/icons/source/icon_large_texture.svg b/tools/editor/icons/source/icon_large_texture.svg
new file mode 100644
index 0000000000..4db0342041
--- /dev/null
+++ b/tools/editor/icons/source/icon_large_texture.svg
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_sprite.png"
+ inkscape:export-xdpi="45"
+ inkscape:export-ydpi="45"
+ sodipodi:docname="icon_large_texture.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="32"
+ inkscape:cx="10.856598"
+ inkscape:cy="8.2673025"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:snap-smooth-nodes="true"
+ inkscape:object-nodes="true"
+ inkscape:snap-intersection-paths="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ style="opacity:1;fill:#e0e0e0;fill-opacity:0.99607843;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843"
+ d="M 1 1 L 1 2 L 1 4 L 2 4 L 2 2 L 4 2 L 4 1 L 1 1 z M 12 1 L 12 2 L 14 2 L 14 4 L 15 4 L 15 1 L 12 1 z M 9 6 L 9 7 L 8 7 L 8 8 L 6 8 L 6 9 L 5 9 L 5 10 L 4 10 L 4 11 L 6 11 L 8 11 L 10 11 L 12 11 L 12 9 L 11 9 L 11 8 L 11 7 L 10 7 L 10 6 L 9 6 z M 1 12 L 1 14 L 1 15 L 4 15 L 4 14 L 2 14 L 2 12 L 1 12 z M 14 12 L 14 14 L 12 14 L 12 15 L 15 15 L 15 14 L 15 12 L 14 12 z "
+ transform="translate(0,1036.3622)"
+ id="rect4179" />
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_load.svg b/tools/editor/icons/source/icon_load.svg
index f8e78fb4ea..395a5c1b8a 100644
--- a/tools/editor/icons/source/icon_load.svg
+++ b/tools/editor/icons/source/icon_load.svg
@@ -29,11 +29,11 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="22.627417"
- inkscape:cx="12.685427"
- inkscape:cy="1.6294402"
+ inkscape:cx="6.3187685"
+ inkscape:cy="7.6629717"
inkscape:document-units="px"
inkscape:current-layer="layer1"
- showgrid="false"
+ showgrid="true"
units="px"
inkscape:snap-bbox="true"
inkscape:bbox-paths="true"
@@ -43,9 +43,9 @@
inkscape:snap-object-midpoints="true"
inkscape:snap-center="true"
inkscape:window-width="1920"
- inkscape:window-height="1119"
+ inkscape:window-height="1016"
inkscape:window-x="0"
- inkscape:window-y="26"
+ inkscape:window-y="27"
inkscape:window-maximized="1"
inkscape:snap-smooth-nodes="true"
inkscape:object-nodes="true"
@@ -53,8 +53,8 @@
<inkscape:grid
type="xygrid"
id="grid3336"
- spacingx="0.5"
- spacingy="0.5"
+ spacingx="1"
+ spacingy="1"
empspacing="2" />
</sodipodi:namedview>
<metadata
@@ -74,12 +74,74 @@
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3622)">
+ <rect
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4153"
+ width="1"
+ height="8.9999657"
+ x="1"
+ y="1040.3622" />
<path
- style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
- d="M 1.5000703,2 C 1.0834036,2 0.7251221,2.1928844 0.4590547,2.4589844 0.1929873,2.7250844 7.03e-5,3.0834 7.03e-5,3.5 l 0.5,8.5 c 0.041565,0.581917 0.1536332,1.110716 0.5214844,1.478516 C 1.3894058,13.846416 1.916737,14 2.5000703,14 l 0.5,0 0.5,0 9.9997657,0 c 0.231666,-10e-5 0.432919,-0.159266 0.486328,-0.384766 l 2,-7.4999996 C 16.060474,5.8013344 15.822456,5.5002 15.499836,5.5 L 4.7559297,5.5 C 4.5236856,5.5003 4.3126587,5.6584963 4.2696015,5.8867188 L 3.0383769,12.412759 C 2.9838992,12.701515 2.7130529,12.963778 2.2988984,12.972656 1.7175274,12.985119 1.5058274,12.46121 1.5000703,12 l -0.5,-8.5 c 0,-0.083 0.057083,-0.2249844 0.1660156,-0.3339844 C 1.2750185,3.0571156 1.416737,3 1.5000703,3 L 12.499836,3 c 0.08333,0 0.225052,0.057016 0.333984,0.1660156 0.108933,0.109 0.224913,0.2750776 0.166016,0.3339844 l 0,1 1,0 0,-1 c 0,-0.4166 -0.192917,-0.7749156 -0.458984,-1.0410156 C 13.274784,2.1928844 12.916503,2 12.499836,2 Z"
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 3,1038.3622 c -1.1045695,0 -2,0.8954 -2,2 l 1,0 c 0,-0.5523 0.4477153,-1 1,-1 z"
+ id="path4155"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccc" />
+ <path
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 6,6 C 5.643017,6.0002824 5.313257,6.1908435 5.1347656,6.5 5.0426478,6.6588009 4.9960226,6.8398957 5,7.0234375 L 4,13 c -0.091144,0.544728 -0.4477153,1 -1,1 l 0,1 9,0 c 1.10457,0 1.818405,-0.910429 2,-2 L 15,7 C 15.003977,6.8164581 14.957352,6.6588009 14.865234,6.5 14.686743,6.1908437 14.356983,6.0002826 14,6 Z"
transform="translate(0,1036.3622)"
- id="path8167"
+ id="rect4159"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="cccsccsscccc" />
+ <rect
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4182"
+ width="2"
+ height="1"
+ x="3"
+ y="1038.3622" />
+ <path
+ sodipodi:nodetypes="ccccc"
inkscape:connector-curvature="0"
- sodipodi:nodetypes="sscccscccccccssscccssssccssss" />
+ id="path4184"
+ d="m 5,1038.3622 c 1.10457,0 2,0.8954 2,2 l -1,0 c 0,-0.5523 -0.4477153,-1 -1,-1 z"
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ sodipodi:nodetypes="ccccc"
+ inkscape:connector-curvature="0"
+ id="path4188"
+ d="m 3,1051.3622 c -1.1045695,0 -2,-0.8954 -2,-2 l 1,0 c 0,0.5523 0.4477153,1 1,1 z"
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ y="1040.3622"
+ x="7"
+ height="1"
+ width="4"
+ id="rect4192"
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ d="M 7,1041.3622 A 1,1 0 0 1 6.2928932,1041.0693 1,1 0 0 1 6,1040.3622 l 1,0 z"
+ sodipodi:end="3.1415927"
+ sodipodi:start="1.5707963"
+ sodipodi:ry="1"
+ sodipodi:rx="1"
+ sodipodi:cy="1040.3622"
+ sodipodi:cx="7"
+ sodipodi:type="arc"
+ id="path4208"
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path4210"
+ sodipodi:type="arc"
+ sodipodi:cx="-11"
+ sodipodi:cy="-1041.3622"
+ sodipodi:rx="1"
+ sodipodi:ry="1"
+ sodipodi:start="1.5707963"
+ sodipodi:end="3.1415927"
+ d="m -11,-1040.3622 a 1,1 0 0 1 -0.707107,-0.2929 A 1,1 0 0 1 -12,-1041.3622 l 1,0 z"
+ transform="scale(-1,-1)" />
</g>
</svg>
diff --git a/tools/editor/icons/source/icon_mesh_library.svg b/tools/editor/icons/source/icon_mesh_library.svg
new file mode 100644
index 0000000000..b908a4db6e
--- /dev/null
+++ b/tools/editor/icons/source/icon_mesh_library.svg
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_node_2d.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_mesh_library.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="31.999999"
+ inkscape:cx="10.839298"
+ inkscape:cy="6.916789"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336"
+ empspacing="4" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ style="opacity:1;fill:#ffd684;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 3 1 A 2 2 0 0 0 1 3 A 2 2 0 0 0 2 4.7304688 L 2 11.271484 A 2 2 0 0 0 1 13 A 2 2 0 0 0 3 15 A 2 2 0 0 0 4.7304688 14 L 7 14 L 7 12 L 4.7285156 12 A 2 2 0 0 0 4 11.269531 L 4 5.4140625 L 7 8.4140625 L 7 8 A 2.0002 2.0002 0 0 1 7.8085938 6.3945312 L 5.4140625 4 L 11.271484 4 A 2 2 0 0 0 12 4.7304688 L 12 6 A 2.0002 2.0002 0 0 1 12.998047 6.2714844 A 2.0002 2.0002 0 0 1 14 6 L 14 4.7285156 A 2 2 0 0 0 15 3 A 2 2 0 0 0 13 1 A 2 2 0 0 0 11.269531 2 L 4.7285156 2 A 2 2 0 0 0 3 1 z M 9 8 L 9 9 L 9 14 L 9 15 L 14 15 C 14.552285 15 15 14.5523 15 14 L 15 9 C 15 8.4477 14.552285 8 14 8 L 14 12 L 13 11 L 12 12 L 12 8 L 9 8 z "
+ transform="translate(0,1036.3622)"
+ id="path4162" />
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_navigation_mesh.svg b/tools/editor/icons/source/icon_navigation_mesh.svg
new file mode 100644
index 0000000000..31ab5df8ad
--- /dev/null
+++ b/tools/editor/icons/source/icon_navigation_mesh.svg
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_node_2d.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_navigation_mesh.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="31.999999"
+ inkscape:cx="9.4708391"
+ inkscape:cy="9.3796697"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336"
+ empspacing="4" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ style="opacity:1;fill:#ffd684;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 3 1 A 2 2 0 0 0 1 3 A 2 2 0 0 0 2 4.7304688 L 2 11.271484 A 2 2 0 0 0 1 13 A 2 2 0 0 0 3 15 A 2 2 0 0 0 4.7304688 14 L 7.2382812 14 L 7.9882812 12 L 4.7285156 12 A 2 2 0 0 0 4 11.269531 L 4 5.4140625 L 8.6972656 10.111328 L 9.46875 8.0546875 L 5.4140625 4 L 11.271484 4 A 2 2 0 0 0 12 4.7304688 L 12 5.0019531 A 2.0002 2.0002 0 0 1 12.023438 5.0019531 A 2.0002 2.0002 0 0 1 13.873047 6.2988281 L 14 6.6367188 L 14 4.7285156 A 2 2 0 0 0 15 3 A 2 2 0 0 0 13 1 A 2 2 0 0 0 11.269531 2 L 4.7285156 2 A 2 2 0 0 0 3 1 z M 12 7 L 9 15 L 12 13 L 15 15 L 12 7 z "
+ transform="translate(0,1036.3622)"
+ id="path4162" />
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_navigation_polygon.svg b/tools/editor/icons/source/icon_navigation_polygon.svg
new file mode 100644
index 0000000000..f3b6fcbcc3
--- /dev/null
+++ b/tools/editor/icons/source/icon_navigation_polygon.svg
@@ -0,0 +1,88 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collision_2d.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_navigation_polygon.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="22.627416"
+ inkscape:cx="11.686357"
+ inkscape:cy="9.3308993"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <g
+ id="layer1-5"
+ inkscape:label="Layer 1"
+ style="fill:#e0e0e0;fill-opacity:1">
+ <path
+ id="path4144-6"
+ transform="translate(0,1036.3622)"
+ d="M 2,1 A 1.0001,1.0001 0 0 0 1,2 l 0,12 a 1.0001,1.0001 0 0 0 1,1 l 4.9023438,0 A 2.1002099,2.1002099 0 0 1 7.0332031,14.263672 L 7.5078125,13 3,13 3,3 11.585938,3 7.2929688,7.2929688 a 1.0001,1.0001 0 0 0 0,1.4140624 L 8.6191406,10.033203 10.033203,6.2636719 a 2.1002099,2.1002099 0 0 1 1.992188,-1.3613281 2.1002099,2.1002099 0 0 1 0.435547,0.050781 L 14.707031,2.7070312 A 1.0001,1.0001 0 0 0 14,1 L 2,1 Z"
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+ inkscape:connector-curvature="0" />
+ <path
+ inkscape:connector-curvature="0"
+ id="path4163"
+ d="m 15,1051.3622 -3,-8 -3,8 3,-2 z"
+ style="fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
+ </g>
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_packed_data_container.svg b/tools/editor/icons/source/icon_packed_data_container.svg
new file mode 100644
index 0000000000..70aed22f2c
--- /dev/null
+++ b/tools/editor/icons/source/icon_packed_data_container.svg
@@ -0,0 +1,138 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collision_shape.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_packed_data_container.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="22.627417"
+ inkscape:cx="17.645108"
+ inkscape:cy="9.7856584"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:object-paths="false"
+ inkscape:snap-intersection-paths="false"
+ inkscape:object-nodes="true"
+ inkscape:snap-smooth-nodes="true"
+ inkscape:snap-midpoints="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ style="fill:none;fill-rule:evenodd;stroke:#e0e0e0;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-opacity:1;stroke-miterlimit:4;stroke-dasharray:none"
+ d="m 2,1038.3622 0,12 12,0 0,-12 z"
+ id="path4154"
+ inkscape:connector-curvature="0" />
+ <rect
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4167"
+ width="2"
+ height="2.0000174"
+ x="4"
+ y="1040.3622" />
+ <rect
+ y="1043.3622"
+ x="4"
+ height="2.0000174"
+ width="2"
+ id="rect4183"
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4185"
+ width="2"
+ height="2.0000174"
+ x="4"
+ y="1046.3622" />
+ <rect
+ y="1040.3622"
+ x="7"
+ height="2.0000174"
+ width="2"
+ id="rect4187"
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4189"
+ width="2"
+ height="2.0000174"
+ x="7"
+ y="1043.3622" />
+ <rect
+ y="1046.3622"
+ x="7"
+ height="2.0000174"
+ width="2"
+ id="rect4191"
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4193"
+ width="2"
+ height="2.0000174"
+ x="10"
+ y="1040.3622" />
+ <rect
+ y="1043.3622"
+ x="10"
+ height="2.0000174"
+ width="2"
+ id="rect4195"
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_particles_shader.svg b/tools/editor/icons/source/icon_particles_shader.svg
new file mode 100644
index 0000000000..b4c2ef7ccd
--- /dev/null
+++ b/tools/editor/icons/source/icon_particles_shader.svg
@@ -0,0 +1,159 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_node_2d.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_particles_shader.svg">
+ <defs
+ id="defs4">
+ <clipPath
+ clipPathUnits="userSpaceOnUse"
+ id="clipPath4253">
+ <path
+ style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 16.458984,1024.37 a 12.000027,12.000027 0 0 0 -3.564453,0.4004 12.000027,12.000027 0 0 0 -8.4863279,14.6973 12.000027,12.000027 0 0 0 14.6972659,8.4863 12.000027,12.000027 0 0 0 8.486328,-14.6973 12.000027,12.000027 0 0 0 -11.132813,-8.8867 z M 16.25,1029.8212 a 6.5451717,6.5451717 0 0 1 6.072266,4.8476 6.5451717,6.5451717 0 0 1 -4.628907,8.0157 6.5451717,6.5451717 0 0 1 -8.0156246,-4.6289 6.5451717,6.5451717 0 0 1 4.6289066,-8.0157 6.5451717,6.5451717 0 0 1 1.943359,-0.2187 z"
+ id="path4255"
+ inkscape:connector-curvature="0" />
+ </clipPath>
+ <clipPath
+ clipPathUnits="userSpaceOnUse"
+ id="clipPath4199">
+ <path
+ inkscape:connector-curvature="0"
+ id="path4201"
+ d="m 16.5,1025.8622 a 11.8125,10.499999 0 0 0 -11.8125001,10.5 11.8125,10.499999 0 0 0 11.8125001,10.5 11.8125,10.499999 0 0 0 11.8125,-10.5 11.8125,10.499999 0 0 0 -11.8125,-10.5 z m -3.375,3 a 3.375,2.9999997 0 0 1 3.375,3 3.375,2.9999997 0 0 1 -3.375,3 3.375,2.9999997 0 0 1 -3.3750001,-3 3.375,2.9999997 0 0 1 3.3750001,-3 z"
+ style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" />
+ </clipPath>
+ <clipPath
+ clipPathUnits="userSpaceOnUse"
+ id="clipPath4208">
+ <path
+ style="opacity:1;fill:#a5b7f5;fill-opacity:0.98823529;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843"
+ d="M 8,1037.3622 A 4.4999948,4.9999847 0 0 0 3.5859375,1041.3934 3,3 0 0 0 1,1044.3622 a 3,3 0 0 0 3,3 l 8,0 a 3,3 0 0 0 3,-3 3,3 0 0 0 -2.589844,-2.9668 A 4.4999948,4.9999847 0 0 0 8,1037.3622 Z m -4,11 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z m 8,0 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z m -4,1 a 1,1 0 0 0 -1,1 1,1 0 0 0 1,1 1,1 0 0 0 1,-1 1,1 0 0 0 -1,-1 z"
+ id="path4210"
+ inkscape:connector-curvature="0" />
+ </clipPath>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="15.999999"
+ inkscape:cx="8.2922739"
+ inkscape:cy="6.6952763"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:object-paths="true"
+ inkscape:snap-intersection-paths="true"
+ inkscape:object-nodes="true"
+ inkscape:snap-smooth-nodes="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336"
+ empspacing="4" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <g
+ id="g4271"
+ clip-path="url(#clipPath4208)"
+ transform="translate(0,1.8694115e-5)">
+ <rect
+ y="1037.3622"
+ x="0"
+ height="2.0000031"
+ width="16"
+ id="rect4159"
+ style="fill:#ff7070;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ style="fill:#ffeb70;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4161"
+ width="16"
+ height="2.0000029"
+ x="0"
+ y="1039.3622" />
+ <rect
+ style="fill:#9dff70;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4163"
+ width="16"
+ height="1.9999999"
+ x="0"
+ y="1041.3622" />
+ <rect
+ y="1043.3622"
+ x="0"
+ height="2.0000024"
+ width="16"
+ id="rect4165"
+ style="fill:#70ffb9;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ y="1045.3622"
+ x="0"
+ height="2.0000021"
+ width="16"
+ id="rect4167"
+ style="fill:#70deff;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ style="fill:#ff70ac;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4169"
+ width="16"
+ height="1.9999987"
+ x="0"
+ y="1049.3622" />
+ <rect
+ style="fill:#9f70ff;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4146"
+ width="16"
+ height="2.0000021"
+ x="0"
+ y="1047.3622" />
+ </g>
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_polygon_path_finder.svg b/tools/editor/icons/source/icon_polygon_path_finder.svg
new file mode 100644
index 0000000000..c2f8d80c3d
--- /dev/null
+++ b/tools/editor/icons/source/icon_polygon_path_finder.svg
@@ -0,0 +1,77 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collision_2d.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_polygon_path_finder.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="31.999999"
+ inkscape:cx="4.2632138"
+ inkscape:cy="9.710537"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+ d="M 2 1 C 1.4477381 1.0000552 1.0000552 1.4477381 1 2 L 1 3 L 3 3 L 3 1 L 2 1 z M 5 1 L 5 3 L 7 3 L 7 1 L 5 1 z M 9 1 L 9 3 L 11 3 L 11 1 L 9 1 z M 13 1 L 13 3 L 14.414062 3 L 14.707031 2.7070312 C 15.336587 2.0770367 14.890637 1.0003496 14 1 L 13 1 z M 1 5 L 1 7 L 3 7 L 3 5 L 1 5 z M 12 7 L 9 15 L 12 13 L 15 15 L 12 7 z M 1 9 L 1 11 L 3 11 L 3 9 L 1 9 z M 1 13 L 1 14 C 1.0000552 14.552262 1.4477381 14.999945 2 15 L 3 15 L 3 13 L 1 13 z M 5 13 L 5 15 L 6.9023438 15 C 6.9015603 14.748705 6.9458828 14.499309 7.0332031 14.263672 L 7.5078125 13 L 5 13 z "
+ transform="translate(0,1036.3622)"
+ id="path4144" />
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_reflection_probe.svg b/tools/editor/icons/source/icon_reflection_probe.svg
new file mode 100644
index 0000000000..64b6493d6d
--- /dev/null
+++ b/tools/editor/icons/source/icon_reflection_probe.svg
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collision_shape.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_reflection_probe.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="32"
+ inkscape:cx="8.348015"
+ inkscape:cy="11.115501"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:object-paths="false"
+ inkscape:snap-intersection-paths="false"
+ inkscape:object-nodes="true"
+ inkscape:snap-smooth-nodes="true"
+ inkscape:snap-midpoints="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#fc9c9c;fill-opacity:0.99607843;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+ d="M 7.9628906 1.0019531 A 1.0001 1.0001 0 0 0 7.5527344 1.1054688 L 1.5527344 4.1054688 A 1.0001 1.0001 0 0 0 1 5 L 1 11 A 1.0001 1.0001 0 0 0 1.5527344 11.894531 L 7.5527344 14.894531 A 1.0001 1.0001 0 0 0 8.4472656 14.894531 L 14.447266 11.894531 A 1.0001 1.0001 0 0 0 15 11 L 15 5 A 1.0001 1.0001 0 0 0 14.447266 4.1054688 L 8.4472656 1.1054688 A 1.0001 1.0001 0 0 0 7.9628906 1.0019531 z M 7 3.6191406 L 7 12.382812 L 3 10.382812 L 3 5.6191406 L 7 3.6191406 z M 9 3.6191406 L 13 5.6191406 L 13 10.382812 L 9 12.382812 L 9 3.6191406 z "
+ transform="translate(0,1036.3622)"
+ id="path4139" />
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_room.svg b/tools/editor/icons/source/icon_room.svg
index 8a2ccc30c8..599bbeb770 100644
--- a/tools/editor/icons/source/icon_room.svg
+++ b/tools/editor/icons/source/icon_room.svg
@@ -29,8 +29,8 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="22.627416"
- inkscape:cx="11.210875"
- inkscape:cy="4.4642701"
+ inkscape:cx="11.166681"
+ inkscape:cy="6.6297847"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
@@ -60,7 +60,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
+ <dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
@@ -69,27 +69,10 @@
inkscape:groupmode="layer"
id="layer1"
transform="translate(0,-1036.3622)">
- <g
- id="layer1-7"
- inkscape:label="Layer 1"
- transform="translate(0,1.1802001e-5)"
- style="stroke:#fc9c9c;stroke-opacity:0.99607843">
- <path
- sodipodi:nodetypes="ccccccc"
- inkscape:connector-curvature="0"
- id="path4139"
- d="m 8,1050.3622 -6,-3 0,-6 6,-3 6,3 0,6 z"
- style="fill:none;fill-rule:evenodd;stroke:#fc9c9c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.99607843" />
- </g>
<path
- style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#fc9c9c;fill-opacity:0.99607843;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
- d="M 7 2 L 7 7.3828125 L 1.5527344 10.105469 L 2.4472656 11.894531 L 8 9.1191406 L 13.552734 11.894531 L 14.447266 10.105469 L 9 7.3828125 L 9 2 L 7 2 z "
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#fc9c9c;fill-opacity:0.99607843;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+ d="M 7.9628906 1.0019531 A 1.0001 1.0001 0 0 0 7.5527344 1.1054688 L 1.5527344 4.1054688 A 1.0001 1.0001 0 0 0 1 5 L 1 11 A 1.0001 1.0001 0 0 0 1.5527344 11.894531 L 7.5527344 14.894531 A 1.0001 1.0001 0 0 0 8.4472656 14.894531 L 14.447266 11.894531 A 1.0001 1.0001 0 0 0 15 11 L 15 5 A 1.0001 1.0001 0 0 0 14.447266 4.1054688 L 8.4472656 1.1054688 A 1.0001 1.0001 0 0 0 7.9628906 1.0019531 z M 9 3.6191406 L 13 5.6191406 L 13 9.3828125 L 9 7.3828125 L 9 3.6191406 z M 8 9.1191406 L 11.763672 11 L 8 12.882812 L 4.2363281 11 L 8 9.1191406 z "
transform="translate(0,1036.3622)"
- id="path4200" />
- <path
- style="fill:#fc9c9c;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:0.99607843"
- d="m 2,1047.3622 0,-6 6,-3 0,6 z"
- id="path4209"
- inkscape:connector-curvature="0" />
+ id="path4139" />
</g>
</svg>
diff --git a/tools/editor/icons/source/icon_room_bounds.svg b/tools/editor/icons/source/icon_room_bounds.svg
new file mode 100644
index 0000000000..8f7e6e6c83
--- /dev/null
+++ b/tools/editor/icons/source/icon_room_bounds.svg
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_node_2d.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_room_bounds.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="31.999999"
+ inkscape:cx="9.5548877"
+ inkscape:cy="9.0516113"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336"
+ empspacing="4" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+ d="M 1 1 L 1 2 L 1 3 L 2 3 L 2 2 L 3 2 L 3 1 L 2 1 L 1 1 z M 13 1 L 13 2 L 14 2 L 14 3 L 15 3 L 15 2 L 15 1 L 14 1 L 13 1 z M 7.9628906 1.0019531 A 1.0001 1.0001 0 0 0 7.5527344 1.1054688 L 1.5527344 4.1054688 A 1.0001 1.0001 0 0 0 1 5 L 1 11 A 1.0001 1.0001 0 0 0 1.5527344 11.894531 L 7.5527344 14.894531 A 1.0001 1.0001 0 0 0 8.4472656 14.894531 L 14.447266 11.894531 A 1.0001 1.0001 0 0 0 15 11 L 15 5 A 1.0001 1.0001 0 0 0 14.447266 4.1054688 L 8.4472656 1.1054688 A 1.0001 1.0001 0 0 0 7.9628906 1.0019531 z M 9 3.6191406 L 13 5.6191406 L 13 9.3828125 L 9 7.3828125 L 9 3.6191406 z M 8 9.1191406 L 11.763672 11 L 8 12.882812 L 4.2363281 11 L 8 9.1191406 z M 1 13 L 1 14 L 1 15 L 2 15 L 3 15 L 3 14 L 2 14 L 2 13 L 1 13 z M 14 13 L 14 14 L 13 14 L 13 15 L 14 15 L 15 15 L 15 14 L 15 13 L 14 13 z "
+ transform="translate(0,1036.3622)"
+ id="path4139" />
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_sample_library.svg b/tools/editor/icons/source/icon_sample_library.svg
new file mode 100644
index 0000000000..78b01430c2
--- /dev/null
+++ b/tools/editor/icons/source/icon_sample_library.svg
@@ -0,0 +1,87 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_dependency_changed_hl.png"
+ inkscape:export-xdpi="45"
+ inkscape:export-ydpi="45"
+ sodipodi:docname="icon_sample_library.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="21.70867"
+ inkscape:cx="6.3137691"
+ inkscape:cy="6.7376711"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="false"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:snap-midpoints="true"
+ inkscape:snap-smooth-nodes="true"
+ inkscape:object-nodes="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ style="opacity:1;fill:#ff8484;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="m 9,8 0,1 0,5 0,1 5,0 c 0.552285,0 1,-0.447715 1,-1 L 15,9 C 15,8.4477153 14.552285,8 14,8 l 0,4 -1,-1 -1,1 0,-4 z"
+ transform="translate(0,1036.3622)"
+ id="rect4161"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccssscccccc" />
+ <path
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#ff8484;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+ d="m 7.0214844,1037.3633 a 1.0001,1.0001 0 0 0 -1,0.875 l -0.5898438,4.7226 -0.5234375,-1.0468 a 1.0001,1.0001 0 0 0 -0.8945312,-0.5528 l -2,0 a 1.0001,1.0001 0 1 0 0,2 l 1.3828125,0 1.7226562,3.4473 a 1.0001,1.0001 0 0 0 1.8867188,-0.3223 l 0.5898437,-4.7226 0.5234375,1.0449 a 1.0001,1.0001 0 0 0 0.8945313,0.5527 l 3.0000001,0 a 1.0001,1.0001 0 1 0 0,-2 l -2.3808595,0 -1.7246094,-3.4472 a 1.0001,1.0001 0 0 0 -0.8867187,-0.5508 z"
+ id="path4181"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_script_create.svg b/tools/editor/icons/source/icon_script_create.svg
index c3f69c4601..0cf16a9c3b 100644
--- a/tools/editor/icons/source/icon_script_create.svg
+++ b/tools/editor/icons/source/icon_script_create.svg
@@ -28,9 +28,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="29.966667"
- inkscape:cx="5.495872"
- inkscape:cy="2.1206692"
+ inkscape:zoom="21.189633"
+ inkscape:cx="7.8202901"
+ inkscape:cy="11.917121"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
@@ -43,11 +43,13 @@
inkscape:snap-object-midpoints="true"
inkscape:snap-center="true"
inkscape:window-width="1920"
- inkscape:window-height="1119"
+ inkscape:window-height="1016"
inkscape:window-x="0"
- inkscape:window-y="26"
+ inkscape:window-y="27"
inkscape:window-maximized="1"
- showguides="false">
+ showguides="false"
+ inkscape:snap-smooth-nodes="true"
+ inkscape:object-nodes="true">
<inkscape:grid
type="xygrid"
id="grid3336"
@@ -61,7 +63,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
+ <dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
@@ -72,14 +74,14 @@
transform="translate(0,-1036.3622)">
<path
style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843"
- d="M 6 1 L 6 2 A 1 1 0 0 0 5 3 L 5 13 L 4 13 L 4 11 L 2 11 L 2 13 A 1 1 0 0 0 2.5 13.865234 A 1 1 0 0 0 3 14 L 3 15 L 10 15 L 10 14 L 7 14 L 7 10 L 10 10 L 10 7 L 12 7 L 12 5 L 15 5 L 15 3 A 2 2 0 0 0 13 1 L 6 1 z M 11 8 L 11 11 L 8 11 L 8 13 L 11 13 L 11 14.730469 A 2 2 0 0 0 12 13 L 12 8 L 11 8 z "
+ d="M 6 1 L 6 2 C 5.4477153 2 5 2.4477153 5 3 L 5 13 L 4 13 L 4 11 L 2 11 L 2 13 C 2.0002826 13.356983 2.1908437 13.686743 2.5 13.865234 C 2.6519425 13.953279 2.8243914 13.999759 3 14 L 3 15 L 8 15 L 9 15 L 9 14 L 8 14 L 8 10 L 10 10 L 10 8 L 12 8 L 12 5 L 15 5 L 15 3 C 15 1.8954305 14.104569 1 13 1 L 6 1 z "
transform="translate(0,1036.3622)"
id="rect4255" />
<path
style="opacity:1;fill:#b4b4b4;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843"
d="M 6 1 C 4.8954305 1 4 1.8954305 4 3 L 4 10 L 2 10 L 1 10 L 1 11 L 1 13 C 1 14.104569 1.8954305 15 3 15 C 4.1045695 15 5 14.104569 5 13 L 5 3 C 5 2.4477153 5.4477153 2 6 2 C 6.5522847 2 7 2.4477153 7 3 L 7 4 L 7 5 L 7 6 L 8 6 L 12 6 L 12 5 L 8 5 L 8 4 L 8 3 C 8 1.8954305 7.1045695 1 6 1 z M 2 11 L 4 11 L 4 13 C 4 13.552285 3.5522847 14 3 14 C 2.4477153 14 2 13.552285 2 13 L 2 11 z "
- transform="translate(0,1036.3622)"
- id="path4265" />
+ id="path4265"
+ transform="translate(0,1036.3622)" />
<circle
cy="1048.3622"
cx="3"
@@ -88,9 +90,10 @@
ry="1.0000174"
rx="1" />
<path
- style="fill:#e0e0e0;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1;fill-opacity:1"
- d="m 13,1049.3622 3,0 0,-2 -3,0 0,-3 -2,0 0,3 -3,0 0,2 3,0 0,3 2,0 z"
+ style="fill:#84ffb1;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
+ d="m 13,1049.3622 2,0 0,-2 -2,0 0,-2 -2,0 0,2 -2,0 0,2 2,0 0,2 2,0 z"
id="path8069"
- inkscape:connector-curvature="0" />
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccccccccc" />
</g>
</svg>
diff --git a/tools/editor/icons/source/icon_shader.svg b/tools/editor/icons/source/icon_shader.svg
index 4c7b5aafc1..ba12b007ad 100644
--- a/tools/editor/icons/source/icon_shader.svg
+++ b/tools/editor/icons/source/icon_shader.svg
@@ -7,7 +7,6 @@
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="16"
@@ -22,30 +21,6 @@
sodipodi:docname="icon_shader.svg">
<defs
id="defs4">
- <linearGradient
- inkscape:collect="always"
- id="linearGradient4174">
- <stop
- style="stop-color:#ff5353;stop-opacity:1"
- offset="0"
- id="stop4176" />
- <stop
- id="stop4186"
- offset="0.29999271"
- style="stop-color:#f1e17a;stop-opacity:1" />
- <stop
- id="stop4184"
- offset="0.55557561"
- style="stop-color:#6bfcef;stop-opacity:1" />
- <stop
- style="stop-color:#9765fd;stop-opacity:1"
- offset="0.8889094"
- id="stop4188" />
- <stop
- style="stop-color:#ff6092;stop-opacity:1"
- offset="1"
- id="stop4178" />
- </linearGradient>
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4253">
@@ -55,17 +30,6 @@
id="path4255"
inkscape:connector-curvature="0" />
</clipPath>
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient4174"
- id="radialGradient4161"
- gradientUnits="userSpaceOnUse"
- gradientTransform="matrix(1.2857125,1.428583,-1.4285914,1.2857189,1540.5411,-308.80327)"
- cx="7.5384259"
- cy="1041.7489"
- fx="7.5384259"
- fy="1041.7489"
- r="7" />
<clipPath
clipPathUnits="userSpaceOnUse"
id="clipPath4199">
@@ -83,9 +47,9 @@
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
- inkscape:zoom="45.254832"
- inkscape:cx="1.7751371"
- inkscape:cy="8.8192435"
+ inkscape:zoom="31.999999"
+ inkscape:cx="6.7591143"
+ inkscape:cy="9.6862321"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
@@ -183,93 +147,5 @@
x="3"
y="1040.8622" />
</g>
- <path
- inkscape:connector-curvature="0"
- style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 29.5,1037.3622 -7,3 0,8 7,3 7,-3 0,-8 -7,-3 z"
- id="path4151" />
- <path
- style="fill:#ffff91;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 22.5,1046.3622 7,3 7,-3 -7,-3 z"
- id="path4223"
- inkscape:connector-curvature="0" />
- <path
- inkscape:connector-curvature="0"
- id="path4221"
- d="m 22.5,1043.3622 7,3 7,-3 -7,-3 z"
- style="fill:#ff91ff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
- <path
- style="fill:#00ffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 29.5,1045.3622 -7,-3 0,-2 7,3 z"
- id="path4143"
- inkscape:connector-curvature="0"
- sodipodi:nodetypes="ccccc" />
- <path
- inkscape:connector-curvature="0"
- id="path4145"
- d="m 29.5,1045.3622 7,-3 0,-2 -7,3 z"
- style="fill:#00d8d8;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- sodipodi:nodetypes="ccccc" />
- <path
- style="fill:#91ffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 22.5,1040.3622 7,3 7,-3 -7,-3 z"
- id="path4149"
- inkscape:connector-curvature="0" />
- <path
- sodipodi:nodetypes="ccccc"
- style="fill:#d800d8;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 29.5,1048.3622 7,-3 0,-2 -7,3 z"
- id="path4208"
- inkscape:connector-curvature="0" />
- <path
- inkscape:connector-curvature="0"
- id="path4215"
- d="m 29.5,1048.3622 -7,-3 0,-2 7,3 z"
- style="fill:#ff00ff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- sodipodi:nodetypes="ccccc" />
- <path
- inkscape:connector-curvature="0"
- id="path4217"
- d="m 29.5,1051.3622 7,-3 0,-2 -7,3 z"
- style="fill:#d8d800;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- sodipodi:nodetypes="ccccc" />
- <path
- sodipodi:nodetypes="ccccc"
- style="fill:#ffff00;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 29.5,1051.3622 -7,-3 0,-2 7,3 z"
- id="path4219"
- inkscape:connector-curvature="0" />
- <g
- inkscape:label="Layer 1"
- id="layer1-5"
- transform="translate(18,1)">
- <path
- id="path4151-1"
- d="m 29.5,1037.3622 -7,3 0,8 7,3 7,-3 0,-8 -7,-3 z"
- style="fill:#ffffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- inkscape:connector-curvature="0" />
- <path
- inkscape:connector-curvature="0"
- id="path4149-2"
- d="m 22.5,1040.3622 7,3 7,-3 -7,-3 z"
- style="fill:#00ffff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
- <path
- sodipodi:nodetypes="ccccc"
- inkscape:connector-curvature="0"
- id="path4143-0"
- d="m 29.5,1051.3622 -7,-3 0,-8 7,3 z"
- style="fill:#ff00ff;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" />
- <path
- sodipodi:nodetypes="ccccc"
- style="fill:#ffff00;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1"
- d="m 29.5,1051.3622 7,-3 0,-8 -7,3 z"
- id="path4145-0"
- inkscape:connector-curvature="0" />
- </g>
- <path
- style="opacity:1;fill:url(#radialGradient4161);fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
- d="m 64,1037.3622 a 7,7.0000001 0 0 0 -7,7 7,7.0000001 0 0 0 7,7 7,7.0000001 0 0 0 7,-7 7,7.0000001 0 0 0 -7,-7 z m -2,2 a 2,2 0 0 1 2,2 2,2 0 0 1 -2,2 2,2 0 0 1 -2,-2 2,2 0 0 1 2,-2 z"
- id="path4159"
- inkscape:connector-curvature="0" />
</g>
</svg>
diff --git a/tools/editor/icons/source/icon_short_cut.svg b/tools/editor/icons/source/icon_short_cut.svg
new file mode 100644
index 0000000000..05069e8ea1
--- /dev/null
+++ b/tools/editor/icons/source/icon_short_cut.svg
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_key.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_short_cut.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="45.254835"
+ inkscape:cx="7.0902833"
+ inkscape:cy="8.378548"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="false"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:object-paths="false"
+ inkscape:snap-intersection-paths="false"
+ inkscape:object-nodes="true"
+ inkscape:snap-smooth-nodes="true"
+ inkscape:snap-midpoints="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ style="opacity:1;fill:#e0e0e0;fill-opacity:0.99607843;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ d="M 4 2 C 3.4477153 2 3 2.4477 3 3 L 3 12.083984 C 3.0004015 12.589984 3.4479991 13 4 13 L 12 13 C 12.552001 13 12.999599 12.589984 13 12.083984 L 13 3 C 13 2.4477 12.552285 2 12 2 L 4 2 z M 1 4 L 1 13 A 2 2 0 0 0 3 15 L 13 15 A 2 2 0 0 0 15 13 L 15 4 L 14 4 L 14 13 A 0.9999826 0.9999826 0 0 1 13 14 L 3 14 A 1 1 0 0 1 2 13 L 2 4 L 1 4 z M 7 4 L 10 4 L 9 7 L 11 7 L 7 11 L 8 8 L 6 8 L 7 4 z "
+ transform="translate(0,1036.3622)"
+ id="rect4155" />
+ <rect
+ style="opacity:1;fill:#ffffff;fill-opacity:0.99607843;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ id="rect4194"
+ width="7"
+ height="14"
+ x="27"
+ y="1038.3622" />
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_spatial_shader.svg b/tools/editor/icons/source/icon_spatial_shader.svg
new file mode 100644
index 0000000000..329354b716
--- /dev/null
+++ b/tools/editor/icons/source/icon_spatial_shader.svg
@@ -0,0 +1,165 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collision_shape.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_spatial_shader.svg">
+ <defs
+ id="defs4">
+ <clipPath
+ id="clipPath4253"
+ clipPathUnits="userSpaceOnUse">
+ <path
+ inkscape:connector-curvature="0"
+ id="path4255"
+ d="m 16.458984,1024.37 a 12.000027,12.000027 0 0 0 -3.564453,0.4004 12.000027,12.000027 0 0 0 -8.4863279,14.6973 12.000027,12.000027 0 0 0 14.6972659,8.4863 12.000027,12.000027 0 0 0 8.486328,-14.6973 12.000027,12.000027 0 0 0 -11.132813,-8.8867 z M 16.25,1029.8212 a 6.5451717,6.5451717 0 0 1 6.072266,4.8476 6.5451717,6.5451717 0 0 1 -4.628907,8.0157 6.5451717,6.5451717 0 0 1 -8.0156246,-4.6289 6.5451717,6.5451717 0 0 1 4.6289066,-8.0157 6.5451717,6.5451717 0 0 1 1.943359,-0.2187 z"
+ style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ </clipPath>
+ <clipPath
+ id="clipPath4199"
+ clipPathUnits="userSpaceOnUse">
+ <path
+ style="opacity:1;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ d="m 16.5,1025.8622 a 11.8125,10.499999 0 0 0 -11.8125001,10.5 11.8125,10.499999 0 0 0 11.8125001,10.5 11.8125,10.499999 0 0 0 11.8125,-10.5 11.8125,10.499999 0 0 0 -11.8125,-10.5 z m -3.375,3 a 3.375,2.9999997 0 0 1 3.375,3 3.375,2.9999997 0 0 1 -3.375,3 3.375,2.9999997 0 0 1 -3.3750001,-3 3.375,2.9999997 0 0 1 3.3750001,-3 z"
+ id="path4201"
+ inkscape:connector-curvature="0" />
+ </clipPath>
+ <clipPath
+ clipPathUnits="userSpaceOnUse"
+ id="clipPath4280">
+ <g
+ id="g4282"
+ inkscape:label="Layer 1"
+ transform="translate(0,1.1802001e-5)"
+ style="stroke:#fc9c9c;stroke-opacity:0.99607843">
+ <path
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#fc9c9c;fill-opacity:0.99607843;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+ d="M 7.9628906,1.0019531 A 1.0001,1.0001 0 0 0 7.5527344,1.1054688 l -6,3 A 1.0001,1.0001 0 0 0 1,5 l 0,6 a 1.0001,1.0001 0 0 0 0.5527344,0.894531 l 6,3 a 1.0001,1.0001 0 0 0 0.8945312,0 l 6.0000004,-3 A 1.0001,1.0001 0 0 0 15,11 L 15,5 A 1.0001,1.0001 0 0 0 14.447266,4.1054688 l -6.0000004,-3 A 1.0001,1.0001 0 0 0 7.9628906,1.0019531 Z M 8,3.1191406 11.763672,5 8,6.8828125 4.2363281,5 8,3.1191406 Z m -5,3.5 4,2 0,3.7636714 -4,-2 0,-3.7636714 z m 10,0 0,3.7636714 -4,2 0,-3.7636714 4,-2 z"
+ transform="translate(0,1036.3622)"
+ id="path4284"
+ inkscape:connector-curvature="0" />
+ </g>
+ </clipPath>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="22.627417"
+ inkscape:cx="7.8442401"
+ inkscape:cy="13.929239"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:object-paths="false"
+ inkscape:snap-intersection-paths="false"
+ inkscape:object-nodes="false"
+ inkscape:snap-smooth-nodes="false"
+ inkscape:snap-midpoints="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <g
+ id="g4271"
+ clip-path="url(#clipPath4280)">
+ <rect
+ y="1037.3622"
+ x="0"
+ height="2.0000031"
+ width="16"
+ id="rect4159"
+ style="fill:#ff7070;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ style="fill:#ffeb70;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4161"
+ width="16"
+ height="2.0000029"
+ x="0"
+ y="1039.3622" />
+ <rect
+ style="fill:#9dff70;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4163"
+ width="16"
+ height="1.9999999"
+ x="0"
+ y="1041.3622" />
+ <rect
+ y="1043.3622"
+ x="0"
+ height="2.0000024"
+ width="16"
+ id="rect4165"
+ style="fill:#70ffb9;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ y="1045.3622"
+ x="0"
+ height="2.0000021"
+ width="16"
+ id="rect4167"
+ style="fill:#70deff;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ style="fill:#ff70ac;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4169"
+ width="16"
+ height="1.9999987"
+ x="0"
+ y="1049.3622" />
+ <rect
+ style="fill:#9f70ff;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4146"
+ width="16"
+ height="2.0000021"
+ x="0"
+ y="1047.3622" />
+ </g>
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_sprite_frames.svg b/tools/editor/icons/source/icon_sprite_frames.svg
new file mode 100644
index 0000000000..dc445da773
--- /dev/null
+++ b/tools/editor/icons/source/icon_sprite_frames.svg
@@ -0,0 +1,119 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_add_track.png"
+ inkscape:export-xdpi="45"
+ inkscape:export-ydpi="45"
+ sodipodi:docname="icon_sprite_frames.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="45.254835"
+ inkscape:cx="10.147205"
+ inkscape:cy="8.653875"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="false"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <rect
+ y="1046.3622"
+ x="10"
+ height="2.0000086"
+ width="2"
+ id="rect4230"
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4232"
+ width="2"
+ height="2.0000086"
+ x="13"
+ y="1046.3622" />
+ <rect
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4234"
+ width="2"
+ height="2.0000086"
+ x="10"
+ y="1049.3622" />
+ <rect
+ y="1049.3622"
+ x="13"
+ height="2.0000086"
+ width="2"
+ id="rect4236"
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <path
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 6 1 A 5 5 0 0 0 1 6 A 5 5 0 0 0 6 11 A 5 5 0 0 0 11 6 A 5 5 0 0 0 6 1 z M 3 5 A 1 1 0 0 1 4 6 A 1 1 0 0 1 3 7 A 1 1 0 0 1 2 6 A 1 1 0 0 1 3 5 z M 9 5 A 1 1 0 0 1 10 6 A 1 1 0 0 1 9 7 A 1 1 0 0 1 8 6 A 1 1 0 0 1 9 5 z M 7.9960938 7.4921875 A 0.50005 0.50005 0 0 1 8.3535156 8.3535156 C 7.7356645 8.9714156 6.8611111 9.25 6 9.25 C 5.1388889 9.25 4.2643355 8.9714156 3.6464844 8.3535156 A 0.50005 0.50005 0 0 1 3.9941406 7.4960938 A 0.50005 0.50005 0 0 1 4.3535156 7.6464844 C 4.7356645 8.0286844 5.3611111 8.25 6 8.25 C 6.6388889 8.25 7.2643355 8.0286844 7.6464844 7.6464844 A 0.50005 0.50005 0 0 1 7.9960938 7.4921875 z "
+ transform="translate(0,1036.3622)"
+ id="path4238" />
+ <rect
+ y="1043.3622"
+ x="13"
+ height="2.0000086"
+ width="2"
+ id="rect4246"
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ y="1049.3622"
+ x="7"
+ height="2.0000086"
+ width="2"
+ id="rect4248"
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_style_box_empty.svg b/tools/editor/icons/source/icon_style_box_empty.svg
new file mode 100644
index 0000000000..c881fe1c10
--- /dev/null
+++ b/tools/editor/icons/source/icon_style_box_empty.svg
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_center_container.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_style_box_empty.svg">
+ <defs
+ id="defs4">
+ <clipPath
+ clipPathUnits="userSpaceOnUse"
+ id="clipPath4313">
+ <path
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+ d="m 6.3750001,1025.8622 c -0.931942,2e-4 -1.6874069,0.6716 -1.6875,1.5 l 0,1.5 3.375,0 0,-3 -1.6875,0 z m 5.0624999,0 0,3 3.375,0 0,-3 -3.375,0 z m 6.75,0 0,3 3.375,0 0,-3 -3.375,0 z m 6.75,0 0,3 3.375,0 0,-1.5 c -9.3e-5,-0.8284 -0.755558,-1.4998 -1.6875,-1.5 l -1.6875,0 z m -20.2499999,6 0,3 3.375,0 0,-3 -3.375,0 z m 20.2499999,0 0,0.3486 c 0.532973,0.2675 0.975667,0.657 1.282105,1.128 0.537834,0.828 1.294284,1.6769 2.092895,2.5722 l 0,-4.0488 -3.375,0 z m -1.6875,3 c -1.948558,3 -5.0625,5.0147 -5.0625,7.5 0,2.4854 2.266559,4.5 5.0625,4.5 2.795941,0 5.0625,-2.0146 5.0625,-4.5 0,-2.4853 -3.113942,-4.5 -5.0625,-7.5 z m -18.5624999,3 0,3 3.375,0 0,-3 -3.375,0 z m 0,6 0,1.5 c 9.31e-5,0.8284 0.755558,1.4998 1.6875,1.5 l 1.6875,0 0,-3 -3.375,0 z m 6.7499999,0 0,3 3.375,0 0,-3 -3.375,0 z"
+ id="path4315"
+ inkscape:connector-curvature="0" />
+ </clipPath>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="32"
+ inkscape:cx="10.442024"
+ inkscape:cy="8.6470776"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:snap-smooth-nodes="true"
+ inkscape:object-nodes="true"
+ inkscape:snap-midpoints="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <g
+ id="g4181"
+ mask="none"
+ clip-path="url(#clipPath4313)"
+ transform="matrix(0.59259259,0,0,0.66666674,-1.7777778,353.45399)">
+ <rect
+ y="1025.8622"
+ x="3"
+ height="3.0000043"
+ width="27"
+ id="rect4159"
+ style="fill:#ff7070;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ style="fill:#ffeb70;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4161"
+ width="27"
+ height="3.0000041"
+ x="3"
+ y="1028.8622" />
+ <rect
+ style="fill:#9dff70;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4163"
+ width="27"
+ height="2.9999995"
+ x="3"
+ y="1031.8622" />
+ <rect
+ y="1034.8622"
+ x="3"
+ height="3.0000031"
+ width="27"
+ id="rect4165"
+ style="fill:#70ffb9;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ y="1037.8622"
+ x="3"
+ height="3.0000029"
+ width="27"
+ id="rect4167"
+ style="fill:#70deff;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ style="fill:#ff70ac;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4169"
+ width="27"
+ height="2.9999976"
+ x="3"
+ y="1043.8622" />
+ <rect
+ style="fill:#9f70ff;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4146"
+ width="27"
+ height="3.0000029"
+ x="3"
+ y="1040.8622" />
+ </g>
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_style_box_flat.svg b/tools/editor/icons/source/icon_style_box_flat.svg
new file mode 100644
index 0000000000..9071014ff3
--- /dev/null
+++ b/tools/editor/icons/source/icon_style_box_flat.svg
@@ -0,0 +1,149 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_center_container.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_style_box_flat.svg">
+ <defs
+ id="defs4">
+ <clipPath
+ clipPathUnits="userSpaceOnUse"
+ id="clipPath4313">
+ <path
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+ d="m 6.3750001,1025.8622 c -0.931942,2e-4 -1.6874069,0.6716 -1.6875,1.5 l 0,1.5 3.375,0 0,-3 -1.6875,0 z m 5.0624999,0 0,3 3.375,0 0,-3 -3.375,0 z m 6.75,0 0,3 3.375,0 0,-3 -3.375,0 z m 6.75,0 0,3 3.375,0 0,-1.5 c -9.3e-5,-0.8284 -0.755558,-1.4998 -1.6875,-1.5 l -1.6875,0 z m -20.2499999,6 0,3 3.375,0 0,-3 -3.375,0 z m 20.2499999,0 0,0.3486 c 0.532973,0.2675 0.975667,0.657 1.282105,1.128 0.537834,0.828 1.294284,1.6769 2.092895,2.5722 l 0,-4.0488 -3.375,0 z m -1.6875,3 c -1.948558,3 -5.0625,5.0147 -5.0625,7.5 0,2.4854 2.266559,4.5 5.0625,4.5 2.795941,0 5.0625,-2.0146 5.0625,-4.5 0,-2.4853 -3.113942,-4.5 -5.0625,-7.5 z m -18.5624999,3 0,3 3.375,0 0,-3 -3.375,0 z m 0,6 0,1.5 c 9.31e-5,0.8284 0.755558,1.4998 1.6875,1.5 l 1.6875,0 0,-3 -3.375,0 z m 6.7499999,0 0,3 3.375,0 0,-3 -3.375,0 z"
+ id="path4315"
+ inkscape:connector-curvature="0" />
+ </clipPath>
+ <clipPath
+ clipPathUnits="userSpaceOnUse"
+ id="clipPath4391">
+ <path
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+ d="m 6.3750001,1025.8622 c -0.931942,2e-4 -1.6874069,0.6716 -1.6875,1.5 l 0,18 c 9.31e-5,0.8284 0.755558,1.4998 1.6875,1.5 l 10.1876219,0 c -1.081633,-1.2612 -1.750122,-2.8111 -1.750122,-4.5 0,-2.3563 1.351562,-4.0453 2.494995,-5.376 1.143433,-1.3305 2.270438,-2.4714 3.019043,-3.624 0.571813,-0.8788 1.604865,-1.4416 2.745483,-1.4941 1.267652,-0.06 2.465974,0.5173 3.101441,1.4941 0.549842,0.8466 1.32435,1.7113 2.139038,2.625 l 0,-8.625 c -9.3e-5,-0.8284 -0.755558,-1.4998 -1.6875,-1.5 l -20.2499999,0 z m 16.8749999,9 c -1.948558,3 -5.0625,5.0147 -5.0625,7.5 0,2.4854 2.266559,4.5 5.0625,4.5 2.795941,0 5.0625,-2.0146 5.0625,-4.5 0,-2.4853 -3.113942,-4.5 -5.0625,-7.5 z"
+ id="path4393"
+ inkscape:connector-curvature="0" />
+ </clipPath>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="32"
+ inkscape:cx="11.34212"
+ inkscape:cy="7.7545325"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:snap-smooth-nodes="true"
+ inkscape:object-nodes="true"
+ inkscape:snap-midpoints="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <g
+ id="g4181"
+ mask="none"
+ clip-path="url(#clipPath4391)"
+ transform="matrix(0.59259259,0,0,0.66666674,-1.7777778,353.45399)">
+ <rect
+ y="1025.8622"
+ x="3"
+ height="3.0000043"
+ width="27"
+ id="rect4159"
+ style="fill:#ff7070;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ style="fill:#ffeb70;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4161"
+ width="27"
+ height="3.0000041"
+ x="3"
+ y="1028.8622" />
+ <rect
+ style="fill:#9dff70;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4163"
+ width="27"
+ height="2.9999995"
+ x="3"
+ y="1031.8622" />
+ <rect
+ y="1034.8622"
+ x="3"
+ height="3.0000031"
+ width="27"
+ id="rect4165"
+ style="fill:#70ffb9;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ y="1037.8622"
+ x="3"
+ height="3.0000029"
+ width="27"
+ id="rect4167"
+ style="fill:#70deff;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ style="fill:#ff70ac;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4169"
+ width="27"
+ height="2.9999976"
+ x="3"
+ y="1043.8622" />
+ <rect
+ style="fill:#9f70ff;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4146"
+ width="27"
+ height="3.0000029"
+ x="3"
+ y="1040.8622" />
+ </g>
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_style_box_texture.svg b/tools/editor/icons/source/icon_style_box_texture.svg
new file mode 100644
index 0000000000..30b1f1af68
--- /dev/null
+++ b/tools/editor/icons/source/icon_style_box_texture.svg
@@ -0,0 +1,140 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_center_container.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_style_box_texture.svg">
+ <defs
+ id="defs4">
+ <clipPath
+ clipPathUnits="userSpaceOnUse"
+ id="clipPath4189">
+ <path
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+ d="m 6.3750001,1025.8622 a 1.6876688,1.5001498 0 0 0 -1.6875,1.5 l 0,18 a 1.6876688,1.5001498 0 0 0 1.6875,1.5 l 10.1217039,0 c -0.747392,-0.8796 -1.304338,-1.8888 -1.562256,-3 l -6.8719479,0 0,-15 16.8749999,0 0,3.3486 a 3.4281247,3.0472216 0 0 1 1.282105,1.1279 c 0.537834,0.828 1.294284,1.677 2.092895,2.5723 l 0,-8.5488 a 1.6876688,1.5001498 0 0 0 -1.6875,-1.5 l -20.2499999,0 z m 11.8124999,4.5 0,1.5 -1.6875,0 0,1.5 -3.375,0 0,1.5 -1.6875,0 0,1.5 -1.6874999,0 0,1.5 3.3749999,0 3.375,0 0.02637,0 c 0.246127,-0.317 0.496441,-0.6239 0.738282,-0.9053 1.145331,-1.3327 2.270672,-2.4711 3.015746,-3.6182 a 3.4281247,3.0472216 0 0 1 1.282105,-1.1279 l 0,-0.3486 -1.6875,0 0,-1.5 -1.6875,0 z m 5.0625,4.5 c -1.948558,3 -5.0625,5.0146 -5.0625,7.5 0,2.4853 2.266559,4.5 5.0625,4.5 2.795941,0 5.0625,-2.0147 5.0625,-4.5 0,-2.4854 -3.113942,-4.5 -5.0625,-7.5 z"
+ id="path4191"
+ inkscape:connector-curvature="0" />
+ </clipPath>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="22.627417"
+ inkscape:cx="9.8110364"
+ inkscape:cy="10.993538"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:snap-smooth-nodes="true"
+ inkscape:object-nodes="true"
+ inkscape:snap-midpoints="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title />
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <g
+ id="g4181"
+ mask="none"
+ clip-path="url(#clipPath4189)"
+ transform="matrix(0.59259259,0,0,0.66666674,-1.7777778,353.454)">
+ <rect
+ y="1025.8622"
+ x="3"
+ height="3.0000043"
+ width="27"
+ id="rect4159"
+ style="fill:#ff7070;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ style="fill:#ffeb70;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4161"
+ width="27"
+ height="3.0000041"
+ x="3"
+ y="1028.8622" />
+ <rect
+ style="fill:#9dff70;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4163"
+ width="27"
+ height="2.9999995"
+ x="3"
+ y="1031.8622" />
+ <rect
+ y="1034.8622"
+ x="3"
+ height="3.0000031"
+ width="27"
+ id="rect4165"
+ style="fill:#70ffb9;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ y="1037.8622"
+ x="3"
+ height="3.0000029"
+ width="27"
+ id="rect4167"
+ style="fill:#70deff;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ style="fill:#ff70ac;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4169"
+ width="27"
+ height="2.9999976"
+ x="3"
+ y="1043.8622" />
+ <rect
+ style="fill:#9f70ff;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4146"
+ width="27"
+ height="3.0000029"
+ x="3"
+ y="1040.8622" />
+ </g>
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_test_cube.svg b/tools/editor/icons/source/icon_test_cube.svg
index 8b5db2dc5d..c42c0bb674 100644
--- a/tools/editor/icons/source/icon_test_cube.svg
+++ b/tools/editor/icons/source/icon_test_cube.svg
@@ -29,8 +29,8 @@
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="45.254834"
- inkscape:cx="7.2538994"
- inkscape:cy="5.8068101"
+ inkscape:cx="7.5411615"
+ inkscape:cy="7.1105382"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
@@ -64,7 +64,7 @@
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
+ <dc:title />
</cc:Work>
</rdf:RDF>
</metadata>
@@ -79,16 +79,10 @@
transform="translate(0,1.1802001e-5)"
style="stroke:#fc9c9c;stroke-opacity:0.99607843">
<path
- sodipodi:nodetypes="ccccccc"
- inkscape:connector-curvature="0"
- id="path4139"
- d="m 8,1050.3622 -6,-3 0,-6 6,-3 6,3 0,6 z"
- style="fill:none;fill-rule:evenodd;stroke:#fc9c9c;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:0.99607843" />
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#fc9c9c;fill-opacity:0.99607843;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+ d="M 7.9628906 1.0019531 A 1.0001 1.0001 0 0 0 7.5527344 1.1054688 L 1.5527344 4.1054688 A 1.0001 1.0001 0 0 0 1 5 L 1 11 A 1.0001 1.0001 0 0 0 1.5527344 11.894531 L 7.5527344 14.894531 A 1.0001 1.0001 0 0 0 8.4472656 14.894531 L 14.447266 11.894531 A 1.0001 1.0001 0 0 0 15 11 L 15 5 A 1.0001 1.0001 0 0 0 14.447266 4.1054688 L 8.4472656 1.1054688 A 1.0001 1.0001 0 0 0 7.9628906 1.0019531 z M 8 3.1191406 L 11.763672 5 L 8 6.8828125 L 4.2363281 5 L 8 3.1191406 z M 3 6.6191406 L 7 8.6191406 L 7 12.382812 L 3 10.382812 L 3 6.6191406 z M 13 6.6191406 L 13 10.382812 L 9 12.382812 L 9 8.6191406 L 13 6.6191406 z "
+ transform="translate(0,1036.3622)"
+ id="path4139" />
</g>
- <path
- style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#fc9c9c;fill-opacity:0.99607843;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
- d="M 2.4472656 4.1054688 L 1.5527344 5.8945312 L 7 8.6191406 L 7 14 L 9 14 L 9 8.6191406 L 14.447266 5.8945312 L 13.552734 4.1054688 L 8 6.8828125 L 2.4472656 4.1054688 z "
- transform="translate(0,1036.3622)"
- id="path4155" />
</g>
</svg>
diff --git a/tools/editor/icons/source/icon_theme.svg b/tools/editor/icons/source/icon_theme.svg
new file mode 100644
index 0000000000..2cacb9755a
--- /dev/null
+++ b/tools/editor/icons/source/icon_theme.svg
@@ -0,0 +1,144 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_bone.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_theme.svg">
+ <defs
+ id="defs4">
+ <clipPath
+ clipPathUnits="userSpaceOnUse"
+ id="clipPath4370">
+ <g
+ id="g4372"
+ inkscape:label="Layer 1"
+ transform="matrix(1.6875,0,0,1.4999998,2.9999999,-530.18094)">
+ <path
+ id="path4374"
+ transform="translate(0,1036.3622)"
+ d="M 7,1 6.4355469,3.2578125 A 5.0000172,5.0000172 0 0 0 5.7460938,3.5371094 L 3.7578125,2.34375 2.34375,3.7578125 3.5390625,5.7519531 A 5.0000172,5.0000172 0 0 0 3.2539062,6.4375 L 1,7 1,9 3.2578125,9.5644531 A 5.0000172,5.0000172 0 0 0 3.5371094,10.251953 L 2.34375,12.242188 3.7578125,13.65625 5.7519531,12.460938 A 5.0000172,5.0000172 0 0 0 6.4375,12.746094 L 7,15 9,15 9.5644531,12.742188 a 5.0000172,5.0000172 0 0 0 0.6874999,-0.279297 l 1.990235,1.193359 1.414062,-1.414062 -1.195312,-1.994141 A 5.0000172,5.0000172 0 0 0 12.746094,9.5625 L 15,9 15,7 12.742188,6.4355469 a 5.0000172,5.0000172 0 0 0 -0.279297,-0.6875 L 13.65625,3.7578125 12.242188,2.34375 10.248047,3.5390625 A 5.0000172,5.0000172 0 0 0 9.5625,3.2539062 L 9,1 7,1 Z M 8,6 A 2.0000174,2.0000174 0 0 1 10,8 2.0000174,2.0000174 0 0 1 8,10 2.0000174,2.0000174 0 0 1 6,8 2.0000174,2.0000174 0 0 1 8,6 Z"
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:3;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1"
+ inkscape:connector-curvature="0" />
+ </g>
+ </clipPath>
+ </defs>
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="16"
+ inkscape:cx="10.857726"
+ inkscape:cy="9.3127855"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ showguides="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <g
+ id="g4181"
+ mask="none"
+ clip-path="url(#clipPath4370)"
+ transform="matrix(0.59259259,0,0,0.66666674,-1.7777777,353.454)">
+ <rect
+ y="1025.8622"
+ x="3"
+ height="3.0000043"
+ width="27"
+ id="rect4159"
+ style="fill:#ff7070;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ style="fill:#ffeb70;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4161-3"
+ width="27"
+ height="3.0000041"
+ x="3"
+ y="1028.8622" />
+ <rect
+ style="fill:#9dff70;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4163-6"
+ width="27"
+ height="2.9999995"
+ x="3"
+ y="1031.8622" />
+ <rect
+ y="1034.8622"
+ x="3"
+ height="3.0000031"
+ width="27"
+ id="rect4165-1"
+ style="fill:#70ffb9;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ y="1037.8622"
+ x="3"
+ height="3.0000029"
+ width="27"
+ id="rect4167"
+ style="fill:#70deff;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
+ <rect
+ style="fill:#ff70ac;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4169"
+ width="27"
+ height="2.9999976"
+ x="3"
+ y="1043.8622" />
+ <rect
+ style="fill:#9f70ff;fill-opacity:1;stroke:none;stroke-width:4;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="rect4146"
+ width="27"
+ height="3.0000029"
+ x="3"
+ y="1040.8622" />
+ </g>
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_tile_set.svg b/tools/editor/icons/source/icon_tile_set.svg
new file mode 100644
index 0000000000..e697f03888
--- /dev/null
+++ b/tools/editor/icons/source/icon_tile_set.svg
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_dependency_changed_hl.png"
+ inkscape:export-xdpi="45"
+ inkscape:export-ydpi="45"
+ sodipodi:docname="icon_tile_set.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="30.700696"
+ inkscape:cx="7.5612844"
+ inkscape:cy="6.4018109"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="false"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:snap-midpoints="true"
+ inkscape:snap-smooth-nodes="true"
+ inkscape:object-nodes="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ d="M 1 1 L 1 3 L 3 3 L 3 1 L 1 1 z M 4 1 L 4 3 L 6 3 L 6 1 L 4 1 z M 7 1 L 7 3 L 9 3 L 9 1 L 7 1 z M 10 1 L 10 3 L 12 3 L 12 1 L 10 1 z M 13 1 L 13 3 L 15 3 L 15 1 L 13 1 z M 1 4 L 1 6 L 3 6 L 3 4 L 1 4 z M 4 4 L 4 6 L 6 6 L 6 4 L 4 4 z M 7 4 L 7 6 L 9 6 L 9 4 L 7 4 z M 10 4 L 10 6 L 12 6 L 12 4 L 10 4 z M 13 4 L 13 6 L 15 6 L 15 4 L 13 4 z M 1 7 L 1 9 L 3 9 L 3 7 L 1 7 z M 4 7 L 4 9 L 6 9 L 6 7 L 4 7 z M 9 8 L 9 9 L 9 14 L 9 15 L 14 15 C 14.552285 15 15 14.552285 15 14 L 15 9 C 15 8.4477153 14.552285 8 14 8 L 14 12 L 13 11 L 12 12 L 12 8 L 9 8 z M 1 10 L 1 12 L 3 12 L 3 10 L 1 10 z M 4 10 L 4 12 L 6 12 L 6 10 L 4 10 z M 1 13 L 1 15 L 3 15 L 3 13 L 1 13 z M 4 13 L 4 15 L 6 15 L 6 13 L 4 13 z "
+ transform="translate(0,1036.3622)"
+ id="rect4161" />
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_viewport_texture.svg b/tools/editor/icons/source/icon_viewport_texture.svg
new file mode 100644
index 0000000000..4cf6532059
--- /dev/null
+++ b/tools/editor/icons/source/icon_viewport_texture.svg
@@ -0,0 +1,80 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_sprite.png"
+ inkscape:export-xdpi="45"
+ inkscape:export-ydpi="45"
+ sodipodi:docname="icon_viewport_texture.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="22.627417"
+ inkscape:cx="18.523635"
+ inkscape:cy="6.064799"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:snap-smooth-nodes="true"
+ inkscape:object-nodes="true"
+ inkscape:snap-intersection-paths="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ style="opacity:1;fill:#e0e0e0;fill-opacity:0.99607843;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:bevel;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:0.99607843"
+ d="M 3 2 C 2.4695977 2.0000801 1.9609485 2.2108464 1.5859375 2.5859375 C 1.2108464 2.9609485 1.0000801 3.4695977 1 4 L 1 12 C 1.0000803 12.530402 1.2108465 13.039051 1.5859375 13.414062 C 1.9609484 13.789154 2.4695976 13.99992 3 14 L 13 14 C 14.104569 14 15 13.104569 15 12 L 15 4 C 15 2.8954305 14.104569 2 13 2 L 3 2 z M 3 3 L 13 3 C 13.552281 3.0000096 13.99999 3.4477192 14 4 L 14 12 C 13.99999 12.552281 13.552281 12.99999 13 13 L 3 13 C 2.4477192 12.99999 2.0000096 12.552281 2 12 L 2 4 C 2.0000096 3.4477192 2.4477192 3.0000096 3 3 z M 9 6 L 9 7 L 8 7 L 8 8 L 6 8 L 6 9 L 5 9 L 5 10 L 4 10 L 4 11 L 6 11 L 8 11 L 10 11 L 12 11 L 12 9 L 11 9 L 11 8 L 11 7 L 10 7 L 10 6 L 9 6 z "
+ transform="translate(0,1036.3622)"
+ id="rect4179" />
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_world.svg b/tools/editor/icons/source/icon_world.svg
new file mode 100644
index 0000000000..b2be396217
--- /dev/null
+++ b/tools/editor/icons/source/icon_world.svg
@@ -0,0 +1,89 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collision_shape.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_world.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="45.254834"
+ inkscape:cx="10.207753"
+ inkscape:cy="6.6325397"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:object-paths="false"
+ inkscape:snap-intersection-paths="false"
+ inkscape:object-nodes="true"
+ inkscape:snap-smooth-nodes="true"
+ inkscape:snap-midpoints="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <circle
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path4219"
+ cx="5.9999828"
+ cy="1046.3622"
+ r="4.9999828" />
+ <circle
+ style="opacity:1;fill:#e0e0e0;fill-opacity:1;stroke:none;stroke-width:2;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
+ id="path4221"
+ cx="12"
+ cy="1039.3622"
+ r="1" />
+ </g>
+</svg>
diff --git a/tools/editor/icons/source/icon_world_2d.svg b/tools/editor/icons/source/icon_world_2d.svg
new file mode 100644
index 0000000000..cb4427808a
--- /dev/null
+++ b/tools/editor/icons/source/icon_world_2d.svg
@@ -0,0 +1,82 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16"
+ height="16"
+ viewBox="0 0 16 16"
+ id="svg2"
+ version="1.1"
+ inkscape:version="0.91 r13725"
+ inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_collision_shape.png"
+ inkscape:export-xdpi="90"
+ inkscape:export-ydpi="90"
+ sodipodi:docname="icon_world_2d.svg">
+ <defs
+ id="defs4" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="22.627417"
+ inkscape:cx="17.648364"
+ inkscape:cy="4.8796811"
+ inkscape:document-units="px"
+ inkscape:current-layer="layer1"
+ showgrid="true"
+ units="px"
+ inkscape:snap-bbox="true"
+ inkscape:bbox-paths="true"
+ inkscape:bbox-nodes="true"
+ inkscape:snap-bbox-edge-midpoints="true"
+ inkscape:snap-bbox-midpoints="true"
+ inkscape:snap-object-midpoints="true"
+ inkscape:snap-center="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1016"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1"
+ inkscape:object-paths="false"
+ inkscape:snap-intersection-paths="false"
+ inkscape:object-nodes="true"
+ inkscape:snap-smooth-nodes="true"
+ inkscape:snap-midpoints="true">
+ <inkscape:grid
+ type="xygrid"
+ id="grid3336" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata7">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer"
+ id="layer1"
+ transform="translate(0,-1036.3622)">
+ <path
+ style="color:#000000;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:medium;line-height:normal;font-family:sans-serif;text-indent:0;text-align:start;text-decoration:none;text-decoration-line:none;text-decoration-style:solid;text-decoration-color:#000000;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;baseline-shift:baseline;text-anchor:start;white-space:normal;clip-rule:nonzero;display:inline;overflow:visible;visibility:visible;opacity:1;isolation:auto;mix-blend-mode:normal;color-interpolation:sRGB;color-interpolation-filters:linearRGB;solid-color:#000000;solid-opacity:1;fill:#e0e0e0;fill-opacity:1;fill-rule:evenodd;stroke:none;stroke-width:2;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;color-rendering:auto;image-rendering:auto;shape-rendering:auto;text-rendering:auto;enable-background:accumulate"
+ d="m 2,1037.3613 a 1.0001,1.0001 0 0 0 -1,1 l 0,10 a 1.0001,1.0001 0 0 0 1,1 c 2.3666667,0 3.9746094,0.4629 5.7246094,0.9629 1.75,0.5 3.6420576,1.0371 6.2753906,1.0371 a 1.0001,1.0001 0 0 0 1,-1 l 0,-10 a 1.0001,1.0001 0 0 0 -1,-1 c -2.366667,0 -3.974609,-0.4609 -5.7246094,-0.9609 -1.75,-0.5 -3.6420573,-1.0391 -6.2753906,-1.0391 z m 1,2.0957 c 1.798426,0.1158 3.2574477,0.448 4.7246094,0.8672 1.4977347,0.4279 3.1940466,0.8188 5.2753906,0.9414 l 0,8.002 c -1.79849,-0.1158 -3.2574125,-0.448 -4.7246094,-0.8672 C 6.7776425,1047.9725 5.0813715,1047.5796 3,1047.457 l 0,-8 z"
+ id="path4157"
+ inkscape:connector-curvature="0" />
+ </g>
+</svg>
diff --git a/tools/editor/inspector_dock.cpp b/tools/editor/inspector_dock.cpp
index 7b06761e53..253f9bcc01 100644
--- a/tools/editor/inspector_dock.cpp
+++ b/tools/editor/inspector_dock.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/inspector_dock.h b/tools/editor/inspector_dock.h
index 40c153e2d4..be6ed5fa87 100644
--- a/tools/editor/inspector_dock.h
+++ b/tools/editor/inspector_dock.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -38,7 +38,7 @@
#if 0
class InspectorDock : public VBoxContainer
{
- OBJ_TYPE(InspectorDock,VBoxContainer);
+ GDCLASS(InspectorDock,VBoxContainer);
PropertyEditor *property_editor;
diff --git a/tools/editor/io_plugins/editor_atlas.cpp b/tools/editor/io_plugins/editor_atlas.cpp
index f69e383fb0..ac776f4ff5 100644
--- a/tools/editor/io_plugins/editor_atlas.cpp
+++ b/tools/editor/io_plugins/editor_atlas.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/io_plugins/editor_atlas.h b/tools/editor/io_plugins/editor_atlas.h
index 0135e76622..e0cf76576e 100644
--- a/tools/editor/io_plugins/editor_atlas.h
+++ b/tools/editor/io_plugins/editor_atlas.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp b/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp
index 757d2ed5d4..b4e0c4b82a 100644
--- a/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp
@@ -11,7 +11,7 @@
class _EditorBitMaskImportOptions : public Object {
- OBJ_TYPE(_EditorBitMaskImportOptions, Object);
+ GDCLASS(_EditorBitMaskImportOptions, Object);
public:
bool _set(const StringName& p_name, const Variant& p_value) {
@@ -42,7 +42,7 @@ public:
class EditorBitMaskImportDialog : public ConfirmationDialog {
- OBJ_TYPE(EditorBitMaskImportDialog, ConfirmationDialog);
+ GDCLASS(EditorBitMaskImportDialog, ConfirmationDialog);
EditorBitMaskImportPlugin *plugin;
@@ -162,11 +162,11 @@ public:
static void _bind_methods() {
- ObjectTypeDB::bind_method("_choose_files", &EditorBitMaskImportDialog::_choose_files);
- ObjectTypeDB::bind_method("_choose_save_dir", &EditorBitMaskImportDialog::_choose_save_dir);
- ObjectTypeDB::bind_method("_import", &EditorBitMaskImportDialog::_import);
- ObjectTypeDB::bind_method("_browse", &EditorBitMaskImportDialog::_browse);
- ObjectTypeDB::bind_method("_browse_target", &EditorBitMaskImportDialog::_browse_target);
+ ClassDB::bind_method("_choose_files", &EditorBitMaskImportDialog::_choose_files);
+ ClassDB::bind_method("_choose_save_dir", &EditorBitMaskImportDialog::_choose_save_dir);
+ ClassDB::bind_method("_import", &EditorBitMaskImportDialog::_import);
+ ClassDB::bind_method("_browse", &EditorBitMaskImportDialog::_browse);
+ ClassDB::bind_method("_browse_target", &EditorBitMaskImportDialog::_browse_target);
// ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) );
}
@@ -179,7 +179,7 @@ public:
VBoxContainer *vbc = memnew(VBoxContainer);
add_child(vbc);
- set_child_rect(vbc);
+ //set_child_rect(vbc);
HBoxContainer *hbc = memnew(HBoxContainer);
diff --git a/tools/editor/io_plugins/editor_bitmask_import_plugin.h b/tools/editor/io_plugins/editor_bitmask_import_plugin.h
index d9ca33cd97..28dddca50a 100644
--- a/tools/editor/io_plugins/editor_bitmask_import_plugin.h
+++ b/tools/editor/io_plugins/editor_bitmask_import_plugin.h
@@ -9,7 +9,7 @@ class EditorBitMaskImportDialog;
class EditorBitMaskImportPlugin : public EditorImportPlugin {
- OBJ_TYPE(EditorBitMaskImportPlugin, EditorImportPlugin);
+ GDCLASS(EditorBitMaskImportPlugin, EditorImportPlugin);
EditorBitMaskImportDialog *dialog;
public:
@@ -30,7 +30,7 @@ public:
class EditorBitMaskExportPlugin : public EditorExportPlugin {
- OBJ_TYPE(EditorBitMaskExportPlugin, EditorExportPlugin);
+ GDCLASS(EditorBitMaskExportPlugin, EditorExportPlugin);
public:
diff --git a/tools/editor/io_plugins/editor_export_scene.cpp b/tools/editor/io_plugins/editor_export_scene.cpp
index acbbf8c737..c2e037cfd7 100644
--- a/tools/editor/io_plugins/editor_export_scene.cpp
+++ b/tools/editor/io_plugins/editor_export_scene.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -61,7 +61,7 @@ Vector<uint8_t> EditorSceneExportPlugin::custom_export(String& p_path,const Ref<
uint64_t sd=0;
String smd5;
- String gp = Globals::get_singleton()->globalize_path(p_path);
+ String gp = GlobalConfig::get_singleton()->globalize_path(p_path);
String md5=gp.md5_text();
String tmp_path = EditorSettings::get_singleton()->get_settings_path().plus_file("tmp/");
diff --git a/tools/editor/io_plugins/editor_export_scene.h b/tools/editor/io_plugins/editor_export_scene.h
index 2c7fe9a1ab..13493220cb 100644
--- a/tools/editor/io_plugins/editor_export_scene.h
+++ b/tools/editor/io_plugins/editor_export_scene.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -33,7 +33,7 @@
class EditorSceneExportPlugin : public EditorExportPlugin {
- OBJ_TYPE( EditorSceneExportPlugin, EditorExportPlugin );
+ GDCLASS( EditorSceneExportPlugin, EditorExportPlugin );
public:
virtual Vector<uint8_t> custom_export(String& p_path,const Ref<EditorExportPlatform> &p_platform);
diff --git a/tools/editor/io_plugins/editor_font_import_plugin.cpp b/tools/editor/io_plugins/editor_font_import_plugin.cpp
index df3741f0d4..388ca4ca89 100644
--- a/tools/editor/io_plugins/editor_font_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_font_import_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -44,7 +44,7 @@
class _EditorFontImportOptions : public Object {
- OBJ_TYPE(_EditorFontImportOptions,Object);
+ GDCLASS(_EditorFontImportOptions,Object);
public:
enum FontMode {
@@ -384,7 +384,7 @@ public:
class EditorFontImportDialog : public ConfirmationDialog {
- OBJ_TYPE(EditorFontImportDialog, ConfirmationDialog);
+ GDCLASS(EditorFontImportDialog, ConfirmationDialog);
EditorLineEditFileChooser *source;
@@ -418,7 +418,7 @@ class EditorFontImportDialog : public ConfirmationDialog {
//print_line("pre src path "+source->get_line_edit()->get_text());
//print_line("src path "+src_path);
imd->add_source(src_path);
- imd->set_option("font/size",font_size->get_val());
+ imd->set_option("font/size",font_size->get_value());
return imd;
@@ -572,14 +572,14 @@ class EditorFontImportDialog : public ConfirmationDialog {
static void _bind_methods() {
- ObjectTypeDB::bind_method("_update",&EditorFontImportDialog::_update);
- ObjectTypeDB::bind_method("_update_text",&EditorFontImportDialog::_update_text);
- ObjectTypeDB::bind_method("_update_text2",&EditorFontImportDialog::_update_text2);
- ObjectTypeDB::bind_method("_update_text3",&EditorFontImportDialog::_update_text3);
- ObjectTypeDB::bind_method("_prop_changed",&EditorFontImportDialog::_prop_changed);
- ObjectTypeDB::bind_method("_src_changed",&EditorFontImportDialog::_src_changed);
- ObjectTypeDB::bind_method("_font_size_changed",&EditorFontImportDialog::_font_size_changed);
- ObjectTypeDB::bind_method("_import",&EditorFontImportDialog::_import);
+ ClassDB::bind_method("_update",&EditorFontImportDialog::_update);
+ ClassDB::bind_method("_update_text",&EditorFontImportDialog::_update_text);
+ ClassDB::bind_method("_update_text2",&EditorFontImportDialog::_update_text2);
+ ClassDB::bind_method("_update_text3",&EditorFontImportDialog::_update_text3);
+ ClassDB::bind_method("_prop_changed",&EditorFontImportDialog::_prop_changed);
+ ClassDB::bind_method("_src_changed",&EditorFontImportDialog::_src_changed);
+ ClassDB::bind_method("_font_size_changed",&EditorFontImportDialog::_font_size_changed);
+ ClassDB::bind_method("_import",&EditorFontImportDialog::_import);
}
@@ -619,7 +619,7 @@ public:
}
source->get_line_edit()->set_text(src);
- font_size->set_val(rimd->get_option("font/size"));
+ font_size->set_value(rimd->get_option("font/size"));
}
}
@@ -634,7 +634,7 @@ public:
plugin=p_plugin;
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
- set_child_rect(vbc);
+ //set_child_rect(vbc);
HBoxContainer *hbc = memnew( HBoxContainer);
vbc->add_child(hbc);
VBoxContainer *vbl = memnew( VBoxContainer );
@@ -658,7 +658,7 @@ public:
vbl->add_margin_child(TTR("Source Font Size:"),font_size);
font_size->set_min(3);
font_size->set_max(256);
- font_size->set_val(16);
+ font_size->set_value(16);
font_size->connect("value_changed",this,"_font_size_changed");
dest = memnew( EditorLineEditFileChooser );
//
@@ -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 {
@@ -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,9 +1512,9 @@ 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_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++) {
@@ -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) {
@@ -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_font_import_plugin.h b/tools/editor/io_plugins/editor_font_import_plugin.h
index 25914e6f83..73c699c090 100644
--- a/tools/editor/io_plugins/editor_font_import_plugin.h
+++ b/tools/editor/io_plugins/editor_font_import_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -37,7 +37,7 @@ class EditorFontImportDialog;
class EditorFontImportPlugin : public EditorImportPlugin {
- OBJ_TYPE(EditorFontImportPlugin,EditorImportPlugin);
+ GDCLASS(EditorFontImportPlugin,EditorImportPlugin);
EditorFontImportDialog *dialog;
public:
diff --git a/tools/editor/io_plugins/editor_import_collada.cpp b/tools/editor/io_plugins/editor_import_collada.cpp
index 2211167dbb..5720e15caa 100644
--- a/tools/editor/io_plugins/editor_import_collada.cpp
+++ b/tools/editor/io_plugins/editor_import_collada.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -85,7 +85,7 @@ struct ColladaImport {
Error _create_scene(Collada::Node *p_node, Spatial *p_parent);
Error _create_resources(Collada::Node *p_node);
Error _create_material(const String& p_material);
- Error _create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,const Map<String,Collada::NodeGeometry::Material>& p_material_map,const Collada::MeshData &meshdata,const Transform& p_local_xform,const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_data, const Collada::MorphControllerData *p_morph_data,Vector<Ref<Mesh> > p_morph_meshes=Vector<Ref<Mesh> >());
+ Error _create_mesh_surfaces(bool p_optimize, Ref<Mesh>& p_mesh, const Map<String,Collada::NodeGeometry::Material>& p_material_map, const Collada::MeshData &meshdata, const Transform& p_local_xform, const Vector<int> &bone_remap, const Collada::SkinControllerData *p_skin_data, const Collada::MorphControllerData *p_morph_data, Vector<Ref<Mesh> > p_morph_meshes=Vector<Ref<Mesh> >(), bool p_for_morph=false);
Error load(const String& p_path, int p_flags, bool p_force_make_tangents=false);
void _fix_param_animation_tracks();
void create_animation(int p_clip,bool p_make_tracks_in_all_bones, bool p_import_value_tracks);
@@ -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;
}
@@ -377,7 +377,7 @@ Error ColladaImport::_create_material(const String& p_target) {
ERR_FAIL_COND_V(!collada.state.effect_map.has(src_mat.instance_effect),ERR_INVALID_PARAMETER);
Collada::Effect &effect=collada.state.effect_map[src_mat.instance_effect];
- Ref<FixedMaterial> material= memnew( FixedMaterial );
+ Ref<FixedSpatialMaterial> material= memnew( FixedSpatialMaterial );
if (src_mat.name!="")
material->set_name(src_mat.name);
@@ -394,14 +394,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_DIFFUSE,texture);
- material->set_parameter(FixedMaterial::PARAM_DIFFUSE,Color(1,1,1,1));
+ material->set_texture(FixedSpatialMaterial::TEXTURE_ALBEDO,texture);
+ material->set_albedo(Color(1,1,1,1));
+// material->set_parameter(FixedSpatialMaterial::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(FixedSpatialMaterial::PARAM_DIFFUSE,effect.diffuse.color);
}
// SPECULAR
@@ -413,16 +414,18 @@ Error ColladaImport::_create_material(const String& p_target) {
Ref<Texture> texture = ResourceLoader::load(texfile,"Texture");
if (texture.is_valid()) {
+ material->set_texture(FixedSpatialMaterial::TEXTURE_SPECULAR,texture);
+ material->set_specular(Color(1,1,1,1));
- material->set_texture(FixedMaterial::PARAM_SPECULAR,texture);
- material->set_parameter(FixedMaterial::PARAM_SPECULAR,Color(1,1,1,1));
+// material->set_texture(FixedSpatialMaterial::PARAM_SPECULAR,texture);
+// material->set_parameter(FixedSpatialMaterial::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(FixedSpatialMaterial::PARAM_SPECULAR,effect.specular.color);
}
// EMISSION
@@ -435,15 +438,17 @@ 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(FixedSpatialMaterial::TEXTURE_EMISSION,texture);
+ material->set_emission(Color(1,1,1,1));
+
+// material->set_parameter(FixedSpatialMaterial::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(FixedSpatialMaterial::PARAM_EMISSION,effect.emission.color);
}
// NORMAL
@@ -455,19 +460,23 @@ Error ColladaImport::_create_material(const String& p_target) {
Ref<Texture> texture = ResourceLoader::load(texfile,"Texture");
if (texture.is_valid()) {
+ material->set_texture(FixedSpatialMaterial::TEXTURE_NORMAL,texture);
+// material->set_emission(Color(1,1,1,1));
- material->set_texture(FixedMaterial::PARAM_NORMAL,texture);
+ // material->set_texture(FixedSpatialMaterial::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(FixedSpatialMaterial::PARAM_SPECULAR_EXP,effect.shininess);
+ if (effect.double_sided) {
+ material->set_cull_mode(FixedSpatialMaterial::CULL_DISABLED);
+ }
+ material->set_flag(FixedSpatialMaterial::FLAG_UNSHADED,effect.unshaded);
@@ -476,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++) {
@@ -510,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();
@@ -522,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++) {
@@ -579,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];
@@ -597,7 +606,7 @@ static void _generate_tangents_and_binormals(const DVector<int>& p_indices,const
}
}
-Error ColladaImport::_create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,const Map<String,Collada::NodeGeometry::Material>& p_material_map,const Collada::MeshData &meshdata,const Transform& p_local_xform,const Vector<int> &bone_remap, const Collada::SkinControllerData *skin_controller, const Collada::MorphControllerData *p_morph_data,Vector<Ref<Mesh> > p_morph_meshes) {
+Error ColladaImport::_create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,const Map<String,Collada::NodeGeometry::Material>& p_material_map,const Collada::MeshData &meshdata,const Transform& p_local_xform,const Vector<int> &bone_remap, const Collada::SkinControllerData *skin_controller, const Collada::MorphControllerData *p_morph_data,Vector<Ref<Mesh> > p_morph_meshes,bool p_for_morph) {
bool local_xform_mirror=p_local_xform.basis.determinant() < 0;
@@ -1022,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()) {
@@ -1032,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();
/*****************/
@@ -1042,7 +1051,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,con
{
- Ref<FixedMaterial> material;
+ Ref<FixedSpatialMaterial> material;
//find material
Mesh::PrimitiveType primitive=Mesh::PRIMITIVE_TRIANGLES;
@@ -1066,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<float> 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;
@@ -1108,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++)
@@ -1180,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++) {
@@ -1193,10 +1202,10 @@ 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() && 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);
@@ -1208,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<float> 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<float>::Write bonearrayw = bonearray.write();
+ PoolVector<int>::Write bonearrayw = bonearray.write();
for(int k=0;k<vlen;k++) {
float sum=0;
@@ -1237,7 +1246,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,con
if (l<vertex_array[k].weights.size()) {
weightarrayw[k*VS::ARRAY_WEIGHTS_SIZE+l]=vertex_array[k].weights[l].weight;
sum+=weightarrayw[k*VS::ARRAY_WEIGHTS_SIZE+l];
- bonearrayw[k*VS::ARRAY_WEIGHTS_SIZE+l]=vertex_array[k].weights[l].bone_idx;
+ bonearrayw[k*VS::ARRAY_WEIGHTS_SIZE+l]=int(vertex_array[k].weights[l].bone_idx);
//COLLADA_PRINT(itos(k)+": "+rtos(bonearrayw[k*VS::ARRAY_WEIGHTS_SIZE+l])+":"+rtos(weightarray[k*VS::ARRAY_WEIGHTS_SIZE+l]));
} else {
@@ -1253,8 +1262,8 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,con
}
- weightarrayw = DVector<float>::Write();
- bonearrayw = DVector<float>::Write();
+ weightarrayw = PoolVector<float>::Write();
+ bonearrayw = PoolVector<int>::Write();
final_weight_array = weightarray;
final_bone_array = bonearray;
@@ -1317,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);
@@ -1336,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++) {
@@ -1372,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
@@ -1393,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++) {
@@ -1461,14 +1470,20 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,con
// print_line("want surface "+itos(mi)+" has "+itos(p_morph_meshes[mi]->get_surface_count()));
Array a = p_morph_meshes[mi]->surface_get_arrays(surface);
- a[Mesh::ARRAY_BONES]=Variant();
- a[Mesh::ARRAY_WEIGHTS]=Variant();
+ //add valid weight and bone arrays if they exist, TODO check if they are unique to shape (generally not)
+
+ if (final_weight_array.size())
+ a[Mesh::ARRAY_WEIGHTS]=final_weight_array;
+ if (final_bone_array.size())
+ a[Mesh::ARRAY_BONES]=final_bone_array;
+
a[Mesh::ARRAY_INDEX]=Variant();
//a.resize(Mesh::ARRAY_MAX); //no need for index
mr.push_back(a);
}
- p_mesh->add_surface(Mesh::PRIMITIVE_TRIANGLES,d,mr);
+
+ p_mesh->add_surface_from_arrays(Mesh::PRIMITIVE_TRIANGLES,d,mr,p_for_morph?0:Mesh::ARRAY_COMPRESS_DEFAULT);
if (material.is_valid()) {
p_mesh->surface_set_material(surface, material);
@@ -1692,7 +1707,7 @@ Error ColladaImport::_create_resources(Collada::Node *p_node) {
if (collada.state.mesh_data_map.has(meshid)) {
Ref<Mesh> mesh=Ref<Mesh>(memnew( Mesh ));
const Collada::MeshData &meshdata = collada.state.mesh_data_map[meshid];
- Error err = _create_mesh_surfaces(false,mesh,ng->material_map,meshdata,apply_xform,bone_remap,skin,NULL);
+ Error err = _create_mesh_surfaces(false,mesh,ng->material_map,meshdata,apply_xform,bone_remap,skin,NULL,Vector<Ref<Mesh> >(),true);
ERR_FAIL_COND_V(err,err);
morphs.push_back(mesh);
diff --git a/tools/editor/io_plugins/editor_import_collada.h b/tools/editor/io_plugins/editor_import_collada.h
index de45dc38f4..f6642778ed 100644
--- a/tools/editor/io_plugins/editor_import_collada.h
+++ b/tools/editor/io_plugins/editor_import_collada.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -35,7 +35,7 @@
class EditorSceneImporterCollada : public EditorSceneImporter {
- OBJ_TYPE(EditorSceneImporterCollada,EditorSceneImporter );
+ GDCLASS(EditorSceneImporterCollada,EditorSceneImporter );
public:
virtual uint32_t get_import_flags() const;
diff --git a/tools/editor/io_plugins/editor_mesh_import_plugin.cpp b/tools/editor/io_plugins/editor_mesh_import_plugin.cpp
index da608292c1..f33693c304 100644
--- a/tools/editor/io_plugins/editor_mesh_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_mesh_import_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -40,7 +40,7 @@
class _EditorMeshImportOptions : public Object {
- OBJ_TYPE(_EditorMeshImportOptions,Object);
+ GDCLASS(_EditorMeshImportOptions,Object);
public:
@@ -148,7 +148,7 @@ public:
class EditorMeshImportDialog : public ConfirmationDialog {
- OBJ_TYPE(EditorMeshImportDialog,ConfirmationDialog);
+ GDCLASS(EditorMeshImportDialog,ConfirmationDialog);
EditorMeshImportPlugin *plugin;
@@ -278,11 +278,11 @@ public:
static void _bind_methods() {
- ObjectTypeDB::bind_method("_choose_files",&EditorMeshImportDialog::_choose_files);
- ObjectTypeDB::bind_method("_choose_save_dir",&EditorMeshImportDialog::_choose_save_dir);
- ObjectTypeDB::bind_method("_import",&EditorMeshImportDialog::_import);
- ObjectTypeDB::bind_method("_browse",&EditorMeshImportDialog::_browse);
- ObjectTypeDB::bind_method("_browse_target",&EditorMeshImportDialog::_browse_target);
+ ClassDB::bind_method("_choose_files",&EditorMeshImportDialog::_choose_files);
+ ClassDB::bind_method("_choose_save_dir",&EditorMeshImportDialog::_choose_save_dir);
+ ClassDB::bind_method("_import",&EditorMeshImportDialog::_import);
+ ClassDB::bind_method("_browse",&EditorMeshImportDialog::_browse);
+ ClassDB::bind_method("_browse_target",&EditorMeshImportDialog::_browse_target);
}
EditorMeshImportDialog(EditorMeshImportPlugin *p_plugin) {
@@ -294,7 +294,7 @@ public:
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
- set_child_rect(vbc);
+ //set_child_rect(vbc);
HBoxContainer *hbc = memnew( HBoxContainer );
vbc->add_margin_child(TTR("Source Mesh(es):"),hbc);
diff --git a/tools/editor/io_plugins/editor_mesh_import_plugin.h b/tools/editor/io_plugins/editor_mesh_import_plugin.h
index d200603e6a..1f15fee3a7 100644
--- a/tools/editor/io_plugins/editor_mesh_import_plugin.h
+++ b/tools/editor/io_plugins/editor_mesh_import_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -38,7 +38,7 @@ class EditorMeshImportDialog;
class EditorMeshImportPlugin : public EditorImportPlugin {
- OBJ_TYPE(EditorMeshImportPlugin,EditorImportPlugin);
+ GDCLASS(EditorMeshImportPlugin,EditorImportPlugin);
EditorMeshImportDialog *dialog;
diff --git a/tools/editor/io_plugins/editor_sample_import_plugin.cpp b/tools/editor/io_plugins/editor_sample_import_plugin.cpp
index 7dc74e58dd..da4e24dc84 100644
--- a/tools/editor/io_plugins/editor_sample_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_sample_import_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -39,7 +39,7 @@
class _EditorSampleImportOptions : public Object {
- OBJ_TYPE(_EditorSampleImportOptions,Object);
+ GDCLASS(_EditorSampleImportOptions,Object);
public:
enum CompressMode {
@@ -166,7 +166,7 @@ public:
class EditorSampleImportDialog : public ConfirmationDialog {
- OBJ_TYPE(EditorSampleImportDialog,ConfirmationDialog);
+ GDCLASS(EditorSampleImportDialog,ConfirmationDialog);
EditorSampleImportPlugin *plugin;
@@ -318,11 +318,11 @@ public:
static void _bind_methods() {
- ObjectTypeDB::bind_method("_choose_files",&EditorSampleImportDialog::_choose_files);
- ObjectTypeDB::bind_method("_choose_save_dir",&EditorSampleImportDialog::_choose_save_dir);
- ObjectTypeDB::bind_method("_import",&EditorSampleImportDialog::_import);
- ObjectTypeDB::bind_method("_browse",&EditorSampleImportDialog::_browse);
- ObjectTypeDB::bind_method("_browse_target",&EditorSampleImportDialog::_browse_target);
+ ClassDB::bind_method("_choose_files",&EditorSampleImportDialog::_choose_files);
+ ClassDB::bind_method("_choose_save_dir",&EditorSampleImportDialog::_choose_save_dir);
+ ClassDB::bind_method("_import",&EditorSampleImportDialog::_import);
+ ClassDB::bind_method("_browse",&EditorSampleImportDialog::_browse);
+ ClassDB::bind_method("_browse_target",&EditorSampleImportDialog::_browse_target);
// ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) );
}
@@ -335,7 +335,7 @@ public:
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
- set_child_rect(vbc);
+ //set_child_rect(vbc);
HBoxContainer *hbc = memnew( HBoxContainer );
@@ -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 a2686ebe4f..6d781756b2 100644
--- a/tools/editor/io_plugins/editor_sample_import_plugin.h
+++ b/tools/editor/io_plugins/editor_sample_import_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -37,10 +37,10 @@ class EditorSampleImportDialog;
class EditorSampleImportPlugin : public EditorImportPlugin {
- OBJ_TYPE(EditorSampleImportPlugin,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;
@@ -59,7 +59,7 @@ public:
class EditorSampleExportPlugin : public EditorExportPlugin {
- OBJ_TYPE( EditorSampleExportPlugin, EditorExportPlugin);
+ GDCLASS( EditorSampleExportPlugin, EditorExportPlugin);
public:
diff --git a/tools/editor/io_plugins/editor_scene_import_plugin.cpp b/tools/editor/io_plugins/editor_scene_import_plugin.cpp
index 093f37fe00..4a1270c1ca 100644
--- a/tools/editor/io_plugins/editor_scene_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_scene_import_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -82,7 +82,7 @@ EditorScenePostImport::EditorScenePostImport() {
class EditorImportAnimationOptions : public VBoxContainer {
- OBJ_TYPE( EditorImportAnimationOptions, VBoxContainer );
+ GDCLASS( EditorImportAnimationOptions, VBoxContainer );
@@ -147,7 +147,7 @@ public:
class EditorSceneImportDialog : public ConfirmationDialog {
- OBJ_TYPE(EditorSceneImportDialog,ConfirmationDialog);
+ GDCLASS(EditorSceneImportDialog,ConfirmationDialog);
struct FlagInfo {
@@ -374,10 +374,10 @@ void EditorImportAnimationOptions::_item_edited() {
void EditorImportAnimationOptions::_bind_methods() {
- ObjectTypeDB::bind_method("_changed",&EditorImportAnimationOptions::_changed);
- ObjectTypeDB::bind_method("_item_edited",&EditorImportAnimationOptions::_item_edited);
- ObjectTypeDB::bind_method("_button_action",&EditorImportAnimationOptions::_button_action);
-// ObjectTypeDB::bind_method("_changedp",&EditorImportAnimationOptions::_changedp);
+ ClassDB::bind_method("_changed",&EditorImportAnimationOptions::_changed);
+ ClassDB::bind_method("_item_edited",&EditorImportAnimationOptions::_item_edited);
+ ClassDB::bind_method("_button_action",&EditorImportAnimationOptions::_button_action);
+// ClassDB::bind_method("_changedp",&EditorImportAnimationOptions::_changedp);
ADD_SIGNAL(MethodInfo("changed"));
}
@@ -670,9 +670,9 @@ void EditorSceneImportDialog::_choose_save_file(const String& p_path) {
void EditorSceneImportDialog::_choose_script(const String& p_path) {
- String p = Globals::get_singleton()->localize_path(p_path);
+ String p = GlobalConfig::get_singleton()->localize_path(p_path);
if (!p.is_resource_file())
- p=Globals::get_singleton()->get_resource_path().path_to(p_path.get_base_dir())+p_path.get_file();
+ p=GlobalConfig::get_singleton()->get_resource_path().path_to(p_path.get_base_dir())+p_path.get_file();
script_path->set_text(p);
}
@@ -725,7 +725,7 @@ void EditorSceneImportDialog::_import(bool p_and_open) {
if (texture_action->get_selected()==0)
dst_path=save_path->get_text();//.get_base_dir();
else
- dst_path=Globals::get_singleton()->get("import/shared_textures");
+ dst_path=GlobalConfig::get_singleton()->get("import/shared_textures");
uint32_t flags=0;
@@ -1058,19 +1058,19 @@ void EditorSceneImportDialog::_set_root_type() {
void EditorSceneImportDialog::_bind_methods() {
- ObjectTypeDB::bind_method("_choose_file",&EditorSceneImportDialog::_choose_file);
- ObjectTypeDB::bind_method("_choose_save_file",&EditorSceneImportDialog::_choose_save_file);
- ObjectTypeDB::bind_method("_choose_script",&EditorSceneImportDialog::_choose_script);
- ObjectTypeDB::bind_method("_import",&EditorSceneImportDialog::_import,DEFVAL(false));
- ObjectTypeDB::bind_method("_browse",&EditorSceneImportDialog::_browse);
- ObjectTypeDB::bind_method("_browse_target",&EditorSceneImportDialog::_browse_target);
- ObjectTypeDB::bind_method("_browse_script",&EditorSceneImportDialog::_browse_script);
- ObjectTypeDB::bind_method("_dialog_hid",&EditorSceneImportDialog::_dialog_hid);
- ObjectTypeDB::bind_method("_import_confirm",&EditorSceneImportDialog::_import_confirm);
- ObjectTypeDB::bind_method("_open_and_import",&EditorSceneImportDialog::_open_and_import);
- ObjectTypeDB::bind_method("_root_default_pressed",&EditorSceneImportDialog::_root_default_pressed);
- ObjectTypeDB::bind_method("_root_type_pressed",&EditorSceneImportDialog::_root_type_pressed);
- ObjectTypeDB::bind_method("_set_root_type",&EditorSceneImportDialog::_set_root_type);
+ ClassDB::bind_method("_choose_file",&EditorSceneImportDialog::_choose_file);
+ ClassDB::bind_method("_choose_save_file",&EditorSceneImportDialog::_choose_save_file);
+ ClassDB::bind_method("_choose_script",&EditorSceneImportDialog::_choose_script);
+ ClassDB::bind_method("_import",&EditorSceneImportDialog::_import,DEFVAL(false));
+ ClassDB::bind_method("_browse",&EditorSceneImportDialog::_browse);
+ ClassDB::bind_method("_browse_target",&EditorSceneImportDialog::_browse_target);
+ ClassDB::bind_method("_browse_script",&EditorSceneImportDialog::_browse_script);
+ ClassDB::bind_method("_dialog_hid",&EditorSceneImportDialog::_dialog_hid);
+ ClassDB::bind_method("_import_confirm",&EditorSceneImportDialog::_import_confirm);
+ ClassDB::bind_method("_open_and_import",&EditorSceneImportDialog::_open_and_import);
+ ClassDB::bind_method("_root_default_pressed",&EditorSceneImportDialog::_root_default_pressed);
+ ClassDB::bind_method("_root_type_pressed",&EditorSceneImportDialog::_root_type_pressed);
+ ClassDB::bind_method("_set_root_type",&EditorSceneImportDialog::_set_root_type);
ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) );
@@ -1115,7 +1115,7 @@ EditorSceneImportDialog::EditorSceneImportDialog(EditorNode *p_editor, EditorSce
set_title(TTR("Import 3D Scene"));
HBoxContainer *import_hb = memnew( HBoxContainer );
add_child(import_hb);
- set_child_rect(import_hb);
+ //set_child_rect(import_hb);
VBoxContainer *vbc = memnew( VBoxContainer );
import_hb->add_child(vbc);
@@ -1275,7 +1275,7 @@ EditorSceneImportDialog::EditorSceneImportDialog(EditorNode *p_editor, EditorSce
set_hide_on_ok(false);
GLOBAL_DEF("import/shared_textures","res://");
- Globals::get_singleton()->set_custom_property_info("import/shared_textures",PropertyInfo(Variant::STRING,"import/shared_textures",PROPERTY_HINT_DIR));
+ GlobalConfig::get_singleton()->set_custom_property_info("import/shared_textures",PropertyInfo(Variant::STRING,"import/shared_textures",PROPERTY_HINT_DIR));
import_hb->add_constant_override("separation",30);
@@ -1302,7 +1302,7 @@ EditorSceneImportDialog::EditorSceneImportDialog(EditorNode *p_editor, EditorSce
add_child(confirm_import);
VBoxContainer *cvb = memnew( VBoxContainer );
confirm_import->add_child(cvb);
- confirm_import->set_child_rect(cvb);
+// confirm_import->set_child_rect(cvb);
PanelContainer *pc = memnew( PanelContainer );
pc->add_style_override("panel",get_stylebox("normal","TextEdit"));
@@ -1394,7 +1394,7 @@ void EditorSceneImportPlugin::_find_resources(const Variant& p_var, Map<Ref<Imag
Ref<Resource> res = p_var;
if (res.is_valid()) {
- if (res->is_type("Texture") && !image_map.has(res)) {
+ if (res->is_class("Texture") && !image_map.has(res)) {
image_map.insert(res,TEXTURE_ROLE_DEFAULT);
@@ -1407,7 +1407,7 @@ void EditorSceneImportPlugin::_find_resources(const Variant& p_var, Map<Ref<Imag
for(List<PropertyInfo>::Element *E=pl.front();E;E=E->next()) {
if (E->get().type==Variant::OBJECT || E->get().type==Variant::ARRAY || E->get().type==Variant::DICTIONARY) {
- if (E->get().type==Variant::OBJECT && res->cast_to<FixedMaterial>() && (E->get().name=="textures/diffuse" || E->get().name=="textures/detail" || E->get().name=="textures/emission")) {
+ if (E->get().type==Variant::OBJECT && res->cast_to<FixedSpatialMaterial>() && (E->get().name=="textures/diffuse" || E->get().name=="textures/detail" || E->get().name=="textures/emission")) {
Ref<ImageTexture> tex =res->get(E->get().name);
if (tex.is_valid()) {
@@ -1415,15 +1415,15 @@ void EditorSceneImportPlugin::_find_resources(const Variant& p_var, Map<Ref<Imag
image_map.insert(tex,TEXTURE_ROLE_DIFFUSE);
}
- } else if (E->get().type==Variant::OBJECT && res->cast_to<FixedMaterial>() && (E->get().name=="textures/normal")) {
+ } else if (E->get().type==Variant::OBJECT && res->cast_to<FixedSpatialMaterial>() && (E->get().name=="textures/normal")) {
Ref<ImageTexture> tex =res->get(E->get().name);
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<FixedSpatialMaterial>()->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_XY_NORMALMAP,true);
+ }//
} else {
@@ -1529,12 +1529,12 @@ Node* EditorSceneImportPlugin::_fix_node(Node *p_node,Node *p_root,Map<Ref<Mesh>
Ref<Mesh> m = mi->get_mesh();
for(int i=0;i<m->get_surface_count();i++) {
- Ref<FixedMaterial> fm = m->surface_get_material(i);
+ Ref<FixedSpatialMaterial> 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(FixedSpatialMaterial::FLAG_USE_ALPHA,true);
}
}
}
@@ -1552,23 +1552,23 @@ Node* EditorSceneImportPlugin::_fix_node(Node *p_node,Node *p_root,Map<Ref<Mesh>
for(int i=0;i<m->get_surface_count();i++) {
- Ref<FixedMaterial> mat = m->surface_get_material(i);
+ Ref<FixedSpatialMaterial> mat = m->surface_get_material(i);
if (!mat.is_valid())
continue;
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(FixedSpatialMaterial::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(FixedSpatialMaterial::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);
}
}
@@ -1627,23 +1627,23 @@ 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()) {
Ref<Mesh> m = mi->get_mesh();
for(int i=0;i<m->get_surface_count();i++) {
- Ref<FixedMaterial> fm = m->surface_get_material(i);
+ Ref<FixedSpatialMaterial> 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(FixedSpatialMaterial::FLAG_USE_ALPHA,true);
}
}
}
@@ -1675,23 +1675,23 @@ 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()) {
Ref<Mesh> m = mi->get_mesh();
for(int i=0;i<m->get_surface_count();i++) {
- Ref<FixedMaterial> fm = m->surface_get_material(i);
+ Ref<FixedSpatialMaterial> 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_hint(Material::HINT_NO_DEPTH_DRAW,true);
- fm->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA,true);
+ fm->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_ALPHA,true);
}
}
}*/
@@ -1707,7 +1707,7 @@ Node* EditorSceneImportPlugin::_fix_node(Node *p_node,Node *p_root,Map<Ref<Mesh>
String str=name;
int layer = str.substr(str.find("lm")+3,str.length()).to_int();
- mi->set_baked_light_texture_id(layer);
+ //mi->set_baked_light_texture_id(layer);
}
if (p_flags&SCENE_FLAG_CREATE_COLLISIONS && _teststr(name,"colonly")) {
@@ -1897,14 +1897,14 @@ 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);
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 );
@@ -1932,7 +1932,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>()) {
@@ -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
@@ -2059,18 +2059,18 @@ Node* EditorSceneImportPlugin::_fix_node(Node *p_node,Node *p_root,Map<Ref<Mesh>
for(int i=0;i<mesh->get_surface_count();i++) {
- Ref<FixedMaterial> fm = mesh->surface_get_material(i);
+ Ref<FixedSpatialMaterial> fm = mesh->surface_get_material(i);
if (fm.is_valid()) {
String name = fm->get_name();
- if (_teststr(name,"alpha")) {
- fm->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA,true);
+ /* if (_teststr(name,"alpha")) {
+ fm->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_ALPHA,true);
name=_fixstr(name,"alpha");
}
if (_teststr(name,"vcol")) {
- fm->set_fixed_flag(FixedMaterial::FLAG_USE_COLOR_ARRAY,true);
+ fm->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_COLOR_ARRAY,true);
name=_fixstr(name,"vcol");
- }
+ }*/
fm->set_name(name);
}
}
@@ -2189,7 +2189,7 @@ Error EditorSceneImportPlugin::import1(const Ref<ResourceImportMetadata>& p_from
if (from->has_option("root_type")) {
String type = from->get_option("root_type");
- Object *base = ObjectTypeDB::instance(type);
+ Object *base = ClassDB::instance(type);
Node *base_node = NULL;
if (base)
base_node=base->cast_to<Node>();
@@ -2801,7 +2801,7 @@ Error EditorSceneImportPlugin::import2(Node *scene, const String& p_dest_path, c
String path = texture->get_path();
String fname= path.get_file();
- String target_path = Globals::get_singleton()->localize_path(target_res_path.plus_file(fname));
+ String target_path = GlobalConfig::get_singleton()->localize_path(target_res_path.plus_file(fname));
progress.step(TTR("Import Image:")+" "+fname,3+(idx)*100/imagemap.size());
idx++;
diff --git a/tools/editor/io_plugins/editor_scene_import_plugin.h b/tools/editor/io_plugins/editor_scene_import_plugin.h
index 2c27f06960..61153e3654 100644
--- a/tools/editor/io_plugins/editor_scene_import_plugin.h
+++ b/tools/editor/io_plugins/editor_scene_import_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -51,7 +51,7 @@ class EditorSceneImportDialog;
class EditorSceneImporter : public Reference {
- OBJ_TYPE(EditorSceneImporter,Reference );
+ GDCLASS(EditorSceneImporter,Reference );
public:
enum ImportFlags {
@@ -83,7 +83,7 @@ public:
class EditorScenePostImport : public Reference {
- OBJ_TYPE(EditorScenePostImport,Reference );
+ GDCLASS(EditorScenePostImport,Reference );
protected:
static void _bind_methods();
@@ -96,7 +96,7 @@ public:
class EditorSceneImportPlugin : public EditorImportPlugin {
- OBJ_TYPE(EditorSceneImportPlugin,EditorImportPlugin);
+ GDCLASS(EditorSceneImportPlugin,EditorImportPlugin);
EditorSceneImportDialog *dialog;
@@ -174,7 +174,7 @@ public:
class EditorSceneAnimationImportPlugin : public EditorImportPlugin {
- OBJ_TYPE(EditorSceneAnimationImportPlugin,EditorImportPlugin);
+ GDCLASS(EditorSceneAnimationImportPlugin,EditorImportPlugin);
public:
diff --git a/tools/editor/io_plugins/editor_scene_importer_fbxconv.cpp b/tools/editor/io_plugins/editor_scene_importer_fbxconv.cpp
index ac3c4637c2..e1b0719941 100644
--- a/tools/editor/io_plugins/editor_scene_importer_fbxconv.cpp
+++ b/tools/editor/io_plugins/editor_scene_importer_fbxconv.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -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("/","_");
@@ -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));
@@ -482,29 +482,29 @@ void EditorSceneImporterFBXConv::_parse_materials(State& state) {
ERR_CONTINUE(!material.has("id"));
String id = _id(material["id"]);
- Ref<FixedMaterial> mat = memnew( FixedMaterial );
+ Ref<FixedSpatialMaterial> mat = memnew( FixedSpatialMaterial );
if (material.has("diffuse")) {
- mat->set_parameter(FixedMaterial::PARAM_DIFFUSE,_get_color(material["diffuse"]));
+ mat->set_parameter(FixedSpatialMaterial::PARAM_DIFFUSE,_get_color(material["diffuse"]));
}
if (material.has("specular")) {
- mat->set_parameter(FixedMaterial::PARAM_SPECULAR,_get_color(material["specular"]));
+ mat->set_parameter(FixedSpatialMaterial::PARAM_SPECULAR,_get_color(material["specular"]));
}
if (material.has("emissive")) {
- mat->set_parameter(FixedMaterial::PARAM_EMISSION,_get_color(material["emissive"]));
+ mat->set_parameter(FixedSpatialMaterial::PARAM_EMISSION,_get_color(material["emissive"]));
}
if (material.has("shininess")) {
float exp = material["shininess"];
- mat->set_parameter(FixedMaterial::PARAM_SPECULAR_EXP,exp);
+ mat->set_parameter(FixedSpatialMaterial::PARAM_SPECULAR_EXP,exp);
}
if (material.has("opacity")) {
- Color c = mat->get_parameter(FixedMaterial::PARAM_DIFFUSE);
+ Color c = mat->get_parameter(FixedSpatialMaterial::PARAM_DIFFUSE);
c.a=material["opacity"];
- mat->set_parameter(FixedMaterial::PARAM_DIFFUSE,c);
+ mat->set_parameter(FixedSpatialMaterial::PARAM_DIFFUSE,c);
}
@@ -536,15 +536,15 @@ void EditorSceneImporterFBXConv::_parse_materials(State& state) {
String type=texture["type"];
if (type=="DIFFUSE")
- mat->set_texture(FixedMaterial::PARAM_DIFFUSE,tex);
+ mat->set_texture(FixedSpatialMaterial::PARAM_DIFFUSE,tex);
else if (type=="SPECULAR")
- mat->set_texture(FixedMaterial::PARAM_SPECULAR,tex);
+ mat->set_texture(FixedSpatialMaterial::PARAM_SPECULAR,tex);
else if (type=="SHININESS")
- mat->set_texture(FixedMaterial::PARAM_SPECULAR_EXP,tex);
+ mat->set_texture(FixedSpatialMaterial::PARAM_SPECULAR_EXP,tex);
else if (type=="NORMAL")
- mat->set_texture(FixedMaterial::PARAM_NORMAL,tex);
+ mat->set_texture(FixedSpatialMaterial::PARAM_NORMAL,tex);
else if (type=="EMISSIVE")
- mat->set_texture(FixedMaterial::PARAM_EMISSION,tex);
+ mat->set_texture(FixedSpatialMaterial::PARAM_EMISSION,tex);
}
}
@@ -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]);
}
@@ -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..1bf96ba0e5 100644
--- a/tools/editor/io_plugins/editor_scene_importer_fbxconv.h
+++ b/tools/editor/io_plugins/editor_scene_importer_fbxconv.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -32,10 +32,11 @@
#include "tools/editor/io_plugins/editor_scene_import_plugin.h"
#include "scene/3d/skeleton.h"
+#if 0
class EditorSceneImporterFBXConv : public EditorSceneImporter {
- OBJ_TYPE(EditorSceneImporterFBXConv,EditorSceneImporter );
+ GDCLASS(EditorSceneImporterFBXConv,EditorSceneImporter );
struct BoneInfo {
@@ -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..fd18dc6cb8 100644
--- a/tools/editor/io_plugins/editor_texture_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_texture_import_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -106,12 +106,12 @@ void EditorImportTextureOptions::set_flags(uint32_t p_flags){
void EditorImportTextureOptions::set_quality(float p_quality) {
- quality->set_val(p_quality);
+ quality->set_value(p_quality);
}
float EditorImportTextureOptions::get_quality() const {
- return quality->get_val();
+ return quality->get_value();
}
@@ -148,8 +148,8 @@ void EditorImportTextureOptions::_changed() {
void EditorImportTextureOptions::_bind_methods() {
- ObjectTypeDB::bind_method("_changed",&EditorImportTextureOptions::_changed);
- ObjectTypeDB::bind_method("_changedp",&EditorImportTextureOptions::_changedp);
+ ClassDB::bind_method("_changed",&EditorImportTextureOptions::_changed);
+ ClassDB::bind_method("_changedp",&EditorImportTextureOptions::_changedp);
ADD_SIGNAL(MethodInfo("changed"));
}
@@ -200,7 +200,7 @@ EditorImportTextureOptions::EditorImportTextureOptions() {
hs->set_min(0);
hs->set_max(1.0);
hs->set_step(0.01);
- hs->set_val(0.7);
+ hs->set_value(0.7);
quality=hs;
quality_vb->add_margin_child(TTR("Texture Compression Quality (WebP):"),quality_hb);
@@ -236,7 +236,7 @@ EditorImportTextureOptions::EditorImportTextureOptions() {
class EditorTextureImportDialog : public ConfirmationDialog {
- OBJ_TYPE(EditorTextureImportDialog,ConfirmationDialog);
+ GDCLASS(EditorTextureImportDialog,ConfirmationDialog);
@@ -396,7 +396,7 @@ void EditorTextureImportDialog::_import() {
imd->set_option("flags",texture_options->get_flags());
imd->set_option("quality",texture_options->get_quality());
imd->set_option("atlas",true);
- imd->set_option("atlas_size",int(size->get_val()));
+ imd->set_option("atlas_size",int(size->get_value()));
imd->set_option("large",false);
imd->set_option("crop",crop_source->is_pressed());
imd->set_option("mode",mode);
@@ -430,7 +430,7 @@ void EditorTextureImportDialog::_import() {
imd->set_option("quality",texture_options->get_quality());
imd->set_option("atlas",false);
imd->set_option("large",true);
- imd->set_option("large_cell_size",int(size->get_val()));
+ imd->set_option("large_cell_size",int(size->get_value()));
imd->set_option("crop",crop_source->is_pressed());
imd->set_option("mode",mode);
@@ -569,7 +569,7 @@ void EditorTextureImportDialog::_mode_changed(int p_mode) {
if (p_mode==EditorTextureImportPlugin::MODE_ATLAS) {
size_label->set_text(TTR("Max Texture Size:"));
- size->set_val(2048);
+ size->set_value(2048);
crop_source->show();
size_label->show();
size->show();
@@ -587,7 +587,7 @@ void EditorTextureImportDialog::_mode_changed(int p_mode) {
if (p_mode==EditorTextureImportPlugin::MODE_LARGE) {
size_label->set_text(TTR("Cell Size:"));
- size->set_val(256);
+ size->set_value(256);
size_label->show();
size->show();
@@ -636,13 +636,13 @@ void EditorTextureImportDialog::_mode_changed(int p_mode) {
void EditorTextureImportDialog::_bind_methods() {
- ObjectTypeDB::bind_method("_choose_files",&EditorTextureImportDialog::_choose_files);
- ObjectTypeDB::bind_method("_choose_file",&EditorTextureImportDialog::_choose_file);
- ObjectTypeDB::bind_method("_choose_save_dir",&EditorTextureImportDialog::_choose_save_dir);
- ObjectTypeDB::bind_method("_import",&EditorTextureImportDialog::_import);
- ObjectTypeDB::bind_method("_browse",&EditorTextureImportDialog::_browse);
- ObjectTypeDB::bind_method("_browse_target",&EditorTextureImportDialog::_browse_target);
- ObjectTypeDB::bind_method("_mode_changed",&EditorTextureImportDialog::_mode_changed);
+ ClassDB::bind_method("_choose_files",&EditorTextureImportDialog::_choose_files);
+ ClassDB::bind_method("_choose_file",&EditorTextureImportDialog::_choose_file);
+ ClassDB::bind_method("_choose_save_dir",&EditorTextureImportDialog::_choose_save_dir);
+ ClassDB::bind_method("_import",&EditorTextureImportDialog::_import);
+ ClassDB::bind_method("_browse",&EditorTextureImportDialog::_browse);
+ ClassDB::bind_method("_browse_target",&EditorTextureImportDialog::_browse_target);
+ ClassDB::bind_method("_mode_changed",&EditorTextureImportDialog::_mode_changed);
// ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) );
}
@@ -657,14 +657,14 @@ EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin*
mode_hb = memnew( HBoxContainer );
add_child(mode_hb);
- set_child_rect(mode_hb);
+ //set_child_rect(mode_hb);
VBoxContainer *vbcg = memnew( VBoxContainer);
mode_hb->add_child(vbcg);
mode_hb->add_constant_override("separation",15);
- ButtonGroup *bg = memnew( ButtonGroup );
+ VBoxContainer *bg = memnew( VBoxContainer );
vbcg->add_margin_child("Import Mode",bg);
for(int i=0;i<EditorTextureImportPlugin::MODE_MAX;i++) {
@@ -727,7 +727,7 @@ EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin*
size->set_max(16384);
- size->set_val(256);
+ size->set_value(256);
size_mc=vbc->add_margin_child(TTR("Cell Size:"),size);
size_label=vbc->get_child(size_mc->get_index()-1)->cast_to<Label>();
@@ -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,14 +1194,14 @@ 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();
+ 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++) {
@@ -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();
@@ -1645,7 +1639,7 @@ Vector<uint8_t> EditorTextureImportPlugin::custom_export(const String& p_path, c
uint8_t f4[4];
encode_uint32(flags,&f4[0]);
MD5Init(&ctx);
- String gp = Globals::get_singleton()->globalize_path(p_path);
+ String gp = GlobalConfig::get_singleton()->globalize_path(p_path);
CharString cs = gp.utf8();
MD5Update(&ctx,(unsigned char*)cs.get_data(),cs.length());
MD5Update(&ctx,f4,4);
diff --git a/tools/editor/io_plugins/editor_texture_import_plugin.h b/tools/editor/io_plugins/editor_texture_import_plugin.h
index 22c10a1a3a..b2117f1475 100644
--- a/tools/editor/io_plugins/editor_texture_import_plugin.h
+++ b/tools/editor/io_plugins/editor_texture_import_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -49,7 +49,7 @@ class EditorTextureImportDialog;
class EditorTextureImportPlugin : public EditorImportPlugin {
- OBJ_TYPE(EditorTextureImportPlugin,EditorImportPlugin);
+ GDCLASS(EditorTextureImportPlugin,EditorImportPlugin);
public:
@@ -119,7 +119,7 @@ public:
class EditorTextureExportPlugin : public EditorExportPlugin {
- OBJ_TYPE( EditorTextureExportPlugin, EditorExportPlugin);
+ GDCLASS( EditorTextureExportPlugin, EditorExportPlugin);
public:
@@ -130,7 +130,7 @@ public:
class EditorImportTextureOptions : public VBoxContainer {
- OBJ_TYPE( EditorImportTextureOptions, VBoxContainer );
+ GDCLASS( EditorImportTextureOptions, VBoxContainer );
OptionButton *format;
diff --git a/tools/editor/io_plugins/editor_translation_import_plugin.cpp b/tools/editor/io_plugins/editor_translation_import_plugin.cpp
index 9ee3e98486..73d9e989ac 100644
--- a/tools/editor/io_plugins/editor_translation_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_translation_import_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -41,7 +41,7 @@
class EditorTranslationImportDialog : public ConfirmationDialog {
- OBJ_TYPE(EditorTranslationImportDialog,ConfirmationDialog);
+ GDCLASS(EditorTranslationImportDialog,ConfirmationDialog);
EditorTranslationImportPlugin *plugin;
@@ -282,11 +282,11 @@ public:
static void _bind_methods() {
- ObjectTypeDB::bind_method("_choose_file",&EditorTranslationImportDialog::_choose_file);
- ObjectTypeDB::bind_method("_choose_save_dir",&EditorTranslationImportDialog::_choose_save_dir);
- ObjectTypeDB::bind_method("_import",&EditorTranslationImportDialog::_import);
- ObjectTypeDB::bind_method("_browse",&EditorTranslationImportDialog::_browse);
- ObjectTypeDB::bind_method("_browse_target",&EditorTranslationImportDialog::_browse_target);
+ ClassDB::bind_method("_choose_file",&EditorTranslationImportDialog::_choose_file);
+ ClassDB::bind_method("_choose_save_dir",&EditorTranslationImportDialog::_choose_save_dir);
+ ClassDB::bind_method("_import",&EditorTranslationImportDialog::_import);
+ ClassDB::bind_method("_browse",&EditorTranslationImportDialog::_browse);
+ ClassDB::bind_method("_browse_target",&EditorTranslationImportDialog::_browse_target);
// ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) );
}
@@ -299,7 +299,7 @@ public:
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
- set_child_rect(vbc);
+ //set_child_rect(vbc);
diff --git a/tools/editor/io_plugins/editor_translation_import_plugin.h b/tools/editor/io_plugins/editor_translation_import_plugin.h
index 532f2cedcc..38727bd778 100644
--- a/tools/editor/io_plugins/editor_translation_import_plugin.h
+++ b/tools/editor/io_plugins/editor_translation_import_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -37,7 +37,7 @@ class EditorTranslationImportDialog;
class EditorTranslationImportPlugin : public EditorImportPlugin {
- OBJ_TYPE(EditorTranslationImportPlugin,EditorImportPlugin);
+ GDCLASS(EditorTranslationImportPlugin,EditorImportPlugin);
EditorTranslationImportDialog *dialog;
public:
diff --git a/tools/editor/multi_node_edit.cpp b/tools/editor/multi_node_edit.cpp
index e4ceaf4a8b..47b776ed06 100644
--- a/tools/editor/multi_node_edit.cpp
+++ b/tools/editor/multi_node_edit.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/multi_node_edit.h b/tools/editor/multi_node_edit.h
index fd50dc5bf4..290c529d48 100644
--- a/tools/editor/multi_node_edit.h
+++ b/tools/editor/multi_node_edit.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -33,7 +33,7 @@
class MultiNodeEdit : public Reference {
- OBJ_TYPE(MultiNodeEdit,Reference);
+ GDCLASS(MultiNodeEdit,Reference);
List<NodePath> nodes;
struct PLData {
diff --git a/tools/editor/node_dock.cpp b/tools/editor/node_dock.cpp
index fb5a50e633..a8e66a8680 100644
--- a/tools/editor/node_dock.cpp
+++ b/tools/editor/node_dock.cpp
@@ -20,8 +20,8 @@ void NodeDock::show_connections(){
void NodeDock::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("show_groups"),&NodeDock::show_groups);
- ObjectTypeDB::bind_method(_MD("show_connections"),&NodeDock::show_connections);
+ ClassDB::bind_method(_MD("show_groups"),&NodeDock::show_groups);
+ ClassDB::bind_method(_MD("show_connections"),&NodeDock::show_connections);
}
void NodeDock::_notification(int p_what) {
diff --git a/tools/editor/node_dock.h b/tools/editor/node_dock.h
index 02312b90b5..fd4105d1b2 100644
--- a/tools/editor/node_dock.h
+++ b/tools/editor/node_dock.h
@@ -6,7 +6,7 @@
class NodeDock : public VBoxContainer {
- OBJ_TYPE(NodeDock,VBoxContainer);
+ GDCLASS(NodeDock,VBoxContainer);
ToolButton *connections_button;
ToolButton *groups_button;
diff --git a/tools/editor/output_strings.cpp b/tools/editor/output_strings.cpp
index a6126466c4..9ba97451c0 100644
--- a/tools/editor/output_strings.cpp
+++ b/tools/editor/output_strings.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -68,7 +68,7 @@ void OutputStrings::_notification(int p_what) {
if (following) {
updating=true;
- v_scroll->set_val( v_scroll->get_max() - v_scroll->get_page() );
+ v_scroll->set_value( v_scroll->get_max() - v_scroll->get_page() );
updating=false;
}
@@ -85,8 +85,8 @@ void OutputStrings::_notification(int p_what) {
// int lines = (size_height-(int)margin.y) / font_height;
Point2 ofs=tree_st->get_offset();
- LineMap::Element *E = line_map.find(v_scroll->get_val());
- float h_ofs = (int)h_scroll->get_val();
+ LineMap::Element *E = line_map.find(v_scroll->get_value());
+ float h_ofs = (int)h_scroll->get_value();
Point2 icon_ofs=Point2(0,(font_height-(int)icon_error->get_height())/2);
while( E && ofs.y < (size_height-(int)margin.y) ) {
@@ -194,8 +194,8 @@ void OutputStrings::add_line(const String& p_text, const Variant& p_meta, const
void OutputStrings::_bind_methods() {
- ObjectTypeDB::bind_method("_vscroll_changed",&OutputStrings::_vscroll_changed);
- ObjectTypeDB::bind_method("_hscroll_changed",&OutputStrings::_hscroll_changed);
+ ClassDB::bind_method("_vscroll_changed",&OutputStrings::_vscroll_changed);
+ ClassDB::bind_method("_hscroll_changed",&OutputStrings::_hscroll_changed);
}
OutputStrings::OutputStrings() {
diff --git a/tools/editor/output_strings.h b/tools/editor/output_strings.h
index 29c6ea799f..cc721ef652 100644
--- a/tools/editor/output_strings.h
+++ b/tools/editor/output_strings.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -36,7 +36,7 @@
class OutputStrings : public Control {
- OBJ_TYPE( OutputStrings, Control );
+ GDCLASS( OutputStrings, Control );
public:
enum LineType {
diff --git a/tools/editor/pane_drag.cpp b/tools/editor/pane_drag.cpp
index 8e8c2941ec..122abd37b9 100644
--- a/tools/editor/pane_drag.cpp
+++ b/tools/editor/pane_drag.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -29,7 +29,7 @@
#include "pane_drag.h"
-void PaneDrag::_input_event(const InputEvent& p_input) {
+void PaneDrag::_gui_input(const InputEvent& p_input) {
if (p_input.type==InputEvent::MOUSE_MOTION && p_input.mouse_motion.button_mask&BUTTON_MASK_LEFT) {
@@ -64,7 +64,7 @@ Size2 PaneDrag::get_minimum_size() const {
void PaneDrag::_bind_methods() {
- ObjectTypeDB::bind_method("_input_event",&PaneDrag::_input_event);
+ ClassDB::bind_method("_gui_input",&PaneDrag::_gui_input);
ADD_SIGNAL(MethodInfo("dragged",PropertyInfo(Variant::VECTOR2,"amount")));
}
diff --git a/tools/editor/pane_drag.h b/tools/editor/pane_drag.h
index 24f2ef7ed8..8796fc2594 100644
--- a/tools/editor/pane_drag.h
+++ b/tools/editor/pane_drag.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -33,14 +33,14 @@
class PaneDrag : public Control {
- OBJ_TYPE( PaneDrag, Control );
+ GDCLASS( PaneDrag, Control );
bool mouse_over;
protected:
- void _input_event(const InputEvent& p_input);
+ void _gui_input(const InputEvent& p_input);
void _notification(int p_what);
virtual Size2 get_minimum_size() const;
static void _bind_methods();
diff --git a/tools/editor/plugins/animation_player_editor_plugin.cpp b/tools/editor/plugins/animation_player_editor_plugin.cpp
index d6d452dd72..3201db1116 100644
--- a/tools/editor/plugins/animation_player_editor_plugin.cpp
+++ b/tools/editor/plugins/animation_player_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -50,7 +50,7 @@ void AnimationPlayerEditor::_node_removed(Node *p_node) {
}
}
-void AnimationPlayerEditor::_input_event(InputEvent p_event) {
+void AnimationPlayerEditor::_gui_input(InputEvent p_event) {
}
@@ -77,14 +77,14 @@ void AnimationPlayerEditor::_notification(int p_what) {
}
}
}
- frame->set_val(player->get_current_animation_pos());
+ frame->set_value(player->get_current_animation_pos());
key_editor->set_anim_pos(player->get_current_animation_pos());
EditorNode::get_singleton()->get_property_editor()->refresh();
} else if (last_active) {
//need the last frame after it stopped
- frame->set_val(player->get_current_animation_pos());
+ frame->set_value(player->get_current_animation_pos());
}
last_active=player->is_playing();
@@ -101,7 +101,7 @@ void AnimationPlayerEditor::_notification(int p_what) {
autoplay->set_icon( get_icon("AutoPlay","EditorIcons") );
load_anim->set_icon( get_icon("Folder","EditorIcons") );
save_anim->set_icon(get_icon("Save", "EditorIcons"));
- save_anim->get_popup()->connect("item_pressed", this, "_animation_save_menu");
+ save_anim->get_popup()->connect("id_pressed", this, "_animation_save_menu");
remove_anim->set_icon( get_icon("Remove","EditorIcons") );
blend_anim->set_icon( get_icon("Blend","EditorIcons") );
@@ -115,7 +115,7 @@ void AnimationPlayerEditor::_notification(int p_what) {
resource_edit_anim->set_icon( get_icon("EditResource","EditorIcons") );
pin->set_icon(get_icon("Pin","EditorIcons") );
tool_anim->set_icon(get_icon("Tools","EditorIcons"));
- tool_anim->get_popup()->connect("item_pressed",this,"_animation_tool_menu");
+ tool_anim->get_popup()->connect("id_pressed",this,"_animation_tool_menu");
blend_editor.next->connect("item_selected", this, "_blend_editor_next_changed");
@@ -375,12 +375,12 @@ void AnimationPlayerEditor::_animation_load() {
void AnimationPlayerEditor::_animation_save_in_path(const Ref<Resource>& p_resource, const String& p_path) {
int flg = 0;
- if (EditorSettings::get_singleton()->get("on_save/compress_binary_resources"))
+ if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources"))
flg |= ResourceSaver::FLAG_COMPRESS;
- //if (EditorSettings::get_singleton()->get("on_save/save_paths_as_relative"))
+ //if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative"))
// flg |= ResourceSaver::FLAG_RELATIVE_PATHS;
- String path = Globals::get_singleton()->localize_path(p_path);
+ String path = GlobalConfig::get_singleton()->localize_path(p_path);
Error err = ResourceSaver::save(path, p_resource, flg | ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS);
if (err != OK) {
@@ -431,7 +431,7 @@ void AnimationPlayerEditor::_animation_save_as(const Ref<Resource>& p_resource)
String existing;
if (extensions.size()) {
- existing = "new_" + p_resource->get_type().to_lower() + "." + extensions.front()->get().to_lower();
+ existing = "new_" + p_resource->get_class().to_lower() + "." + extensions.front()->get().to_lower();
}
file->set_current_path(existing);
@@ -723,7 +723,7 @@ void AnimationPlayerEditor::_dialog_action(String p_file) {
Ref<Resource> res = ResourceLoader::load(p_file, "Animation");
ERR_FAIL_COND(res.is_null());
- ERR_FAIL_COND(!res->is_type("Animation"));
+ ERR_FAIL_COND(!res->is_class("Animation"));
if (p_file.find_last("/") != -1) {
p_file = p_file.substr(p_file.find_last("/") + 1, p_file.length());
@@ -1108,7 +1108,7 @@ void AnimationPlayerEditor::_animation_key_editor_seek(float p_pos,bool p_drag)
return;
updating=true;
- frame->set_val(p_pos);
+ frame->set_value(p_pos);
updating=false;
_seek_value_changed(p_pos,!p_drag);
@@ -1245,42 +1245,42 @@ void AnimationPlayerEditor::_unhandled_key_input(const InputEvent& p_ev) {
void AnimationPlayerEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_input_event"),&AnimationPlayerEditor::_input_event);
- ObjectTypeDB::bind_method(_MD("_node_removed"),&AnimationPlayerEditor::_node_removed);
- ObjectTypeDB::bind_method(_MD("_play_pressed"),&AnimationPlayerEditor::_play_pressed);
- ObjectTypeDB::bind_method(_MD("_play_from_pressed"),&AnimationPlayerEditor::_play_from_pressed);
- ObjectTypeDB::bind_method(_MD("_play_bw_pressed"),&AnimationPlayerEditor::_play_bw_pressed);
- ObjectTypeDB::bind_method(_MD("_play_bw_from_pressed"),&AnimationPlayerEditor::_play_bw_from_pressed);
- ObjectTypeDB::bind_method(_MD("_stop_pressed"),&AnimationPlayerEditor::_stop_pressed);
- ObjectTypeDB::bind_method(_MD("_autoplay_pressed"),&AnimationPlayerEditor::_autoplay_pressed);
- ObjectTypeDB::bind_method(_MD("_pause_pressed"),&AnimationPlayerEditor::_pause_pressed);
- ObjectTypeDB::bind_method(_MD("_animation_selected"),&AnimationPlayerEditor::_animation_selected);
- ObjectTypeDB::bind_method(_MD("_animation_name_edited"),&AnimationPlayerEditor::_animation_name_edited);
- ObjectTypeDB::bind_method(_MD("_animation_new"),&AnimationPlayerEditor::_animation_new);
- ObjectTypeDB::bind_method(_MD("_animation_rename"),&AnimationPlayerEditor::_animation_rename);
- ObjectTypeDB::bind_method(_MD("_animation_load"),&AnimationPlayerEditor::_animation_load);
- ObjectTypeDB::bind_method(_MD("_animation_remove"),&AnimationPlayerEditor::_animation_remove);
- ObjectTypeDB::bind_method(_MD("_animation_blend"),&AnimationPlayerEditor::_animation_blend);
- ObjectTypeDB::bind_method(_MD("_animation_edit"),&AnimationPlayerEditor::_animation_edit);
- ObjectTypeDB::bind_method(_MD("_animation_resource_edit"),&AnimationPlayerEditor::_animation_resource_edit);
- ObjectTypeDB::bind_method(_MD("_dialog_action"),&AnimationPlayerEditor::_dialog_action);
- ObjectTypeDB::bind_method(_MD("_seek_value_changed"),&AnimationPlayerEditor::_seek_value_changed,DEFVAL(true));
- ObjectTypeDB::bind_method(_MD("_animation_player_changed"),&AnimationPlayerEditor::_animation_player_changed);
- ObjectTypeDB::bind_method(_MD("_blend_edited"),&AnimationPlayerEditor::_blend_edited);
-// ObjectTypeDB::bind_method(_MD("_seek_frame_changed"),&AnimationPlayerEditor::_seek_frame_changed);
- ObjectTypeDB::bind_method(_MD("_scale_changed"),&AnimationPlayerEditor::_scale_changed);
- //ObjectTypeDB::bind_method(_MD("_editor_store_all"),&AnimationPlayerEditor::_editor_store_all);
+ ClassDB::bind_method(_MD("_gui_input"),&AnimationPlayerEditor::_gui_input);
+ ClassDB::bind_method(_MD("_node_removed"),&AnimationPlayerEditor::_node_removed);
+ ClassDB::bind_method(_MD("_play_pressed"),&AnimationPlayerEditor::_play_pressed);
+ ClassDB::bind_method(_MD("_play_from_pressed"),&AnimationPlayerEditor::_play_from_pressed);
+ ClassDB::bind_method(_MD("_play_bw_pressed"),&AnimationPlayerEditor::_play_bw_pressed);
+ ClassDB::bind_method(_MD("_play_bw_from_pressed"),&AnimationPlayerEditor::_play_bw_from_pressed);
+ ClassDB::bind_method(_MD("_stop_pressed"),&AnimationPlayerEditor::_stop_pressed);
+ ClassDB::bind_method(_MD("_autoplay_pressed"),&AnimationPlayerEditor::_autoplay_pressed);
+ ClassDB::bind_method(_MD("_pause_pressed"),&AnimationPlayerEditor::_pause_pressed);
+ ClassDB::bind_method(_MD("_animation_selected"),&AnimationPlayerEditor::_animation_selected);
+ ClassDB::bind_method(_MD("_animation_name_edited"),&AnimationPlayerEditor::_animation_name_edited);
+ ClassDB::bind_method(_MD("_animation_new"),&AnimationPlayerEditor::_animation_new);
+ ClassDB::bind_method(_MD("_animation_rename"),&AnimationPlayerEditor::_animation_rename);
+ ClassDB::bind_method(_MD("_animation_load"),&AnimationPlayerEditor::_animation_load);
+ ClassDB::bind_method(_MD("_animation_remove"),&AnimationPlayerEditor::_animation_remove);
+ ClassDB::bind_method(_MD("_animation_blend"),&AnimationPlayerEditor::_animation_blend);
+ ClassDB::bind_method(_MD("_animation_edit"),&AnimationPlayerEditor::_animation_edit);
+ ClassDB::bind_method(_MD("_animation_resource_edit"),&AnimationPlayerEditor::_animation_resource_edit);
+ ClassDB::bind_method(_MD("_dialog_action"),&AnimationPlayerEditor::_dialog_action);
+ ClassDB::bind_method(_MD("_seek_value_changed"),&AnimationPlayerEditor::_seek_value_changed,DEFVAL(true));
+ ClassDB::bind_method(_MD("_animation_player_changed"),&AnimationPlayerEditor::_animation_player_changed);
+ ClassDB::bind_method(_MD("_blend_edited"),&AnimationPlayerEditor::_blend_edited);
+// ClassDB::bind_method(_MD("_seek_frame_changed"),&AnimationPlayerEditor::_seek_frame_changed);
+ ClassDB::bind_method(_MD("_scale_changed"),&AnimationPlayerEditor::_scale_changed);
+ //ClassDB::bind_method(_MD("_editor_store_all"),&AnimationPlayerEditor::_editor_store_all);
///jectTypeDB::bind_method(_MD("_editor_load_all"),&AnimationPlayerEditor::_editor_load_all);
- ObjectTypeDB::bind_method(_MD("_list_changed"),&AnimationPlayerEditor::_list_changed);
- ObjectTypeDB::bind_method(_MD("_animation_key_editor_seek"),&AnimationPlayerEditor::_animation_key_editor_seek);
- ObjectTypeDB::bind_method(_MD("_animation_key_editor_anim_len_changed"),&AnimationPlayerEditor::_animation_key_editor_anim_len_changed);
- ObjectTypeDB::bind_method(_MD("_animation_key_editor_anim_step_changed"),&AnimationPlayerEditor::_animation_key_editor_anim_step_changed);
- ObjectTypeDB::bind_method(_MD("_hide_anim_editors"),&AnimationPlayerEditor::_hide_anim_editors);
- ObjectTypeDB::bind_method(_MD("_animation_duplicate"),&AnimationPlayerEditor::_animation_duplicate);
- ObjectTypeDB::bind_method(_MD("_blend_editor_next_changed"),&AnimationPlayerEditor::_blend_editor_next_changed);
- ObjectTypeDB::bind_method(_MD("_unhandled_key_input"),&AnimationPlayerEditor::_unhandled_key_input);
- ObjectTypeDB::bind_method(_MD("_animation_tool_menu"),&AnimationPlayerEditor::_animation_tool_menu);
- ObjectTypeDB::bind_method(_MD("_animation_save_menu"), &AnimationPlayerEditor::_animation_save_menu);
+ ClassDB::bind_method(_MD("_list_changed"),&AnimationPlayerEditor::_list_changed);
+ ClassDB::bind_method(_MD("_animation_key_editor_seek"),&AnimationPlayerEditor::_animation_key_editor_seek);
+ ClassDB::bind_method(_MD("_animation_key_editor_anim_len_changed"),&AnimationPlayerEditor::_animation_key_editor_anim_len_changed);
+ ClassDB::bind_method(_MD("_animation_key_editor_anim_step_changed"),&AnimationPlayerEditor::_animation_key_editor_anim_step_changed);
+ ClassDB::bind_method(_MD("_hide_anim_editors"),&AnimationPlayerEditor::_hide_anim_editors);
+ ClassDB::bind_method(_MD("_animation_duplicate"),&AnimationPlayerEditor::_animation_duplicate);
+ ClassDB::bind_method(_MD("_blend_editor_next_changed"),&AnimationPlayerEditor::_blend_editor_next_changed);
+ ClassDB::bind_method(_MD("_unhandled_key_input"),&AnimationPlayerEditor::_unhandled_key_input);
+ ClassDB::bind_method(_MD("_animation_tool_menu"),&AnimationPlayerEditor::_animation_tool_menu);
+ ClassDB::bind_method(_MD("_animation_save_menu"), &AnimationPlayerEditor::_animation_save_menu);
@@ -1477,7 +1477,7 @@ AnimationPlayerEditor::AnimationPlayerEditor(EditorNode *p_editor) {
blend_editor.dialog->set_hide_on_ok(true);
VBoxContainer *blend_vb = memnew( VBoxContainer);
blend_editor.dialog->add_child(blend_vb);
- blend_editor.dialog->set_child_rect(blend_vb);
+ //blend_editor.dialog->set_child_rect(blend_vb);
blend_editor.tree = memnew( Tree );
blend_editor.tree->set_columns(2);
blend_vb->add_margin_child(TTR("Blend Times:"),blend_editor.tree,true);
@@ -1542,7 +1542,7 @@ void AnimationPlayerEditorPlugin::edit(Object *p_object) {
bool AnimationPlayerEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("AnimationPlayer");
+ return p_object->is_class("AnimationPlayer");
}
void AnimationPlayerEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/animation_player_editor_plugin.h b/tools/editor/plugins/animation_player_editor_plugin.h
index b0c930b66e..9074eb127b 100644
--- a/tools/editor/plugins/animation_player_editor_plugin.h
+++ b/tools/editor/plugins/animation_player_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -44,7 +44,7 @@
class AnimationKeyEditor;
class AnimationPlayerEditor : public VBoxContainer {
- OBJ_TYPE(AnimationPlayerEditor, VBoxContainer );
+ GDCLASS(AnimationPlayerEditor, VBoxContainer );
EditorNode *editor;
AnimationPlayer *player;
@@ -171,7 +171,7 @@ class AnimationPlayerEditor : public VBoxContainer {
protected:
void _notification(int p_what);
- void _input_event(InputEvent p_event);
+ void _gui_input(InputEvent p_event);
void _node_removed(Node *p_node);
static void _bind_methods();
public:
@@ -193,7 +193,7 @@ public:
class AnimationPlayerEditorPlugin : public EditorPlugin {
- OBJ_TYPE( AnimationPlayerEditorPlugin, EditorPlugin );
+ GDCLASS( AnimationPlayerEditorPlugin, EditorPlugin );
AnimationPlayerEditor *anim_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/animation_tree_editor_plugin.cpp b/tools/editor/plugins/animation_tree_editor_plugin.cpp
index 24914e4bc5..3b28e8610b 100644
--- a/tools/editor/plugins/animation_tree_editor_plugin.cpp
+++ b/tools/editor/plugins/animation_tree_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -183,20 +183,20 @@ void AnimationTreeEditor::_edit_dialog_changed() {
case AnimationTreePlayer::NODE_MIX:
- anim_tree->mix_node_set_amount(edited_node,edit_scroll[0]->get_val());
+ anim_tree->mix_node_set_amount(edited_node,edit_scroll[0]->get_value());
break;
case AnimationTreePlayer::NODE_BLEND2:
- anim_tree->blend2_node_set_amount(edited_node,edit_scroll[0]->get_val());
+ anim_tree->blend2_node_set_amount(edited_node,edit_scroll[0]->get_value());
break;
case AnimationTreePlayer::NODE_BLEND3:
- anim_tree->blend3_node_set_amount(edited_node,edit_scroll[0]->get_val());
+ anim_tree->blend3_node_set_amount(edited_node,edit_scroll[0]->get_value());
break;
case AnimationTreePlayer::NODE_BLEND4:
- anim_tree->blend4_node_set_amount(edited_node,Point2(edit_scroll[0]->get_val(),edit_scroll[1]->get_val()));
+ anim_tree->blend4_node_set_amount(edited_node,Point2(edit_scroll[0]->get_value(),edit_scroll[1]->get_value()));
break;
@@ -265,7 +265,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
filter_button->hide();
edit_check->hide();;
- Point2 pos = anim_tree->node_get_pos(edited_node)-Point2(h_scroll->get_val(),v_scroll->get_val());
+ Point2 pos = anim_tree->node_get_pos(edited_node)-Point2(h_scroll->get_value(),v_scroll->get_value());
Ref<StyleBox> style = get_stylebox("panel","PopupMenu");
Size2 size = get_node_size(edited_node);
Point2 popup_pos( pos.x+style->get_margin(MARGIN_LEFT), pos.y+size.y-style->get_margin(MARGIN_BOTTOM));
@@ -380,7 +380,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
edit_label[0]->show();
edit_scroll[0]->set_min(0);
edit_scroll[0]->set_max(1);
- edit_scroll[0]->set_val(anim_tree->mix_node_get_amount(edited_node));
+ edit_scroll[0]->set_value(anim_tree->mix_node_get_amount(edited_node));
edit_scroll[0]->set_begin(Point2(15,25));
edit_scroll[0]->show();
edit_dialog->set_size(Size2(150,50));
@@ -392,7 +392,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
edit_label[0]->show();
edit_scroll[0]->set_min(0);
edit_scroll[0]->set_max(1);
- edit_scroll[0]->set_val(anim_tree->blend2_node_get_amount(edited_node));
+ edit_scroll[0]->set_value(anim_tree->blend2_node_get_amount(edited_node));
edit_scroll[0]->set_begin(Point2(15,25));
edit_scroll[0]->show();
filter_button->set_begin(Point2(10,47));
@@ -407,7 +407,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
edit_label[0]->show();
edit_scroll[0]->set_min(-1);
edit_scroll[0]->set_max(1);
- edit_scroll[0]->set_val(anim_tree->blend3_node_get_amount(edited_node));
+ edit_scroll[0]->set_value(anim_tree->blend3_node_get_amount(edited_node));
edit_scroll[0]->set_begin(Point2(15,25));
edit_scroll[0]->show();
edit_dialog->set_size(Size2(150,50));
@@ -420,7 +420,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
edit_label[0]->show();
edit_scroll[0]->set_min(0);
edit_scroll[0]->set_max(1);
- edit_scroll[0]->set_val(anim_tree->blend4_node_get_amount(edited_node).x);
+ edit_scroll[0]->set_value(anim_tree->blend4_node_get_amount(edited_node).x);
edit_scroll[0]->set_begin(Point2(15,25));
edit_scroll[0]->show();
edit_label[1]->set_text(TTR("Blend 1:"));
@@ -428,7 +428,7 @@ void AnimationTreeEditor::_popup_edit_dialog() {
edit_label[1]->show();
edit_scroll[1]->set_min(0);
edit_scroll[1]->set_max(1);
- edit_scroll[1]->set_val(anim_tree->blend4_node_get_amount(edited_node).y);
+ edit_scroll[1]->set_value(anim_tree->blend4_node_get_amount(edited_node).y);
edit_scroll[1]->set_begin(Point2(15,75));
edit_scroll[1]->show();
edit_dialog->set_size(Size2(150,100));
@@ -500,7 +500,7 @@ void AnimationTreeEditor::_draw_node(const StringName& p_node) {
}
- pos-=Point2(h_scroll->get_val(),v_scroll->get_val());
+ pos-=Point2(h_scroll->get_value(),v_scroll->get_value());
style->draw(ci,Rect2(pos,size));
@@ -644,7 +644,7 @@ AnimationTreeEditor::ClickType AnimationTreeEditor::_locate_click(const Point2&
Point2 pos = anim_tree->node_get_pos(node);
Size2 size = get_node_size(node);
- pos-=Point2(h_scroll->get_val(),v_scroll->get_val());
+ pos-=Point2(h_scroll->get_value(),v_scroll->get_value());
if (!Rect2(pos,size).has_point(p_click))
continue;
@@ -709,7 +709,7 @@ Point2 AnimationTreeEditor::_get_slot_pos(const StringName& p_node,bool p_input,
}
- pos-=Point2(h_scroll->get_val(),v_scroll->get_val());
+ pos-=Point2(h_scroll->get_value(),v_scroll->get_value());
float w = size.width-style->get_minimum_size().width;
@@ -759,7 +759,7 @@ void AnimationTreeEditor::_node_edit_property(const StringName& p_node) {
}
#endif
-void AnimationTreeEditor::_input_event(InputEvent p_event) {
+void AnimationTreeEditor::_gui_input(InputEvent p_event) {
switch(p_event.type) {
@@ -892,8 +892,8 @@ void AnimationTreeEditor::_input_event(InputEvent p_event) {
}
if ((p_event.mouse_motion.button_mask&4 || Input::get_singleton()->is_key_pressed(KEY_SPACE))) {
- h_scroll->set_val( h_scroll->get_val() - p_event.mouse_motion.relative_x );
- v_scroll->set_val( v_scroll->get_val() - p_event.mouse_motion.relative_y );
+ h_scroll->set_value( h_scroll->get_value() - p_event.mouse_motion.relative_x );
+ v_scroll->set_value( v_scroll->get_value() - p_event.mouse_motion.relative_y );
update();
}
@@ -947,7 +947,6 @@ void AnimationTreeEditor::_notification(int p_what) {
_update_scrollbars();
//VisualServer::get_singleton()->canvas_item_add_rect(get_canvas_item(),Rect2(Point2(),get_size()),Color(0,0,0,1));
get_stylebox("bg","Tree")->draw(get_canvas_item(),Rect2(Point2(),get_size()));
- VisualServer::get_singleton()->canvas_item_set_clip(get_canvas_item(),true);
for(List<StringName>::Element *E=order.front();E;E=E->next()) {
@@ -1026,7 +1025,7 @@ void AnimationTreeEditor::_update_scrollbars() {
v_scroll->show();
v_scroll->set_max(min.height);
v_scroll->set_page(size.height - hmin.height);
- offset.y=v_scroll->get_val();
+ offset.y=v_scroll->get_value();
}
if (min.width < size.width - vmin.width) {
@@ -1038,14 +1037,14 @@ void AnimationTreeEditor::_update_scrollbars() {
h_scroll->show();
h_scroll->set_max(min.width);
h_scroll->set_page(size.width - vmin.width);
- offset.x=h_scroll->get_val();
+ offset.x=h_scroll->get_value();
}
}
void AnimationTreeEditor::_scroll_moved(float) {
- offset.x=h_scroll->get_val();
- offset.y=v_scroll->get_val();
+ offset.x=h_scroll->get_value();
+ offset.y=v_scroll->get_value();
update();
}
@@ -1323,23 +1322,23 @@ void AnimationTreeEditor::_edit_filters() {
void AnimationTreeEditor::_bind_methods() {
- ObjectTypeDB::bind_method( "_add_menu_item", &AnimationTreeEditor::_add_menu_item );
- ObjectTypeDB::bind_method( "_node_menu_item", &AnimationTreeEditor::_node_menu_item );
- ObjectTypeDB::bind_method( "_input_event", &AnimationTreeEditor::_input_event );
-// ObjectTypeDB::bind_method( "_node_param_changed", &AnimationTreeEditor::_node_param_changed );
- ObjectTypeDB::bind_method( "_scroll_moved", &AnimationTreeEditor::_scroll_moved );
- ObjectTypeDB::bind_method( "_edit_dialog_changeds", &AnimationTreeEditor::_edit_dialog_changeds );
- ObjectTypeDB::bind_method( "_edit_dialog_changede", &AnimationTreeEditor::_edit_dialog_changede );
- ObjectTypeDB::bind_method( "_edit_dialog_changedf", &AnimationTreeEditor::_edit_dialog_changedf );
- ObjectTypeDB::bind_method( "_edit_dialog_changed", &AnimationTreeEditor::_edit_dialog_changed );
- ObjectTypeDB::bind_method( "_edit_dialog_animation_changed", &AnimationTreeEditor::_edit_dialog_animation_changed );
- ObjectTypeDB::bind_method( "_edit_dialog_edit_animation", &AnimationTreeEditor::_edit_dialog_edit_animation );
- ObjectTypeDB::bind_method( "_play_toggled", &AnimationTreeEditor::_play_toggled );
- ObjectTypeDB::bind_method( "_edit_oneshot_start", &AnimationTreeEditor::_edit_oneshot_start );
- ObjectTypeDB::bind_method( "_file_dialog_selected", &AnimationTreeEditor::_file_dialog_selected);
- ObjectTypeDB::bind_method( "_master_anim_menu_item", &AnimationTreeEditor::_master_anim_menu_item);
- ObjectTypeDB::bind_method( "_edit_filters", &AnimationTreeEditor::_edit_filters);
- ObjectTypeDB::bind_method( "_filter_edited", &AnimationTreeEditor::_filter_edited);
+ ClassDB::bind_method( "_add_menu_item", &AnimationTreeEditor::_add_menu_item );
+ ClassDB::bind_method( "_node_menu_item", &AnimationTreeEditor::_node_menu_item );
+ ClassDB::bind_method( "_gui_input", &AnimationTreeEditor::_gui_input );
+// ClassDB::bind_method( "_node_param_changed", &AnimationTreeEditor::_node_param_changed );
+ ClassDB::bind_method( "_scroll_moved", &AnimationTreeEditor::_scroll_moved );
+ ClassDB::bind_method( "_edit_dialog_changeds", &AnimationTreeEditor::_edit_dialog_changeds );
+ ClassDB::bind_method( "_edit_dialog_changede", &AnimationTreeEditor::_edit_dialog_changede );
+ ClassDB::bind_method( "_edit_dialog_changedf", &AnimationTreeEditor::_edit_dialog_changedf );
+ ClassDB::bind_method( "_edit_dialog_changed", &AnimationTreeEditor::_edit_dialog_changed );
+ ClassDB::bind_method( "_edit_dialog_animation_changed", &AnimationTreeEditor::_edit_dialog_animation_changed );
+ ClassDB::bind_method( "_edit_dialog_edit_animation", &AnimationTreeEditor::_edit_dialog_edit_animation );
+ ClassDB::bind_method( "_play_toggled", &AnimationTreeEditor::_play_toggled );
+ ClassDB::bind_method( "_edit_oneshot_start", &AnimationTreeEditor::_edit_oneshot_start );
+ ClassDB::bind_method( "_file_dialog_selected", &AnimationTreeEditor::_file_dialog_selected);
+ ClassDB::bind_method( "_master_anim_menu_item", &AnimationTreeEditor::_master_anim_menu_item);
+ ClassDB::bind_method( "_edit_filters", &AnimationTreeEditor::_edit_filters);
+ ClassDB::bind_method( "_filter_edited", &AnimationTreeEditor::_filter_edited);
}
@@ -1371,7 +1370,7 @@ AnimationTreeEditor::AnimationTreeEditor() {
p->add_separator();
p->add_item(TTR("Clear"),MENU_GRAPH_CLEAR);
- p->connect("item_pressed", this,"_add_menu_item");
+ p->connect("id_pressed", this,"_add_menu_item");
play_button = memnew(Button);
play_button->set_pos(Point2(25,0));
@@ -1407,10 +1406,10 @@ AnimationTreeEditor::AnimationTreeEditor() {
master_anim_popup = memnew( PopupMenu );
add_child(master_anim_popup);
- master_anim_popup->connect("item_pressed",this,"_master_anim_menu_item");
+ master_anim_popup->connect("id_pressed",this,"_master_anim_menu_item");
- node_popup->connect("item_pressed", this,"_node_menu_item");
+ node_popup->connect("id_pressed", this,"_node_menu_item");
updating_edit=false;
@@ -1464,7 +1463,7 @@ AnimationTreeEditor::AnimationTreeEditor() {
file_dialog = memnew( EditorFileDialog );
file_dialog->set_enable_multiple_selection(true);
- file_dialog->set_current_dir(Globals::get_singleton()->get_resource_path());
+ file_dialog->set_current_dir(GlobalConfig::get_singleton()->get_resource_path());
add_child(file_dialog);
file_dialog->connect("file_selected", this, "_file_dialog_selected");
@@ -1474,7 +1473,7 @@ AnimationTreeEditor::AnimationTreeEditor() {
filter = memnew( Tree );
filter_dialog->add_child(filter);
- filter_dialog->set_child_rect(filter);
+ //filter_dialog->set_child_rect(filter);
filter->connect("item_edited",this,"_filter_edited");
filter_button = memnew( Button );
@@ -1485,6 +1484,7 @@ AnimationTreeEditor::AnimationTreeEditor() {
filter_button->set_text(TTR("Filters.."));
filter_button->connect("pressed", this,"_edit_filters");
+ set_clip_contents(true);
}
@@ -1496,7 +1496,7 @@ void AnimationTreeEditorPlugin::edit(Object *p_object) {
bool AnimationTreeEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("AnimationTreePlayer");
+ return p_object->is_class("AnimationTreePlayer");
}
void AnimationTreeEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/animation_tree_editor_plugin.h b/tools/editor/plugins/animation_tree_editor_plugin.h
index 4884a22d90..253ad1878d 100644
--- a/tools/editor/plugins/animation_tree_editor_plugin.h
+++ b/tools/editor/plugins/animation_tree_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -42,7 +42,7 @@
class AnimationTreeEditor : public Control {
- OBJ_TYPE(AnimationTreeEditor, Control );
+ GDCLASS(AnimationTreeEditor, Control );
static const char* _node_type_names[];
@@ -160,7 +160,7 @@ class AnimationTreeEditor : public Control {
protected:
void _notification(int p_what);
- void _input_event(InputEvent p_event);
+ void _gui_input(InputEvent p_event);
static void _bind_methods();
public:
@@ -172,7 +172,7 @@ public:
class AnimationTreeEditorPlugin : public EditorPlugin {
- OBJ_TYPE( AnimationTreeEditorPlugin, EditorPlugin );
+ GDCLASS( AnimationTreeEditorPlugin, EditorPlugin );
AnimationTreeEditor *anim_tree_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/baked_light_baker.cpp b/tools/editor/plugins/baked_light_baker.cpp
index f43bec1cd3..2d91524ef9 100644
--- a/tools/editor/plugins/baked_light_baker.cpp
+++ b/tools/editor/plugins/baked_light_baker.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -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) {
@@ -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();
@@ -143,18 +143,18 @@ void BakedLightBaker::_add_mesh(const Ref<Mesh>& p_mesh,const Ref<Material>& p_m
MeshMaterial mm;
- Ref<FixedMaterial> fm = mat;
+ Ref<FixedSpatialMaterial> fm = mat;
if (fm.is_valid()) {
//fixed route
- mm.diffuse.color=fm->get_parameter(FixedMaterial::PARAM_DIFFUSE);
+ mm.diffuse.color=fm->get_parameter(FixedSpatialMaterial::PARAM_DIFFUSE);
if (linear_color)
mm.diffuse.color=mm.diffuse.color.to_linear();
- mm.diffuse.tex=_get_mat_tex(fm->get_texture(FixedMaterial::PARAM_DIFFUSE));
- mm.specular.color=fm->get_parameter(FixedMaterial::PARAM_SPECULAR);
+ mm.diffuse.tex=_get_mat_tex(fm->get_texture(FixedSpatialMaterial::PARAM_DIFFUSE));
+ mm.specular.color=fm->get_parameter(FixedSpatialMaterial::PARAM_SPECULAR);
if (linear_color)
mm.specular.color=mm.specular.color.to_linear();
- mm.specular.tex=_get_mat_tex(fm->get_texture(FixedMaterial::PARAM_SPECULAR));
+ mm.specular.tex=_get_mat_tex(fm->get_texture(FixedSpatialMaterial::PARAM_SPECULAR));
} else {
mm.diffuse.color=Color(1,1,1,1);
@@ -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,14 +2612,14 @@ 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());
}
- 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..6fcf78dd0a 100644
--- a/tools/editor/plugins/baked_light_baker.h
+++ b/tools/editor/plugins/baked_light_baker.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -34,6 +34,8 @@
#include "scene/3d/mesh_instance.h"
#include "os/thread.h"
+#if 0
+
class BakedLightBaker {
public:
@@ -362,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; }
@@ -375,3 +377,4 @@ public:
};
#endif // BAKED_LIGHT_BAKER_H
+#endif
diff --git a/tools/editor/plugins/baked_light_baker_cmpxchg.cpp b/tools/editor/plugins/baked_light_baker_cmpxchg.cpp
index c581995916..5e9228b7de 100644
--- a/tools/editor/plugins/baked_light_baker_cmpxchg.cpp
+++ b/tools/editor/plugins/baked_light_baker_cmpxchg.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/plugins/baked_light_editor_plugin.cpp b/tools/editor/plugins/baked_light_editor_plugin.cpp
index a58a0c25e2..8f564a3247 100644
--- a/tools/editor/plugins/baked_light_editor_plugin.cpp
+++ b/tools/editor/plugins/baked_light_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -33,7 +33,7 @@
#include "io/resource_saver.h"
-
+#if 0
void BakedLightEditor::_end_baking() {
@@ -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;
@@ -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);
@@ -283,10 +283,10 @@ void BakedLightEditor::_bake_lightmaps() {
void BakedLightEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_menu_option",&BakedLightEditor::_menu_option);
- ObjectTypeDB::bind_method("_bake_pressed",&BakedLightEditor::_bake_pressed);
- ObjectTypeDB::bind_method("_clear_pressed",&BakedLightEditor::_clear_pressed);
- ObjectTypeDB::bind_method("_bake_lightmaps",&BakedLightEditor::_bake_lightmaps);
+ ClassDB::bind_method("_menu_option",&BakedLightEditor::_menu_option);
+ ClassDB::bind_method("_bake_pressed",&BakedLightEditor::_bake_pressed);
+ ClassDB::bind_method("_clear_pressed",&BakedLightEditor::_clear_pressed);
+ ClassDB::bind_method("_bake_lightmaps",&BakedLightEditor::_bake_lightmaps);
}
BakedLightEditor::BakedLightEditor() {
@@ -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..e311fe9f17 100644
--- a/tools/editor/plugins/baked_light_editor_plugin.h
+++ b/tools/editor/plugins/baked_light_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -40,19 +40,19 @@
@author Juan Linietsky <reduzio@gmail.com>
*/
-
+#if 0
class MeshInstance;
class BakedLightEditor : public Control {
- OBJ_TYPE(BakedLightEditor, Control );
+ GDCLASS(BakedLightEditor, 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;
@@ -97,7 +97,7 @@ public:
class BakedLightEditorPlugin : public EditorPlugin {
- OBJ_TYPE( BakedLightEditorPlugin, EditorPlugin );
+ GDCLASS( BakedLightEditorPlugin, EditorPlugin );
BakedLightEditor *baked_light_editor;
EditorNode *editor;
@@ -116,5 +116,5 @@ public:
};
#endif // MULTIMESH_EDITOR_PLUGIN_H
-
+#endif
diff --git a/tools/editor/plugins/camera_editor_plugin.cpp b/tools/editor/plugins/camera_editor_plugin.cpp
index 9c25de695c..67f776ba0b 100644
--- a/tools/editor/plugins/camera_editor_plugin.cpp
+++ b/tools/editor/plugins/camera_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -61,7 +61,7 @@ void CameraEditor::_pressed() {
void CameraEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_pressed"),&CameraEditor::_pressed);
+ ClassDB::bind_method(_MD("_pressed"),&CameraEditor::_pressed);
}
@@ -108,7 +108,7 @@ void CameraEditorPlugin::edit(Object *p_object) {
bool CameraEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("Camera");
+ return p_object->is_class("Camera");
}
void CameraEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/camera_editor_plugin.h b/tools/editor/plugins/camera_editor_plugin.h
index ea016ecb4d..56702f174b 100644
--- a/tools/editor/plugins/camera_editor_plugin.h
+++ b/tools/editor/plugins/camera_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -39,7 +39,7 @@
class CameraEditor : public Control {
- OBJ_TYPE(CameraEditor, Control );
+ GDCLASS(CameraEditor, Control );
Panel *panel;
Button * preview;
@@ -58,7 +58,7 @@ public:
class CameraEditorPlugin : public EditorPlugin {
- OBJ_TYPE( CameraEditorPlugin, EditorPlugin );
+ GDCLASS( CameraEditorPlugin, EditorPlugin );
// CameraEditor *camera_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp
index 709091cf4c..531be2d195 100644
--- a/tools/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -55,7 +55,7 @@
class SnapDialog : public ConfirmationDialog {
- OBJ_TYPE(SnapDialog,ConfirmationDialog);
+ GDCLASS(SnapDialog,ConfirmationDialog);
friend class CanvasItemEditor;
@@ -79,7 +79,7 @@ public:
container = memnew( VBoxContainer );
add_child(container);
- set_child_rect(container);
+ // set_child_rect(container);
child_container = memnew( GridContainer );
child_container->set_columns(3);
@@ -149,21 +149,21 @@ public:
}
void set_fields(const Point2 p_grid_offset, const Size2 p_grid_step, const float p_rotation_offset, const float p_rotation_step) {
- grid_offset_x->set_val(p_grid_offset.x);
- grid_offset_y->set_val(p_grid_offset.y);
- grid_step_x->set_val(p_grid_step.x);
- grid_step_y->set_val(p_grid_step.y);
- rotation_offset->set_val(p_rotation_offset * (180 / Math_PI));
- rotation_step->set_val(p_rotation_step * (180 / Math_PI));
+ grid_offset_x->set_value(p_grid_offset.x);
+ grid_offset_y->set_value(p_grid_offset.y);
+ grid_step_x->set_value(p_grid_step.x);
+ grid_step_y->set_value(p_grid_step.y);
+ rotation_offset->set_value(p_rotation_offset * (180 / Math_PI));
+ rotation_step->set_value(p_rotation_step * (180 / Math_PI));
}
void get_fields(Point2 &p_grid_offset, Size2 &p_grid_step, float &p_rotation_offset, float &p_rotation_step) {
- p_grid_offset.x = grid_offset_x->get_val();
- p_grid_offset.y = grid_offset_y->get_val();
- p_grid_step.x = grid_step_x->get_val();
- p_grid_step.y = grid_step_y->get_val();
- p_rotation_offset = rotation_offset->get_val() / (180 / Math_PI);
- p_rotation_step = rotation_step->get_val() / (180 / Math_PI);
+ p_grid_offset.x = grid_offset_x->get_value();
+ p_grid_offset.y = grid_offset_y->get_value();
+ p_grid_step.x = grid_step_x->get_value();
+ p_grid_step.y = grid_step_y->get_value();
+ p_rotation_offset = rotation_offset->get_value() / (180 / Math_PI);
+ p_rotation_step = rotation_step->get_value() / (180 / Math_PI);
}
};
@@ -179,7 +179,7 @@ void CanvasItemEditor::_edit_set_pivot(const Vector2& mouse_pos) {
if (n2d && n2d->edit_has_pivot()) {
Vector2 offset = n2d->edit_get_pivot();
- Vector2 gpos = n2d->get_global_pos();
+ Vector2 gpos = n2d->get_global_position();
Vector2 local_mouse_pos = n2d->get_canvas_transform().affine_inverse().xform(mouse_pos);
@@ -194,8 +194,8 @@ void CanvasItemEditor::_edit_set_pivot(const Vector2& mouse_pos) {
if (!n2dc)
continue;
- undo_redo->add_do_method(n2dc,"set_global_pos",n2dc->get_global_pos());
- undo_redo->add_undo_method(n2dc,"set_global_pos",n2dc->get_global_pos());
+ undo_redo->add_do_method(n2dc,"set_global_pos",n2dc->get_global_position());
+ undo_redo->add_undo_method(n2dc,"set_global_pos",n2dc->get_global_position());
}
@@ -286,7 +286,7 @@ Dictionary CanvasItemEditor::get_state() const {
Dictionary state;
state["zoom"]=zoom;
- state["ofs"]=Point2(h_scroll->get_val(),v_scroll->get_val());
+ state["ofs"]=Point2(h_scroll->get_value(),v_scroll->get_value());
// state["ofs"]=-transform.get_origin();
state["snap_offset"]=snap_offset;
state["snap_step"]=snap_step;
@@ -310,8 +310,8 @@ void CanvasItemEditor::set_state(const Dictionary& p_state){
if (state.has("ofs")) {
_update_scrollbars(); // i wonder how safe is calling this here..
Point2 ofs=p_state["ofs"];
- h_scroll->set_val(ofs.x);
- v_scroll->set_val(ofs.y);
+ h_scroll->set_value(ofs.x);
+ v_scroll->set_value(ofs.y);
}
if (state.has("snap_step")) {
@@ -709,10 +709,10 @@ void CanvasItemEditor::_key_move(const Vector2& p_dir, bool p_snap, KeyMoveMODE
if (p_move_mode == MOVE_LOCAL_WITH_ROT) {
Matrix32 m;
- m.rotate( node_2d->get_rot() );
+ m.rotate( node_2d->get_rotation() );
drag = m.xform(drag);
}
- node_2d->set_pos(node_2d->get_pos() + drag);
+ node_2d->set_position(node_2d->get_position() + drag);
} else if (Control *control = canvas_item->cast_to<Control>()) {
@@ -961,7 +961,7 @@ void CanvasItemEditor::_dialog_value_changed(double) {
case ZOOM_SET: {
- zoom=dialog_val->get_val()/100.0;
+ zoom=dialog_val->get_value()/100.0;
_update_scroll(0);
viewport->update();
@@ -1040,7 +1040,7 @@ void CanvasItemEditor::_list_select(const InputEventMouseButton& b) {
if (item->has_meta("_editor_icon"))
icon=item->get_meta("_editor_icon");
else
- icon=get_icon( has_icon(item->get_type(),"EditorIcons")?item->get_type():String("Object"),"EditorIcons");
+ icon=get_icon( has_icon(item->get_class(),"EditorIcons")?item->get_class():String("Object"),"EditorIcons");
String node_path="/"+root_name+"/"+root_path.rel_path_to(item->get_path());
@@ -1048,7 +1048,7 @@ void CanvasItemEditor::_list_select(const InputEventMouseButton& b) {
selection_menu->set_item_icon(i, icon );
selection_menu->set_item_metadata(i, node_path);
selection_menu->set_item_tooltip(i,String(item->get_name())+
- "\nType: "+item->get_type()+"\nPath: "+node_path);
+ "\nType: "+item->get_class()+"\nPath: "+node_path);
}
additive_selection=b.mod.shift;
@@ -1064,7 +1064,7 @@ void CanvasItemEditor::_list_select(const InputEventMouseButton& b) {
}
-void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
+void CanvasItemEditor::_viewport_gui_input(const InputEvent& p_event) {
{
@@ -1072,7 +1072,7 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
EditorPluginList *over_plugin_list = en->get_editor_plugins_over();
if (!over_plugin_list->empty()) {
- bool discard = over_plugin_list->forward_input_event(transform,p_event);
+ bool discard = over_plugin_list->forward_gui_input(transform,p_event);
if (discard) {
accept_event();
return;
@@ -1096,8 +1096,8 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
{
Point2 ofs(b.x,b.y);
ofs = ofs/prev_zoom - ofs/zoom;
- h_scroll->set_val( h_scroll->get_val() + ofs.x );
- v_scroll->set_val( v_scroll->get_val() + ofs.y );
+ h_scroll->set_value( h_scroll->get_value() + ofs.x );
+ v_scroll->set_value( v_scroll->get_value() + ofs.y );
}
_update_scroll(0);
viewport->update();
@@ -1114,8 +1114,8 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
{
Point2 ofs(b.x,b.y);
ofs = ofs/prev_zoom - ofs/zoom;
- h_scroll->set_val( h_scroll->get_val() + ofs.x );
- v_scroll->set_val( v_scroll->get_val() + ofs.y );
+ h_scroll->set_value( h_scroll->get_value() + ofs.x );
+ v_scroll->set_value( v_scroll->get_value() + ofs.y );
}
_update_scroll(0);
@@ -1317,7 +1317,7 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
{
bone_ik_list.clear();
float closest_dist=1e20;
- int bone_width = EditorSettings::get_singleton()->get("2d_editor/bone_width");
+ int bone_width = EditorSettings::get_singleton()->get("editors/2dbone_width");
for(Map<ObjectID,BoneList>::Element *E=bone_list.front();E;E=E->next()) {
if (E->get().from == E->get().to)
@@ -1355,7 +1355,7 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
if (!pi)
break;
- float len=pi->get_global_transform().get_origin().distance_to(b->get_global_pos());
+ float len=pi->get_global_transform().get_origin().distance_to(b->get_global_position());
b=pi->cast_to<Node2D>();
if (!b)
break;
@@ -1519,7 +1519,7 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
Node* n = c;
- while ((n && n != scene && n->get_owner() != scene) || (n && !n->is_type("CanvasItem"))) {
+ while ((n && n != scene && n->get_owner() != scene) || (n && !n->is_class("CanvasItem"))) {
n = n->get_parent();
};
c = n->cast_to<CanvasItem>();
@@ -1554,8 +1554,8 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
if ( (m.button_mask&BUTTON_MASK_LEFT && tool == TOOL_PAN) || m.button_mask&BUTTON_MASK_MIDDLE || (m.button_mask&BUTTON_MASK_LEFT && Input::get_singleton()->is_key_pressed(KEY_SPACE))) {
- h_scroll->set_val( h_scroll->get_val() - m.relative_x/zoom);
- v_scroll->set_val( v_scroll->get_val() - m.relative_y/zoom);
+ h_scroll->set_value( h_scroll->get_value() - m.relative_x/zoom);
+ v_scroll->set_value( v_scroll->get_value() - m.relative_y/zoom);
}
return;
@@ -1604,7 +1604,7 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
Matrix32 rot;
rot.elements[1] = (dfrom - center).normalized();
rot.elements[0] = rot.elements[1].tangent();
- node->set_rot(snap_angle(rot.xform_inv(dto-center).angle() + node->get_rot(), node->get_rot()));
+ node->set_rotation(snap_angle(rot.xform_inv(dto-center).angle() + node->get_rotation(), node->get_rotation()));
display_rotate_to = dto;
display_rotate_from = center;
viewport->update();
@@ -1854,11 +1854,11 @@ void CanvasItemEditor::_viewport_input_event(const InputEvent& p_event) {
if (!E->prev()) {
//last goes to what it was
- final_xform.set_origin(n->get_global_pos());
+ final_xform.set_origin(n->get_global_position());
n->set_global_transform(final_xform);
} else {
- Vector2 rel = (E->prev()->get().node->get_global_pos() - n->get_global_pos()).normalized();
+ Vector2 rel = (E->prev()->get().node->get_global_position() - n->get_global_position()).normalized();
Vector2 rel2 = (E->prev()->get().pos - E->get().pos).normalized();
float rot = rel.angle_to(rel2);
if (n->get_global_transform().basis_determinant()<0) {
@@ -1962,7 +1962,6 @@ void CanvasItemEditor::_viewport_draw() {
Ref<Texture> lock = get_icon("Lock","EditorIcons");
Ref<Texture> group = get_icon("Group","EditorIcons");
- VisualServer::get_singleton()->canvas_item_set_clip(ci,true);
bool single = get_single_item()!=NULL;
@@ -2074,7 +2073,7 @@ void CanvasItemEditor::_viewport_draw() {
VisualServer::get_singleton()->canvas_item_add_line(ci,transform.xform(display_rotate_from), transform.xform(display_rotate_to),rotate_color);
}
- Size2 screen_size = Size2( Globals::get_singleton()->get("display/width"), Globals::get_singleton()->get("display/height") );
+ Size2 screen_size = Size2( GlobalConfig::get_singleton()->get("display/width"), GlobalConfig::get_singleton()->get("display/height") );
Vector2 screen_endpoints[4]= {
transform.xform(Vector2(0,0)),
@@ -2117,11 +2116,11 @@ void CanvasItemEditor::_viewport_draw() {
}
if (skeleton_show_bones) {
- int bone_width = EditorSettings::get_singleton()->get("2d_editor/bone_width");
- Color bone_color1 = EditorSettings::get_singleton()->get("2d_editor/bone_color1");
- Color bone_color2 = EditorSettings::get_singleton()->get("2d_editor/bone_color2");
- Color bone_ik_color = EditorSettings::get_singleton()->get("2d_editor/bone_ik_color");
- Color bone_selected_color = EditorSettings::get_singleton()->get("2d_editor/bone_selected_color");
+ int bone_width = EditorSettings::get_singleton()->get("editors/2dbone_width");
+ Color bone_color1 = EditorSettings::get_singleton()->get("editors/2dbone_color1");
+ Color bone_color2 = EditorSettings::get_singleton()->get("editors/2dbone_color2");
+ Color bone_ik_color = EditorSettings::get_singleton()->get("editors/2dbone_ik_color");
+ Color bone_selected_color = EditorSettings::get_singleton()->get("editors/2dbone_selected_color");
for(Map<ObjectID,BoneList>::Element*E=bone_list.front();E;E=E->next()) {
@@ -2147,8 +2146,8 @@ void CanvasItemEditor::_viewport_draw() {
if (!pn2d)
continue;
- Vector2 from = transform.xform(pn2d->get_global_pos());
- Vector2 to = transform.xform(n2d->get_global_pos());
+ Vector2 from = transform.xform(pn2d->get_global_position());
+ Vector2 to = transform.xform(n2d->get_global_position());
E->get().from=from;
E->get().to=to;
@@ -2409,7 +2408,7 @@ void CanvasItemEditor::_update_scrollbars() {
h_scroll->set_end( Point2(size.width-vmin.width, size.height) );
- Size2 screen_rect = Size2( Globals::get_singleton()->get("display/width"), Globals::get_singleton()->get("display/height") );
+ Size2 screen_rect = Size2( GlobalConfig::get_singleton()->get("display/width"), GlobalConfig::get_singleton()->get("display/height") );
Rect2 local_rect = Rect2(Point2(),viewport->get_size()-Size2(vmin.width,hmin.height));
@@ -2456,13 +2455,13 @@ void CanvasItemEditor::_update_scrollbars() {
v_scroll->set_page(local_rect.size.y/zoom);
if (first_update) {
//so 0,0 is visible
- v_scroll->set_val(-10);
- h_scroll->set_val(-10);
+ v_scroll->set_value(-10);
+ h_scroll->set_value(-10);
first_update=false;
}
- ofs.y=v_scroll->get_val();
+ ofs.y=v_scroll->get_value();
}
if (canvas_item_rect.size.width <= (local_rect.size.x/zoom)) {
@@ -2475,7 +2474,7 @@ void CanvasItemEditor::_update_scrollbars() {
h_scroll->set_min(canvas_item_rect.pos.x);
h_scroll->set_max(canvas_item_rect.pos.x+canvas_item_rect.size.x);
h_scroll->set_page(local_rect.size.x/zoom);
- ofs.x=h_scroll->get_val();
+ ofs.x=h_scroll->get_value();
}
// transform=Matrix32();
@@ -2497,8 +2496,8 @@ void CanvasItemEditor::_update_scroll(float) {
return;
Point2 ofs;
- ofs.x=h_scroll->get_val();
- ofs.y=v_scroll->get_val();
+ ofs.x=h_scroll->get_value();
+ ofs.y=v_scroll->get_value();
// current_window->set_scroll(-ofs);
@@ -2611,7 +2610,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
dialog_val->set_min(0.1);
dialog_val->set_step(0.1);
dialog_val->set_max(800);
- dialog_val->set_val(zoom*100);
+ dialog_val->set_value(zoom*100);
value_dialog->popup_centered(Size2(200,85));
updating_value_dialog=false;
@@ -2833,9 +2832,9 @@ void CanvasItemEditor::_popup_callback(int p_op) {
Node2D *n2d = canvas_item->cast_to<Node2D>();
if (key_pos)
- AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(n2d,"transform/pos",n2d->get_pos(),existing);
+ AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(n2d,"transform/pos",n2d->get_position(),existing);
if (key_rot)
- AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(n2d,"transform/rot",Math::rad2deg(n2d->get_rot()),existing);
+ AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(n2d,"transform/rot",Math::rad2deg(n2d->get_rotation()),existing);
if (key_scale)
AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(n2d,"transform/scale",n2d->get_scale(),existing);
@@ -2865,9 +2864,9 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for(List<Node2D*>::Element *F=ik_chain.front();F;F=F->next()) {
if (key_pos)
- AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(F->get(),"transform/pos",F->get()->get_pos(),existing);
+ AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(F->get(),"transform/pos",F->get()->get_position(),existing);
if (key_rot)
- AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(F->get(),"transform/rot",Math::rad2deg(F->get()->get_rot()),existing);
+ AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(F->get(),"transform/rot",Math::rad2deg(F->get()->get_rotation()),existing);
if (key_scale)
AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(F->get(),"transform/scale",F->get()->get_scale(),existing);
@@ -2947,8 +2946,8 @@ void CanvasItemEditor::_popup_callback(int p_op) {
Node2D *n2d = canvas_item->cast_to<Node2D>();
PoseClipboard pc;
- pc.pos=n2d->get_pos();
- pc.rot=n2d->get_rot();
+ pc.pos=n2d->get_position();
+ pc.rot=n2d->get_rotation();
pc.scale=n2d->get_scale();
pc.id=n2d->get_instance_ID();
pose_clipboard.push_back(pc);
@@ -2974,8 +2973,8 @@ void CanvasItemEditor::_popup_callback(int p_op) {
undo_redo->add_do_method(n2d,"set_pos",E->get().pos);
undo_redo->add_do_method(n2d,"set_rot",E->get().rot);
undo_redo->add_do_method(n2d,"set_scale",E->get().scale);
- undo_redo->add_undo_method(n2d,"set_pos",n2d->get_pos());
- undo_redo->add_undo_method(n2d,"set_rot",n2d->get_rot());
+ undo_redo->add_undo_method(n2d,"set_pos",n2d->get_position());
+ undo_redo->add_undo_method(n2d,"set_rot",n2d->get_rotation());
undo_redo->add_undo_method(n2d,"set_scale",n2d->get_scale());
}
undo_redo->commit_action();
@@ -2998,9 +2997,9 @@ void CanvasItemEditor::_popup_callback(int p_op) {
Node2D *n2d = canvas_item->cast_to<Node2D>();
if (key_pos)
- n2d->set_pos(Vector2());
+ n2d->set_position(Vector2());
if (key_rot)
- n2d->set_rot(0);
+ n2d->set_rotation(0);
if (key_scale)
n2d->set_scale(Vector2(1,1));
} else if (canvas_item->cast_to<Control>()) {
@@ -3180,8 +3179,8 @@ void CanvasItemEditor::_focus_selection(int p_op) {
center = rect.pos + rect.size/2;
Vector2 offset = viewport->get_size()/2 - editor->get_scene_root()->get_global_canvas_transform().xform(center);
- h_scroll->set_val(h_scroll->get_val() - offset.x/zoom);
- v_scroll->set_val(v_scroll->get_val() - offset.y/zoom);
+ h_scroll->set_value(h_scroll->get_value() - offset.x/zoom);
+ v_scroll->set_value(v_scroll->get_value() - offset.y/zoom);
} else { // VIEW_FRAME_TO_SELECTION
@@ -3199,20 +3198,20 @@ void CanvasItemEditor::_focus_selection(int p_op) {
void CanvasItemEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_node_removed",&CanvasItemEditor::_node_removed);
- ObjectTypeDB::bind_method("_update_scroll",&CanvasItemEditor::_update_scroll);
- ObjectTypeDB::bind_method("_popup_callback",&CanvasItemEditor::_popup_callback);
- ObjectTypeDB::bind_method("_visibility_changed",&CanvasItemEditor::_visibility_changed);
- ObjectTypeDB::bind_method("_dialog_value_changed",&CanvasItemEditor::_dialog_value_changed);
- ObjectTypeDB::bind_method("_get_editor_data",&CanvasItemEditor::_get_editor_data);
- ObjectTypeDB::bind_method("_tool_select",&CanvasItemEditor::_tool_select);
- ObjectTypeDB::bind_method("_keying_changed",&CanvasItemEditor::_keying_changed);
- ObjectTypeDB::bind_method("_unhandled_key_input",&CanvasItemEditor::_unhandled_key_input);
- ObjectTypeDB::bind_method("_viewport_draw",&CanvasItemEditor::_viewport_draw);
- ObjectTypeDB::bind_method("_viewport_input_event",&CanvasItemEditor::_viewport_input_event);
- ObjectTypeDB::bind_method("_snap_changed",&CanvasItemEditor::_snap_changed);
- ObjectTypeDB::bind_method(_MD("_selection_result_pressed"),&CanvasItemEditor::_selection_result_pressed);
- ObjectTypeDB::bind_method(_MD("_selection_menu_hide"),&CanvasItemEditor::_selection_menu_hide);
+ ClassDB::bind_method("_node_removed",&CanvasItemEditor::_node_removed);
+ ClassDB::bind_method("_update_scroll",&CanvasItemEditor::_update_scroll);
+ ClassDB::bind_method("_popup_callback",&CanvasItemEditor::_popup_callback);
+ ClassDB::bind_method("_visibility_changed",&CanvasItemEditor::_visibility_changed);
+ ClassDB::bind_method("_dialog_value_changed",&CanvasItemEditor::_dialog_value_changed);
+ ClassDB::bind_method("_get_editor_data",&CanvasItemEditor::_get_editor_data);
+ ClassDB::bind_method("_tool_select",&CanvasItemEditor::_tool_select);
+ ClassDB::bind_method("_keying_changed",&CanvasItemEditor::_keying_changed);
+ ClassDB::bind_method("_unhandled_key_input",&CanvasItemEditor::_unhandled_key_input);
+ ClassDB::bind_method("_viewport_draw",&CanvasItemEditor::_viewport_draw);
+ ClassDB::bind_method("_viewport_gui_input",&CanvasItemEditor::_viewport_gui_input);
+ ClassDB::bind_method("_snap_changed",&CanvasItemEditor::_snap_changed);
+ ClassDB::bind_method(_MD("_selection_result_pressed"),&CanvasItemEditor::_selection_result_pressed);
+ ClassDB::bind_method(_MD("_selection_menu_hide"),&CanvasItemEditor::_selection_menu_hide);
ADD_SIGNAL( MethodInfo("item_lock_status_changed") );
ADD_SIGNAL( MethodInfo("item_group_status_changed") );
@@ -3334,7 +3333,8 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
vp_base->set_v_size_flags(SIZE_EXPAND_FILL);
palette_split->add_child(vp_base);
- Control *vp = memnew (Control);
+ ViewportContainer *vp = memnew (ViewportContainer);
+ vp->set_stretch(true);
vp_base->add_child(vp);
vp->set_area_as_parent_rect();
vp->add_child(p_editor->get_scene_root());
@@ -3343,6 +3343,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
viewport = memnew( CanvasItemEditorViewport(p_editor, this) );
vp_base->add_child(viewport);
viewport->set_area_as_parent_rect();
+ viewport->set_clip_contents(true);
h_scroll = memnew( HScrollBar );
v_scroll = memnew( VScrollBar );
@@ -3350,7 +3351,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
viewport->add_child(h_scroll);
viewport->add_child(v_scroll);
viewport->connect("draw",this,"_viewport_draw");
- viewport->connect("input_event",this,"_viewport_input_event");
+ viewport->connect("gui_input",this,"_viewport_gui_input");
h_scroll->connect("value_changed", this,"_update_scroll",Vector<Variant>(),true);
@@ -3435,7 +3436,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
edit_menu = memnew( MenuButton );
edit_menu->set_text(TTR("Edit"));
hb->add_child(edit_menu);
- edit_menu->get_popup()->connect("item_pressed", this,"_popup_callback");
+ edit_menu->get_popup()->connect("id_pressed", this,"_popup_callback");
PopupMenu *p;
p = edit_menu->get_popup();
@@ -3460,7 +3461,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
skeleton_menu->add_separator();
skeleton_menu->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_set_ik_chain", TTR("Make IK Chain")), SKELETON_SET_IK_CHAIN);
skeleton_menu->add_shortcut(ED_SHORTCUT("canvas_item_editor/skeleton_clear_ik_chain", TTR("Clear IK Chain")), SKELETON_CLEAR_IK_CHAIN);
- skeleton_menu->connect("item_pressed", this,"_popup_callback");
+ skeleton_menu->connect("id_pressed", this,"_popup_callback");
/*
@@ -3472,7 +3473,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
view_menu = memnew( MenuButton );
view_menu->set_text(TTR("View"));
hb->add_child(view_menu);
- view_menu->get_popup()->connect("item_pressed", this,"_popup_callback");
+ view_menu->get_popup()->connect("id_pressed", this,"_popup_callback");
p = view_menu->get_popup();
@@ -3487,7 +3488,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
anchor_menu = memnew( MenuButton );
anchor_menu->set_text(TTR("Anchor"));
hb->add_child(anchor_menu);
- anchor_menu->get_popup()->connect("item_pressed", this,"_popup_callback");
+ anchor_menu->get_popup()->connect("id_pressed", this,"_popup_callback");
anchor_menu->hide();
//p = anchor_menu->get_popup();
@@ -3533,7 +3534,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
animation_menu = memnew( MenuButton );
animation_menu->set_text(TTR("Animation"));
animation_hb->add_child(animation_menu);
- animation_menu->get_popup()->connect("item_pressed", this,"_popup_callback");
+ animation_menu->get_popup()->connect("id_pressed", this,"_popup_callback");
p = animation_menu->get_popup();
@@ -3570,7 +3571,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
selection_menu = memnew( PopupMenu );
add_child(selection_menu);
selection_menu->set_custom_minimum_size(Vector2(100, 0));
- selection_menu->connect("item_pressed", this, "_selection_result_pressed");
+ selection_menu->connect("id_pressed", this, "_selection_result_pressed");
selection_menu->connect("popup_hide", this, "_selection_menu_hide");
key_pos=true;
@@ -3610,7 +3611,7 @@ void CanvasItemEditorPlugin::edit(Object *p_object) {
bool CanvasItemEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("CanvasItem");
+ return p_object->is_class("CanvasItem");
}
void CanvasItemEditorPlugin::make_visible(bool p_visible) {
@@ -3670,7 +3671,10 @@ void CanvasItemEditorViewport::_on_select_type(Object* selected) {
}
void CanvasItemEditorViewport::_on_change_type() {
- CheckBox* check=btn_group->get_pressed_button()->cast_to<CheckBox>();
+ if (!button_group->get_pressed_button())
+ return;
+
+ CheckBox* check=button_group->get_pressed_button()->cast_to<CheckBox>();
default_type=check->get_text();
_perform_drop_data();
selector->hide();
@@ -3682,13 +3686,13 @@ void CanvasItemEditorViewport::_create_preview(const Vector<String>& files) cons
for (int i=0;i<files.size();i++) {
String path=files[i];
RES res=ResourceLoader::load(path);
- String type=res->get_type();
+ String type=res->get_class();
if (type=="ImageTexture" || type=="PackedScene") {
if (type=="ImageTexture") {
Ref<ImageTexture> texture=Ref<ImageTexture> ( ResourceCache::get(path)->cast_to<ImageTexture>() );
Sprite* sprite=memnew(Sprite);
sprite->set_texture(texture);
- sprite->set_opacity(0.7f);
+ sprite->set_modulate(Color(1,1,1,0.7f));
preview->add_child(sprite);
label->show();
label_desc->show();
@@ -3745,7 +3749,7 @@ void CanvasItemEditorViewport::_create_nodes(Node* parent, Node* child, String&
String new_name=parent->validate_child_name(child);
ScriptEditorDebugger *sed=ScriptEditor::get_singleton()->get_debugger();
- editor_data->get_undo_redo().add_do_method(sed,"live_debug_create_node",editor->get_edited_scene()->get_path_to(parent),child->get_type(),new_name);
+ editor_data->get_undo_redo().add_do_method(sed,"live_debug_create_node",editor->get_edited_scene()->get_path_to(parent),child->get_class(),new_name);
editor_data->get_undo_redo().add_undo_method(sed,"live_debug_remove_node",NodePath(String(editor->get_edited_scene()->get_path_to(parent))+"/"+new_name));
// handle with different property for texture
@@ -3770,7 +3774,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));
@@ -3797,7 +3801,7 @@ bool CanvasItemEditorViewport::_create_instance(Node* parent, String& path, cons
return false;
}
- Node* instanced_scene=sdata->instance(true);
+ Node* instanced_scene=sdata->instance(PackedScene::GEN_EDIT_STATE_INSTANCE);
if (!instanced_scene) { // error on instancing
return false;
}
@@ -3809,7 +3813,7 @@ bool CanvasItemEditorViewport::_create_instance(Node* parent, String& path, cons
}
}
- instanced_scene->set_filename( Globals::get_singleton()->localize_path(path) );
+ instanced_scene->set_filename( GlobalConfig::get_singleton()->localize_path(path) );
editor_data->get_undo_redo().add_do_method(parent,"add_child",instanced_scene);
editor_data->get_undo_redo().add_do_method(instanced_scene,"set_owner",editor->get_edited_scene());
@@ -3824,7 +3828,7 @@ bool CanvasItemEditorViewport::_create_instance(Node* parent, String& path, cons
Point2 pos;
Node2D* parent_node2d=parent->cast_to<Node2D>();
if (parent_node2d) {
- pos=parent_node2d->get_global_pos();
+ pos=parent_node2d->get_global_position();
} else {
Control* parent_control=parent->cast_to<Control>();
if (parent_control) {
@@ -3850,7 +3854,7 @@ void CanvasItemEditorViewport::_perform_drop_data(){
if (res.is_null()) {
continue;
}
- String type=res->get_type();
+ String type=res->get_class();
if (type=="ImageTexture") {
Node* child;
if (default_type=="Light2D") child=memnew(Light2D);
@@ -3895,10 +3899,10 @@ bool CanvasItemEditorViewport::can_drop_data(const Point2& p_point,const Variant
if (res.is_null()) {
continue;
}
- String type=res->get_type();
+ String type=res->get_class();
if (type=="PackedScene") {
Ref<PackedScene> sdata=ResourceLoader::load(files[i]);
- Node* instanced_scene=sdata->instance(true);
+ Node* instanced_scene=sdata->instance(PackedScene::GEN_EDIT_STATE_INSTANCE);
if (!instanced_scene) {
continue;
}
@@ -3912,7 +3916,7 @@ bool CanvasItemEditorViewport::can_drop_data(const Point2& p_point,const Variant
_create_preview(files);
}
Matrix32 trans=canvas->get_canvas_transform();
- preview->set_pos((p_point-trans.get_origin())/trans.get_scale().x);
+ preview->set_position((p_point-trans.get_origin())/trans.get_scale().x);
label->set_text(vformat(TTR("Adding %s..."),default_type));
}
return can_instance;
@@ -3956,7 +3960,8 @@ void CanvasItemEditorViewport::drop_data(const Point2& p_point,const Variant& p_
if (is_alt) {
List<BaseButton*> btn_list;
- btn_group->get_button_list(&btn_list);
+ button_group->get_buttons(&btn_list);
+
for (int i=0;i<btn_list.size();i++) {
CheckBox* check=btn_list[i]->cast_to<CheckBox>();
check->set_pressed(check->get_text()==default_type);
@@ -3977,9 +3982,9 @@ void CanvasItemEditorViewport::_notification(int p_what) {
}
void CanvasItemEditorViewport::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_on_select_type"),&CanvasItemEditorViewport::_on_select_type);
- ObjectTypeDB::bind_method(_MD("_on_change_type"),&CanvasItemEditorViewport::_on_change_type);
- ObjectTypeDB::bind_method(_MD("_on_mouse_exit"),&CanvasItemEditorViewport::_on_mouse_exit);
+ ClassDB::bind_method(_MD("_on_select_type"),&CanvasItemEditorViewport::_on_select_type);
+ ClassDB::bind_method(_MD("_on_change_type"),&CanvasItemEditorViewport::_on_change_type);
+ ClassDB::bind_method(_MD("_on_mouse_exit"),&CanvasItemEditorViewport::_on_mouse_exit);
}
CanvasItemEditorViewport::CanvasItemEditorViewport(EditorNode *p_node, CanvasItemEditor* p_canvas) {
@@ -4015,7 +4020,9 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(EditorNode *p_node, CanvasIte
selector_label->set_custom_minimum_size(Size2(0,30)*EDSCALE);
vbc->add_child(selector_label);
- btn_group=memnew( ButtonGroup );
+ button_group.instance();
+
+ btn_group=memnew( VBoxContainer );
btn_group->set_h_size_flags(0);
btn_group->connect("button_selected", this, "_on_select_type");
@@ -4023,6 +4030,7 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(EditorNode *p_node, CanvasIte
CheckBox* check=memnew(CheckBox);
check->set_text(types[i]);
btn_group->add_child(check);
+ check->set_button_group(button_group);
}
vbc->add_child(btn_group);
diff --git a/tools/editor/plugins/canvas_item_editor_plugin.h b/tools/editor/plugins/canvas_item_editor_plugin.h
index bbec078e02..ee36554477 100644
--- a/tools/editor/plugins/canvas_item_editor_plugin.h
+++ b/tools/editor/plugins/canvas_item_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -46,7 +46,7 @@ class CanvasItemEditorViewport;
class CanvasItemEditorSelectedItem : public Object {
- OBJ_TYPE(CanvasItemEditorSelectedItem,Object);
+ GDCLASS(CanvasItemEditorSelectedItem,Object);
public:
Variant undo_state;
Vector2 undo_pivot;
@@ -60,7 +60,7 @@ public:
class CanvasItemEditor : public VBoxContainer {
- OBJ_TYPE(CanvasItemEditor, VBoxContainer );
+ GDCLASS(CanvasItemEditor, VBoxContainer );
EditorNode *editor;
@@ -353,7 +353,7 @@ class CanvasItemEditor : public VBoxContainer {
void _unhandled_key_input(const InputEvent& p_ev);
- void _viewport_input_event(const InputEvent& p_event);
+ void _viewport_gui_input(const InputEvent& p_event);
void _viewport_draw();
void _focus_selection(int p_op);
@@ -431,7 +431,7 @@ public:
class CanvasItemEditorPlugin : public EditorPlugin {
- OBJ_TYPE( CanvasItemEditorPlugin, EditorPlugin );
+ GDCLASS( CanvasItemEditorPlugin, EditorPlugin );
CanvasItemEditor *canvas_item_editor;
EditorNode *editor;
@@ -455,7 +455,7 @@ public:
};
class CanvasItemEditorViewport : public VBoxContainer {
- OBJ_TYPE( CanvasItemEditorViewport, VBoxContainer );
+ GDCLASS( CanvasItemEditorViewport, VBoxContainer );
String default_type;
Vector<String> types;
@@ -473,7 +473,8 @@ class CanvasItemEditorViewport : public VBoxContainer {
Label* selector_label;
Label* label;
Label* label_desc;
- ButtonGroup* btn_group;
+ VBoxContainer* btn_group;
+ Ref<ButtonGroup> button_group;
void _on_mouse_exit();
void _on_select_type(Object* selected);
diff --git a/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp b/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp
index 95364e8921..710b9a80c0 100644
--- a/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/collision_polygon_2d_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -99,7 +99,7 @@ void CollisionPolygon2DEditor::_wip_close() {
edited_point=-1;
}
-bool CollisionPolygon2DEditor::forward_input_event(const InputEvent& p_event) {
+bool CollisionPolygon2DEditor::forward_gui_input(const InputEvent& p_event) {
if (!node)
@@ -122,7 +122,7 @@ bool CollisionPolygon2DEditor::forward_input_event(const InputEvent& p_event) {
Vector<Vector2> poly = node->get_polygon();
//first check if a point is to be added (segment split)
- real_t grab_treshold=EDITOR_DEF("poly_editor/point_grab_radius",8);
+ real_t grab_treshold=EDITOR_DEF("editors/poly_editor/point_grab_radius",8);
switch(mode) {
@@ -398,9 +398,9 @@ void CollisionPolygon2DEditor::edit(Node *p_collision_polygon) {
void CollisionPolygon2DEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_menu_option"),&CollisionPolygon2DEditor::_menu_option);
- ObjectTypeDB::bind_method(_MD("_canvas_draw"),&CollisionPolygon2DEditor::_canvas_draw);
- ObjectTypeDB::bind_method(_MD("_node_removed"),&CollisionPolygon2DEditor::_node_removed);
+ ClassDB::bind_method(_MD("_menu_option"),&CollisionPolygon2DEditor::_menu_option);
+ ClassDB::bind_method(_MD("_canvas_draw"),&CollisionPolygon2DEditor::_canvas_draw);
+ ClassDB::bind_method(_MD("_node_removed"),&CollisionPolygon2DEditor::_node_removed);
}
@@ -432,7 +432,7 @@ CollisionPolygon2DEditor::CollisionPolygon2DEditor(EditorNode *p_editor) {
options->set_area_as_parent_rect();
options->set_text("Polygon");
//options->get_popup()->add_item("Parse BBCode",PARSE_BBCODE);
- options->get_popup()->connect("item_pressed", this,"_menu_option");
+ options->get_popup()->connect("id_pressed", this,"_menu_option");
#endif
mode = MODE_EDIT;
@@ -448,7 +448,7 @@ void CollisionPolygon2DEditorPlugin::edit(Object *p_object) {
bool CollisionPolygon2DEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("CollisionPolygon2D");
+ return p_object->is_class("CollisionPolygon2D");
}
void CollisionPolygon2DEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/collision_polygon_2d_editor_plugin.h b/tools/editor/plugins/collision_polygon_2d_editor_plugin.h
index 431d3651c1..89f5ed9f06 100644
--- a/tools/editor/plugins/collision_polygon_2d_editor_plugin.h
+++ b/tools/editor/plugins/collision_polygon_2d_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -43,7 +43,7 @@ class CanvasItemEditor;
class CollisionPolygon2DEditor : public HBoxContainer {
- OBJ_TYPE(CollisionPolygon2DEditor, HBoxContainer );
+ GDCLASS(CollisionPolygon2DEditor, HBoxContainer );
UndoRedo *undo_redo;
enum Mode {
@@ -81,21 +81,21 @@ protected:
static void _bind_methods();
public:
- bool forward_input_event(const InputEvent& p_event);
+ bool forward_gui_input(const InputEvent& p_event);
void edit(Node *p_collision_polygon);
CollisionPolygon2DEditor(EditorNode *p_editor);
};
class CollisionPolygon2DEditorPlugin : public EditorPlugin {
- OBJ_TYPE( CollisionPolygon2DEditorPlugin, EditorPlugin );
+ GDCLASS( CollisionPolygon2DEditorPlugin, EditorPlugin );
CollisionPolygon2DEditor *collision_polygon_editor;
EditorNode *editor;
public:
- virtual bool forward_canvas_input_event(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return collision_polygon_editor->forward_input_event(p_event); }
+ virtual bool forward_canvas_gui_input(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return collision_polygon_editor->forward_gui_input(p_event); }
virtual String get_name() const { return "CollisionPolygon2D"; }
bool has_main_screen() const { return false; }
diff --git a/tools/editor/plugins/collision_polygon_editor_plugin.cpp b/tools/editor/plugins/collision_polygon_editor_plugin.cpp
index 0b06b3ba21..010d6f1a47 100644
--- a/tools/editor/plugins/collision_polygon_editor_plugin.cpp
+++ b/tools/editor/plugins/collision_polygon_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -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) {
@@ -107,7 +109,7 @@ void CollisionPolygonEditor::_wip_close() {
}
-bool CollisionPolygonEditor::forward_spatial_input_event(Camera* p_camera,const InputEvent& p_event) {
+bool CollisionPolygonEditor::forward_spatial_gui_input(Camera* p_camera,const InputEvent& p_event) {
if (!node)
return false;
@@ -145,7 +147,7 @@ bool CollisionPolygonEditor::forward_spatial_input_event(Camera* p_camera,const
Vector<Vector2> poly = node->get_polygon();
//first check if a point is to be added (segment split)
- real_t grab_treshold=EDITOR_DEF("poly_editor/point_grab_radius",8);
+ real_t grab_treshold=EDITOR_DEF("editors/poly_editor/point_grab_radius",8);
switch(mode) {
@@ -476,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++) {
@@ -527,9 +529,9 @@ void CollisionPolygonEditor::edit(Node *p_collision_polygon) {
void CollisionPolygonEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_menu_option"),&CollisionPolygonEditor::_menu_option);
- ObjectTypeDB::bind_method(_MD("_polygon_draw"),&CollisionPolygonEditor::_polygon_draw);
- ObjectTypeDB::bind_method(_MD("_node_removed"),&CollisionPolygonEditor::_node_removed);
+ ClassDB::bind_method(_MD("_menu_option"),&CollisionPolygonEditor::_menu_option);
+ ClassDB::bind_method(_MD("_polygon_draw"),&CollisionPolygonEditor::_polygon_draw);
+ ClassDB::bind_method(_MD("_node_removed"),&CollisionPolygonEditor::_node_removed);
}
@@ -559,7 +561,7 @@ CollisionPolygonEditor::CollisionPolygonEditor(EditorNode *p_editor) {
options->set_area_as_parent_rect();
options->set_text("Polygon");
//options->get_popup()->add_item("Parse BBCode",PARSE_BBCODE);
- options->get_popup()->connect("item_pressed", this,"_menu_option");
+ options->get_popup()->connect("id_pressed", this,"_menu_option");
#endif
mode = MODE_EDIT;
@@ -568,25 +570,25 @@ CollisionPolygonEditor::CollisionPolygonEditor(EditorNode *p_editor) {
imgeom->set_transform(Transform(Matrix3(),Vector3(0,0,0.00001)));
- line_material = Ref<FixedMaterial>( memnew( FixedMaterial ));
+ line_material = Ref<FixedSpatialMaterial>( memnew( FixedSpatialMaterial ));
line_material->set_flag(Material::FLAG_UNSHADED, true);
line_material->set_line_width(3.0);
- line_material->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA, true);
- line_material->set_fixed_flag(FixedMaterial::FLAG_USE_COLOR_ARRAY, true);
- line_material->set_parameter(FixedMaterial::PARAM_DIFFUSE,Color(1,1,1));
+ line_material->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_ALPHA, true);
+ line_material->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_COLOR_ARRAY, true);
+ line_material->set_parameter(FixedSpatialMaterial::PARAM_DIFFUSE,Color(1,1,1));
- handle_material = Ref<FixedMaterial>( memnew( FixedMaterial ));
+ handle_material = Ref<FixedSpatialMaterial>( memnew( FixedSpatialMaterial ));
handle_material->set_flag(Material::FLAG_UNSHADED, true);
- handle_material->set_fixed_flag(FixedMaterial::FLAG_USE_POINT_SIZE, true);
- handle_material->set_parameter(FixedMaterial::PARAM_DIFFUSE,Color(1,1,1));
- handle_material->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA, true);
- handle_material->set_fixed_flag(FixedMaterial::FLAG_USE_COLOR_ARRAY, false);
+ handle_material->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_POINT_SIZE, true);
+ handle_material->set_parameter(FixedSpatialMaterial::PARAM_DIFFUSE,Color(1,1,1));
+ handle_material->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_ALPHA, true);
+ handle_material->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_COLOR_ARRAY, false);
Ref<Texture> handle=editor->get_gui_base()->get_icon("Editor3DHandle","EditorIcons");
handle_material->set_point_size(handle->get_width());
- handle_material->set_texture(FixedMaterial::PARAM_DIFFUSE,handle);
+ handle_material->set_texture(FixedSpatialMaterial::PARAM_DIFFUSE,handle);
pointsm = memnew( MeshInstance );
imgeom->add_child(pointsm);
@@ -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..cd722048db 100644
--- a/tools/editor/plugins/collision_polygon_editor_plugin.h
+++ b/tools/editor/plugins/collision_polygon_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -40,11 +40,13 @@
/**
@author Juan Linietsky <reduzio@gmail.com>
*/
+
+#if 0
class CanvasItemEditor;
class CollisionPolygonEditor : public HBoxContainer {
- OBJ_TYPE(CollisionPolygonEditor, HBoxContainer );
+ GDCLASS(CollisionPolygonEditor, HBoxContainer );
UndoRedo *undo_redo;
enum Mode {
@@ -60,8 +62,8 @@ class CollisionPolygonEditor : public HBoxContainer {
ToolButton *button_edit;
- Ref<FixedMaterial> line_material;
- Ref<FixedMaterial> handle_material;
+ Ref<FixedSpatialMaterial> line_material;
+ Ref<FixedSpatialMaterial> handle_material;
EditorNode *editor;
Panel *panel;
@@ -90,7 +92,7 @@ protected:
static void _bind_methods();
public:
- virtual bool forward_spatial_input_event(Camera* p_camera,const InputEvent& p_event);
+ virtual bool forward_spatial_gui_input(Camera* p_camera,const InputEvent& p_event);
void edit(Node *p_collision_polygon);
CollisionPolygonEditor(EditorNode *p_editor);
~CollisionPolygonEditor();
@@ -98,14 +100,14 @@ public:
class CollisionPolygonEditorPlugin : public EditorPlugin {
- OBJ_TYPE( CollisionPolygonEditorPlugin, EditorPlugin );
+ GDCLASS( CollisionPolygonEditorPlugin, EditorPlugin );
CollisionPolygonEditor *collision_polygon_editor;
EditorNode *editor;
public:
- virtual bool forward_spatial_input_event(Camera* p_camera,const InputEvent& p_event) { return collision_polygon_editor->forward_spatial_input_event(p_camera,p_event); }
+ virtual bool forward_spatial_gui_input(Camera* p_camera,const InputEvent& p_event) { return collision_polygon_editor->forward_spatial_gui_input(p_camera,p_event); }
virtual String get_name() const { return "CollisionPolygon"; }
bool has_main_screen() const { return false; }
@@ -117,5 +119,5 @@ public:
~CollisionPolygonEditorPlugin();
};
-
+#endif
#endif // COLLISION_POLYGON_EDITOR_PLUGIN_H
diff --git a/tools/editor/plugins/collision_shape_2d_editor_plugin.cpp b/tools/editor/plugins/collision_shape_2d_editor_plugin.cpp
index d0cd73dcad..a7b8e1d704 100644
--- a/tools/editor/plugins/collision_shape_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/collision_shape_2d_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -303,7 +303,7 @@ void CollisionShape2DEditor::commit_handle(int idx, Variant& p_org) {
undo_redo->commit_action();
}
-bool CollisionShape2DEditor::forward_input_event(const InputEvent& p_event) {
+bool CollisionShape2DEditor::forward_gui_input(const InputEvent& p_event) {
if (!node) {
return false;
@@ -555,8 +555,8 @@ void CollisionShape2DEditor::edit(Node* p_node) {
void CollisionShape2DEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_canvas_draw",&CollisionShape2DEditor::_canvas_draw);
- ObjectTypeDB::bind_method("_get_current_shape_type",&CollisionShape2DEditor::_get_current_shape_type);
+ ClassDB::bind_method("_canvas_draw",&CollisionShape2DEditor::_canvas_draw);
+ ClassDB::bind_method("_get_current_shape_type",&CollisionShape2DEditor::_get_current_shape_type);
}
CollisionShape2DEditor::CollisionShape2DEditor(EditorNode* p_editor) {
@@ -578,7 +578,7 @@ void CollisionShape2DEditorPlugin::edit(Object* p_obj) {
bool CollisionShape2DEditorPlugin::handles(Object* p_obj) const {
- return p_obj->is_type("CollisionShape2D");
+ return p_obj->is_class("CollisionShape2D");
}
void CollisionShape2DEditorPlugin::make_visible(bool visible) {
diff --git a/tools/editor/plugins/collision_shape_2d_editor_plugin.h b/tools/editor/plugins/collision_shape_2d_editor_plugin.h
index a8930dc0f2..589f7ae9f8 100644
--- a/tools/editor/plugins/collision_shape_2d_editor_plugin.h
+++ b/tools/editor/plugins/collision_shape_2d_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -37,7 +37,7 @@
class CanvasItemEditor;
class CollisionShape2DEditor : public Control {
- OBJ_TYPE(CollisionShape2DEditor, Control);
+ GDCLASS(CollisionShape2DEditor, Control);
enum ShapeType {
CAPSULE_SHAPE,
@@ -73,20 +73,20 @@ protected:
static void _bind_methods();
public:
- bool forward_input_event(const InputEvent& p_event);
+ bool forward_gui_input(const InputEvent& p_event);
void edit(Node* p_node);
CollisionShape2DEditor(EditorNode* p_editor);
};
class CollisionShape2DEditorPlugin : public EditorPlugin {
- OBJ_TYPE(CollisionShape2DEditorPlugin, EditorPlugin);
+ GDCLASS(CollisionShape2DEditorPlugin, EditorPlugin);
CollisionShape2DEditor* collision_shape_2d_editor;
EditorNode* editor;
public:
- virtual bool forward_canvas_input_event(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return collision_shape_2d_editor->forward_input_event(p_event); }
+ virtual bool forward_canvas_gui_input(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return collision_shape_2d_editor->forward_gui_input(p_event); }
virtual String get_name() const { return "CollisionShape2D"; }
bool has_main_screen() const { return false; }
diff --git a/tools/editor/plugins/color_ramp_editor_plugin.cpp b/tools/editor/plugins/color_ramp_editor_plugin.cpp
index 4e2045edc6..90ec1e9f4e 100644
--- a/tools/editor/plugins/color_ramp_editor_plugin.cpp
+++ b/tools/editor/plugins/color_ramp_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -54,7 +54,7 @@ void ColorRampEditorPlugin::edit(Object *p_object) {
bool ColorRampEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("ColorRamp");
+ return p_object->is_class("ColorRamp");
}
@@ -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();
@@ -106,6 +106,6 @@ ColorRampEditorPlugin::~ColorRampEditorPlugin(){
}
void ColorRampEditorPlugin::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("ramp_changed"),&ColorRampEditorPlugin::_ramp_changed);
- ObjectTypeDB::bind_method(_MD("undo_redo_color_ramp","offsets","colors"),&ColorRampEditorPlugin::_undo_redo_color_ramp);
+ ClassDB::bind_method(_MD("ramp_changed"),&ColorRampEditorPlugin::_ramp_changed);
+ ClassDB::bind_method(_MD("undo_redo_color_ramp","offsets","colors"),&ColorRampEditorPlugin::_undo_redo_color_ramp);
}
diff --git a/tools/editor/plugins/color_ramp_editor_plugin.h b/tools/editor/plugins/color_ramp_editor_plugin.h
index 300a9030b9..2f55ad65f1 100644
--- a/tools/editor/plugins/color_ramp_editor_plugin.h
+++ b/tools/editor/plugins/color_ramp_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -35,7 +35,7 @@
class ColorRampEditorPlugin : public EditorPlugin {
- OBJ_TYPE( ColorRampEditorPlugin, EditorPlugin );
+ GDCLASS( ColorRampEditorPlugin, EditorPlugin );
bool _2d;
Ref<ColorRamp> color_ramp_ref;
diff --git a/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp b/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp
index b6f3db73f7..da5c07221e 100644
--- a/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp
+++ b/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -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"
@@ -150,8 +151,8 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
VS::ViewportRect vr;
vr.x=0;
vr.y=0;
- vr.width=EditorSettings::get_singleton()->get("grid_map/preview_size");
- vr.height=EditorSettings::get_singleton()->get("grid_map/preview_size");
+ vr.width=EditorSettings::get_singleton()->get("editors/grid_map/preview_size");
+ vr.height=EditorSettings::get_singleton()->get("editors/grid_map/preview_size");
VS::get_singleton()->viewport_set_rect(vp,vr);
VS::get_singleton()->viewport_set_as_render_target(vp,true);
VS::get_singleton()->viewport_set_render_target_update_mode(vp,VS::RENDER_TARGET_UPDATE_ALWAYS);
@@ -178,8 +179,8 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library,
Vector3 ofs = aabb.pos + aabb.size*0.5;
aabb.pos-=ofs;
Transform xform;
- xform.basis=Matrix3().rotated(Vector3(0,1,0),Math_PI*0.25);
- xform.basis = Matrix3().rotated(Vector3(1,0,0),-Math_PI*0.25)*xform.basis;
+ xform.basis=Matrix3().rotated(Vector3(0,1,0),-Math_PI*0.25);
+ xform.basis = Matrix3().rotated(Vector3(1,0,0),Math_PI*0.25)*xform.basis;
AABB rot_aabb = xform.xform(aabb);
print_line("rot_aabb: "+rot_aabb);
float m = MAX(rot_aabb.size.x,rot_aabb.size.y)*0.5;
@@ -275,9 +276,9 @@ void MeshLibraryEditor::_menu_cbk(int p_option) {
void MeshLibraryEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_menu_cbk",&MeshLibraryEditor::_menu_cbk);
- ObjectTypeDB::bind_method("_menu_confirm",&MeshLibraryEditor::_menu_confirm);
- ObjectTypeDB::bind_method("_import_scene_cbk",&MeshLibraryEditor::_import_scene_cbk);
+ ClassDB::bind_method("_menu_cbk",&MeshLibraryEditor::_menu_cbk);
+ ClassDB::bind_method("_menu_confirm",&MeshLibraryEditor::_menu_confirm);
+ ClassDB::bind_method("_import_scene_cbk",&MeshLibraryEditor::_import_scene_cbk);
}
MeshLibraryEditor::MeshLibraryEditor(EditorNode *p_editor) {
@@ -309,7 +310,7 @@ MeshLibraryEditor::MeshLibraryEditor(EditorNode *p_editor) {
options->get_popup()->add_item(TTR("Import from Scene"),MENU_OPTION_IMPORT_FROM_SCENE);
options->get_popup()->add_item(TTR("Update from Scene"),MENU_OPTION_UPDATE_FROM_SCENE);
options->get_popup()->set_item_disabled(options->get_popup()->get_item_index(MENU_OPTION_UPDATE_FROM_SCENE),true);
- options->get_popup()->connect("item_pressed", this,"_menu_cbk");
+ options->get_popup()->connect("id_pressed", this,"_menu_cbk");
menu=options;
editor=p_editor;
cd = memnew(ConfirmationDialog);
@@ -342,7 +343,7 @@ void MeshLibraryEditorPlugin::make_visible(bool p_visible){
MeshLibraryEditorPlugin::MeshLibraryEditorPlugin(EditorNode *p_node) {
- EDITOR_DEF("grid_map/preview_size",64);
+ EDITOR_DEF("editors/grid_map/preview_size",64);
theme_editor = memnew( MeshLibraryEditor(p_node) );
p_node->get_viewport()->add_child(theme_editor);
@@ -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..f32f601023 100644
--- a/tools/editor/plugins/cube_grid_theme_editor_plugin.h
+++ b/tools/editor/plugins/cube_grid_theme_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -32,10 +32,10 @@
#include "scene/resources/mesh_library.h"
#include "tools/editor/editor_node.h"
-
+#if 0
class MeshLibraryEditor : public Control {
- OBJ_TYPE( MeshLibraryEditor, Control );
+ GDCLASS( MeshLibraryEditor, Control );
Ref<MeshLibrary> theme;
@@ -74,7 +74,7 @@ public:
class MeshLibraryEditorPlugin : public EditorPlugin {
- OBJ_TYPE( MeshLibraryEditorPlugin, EditorPlugin );
+ GDCLASS( MeshLibraryEditorPlugin, EditorPlugin );
MeshLibraryEditor *theme_editor;
EditorNode *editor;
@@ -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..9dcfc2fa94 100644
--- a/tools/editor/plugins/editor_preview_plugins.cpp
+++ b/tools/editor/plugins/editor_preview_plugins.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -37,9 +37,10 @@
#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"));
+ return (ClassDB::is_type(p_type,"ImageTexture") || ClassDB::is_type(p_type, "AtlasTexture"));
}
Ref<Texture> EditorTexturePreviewPlugin::generate(const RES& p_from) {
@@ -64,13 +65,13 @@ Ref<Texture> EditorTexturePreviewPlugin::generate(const RES& p_from) {
img.clear_mipmaps();
- int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size");
+ int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/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;
@@ -106,7 +107,7 @@ EditorTexturePreviewPlugin::EditorTexturePreviewPlugin() {
bool EditorBitmapPreviewPlugin::handles(const String& p_type) const {
- return ObjectTypeDB::is_type(p_type,"BitMap");
+ return ClassDB::is_type(p_type,"BitMap");
}
Ref<Texture> EditorBitmapPreviewPlugin::generate(const RES& p_from) {
@@ -117,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++) {
@@ -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");
+ int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/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;
@@ -192,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())
@@ -213,7 +214,7 @@ Ref<Texture> EditorPackedScenePreviewPlugin::_gen_from_imd(Ref<ResourceImportMet
bool EditorPackedScenePreviewPlugin::handles(const String& p_type) const {
- return ObjectTypeDB::is_type(p_type,"PackedScene");
+ return ClassDB::is_type(p_type,"PackedScene");
}
Ref<Texture> EditorPackedScenePreviewPlugin::generate(const RES& p_from) {
@@ -235,7 +236,7 @@ EditorPackedScenePreviewPlugin::EditorPackedScenePreviewPlugin() {
bool EditorMaterialPreviewPlugin::handles(const String& p_type) const {
- return ObjectTypeDB::is_type(p_type,"Material"); //any material
+ return ClassDB::is_type(p_type,"Material"); //any material
}
Ref<Texture> EditorMaterialPreviewPlugin::generate(const RES& p_from) {
@@ -263,7 +264,7 @@ Ref<Texture> EditorMaterialPreviewPlugin::generate(const RES& p_from) {
//print_line("captured!");
VS::get_singleton()->mesh_surface_set_material(sphere,0,RID());
- int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size");
+ int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size");
thumbnail_size*=EDSCALE;
img.resize(thumbnail_size,thumbnail_size);
@@ -310,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++) {
@@ -404,7 +405,7 @@ static bool _is_text_char(CharType c) {
bool EditorScriptPreviewPlugin::handles(const String& p_type) const {
- return ObjectTypeDB::is_type(p_type,"Script");
+ return ClassDB::is_type(p_type,"Script");
}
Ref<Texture> EditorScriptPreviewPlugin::generate(const RES& p_from) {
@@ -432,17 +433,17 @@ Ref<Texture> EditorScriptPreviewPlugin::generate(const RES& p_from) {
int line = 0;
int col=0;
- int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size");
+ int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/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);
- Color bg_color = EditorSettings::get_singleton()->get("text_editor/background_color");
+ Color bg_color = EditorSettings::get_singleton()->get("text_editor/highlighting/background_color");
bg_color.a=1.0;
- Color keyword_color = EditorSettings::get_singleton()->get("text_editor/keyword_color");
- Color text_color = EditorSettings::get_singleton()->get("text_editor/text_color");
- Color symbol_color = EditorSettings::get_singleton()->get("text_editor/symbol_color");
+ Color keyword_color = EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color");
+ Color text_color = EditorSettings::get_singleton()->get("text_editor/highlighting/text_color");
+ Color symbol_color = EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color");
for(int i=0;i<thumbnail_size;i++) {
@@ -523,7 +524,7 @@ EditorScriptPreviewPlugin::EditorScriptPreviewPlugin() {
bool EditorSamplePreviewPlugin::handles(const String& p_type) const {
- return ObjectTypeDB::is_type(p_type,"Sample");
+ return ClassDB::is_type(p_type,"Sample");
}
Ref<Texture> EditorSamplePreviewPlugin::generate(const RES& p_from) {
@@ -532,17 +533,17 @@ Ref<Texture> EditorSamplePreviewPlugin::generate(const RES& p_from) {
ERR_FAIL_COND_V(smp.is_null(),Ref<Texture>());
- int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size");
+ 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();
@@ -775,10 +776,10 @@ 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_RGB,img),0);
+ ptex->create_from_image(Image(w,h,0,Image::FORMAT_RGB8,img),0);
return ptex;
}
@@ -792,7 +793,7 @@ EditorSamplePreviewPlugin::EditorSamplePreviewPlugin() {
bool EditorMeshPreviewPlugin::handles(const String& p_type) const {
- return ObjectTypeDB::is_type(p_type,"Mesh"); //any Mesh
+ return ClassDB::is_type(p_type,"Mesh"); //any Mesh
}
Ref<Texture> EditorMeshPreviewPlugin::generate(const RES& p_from) {
@@ -806,8 +807,8 @@ Ref<Texture> EditorMeshPreviewPlugin::generate(const RES& p_from) {
Vector3 ofs = aabb.pos + aabb.size*0.5;
aabb.pos-=ofs;
Transform xform;
- xform.basis=Matrix3().rotated(Vector3(0,1,0),Math_PI*0.125);
- xform.basis = Matrix3().rotated(Vector3(1,0,0),-Math_PI*0.125)*xform.basis;
+ xform.basis=Matrix3().rotated(Vector3(0,1,0),-Math_PI*0.125);
+ xform.basis = Matrix3().rotated(Vector3(1,0,0),Math_PI*0.125)*xform.basis;
AABB rot_aabb = xform.xform(aabb);
float m = MAX(rot_aabb.size.x,rot_aabb.size.y)*0.5;
if (m==0)
@@ -840,7 +841,7 @@ Ref<Texture> EditorMeshPreviewPlugin::generate(const RES& p_from) {
//print_line("captured!");
VS::get_singleton()->instance_set_base(mesh_instance,RID());
- int thumbnail_size = EditorSettings::get_singleton()->get("file_dialog/thumbnail_size");
+ int thumbnail_size = EditorSettings::get_singleton()->get("filesystem/file_dialog/thumbnail_size");
thumbnail_size*=EDSCALE;
img.resize(thumbnail_size,thumbnail_size);
@@ -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..3c1689e61e 100644
--- a/tools/editor/plugins/editor_preview_plugins.h
+++ b/tools/editor/plugins/editor_preview_plugins.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -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/gi_probe_editor_plugin.cpp b/tools/editor/plugins/gi_probe_editor_plugin.cpp
new file mode 100644
index 0000000000..f550b7972a
--- /dev/null
+++ b/tools/editor/plugins/gi_probe_editor_plugin.cpp
@@ -0,0 +1,57 @@
+#include "gi_probe_editor_plugin.h"
+
+
+void GIProbeEditorPlugin::_bake() {
+
+ if (gi_probe) {
+ gi_probe->bake();
+ }
+}
+
+
+void GIProbeEditorPlugin::edit(Object *p_object) {
+
+ GIProbe * s = p_object->cast_to<GIProbe>();
+ if (!s)
+ return;
+
+ gi_probe=s;
+}
+
+bool GIProbeEditorPlugin::handles(Object *p_object) const {
+
+ return p_object->is_class("GIProbe");
+}
+
+void GIProbeEditorPlugin::make_visible(bool p_visible) {
+
+ if (p_visible) {
+ bake->show();
+ } else {
+
+ bake->hide();
+ }
+
+}
+
+void GIProbeEditorPlugin::_bind_methods() {
+
+ ClassDB::bind_method("_bake",&GIProbeEditorPlugin::_bake);
+}
+
+GIProbeEditorPlugin::GIProbeEditorPlugin(EditorNode *p_node) {
+
+ editor=p_node;
+ bake = memnew( Button );
+ bake->set_icon(editor->get_gui_base()->get_icon("BakedLight","EditorIcons"));
+ bake->hide();;
+ bake->connect("pressed",this,"_bake");
+ add_control_to_container(CONTAINER_SPATIAL_EDITOR_MENU,bake);
+ gi_probe=NULL;
+}
+
+
+GIProbeEditorPlugin::~GIProbeEditorPlugin() {
+
+ memdelete(bake);
+}
diff --git a/tools/editor/plugins/gi_probe_editor_plugin.h b/tools/editor/plugins/gi_probe_editor_plugin.h
new file mode 100644
index 0000000000..8d2ec17d2f
--- /dev/null
+++ b/tools/editor/plugins/gi_probe_editor_plugin.h
@@ -0,0 +1,37 @@
+#ifndef GIPROBEEDITORPLUGIN_H
+#define GIPROBEEDITORPLUGIN_H
+
+#include "tools/editor/editor_plugin.h"
+#include "tools/editor/editor_node.h"
+#include "scene/resources/material.h"
+#include "scene/3d/gi_probe.h"
+
+
+
+class GIProbeEditorPlugin : public EditorPlugin {
+
+ GDCLASS( GIProbeEditorPlugin, EditorPlugin );
+
+ GIProbe *gi_probe;
+
+ Button *bake;
+ EditorNode *editor;
+
+ void _bake();
+protected:
+
+ static void _bind_methods();
+public:
+
+ virtual String get_name() const { return "GIProbe"; }
+ bool has_main_screen() const { return false; }
+ virtual void edit(Object *p_node);
+ virtual bool handles(Object *p_node) const;
+ virtual void make_visible(bool p_visible);
+
+ GIProbeEditorPlugin(EditorNode *p_node);
+ ~GIProbeEditorPlugin();
+
+};
+
+#endif // GIPROBEEDITORPLUGIN_H
diff --git a/tools/editor/plugins/item_list_editor_plugin.cpp b/tools/editor/plugins/item_list_editor_plugin.cpp
index b711e13193..f31074a9dc 100644
--- a/tools/editor/plugins/item_list_editor_plugin.cpp
+++ b/tools/editor/plugins/item_list_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -119,7 +119,7 @@ void ItemListOptionButtonPlugin::set_object(Object *p_object) {
bool ItemListOptionButtonPlugin::handles(Object *p_object) const {
- return p_object->is_type("OptionButton");
+ return p_object->is_class("OptionButton");
}
int ItemListOptionButtonPlugin::get_flags() const {
@@ -153,7 +153,7 @@ ItemListOptionButtonPlugin::ItemListOptionButtonPlugin() {
void ItemListPopupMenuPlugin::set_object(Object *p_object) {
- if (p_object->is_type("MenuButton"))
+ if (p_object->is_class("MenuButton"))
pp = p_object->cast_to<MenuButton>()->get_popup();
else
pp = p_object->cast_to<PopupMenu>();
@@ -161,7 +161,7 @@ void ItemListPopupMenuPlugin::set_object(Object *p_object) {
bool ItemListPopupMenuPlugin::handles(Object *p_object) const {
- return p_object->is_type("PopupMenu") || p_object->is_type("MenuButton");
+ return p_object->is_class("PopupMenu") || p_object->is_class("MenuButton");
}
int ItemListPopupMenuPlugin::get_flags() const {
@@ -260,8 +260,8 @@ void ItemListEditor::edit(Node *p_item_list) {
item_plugins[i]->set_object(p_item_list);
property_editor->edit(item_plugins[i]);
- if (has_icon(item_list->get_type(), "EditorIcons"))
- toolbar_button->set_icon(get_icon(item_list->get_type(), "EditorIcons"));
+ if (has_icon(item_list->get_class(), "EditorIcons"))
+ toolbar_button->set_icon(get_icon(item_list->get_class(), "EditorIcons"));
else
toolbar_button->set_icon(Ref<Texture>());
@@ -287,9 +287,9 @@ bool ItemListEditor::handles(Object *p_object) const {
void ItemListEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_edit_items",&ItemListEditor::_edit_items);
- ObjectTypeDB::bind_method("_add_button",&ItemListEditor::_add_pressed);
- ObjectTypeDB::bind_method("_delete_button",&ItemListEditor::_delete_pressed);
+ ClassDB::bind_method("_edit_items",&ItemListEditor::_edit_items);
+ ClassDB::bind_method("_add_button",&ItemListEditor::_add_pressed);
+ ClassDB::bind_method("_delete_button",&ItemListEditor::_delete_pressed);
}
ItemListEditor::ItemListEditor() {
@@ -309,7 +309,7 @@ ItemListEditor::ItemListEditor() {
VBoxContainer *vbc = memnew( VBoxContainer );
dialog->add_child(vbc);
- dialog->set_child_rect(vbc);
+ //dialog->set_child_rect(vbc);
HBoxContainer *hbc = memnew( HBoxContainer );
hbc->set_h_size_flags(SIZE_EXPAND_FILL);
diff --git a/tools/editor/plugins/item_list_editor_plugin.h b/tools/editor/plugins/item_list_editor_plugin.h
index 95d316b199..74700d615e 100644
--- a/tools/editor/plugins/item_list_editor_plugin.h
+++ b/tools/editor/plugins/item_list_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -44,7 +44,7 @@
class ItemListPlugin : public Object {
- OBJ_TYPE(ItemListPlugin,Object);
+ GDCLASS(ItemListPlugin,Object);
protected:
@@ -100,7 +100,7 @@ public:
class ItemListOptionButtonPlugin : public ItemListPlugin {
- OBJ_TYPE(ItemListOptionButtonPlugin,ItemListPlugin);
+ GDCLASS(ItemListOptionButtonPlugin,ItemListPlugin);
OptionButton *ob;
public:
@@ -130,7 +130,7 @@ public:
class ItemListPopupMenuPlugin : public ItemListPlugin {
- OBJ_TYPE(ItemListPopupMenuPlugin,ItemListPlugin);
+ GDCLASS(ItemListPopupMenuPlugin,ItemListPlugin);
PopupMenu *pp;
public:
@@ -171,7 +171,7 @@ public:
class ItemListEditor : public HBoxContainer {
- OBJ_TYPE(ItemListEditor,HBoxContainer);
+ GDCLASS(ItemListEditor,HBoxContainer);
Node *item_list;
@@ -209,7 +209,7 @@ public:
class ItemListEditorPlugin : public EditorPlugin {
- OBJ_TYPE(ItemListEditorPlugin,EditorPlugin);
+ GDCLASS(ItemListEditorPlugin,EditorPlugin);
ItemListEditor *item_list_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp b/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp
index 56e58bc983..c468404f0f 100644
--- a/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/light_occluder_2d_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -102,7 +102,7 @@ void LightOccluder2DEditor::_wip_close(bool p_closed) {
edited_point=-1;
}
-bool LightOccluder2DEditor::forward_input_event(const InputEvent& p_event) {
+bool LightOccluder2DEditor::forward_gui_input(const InputEvent& p_event) {
if (!node)
@@ -132,7 +132,7 @@ bool LightOccluder2DEditor::forward_input_event(const InputEvent& p_event) {
Vector<Vector2> poly = Variant(node->get_occluder_polygon()->get_polygon());
//first check if a point is to be added (segment split)
- real_t grab_treshold=EDITOR_DEF("poly_editor/point_grab_radius",8);
+ real_t grab_treshold=EDITOR_DEF("editors/poly_editor/point_grab_radius",8);
switch(mode) {
@@ -427,10 +427,10 @@ void LightOccluder2DEditor::_create_poly() {
void LightOccluder2DEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_menu_option"),&LightOccluder2DEditor::_menu_option);
- ObjectTypeDB::bind_method(_MD("_canvas_draw"),&LightOccluder2DEditor::_canvas_draw);
- ObjectTypeDB::bind_method(_MD("_node_removed"),&LightOccluder2DEditor::_node_removed);
- ObjectTypeDB::bind_method(_MD("_create_poly"),&LightOccluder2DEditor::_create_poly);
+ ClassDB::bind_method(_MD("_menu_option"),&LightOccluder2DEditor::_menu_option);
+ ClassDB::bind_method(_MD("_canvas_draw"),&LightOccluder2DEditor::_canvas_draw);
+ ClassDB::bind_method(_MD("_node_removed"),&LightOccluder2DEditor::_node_removed);
+ ClassDB::bind_method(_MD("_create_poly"),&LightOccluder2DEditor::_create_poly);
}
@@ -468,7 +468,7 @@ LightOccluder2DEditor::LightOccluder2DEditor(EditorNode *p_editor) {
options->set_area_as_parent_rect();
options->set_text("Polygon");
//options->get_popup()->add_item("Parse BBCode",PARSE_BBCODE);
- options->get_popup()->connect("item_pressed", this,"_menu_option");
+ options->get_popup()->connect("id_pressed", this,"_menu_option");
#endif
mode = MODE_EDIT;
@@ -484,7 +484,7 @@ void LightOccluder2DEditorPlugin::edit(Object *p_object) {
bool LightOccluder2DEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("LightOccluder2D");
+ return p_object->is_class("LightOccluder2D");
}
void LightOccluder2DEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/light_occluder_2d_editor_plugin.h b/tools/editor/plugins/light_occluder_2d_editor_plugin.h
index 0176eb87dd..8f96e44df5 100644
--- a/tools/editor/plugins/light_occluder_2d_editor_plugin.h
+++ b/tools/editor/plugins/light_occluder_2d_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -44,7 +44,7 @@ class CanvasItemEditor;
class LightOccluder2DEditor : public HBoxContainer {
- OBJ_TYPE(LightOccluder2DEditor, HBoxContainer );
+ GDCLASS(LightOccluder2DEditor, HBoxContainer );
UndoRedo *undo_redo;
enum Mode {
@@ -85,21 +85,21 @@ protected:
public:
Vector2 snap_point(const Vector2& p_point) const;
- bool forward_input_event(const InputEvent& p_event);
+ bool forward_gui_input(const InputEvent& p_event);
void edit(Node *p_collision_polygon);
LightOccluder2DEditor(EditorNode *p_editor);
};
class LightOccluder2DEditorPlugin : public EditorPlugin {
- OBJ_TYPE( LightOccluder2DEditorPlugin, EditorPlugin );
+ GDCLASS( LightOccluder2DEditorPlugin, EditorPlugin );
LightOccluder2DEditor *collision_polygon_editor;
EditorNode *editor;
public:
- virtual bool forward_canvas_input_event(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return collision_polygon_editor->forward_input_event(p_event); }
+ virtual bool forward_canvas_gui_input(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return collision_polygon_editor->forward_gui_input(p_event); }
virtual String get_name() const { return "LightOccluder2D"; }
bool has_main_screen() const { return false; }
diff --git a/tools/editor/plugins/material_editor_plugin.cpp b/tools/editor/plugins/material_editor_plugin.cpp
index 876fab0d6e..d5ddd3804b 100644
--- a/tools/editor/plugins/material_editor_plugin.cpp
+++ b/tools/editor/plugins/material_editor_plugin.cpp
@@ -1,7 +1,9 @@
#include "material_editor_plugin.h"
#include "scene/main/viewport.h"
-void MaterialEditor::_input_event(InputEvent p_event) {
+#if 0
+
+void MaterialEditor::_gui_input(InputEvent p_event) {
}
@@ -91,8 +93,8 @@ void MaterialEditor::_button_pressed(Node* p_button) {
void MaterialEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_input_event"),&MaterialEditor::_input_event);
- ObjectTypeDB::bind_method(_MD("_button_pressed"),&MaterialEditor::_button_pressed);
+ ClassDB::bind_method(_MD("_gui_input"),&MaterialEditor::_gui_input);
+ ClassDB::bind_method(_MD("_button_pressed"),&MaterialEditor::_button_pressed);
}
@@ -127,8 +129,8 @@ MaterialEditor::MaterialEditor() {
viewport->add_child(box_instance);
Transform box_xform;
- box_xform.basis.rotate(Vector3(1,0,0),Math::deg2rad(-25));
- box_xform.basis = box_xform.basis * Matrix3().rotated(Vector3(0,1,0),Math::deg2rad(-25));
+ box_xform.basis.rotate(Vector3(1,0,0),Math::deg2rad(25));
+ box_xform.basis = box_xform.basis * Matrix3().rotated(Vector3(0,1,0),Math::deg2rad(25));
box_xform.basis.scale(Vector3(0.8,0.8,0.8));
box_instance->set_transform(box_xform);
@@ -141,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++) {
@@ -219,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);\
@@ -280,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);
@@ -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..556e56e66b 100644
--- a/tools/editor/plugins/material_editor_plugin.h
+++ b/tools/editor/plugins/material_editor_plugin.h
@@ -8,10 +8,10 @@
#include "scene/3d/mesh_instance.h"
#include "scene/3d/camera.h"
-
+#if 0
class MaterialEditor : public Control {
- OBJ_TYPE(MaterialEditor, Control);
+ GDCLASS(MaterialEditor, Control);
Viewport *viewport;
@@ -39,7 +39,7 @@ class MaterialEditor : public Control {
protected:
void _notification(int p_what);
- void _input_event(InputEvent p_event);
+ void _gui_input(InputEvent p_event);
static void _bind_methods();
public:
@@ -50,7 +50,7 @@ public:
class MaterialEditorPlugin : public EditorPlugin {
- OBJ_TYPE( MaterialEditorPlugin, EditorPlugin );
+ GDCLASS( MaterialEditorPlugin, EditorPlugin );
MaterialEditor *material_editor;
EditorNode *editor;
@@ -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..db96a60808 100644
--- a/tools/editor/plugins/mesh_editor_plugin.cpp
+++ b/tools/editor/plugins/mesh_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -28,7 +28,8 @@
/*************************************************************************/
#include "mesh_editor_plugin.h"
-void MeshEditor::_input_event(InputEvent p_event) {
+#if 0
+void MeshEditor::_gui_input(InputEvent p_event) {
if (p_event.type==InputEvent::MOUSE_MOTION && p_event.mouse_motion.button_mask&BUTTON_MASK_LEFT) {
@@ -81,8 +82,8 @@ void MeshEditor::_notification(int p_what) {
void MeshEditor::_update_rotation() {
Transform t;
- t.basis.rotate(Vector3(0, 1, 0), rot_y);
- t.basis.rotate(Vector3(1, 0, 0), rot_x);
+ t.basis.rotate(Vector3(0, 1, 0), -rot_y);
+ t.basis.rotate(Vector3(1, 0, 0), -rot_x);
mesh_instance->set_transform(t);
}
@@ -135,8 +136,8 @@ void MeshEditor::_button_pressed(Node* p_button) {
void MeshEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_input_event"),&MeshEditor::_input_event);
- ObjectTypeDB::bind_method(_MD("_button_pressed"),&MeshEditor::_button_pressed);
+ ClassDB::bind_method(_MD("_gui_input"),&MeshEditor::_gui_input);
+ ClassDB::bind_method(_MD("_button_pressed"),&MeshEditor::_button_pressed);
}
@@ -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..136290ffd4 100644
--- a/tools/editor/plugins/mesh_editor_plugin.h
+++ b/tools/editor/plugins/mesh_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -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"
@@ -38,7 +40,7 @@
class MeshEditor : public Control {
- OBJ_TYPE(MeshEditor, Control);
+ GDCLASS(MeshEditor, Control);
@@ -63,7 +65,7 @@ class MeshEditor : public Control {
void _update_rotation();
protected:
void _notification(int p_what);
- void _input_event(InputEvent p_event);
+ void _gui_input(InputEvent p_event);
static void _bind_methods();
public:
@@ -74,7 +76,7 @@ public:
class MeshEditorPlugin : public EditorPlugin {
- OBJ_TYPE( MeshEditorPlugin, EditorPlugin );
+ GDCLASS( MeshEditorPlugin, EditorPlugin );
MeshEditor *mesh_editor;
EditorNode *editor;
@@ -93,3 +95,4 @@ public:
};
#endif // MESH_EDITOR_PLUGIN_H
+#endif
diff --git a/tools/editor/plugins/mesh_instance_editor_plugin.cpp b/tools/editor/plugins/mesh_instance_editor_plugin.cpp
index c952feb1da..de29991057 100644
--- a/tools/editor/plugins/mesh_instance_editor_plugin.cpp
+++ b/tools/editor/plugins/mesh_instance_editor_plugin.cpp
@@ -189,7 +189,7 @@ void MeshInstanceEditor::_create_outline_mesh() {
return;
}
- Ref<Mesh> mesho = mesh->create_outline(outline_size->get_val());
+ Ref<Mesh> mesho = mesh->create_outline(outline_size->get_value());
if (mesho.is_null()) {
err_dialog->set_text(TTR("Could not create outline!"));
@@ -218,8 +218,8 @@ void MeshInstanceEditor::_create_outline_mesh() {
void MeshInstanceEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_menu_option",&MeshInstanceEditor::_menu_option);
- ObjectTypeDB::bind_method("_create_outline_mesh",&MeshInstanceEditor::_create_outline_mesh);
+ ClassDB::bind_method("_menu_option",&MeshInstanceEditor::_menu_option);
+ ClassDB::bind_method("_create_outline_mesh",&MeshInstanceEditor::_create_outline_mesh);
}
MeshInstanceEditor::MeshInstanceEditor() {
@@ -241,7 +241,7 @@ MeshInstanceEditor::MeshInstanceEditor() {
options->get_popup()->add_separator();
options->get_popup()->add_item(TTR("Create Outline Mesh.."),MENU_OPTION_CREATE_OUTLINE_MESH);
- options->get_popup()->connect("item_pressed", this,"_menu_option");
+ options->get_popup()->connect("id_pressed", this,"_menu_option");
outline_dialog = memnew( ConfirmationDialog );
outline_dialog->set_title(TTR("Create Outline Mesh"));
@@ -249,13 +249,13 @@ MeshInstanceEditor::MeshInstanceEditor() {
VBoxContainer *outline_dialog_vbc = memnew( VBoxContainer );
outline_dialog->add_child(outline_dialog_vbc);
- outline_dialog->set_child_rect(outline_dialog_vbc);
+ //outline_dialog->set_child_rect(outline_dialog_vbc);
outline_size = memnew( SpinBox );
outline_size->set_min(0.001);
outline_size->set_max(1024);
outline_size->set_step(0.001);
- outline_size->set_val(0.05);
+ outline_size->set_value(0.05);
outline_dialog_vbc->add_margin_child(TTR("Outline Size:"),outline_size);
add_child(outline_dialog);
@@ -274,7 +274,7 @@ void MeshInstanceEditorPlugin::edit(Object *p_object) {
bool MeshInstanceEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("MeshInstance");
+ return p_object->is_class("MeshInstance");
}
void MeshInstanceEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/mesh_instance_editor_plugin.h b/tools/editor/plugins/mesh_instance_editor_plugin.h
index a698cf382f..23dcbfc9b1 100644
--- a/tools/editor/plugins/mesh_instance_editor_plugin.h
+++ b/tools/editor/plugins/mesh_instance_editor_plugin.h
@@ -10,7 +10,7 @@
class MeshInstanceEditor : public Node {
- OBJ_TYPE(MeshInstanceEditor, Node );
+ GDCLASS(MeshInstanceEditor, Node );
enum Menu {
@@ -48,7 +48,7 @@ public:
class MeshInstanceEditorPlugin : public EditorPlugin {
- OBJ_TYPE( MeshInstanceEditorPlugin, EditorPlugin );
+ GDCLASS( MeshInstanceEditorPlugin, EditorPlugin );
MeshInstanceEditor *mesh_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/multimesh_editor_plugin.cpp b/tools/editor/plugins/multimesh_editor_plugin.cpp
index 8a0c6b3fe8..b27a66c5f5 100644
--- a/tools/editor/plugins/multimesh_editor_plugin.cpp
+++ b/tools/editor/plugins/multimesh_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -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();
@@ -193,22 +193,24 @@ void MultiMeshEditor::_populate() {
Ref<MultiMesh> multimesh = memnew( MultiMesh );
multimesh->set_mesh(mesh);
- int instance_count=populate_amount->get_val();
+ int instance_count=populate_amount->get_value();
+ multimesh->set_transform_format(MultiMesh::TRANSFORM_3D);
+ multimesh->set_color_format(MultiMesh::COLOR_NONE);
multimesh->set_instance_count(instance_count);
- float _tilt_random = populate_tilt_random->get_val();
- float _rotate_random = populate_rotate_random->get_val();
- float _scale_random = populate_scale_random->get_val();
- float _scale = populate_scale->get_val();
+ float _tilt_random = populate_tilt_random->get_value();
+ float _rotate_random = populate_rotate_random->get_value();
+ float _scale_random = populate_scale_random->get_value();
+ float _scale = populate_scale->get_value();
int axis = populate_axis->get_selected();
Transform axis_xform;
if (axis==Vector3::AXIS_Z) {
- axis_xform.rotate(Vector3(1,0,0),Math_PI*0.5);
+ axis_xform.rotate(Vector3(1,0,0),-Math_PI*0.5);
}
if (axis==Vector3::AXIS_X) {
- axis_xform.rotate(Vector3(0,0,1),Math_PI*0.5);
+ axis_xform.rotate(Vector3(0,0,1),-Math_PI*0.5);
}
for(int i=0;i<instance_count;i++) {
@@ -236,9 +238,9 @@ void MultiMeshEditor::_populate() {
Matrix3 post_xform;
- post_xform.rotate(xform.basis.get_axis(0),Math::random(-_tilt_random,_tilt_random)*Math_PI);
- post_xform.rotate(xform.basis.get_axis(2),Math::random(-_tilt_random,_tilt_random)*Math_PI);
- post_xform.rotate(xform.basis.get_axis(1),Math::random(-_rotate_random,_rotate_random)*Math_PI);
+ post_xform.rotate(xform.basis.get_axis(0),-Math::random(-_tilt_random,_tilt_random)*Math_PI);
+ post_xform.rotate(xform.basis.get_axis(2),-Math::random(-_tilt_random,_tilt_random)*Math_PI);
+ post_xform.rotate(xform.basis.get_axis(1),-Math::random(-_rotate_random,_rotate_random)*Math_PI);
xform.basis = post_xform * xform.basis;
//xform.basis.orthonormalize();
@@ -247,10 +249,10 @@ void MultiMeshEditor::_populate() {
multimesh->set_instance_transform(i,xform);
- multimesh->set_instance_color(i,Color(1,1,1,1));
+
}
- multimesh->generate_aabb();
+
node->set_multimesh(multimesh);
@@ -281,11 +283,11 @@ void MultiMeshEditor::_menu_option(int p_option) {
surface_source->set_text("..");
mesh_source->set_text("..");
populate_axis->select(1);
- populate_rotate_random->set_val(0);
- populate_tilt_random->set_val(0);
- populate_scale_random->set_val(0);
- populate_scale->set_val(1);
- populate_amount->set_val(128);
+ populate_rotate_random->set_value(0);
+ populate_tilt_random->set_value(0);
+ populate_scale_random->set_value(0);
+ populate_scale->set_value(1);
+ populate_amount->set_value(128);
_last_pp_node=node;
}
@@ -315,10 +317,10 @@ void MultiMeshEditor::_browse(bool p_source) {
void MultiMeshEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_menu_option",&MultiMeshEditor::_menu_option);
- ObjectTypeDB::bind_method("_populate",&MultiMeshEditor::_populate);
- ObjectTypeDB::bind_method("_browsed",&MultiMeshEditor::_browsed);
- ObjectTypeDB::bind_method("_browse",&MultiMeshEditor::_browse);
+ ClassDB::bind_method("_menu_option",&MultiMeshEditor::_menu_option);
+ ClassDB::bind_method("_populate",&MultiMeshEditor::_populate);
+ ClassDB::bind_method("_browsed",&MultiMeshEditor::_browsed);
+ ClassDB::bind_method("_browse",&MultiMeshEditor::_browse);
}
MultiMeshEditor::MultiMeshEditor() {
@@ -331,7 +333,7 @@ MultiMeshEditor::MultiMeshEditor() {
options->set_icon(EditorNode::get_singleton()->get_gui_base()->get_icon("MultiMeshInstance","EditorIcons"));
options->get_popup()->add_item(TTR("Populate Surface"));
- options->get_popup()->connect("item_pressed", this,"_menu_option");
+ options->get_popup()->connect("id_pressed", this,"_menu_option");
populate_dialog = memnew( ConfirmationDialog );
populate_dialog->set_title(TTR("Populate MultiMesh"));
@@ -339,7 +341,7 @@ MultiMeshEditor::MultiMeshEditor() {
VBoxContainer *vbc = memnew( VBoxContainer );
populate_dialog->add_child(vbc);
- populate_dialog->set_child_rect(vbc);
+ //populate_dialog->set_child_rect(vbc);
HBoxContainer *hbc = memnew( HBoxContainer );
@@ -385,14 +387,16 @@ MultiMeshEditor::MultiMeshEditor() {
populate_scale_random = memnew( SpinBox );
populate_scale_random->set_min(0);
populate_scale_random->set_max(1);
- populate_scale_random->set_val(0);
+ populate_scale_random->set_value(0);
+ populate_scale_random->set_step(0.01);
vbc->add_margin_child(TTR("Random Scale:"),populate_scale_random);
populate_scale = memnew( SpinBox );
populate_scale->set_min(0.001);
populate_scale->set_max(4096);
- populate_scale->set_val(1);
+ populate_scale->set_value(1);
+ populate_scale->set_step(0.01);
vbc->add_margin_child(TTR("Scale:"),populate_scale);
@@ -403,7 +407,7 @@ MultiMeshEditor::MultiMeshEditor() {
populate_amount->set_end( Point2(5,237));
populate_amount->set_min(1);
populate_amount->set_max(65536);
- populate_amount->set_val(128);
+ populate_amount->set_value(128);
vbc->add_margin_child(TTR("Amount:"),populate_amount);
populate_dialog->get_ok()->set_text(TTR("Populate"));
@@ -427,7 +431,7 @@ void MultiMeshEditorPlugin::edit(Object *p_object) {
bool MultiMeshEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("MultiMeshInstance");
+ return p_object->is_class("MultiMeshInstance");
}
void MultiMeshEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/multimesh_editor_plugin.h b/tools/editor/plugins/multimesh_editor_plugin.h
index 245da1eeb7..e322850238 100644
--- a/tools/editor/plugins/multimesh_editor_plugin.h
+++ b/tools/editor/plugins/multimesh_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -40,7 +40,7 @@
class MultiMeshEditor : public Control {
- OBJ_TYPE(MultiMeshEditor, Control );
+ GDCLASS(MultiMeshEditor, Control );
friend class MultiMeshEditorPlugin;
@@ -86,7 +86,7 @@ public:
class MultiMeshEditorPlugin : public EditorPlugin {
- OBJ_TYPE( MultiMeshEditorPlugin, EditorPlugin );
+ GDCLASS( MultiMeshEditorPlugin, EditorPlugin );
MultiMeshEditor *multimesh_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/navigation_polygon_editor_plugin.cpp b/tools/editor/plugins/navigation_polygon_editor_plugin.cpp
index 22546c72f3..cefab98e6d 100644
--- a/tools/editor/plugins/navigation_polygon_editor_plugin.cpp
+++ b/tools/editor/plugins/navigation_polygon_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -116,7 +116,7 @@ void NavigationPolygonEditor::_wip_close() {
edited_point=-1;
}
-bool NavigationPolygonEditor::forward_input_event(const InputEvent& p_event) {
+bool NavigationPolygonEditor::forward_gui_input(const InputEvent& p_event) {
if (!node)
@@ -148,7 +148,7 @@ bool NavigationPolygonEditor::forward_input_event(const InputEvent& p_event) {
//first check if a point is to be added (segment split)
- real_t grab_treshold=EDITOR_DEF("poly_editor/point_grab_radius",8);
+ real_t grab_treshold=EDITOR_DEF("editors/poly_editor/point_grab_radius",8);
switch(mode) {
@@ -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)"));
@@ -477,10 +477,10 @@ void NavigationPolygonEditor::edit(Node *p_collision_polygon) {
void NavigationPolygonEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_menu_option"),&NavigationPolygonEditor::_menu_option);
- ObjectTypeDB::bind_method(_MD("_canvas_draw"),&NavigationPolygonEditor::_canvas_draw);
- ObjectTypeDB::bind_method(_MD("_node_removed"),&NavigationPolygonEditor::_node_removed);
- ObjectTypeDB::bind_method(_MD("_create_nav"),&NavigationPolygonEditor::_create_nav);
+ ClassDB::bind_method(_MD("_menu_option"),&NavigationPolygonEditor::_menu_option);
+ ClassDB::bind_method(_MD("_canvas_draw"),&NavigationPolygonEditor::_canvas_draw);
+ ClassDB::bind_method(_MD("_node_removed"),&NavigationPolygonEditor::_node_removed);
+ ClassDB::bind_method(_MD("_create_nav"),&NavigationPolygonEditor::_create_nav);
}
@@ -515,7 +515,7 @@ NavigationPolygonEditor::NavigationPolygonEditor(EditorNode *p_editor) {
options->set_area_as_parent_rect();
options->set_text("Polygon");
//options->get_popup()->add_item("Parse BBCode",PARSE_BBCODE);
- options->get_popup()->connect("item_pressed", this,"_menu_option");
+ options->get_popup()->connect("id_pressed", this,"_menu_option");
#endif
mode = MODE_EDIT;
@@ -532,7 +532,7 @@ void NavigationPolygonEditorPlugin::edit(Object *p_object) {
bool NavigationPolygonEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("NavigationPolygonInstance");
+ return p_object->is_class("NavigationPolygonInstance");
}
void NavigationPolygonEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/navigation_polygon_editor_plugin.h b/tools/editor/plugins/navigation_polygon_editor_plugin.h
index defdebbec2..d3e56de042 100644
--- a/tools/editor/plugins/navigation_polygon_editor_plugin.h
+++ b/tools/editor/plugins/navigation_polygon_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -44,7 +44,7 @@ class CanvasItemEditor;
class NavigationPolygonEditor : public HBoxContainer {
- OBJ_TYPE(NavigationPolygonEditor, HBoxContainer );
+ GDCLASS(NavigationPolygonEditor, HBoxContainer );
UndoRedo *undo_redo;
enum Mode {
@@ -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;
@@ -87,21 +87,21 @@ protected:
static void _bind_methods();
public:
- bool forward_input_event(const InputEvent& p_event);
+ bool forward_gui_input(const InputEvent& p_event);
void edit(Node *p_collision_polygon);
NavigationPolygonEditor(EditorNode *p_editor);
};
class NavigationPolygonEditorPlugin : public EditorPlugin {
- OBJ_TYPE( NavigationPolygonEditorPlugin, EditorPlugin );
+ GDCLASS( NavigationPolygonEditorPlugin, EditorPlugin );
NavigationPolygonEditor *collision_polygon_editor;
EditorNode *editor;
public:
- virtual bool forward_canvas_input_event(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return collision_polygon_editor->forward_input_event(p_event); }
+ virtual bool forward_canvas_gui_input(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return collision_polygon_editor->forward_gui_input(p_event); }
virtual String get_name() const { return "NavigationPolygonInstance"; }
bool has_main_screen() const { return false; }
diff --git a/tools/editor/plugins/particles_2d_editor_plugin.cpp b/tools/editor/plugins/particles_2d_editor_plugin.cpp
index ce25f34c1f..331a958518 100644
--- a/tools/editor/plugins/particles_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/particles_2d_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -43,7 +43,7 @@ void Particles2DEditorPlugin::edit(Object *p_object) {
bool Particles2DEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("Particles2D");
+ return p_object->is_class("Particles2D");
}
void Particles2DEditorPlugin::make_visible(bool p_visible) {
@@ -62,20 +62,20 @@ void Particles2DEditorPlugin::_file_selected(const String& p_file) {
print_line("file: "+p_file);
- int epc=epoints->get_val();
+ int epc=epoints->get_value();
Image img;
Error err = ImageLoader::load_image(p_file,&img);
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);
- 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;
@@ -144,7 +144,7 @@ void Particles2DEditorPlugin::_notification(int p_what) {
if (p_what==NOTIFICATION_ENTER_TREE) {
- menu->get_popup()->connect("item_pressed",this,"_menu_callback");
+ menu->get_popup()->connect("id_pressed",this,"_menu_callback");
menu->set_icon(menu->get_popup()->get_icon("Particles2D","EditorIcons"));
file->connect("file_selected",this,"_file_selected");
}
@@ -152,8 +152,8 @@ void Particles2DEditorPlugin::_notification(int p_what) {
void Particles2DEditorPlugin::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_menu_callback"),&Particles2DEditorPlugin::_menu_callback);
- ObjectTypeDB::bind_method(_MD("_file_selected"),&Particles2DEditorPlugin::_file_selected);
+ ClassDB::bind_method(_MD("_menu_callback"),&Particles2DEditorPlugin::_menu_callback);
+ ClassDB::bind_method(_MD("_file_selected"),&Particles2DEditorPlugin::_file_selected);
}
@@ -189,7 +189,7 @@ Particles2DEditorPlugin::Particles2DEditorPlugin(EditorNode *p_node) {
epoints->set_min(1);
epoints->set_max(8192);
epoints->set_step(1);
- epoints->set_val(512);
+ epoints->set_value(512);
file->get_vbox()->add_margin_child(TTR("Generated Point Count:"),epoints);
}
diff --git a/tools/editor/plugins/particles_2d_editor_plugin.h b/tools/editor/plugins/particles_2d_editor_plugin.h
index ce2056b482..c532a5fe73 100644
--- a/tools/editor/plugins/particles_2d_editor_plugin.h
+++ b/tools/editor/plugins/particles_2d_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -39,7 +39,7 @@
class Particles2DEditorPlugin : public EditorPlugin {
- OBJ_TYPE( Particles2DEditorPlugin, EditorPlugin );
+ GDCLASS( Particles2DEditorPlugin, EditorPlugin );
enum {
diff --git a/tools/editor/plugins/particles_editor_plugin.cpp b/tools/editor/plugins/particles_editor_plugin.cpp
index 7e20cc3f54..382dc29c61 100644
--- a/tools/editor/plugins/particles_editor_plugin.cpp
+++ b/tools/editor/plugins/particles_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -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"
@@ -75,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++) {
@@ -85,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));
}
@@ -200,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) {
@@ -254,7 +256,7 @@ void ParticlesEditor::_generate_emission_points() {
return;
}
- DVector<Face3>::Read r = geometry.read();
+ PoolVector<Face3>::Read r = geometry.read();
AABB aabb;
@@ -330,12 +332,12 @@ void ParticlesEditor::_generate_emission_points() {
void ParticlesEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_menu_option",&ParticlesEditor::_menu_option);
- ObjectTypeDB::bind_method("_resource_seleted",&ParticlesEditor::_resource_seleted);
- ObjectTypeDB::bind_method("_node_selected",&ParticlesEditor::_node_selected);
- ObjectTypeDB::bind_method("_generate_emission_points",&ParticlesEditor::_generate_emission_points);
+ ClassDB::bind_method("_menu_option",&ParticlesEditor::_menu_option);
+ ClassDB::bind_method("_resource_seleted",&ParticlesEditor::_resource_seleted);
+ ClassDB::bind_method("_node_selected",&ParticlesEditor::_node_selected);
+ ClassDB::bind_method("_generate_emission_points",&ParticlesEditor::_generate_emission_points);
- //ObjectTypeDB::bind_method("_populate",&ParticlesEditor::_populate);
+ //ClassDB::bind_method("_populate",&ParticlesEditor::_populate);
}
@@ -354,7 +356,7 @@ ParticlesEditor::ParticlesEditor() {
options->get_popup()->add_item(TTR("Create Emitter From Node"),MENU_OPTION_CREATE_EMISSION_VOLUME_FROM_NODE);
options->get_popup()->add_item(TTR("Clear Emitter"),MENU_OPTION_CLEAR_EMISSION_VOLUME);
- options->get_popup()->connect("item_pressed", this,"_menu_option");
+ options->get_popup()->connect("id_pressed", this,"_menu_option");
emission_dialog = memnew( ConfirmationDialog );
emission_dialog->set_title(TTR("Create Emitter"));
@@ -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..c32fbe5ada 100644
--- a/tools/editor/plugins/particles_editor_plugin.h
+++ b/tools/editor/plugins/particles_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -37,10 +37,10 @@
/**
@author Juan Linietsky <reduzio@gmail.com>
*/
-
+#if 0
class ParticlesEditor : public Control {
- OBJ_TYPE(ParticlesEditor, Control );
+ GDCLASS(ParticlesEditor, Control );
Panel *panel;
MenuButton *options;
@@ -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);
@@ -94,7 +94,7 @@ public:
class ParticlesEditorPlugin : public EditorPlugin {
- OBJ_TYPE( ParticlesEditorPlugin, EditorPlugin );
+ GDCLASS( ParticlesEditorPlugin, EditorPlugin );
ParticlesEditor *particles_editor;
EditorNode *editor;
@@ -113,3 +113,4 @@ public:
};
#endif // PARTICLES_EDITOR_PLUGIN_H
+#endif
diff --git a/tools/editor/plugins/path_2d_editor_plugin.cpp b/tools/editor/plugins/path_2d_editor_plugin.cpp
index 95f330a1d5..4e3a0ab720 100644
--- a/tools/editor/plugins/path_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/path_2d_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -62,7 +62,7 @@ void Path2DEditor::_node_removed(Node *p_node) {
}
-bool Path2DEditor::forward_input_event(const InputEvent& p_event) {
+bool Path2DEditor::forward_gui_input(const InputEvent& p_event) {
if (!node)
return false;
@@ -86,7 +86,7 @@ bool Path2DEditor::forward_input_event(const InputEvent& p_event) {
: node->get_global_transform().affine_inverse().xform( canvas_item_editor->snap_point(canvas_item_editor->get_canvas_transform().affine_inverse().xform(gpoint)) );
//first check if a point is to be added (segment split)
- real_t grab_treshold=EDITOR_DEF("poly_editor/point_grab_radius",8);
+ real_t grab_treshold=EDITOR_DEF("editors/poly_editor/point_grab_radius",8);
@@ -550,10 +550,10 @@ void Path2DEditor::edit(Node *p_path2d) {
void Path2DEditor::_bind_methods() {
- //ObjectTypeDB::bind_method(_MD("_menu_option"),&Path2DEditor::_menu_option);
- ObjectTypeDB::bind_method(_MD("_canvas_draw"),&Path2DEditor::_canvas_draw);
- ObjectTypeDB::bind_method(_MD("_node_visibility_changed"),&Path2DEditor::_node_visibility_changed);
- ObjectTypeDB::bind_method(_MD("_mode_selected"),&Path2DEditor::_mode_selected);
+ //ClassDB::bind_method(_MD("_menu_option"),&Path2DEditor::_menu_option);
+ ClassDB::bind_method(_MD("_canvas_draw"),&Path2DEditor::_canvas_draw);
+ ClassDB::bind_method(_MD("_node_visibility_changed"),&Path2DEditor::_node_visibility_changed);
+ ClassDB::bind_method(_MD("_mode_selected"),&Path2DEditor::_mode_selected);
}
void Path2DEditor::_mode_selected(int p_mode) {
@@ -624,7 +624,7 @@ Path2DEditor::Path2DEditor(EditorNode *p_editor) {
options->set_area_as_parent_rect();
options->set_text("Polygon");
//options->get_popup()->add_item("Parse BBCode",PARSE_BBCODE);
- options->get_popup()->connect("item_pressed", this,"_menu_option");
+ options->get_popup()->connect("id_pressed", this,"_menu_option");
#endif
base_hb = memnew( HBoxContainer );
@@ -683,7 +683,7 @@ void Path2DEditorPlugin::edit(Object *p_object) {
bool Path2DEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("Path2D");
+ return p_object->is_class("Path2D");
}
void Path2DEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/path_2d_editor_plugin.h b/tools/editor/plugins/path_2d_editor_plugin.h
index acbc481e09..407d07905f 100644
--- a/tools/editor/plugins/path_2d_editor_plugin.h
+++ b/tools/editor/plugins/path_2d_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -42,7 +42,7 @@ class CanvasItemEditor;
class Path2DEditor : public HBoxContainer {
- OBJ_TYPE(Path2DEditor, HBoxContainer);
+ GDCLASS(Path2DEditor, HBoxContainer);
UndoRedo *undo_redo;
@@ -94,21 +94,21 @@ protected:
static void _bind_methods();
public:
- bool forward_input_event(const InputEvent& p_event);
+ bool forward_gui_input(const InputEvent& p_event);
void edit(Node *p_path2d);
Path2DEditor(EditorNode *p_editor);
};
class Path2DEditorPlugin : public EditorPlugin {
- OBJ_TYPE( Path2DEditorPlugin, EditorPlugin );
+ GDCLASS( Path2DEditorPlugin, EditorPlugin );
Path2DEditor *path2d_editor;
EditorNode *editor;
public:
- virtual bool forward_canvas_input_event(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return path2d_editor->forward_input_event(p_event); }
+ virtual bool forward_canvas_gui_input(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return path2d_editor->forward_gui_input(p_event); }
virtual String get_name() const { return "Path2D"; }
bool has_main_screen() const { return false; }
diff --git a/tools/editor/plugins/path_editor_plugin.cpp b/tools/editor/plugins/path_editor_plugin.cpp
index 258e92dc41..a69de2e78d 100644
--- a/tools/editor/plugins/path_editor_plugin.cpp
+++ b/tools/editor/plugins/path_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -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();
@@ -284,7 +285,7 @@ Ref<SpatialEditorGizmo> PathEditorPlugin::create_spatial_gizmo(Spatial* p_spatia
return Ref<SpatialEditorGizmo>();
}
-bool PathEditorPlugin::forward_spatial_input_event(Camera* p_camera,const InputEvent& p_event) {
+bool PathEditorPlugin::forward_spatial_gui_input(Camera* p_camera,const InputEvent& p_event) {
if (!path)
return false;
@@ -515,8 +516,8 @@ void PathEditorPlugin::_notification(int p_what) {
void PathEditorPlugin::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_mode_changed"),&PathEditorPlugin::_mode_changed);
- ObjectTypeDB::bind_method(_MD("_close_curve"),&PathEditorPlugin::_close_curve);
+ ClassDB::bind_method(_MD("_mode_changed"),&PathEditorPlugin::_mode_changed);
+ ClassDB::bind_method(_MD("_close_curve"),&PathEditorPlugin::_close_curve);
}
PathEditorPlugin* PathEditorPlugin::singleton=NULL;
@@ -528,16 +529,16 @@ PathEditorPlugin::PathEditorPlugin(EditorNode *p_node) {
editor=p_node;
singleton=this;
- path_material = Ref<FixedMaterial>( memnew( FixedMaterial ));
- path_material->set_parameter( FixedMaterial::PARAM_DIFFUSE,Color(0.5,0.5,1.0,0.8) );
- path_material->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA, true);
+ path_material = Ref<FixedSpatialMaterial>( memnew( FixedSpatialMaterial ));
+ path_material->set_parameter( FixedSpatialMaterial::PARAM_DIFFUSE,Color(0.5,0.5,1.0,0.8) );
+ path_material->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_ALPHA, true);
path_material->set_line_width(3);
path_material->set_flag(Material::FLAG_DOUBLE_SIDED,true);
path_material->set_flag(Material::FLAG_UNSHADED,true);
- path_thin_material = Ref<FixedMaterial>( memnew( FixedMaterial ));
- path_thin_material->set_parameter( FixedMaterial::PARAM_DIFFUSE,Color(0.5,0.5,1.0,0.4) );
- path_thin_material->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA, true);
+ path_thin_material = Ref<FixedSpatialMaterial>( memnew( FixedSpatialMaterial ));
+ path_thin_material->set_parameter( FixedSpatialMaterial::PARAM_DIFFUSE,Color(0.5,0.5,1.0,0.4) );
+ path_thin_material->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_ALPHA, true);
path_thin_material->set_line_width(1);
path_thin_material->set_flag(Material::FLAG_DOUBLE_SIDED,true);
path_thin_material->set_flag(Material::FLAG_UNSHADED,true);
@@ -599,3 +600,4 @@ PathEditorPlugin::~PathEditorPlugin()
{
}
+#endif
diff --git a/tools/editor/plugins/path_editor_plugin.h b/tools/editor/plugins/path_editor_plugin.h
index 0afd957af7..e446dfa7c7 100644
--- a/tools/editor/plugins/path_editor_plugin.h
+++ b/tools/editor/plugins/path_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -32,9 +32,10 @@
#include "tools/editor/spatial_editor_gizmos.h"
#include "scene/3d/path.h"
+# if 0
class PathSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(PathSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(PathSpatialGizmo,EditorSpatialGizmo);
Path* path;
mutable Vector3 original;
@@ -53,7 +54,7 @@ public:
class PathEditorPlugin : public EditorPlugin {
- OBJ_TYPE( PathEditorPlugin, EditorPlugin );
+ GDCLASS( PathEditorPlugin, EditorPlugin );
Separator *sep;
@@ -78,11 +79,11 @@ public:
Path *get_edited_path() { return path; }
static PathEditorPlugin* singleton;
- Ref<FixedMaterial> path_material;
- Ref<FixedMaterial> path_thin_material;
- virtual bool forward_spatial_input_event(Camera* p_camera,const InputEvent& p_event);
+ Ref<FixedSpatialMaterial> path_material;
+ Ref<FixedSpatialMaterial> path_thin_material;
+ virtual bool forward_spatial_gui_input(Camera* p_camera,const InputEvent& p_event);
-// virtual bool forward_input_event(const InputEvent& p_event) { return collision_polygon_editor->forward_input_event(p_event); }
+// virtual bool forward_gui_input(const InputEvent& p_event) { return collision_polygon_editor->forward_gui_input(p_event); }
virtual Ref<SpatialEditorGizmo> create_spatial_gizmo(Spatial* p_spatial);
virtual String get_name() const { return "Path"; }
bool has_main_screen() const { return false; }
@@ -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..ebff3f3130 100644
--- a/tools/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/tools/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -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");
@@ -216,7 +216,7 @@ void Polygon2DEditor::_wip_close() {
edited_point=-1;
}
-bool Polygon2DEditor::forward_input_event(const InputEvent& p_event) {
+bool Polygon2DEditor::forward_gui_input(const InputEvent& p_event) {
if (node==NULL)
return false;
@@ -239,7 +239,7 @@ bool Polygon2DEditor::forward_input_event(const InputEvent& p_event) {
Vector<Vector2> poly = Variant(node->get_polygon());
//first check if a point is to be added (segment split)
- real_t grab_treshold=EDITOR_DEF("poly_editor/point_grab_radius",8);
+ real_t grab_treshold=EDITOR_DEF("editors/poly_editor/point_grab_radius",8);
switch(mode) {
@@ -567,10 +567,10 @@ void Polygon2DEditor::_uv_input(const InputEvent& p_input) {
} else if (mb.button_index==BUTTON_WHEEL_UP && mb.pressed) {
- uv_zoom->set_val( uv_zoom->get_val()/0.9 );
+ uv_zoom->set_value( uv_zoom->get_value()/0.9 );
} else if (mb.button_index==BUTTON_WHEEL_DOWN && mb.pressed) {
- uv_zoom->set_val( uv_zoom->get_val()*0.9);
+ uv_zoom->set_value( uv_zoom->get_value()*0.9);
}
} else if (p_input.type==InputEvent::MOUSE_MOTION) {
@@ -580,8 +580,8 @@ void Polygon2DEditor::_uv_input(const InputEvent& p_input) {
if (mm.button_mask&BUTTON_MASK_MIDDLE || Input::get_singleton()->is_key_pressed(KEY_SPACE)) {
Vector2 drag(mm.relative_x,mm.relative_y);
- uv_hscroll->set_val( uv_hscroll->get_val()-drag.x );
- uv_vscroll->set_val( uv_vscroll->get_val()-drag.y );
+ uv_hscroll->set_value( uv_hscroll->get_value()-drag.x );
+ uv_vscroll->set_value( uv_vscroll->get_value()-drag.y );
} else if (uv_drag) {
@@ -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];
@@ -668,9 +668,9 @@ void Polygon2DEditor::_uv_scroll_changed(float) {
if (updating_uv_scroll)
return;
- uv_draw_ofs.x=uv_hscroll->get_val();
- uv_draw_ofs.y=uv_vscroll->get_val();
- uv_draw_zoom=uv_zoom->get_val();
+ uv_draw_ofs.x=uv_hscroll->get_value();
+ uv_draw_ofs.y=uv_vscroll->get_value();
+ uv_draw_zoom=uv_zoom->get_value();
uv_edit_draw->update();
}
@@ -684,7 +684,6 @@ void Polygon2DEditor::_uv_draw() {
mtx.elements[2]=-uv_draw_ofs;
mtx.scale_basis(Vector2(uv_draw_zoom,uv_draw_zoom));
- VS::get_singleton()->canvas_item_set_clip(uv_edit_draw->get_canvas_item(),true);
VS::get_singleton()->canvas_item_add_set_transform(uv_edit_draw->get_canvas_item(),mtx);
uv_edit_draw->draw_texture(base_tex,Point2());
VS::get_singleton()->canvas_item_add_set_transform(uv_edit_draw->get_canvas_item(),Matrix32());
@@ -716,7 +715,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()));
@@ -735,13 +734,13 @@ void Polygon2DEditor::_uv_draw() {
uv_hscroll->set_min(rect.pos.x);
uv_hscroll->set_max(rect.pos.x+rect.size.x);
uv_hscroll->set_page(uv_edit_draw->get_size().x);
- uv_hscroll->set_val(uv_draw_ofs.x);
+ uv_hscroll->set_value(uv_draw_ofs.x);
uv_hscroll->set_step(0.001);
uv_vscroll->set_min(rect.pos.y);
uv_vscroll->set_max(rect.pos.y+rect.size.y);
uv_vscroll->set_page(uv_edit_draw->get_size().y);
- uv_vscroll->set_val(uv_draw_ofs.y);
+ uv_vscroll->set_value(uv_draw_ofs.y);
uv_vscroll->set_step(0.001);
updating_uv_scroll=false;
@@ -776,19 +775,19 @@ void Polygon2DEditor::edit(Node *p_collision_polygon) {
void Polygon2DEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_menu_option"),&Polygon2DEditor::_menu_option);
- ObjectTypeDB::bind_method(_MD("_canvas_draw"),&Polygon2DEditor::_canvas_draw);
- ObjectTypeDB::bind_method(_MD("_uv_mode"),&Polygon2DEditor::_uv_mode);
- ObjectTypeDB::bind_method(_MD("_uv_draw"),&Polygon2DEditor::_uv_draw);
- ObjectTypeDB::bind_method(_MD("_uv_input"),&Polygon2DEditor::_uv_input);
- ObjectTypeDB::bind_method(_MD("_uv_scroll_changed"),&Polygon2DEditor::_uv_scroll_changed);
- ObjectTypeDB::bind_method(_MD("_node_removed"),&Polygon2DEditor::_node_removed);
- ObjectTypeDB::bind_method(_MD("_set_use_snap"),&Polygon2DEditor::_set_use_snap);
- ObjectTypeDB::bind_method(_MD("_set_show_grid"),&Polygon2DEditor::_set_show_grid);
- ObjectTypeDB::bind_method(_MD("_set_snap_off_x"),&Polygon2DEditor::_set_snap_off_x);
- ObjectTypeDB::bind_method(_MD("_set_snap_off_y"),&Polygon2DEditor::_set_snap_off_y);
- ObjectTypeDB::bind_method(_MD("_set_snap_step_x"),&Polygon2DEditor::_set_snap_step_x);
- ObjectTypeDB::bind_method(_MD("_set_snap_step_y"),&Polygon2DEditor::_set_snap_step_y);
+ ClassDB::bind_method(_MD("_menu_option"),&Polygon2DEditor::_menu_option);
+ ClassDB::bind_method(_MD("_canvas_draw"),&Polygon2DEditor::_canvas_draw);
+ ClassDB::bind_method(_MD("_uv_mode"),&Polygon2DEditor::_uv_mode);
+ ClassDB::bind_method(_MD("_uv_draw"),&Polygon2DEditor::_uv_draw);
+ ClassDB::bind_method(_MD("_uv_input"),&Polygon2DEditor::_uv_input);
+ ClassDB::bind_method(_MD("_uv_scroll_changed"),&Polygon2DEditor::_uv_scroll_changed);
+ ClassDB::bind_method(_MD("_node_removed"),&Polygon2DEditor::_node_removed);
+ ClassDB::bind_method(_MD("_set_use_snap"),&Polygon2DEditor::_set_use_snap);
+ ClassDB::bind_method(_MD("_set_show_grid"),&Polygon2DEditor::_set_show_grid);
+ ClassDB::bind_method(_MD("_set_snap_off_x"),&Polygon2DEditor::_set_snap_off_x);
+ ClassDB::bind_method(_MD("_set_snap_off_y"),&Polygon2DEditor::_set_snap_off_y);
+ ClassDB::bind_method(_MD("_set_snap_step_x"),&Polygon2DEditor::_set_snap_step_x);
+ ClassDB::bind_method(_MD("_set_snap_step_y"),&Polygon2DEditor::_set_snap_step_y);
}
@@ -840,7 +839,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
options->set_area_as_parent_rect();
options->set_text("Polygon");
//options->get_popup()->add_item("Parse BBCode",PARSE_BBCODE);
- options->get_popup()->connect("item_pressed", this,"_menu_option");
+ options->get_popup()->connect("id_pressed", this,"_menu_option");
#endif
mode = MODE_EDIT;
@@ -850,11 +849,11 @@ 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);
- uv_edit->set_child_rect(uv_main_vb);
+ //uv_edit->set_child_rect(uv_main_vb);
HBoxContainer *uv_mode_hb = memnew( HBoxContainer );
uv_main_vb->add_child(uv_mode_hb);
for(int i=0;i<UV_MODE_MAX;i++) {
@@ -885,7 +884,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
uv_menu->get_popup()->add_item(TTR("UV->Polygon"),UVEDIT_UV_TO_POLYGON);
uv_menu->get_popup()->add_separator();
uv_menu->get_popup()->add_item(TTR("Clear UV"),UVEDIT_UV_CLEAR);
- uv_menu->get_popup()->connect("item_pressed",this,"_menu_option");
+ uv_menu->get_popup()->connect("id_pressed",this,"_menu_option");
uv_mode_hb->add_child( memnew( VSeparator ));
@@ -914,7 +913,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
sb_off_x->set_min(-256);
sb_off_x->set_max(256);
sb_off_x->set_step(1);
- sb_off_x->set_val(snap_offset.x);
+ sb_off_x->set_value(snap_offset.x);
sb_off_x->set_suffix("px");
sb_off_x->connect("value_changed", this, "_set_snap_off_x");
uv_mode_hb->add_child(sb_off_x);
@@ -923,7 +922,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
sb_off_y->set_min(-256);
sb_off_y->set_max(256);
sb_off_y->set_step(1);
- sb_off_y->set_val(snap_offset.y);
+ sb_off_y->set_value(snap_offset.y);
sb_off_y->set_suffix("px");
sb_off_y->connect("value_changed", this, "_set_snap_off_y");
uv_mode_hb->add_child(sb_off_y);
@@ -935,7 +934,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
sb_step_x->set_min(-256);
sb_step_x->set_max(256);
sb_step_x->set_step(1);
- sb_step_x->set_val(snap_step.x);
+ sb_step_x->set_value(snap_step.x);
sb_step_x->set_suffix("px");
sb_step_x->connect("value_changed", this, "_set_snap_step_x");
uv_mode_hb->add_child(sb_step_x);
@@ -944,7 +943,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
sb_step_y->set_min(-256);
sb_step_y->set_max(256);
sb_step_y->set_step(1);
- sb_step_y->set_val(snap_step.y);
+ sb_step_y->set_value(snap_step.y);
sb_step_y->set_suffix("px");
sb_step_y->connect("value_changed", this, "_set_snap_step_y");
uv_mode_hb->add_child(sb_step_y);
@@ -955,7 +954,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
uv_zoom = memnew( HSlider );
uv_zoom->set_min(0.01);
uv_zoom->set_max(4);
- uv_zoom->set_val(1);
+ uv_zoom->set_value(1);
uv_zoom->set_step(0.01);
uv_mode_hb->add_child(uv_zoom);
uv_zoom->set_custom_minimum_size(Size2(200,0));
@@ -975,7 +974,7 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
uv_hscroll->connect("value_changed",this,"_uv_scroll_changed");
uv_edit_draw->connect("draw",this,"_uv_draw");
- uv_edit_draw->connect("input_event",this,"_uv_input");
+ uv_edit_draw->connect("gui_input",this,"_uv_input");
uv_draw_zoom=1.0;
uv_drag_index=-1;
uv_drag=false;
@@ -984,6 +983,8 @@ Polygon2DEditor::Polygon2DEditor(EditorNode *p_editor) {
error = memnew( AcceptDialog);
add_child(error);
+ uv_edit_draw->set_clip_contents(true);
+
}
@@ -995,7 +996,7 @@ void Polygon2DEditorPlugin::edit(Object *p_object) {
bool Polygon2DEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("Polygon2D");
+ return p_object->is_class("Polygon2D");
}
void Polygon2DEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/polygon_2d_editor_plugin.h b/tools/editor/plugins/polygon_2d_editor_plugin.h
index 33bae94340..c3051ca88d 100644
--- a/tools/editor/plugins/polygon_2d_editor_plugin.h
+++ b/tools/editor/plugins/polygon_2d_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -42,7 +42,7 @@ class CanvasItemEditor;
class Polygon2DEditor : public HBoxContainer {
- OBJ_TYPE(Polygon2DEditor, HBoxContainer );
+ GDCLASS(Polygon2DEditor, HBoxContainer );
UndoRedo *undo_redo;
enum Mode {
@@ -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;
@@ -137,21 +137,21 @@ protected:
public:
- bool forward_input_event(const InputEvent& p_event);
+ bool forward_gui_input(const InputEvent& p_event);
void edit(Node *p_collision_polygon);
Polygon2DEditor(EditorNode *p_editor);
};
class Polygon2DEditorPlugin : public EditorPlugin {
- OBJ_TYPE( Polygon2DEditorPlugin, EditorPlugin );
+ GDCLASS( Polygon2DEditorPlugin, EditorPlugin );
Polygon2DEditor *collision_polygon_editor;
EditorNode *editor;
public:
- virtual bool forward_canvas_input_event(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return collision_polygon_editor->forward_input_event(p_event); }
+ virtual bool forward_canvas_gui_input(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return collision_polygon_editor->forward_gui_input(p_event); }
virtual String get_name() const { return "Polygon2D"; }
bool has_main_screen() const { return false; }
diff --git a/tools/editor/plugins/resource_preloader_editor_plugin.cpp b/tools/editor/plugins/resource_preloader_editor_plugin.cpp
index cce0ba3d62..fc6a548595 100644
--- a/tools/editor/plugins/resource_preloader_editor_plugin.cpp
+++ b/tools/editor/plugins/resource_preloader_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -30,11 +30,11 @@
#include "io/resource_loader.h"
#include "globals.h"
#include "tools/editor/editor_settings.h"
-#include "scene/resources/scene_preloader.h"
-void ResourcePreloaderEditor::_input_event(InputEvent p_event) {
+
+void ResourcePreloaderEditor::_gui_input(InputEvent p_event) {
}
@@ -179,7 +179,7 @@ void ResourcePreloaderEditor::_paste_pressed() {
if (name=="")
name=r->get_path().get_file();
if (name=="")
- name=r->get_type();
+ name=r->get_class();
String basename = name;
int counter=1;
@@ -248,7 +248,7 @@ void ResourcePreloaderEditor::_update_library() {
ERR_CONTINUE(r.is_null());
ti->set_tooltip(0,r->get_path());
- String type = r->get_type();
+ String type = r->get_class();
ti->set_text(1,type);
ti->set_selectable(1,false);
@@ -381,19 +381,19 @@ void ResourcePreloaderEditor::drop_data_fw(const Point2& p_point,const Variant&
void ResourcePreloaderEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_input_event"),&ResourcePreloaderEditor::_input_event);
- ObjectTypeDB::bind_method(_MD("_load_pressed"),&ResourcePreloaderEditor::_load_pressed);
- ObjectTypeDB::bind_method(_MD("_item_edited"),&ResourcePreloaderEditor::_item_edited);
- ObjectTypeDB::bind_method(_MD("_delete_pressed"),&ResourcePreloaderEditor::_delete_pressed);
- ObjectTypeDB::bind_method(_MD("_paste_pressed"),&ResourcePreloaderEditor::_paste_pressed);
- ObjectTypeDB::bind_method(_MD("_delete_confirm_pressed"),&ResourcePreloaderEditor::_delete_confirm_pressed);
- ObjectTypeDB::bind_method(_MD("_files_load_request"),&ResourcePreloaderEditor::_files_load_request);
- ObjectTypeDB::bind_method(_MD("_update_library"),&ResourcePreloaderEditor::_update_library);
+ ClassDB::bind_method(_MD("_gui_input"),&ResourcePreloaderEditor::_gui_input);
+ ClassDB::bind_method(_MD("_load_pressed"),&ResourcePreloaderEditor::_load_pressed);
+ ClassDB::bind_method(_MD("_item_edited"),&ResourcePreloaderEditor::_item_edited);
+ ClassDB::bind_method(_MD("_delete_pressed"),&ResourcePreloaderEditor::_delete_pressed);
+ ClassDB::bind_method(_MD("_paste_pressed"),&ResourcePreloaderEditor::_paste_pressed);
+ ClassDB::bind_method(_MD("_delete_confirm_pressed"),&ResourcePreloaderEditor::_delete_confirm_pressed);
+ ClassDB::bind_method(_MD("_files_load_request"),&ResourcePreloaderEditor::_files_load_request);
+ ClassDB::bind_method(_MD("_update_library"),&ResourcePreloaderEditor::_update_library);
- ObjectTypeDB::bind_method(_MD("get_drag_data_fw"), &ResourcePreloaderEditor::get_drag_data_fw);
- ObjectTypeDB::bind_method(_MD("can_drop_data_fw"), &ResourcePreloaderEditor::can_drop_data_fw);
- ObjectTypeDB::bind_method(_MD("drop_data_fw"), &ResourcePreloaderEditor::drop_data_fw);
+ ClassDB::bind_method(_MD("get_drag_data_fw"), &ResourcePreloaderEditor::get_drag_data_fw);
+ ClassDB::bind_method(_MD("can_drop_data_fw"), &ResourcePreloaderEditor::can_drop_data_fw);
+ ClassDB::bind_method(_MD("drop_data_fw"), &ResourcePreloaderEditor::drop_data_fw);
}
@@ -462,7 +462,7 @@ void ResourcePreloaderEditorPlugin::edit(Object *p_object) {
bool ResourcePreloaderEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("ResourcePreloader");
+ return p_object->is_class("ResourcePreloader");
}
void ResourcePreloaderEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/resource_preloader_editor_plugin.h b/tools/editor/plugins/resource_preloader_editor_plugin.h
index 4f0cb4be37..6990301ded 100644
--- a/tools/editor/plugins/resource_preloader_editor_plugin.h
+++ b/tools/editor/plugins/resource_preloader_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -40,7 +40,7 @@
class ResourcePreloaderEditor : public PanelContainer {
- OBJ_TYPE(ResourcePreloaderEditor, PanelContainer );
+ GDCLASS(ResourcePreloaderEditor, PanelContainer );
Button *load;
Button *_delete;
@@ -74,7 +74,7 @@ class ResourcePreloaderEditor : public PanelContainer {
protected:
void _notification(int p_what);
- void _input_event(InputEvent p_event);
+ void _gui_input(InputEvent p_event);
static void _bind_methods();
public:
@@ -86,7 +86,7 @@ public:
class ResourcePreloaderEditorPlugin : public EditorPlugin {
- OBJ_TYPE( ResourcePreloaderEditorPlugin, EditorPlugin );
+ GDCLASS( ResourcePreloaderEditorPlugin, EditorPlugin );
ResourcePreloaderEditor *preloader_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/rich_text_editor_plugin.cpp b/tools/editor/plugins/rich_text_editor_plugin.cpp
index bec48ca293..f91af2fa60 100644
--- a/tools/editor/plugins/rich_text_editor_plugin.cpp
+++ b/tools/editor/plugins/rich_text_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -89,8 +89,8 @@ void RichTextEditor::_menu_option(int p_option) {
void RichTextEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_menu_option"),&RichTextEditor::_menu_option);
- ObjectTypeDB::bind_method(_MD("_file_selected"),&RichTextEditor::_file_selected);
+ ClassDB::bind_method(_MD("_menu_option"),&RichTextEditor::_menu_option);
+ ClassDB::bind_method(_MD("_file_selected"),&RichTextEditor::_file_selected);
}
@@ -110,7 +110,7 @@ RichTextEditor::RichTextEditor() {
options->get_popup()->add_item(TTR("Parse BBCode"),PARSE_BBCODE);
options->get_popup()->add_item(TTR("Clear"),CLEAR);
- options->get_popup()->connect("item_pressed", this,"_menu_option");
+ options->get_popup()->connect("id_pressed", this,"_menu_option");
file_dialog = memnew( EditorFileDialog );
add_child(file_dialog);
file_dialog->add_filter("*.txt");
@@ -126,7 +126,7 @@ void RichTextEditorPlugin::edit(Object *p_object) {
bool RichTextEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("RichTextLabel");
+ return p_object->is_class("RichTextLabel");
}
void RichTextEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/rich_text_editor_plugin.h b/tools/editor/plugins/rich_text_editor_plugin.h
index ae1d04be01..cf97d7517c 100644
--- a/tools/editor/plugins/rich_text_editor_plugin.h
+++ b/tools/editor/plugins/rich_text_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -40,7 +40,7 @@
class RichTextEditor : public Control {
- OBJ_TYPE(RichTextEditor, Control );
+ GDCLASS(RichTextEditor, Control );
friend class RichTextEditorPlugin;
@@ -70,7 +70,7 @@ public:
class RichTextEditorPlugin : public EditorPlugin {
- OBJ_TYPE( RichTextEditorPlugin, EditorPlugin );
+ GDCLASS( RichTextEditorPlugin, EditorPlugin );
RichTextEditor *rich_text_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/sample_editor_plugin.cpp b/tools/editor/plugins/sample_editor_plugin.cpp
index 7965fa54ae..12ec7c8260 100644
--- a/tools/editor/plugins/sample_editor_plugin.cpp
+++ b/tools/editor/plugins/sample_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -35,7 +35,7 @@
-void SampleEditor::_input_event(InputEvent p_event) {
+void SampleEditor::_gui_input(InputEvent p_event) {
}
@@ -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,10 +308,10 @@ 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_RGB,img));
+ p_texture->set_data(Image(w,h,0,Image::FORMAT_RGB8,img));
}
@@ -348,9 +348,9 @@ void SampleEditor::edit(Ref<Sample> p_sample) {
void SampleEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_input_event"),&SampleEditor::_input_event);
- ObjectTypeDB::bind_method(_MD("_play_pressed"),&SampleEditor::_play_pressed);
- ObjectTypeDB::bind_method(_MD("_stop_pressed"),&SampleEditor::_stop_pressed);
+ ClassDB::bind_method(_MD("_gui_input"),&SampleEditor::_gui_input);
+ ClassDB::bind_method(_MD("_play_pressed"),&SampleEditor::_play_pressed);
+ ClassDB::bind_method(_MD("_stop_pressed"),&SampleEditor::_stop_pressed);
}
@@ -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("editors/sample_editor/preview_width",512),EDITOR_DEF("editors/sample_editor/preview_height",128),Image::FORMAT_RGB8);
sample_texframe->set_expand(true);
sample_texframe->set_texture(peakdisplay);
@@ -415,7 +415,7 @@ void SampleEditorPlugin::edit(Object *p_object) {
bool SampleEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("Sample");
+ return p_object->is_class("Sample");
}
void SampleEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/sample_editor_plugin.h b/tools/editor/plugins/sample_editor_plugin.h
index 22dc75b53b..59cdb10304 100644
--- a/tools/editor/plugins/sample_editor_plugin.h
+++ b/tools/editor/plugins/sample_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -39,7 +39,7 @@
class SampleEditor : public Panel {
- OBJ_TYPE(SampleEditor, Panel );
+ GDCLASS(SampleEditor, Panel );
SamplePlayer *player;
@@ -57,7 +57,7 @@ class SampleEditor : public Panel {
protected:
void _notification(int p_what);
- void _input_event(InputEvent p_event);
+ void _gui_input(InputEvent p_event);
static void _bind_methods();
public:
@@ -69,7 +69,7 @@ public:
class SampleEditorPlugin : public EditorPlugin {
- OBJ_TYPE( SampleEditorPlugin, EditorPlugin );
+ GDCLASS( SampleEditorPlugin, EditorPlugin );
SampleEditor *sample_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/sample_library_editor_plugin.cpp b/tools/editor/plugins/sample_library_editor_plugin.cpp
index 2a6940332c..a7ccfb6978 100644
--- a/tools/editor/plugins/sample_library_editor_plugin.cpp
+++ b/tools/editor/plugins/sample_library_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -35,7 +35,7 @@
#include "sample_editor_plugin.h"
-void SampleLibraryEditor::_input_event(InputEvent p_event) {
+void SampleLibraryEditor::_gui_input(InputEvent p_event) {
}
@@ -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++) {
@@ -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);
@@ -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);
@@ -411,17 +411,17 @@ void SampleLibraryEditor::drop_data_fw(const Point2& p_point,const Variant& p_da
void SampleLibraryEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_input_event"),&SampleLibraryEditor::_input_event);
- ObjectTypeDB::bind_method(_MD("_load_pressed"),&SampleLibraryEditor::_load_pressed);
- ObjectTypeDB::bind_method(_MD("_item_edited"),&SampleLibraryEditor::_item_edited);
- ObjectTypeDB::bind_method(_MD("_delete_pressed"),&SampleLibraryEditor::_delete_pressed);
- ObjectTypeDB::bind_method(_MD("_file_load_request"),&SampleLibraryEditor::_file_load_request);
- ObjectTypeDB::bind_method(_MD("_update_library"),&SampleLibraryEditor::_update_library);
- ObjectTypeDB::bind_method(_MD("_button_pressed"),&SampleLibraryEditor::_button_pressed);
+ ClassDB::bind_method(_MD("_gui_input"),&SampleLibraryEditor::_gui_input);
+ ClassDB::bind_method(_MD("_load_pressed"),&SampleLibraryEditor::_load_pressed);
+ ClassDB::bind_method(_MD("_item_edited"),&SampleLibraryEditor::_item_edited);
+ ClassDB::bind_method(_MD("_delete_pressed"),&SampleLibraryEditor::_delete_pressed);
+ ClassDB::bind_method(_MD("_file_load_request"),&SampleLibraryEditor::_file_load_request);
+ ClassDB::bind_method(_MD("_update_library"),&SampleLibraryEditor::_update_library);
+ ClassDB::bind_method(_MD("_button_pressed"),&SampleLibraryEditor::_button_pressed);
- ObjectTypeDB::bind_method(_MD("get_drag_data_fw"), &SampleLibraryEditor::get_drag_data_fw);
- ObjectTypeDB::bind_method(_MD("can_drop_data_fw"), &SampleLibraryEditor::can_drop_data_fw);
- ObjectTypeDB::bind_method(_MD("drop_data_fw"), &SampleLibraryEditor::drop_data_fw);
+ ClassDB::bind_method(_MD("get_drag_data_fw"), &SampleLibraryEditor::get_drag_data_fw);
+ ClassDB::bind_method(_MD("can_drop_data_fw"), &SampleLibraryEditor::can_drop_data_fw);
+ ClassDB::bind_method(_MD("drop_data_fw"), &SampleLibraryEditor::drop_data_fw);
}
@@ -497,7 +497,7 @@ void SampleLibraryEditorPlugin::edit(Object *p_object) {
bool SampleLibraryEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("SampleLibrary");
+ return p_object->is_class("SampleLibrary");
}
void SampleLibraryEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/sample_library_editor_plugin.h b/tools/editor/plugins/sample_library_editor_plugin.h
index f9fb184b7c..1856d338ed 100644
--- a/tools/editor/plugins/sample_library_editor_plugin.h
+++ b/tools/editor/plugins/sample_library_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -42,7 +42,7 @@
class SampleLibraryEditor : public Panel {
- OBJ_TYPE(SampleLibraryEditor, Panel );
+ GDCLASS(SampleLibraryEditor, Panel );
@@ -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();
@@ -74,7 +74,7 @@ class SampleLibraryEditor : public Panel {
protected:
void _notification(int p_what);
- void _input_event(InputEvent p_event);
+ void _gui_input(InputEvent p_event);
static void _bind_methods();
public:
@@ -85,7 +85,7 @@ public:
class SampleLibraryEditorPlugin : public EditorPlugin {
- OBJ_TYPE( SampleLibraryEditorPlugin, EditorPlugin );
+ GDCLASS( SampleLibraryEditorPlugin, EditorPlugin );
SampleLibraryEditor *sample_library_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/sample_player_editor_plugin.cpp b/tools/editor/plugins/sample_player_editor_plugin.cpp
index 3085ad87d8..ae958a5c6e 100644
--- a/tools/editor/plugins/sample_player_editor_plugin.cpp
+++ b/tools/editor/plugins/sample_player_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -50,8 +50,8 @@ void SamplePlayerEditor::_node_removed(Node *p_node) {
void SamplePlayerEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_play"),&SamplePlayerEditor::_play);
- ObjectTypeDB::bind_method(_MD("_stop"),&SamplePlayerEditor::_stop);
+ ClassDB::bind_method(_MD("_play"),&SamplePlayerEditor::_play);
+ ClassDB::bind_method(_MD("_stop"),&SamplePlayerEditor::_stop);
}
@@ -153,7 +153,7 @@ void SamplePlayerEditorPlugin::edit(Object *p_object) {
bool SamplePlayerEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("SamplePlayer2D") || p_object->is_type("SamplePlayer") || p_object->is_type("SpatialSamplePlayer");
+ return p_object->is_class("SamplePlayer2D") || p_object->is_class("SamplePlayer") || p_object->is_class("SpatialSamplePlayer");
}
void SamplePlayerEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/sample_player_editor_plugin.h b/tools/editor/plugins/sample_player_editor_plugin.h
index 013b042487..d18496b4fd 100644
--- a/tools/editor/plugins/sample_player_editor_plugin.h
+++ b/tools/editor/plugins/sample_player_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -41,7 +41,7 @@
class SamplePlayerEditor : public Control {
- OBJ_TYPE(SamplePlayerEditor, Control );
+ GDCLASS(SamplePlayerEditor, Control );
Panel *panel;
Button * play;
@@ -66,7 +66,7 @@ public:
class SamplePlayerEditorPlugin : public EditorPlugin {
- OBJ_TYPE( SamplePlayerEditorPlugin, EditorPlugin );
+ GDCLASS( SamplePlayerEditorPlugin, EditorPlugin );
SamplePlayerEditor *sample_player_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp
index e7170a23f3..e167ba2d56 100644
--- a/tools/editor/plugins/script_editor_plugin.cpp
+++ b/tools/editor/plugins/script_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -183,7 +183,7 @@ void ScriptEditorQuickOpen::_sbox_input(const InputEvent& p_ie) {
p_ie.key.scancode == KEY_PAGEUP ||
p_ie.key.scancode == KEY_PAGEDOWN ) ) {
- search_options->call("_input_event",p_ie);
+ search_options->call("_gui_input",p_ie);
search_box->accept_event();
}
@@ -240,9 +240,9 @@ void ScriptEditorQuickOpen::_notification(int p_what) {
void ScriptEditorQuickOpen::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_text_changed"),&ScriptEditorQuickOpen::_text_changed);
- ObjectTypeDB::bind_method(_MD("_confirmed"),&ScriptEditorQuickOpen::_confirmed);
- ObjectTypeDB::bind_method(_MD("_sbox_input"),&ScriptEditorQuickOpen::_sbox_input);
+ ClassDB::bind_method(_MD("_text_changed"),&ScriptEditorQuickOpen::_text_changed);
+ ClassDB::bind_method(_MD("_confirmed"),&ScriptEditorQuickOpen::_confirmed);
+ ClassDB::bind_method(_MD("_sbox_input"),&ScriptEditorQuickOpen::_sbox_input);
ADD_SIGNAL(MethodInfo("goto_line",PropertyInfo(Variant::INT,"line")));
@@ -254,11 +254,11 @@ ScriptEditorQuickOpen::ScriptEditorQuickOpen() {
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
- set_child_rect(vbc);
+ //set_child_rect(vbc);
search_box = memnew( LineEdit );
vbc->add_margin_child(TTR("Search:"),search_box);
search_box->connect("text_changed",this,"_text_changed");
- search_box->connect("input_event",this,"_sbox_input");
+ search_box->connect("gui_input",this,"_sbox_input");
search_options = memnew( Tree );
vbc->add_margin_child(TTR("Matches:"),search_options,true);
get_ok()->set_text(TTR("Open"));
@@ -431,7 +431,7 @@ void ScriptEditor::_go_to_tab(int p_idx) {
}
if (c->cast_to<EditorHelp>()) {
- script_name_label->set_text(c->cast_to<EditorHelp>()->get_class_name());
+ script_name_label->set_text(c->cast_to<EditorHelp>()->get_class());
script_icon->set_texture(get_icon("Help","EditorIcons"));
if (is_visible())
c->cast_to<EditorHelp>()->set_focused();
@@ -605,7 +605,7 @@ void ScriptEditor::_reload_scripts(){
}
- Ref<Script> rel_script = ResourceLoader::load(script->get_path(),script->get_type(),true);
+ Ref<Script> rel_script = ResourceLoader::load(script->get_path(),script->get_class(),true);
ERR_CONTINUE(!rel_script.is_valid());
script->set_source_code( rel_script->get_source_code() );
script->set_last_modified_time( rel_script->get_last_modified_time() );
@@ -672,7 +672,7 @@ bool ScriptEditor::_test_script_times_on_disk(Ref<Script> p_for_script) {
bool need_ask=false;
bool need_reload=false;
- bool use_autoreload=bool(EDITOR_DEF("text_editor/auto_reload_scripts_on_external_change",false));
+ bool use_autoreload=bool(EDITOR_DEF("text_editor/files/auto_reload_scripts_on_external_change",false));
@@ -783,7 +783,7 @@ void ScriptEditor::_menu_option(int p_option) {
file_dialog_option = FILE_SAVE_THEME_AS;
file_dialog->clear_filters();
file_dialog->add_filter("*.tet");
- file_dialog->set_current_path(EditorSettings::get_singleton()->get_settings_path() + "/text_editor_themes/" + EditorSettings::get_singleton()->get("text_editor/color_theme"));
+ file_dialog->set_current_path(EditorSettings::get_singleton()->get_settings_path() + "/text_editor_themes/" + EditorSettings::get_singleton()->get("text_editor/theme/color_theme"));
file_dialog->popup_centered_ratio();
file_dialog->set_title(TTR("Save Theme As.."));
} break;
@@ -798,7 +798,7 @@ void ScriptEditor::_menu_option(int p_option) {
if (tab_container->get_tab_count()>0) {
EditorHelp *eh = tab_container->get_child( tab_container->get_current_tab() )->cast_to<EditorHelp>();
if (eh) {
- current=eh->get_class_name();
+ current=eh->get_class();
}
}
@@ -991,7 +991,7 @@ void ScriptEditor::_notification(int p_what) {
script_split->connect("dragged",this,"_script_split_dragged");
autosave_timer->connect("timeout",this,"_autosave_scripts");
{
- float autosave_time = EditorSettings::get_singleton()->get("text_editor/autosave_interval_secs");
+ float autosave_time = EditorSettings::get_singleton()->get("text_editor/files/autosave_interval_secs");
if (autosave_time>0) {
autosave_timer->set_wait_time(autosave_time);
autosave_timer->start();
@@ -1343,12 +1343,12 @@ struct _ScriptEditorItemData {
void ScriptEditor::_update_script_colors() {
- bool script_temperature_enabled = EditorSettings::get_singleton()->get("text_editor/script_temperature_enabled");
- bool highlight_current = EditorSettings::get_singleton()->get("text_editor/highlight_current_script");
+ bool script_temperature_enabled = EditorSettings::get_singleton()->get("text_editor/open_scripts/script_temperature_enabled");
+ bool highlight_current = EditorSettings::get_singleton()->get("text_editor/open_scripts/highlight_current_script");
- int hist_size = EditorSettings::get_singleton()->get("text_editor/script_temperature_history_size");
- Color hot_color=EditorSettings::get_singleton()->get("text_editor/script_temperature_hot_color");
- Color cold_color=EditorSettings::get_singleton()->get("text_editor/script_temperature_cold_color");
+ int hist_size = EditorSettings::get_singleton()->get("text_editor/open_scripts/script_temperature_history_size");
+ Color hot_color=EditorSettings::get_singleton()->get("text_editor/open_scripts/script_temperature_hot_color");
+ Color cold_color=EditorSettings::get_singleton()->get("text_editor/open_scripts/script_temperature_cold_color");
for(int i=0;i<script_list->get_item_count();i++) {
@@ -1395,7 +1395,7 @@ void ScriptEditor::_update_script_names() {
}
script_list->clear();
- bool split_script_help = EditorSettings::get_singleton()->get("text_editor/group_help_pages");
+ bool split_script_help = EditorSettings::get_singleton()->get("text_editor/open_scripts/group_help_pages");
Vector<_ScriptEditorItemData> sedata;
@@ -1423,7 +1423,7 @@ void ScriptEditor::_update_script_names() {
EditorHelp *eh = tab_container->get_child(i)->cast_to<EditorHelp>();
if (eh) {
- String name = eh->get_class_name();
+ String name = eh->get_class();
Ref<Texture> icon = get_icon("Help","EditorIcons");
String tooltip = name+" Class Reference";
@@ -1481,12 +1481,12 @@ void ScriptEditor::edit(const Ref<Script>& p_script, bool p_grab_focus) {
// see if already has it
- bool open_dominant = EditorSettings::get_singleton()->get("text_editor/open_dominant_script_on_scene_change");
+ bool open_dominant = EditorSettings::get_singleton()->get("text_editor/files/open_dominant_script_on_scene_change");
- if (p_script->get_path().is_resource_file() && bool(EditorSettings::get_singleton()->get("external_editor/use_external_editor"))) {
+ if (p_script->get_path().is_resource_file() && bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor"))) {
- String path = EditorSettings::get_singleton()->get("external_editor/exec_path");
- String flags = EditorSettings::get_singleton()->get("external_editor/exec_flags");
+ String path = EditorSettings::get_singleton()->get("text_editor/external/exec_path");
+ String flags = EditorSettings::get_singleton()->get("text_editor/external/exec_flags");
List<String> args;
flags=flags.strip_edges();
if (flags!=String()) {
@@ -1495,7 +1495,7 @@ void ScriptEditor::edit(const Ref<Script>& p_script, bool p_grab_focus) {
args.push_back(flagss[i]);
}
- args.push_back(Globals::get_singleton()->globalize_path(p_script->get_path()));
+ args.push_back(GlobalConfig::get_singleton()->globalize_path(p_script->get_path()));
Error err = OS::get_singleton()->execute(path,args,false);
if (err==OK)
return;
@@ -1694,8 +1694,8 @@ void ScriptEditor::_save_layout() {
void ScriptEditor::_editor_settings_changed() {
- trim_trailing_whitespace_on_save = EditorSettings::get_singleton()->get("text_editor/trim_trailing_whitespace_on_save");
- float autosave_time = EditorSettings::get_singleton()->get("text_editor/autosave_interval_secs");
+ trim_trailing_whitespace_on_save = EditorSettings::get_singleton()->get("text_editor/files/trim_trailing_whitespace_on_save");
+ float autosave_time = EditorSettings::get_singleton()->get("text_editor/files/autosave_interval_secs");
if (autosave_time>0) {
autosave_timer->set_wait_time(autosave_time);
autosave_timer->start();
@@ -1704,9 +1704,9 @@ void ScriptEditor::_editor_settings_changed() {
}
if (current_theme == "") {
- current_theme = EditorSettings::get_singleton()->get("text_editor/color_theme");
- } else if (current_theme != EditorSettings::get_singleton()->get("text_editor/color_theme")) {
- current_theme = EditorSettings::get_singleton()->get("text_editor/color_theme");
+ current_theme = EditorSettings::get_singleton()->get("text_editor/theme/color_theme");
+ } else if (current_theme != EditorSettings::get_singleton()->get("text_editor/theme/color_theme")) {
+ current_theme = EditorSettings::get_singleton()->get("text_editor/theme/color_theme");
EditorSettings::get_singleton()->load_text_editor_theme();
}
@@ -1720,7 +1720,7 @@ void ScriptEditor::_editor_settings_changed() {
}
_update_script_colors();
- ScriptServer::set_reload_scripts_on_save(EDITOR_DEF("text_editor/auto_reload_and_parse_scripts_on_save",true));
+ ScriptServer::set_reload_scripts_on_save(EDITOR_DEF("text_editor/files/auto_reload_and_parse_scripts_on_save",true));
}
@@ -1761,7 +1761,7 @@ void ScriptEditor::_unhandled_input(const InputEvent& p_event) {
void ScriptEditor::set_window_layout(Ref<ConfigFile> p_layout) {
- if (!bool(EDITOR_DEF("text_editor/restore_scripts_on_load",true))) {
+ if (!bool(EDITOR_DEF("text_editor/files/restore_scripts_on_load",true))) {
return;
}
@@ -1827,7 +1827,7 @@ void ScriptEditor::get_window_layout(Ref<ConfigFile> p_layout) {
if (eh) {
- helps.push_back(eh->get_class_name());
+ helps.push_back(eh->get_class());
}
@@ -1841,12 +1841,14 @@ void ScriptEditor::get_window_layout(Ref<ConfigFile> p_layout) {
void ScriptEditor::_help_class_open(const String& p_class) {
+ if (p_class=="")
+ return;
for(int i=0;i<tab_container->get_child_count();i++) {
EditorHelp *eh = tab_container->get_child(i)->cast_to<EditorHelp>();
- if (eh && eh->get_class_name()==p_class) {
+ if (eh && eh->get_class()==p_class) {
_go_to_tab(i);
_update_script_names();
@@ -1874,7 +1876,7 @@ void ScriptEditor::_help_class_goto(const String& p_desc) {
EditorHelp *eh = tab_container->get_child(i)->cast_to<EditorHelp>();
- if (eh && eh->get_class_name()==cname) {
+ if (eh && eh->get_class()==cname) {
_go_to_tab(i);
eh->go_to_help(p_desc);
@@ -1972,9 +1974,9 @@ void ScriptEditor::_history_back(){
}
void ScriptEditor::set_scene_root_script( Ref<Script> p_script ) {
- bool open_dominant = EditorSettings::get_singleton()->get("text_editor/open_dominant_script_on_scene_change");
+ bool open_dominant = EditorSettings::get_singleton()->get("text_editor/files/open_dominant_script_on_scene_change");
- if (bool(EditorSettings::get_singleton()->get("external_editor/use_external_editor")))
+ if (bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor")))
return;
if (open_dominant && p_script.is_valid() && _can_open_in_editor(p_script.ptr())) {
@@ -2027,43 +2029,43 @@ void ScriptEditor::register_create_script_editor_function(CreateScriptEditorFunc
void ScriptEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_file_dialog_action",&ScriptEditor::_file_dialog_action);
- ObjectTypeDB::bind_method("_tab_changed",&ScriptEditor::_tab_changed);
- ObjectTypeDB::bind_method("_menu_option",&ScriptEditor::_menu_option);
- ObjectTypeDB::bind_method("_close_current_tab",&ScriptEditor::_close_current_tab);
- ObjectTypeDB::bind_method("_close_docs_tab", &ScriptEditor::_close_docs_tab);
- ObjectTypeDB::bind_method("_close_all_tabs", &ScriptEditor::_close_all_tabs);
- ObjectTypeDB::bind_method("_editor_play",&ScriptEditor::_editor_play);
- ObjectTypeDB::bind_method("_editor_pause",&ScriptEditor::_editor_pause);
- ObjectTypeDB::bind_method("_editor_stop",&ScriptEditor::_editor_stop);
- ObjectTypeDB::bind_method("_add_callback",&ScriptEditor::_add_callback);
- ObjectTypeDB::bind_method("_reload_scripts",&ScriptEditor::_reload_scripts);
- ObjectTypeDB::bind_method("_resave_scripts",&ScriptEditor::_resave_scripts);
- ObjectTypeDB::bind_method("_res_saved_callback",&ScriptEditor::_res_saved_callback);
- ObjectTypeDB::bind_method("_goto_script_line",&ScriptEditor::_goto_script_line);
- ObjectTypeDB::bind_method("_goto_script_line2",&ScriptEditor::_goto_script_line2);
- ObjectTypeDB::bind_method("_help_search",&ScriptEditor::_help_search);
- ObjectTypeDB::bind_method("_save_history",&ScriptEditor::_save_history);
-
-
-
- ObjectTypeDB::bind_method("_breaked",&ScriptEditor::_breaked);
- ObjectTypeDB::bind_method("_show_debugger",&ScriptEditor::_show_debugger);
- ObjectTypeDB::bind_method("_get_debug_tooltip",&ScriptEditor::_get_debug_tooltip);
- ObjectTypeDB::bind_method("_autosave_scripts",&ScriptEditor::_autosave_scripts);
- ObjectTypeDB::bind_method("_editor_settings_changed",&ScriptEditor::_editor_settings_changed);
- ObjectTypeDB::bind_method("_update_script_names",&ScriptEditor::_update_script_names);
- ObjectTypeDB::bind_method("_tree_changed",&ScriptEditor::_tree_changed);
- ObjectTypeDB::bind_method("_script_selected",&ScriptEditor::_script_selected);
- ObjectTypeDB::bind_method("_script_created",&ScriptEditor::_script_created);
- ObjectTypeDB::bind_method("_script_split_dragged",&ScriptEditor::_script_split_dragged);
- ObjectTypeDB::bind_method("_help_class_open",&ScriptEditor::_help_class_open);
- ObjectTypeDB::bind_method("_help_class_goto",&ScriptEditor::_help_class_goto);
- ObjectTypeDB::bind_method("_request_help",&ScriptEditor::_help_class_open);
- ObjectTypeDB::bind_method("_history_forward",&ScriptEditor::_history_forward);
- ObjectTypeDB::bind_method("_history_back",&ScriptEditor::_history_back);
- ObjectTypeDB::bind_method("_live_auto_reload_running_scripts",&ScriptEditor::_live_auto_reload_running_scripts);
- ObjectTypeDB::bind_method("_unhandled_input",&ScriptEditor::_unhandled_input);
+ ClassDB::bind_method("_file_dialog_action",&ScriptEditor::_file_dialog_action);
+ ClassDB::bind_method("_tab_changed",&ScriptEditor::_tab_changed);
+ ClassDB::bind_method("_menu_option",&ScriptEditor::_menu_option);
+ ClassDB::bind_method("_close_current_tab",&ScriptEditor::_close_current_tab);
+ ClassDB::bind_method("_close_docs_tab", &ScriptEditor::_close_docs_tab);
+ ClassDB::bind_method("_close_all_tabs", &ScriptEditor::_close_all_tabs);
+ ClassDB::bind_method("_editor_play",&ScriptEditor::_editor_play);
+ ClassDB::bind_method("_editor_pause",&ScriptEditor::_editor_pause);
+ ClassDB::bind_method("_editor_stop",&ScriptEditor::_editor_stop);
+ ClassDB::bind_method("_add_callback",&ScriptEditor::_add_callback);
+ ClassDB::bind_method("_reload_scripts",&ScriptEditor::_reload_scripts);
+ ClassDB::bind_method("_resave_scripts",&ScriptEditor::_resave_scripts);
+ ClassDB::bind_method("_res_saved_callback",&ScriptEditor::_res_saved_callback);
+ ClassDB::bind_method("_goto_script_line",&ScriptEditor::_goto_script_line);
+ ClassDB::bind_method("_goto_script_line2",&ScriptEditor::_goto_script_line2);
+ ClassDB::bind_method("_help_search",&ScriptEditor::_help_search);
+ ClassDB::bind_method("_save_history",&ScriptEditor::_save_history);
+
+
+
+ ClassDB::bind_method("_breaked",&ScriptEditor::_breaked);
+ ClassDB::bind_method("_show_debugger",&ScriptEditor::_show_debugger);
+ ClassDB::bind_method("_get_debug_tooltip",&ScriptEditor::_get_debug_tooltip);
+ ClassDB::bind_method("_autosave_scripts",&ScriptEditor::_autosave_scripts);
+ ClassDB::bind_method("_editor_settings_changed",&ScriptEditor::_editor_settings_changed);
+ ClassDB::bind_method("_update_script_names",&ScriptEditor::_update_script_names);
+ ClassDB::bind_method("_tree_changed",&ScriptEditor::_tree_changed);
+ ClassDB::bind_method("_script_selected",&ScriptEditor::_script_selected);
+ ClassDB::bind_method("_script_created",&ScriptEditor::_script_created);
+ ClassDB::bind_method("_script_split_dragged",&ScriptEditor::_script_split_dragged);
+ ClassDB::bind_method("_help_class_open",&ScriptEditor::_help_class_open);
+ ClassDB::bind_method("_help_class_goto",&ScriptEditor::_help_class_goto);
+ ClassDB::bind_method("_request_help",&ScriptEditor::_help_class_open);
+ ClassDB::bind_method("_history_forward",&ScriptEditor::_history_forward);
+ ClassDB::bind_method("_history_back",&ScriptEditor::_history_back);
+ ClassDB::bind_method("_live_auto_reload_running_scripts",&ScriptEditor::_live_auto_reload_running_scripts);
+ ClassDB::bind_method("_unhandled_input",&ScriptEditor::_unhandled_input);
}
@@ -2126,7 +2128,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/close_docs", TTR("Close Docs")), CLOSE_DOCS);
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/close_file", TTR("Close"), KEY_MASK_CMD | KEY_W), FILE_CLOSE);
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/close_all", TTR("Close All")), CLOSE_ALL);
- file_menu->get_popup()->connect("item_pressed", this,"_menu_option");
+ file_menu->get_popup()->connect("id_pressed", this,"_menu_option");
@@ -2135,7 +2137,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
script_search_menu->set_text(TTR("Search"));
script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find", TTR("Find.."), KEY_MASK_CMD|KEY_F), HELP_SEARCH_FIND);
script_search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_next", TTR("Find Next"), KEY_F3), HELP_SEARCH_FIND_NEXT);
- script_search_menu->get_popup()->connect("item_pressed", this,"_menu_option");
+ script_search_menu->get_popup()->connect("id_pressed", this,"_menu_option");
script_search_menu->hide();
@@ -2151,7 +2153,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
debug_menu->get_popup()->add_separator();
//debug_menu->get_popup()->add_check_item("Show Debugger",DEBUG_SHOW);
debug_menu->get_popup()->add_check_shortcut(ED_SHORTCUT("debugger/keep_debugger_open", TTR("Keep Debugger Open")), DEBUG_SHOW_KEEP_OPEN);
- debug_menu->get_popup()->connect("item_pressed", this,"_menu_option");
+ debug_menu->get_popup()->connect("id_pressed", this,"_menu_option");
debug_menu->get_popup()->set_item_disabled( debug_menu->get_popup()->get_item_index(DEBUG_NEXT), true);
debug_menu->get_popup()->set_item_disabled( debug_menu->get_popup()->get_item_index(DEBUG_STEP), true );
@@ -2168,7 +2170,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
window_menu->get_popup()->add_item(TTR("Move Left"),WINDOW_MOVE_LEFT,KEY_MASK_CMD|KEY_LEFT);
window_menu->get_popup()->add_item(TTR("Move Right"),WINDOW_MOVE_RIGHT,KEY_MASK_CMD|KEY_RIGHT);
window_menu->get_popup()->add_separator();
- window_menu->get_popup()->connect("item_pressed", this,"_menu_option");
+ window_menu->get_popup()->connect("id_pressed", this,"_menu_option");
#endif
@@ -2245,7 +2247,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
{
VBoxContainer *vbc = memnew( VBoxContainer );
disk_changed->add_child(vbc);
- disk_changed->set_child_rect(vbc);
+ // disk_changed->set_child_rect(vbc);
Label *dl = memnew( Label );
dl->set_text(TTR("The following files are newer on disk.\nWhat action should be taken?:"));
@@ -2326,7 +2328,7 @@ bool ScriptEditorPlugin::handles(Object *p_object) const {
return valid;
}
- return p_object->is_type("Script");
+ return p_object->is_class("Script");
}
void ScriptEditorPlugin::make_visible(bool p_visible) {
@@ -2414,20 +2416,20 @@ ScriptEditorPlugin::ScriptEditorPlugin(EditorNode *p_node) {
script_editor->hide();
- EDITOR_DEF("text_editor/auto_reload_scripts_on_external_change",true);
- ScriptServer::set_reload_scripts_on_save(EDITOR_DEF("text_editor/auto_reload_and_parse_scripts_on_save",true));
- EDITOR_DEF("text_editor/open_dominant_script_on_scene_change",true);
- EDITOR_DEF("external_editor/use_external_editor",false);
- EDITOR_DEF("external_editor/exec_path","");
- EDITOR_DEF("text_editor/script_temperature_enabled",true);
- EDITOR_DEF("text_editor/highlight_current_script", true);
- EDITOR_DEF("text_editor/script_temperature_history_size",15);
- EDITOR_DEF("text_editor/script_temperature_hot_color",Color(1,0,0,0.3));
- EDITOR_DEF("text_editor/script_temperature_cold_color",Color(0,0,1,0.3));
- EDITOR_DEF("text_editor/current_script_background_color",Color(0.81,0.81,0.14,0.63));
- EDITOR_DEF("text_editor/group_help_pages",true);
- EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"external_editor/exec_path",PROPERTY_HINT_GLOBAL_FILE));
- EDITOR_DEF("external_editor/exec_flags","");
+ EDITOR_DEF("text_editor/files/auto_reload_scripts_on_external_change",true);
+ ScriptServer::set_reload_scripts_on_save(EDITOR_DEF("text_editor/files/auto_reload_and_parse_scripts_on_save",true));
+ EDITOR_DEF("text_editor/files/open_dominant_script_on_scene_change",true);
+ EDITOR_DEF("text_editor/external/use_external_editor",false);
+ EDITOR_DEF("text_editor/external/exec_path","");
+ EDITOR_DEF("text_editor/open_scripts/script_temperature_enabled",true);
+ EDITOR_DEF("text_editor/open_scripts/highlight_current_script", true);
+ EDITOR_DEF("text_editor/open_scripts/script_temperature_history_size",15);
+ EDITOR_DEF("text_editor/open_scripts/script_temperature_hot_color",Color(1,0,0,0.3));
+ EDITOR_DEF("text_editor/open_scripts/script_temperature_cold_color",Color(0,0,1,0.3));
+ EDITOR_DEF("text_editor/open_scripts/current_script_background_color",Color(0.81,0.81,0.14,0.63));
+ EDITOR_DEF("text_editor/open_scripts/group_help_pages",true);
+ EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::STRING,"text_editor/external/exec_path",PROPERTY_HINT_GLOBAL_FILE));
+ EDITOR_DEF("text_editor/external/exec_flags","");
}
diff --git a/tools/editor/plugins/script_editor_plugin.h b/tools/editor/plugins/script_editor_plugin.h
index 10f3bce14e..e84c0af9e0 100644
--- a/tools/editor/plugins/script_editor_plugin.h
+++ b/tools/editor/plugins/script_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -45,7 +45,7 @@
class ScriptEditorQuickOpen : public ConfirmationDialog {
- OBJ_TYPE(ScriptEditorQuickOpen,ConfirmationDialog )
+ GDCLASS(ScriptEditorQuickOpen,ConfirmationDialog )
LineEdit *search_box;
Tree *search_options;
@@ -77,7 +77,7 @@ class ScriptEditorDebugger;
class ScriptEditorBase : public Control {
- OBJ_TYPE( ScriptEditorBase, Control );
+ GDCLASS( ScriptEditorBase, Control );
protected:
static void _bind_methods();
public:
@@ -118,7 +118,7 @@ class EditorScriptCodeCompletionCache;
class ScriptEditor : public VBoxContainer {
- OBJ_TYPE(ScriptEditor, VBoxContainer );
+ GDCLASS(ScriptEditor, VBoxContainer );
EditorNode *editor;
@@ -343,7 +343,7 @@ public:
class ScriptEditorPlugin : public EditorPlugin {
- OBJ_TYPE( ScriptEditorPlugin, EditorPlugin );
+ GDCLASS( ScriptEditorPlugin, EditorPlugin );
ScriptEditor *script_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/script_text_editor.cpp b/tools/editor/plugins/script_text_editor.cpp
index 23252c4077..391578817a 100644
--- a/tools/editor/plugins/script_text_editor.cpp
+++ b/tools/editor/plugins/script_text_editor.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -100,32 +100,32 @@ void ScriptTextEditor::_load_theme_settings() {
/* keyword color */
- text_edit->add_color_override("background_color", EDITOR_DEF("text_editor/background_color",Color(0,0,0,0)));
- text_edit->add_color_override("completion_background_color", EDITOR_DEF("text_editor/completion_background_color", Color(0,0,0,0)));
- text_edit->add_color_override("completion_selected_color", EDITOR_DEF("text_editor/completion_selected_color", Color::html("434244")));
- text_edit->add_color_override("completion_existing_color", EDITOR_DEF("text_editor/completion_existing_color", Color::html("21dfdfdf")));
- text_edit->add_color_override("completion_scroll_color", EDITOR_DEF("text_editor/completion_scroll_color", Color::html("ffffff")));
- text_edit->add_color_override("completion_font_color", EDITOR_DEF("text_editor/completion_font_color", Color::html("aaaaaa")));
- text_edit->add_color_override("font_color",EDITOR_DEF("text_editor/text_color",Color(0,0,0)));
- text_edit->add_color_override("line_number_color",EDITOR_DEF("text_editor/line_number_color",Color(0,0,0)));
- text_edit->add_color_override("caret_color",EDITOR_DEF("text_editor/caret_color",Color(0,0,0)));
- text_edit->add_color_override("caret_background_color",EDITOR_DEF("text_editor/caret_background_color",Color(0,0,0)));
- text_edit->add_color_override("font_selected_color",EDITOR_DEF("text_editor/text_selected_color",Color(1,1,1)));
- text_edit->add_color_override("selection_color",EDITOR_DEF("text_editor/selection_color",Color(0.2,0.2,1)));
- text_edit->add_color_override("brace_mismatch_color",EDITOR_DEF("text_editor/brace_mismatch_color",Color(1,0.2,0.2)));
- text_edit->add_color_override("current_line_color",EDITOR_DEF("text_editor/current_line_color",Color(0.3,0.5,0.8,0.15)));
- text_edit->add_color_override("word_highlighted_color",EDITOR_DEF("text_editor/word_highlighted_color",Color(0.8,0.9,0.9,0.15)));
- text_edit->add_color_override("number_color",EDITOR_DEF("text_editor/number_color",Color(0.9,0.6,0.0,2)));
- text_edit->add_color_override("function_color",EDITOR_DEF("text_editor/function_color",Color(0.4,0.6,0.8)));
- text_edit->add_color_override("member_variable_color",EDITOR_DEF("text_editor/member_variable_color",Color(0.9,0.3,0.3)));
- text_edit->add_color_override("mark_color", EDITOR_DEF("text_editor/mark_color", Color(1.0,0.4,0.4,0.4)));
- text_edit->add_color_override("breakpoint_color", EDITOR_DEF("text_editor/breakpoint_color", Color(0.8,0.8,0.4,0.2)));
- text_edit->add_color_override("search_result_color",EDITOR_DEF("text_editor/search_result_color",Color(0.05,0.25,0.05,1)));
- text_edit->add_color_override("search_result_border_color",EDITOR_DEF("text_editor/search_result_border_color",Color(0.1,0.45,0.1,1)));
- text_edit->add_color_override("symbol_color",EDITOR_DEF("text_editor/symbol_color",Color::hex(0x005291ff)));
- text_edit->add_constant_override("line_spacing", EDITOR_DEF("text_editor/line_spacing",4));
-
- Color keyword_color= EDITOR_DEF("text_editor/keyword_color",Color(0.5,0.0,0.2));
+ text_edit->add_color_override("background_color", EDITOR_DEF("text_editor/highlighting/background_color",Color(0,0,0,0)));
+ text_edit->add_color_override("completion_background_color", EDITOR_DEF("text_editor/highlighting/completion_background_color", Color(0,0,0,0)));
+ text_edit->add_color_override("completion_selected_color", EDITOR_DEF("text_editor/highlighting/completion_selected_color", Color::html("434244")));
+ text_edit->add_color_override("completion_existing_color", EDITOR_DEF("text_editor/highlighting/completion_existing_color", Color::html("21dfdfdf")));
+ text_edit->add_color_override("completion_scroll_color", EDITOR_DEF("text_editor/highlighting/completion_scroll_color", Color::html("ffffff")));
+ text_edit->add_color_override("completion_font_color", EDITOR_DEF("text_editor/highlighting/completion_font_color", Color::html("aaaaaa")));
+ text_edit->add_color_override("font_color",EDITOR_DEF("text_editor/highlighting/text_color",Color(0,0,0)));
+ text_edit->add_color_override("line_number_color",EDITOR_DEF("text_editor/highlighting/line_number_color",Color(0,0,0)));
+ text_edit->add_color_override("caret_color",EDITOR_DEF("text_editor/highlighting/caret_color",Color(0,0,0)));
+ text_edit->add_color_override("caret_background_color",EDITOR_DEF("text_editor/highlighting/caret_background_color",Color(0,0,0)));
+ text_edit->add_color_override("font_selected_color",EDITOR_DEF("text_editor/highlighting/text_selected_color",Color(1,1,1)));
+ text_edit->add_color_override("selection_color",EDITOR_DEF("text_editor/highlighting/selection_color",Color(0.2,0.2,1)));
+ text_edit->add_color_override("brace_mismatch_color",EDITOR_DEF("text_editor/highlighting/brace_mismatch_color",Color(1,0.2,0.2)));
+ text_edit->add_color_override("current_line_color",EDITOR_DEF("text_editor/highlighting/current_line_color",Color(0.3,0.5,0.8,0.15)));
+ text_edit->add_color_override("word_highlighted_color",EDITOR_DEF("text_editor/highlighting/word_highlighted_color",Color(0.8,0.9,0.9,0.15)));
+ text_edit->add_color_override("number_color",EDITOR_DEF("text_editor/highlighting/number_color",Color(0.9,0.6,0.0,2)));
+ text_edit->add_color_override("function_color",EDITOR_DEF("text_editor/highlighting/function_color",Color(0.4,0.6,0.8)));
+ text_edit->add_color_override("member_variable_color",EDITOR_DEF("text_editor/highlighting/member_variable_color",Color(0.9,0.3,0.3)));
+ text_edit->add_color_override("mark_color", EDITOR_DEF("text_editor/highlighting/mark_color", Color(1.0,0.4,0.4,0.4)));
+ text_edit->add_color_override("breakpoint_color", EDITOR_DEF("text_editor/highlighting/breakpoint_color", Color(0.8,0.8,0.4,0.2)));
+ text_edit->add_color_override("search_result_color",EDITOR_DEF("text_editor/highlighting/search_result_color",Color(0.05,0.25,0.05,1)));
+ text_edit->add_color_override("search_result_border_color",EDITOR_DEF("text_editor/highlighting/search_result_border_color",Color(0.1,0.45,0.1,1)));
+ text_edit->add_color_override("symbol_color",EDITOR_DEF("text_editor/highlighting/symbol_color",Color::hex(0x005291ff)));
+ text_edit->add_constant_override("line_spacing", EDITOR_DEF("text_editor/theme/line_spacing",4));
+
+ Color keyword_color= EDITOR_DEF("text_editor/highlighting/keyword_color",Color(0.5,0.0,0.2));
List<String> keywords;
script->get_language()->get_reserved_words(&keywords);
@@ -135,7 +135,7 @@ void ScriptTextEditor::_load_theme_settings() {
}
//colorize core types
- Color basetype_color= EDITOR_DEF("text_editor/base_type_color",Color(0.3,0.3,0.0));
+ Color basetype_color= EDITOR_DEF("text_editor/highlighting/base_type_color",Color(0.3,0.3,0.0));
text_edit->add_keyword_color("Vector2",basetype_color);
text_edit->add_keyword_color("Vector3",basetype_color);
@@ -151,10 +151,10 @@ void ScriptTextEditor::_load_theme_settings() {
text_edit->add_keyword_color("NodePath",basetype_color);
//colorize engine types
- Color type_color= EDITOR_DEF("text_editor/engine_type_color",Color(0.0,0.2,0.4));
+ Color type_color= EDITOR_DEF("text_editor/highlighting/engine_type_color",Color(0.0,0.2,0.4));
List<StringName> types;
- ObjectTypeDB::get_type_list(&types);
+ ClassDB::get_class_list(&types);
for(List<StringName>::Element *E=types.front();E;E=E->next()) {
@@ -166,7 +166,7 @@ void ScriptTextEditor::_load_theme_settings() {
}
//colorize comments
- Color comment_color = EDITOR_DEF("text_editor/comment_color",Color::hex(0x797e7eff));
+ Color comment_color = EDITOR_DEF("text_editor/highlighting/comment_color",Color::hex(0x797e7eff));
List<String> comments;
script->get_language()->get_comment_delimiters(&comments);
@@ -180,7 +180,7 @@ void ScriptTextEditor::_load_theme_settings() {
}
//colorize strings
- Color string_color = EDITOR_DEF("text_editor/string_color",Color::hex(0x6b6f00ff));
+ Color string_color = EDITOR_DEF("text_editor/highlighting/string_color",Color::hex(0x6b6f00ff));
List<String> strings;
script->get_language()->get_string_delimiters(&strings);
@@ -332,7 +332,7 @@ String ScriptTextEditor::get_name() {
} else if (script->get_name()!="")
name=script->get_name();
else
- name=script->get_type()+"("+itos(script->get_instance_ID())+")";
+ name=script->get_class()+"("+itos(script->get_instance_ID())+")";
return name;
@@ -340,8 +340,8 @@ String ScriptTextEditor::get_name() {
Ref<Texture> ScriptTextEditor::get_icon() {
- if (get_parent_control() && get_parent_control()->has_icon(script->get_type(),"EditorIcons")) {
- return get_parent_control()->get_icon(script->get_type(),"EditorIcons");
+ if (get_parent_control() && get_parent_control()->has_icon(script->get_class(),"EditorIcons")) {
+ return get_parent_control()->get_icon(script->get_class(),"EditorIcons");
}
return Ref<Texture>();
@@ -438,7 +438,7 @@ static void _find_changed_scripts_for_external_editor(Node* p_base, Node*p_curre
void ScriptEditor::_update_modified_scripts_for_external_editor(Ref<Script> p_for_script) {
- if (!bool(EditorSettings::get_singleton()->get("external_editor/use_external_editor")))
+ if (!bool(EditorSettings::get_singleton()->get("text_editor/external/use_external_editor")))
return;
Set<Ref<Script> > scripts;
@@ -465,7 +465,7 @@ void ScriptEditor::_update_modified_scripts_for_external_editor(Ref<Script> p_fo
if (last_date!=date) {
- Ref<Script> rel_script = ResourceLoader::load(script->get_path(),script->get_type(),true);
+ Ref<Script> rel_script = ResourceLoader::load(script->get_path(),script->get_class(),true);
ERR_CONTINUE(!rel_script.is_valid());
script->set_source_code( rel_script->get_source_code() );
script->set_last_modified_time( rel_script->get_last_modified_time() );
@@ -544,10 +544,10 @@ void ScriptTextEditor::_lookup_symbol(const String& p_symbol,int p_row, int p_co
StringName cname = result.class_name;
bool success;
while(true) {
- ObjectTypeDB::get_integer_constant(cname,result.class_member,&success);
+ ClassDB::get_integer_constant(cname,result.class_member,&success);
if (success) {
result.class_name=cname;
- cname=ObjectTypeDB::type_inherits_from(cname);
+ cname=ClassDB::get_parent_class(cname);
} else {
break;
}
@@ -566,9 +566,9 @@ void ScriptTextEditor::_lookup_symbol(const String& p_symbol,int p_row, int p_co
StringName cname = result.class_name;
while(true) {
- if (ObjectTypeDB::has_method(cname,result.class_member)) {
+ if (ClassDB::has_method(cname,result.class_member)) {
result.class_name=cname;
- cname=ObjectTypeDB::type_inherits_from(cname);
+ cname=ClassDB::get_parent_class(cname);
} else {
break;
}
@@ -973,19 +973,19 @@ void ScriptTextEditor::_edit_option(int p_op) {
void ScriptTextEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_validate_script",&ScriptTextEditor::_validate_script);
- ObjectTypeDB::bind_method("_load_theme_settings",&ScriptTextEditor::_load_theme_settings);
- ObjectTypeDB::bind_method("_breakpoint_toggled",&ScriptTextEditor::_breakpoint_toggled);
- ObjectTypeDB::bind_method("_edit_option",&ScriptTextEditor::_edit_option);
- ObjectTypeDB::bind_method("_goto_line",&ScriptTextEditor::_goto_line);
- ObjectTypeDB::bind_method("_lookup_symbol",&ScriptTextEditor::_lookup_symbol);
- ObjectTypeDB::bind_method("_text_edit_input_event", &ScriptTextEditor::_text_edit_input_event);
- ObjectTypeDB::bind_method("_color_changed", &ScriptTextEditor::_color_changed);
+ ClassDB::bind_method("_validate_script",&ScriptTextEditor::_validate_script);
+ ClassDB::bind_method("_load_theme_settings",&ScriptTextEditor::_load_theme_settings);
+ ClassDB::bind_method("_breakpoint_toggled",&ScriptTextEditor::_breakpoint_toggled);
+ ClassDB::bind_method("_edit_option",&ScriptTextEditor::_edit_option);
+ ClassDB::bind_method("_goto_line",&ScriptTextEditor::_goto_line);
+ ClassDB::bind_method("_lookup_symbol",&ScriptTextEditor::_lookup_symbol);
+ ClassDB::bind_method("_text_edit_gui_input", &ScriptTextEditor::_text_edit_gui_input);
+ ClassDB::bind_method("_color_changed", &ScriptTextEditor::_color_changed);
- ObjectTypeDB::bind_method("get_drag_data_fw",&ScriptTextEditor::get_drag_data_fw);
- ObjectTypeDB::bind_method("can_drop_data_fw",&ScriptTextEditor::can_drop_data_fw);
- ObjectTypeDB::bind_method("drop_data_fw",&ScriptTextEditor::drop_data_fw);
+ ClassDB::bind_method("get_drag_data_fw",&ScriptTextEditor::get_drag_data_fw);
+ ClassDB::bind_method("can_drop_data_fw",&ScriptTextEditor::can_drop_data_fw);
+ ClassDB::bind_method("drop_data_fw",&ScriptTextEditor::drop_data_fw);
}
@@ -1159,7 +1159,7 @@ void ScriptTextEditor::drop_data_fw(const Point2& p_point,const Variant& p_data,
}
-void ScriptTextEditor::_text_edit_input_event(const InputEvent& ev) {
+void ScriptTextEditor::_text_edit_gui_input(const InputEvent& ev) {
if (ev.type == InputEvent::MOUSE_BUTTON) {
InputEventMouseButton mb = ev.mouse_button;
if (mb.button_index == BUTTON_RIGHT && !mb.pressed) {
@@ -1226,20 +1226,21 @@ void ScriptTextEditor::_make_context_menu(bool p_selection, bool p_color) {
context_menu->clear();
if (p_selection) {
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/cut"));
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/copy"));
+ context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/cut"), EDIT_CUT);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/copy"), EDIT_COPY);
}
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/paste"));
+ context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/paste"), EDIT_PASTE);
context_menu->add_separator();
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/select_all"));
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/undo"));
+ context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/select_all"), EDIT_SELECT_ALL);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/undo"), EDIT_UNDO);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/redo"), EDIT_REDO);
if (p_selection) {
context_menu->add_separator();
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_left"));
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_right"));
- context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_comment"));
+ context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_left"), EDIT_INDENT_LEFT);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/indent_right"), EDIT_INDENT_RIGHT);
+ context_menu->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_comment"), EDIT_TOGGLE_COMMENT);
}
if (p_color) {
context_menu->add_separator();
@@ -1264,22 +1265,22 @@ ScriptTextEditor::ScriptTextEditor() {
update_settings();
code_editor->get_text_edit()->set_callhint_settings(
- EditorSettings::get_singleton()->get("text_editor/put_callhint_tooltip_below_current_line"),
- EditorSettings::get_singleton()->get("text_editor/callhint_tooltip_offset"));
+ EditorSettings::get_singleton()->get("text_editor/completion/put_callhint_tooltip_below_current_line"),
+ EditorSettings::get_singleton()->get("text_editor/completion/callhint_tooltip_offset"));
code_editor->get_text_edit()->set_select_identifiers_on_hover(true);
code_editor->get_text_edit()->set_context_menu_enabled(false);
- code_editor->get_text_edit()->connect("input_event", this, "_text_edit_input_event");
+ code_editor->get_text_edit()->connect("gui_input", this, "_text_edit_gui_input");
context_menu = memnew(PopupMenu);
add_child(context_menu);
- context_menu->connect("item_pressed", this, "_edit_option");
+ context_menu->connect("id_pressed", this, "_edit_option");
color_panel = memnew(PopupPanel);
add_child(color_panel);
color_picker = memnew(ColorPicker);
color_panel->add_child(color_picker);
- color_panel->set_child_rect(color_picker);
+ color_panel->set_child_rect(color_picker); //NOT
color_picker->connect("color_changed", this, "_color_changed");
edit_hb = memnew (HBoxContainer);
@@ -1309,7 +1310,7 @@ ScriptTextEditor::ScriptTextEditor() {
#endif
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/trim_trailing_whitespace"), EDIT_TRIM_TRAILING_WHITESAPCE);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/auto_indent"), EDIT_AUTO_INDENT);
- edit_menu->get_popup()->connect("item_pressed", this,"_edit_option");
+ edit_menu->get_popup()->connect("id_pressed", this,"_edit_option");
edit_menu->get_popup()->add_separator();
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/toggle_breakpoint"), DEBUG_TOGGLE_BREAKPOINT);
edit_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/remove_all_breakpoints"), DEBUG_REMOVE_ALL_BREAKPOINTS);
@@ -1329,7 +1330,7 @@ ScriptTextEditor::ScriptTextEditor() {
search_menu->get_popup()->add_separator();
search_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("script_text_editor/contextual_help"), HELP_CONTEXTUAL);
- search_menu->get_popup()->connect("item_pressed", this,"_edit_option");
+ search_menu->get_popup()->connect("id_pressed", this,"_edit_option");
edit_hb->add_child(edit_menu);
@@ -1363,8 +1364,12 @@ void ScriptTextEditor::register_editor() {
ED_SHORTCUT("script_text_editor/select_all", TTR("Select All"), KEY_MASK_CMD|KEY_A);
ED_SHORTCUT("script_text_editor/move_up", TTR("Move Up"), KEY_MASK_ALT|KEY_UP);
ED_SHORTCUT("script_text_editor/move_down", TTR("Move Down"), KEY_MASK_ALT|KEY_DOWN);
- ED_SHORTCUT("script_text_editor/indent_left", TTR("Indent Left"), KEY_MASK_ALT|KEY_LEFT);
- ED_SHORTCUT("script_text_editor/indent_right", TTR("Indent Right"), KEY_MASK_ALT|KEY_RIGHT);
+
+ //leave these at zero, same can be accomplished with tab/shift-tab, including selection
+ //the next/previous in history shortcut in this case makes a lot more sene.
+
+ ED_SHORTCUT("script_text_editor/indent_left", TTR("Indent Left"), 0);
+ ED_SHORTCUT("script_text_editor/indent_right", TTR("Indent Right"), 0);
ED_SHORTCUT("script_text_editor/toggle_comment", TTR("Toggle Comment"), KEY_MASK_CMD|KEY_K);
ED_SHORTCUT("script_text_editor/clone_down", TTR("Clone Down"), KEY_MASK_CMD|KEY_B);
#ifdef OSX_ENABLED
diff --git a/tools/editor/plugins/script_text_editor.h b/tools/editor/plugins/script_text_editor.h
index ceef50f0bc..215d0626f0 100644
--- a/tools/editor/plugins/script_text_editor.h
+++ b/tools/editor/plugins/script_text_editor.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -35,7 +35,7 @@
class ScriptTextEditor : public ScriptEditorBase {
- OBJ_TYPE( ScriptTextEditor, ScriptEditorBase );
+ GDCLASS( ScriptTextEditor, ScriptEditorBase );
CodeTextEditor *code_editor;
@@ -105,7 +105,7 @@ protected:
void _edit_option(int p_op);
void _make_context_menu(bool p_selection, bool p_color);
- void _text_edit_input_event(const InputEvent& ev);
+ void _text_edit_gui_input(const InputEvent& ev);
void _color_changed(const Color& p_color);
void _goto_line(int p_line) { goto_line(p_line); }
diff --git a/tools/editor/plugins/shader_editor_plugin.cpp b/tools/editor/plugins/shader_editor_plugin.cpp
index f67151d8e9..17b10ecd70 100644
--- a/tools/editor/plugins/shader_editor_plugin.cpp
+++ b/tools/editor/plugins/shader_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -37,7 +37,7 @@
#include "tools/editor/editor_node.h"
#include "tools/editor/property_editor.h"
#include "os/os.h"
-
+#include "servers/visual/shader_types.h"
/*** SETTINGS EDITOR ****/
@@ -51,19 +51,14 @@ Ref<Shader> ShaderTextEditor::get_edited_shader() const {
return shader;
}
-void ShaderTextEditor::set_edited_shader(const Ref<Shader>& p_shader,ShaderLanguage::ShaderType p_type) {
+void ShaderTextEditor::set_edited_shader(const Ref<Shader>& p_shader) {
shader=p_shader;
- type=p_type;
+
_load_theme_settings();
- if (p_type==ShaderLanguage::SHADER_MATERIAL_LIGHT || p_type==ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT)
- get_text_edit()->set_text(shader->get_light_code());
- else if (p_type==ShaderLanguage::SHADER_MATERIAL_VERTEX || p_type==ShaderLanguage::SHADER_CANVAS_ITEM_VERTEX)
- get_text_edit()->set_text(shader->get_vertex_code());
- else
- get_text_edit()->set_text(shader->get_fragment_code());
+ get_text_edit()->set_text(p_shader->get_code());
_line_col_changed();
@@ -77,35 +72,53 @@ void ShaderTextEditor::_load_theme_settings() {
/* keyword color */
- get_text_edit()->add_color_override("background_color", EDITOR_DEF("text_editor/background_color",Color(0,0,0,0)));
- get_text_edit()->add_color_override("completion_background_color", EDITOR_DEF("text_editor/completion_background_color", Color(0,0,0,0)));
- get_text_edit()->add_color_override("completion_selected_color", EDITOR_DEF("text_editor/completion_selected_color", Color::html("434244")));
- get_text_edit()->add_color_override("completion_existing_color", EDITOR_DEF("text_editor/completion_existing_color", Color::html("21dfdfdf")));
- get_text_edit()->add_color_override("completion_scroll_color", EDITOR_DEF("text_editor/completion_scroll_color", Color::html("ffffff")));
- get_text_edit()->add_color_override("completion_font_color", EDITOR_DEF("text_editor/completion_font_color", Color::html("aaaaaa")));
- get_text_edit()->add_color_override("font_color",EDITOR_DEF("text_editor/text_color",Color(0,0,0)));
- get_text_edit()->add_color_override("line_number_color",EDITOR_DEF("text_editor/line_number_color",Color(0,0,0)));
- get_text_edit()->add_color_override("caret_color",EDITOR_DEF("text_editor/caret_color",Color(0,0,0)));
- get_text_edit()->add_color_override("caret_background_color",EDITOR_DEF("text_editor/caret_background_color",Color(0,0,0)));
- get_text_edit()->add_color_override("font_selected_color",EDITOR_DEF("text_editor/text_selected_color",Color(1,1,1)));
- get_text_edit()->add_color_override("selection_color",EDITOR_DEF("text_editor/selection_color",Color(0.2,0.2,1)));
- get_text_edit()->add_color_override("brace_mismatch_color",EDITOR_DEF("text_editor/brace_mismatch_color",Color(1,0.2,0.2)));
- get_text_edit()->add_color_override("current_line_color",EDITOR_DEF("text_editor/current_line_color",Color(0.3,0.5,0.8,0.15)));
- get_text_edit()->add_color_override("word_highlighted_color",EDITOR_DEF("text_editor/word_highlighted_color",Color(0.8,0.9,0.9,0.15)));
- get_text_edit()->add_color_override("number_color",EDITOR_DEF("text_editor/number_color",Color(0.9,0.6,0.0,2)));
- get_text_edit()->add_color_override("function_color",EDITOR_DEF("text_editor/function_color",Color(0.4,0.6,0.8)));
- get_text_edit()->add_color_override("member_variable_color",EDITOR_DEF("text_editor/member_variable_color",Color(0.9,0.3,0.3)));
- get_text_edit()->add_color_override("mark_color", EDITOR_DEF("text_editor/mark_color", Color(1.0,0.4,0.4,0.4)));
- get_text_edit()->add_color_override("breakpoint_color", EDITOR_DEF("text_editor/breakpoint_color", Color(0.8,0.8,0.4,0.2)));
- get_text_edit()->add_color_override("search_result_color",EDITOR_DEF("text_editor/search_result_color",Color(0.05,0.25,0.05,1)));
- get_text_edit()->add_color_override("search_result_border_color",EDITOR_DEF("text_editor/search_result_border_color",Color(0.1,0.45,0.1,1)));
- get_text_edit()->add_color_override("symbol_color",EDITOR_DEF("text_editor/symbol_color",Color::hex(0x005291ff)));
-
- Color keyword_color= EDITOR_DEF("text_editor/keyword_color",Color(0.5,0.0,0.2));
+ get_text_edit()->add_color_override("background_color", EDITOR_DEF("text_editor/highlighting/background_color",Color(0,0,0,0)));
+ get_text_edit()->add_color_override("completion_background_color", EDITOR_DEF("text_editor/highlighting/completion_background_color", Color(0,0,0,0)));
+ get_text_edit()->add_color_override("completion_selected_color", EDITOR_DEF("text_editor/highlighting/completion_selected_color", Color::html("434244")));
+ get_text_edit()->add_color_override("completion_existing_color", EDITOR_DEF("text_editor/highlighting/completion_existing_color", Color::html("21dfdfdf")));
+ get_text_edit()->add_color_override("completion_scroll_color", EDITOR_DEF("text_editor/highlighting/completion_scroll_color", Color::html("ffffff")));
+ get_text_edit()->add_color_override("completion_font_color", EDITOR_DEF("text_editor/highlighting/completion_font_color", Color::html("aaaaaa")));
+ get_text_edit()->add_color_override("font_color",EDITOR_DEF("text_editor/highlighting/text_color",Color(0,0,0)));
+ get_text_edit()->add_color_override("line_number_color",EDITOR_DEF("text_editor/highlighting/line_number_color",Color(0,0,0)));
+ get_text_edit()->add_color_override("caret_color",EDITOR_DEF("text_editor/highlighting/caret_color",Color(0,0,0)));
+ get_text_edit()->add_color_override("caret_background_color",EDITOR_DEF("text_editor/highlighting/caret_background_color",Color(0,0,0)));
+ get_text_edit()->add_color_override("font_selected_color",EDITOR_DEF("text_editor/highlighting/text_selected_color",Color(1,1,1)));
+ get_text_edit()->add_color_override("selection_color",EDITOR_DEF("text_editor/highlighting/selection_color",Color(0.2,0.2,1)));
+ get_text_edit()->add_color_override("brace_mismatch_color",EDITOR_DEF("text_editor/highlighting/brace_mismatch_color",Color(1,0.2,0.2)));
+ get_text_edit()->add_color_override("current_line_color",EDITOR_DEF("text_editor/highlighting/current_line_color",Color(0.3,0.5,0.8,0.15)));
+ get_text_edit()->add_color_override("word_highlighted_color",EDITOR_DEF("text_editor/highlighting/word_highlighted_color",Color(0.8,0.9,0.9,0.15)));
+ get_text_edit()->add_color_override("number_color",EDITOR_DEF("text_editor/highlighting/number_color",Color(0.9,0.6,0.0,2)));
+ get_text_edit()->add_color_override("function_color",EDITOR_DEF("text_editor/highlighting/function_color",Color(0.4,0.6,0.8)));
+ get_text_edit()->add_color_override("member_variable_color",EDITOR_DEF("text_editor/highlighting/member_variable_color",Color(0.9,0.3,0.3)));
+ get_text_edit()->add_color_override("mark_color", EDITOR_DEF("text_editor/highlighting/mark_color", Color(1.0,0.4,0.4,0.4)));
+ get_text_edit()->add_color_override("breakpoint_color", EDITOR_DEF("text_editor/highlighting/breakpoint_color", Color(0.8,0.8,0.4,0.2)));
+ get_text_edit()->add_color_override("search_result_color",EDITOR_DEF("text_editor/highlighting/search_result_color",Color(0.05,0.25,0.05,1)));
+ get_text_edit()->add_color_override("search_result_border_color",EDITOR_DEF("text_editor/highlighting/search_result_border_color",Color(0.1,0.45,0.1,1)));
+ get_text_edit()->add_color_override("symbol_color",EDITOR_DEF("text_editor/highlighting/symbol_color",Color::hex(0x005291ff)));
+
+ Color keyword_color= EDITOR_DEF("text_editor/highlighting/keyword_color",Color(0.5,0.0,0.2));
List<String> keywords;
- ShaderLanguage::get_keyword_list(type,&keywords);
+ ShaderLanguage::get_keyword_list(&keywords);
+
+ if (shader.is_valid()) {
+
+
+ for(const Map< StringName, Map<StringName,ShaderLanguage::DataType> >::Element *E=ShaderTypes::get_singleton()->get_functions(VisualServer::ShaderMode(shader->get_mode())).front();E;E=E->next()) {
+
+ for (const Map<StringName,ShaderLanguage::DataType>::Element *F=E->get().front();F;F=F->next()) {
+ keywords.push_back(F->key());
+ }
+
+ }
+
+ for(const Set<String>::Element *E =ShaderTypes::get_singleton()->get_modes(VisualServer::ShaderMode(shader->get_mode())).front();E;E=E->next()) {
+
+ keywords.push_back(E->get());
+
+ }
+ }
for(List<String>::Element *E=keywords.front();E;E=E->next()) {
@@ -118,7 +131,7 @@ void ShaderTextEditor::_load_theme_settings() {
//colorize comments
- Color comment_color = EDITOR_DEF("text_editor/comment_color",Color::hex(0x797e7eff));
+ Color comment_color = EDITOR_DEF("text_editor/highlighting/comment_color",Color::hex(0x797e7eff));
get_text_edit()->add_color_region("/*","*/",comment_color,false);
get_text_edit()->add_color_region("//","",comment_color,false);
@@ -138,22 +151,34 @@ void ShaderTextEditor::_load_theme_settings() {
}*/
}
+void ShaderTextEditor::_code_complete_script(const String& p_code, List<String>* r_options) {
-void ShaderTextEditor::_validate_script() {
+ print_line("code complete");
+
+ ShaderLanguage sl;
+ String calltip;
+
+ Error err = sl.complete(p_code,ShaderTypes::get_singleton()->get_functions(VisualServer::ShaderMode(shader->get_mode())),ShaderTypes::get_singleton()->get_modes(VisualServer::ShaderMode(shader->get_mode())),r_options,calltip);
+
+ if (calltip!="") {
+ get_text_edit()->set_code_hint(calltip);
+ }
+}
- String errortxt;
- int line,col;
+void ShaderTextEditor::_validate_script() {
String code=get_text_edit()->get_text();
//List<StringName> params;
//shader->get_param_list(&params);
- Error err = ShaderLanguage::compile(code,type,NULL,NULL,&errortxt,&line,&col);
+ ShaderLanguage sl;
+
+ Error err = sl.compile(code,ShaderTypes::get_singleton()->get_functions(VisualServer::ShaderMode(shader->get_mode())),ShaderTypes::get_singleton()->get_modes(VisualServer::ShaderMode(shader->get_mode())));
if (err!=OK) {
- String error_text="error("+itos(line+1)+","+itos(col+1)+"): "+errortxt;
+ String error_text="error("+itos(sl.get_error_line())+"): "+sl.get_error_text();
set_error(error_text);
- get_text_edit()->set_line_as_marked(line,true);
+ get_text_edit()->set_line_as_marked(sl.get_error_line(),true);
} else {
for(int i=0;i<get_text_edit()->get_line_count();i++)
@@ -183,9 +208,7 @@ ShaderTextEditor::ShaderTextEditor() {
void ShaderEditor::_menu_option(int p_option) {
- ShaderTextEditor *current = tab_container->get_current_tab_control()->cast_to<ShaderTextEditor>();
- if (!current)
- return;
+ ShaderTextEditor *current = shader_editor;
switch(p_option) {
case EDIT_UNDO: {
@@ -241,24 +264,11 @@ void ShaderEditor::_menu_option(int p_option) {
}
}
-void ShaderEditor::_tab_changed(int p_which) {
-
- ShaderTextEditor *shader_editor = tab_container->get_tab_control(p_which)->cast_to<ShaderTextEditor>();
-
- if (shader_editor && is_inside_tree())
- shader_editor->get_text_edit()->grab_focus();
-
- ensure_select_current();
-}
void ShaderEditor::_notification(int p_what) {
if (p_what==NOTIFICATION_ENTER_TREE) {
- close->set_normal_texture( get_icon("Close","EditorIcons"));
- close->set_hover_texture( get_icon("CloseHover","EditorIcons"));
- close->set_pressed_texture( get_icon("Close","EditorIcons"));
- close->connect("pressed",this,"_close_callback");
}
if (p_what==NOTIFICATION_DRAW) {
@@ -361,27 +371,32 @@ void ShaderEditor::clear() {
void ShaderEditor::_params_changed() {
- fragment_editor->_validate_script();
- vertex_editor->_validate_script();
- light_editor->_validate_script();
+ shader_editor->_validate_script();
}
void ShaderEditor::_editor_settings_changed() {
- vertex_editor->update_editor_settings();
- fragment_editor->update_editor_settings();
- light_editor->update_editor_settings();
+ shader_editor->get_text_edit()->set_auto_brace_completion(EditorSettings::get_singleton()->get("text_editor/completion/auto_brace_complete"));
+ shader_editor->get_text_edit()->set_scroll_pass_end_of_file(EditorSettings::get_singleton()->get("text_editor/cursor/scroll_past_end_of_file"));
+ shader_editor->get_text_edit()->set_tab_size(EditorSettings::get_singleton()->get("text_editor/indent/tab_size"));
+ shader_editor->get_text_edit()->set_draw_tabs(EditorSettings::get_singleton()->get("text_editor/indent/draw_tabs"));
+ shader_editor->get_text_edit()->set_show_line_numbers(EditorSettings::get_singleton()->get("text_editor/line_numbers/show_line_numbers"));
+ shader_editor->get_text_edit()->set_syntax_coloring(EditorSettings::get_singleton()->get("text_editor/highlighting/syntax_highlighting"));
+ shader_editor->get_text_edit()->set_highlight_all_occurrences(EditorSettings::get_singleton()->get("text_editor/highlighting/highlight_all_occurrences"));
+ shader_editor->get_text_edit()->cursor_set_blink_enabled(EditorSettings::get_singleton()->get("text_editor/cursor/caret_blink"));
+ shader_editor->get_text_edit()->cursor_set_blink_speed(EditorSettings::get_singleton()->get("text_editor/cursor/caret_blink_speed"));
+ shader_editor->get_text_edit()->add_constant_override("line_spacing", EditorSettings::get_singleton()->get("text_editor/theme/line_spacing"));
+ shader_editor->get_text_edit()->cursor_set_block_mode(EditorSettings::get_singleton()->get("text_editor/cursor/block_caret"));
}
void ShaderEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_editor_settings_changed",&ShaderEditor::_editor_settings_changed);
- ObjectTypeDB::bind_method("_tab_changed",&ShaderEditor::_tab_changed);
- ObjectTypeDB::bind_method("_menu_option",&ShaderEditor::_menu_option);
- ObjectTypeDB::bind_method("_params_changed",&ShaderEditor::_params_changed);
- ObjectTypeDB::bind_method("_close_callback",&ShaderEditor::_close_callback);
- ObjectTypeDB::bind_method("apply_shaders",&ShaderEditor::apply_shaders);
-// ObjectTypeDB::bind_method("_close_current_tab",&ShaderEditor::_close_current_tab);
+ ClassDB::bind_method("_editor_settings_changed",&ShaderEditor::_editor_settings_changed);
+
+ ClassDB::bind_method("_menu_option",&ShaderEditor::_menu_option);
+ ClassDB::bind_method("_params_changed",&ShaderEditor::_params_changed);
+ ClassDB::bind_method("apply_shaders",&ShaderEditor::apply_shaders);
+// ClassDB::bind_method("_close_current_tab",&ShaderEditor::_close_current_tab);
}
void ShaderEditor::ensure_select_current() {
@@ -405,16 +420,7 @@ void ShaderEditor::edit(const Ref<Shader>& p_shader) {
shader=p_shader;
- if (shader->get_mode()==Shader::MODE_MATERIAL) {
- vertex_editor->set_edited_shader(p_shader,ShaderLanguage::SHADER_MATERIAL_VERTEX);
- fragment_editor->set_edited_shader(p_shader,ShaderLanguage::SHADER_MATERIAL_FRAGMENT);
- light_editor->set_edited_shader(shader,ShaderLanguage::SHADER_MATERIAL_LIGHT);
- } else if (shader->get_mode()==Shader::MODE_CANVAS_ITEM) {
-
- vertex_editor->set_edited_shader(p_shader,ShaderLanguage::SHADER_CANVAS_ITEM_VERTEX);
- fragment_editor->set_edited_shader(p_shader,ShaderLanguage::SHADER_CANVAS_ITEM_FRAGMENT);
- light_editor->set_edited_shader(shader,ShaderLanguage::SHADER_CANVAS_ITEM_LIGHT);
- }
+ shader_editor->set_edited_shader(p_shader);
//vertex_editor->set_edited_shader(shader,ShaderLanguage::SHADER_MATERIAL_VERTEX);
// see if already has it
@@ -438,35 +444,21 @@ void ShaderEditor::apply_shaders() {
if (shader.is_valid()) {
- shader->set_code(vertex_editor->get_text_edit()->get_text(),fragment_editor->get_text_edit()->get_text(),light_editor->get_text_edit()->get_text(),0,0);
+ shader->set_code(shader_editor->get_text_edit()->get_text());
shader->set_edited(true);
}
}
-void ShaderEditor::_close_callback() {
-
- hide();
-}
-
ShaderEditor::ShaderEditor() {
- tab_container = memnew( TabContainer );
- add_child(tab_container);
- tab_container->set_area_as_parent_rect();
- tab_container->set_begin(Point2(0,0));
- //tab_container->set_begin(Point2(0,0));
-
- close = memnew( TextureButton );
- close->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_END,20);
- close->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_END,4);
- close->set_anchor_and_margin(MARGIN_TOP,ANCHOR_BEGIN,2);
- add_child(close);
+ HBoxContainer *hbc = memnew( HBoxContainer);
+ add_child(hbc);
edit_menu = memnew( MenuButton );
- add_child(edit_menu);
+ hbc->add_child(edit_menu);
edit_menu->set_pos(Point2(5,-1));
edit_menu->set_text(TTR("Edit"));
edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/undo", TTR("Undo"), KEY_MASK_CMD|KEY_Z), EDIT_UNDO);
@@ -477,11 +469,11 @@ ShaderEditor::ShaderEditor() {
edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/paste", TTR("Paste"), KEY_MASK_CMD|KEY_V), EDIT_PASTE);
edit_menu->get_popup()->add_separator();
edit_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/select_all", TTR("Select All"), KEY_MASK_CMD|KEY_A), EDIT_SELECT_ALL);
- edit_menu->get_popup()->connect("item_pressed", this,"_menu_option");
+ edit_menu->get_popup()->connect("id_pressed", this,"_menu_option");
search_menu = memnew( MenuButton );
- add_child(search_menu);
+ hbc->add_child(search_menu);
search_menu->set_pos(Point2(38,-1));
search_menu->set_text(TTR("Search"));
search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find", TTR("Find.."), KEY_MASK_CMD|KEY_F), SEARCH_FIND);
@@ -491,37 +483,18 @@ ShaderEditor::ShaderEditor() {
search_menu->get_popup()->add_separator();
// search_menu->get_popup()->add_item("Locate Symbol..",SEARCH_LOCATE_SYMBOL,KEY_MASK_CMD|KEY_K);
search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/goto_line", TTR("Goto Line.."), KEY_MASK_CMD|KEY_L), SEARCH_GOTO_LINE);
- search_menu->get_popup()->connect("item_pressed", this,"_menu_option");
-
-
- tab_container->connect("tab_changed", this,"_tab_changed");
-
- erase_tab_confirm = memnew( ConfirmationDialog );
- add_child(erase_tab_confirm);
- erase_tab_confirm->connect("confirmed", this,"_close_current_tab");
+ search_menu->get_popup()->connect("id_pressed", this,"_menu_option");
goto_line_dialog = memnew(GotoLineDialog);
add_child(goto_line_dialog);
- vertex_editor = memnew( ShaderTextEditor );
- tab_container->add_child(vertex_editor);
- vertex_editor->set_name(TTR("Vertex"));
+ shader_editor = memnew( ShaderTextEditor );
+ add_child(shader_editor);
+ shader_editor->set_v_size_flags(SIZE_EXPAND_FILL);
- fragment_editor = memnew( ShaderTextEditor );
- tab_container->add_child(fragment_editor);
- fragment_editor->set_name(TTR("Fragment"));
- light_editor = memnew( ShaderTextEditor );
- tab_container->add_child(light_editor);
- light_editor->set_name(TTR("Lighting"));
-
- tab_container->set_current_tab(1);
-
-
- vertex_editor->connect("script_changed", this,"apply_shaders");
- fragment_editor->connect("script_changed", this,"apply_shaders");
- light_editor->connect("script_changed", this,"apply_shaders");
+ shader_editor->connect("script_changed", this,"apply_shaders");
EditorSettings::get_singleton()->connect("settings_changed",this,"_editor_settings_changed");
_editor_settings_changed();
@@ -531,15 +504,7 @@ ShaderEditor::ShaderEditor() {
void ShaderEditorPlugin::edit(Object *p_object) {
Shader* s = p_object->cast_to<Shader>();
- if (!s || s->cast_to<ShaderGraph>()) {
- shader_editor->hide(); //Dont edit ShaderGraph
- return;
- }
-
- if (_2d && s->get_mode()==Shader::MODE_CANVAS_ITEM)
- shader_editor->edit(s);
- else if (!_2d && s->get_mode()==Shader::MODE_MATERIAL)
- shader_editor->edit(s);
+ shader_editor->edit(s);
}
@@ -547,24 +512,25 @@ bool ShaderEditorPlugin::handles(Object *p_object) const {
bool handles = true;
Shader *shader=p_object->cast_to<Shader>();
- if (!shader || shader->cast_to<ShaderGraph>()) // Dont handle ShaderGraph's
- handles = false;
- if (handles && _2d)
- handles = shader->get_mode()==Shader::MODE_CANVAS_ITEM;
- else if (handles && !_2d)
- return shader->get_mode()==Shader::MODE_MATERIAL;
-
- if (!handles)
- shader_editor->hide();
- return handles;
+ //if (!shader || shader->cast_to<ShaderGraph>()) // Dont handle ShaderGraph's
+ // handles = false;
+
+ return shader!=NULL;
}
void ShaderEditorPlugin::make_visible(bool p_visible) {
if (p_visible) {
- shader_editor->show();
+ button->show();
+ editor->make_bottom_panel_item_visible(shader_editor);
+
} else {
+
+ button->hide();
+ if (shader_editor->is_visible())
+ editor->hide_bottom_panel();
shader_editor->apply_shaders();
+
}
}
@@ -598,19 +564,14 @@ void ShaderEditorPlugin::apply_changes() {
shader_editor->apply_shaders();
}
-ShaderEditorPlugin::ShaderEditorPlugin(EditorNode *p_node, bool p_2d) {
+ShaderEditorPlugin::ShaderEditorPlugin(EditorNode *p_node) {
+
editor=p_node;
shader_editor = memnew( ShaderEditor );
- _2d=p_2d;
- if (p_2d)
- add_control_to_container(CONTAINER_CANVAS_EDITOR_BOTTOM,shader_editor);
- else
- add_control_to_container(CONTAINER_SPATIAL_EDITOR_BOTTOM,shader_editor);
-// editor->get_viewport()->add_child(shader_editor);
-// shader_editor->set_area_as_parent_rect();
- shader_editor->hide();
+ shader_editor->set_custom_minimum_size(Size2(0,300));
+ button=editor->add_bottom_panel_item("Shader",shader_editor);
}
@@ -618,3 +579,4 @@ ShaderEditorPlugin::ShaderEditorPlugin(EditorNode *p_node, bool p_2d) {
ShaderEditorPlugin::~ShaderEditorPlugin() {
}
+
diff --git a/tools/editor/plugins/shader_editor_plugin.h b/tools/editor/plugins/shader_editor_plugin.h
index 9219a1fbc2..e94b4d9c25 100644
--- a/tools/editor/plugins/shader_editor_plugin.h
+++ b/tools/editor/plugins/shader_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -38,33 +38,34 @@
#include "scene/resources/shader.h"
#include "servers/visual/shader_language.h"
-
class ShaderTextEditor : public CodeTextEditor {
- OBJ_TYPE( ShaderTextEditor, CodeTextEditor );
+ GDCLASS( ShaderTextEditor, CodeTextEditor );
Ref<Shader> shader;
- ShaderLanguage::ShaderType type;
protected:
static void _bind_methods();
virtual void _load_theme_settings();
+
+ virtual void _code_complete_script(const String& p_code, List<String>* r_options);
+
public:
virtual void _validate_script();
Ref<Shader> get_edited_shader() const;
- void set_edited_shader(const Ref<Shader>& p_shader,ShaderLanguage::ShaderType p_type);
+ void set_edited_shader(const Ref<Shader>& p_shader);
ShaderTextEditor();
};
-class ShaderEditor : public Control {
+class ShaderEditor : public VBoxContainer {
- OBJ_TYPE(ShaderEditor, Control );
+ GDCLASS(ShaderEditor, VBoxContainer );
enum {
@@ -88,22 +89,17 @@ class ShaderEditor : public Control {
MenuButton *settings_menu;
uint64_t idle;
- TabContainer *tab_container;
GotoLineDialog *goto_line_dialog;
ConfirmationDialog *erase_tab_confirm;
- TextureButton *close;
- ShaderTextEditor *vertex_editor;
- ShaderTextEditor *fragment_editor;
- ShaderTextEditor *light_editor;
+ ShaderTextEditor *shader_editor;
+
- void _tab_changed(int p_which);
void _menu_option(int p_optin);
void _params_changed();
mutable Ref<Shader> shader;
- void _close_callback();
void _editor_settings_changed();
@@ -129,11 +125,13 @@ public:
class ShaderEditorPlugin : public EditorPlugin {
- OBJ_TYPE( ShaderEditorPlugin, EditorPlugin );
+ GDCLASS( ShaderEditorPlugin, EditorPlugin );
bool _2d;
ShaderEditor *shader_editor;
EditorNode *editor;
+ Button *button;
+
public:
virtual String get_name() const { return "Shader"; }
@@ -150,8 +148,9 @@ public:
virtual void save_external_data();
virtual void apply_changes();
- ShaderEditorPlugin(EditorNode *p_node,bool p_2d);
+ ShaderEditorPlugin(EditorNode *p_node);
~ShaderEditorPlugin();
};
+
#endif
diff --git a/tools/editor/plugins/shader_graph_editor_plugin.cpp b/tools/editor/plugins/shader_graph_editor_plugin.cpp
index 3ab906f84e..2ff9f94d99 100644
--- a/tools/editor/plugins/shader_graph_editor_plugin.cpp
+++ b/tools/editor/plugins/shader_graph_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -28,6 +28,7 @@
/*************************************************************************/
#include "shader_graph_editor_plugin.h"
+#if 0
#include "scene/gui/check_box.h"
#include "scene/gui/menu_button.h"
@@ -36,7 +37,7 @@
#include "os/keyboard.h"
#include "canvas_item_editor_plugin.h"
-void GraphColorRampEdit::_input_event(const InputEvent& p_event) {
+void GraphColorRampEdit::_gui_input(const InputEvent& p_event) {
if (p_event.type==InputEvent::KEY && p_event.key.pressed && p_event.key.scancode==KEY_DELETE && grabbed!=-1) {
@@ -295,8 +296,8 @@ Vector<Color> GraphColorRampEdit::get_colors() const{
void GraphColorRampEdit::_bind_methods(){
- ObjectTypeDB::bind_method(_MD("_input_event"),&GraphColorRampEdit::_input_event);
- ObjectTypeDB::bind_method(_MD("_color_changed"),&GraphColorRampEdit::_color_changed);
+ ClassDB::bind_method(_MD("_gui_input"),&GraphColorRampEdit::_gui_input);
+ ClassDB::bind_method(_MD("_color_changed"),&GraphColorRampEdit::_color_changed);
ADD_SIGNAL(MethodInfo("ramp_changed"));
}
@@ -309,13 +310,13 @@ GraphColorRampEdit::GraphColorRampEdit(){
popup = memnew( PopupPanel );
picker = memnew( ColorPicker );
popup->add_child(picker);
- popup->set_child_rect(picker);
+ /popup->set_child_rect(picker);
add_child(popup);
}
////////////
-void GraphCurveMapEdit::_input_event(const InputEvent& p_event) {
+void GraphCurveMapEdit::_gui_input(const InputEvent& p_event) {
if (p_event.type==InputEvent::KEY && p_event.key.pressed && p_event.key.scancode==KEY_DELETE && grabbed!=-1) {
@@ -657,7 +658,7 @@ Vector<Vector2> GraphCurveMapEdit::get_points() const {
void GraphCurveMapEdit::_bind_methods(){
- ObjectTypeDB::bind_method(_MD("_input_event"),&GraphCurveMapEdit::_input_event);
+ ClassDB::bind_method(_MD("_gui_input"),&GraphCurveMapEdit::_gui_input);
ADD_SIGNAL(MethodInfo("curve_changed"));
}
@@ -985,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];
@@ -1000,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"));
@@ -1026,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];
}
@@ -1037,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"));
@@ -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++)
@@ -2130,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;
@@ -2183,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;
@@ -2319,7 +2320,7 @@ void ShaderGraphView::_create_node(int p_id) {
tex->set_custom_minimum_size(Size2(80,80));
tex->set_drag_forwarding(this);
gn->add_child(tex);
- tex->set_ignore_mouse(false);
+ tex->set_mouse_filter(MOUSE_FILTER_PASS);
tex->set_texture(graph->texture_input_node_get_value(type,p_id));
ToolButton *edit = memnew( ToolButton );
edit->set_text("edit..");
@@ -2694,49 +2695,49 @@ void ShaderGraphView::add_node(int p_type, const Vector2 &location) {
void ShaderGraphView::_bind_methods() {
- ObjectTypeDB::bind_method("_update_graph",&ShaderGraphView::_update_graph);
- ObjectTypeDB::bind_method("_begin_node_move", &ShaderGraphView::_begin_node_move);
- ObjectTypeDB::bind_method("_node_moved",&ShaderGraphView::_node_moved);
- ObjectTypeDB::bind_method("_end_node_move", &ShaderGraphView::_end_node_move);
- ObjectTypeDB::bind_method("_move_node",&ShaderGraphView::_move_node);
- ObjectTypeDB::bind_method("_node_removed",&ShaderGraphView::_node_removed);
- ObjectTypeDB::bind_method("_connection_request",&ShaderGraphView::_connection_request);
- ObjectTypeDB::bind_method("_disconnection_request",&ShaderGraphView::_disconnection_request);
- ObjectTypeDB::bind_method("_duplicate_nodes_request", &ShaderGraphView::_duplicate_nodes_request);
- ObjectTypeDB::bind_method("_duplicate_nodes", &ShaderGraphView::_duplicate_nodes);
- ObjectTypeDB::bind_method("_delete_nodes_request", &ShaderGraphView::_delete_nodes_request);
-
- ObjectTypeDB::bind_method("_default_changed",&ShaderGraphView::_default_changed);
- ObjectTypeDB::bind_method("_scalar_const_changed",&ShaderGraphView::_scalar_const_changed);
- ObjectTypeDB::bind_method("_vec_const_changed",&ShaderGraphView::_vec_const_changed);
- ObjectTypeDB::bind_method("_rgb_const_changed",&ShaderGraphView::_rgb_const_changed);
- ObjectTypeDB::bind_method("_xform_const_changed",&ShaderGraphView::_xform_const_changed);
- ObjectTypeDB::bind_method("_scalar_op_changed",&ShaderGraphView::_scalar_op_changed);
- ObjectTypeDB::bind_method("_vec_op_changed",&ShaderGraphView::_vec_op_changed);
- ObjectTypeDB::bind_method("_vec_scalar_op_changed",&ShaderGraphView::_vec_scalar_op_changed);
- ObjectTypeDB::bind_method("_rgb_op_changed",&ShaderGraphView::_rgb_op_changed);
- ObjectTypeDB::bind_method("_xform_inv_rev_changed",&ShaderGraphView::_xform_inv_rev_changed);
- ObjectTypeDB::bind_method("_scalar_func_changed",&ShaderGraphView::_scalar_func_changed);
- ObjectTypeDB::bind_method("_vec_func_changed",&ShaderGraphView::_vec_func_changed);
- ObjectTypeDB::bind_method("_scalar_input_changed",&ShaderGraphView::_scalar_input_changed);
- ObjectTypeDB::bind_method("_vec_input_changed",&ShaderGraphView::_vec_input_changed);
- ObjectTypeDB::bind_method("_xform_input_changed",&ShaderGraphView::_xform_input_changed);
- ObjectTypeDB::bind_method("_rgb_input_changed",&ShaderGraphView::_rgb_input_changed);
- ObjectTypeDB::bind_method("_tex_input_change",&ShaderGraphView::_tex_input_change);
- ObjectTypeDB::bind_method("_cube_input_change",&ShaderGraphView::_cube_input_change);
- ObjectTypeDB::bind_method("_input_name_changed",&ShaderGraphView::_input_name_changed);
- ObjectTypeDB::bind_method("_tex_edited",&ShaderGraphView::_tex_edited);
- ObjectTypeDB::bind_method("_variant_edited",&ShaderGraphView::_variant_edited);
- ObjectTypeDB::bind_method("_cube_edited",&ShaderGraphView::_cube_edited);
- ObjectTypeDB::bind_method("_comment_edited",&ShaderGraphView::_comment_edited);
- ObjectTypeDB::bind_method("_color_ramp_changed",&ShaderGraphView::_color_ramp_changed);
- ObjectTypeDB::bind_method("_curve_changed",&ShaderGraphView::_curve_changed);
-
- ObjectTypeDB::bind_method(_MD("get_drag_data_fw"), &ShaderGraphView::get_drag_data_fw);
- ObjectTypeDB::bind_method(_MD("can_drop_data_fw"), &ShaderGraphView::can_drop_data_fw);
- ObjectTypeDB::bind_method(_MD("drop_data_fw"), &ShaderGraphView::drop_data_fw);
-
- ObjectTypeDB::bind_method("_sg_updated",&ShaderGraphView::_sg_updated);
+ ClassDB::bind_method("_update_graph",&ShaderGraphView::_update_graph);
+ ClassDB::bind_method("_begin_node_move", &ShaderGraphView::_begin_node_move);
+ ClassDB::bind_method("_node_moved",&ShaderGraphView::_node_moved);
+ ClassDB::bind_method("_end_node_move", &ShaderGraphView::_end_node_move);
+ ClassDB::bind_method("_move_node",&ShaderGraphView::_move_node);
+ ClassDB::bind_method("_node_removed",&ShaderGraphView::_node_removed);
+ ClassDB::bind_method("_connection_request",&ShaderGraphView::_connection_request);
+ ClassDB::bind_method("_disconnection_request",&ShaderGraphView::_disconnection_request);
+ ClassDB::bind_method("_duplicate_nodes_request", &ShaderGraphView::_duplicate_nodes_request);
+ ClassDB::bind_method("_duplicate_nodes", &ShaderGraphView::_duplicate_nodes);
+ ClassDB::bind_method("_delete_nodes_request", &ShaderGraphView::_delete_nodes_request);
+
+ ClassDB::bind_method("_default_changed",&ShaderGraphView::_default_changed);
+ ClassDB::bind_method("_scalar_const_changed",&ShaderGraphView::_scalar_const_changed);
+ ClassDB::bind_method("_vec_const_changed",&ShaderGraphView::_vec_const_changed);
+ ClassDB::bind_method("_rgb_const_changed",&ShaderGraphView::_rgb_const_changed);
+ ClassDB::bind_method("_xform_const_changed",&ShaderGraphView::_xform_const_changed);
+ ClassDB::bind_method("_scalar_op_changed",&ShaderGraphView::_scalar_op_changed);
+ ClassDB::bind_method("_vec_op_changed",&ShaderGraphView::_vec_op_changed);
+ ClassDB::bind_method("_vec_scalar_op_changed",&ShaderGraphView::_vec_scalar_op_changed);
+ ClassDB::bind_method("_rgb_op_changed",&ShaderGraphView::_rgb_op_changed);
+ ClassDB::bind_method("_xform_inv_rev_changed",&ShaderGraphView::_xform_inv_rev_changed);
+ ClassDB::bind_method("_scalar_func_changed",&ShaderGraphView::_scalar_func_changed);
+ ClassDB::bind_method("_vec_func_changed",&ShaderGraphView::_vec_func_changed);
+ ClassDB::bind_method("_scalar_input_changed",&ShaderGraphView::_scalar_input_changed);
+ ClassDB::bind_method("_vec_input_changed",&ShaderGraphView::_vec_input_changed);
+ ClassDB::bind_method("_xform_input_changed",&ShaderGraphView::_xform_input_changed);
+ ClassDB::bind_method("_rgb_input_changed",&ShaderGraphView::_rgb_input_changed);
+ ClassDB::bind_method("_tex_input_change",&ShaderGraphView::_tex_input_change);
+ ClassDB::bind_method("_cube_input_change",&ShaderGraphView::_cube_input_change);
+ ClassDB::bind_method("_input_name_changed",&ShaderGraphView::_input_name_changed);
+ ClassDB::bind_method("_tex_edited",&ShaderGraphView::_tex_edited);
+ ClassDB::bind_method("_variant_edited",&ShaderGraphView::_variant_edited);
+ ClassDB::bind_method("_cube_edited",&ShaderGraphView::_cube_edited);
+ ClassDB::bind_method("_comment_edited",&ShaderGraphView::_comment_edited);
+ ClassDB::bind_method("_color_ramp_changed",&ShaderGraphView::_color_ramp_changed);
+ ClassDB::bind_method("_curve_changed",&ShaderGraphView::_curve_changed);
+
+ ClassDB::bind_method(_MD("get_drag_data_fw"), &ShaderGraphView::get_drag_data_fw);
+ ClassDB::bind_method(_MD("can_drop_data_fw"), &ShaderGraphView::can_drop_data_fw);
+ ClassDB::bind_method(_MD("drop_data_fw"), &ShaderGraphView::drop_data_fw);
+
+ ClassDB::bind_method("_sg_updated",&ShaderGraphView::_sg_updated);
}
ShaderGraphView::ShaderGraphView(ShaderGraph::ShaderType p_type) {
@@ -2806,7 +2807,7 @@ void ShaderGraphEditor::_notification(int p_what) {
if (addsep)
popup->add_separator();
}
- popup->connect("item_pressed",this,"_add_node");
+ popup->connect("id_pressed",this,"_add_node");
}
@@ -2814,8 +2815,8 @@ void ShaderGraphEditor::_notification(int p_what) {
void ShaderGraphEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_add_node",&ShaderGraphEditor::_add_node);
- ObjectTypeDB::bind_method("_popup_requested",&ShaderGraphEditor::_popup_requested);
+ ClassDB::bind_method("_add_node",&ShaderGraphEditor::_add_node);
+ ClassDB::bind_method("_popup_requested",&ShaderGraphEditor::_popup_requested);
}
@@ -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..477a45bd1f 100644
--- a/tools/editor/plugins/shader_graph_editor_plugin.h
+++ b/tools/editor/plugins/shader_graph_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -43,10 +43,10 @@
@author Juan Linietsky <reduzio@gmail.com>
*/
-
+#if 0
class GraphColorRampEdit : public Control {
- OBJ_TYPE(GraphColorRampEdit,Control);
+ GDCLASS(GraphColorRampEdit,Control);
struct Point {
@@ -70,7 +70,7 @@ class GraphColorRampEdit : public Control {
void _color_changed(const Color& p_color);
protected:
- void _input_event(const InputEvent& p_event);
+ void _gui_input(const InputEvent& p_event);
void _notification(int p_what);
static void _bind_methods();
public:
@@ -85,7 +85,7 @@ public:
class GraphCurveMapEdit : public Control {
- OBJ_TYPE(GraphCurveMapEdit,Control);
+ GDCLASS(GraphCurveMapEdit,Control);
struct Point {
@@ -104,7 +104,7 @@ class GraphCurveMapEdit : public Control {
void _plot_curve(const Vector2& p_a,const Vector2& p_b,const Vector2& p_c,const Vector2& p_d);
protected:
- void _input_event(const InputEvent& p_event);
+ void _gui_input(const InputEvent& p_event);
void _notification(int p_what);
static void _bind_methods();
public:
@@ -117,7 +117,7 @@ public:
class ShaderGraphView : public Control {
- OBJ_TYPE(ShaderGraphView,Control);
+ GDCLASS(ShaderGraphView,Control);
@@ -198,7 +198,7 @@ public:
class ShaderGraphEditor : public VBoxContainer {
- OBJ_TYPE(ShaderGraphEditor,VBoxContainer);
+ GDCLASS(ShaderGraphEditor,VBoxContainer);
PopupMenu *popup;
TabContainer *tabs;
@@ -220,7 +220,7 @@ public:
class ShaderGraphEditorPlugin : public EditorPlugin {
- OBJ_TYPE( ShaderGraphEditorPlugin, EditorPlugin );
+ GDCLASS( ShaderGraphEditorPlugin, EditorPlugin );
bool _2d;
ShaderGraphEditor *shader_editor;
@@ -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 6dcc71422a..5b60e4fe05 100644
--- a/tools/editor/plugins/spatial_editor_plugin.cpp
+++ b/tools/editor/plugins/spatial_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -61,8 +61,8 @@ void SpatialEditorViewport::_update_camera() {
Transform camera_transform;
camera_transform.translate(cursor.pos);
- camera_transform.basis.rotate(Vector3(0, 1, 0), cursor.y_rot);
- camera_transform.basis.rotate(Vector3(1, 0, 0), cursor.x_rot);
+ camera_transform.basis.rotate(Vector3(0, 1, 0), -cursor.y_rot);
+ camera_transform.basis.rotate(Vector3(1, 0, 0), -cursor.x_rot);
if (orthogonal)
camera_transform.translate(0, 0, 4096);
@@ -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;
@@ -475,8 +474,8 @@ Vector3 SpatialEditorViewport::_get_screen_to_space(const Vector3& p_pos) {
Transform camera_transform;
camera_transform.translate( cursor.pos );
- camera_transform.basis.rotate(Vector3(0,1,0),cursor.y_rot);
- camera_transform.basis.rotate(Vector3(1,0,0),cursor.x_rot);
+ camera_transform.basis.rotate(Vector3(0,1,0),-cursor.y_rot);
+ camera_transform.basis.rotate(Vector3(1,0,0),-cursor.x_rot);
camera_transform.translate(0,0,cursor.distance);
return camera_transform.xform(Vector3( ((p_pos.x/get_size().width)*2.0-1.0)*screen_w, ((1.0-(p_pos.y/get_size().height))*2.0-1.0)*screen_h,-get_znear()));
@@ -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>();
@@ -795,7 +792,7 @@ void SpatialEditorViewport::_list_select(InputEventMouseButton b) {
if (spat->has_meta("_editor_icon"))
icon=spat->get_meta("_editor_icon");
else
- icon=get_icon( has_icon(spat->get_type(),"EditorIcons")?spat->get_type():String("Object"),"EditorIcons");
+ icon=get_icon( has_icon(spat->get_class(),"EditorIcons")?spat->get_class():String("Object"),"EditorIcons");
String node_path="/"+root_name+"/"+root_path.rel_path_to(spat->get_path());
@@ -803,7 +800,7 @@ void SpatialEditorViewport::_list_select(InputEventMouseButton b) {
selection_menu->set_item_icon(i, icon );
selection_menu->set_item_metadata(i, node_path);
selection_menu->set_item_tooltip(i,String(spat->get_name())+
- "\nType: "+spat->get_type()+"\nPath: "+node_path);
+ "\nType: "+spat->get_class()+"\nPath: "+node_path);
}
selection_menu->set_global_pos(Vector2( b.global_x, b.global_y ));
@@ -827,7 +824,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
EditorPluginList *over_plugin_list = en->get_editor_plugins_over();
if (!over_plugin_list->empty()) {
- bool discard = over_plugin_list->forward_spatial_input_event(camera,p_event);
+ bool discard = over_plugin_list->forward_spatial_gui_input(camera,p_event);
if (discard)
return;
}
@@ -857,7 +854,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
} break;
case BUTTON_RIGHT: {
- NavigationScheme nav_scheme = _get_navigation_schema("3d_editor/navigation_scheme");
+ NavigationScheme nav_scheme = _get_navigation_schema("editors/3d/navigation_scheme");
if (b.pressed && _edit.gizmo.is_valid()) {
//restore
@@ -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;
@@ -900,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++) {
@@ -1016,7 +1014,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
if (b.pressed) {
- NavigationScheme nav_scheme = _get_navigation_schema("3d_editor/navigation_scheme");
+ NavigationScheme nav_scheme = _get_navigation_schema("editors/3d/navigation_scheme");
if ( (nav_scheme==NAVIGATION_MAYA || nav_scheme==NAVIGATION_MODO) && b.mod.alt) {
break;
}
@@ -1253,7 +1251,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
}
- NavigationScheme nav_scheme = _get_navigation_schema("3d_editor/navigation_scheme");
+ NavigationScheme nav_scheme = _get_navigation_schema("editors/3d/navigation_scheme");
NavigationMode nav_mode = NAVIGATION_NONE;
if (_edit.gizmo.is_valid()) {
@@ -1486,7 +1484,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
Transform r;
- r.basis.rotate(plane.normal,-angle);
+ r.basis.rotate(plane.normal,angle);
List<Node*> &selection = editor_selection->get_selected_node_list();
@@ -1560,7 +1558,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
nav_mode = NAVIGATION_PAN;
}
- } else if (EditorSettings::get_singleton()->get("3d_editor/emulate_3_button_mouse")) {
+ } else if (EditorSettings::get_singleton()->get("editors/3d/emulate_3_button_mouse")) {
// Handle trackpad (no external mouse) use case
int mod = 0;
if (m.mod.shift)
@@ -1593,8 +1591,8 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
Transform camera_transform;
camera_transform.translate(cursor.pos);
- camera_transform.basis.rotate(Vector3(0,1,0),cursor.y_rot);
- camera_transform.basis.rotate(Vector3(1,0,0),cursor.x_rot);
+ camera_transform.basis.rotate(Vector3(0,1,0),-cursor.y_rot);
+ camera_transform.basis.rotate(Vector3(1,0,0),-cursor.x_rot);
Vector3 translation(-m.relative_x*pan_speed,m.relative_y*pan_speed,0);
translation*=cursor.distance/DISTANCE_DEFAULT;
camera_transform.translate(translation);
@@ -1825,12 +1823,36 @@ void SpatialEditorViewport::_notification(int p_what) {
surface->update();
}
+ //update shadow atlas if changed
+
+ int shadowmap_size = GlobalConfig::get_singleton()->get("rendering/shadow_atlas/size");
+ int atlas_q0 = GlobalConfig::get_singleton()->get("rendering/shadow_atlas/quadrant_0_subdiv");
+ int atlas_q1 = GlobalConfig::get_singleton()->get("rendering/shadow_atlas/quadrant_1_subdiv");
+ int atlas_q2 = GlobalConfig::get_singleton()->get("rendering/shadow_atlas/quadrant_2_subdiv");
+ int atlas_q3 = GlobalConfig::get_singleton()->get("rendering/shadow_atlas/quadrant_3_subdiv");
+
+
+ viewport->set_shadow_atlas_size(shadowmap_size);
+ viewport->set_shadow_atlas_quadrant_subdiv(0,Viewport::ShadowAtlasQuadrantSubdiv(atlas_q0));
+ viewport->set_shadow_atlas_quadrant_subdiv(1,Viewport::ShadowAtlasQuadrantSubdiv(atlas_q1));
+ viewport->set_shadow_atlas_quadrant_subdiv(2,Viewport::ShadowAtlasQuadrantSubdiv(atlas_q2));
+ viewport->set_shadow_atlas_quadrant_subdiv(3,Viewport::ShadowAtlasQuadrantSubdiv(atlas_q3));
+
+ //update msaa if changed
+
+ int msaa_mode = GlobalConfig::get_singleton()->get("rendering/antialias/msaa");
+ viewport->set_msaa(Viewport::MSAA(msaa_mode));
+
+ bool hdr = GlobalConfig::get_singleton()->get("rendering/dynamic_range/hdr");
+ viewport->set_hdr(hdr);
+
+
}
if (p_what==NOTIFICATION_ENTER_TREE) {
surface->connect("draw",this,"_draw");
- surface->connect("input_event",this,"_sinput");
+ surface->connect("gui_input",this,"_sinput");
surface->connect("mouse_enter",this,"_smouseenter");
preview_camera->set_icon(get_icon("Camera","EditorIcons"));
_init_gizmo_instance(index);
@@ -1892,7 +1914,7 @@ void SpatialEditorViewport::_draw() {
if (previewing) {
- Size2 ss = Size2( Globals::get_singleton()->get("display/width"), Globals::get_singleton()->get("display/height") );
+ Size2 ss = Size2( GlobalConfig::get_singleton()->get("display/width"), GlobalConfig::get_singleton()->get("display/height") );
float aspect = ss.get_aspect();
Size2 s = get_size();
@@ -2066,9 +2088,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;
@@ -2094,7 +2116,7 @@ void SpatialEditorViewport::_init_gizmo_instance(int p_idx) {
move_gizmo_instance[i]=VS::get_singleton()->instance_create();
VS::get_singleton()->instance_set_base(move_gizmo_instance[i],spatial_editor->get_move_gizmo(i)->get_rid());
VS::get_singleton()->instance_set_scenario(move_gizmo_instance[i],get_tree()->get_root()->get_world()->get_scenario());
- VS::get_singleton()->instance_geometry_set_flag(move_gizmo_instance[i],VS::INSTANCE_FLAG_VISIBLE,false);
+ VS::get_singleton()->instance_set_visible(move_gizmo_instance[i],false);
//VS::get_singleton()->instance_geometry_set_flag(move_gizmo_instance[i],VS::INSTANCE_FLAG_DEPH_SCALE,true);
VS::get_singleton()->instance_geometry_set_cast_shadows_setting(move_gizmo_instance[i], VS::SHADOW_CASTING_SETTING_OFF);
VS::get_singleton()->instance_set_layer_mask(move_gizmo_instance[i],layer);
@@ -2102,7 +2124,7 @@ void SpatialEditorViewport::_init_gizmo_instance(int p_idx) {
rotate_gizmo_instance[i]=VS::get_singleton()->instance_create();
VS::get_singleton()->instance_set_base(rotate_gizmo_instance[i],spatial_editor->get_rotate_gizmo(i)->get_rid());
VS::get_singleton()->instance_set_scenario(rotate_gizmo_instance[i],get_tree()->get_root()->get_world()->get_scenario());
- VS::get_singleton()->instance_geometry_set_flag(rotate_gizmo_instance[i],VS::INSTANCE_FLAG_VISIBLE,false);
+ VS::get_singleton()->instance_set_visible(rotate_gizmo_instance[i],false);
//VS::get_singleton()->instance_geometry_set_flag(rotate_gizmo_instance[i],VS::INSTANCE_FLAG_DEPH_SCALE,true);
VS::get_singleton()->instance_geometry_set_cast_shadows_setting(rotate_gizmo_instance[i], VS::SHADOW_CASTING_SETTING_OFF);
VS::get_singleton()->instance_set_layer_mask(rotate_gizmo_instance[i],layer);
@@ -2200,7 +2222,7 @@ void SpatialEditorViewport::update_transform_gizmo_view() {
if (dd==0)
dd=0.0001;
- float gsize = EditorSettings::get_singleton()->get("3d_editor/manipulator_gizmo_size");
+ float gsize = EditorSettings::get_singleton()->get("editors/3d/manipulator_gizmo_size");
gizmo_scale=(gsize/Math::abs(dd));
Vector3 scale = Vector3(1,1,1) * gizmo_scale;
@@ -2211,9 +2233,9 @@ void SpatialEditorViewport::update_transform_gizmo_view() {
for(int i=0;i<3;i++) {
VisualServer::get_singleton()->instance_set_transform(move_gizmo_instance[i], xform );
- VisualServer::get_singleton()->instance_geometry_set_flag(move_gizmo_instance[i],VS::INSTANCE_FLAG_VISIBLE,spatial_editor->is_gizmo_visible()&& (spatial_editor->get_tool_mode()==SpatialEditor::TOOL_MODE_SELECT || spatial_editor->get_tool_mode()==SpatialEditor::TOOL_MODE_MOVE) );
+ VisualServer::get_singleton()->instance_set_visible(move_gizmo_instance[i],spatial_editor->is_gizmo_visible()&& (spatial_editor->get_tool_mode()==SpatialEditor::TOOL_MODE_SELECT || spatial_editor->get_tool_mode()==SpatialEditor::TOOL_MODE_MOVE) );
VisualServer::get_singleton()->instance_set_transform(rotate_gizmo_instance[i], xform );
- VisualServer::get_singleton()->instance_geometry_set_flag(rotate_gizmo_instance[i],VS::INSTANCE_FLAG_VISIBLE,spatial_editor->is_gizmo_visible() && (spatial_editor->get_tool_mode()==SpatialEditor::TOOL_MODE_SELECT || spatial_editor->get_tool_mode()==SpatialEditor::TOOL_MODE_ROTATE) );
+ VisualServer::get_singleton()->instance_set_visible(rotate_gizmo_instance[i],spatial_editor->is_gizmo_visible() && (spatial_editor->get_tool_mode()==SpatialEditor::TOOL_MODE_SELECT || spatial_editor->get_tool_mode()==SpatialEditor::TOOL_MODE_ROTATE) );
}
}
@@ -2274,15 +2296,15 @@ Dictionary SpatialEditorViewport::get_state() const {
void SpatialEditorViewport::_bind_methods(){
- ObjectTypeDB::bind_method(_MD("_draw"),&SpatialEditorViewport::_draw);
- ObjectTypeDB::bind_method(_MD("_smouseenter"),&SpatialEditorViewport::_smouseenter);
- ObjectTypeDB::bind_method(_MD("_sinput"),&SpatialEditorViewport::_sinput);
- ObjectTypeDB::bind_method(_MD("_menu_option"),&SpatialEditorViewport::_menu_option);
- ObjectTypeDB::bind_method(_MD("_toggle_camera_preview"),&SpatialEditorViewport::_toggle_camera_preview);
- ObjectTypeDB::bind_method(_MD("_preview_exited_scene"),&SpatialEditorViewport::_preview_exited_scene);
- ObjectTypeDB::bind_method(_MD("update_transform_gizmo_view"),&SpatialEditorViewport::update_transform_gizmo_view);
- ObjectTypeDB::bind_method(_MD("_selection_result_pressed"),&SpatialEditorViewport::_selection_result_pressed);
- ObjectTypeDB::bind_method(_MD("_selection_menu_hide"),&SpatialEditorViewport::_selection_menu_hide);
+ ClassDB::bind_method(_MD("_draw"),&SpatialEditorViewport::_draw);
+ ClassDB::bind_method(_MD("_smouseenter"),&SpatialEditorViewport::_smouseenter);
+ ClassDB::bind_method(_MD("_sinput"),&SpatialEditorViewport::_sinput);
+ ClassDB::bind_method(_MD("_menu_option"),&SpatialEditorViewport::_menu_option);
+ ClassDB::bind_method(_MD("_toggle_camera_preview"),&SpatialEditorViewport::_toggle_camera_preview);
+ ClassDB::bind_method(_MD("_preview_exited_scene"),&SpatialEditorViewport::_preview_exited_scene);
+ ClassDB::bind_method(_MD("update_transform_gizmo_view"),&SpatialEditorViewport::update_transform_gizmo_view);
+ ClassDB::bind_method(_MD("_selection_result_pressed"),&SpatialEditorViewport::_selection_result_pressed);
+ ClassDB::bind_method(_MD("_selection_menu_hide"),&SpatialEditorViewport::_selection_menu_hide);
ADD_SIGNAL( MethodInfo("toggle_maximize_view", PropertyInfo(Variant::OBJECT, "viewport")) );
}
@@ -2355,18 +2377,20 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
message_time=0;
spatial_editor=p_spatial_editor;
- Control *c=memnew(Control);
+ ViewportContainer *c=memnew(ViewportContainer);
+ c->set_stretch(true);
add_child(c);
c->set_area_as_parent_rect();
viewport = memnew( Viewport );
viewport->set_disable_input(true);
+
c->add_child(viewport);
surface = memnew( Control );
add_child(surface);
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();
@@ -2375,7 +2399,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);
@@ -2399,7 +2423,7 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/focus_origin"), VIEW_CENTER_TO_ORIGIN);
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/focus_selection"), VIEW_CENTER_TO_SELECTION);
view_menu->get_popup()->add_shortcut(ED_GET_SHORTCUT("spatial_editor/align_selection_with_view"), VIEW_ALIGN_SELECTION_WITH_VIEW);
- view_menu->get_popup()->connect("item_pressed",this,"_menu_option");
+ view_menu->get_popup()->connect("id_pressed",this,"_menu_option");
preview_camera = memnew( Button );
preview_camera->set_toggle_mode(true);
@@ -2416,7 +2440,7 @@ SpatialEditorViewport::SpatialEditorViewport(SpatialEditor *p_spatial_editor, Ed
selection_menu = memnew( PopupMenu );
add_child(selection_menu);
selection_menu->set_custom_minimum_size(Vector2(100, 0));
- selection_menu->connect("item_pressed", this, "_selection_result_pressed");
+ selection_menu->connect("id_pressed", this, "_selection_result_pressed");
selection_menu->connect("popup_hide", this, "_selection_menu_hide");
if (p_index==0) {
@@ -2555,11 +2579,12 @@ void SpatialEditor::_generate_selection_box() {
}
- Ref<FixedMaterial> mat = memnew( FixedMaterial );
- 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);
+ Ref<FixedSpatialMaterial> mat = memnew( FixedSpatialMaterial );
+ mat->set_flag(FixedSpatialMaterial::FLAG_UNSHADED,true);
+ mat->set_albedo(Color(1,1,1));
+ mat->set_feature(FixedSpatialMaterial::FEATURE_TRANSPARENT,true);
+ mat->set_flag(FixedSpatialMaterial::FLAG_ALBEDO_FROM_VERTEX_COLOR,true);
+ mat->set_flag(FixedSpatialMaterial::FLAG_SRGB_VERTEX_COLOR,true);
st->set_material(mat);
selection_box = st->commit();
}
@@ -2666,11 +2691,11 @@ void SpatialEditor::set_state(const Dictionary& p_state) {
}
if (d.has("zfar"))
- settings_zfar->set_val(float(d["zfar"]));
+ settings_zfar->set_value(float(d["zfar"]));
if (d.has("znear"))
- settings_znear->set_val(float(d["znear"]));
+ settings_znear->set_value(float(d["znear"]));
if (d.has("fov"))
- settings_fov->set_val(float(d["fov"]));
+ settings_fov->set_value(float(d["fov"]));
if (d.has("default_light")) {
bool use = d["default_light"];
@@ -2691,14 +2716,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"];
@@ -2713,7 +2738,7 @@ void SpatialEditor::set_state(const Dictionary& p_state) {
if (use!=view_menu->get_popup()->is_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_ORIGIN))) {
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_ORIGIN), use );
- VisualServer::get_singleton()->instance_geometry_set_flag(origin_instance,VS::INSTANCE_FLAG_VISIBLE,use);
+ VisualServer::get_singleton()->instance_set_visible(origin_instance,use);
}
}
@@ -2785,7 +2810,7 @@ void SpatialEditor::_xform_dialog_action() {
continue;
Vector3 axis;
axis[i]=1.0;
- t.basis.rotate(axis,rotate[i]);
+ t.basis.rotate(axis,rotate[i]); // BUG(?): Angle not flipped; please check during the review of PR #6865.
}
for(int i=0;i<3;i++) {
@@ -2898,9 +2923,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;
@@ -2938,9 +2963,9 @@ void SpatialEditor::_menu_item_pressed(int p_option) {
}
viewports[0]->set_area_as_parent_rect();
- viewports[0]->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_RATIO,0.5);
+ //viewports[0]->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_RATIO,0.5);
viewports[2]->set_area_as_parent_rect();
- viewports[2]->set_anchor_and_margin(MARGIN_TOP,ANCHOR_RATIO,0.5);
+ //viewports[2]->set_anchor_and_margin(MARGIN_TOP,ANCHOR_RATIO,0.5);
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), false );
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS), true );
@@ -2962,9 +2987,9 @@ void SpatialEditor::_menu_item_pressed(int p_option) {
}
viewports[0]->set_area_as_parent_rect();
- viewports[0]->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_RATIO,0.5);
+ //viewports[0]->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_RATIO,0.5);
viewports[2]->set_area_as_parent_rect();
- viewports[2]->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_RATIO,0.5);
+ //viewports[2]->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_RATIO,0.5);
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), false );
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS), false );
@@ -2984,13 +3009,13 @@ void SpatialEditor::_menu_item_pressed(int p_option) {
viewports[i]->show();
}
viewports[0]->set_area_as_parent_rect();
- viewports[0]->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_RATIO,0.5);
+ //viewports[0]->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_RATIO,0.5);
viewports[2]->set_area_as_parent_rect();
- viewports[2]->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_RATIO,0.5);
- viewports[2]->set_anchor_and_margin(MARGIN_TOP,ANCHOR_RATIO,0.5);
+ //viewports[2]->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_RATIO,0.5);
+ //viewports[2]->set_anchor_and_margin(MARGIN_TOP,ANCHOR_RATIO,0.5);
viewports[3]->set_area_as_parent_rect();
- viewports[3]->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_RATIO,0.5);
- viewports[3]->set_anchor_and_margin(MARGIN_TOP,ANCHOR_RATIO,0.5);
+ //viewports[3]->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_RATIO,0.5);
+ //viewports[3]->set_anchor_and_margin(MARGIN_TOP,ANCHOR_RATIO,0.5);
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), false );
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS), false );
@@ -3010,13 +3035,13 @@ void SpatialEditor::_menu_item_pressed(int p_option) {
viewports[i]->show();
}
viewports[0]->set_area_as_parent_rect();
- viewports[0]->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_RATIO,0.5);
- viewports[0]->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_RATIO,0.5);
+ //viewports[0]->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_RATIO,0.5);
+ //viewports[0]->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_RATIO,0.5);
viewports[2]->set_area_as_parent_rect();
- viewports[2]->set_anchor_and_margin(MARGIN_TOP,ANCHOR_RATIO,0.5);
- viewports[2]->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_RATIO,0.5);
+ //viewports[2]->set_anchor_and_margin(MARGIN_TOP,ANCHOR_RATIO,0.5);
+ //viewports[2]->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_RATIO,0.5);
viewports[3]->set_area_as_parent_rect();
- viewports[3]->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_RATIO,0.5);
+ //viewports[3]->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_RATIO,0.5);
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), false );
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS), false );
@@ -3033,17 +3058,17 @@ void SpatialEditor::_menu_item_pressed(int p_option) {
viewports[i]->show();
}
viewports[0]->set_area_as_parent_rect();
- viewports[0]->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_RATIO,0.5);
- viewports[0]->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_RATIO,0.5);
+ //viewports[0]->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_RATIO,0.5);
+ //viewports[0]->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_RATIO,0.5);
viewports[1]->set_area_as_parent_rect();
- viewports[1]->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_RATIO,0.5);
- viewports[1]->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_RATIO,0.5);
+ //viewports[1]->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_RATIO,0.5);
+ //viewports[1]->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_RATIO,0.5);
viewports[2]->set_area_as_parent_rect();
- viewports[2]->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_RATIO,0.5);
- viewports[2]->set_anchor_and_margin(MARGIN_TOP,ANCHOR_RATIO,0.5);
+ //viewports[2]->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_RATIO,0.5);
+ //viewports[2]->set_anchor_and_margin(MARGIN_TOP,ANCHOR_RATIO,0.5);
viewports[3]->set_area_as_parent_rect();
- viewports[3]->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_RATIO,0.5);
- viewports[3]->set_anchor_and_margin(MARGIN_TOP,ANCHOR_RATIO,0.5);
+ //viewports[3]->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_RATIO,0.5);
+ //viewports[3]->set_anchor_and_margin(MARGIN_TOP,ANCHOR_RATIO,0.5);
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_1_VIEWPORT), false );
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_2_VIEWPORTS), false );
@@ -3096,7 +3121,7 @@ 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) );
is_checked=!is_checked;
- VisualServer::get_singleton()->instance_geometry_set_flag(origin_instance,VS::INSTANCE_FLAG_VISIBLE,is_checked);
+ VisualServer::get_singleton()->instance_set_visible(origin_instance,is_checked);
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(p_option), is_checked);
} break;
@@ -3108,7 +3133,7 @@ void SpatialEditor::_menu_item_pressed(int p_option) {
for(int i=0;i<3;++i) {
if (grid_enable[i]) {
- VisualServer::get_singleton()->instance_geometry_set_flag(grid_instance[i],VS::INSTANCE_FLAG_VISIBLE,grid_enabled);
+ VisualServer::get_singleton()->instance_set_visible(grid_instance[i],grid_enabled);
grid_visible[i]=grid_enabled;
}
}
@@ -3135,7 +3160,7 @@ void SpatialEditor::_init_indicators() {
- light_transform.rotate(Vector3(1,0,0),Math_PI/5.0);
+ light_transform.rotate(Vector3(1,0,0),-Math_PI/5.0);
VisualServer::get_singleton()->instance_set_transform(light_instance,light_transform);
@@ -3146,18 +3171,20 @@ 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 );
- 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);
+ indicator_mat.instance();;
+ indicator_mat->set_flag(FixedSpatialMaterial::FLAG_UNSHADED,true);
+ indicator_mat->set_flag(FixedSpatialMaterial::FLAG_ONTOP,true);
+ indicator_mat->set_flag(FixedSpatialMaterial::FLAG_ALBEDO_FROM_VERTEX_COLOR,true);
+ indicator_mat->set_flag(FixedSpatialMaterial::FLAG_SRGB_VERTEX_COLOR,true);
+
+ 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;
- Color grid_color = EditorSettings::get_singleton()->get("3d_editor/grid_color");
+ Color grid_color = EditorSettings::get_singleton()->get("editors/3d/grid_color");
for(int i=0;i<3;i++) {
Vector3 axis;
@@ -3192,13 +3219,13 @@ 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_surface_set_material(grid[i],0,indicator_mat);
+ 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->get_rid());
grid_instance[i] = VisualServer::get_singleton()->instance_create2(grid[i],get_tree()->get_root()->get_world()->get_scenario());
grid_visible[i]=false;
grid_enable[i]=false;
- VisualServer::get_singleton()->instance_geometry_set_flag(grid_instance[i],VS::INSTANCE_FLAG_VISIBLE,false);
+ VisualServer::get_singleton()->instance_set_visible(grid_instance[i],false);
VisualServer::get_singleton()->instance_geometry_set_cast_shadows_setting(grid_instance[i], VS::SHADOW_CASTING_SETTING_OFF);
VS::get_singleton()->instance_set_layer_mask(grid_instance[i], 1 << SpatialEditorViewport::GIZMO_GRID_LAYER);
@@ -3211,8 +3238,8 @@ 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_surface_set_material(origin,0,indicator_mat);
+ VisualServer::get_singleton()->mesh_add_surface_from_arrays(origin,VisualServer::PRIMITIVE_LINES,d);
+ VisualServer::get_singleton()->mesh_surface_set_material(origin,0,indicator_mat->get_rid());
// origin = VisualServer::get_singleton()->poly_create();
@@ -3225,7 +3252,7 @@ void SpatialEditor::_init_indicators() {
- VisualServer::get_singleton()->instance_geometry_set_flag(grid_instance[1],VS::INSTANCE_FLAG_VISIBLE,true);
+ VisualServer::get_singleton()->instance_set_visible(grid_instance[1],true);
grid_enable[1]=true;
grid_visible[1]=true;
grid_enabled=true;
@@ -3235,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));
@@ -3243,17 +3270,15 @@ 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));
- 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);
+ cursor_material.instance();
+ cursor_material->set_albedo(Color(0,1,1));
+ cursor_material->set_flag(FixedSpatialMaterial::FLAG_UNSHADED,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_surface_set_material(cursor_mesh,0,cursor_material);
+ 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->get_rid());
cursor_instance = VisualServer::get_singleton()->instance_create2(cursor_mesh,get_tree()->get_root()->get_world()->get_scenario());
VS::get_singleton()->instance_set_layer_mask(cursor_instance,1<<SpatialEditorViewport::GIZMO_GRID_LAYER);
@@ -3269,13 +3294,13 @@ void SpatialEditor::_init_indicators() {
//move gizmo
- float gizmo_alph = EditorSettings::get_singleton()->get("3d_editor/manipulator_gizmo_opacity");
+ float gizmo_alph = EditorSettings::get_singleton()->get("editors/3d/manipulator_gizmo_opacity");
- gizmo_hl = Ref<FixedMaterial>( memnew( FixedMaterial ) );
- 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 = Ref<FixedSpatialMaterial>( memnew( FixedSpatialMaterial ) );
+ gizmo_hl->set_flag(FixedSpatialMaterial::FLAG_UNSHADED, true);
+ gizmo_hl->set_flag(FixedSpatialMaterial::FLAG_ONTOP, true);
+ gizmo_hl->set_feature(FixedSpatialMaterial::FEATURE_TRANSPARENT, true);
+ gizmo_hl->set_albedo(Color(1,1,1,gizmo_alph+0.2f));
for(int i=0;i<3;i++) {
@@ -3283,14 +3308,14 @@ void SpatialEditor::_init_indicators() {
rotate_gizmo[i]=Ref<Mesh>( memnew( Mesh ) );
- Ref<FixedMaterial> mat = memnew( FixedMaterial );
- mat->set_flag(Material::FLAG_UNSHADED, true);
- mat->set_flag(Material::FLAG_ONTOP, true);
- mat->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA, true);
+ Ref<FixedSpatialMaterial> mat = memnew( FixedSpatialMaterial );
+ mat->set_flag(FixedSpatialMaterial::FLAG_UNSHADED, true);
+ mat->set_flag(FixedSpatialMaterial::FLAG_ONTOP, true);
+ mat->set_feature(FixedSpatialMaterial::FEATURE_TRANSPARENT, true);
Color col;
col[i]=1.0;
col.a= gizmo_alph;
- mat->set_parameter(FixedMaterial::PARAM_DIFFUSE,col);
+ mat->set_albedo(col);
gizmo_color[i]=mat;
@@ -3436,8 +3461,6 @@ void SpatialEditor::_finish_indicators() {
VisualServer::get_singleton()->free(cursor_instance);
VisualServer::get_singleton()->free(cursor_mesh);
- VisualServer::get_singleton()->free(indicator_mat);
- VisualServer::get_singleton()->free(cursor_material);
}
void SpatialEditor::_instance_scene() {
@@ -3482,7 +3505,7 @@ void SpatialEditor::_unhandled_key_input(InputEvent p_event) {
EditorNode *en = editor;
EditorPluginList *over_plugin_list = en->get_editor_plugins_over();
- if (!over_plugin_list->empty() && over_plugin_list->forward_input_event(p_event)) {
+ if (!over_plugin_list->empty() && over_plugin_list->forward_gui_input(p_event)) {
return; //ate the over input event
}
@@ -3679,17 +3702,17 @@ void SpatialEditor::_node_removed(Node* p_node) {
void SpatialEditor::_bind_methods() {
-// ObjectTypeDB::bind_method("_input_event",&SpatialEditor::_input_event);
- ObjectTypeDB::bind_method("_unhandled_key_input",&SpatialEditor::_unhandled_key_input);
- ObjectTypeDB::bind_method("_node_removed",&SpatialEditor::_node_removed);
- ObjectTypeDB::bind_method("_menu_item_pressed",&SpatialEditor::_menu_item_pressed);
- ObjectTypeDB::bind_method("_xform_dialog_action",&SpatialEditor::_xform_dialog_action);
- ObjectTypeDB::bind_method("_instance_scene",&SpatialEditor::_instance_scene);
- ObjectTypeDB::bind_method("_get_editor_data",&SpatialEditor::_get_editor_data);
- ObjectTypeDB::bind_method("_request_gizmo",&SpatialEditor::_request_gizmo);
- ObjectTypeDB::bind_method("_default_light_angle_input",&SpatialEditor::_default_light_angle_input);
- ObjectTypeDB::bind_method("_update_ambient_light_color",&SpatialEditor::_update_ambient_light_color);
- ObjectTypeDB::bind_method("_toggle_maximize_view",&SpatialEditor::_toggle_maximize_view);
+// ClassDB::bind_method("_gui_input",&SpatialEditor::_gui_input);
+ ClassDB::bind_method("_unhandled_key_input",&SpatialEditor::_unhandled_key_input);
+ ClassDB::bind_method("_node_removed",&SpatialEditor::_node_removed);
+ ClassDB::bind_method("_menu_item_pressed",&SpatialEditor::_menu_item_pressed);
+ ClassDB::bind_method("_xform_dialog_action",&SpatialEditor::_xform_dialog_action);
+ ClassDB::bind_method("_instance_scene",&SpatialEditor::_instance_scene);
+ ClassDB::bind_method("_get_editor_data",&SpatialEditor::_get_editor_data);
+ ClassDB::bind_method("_request_gizmo",&SpatialEditor::_request_gizmo);
+ ClassDB::bind_method("_default_light_angle_input",&SpatialEditor::_default_light_angle_input);
+ ClassDB::bind_method("_update_ambient_light_color",&SpatialEditor::_update_ambient_light_color);
+ ClassDB::bind_method("_toggle_maximize_view",&SpatialEditor::_toggle_maximize_view);
ADD_SIGNAL( MethodInfo("transform_key_request") );
@@ -3698,9 +3721,9 @@ void SpatialEditor::_bind_methods() {
void SpatialEditor::clear() {
- settings_fov->set_val(EDITOR_DEF("3d_editor/default_fov",60.0));
- settings_znear->set_val(EDITOR_DEF("3d_editor/default_z_near",0.1));
- settings_zfar->set_val(EDITOR_DEF("3d_editor/default_z_far",1500.0));
+ settings_fov->set_value(EDITOR_DEF("editors/3d/default_fov",60.0));
+ settings_znear->set_value(EDITOR_DEF("editors/3d/default_z_near",0.1));
+ settings_zfar->set_value(EDITOR_DEF("editors/3d/default_z_far",1500.0));
for(int i=0;i<4;i++) {
viewports[i]->reset();
@@ -3710,11 +3733,11 @@ void SpatialEditor::clear() {
_menu_item_pressed(MENU_VIEW_DISPLAY_NORMAL);
- VisualServer::get_singleton()->instance_geometry_set_flag(origin_instance,VS::INSTANCE_FLAG_VISIBLE,true);
+ VisualServer::get_singleton()->instance_set_visible(origin_instance,true);
view_menu->get_popup()->set_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_ORIGIN), true);
for(int i=0;i<3;++i) {
if (grid_enable[i]) {
- VisualServer::get_singleton()->instance_geometry_set_flag(grid_instance[i],VS::INSTANCE_FLAG_VISIBLE,true);
+ VisualServer::get_singleton()->instance_set_visible(grid_instance[i],true);
grid_visible[i]=true;
}
}
@@ -3730,7 +3753,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);
@@ -3743,15 +3766,15 @@ 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());
}
void SpatialEditor::_update_default_light_angle() {
Transform t;
- t.basis.rotate(Vector3(1,0,0),settings_default_light_rot_x);
- t.basis.rotate(Vector3(0,1,0),settings_default_light_rot_y);
+ t.basis.rotate(Vector3(1,0,0),-settings_default_light_rot_x);
+ t.basis.rotate(Vector3(0,1,0),-settings_default_light_rot_y);
settings_dlight->set_transform(t);
if (light_instance.is_valid()) {
VS::get_singleton()->instance_set_transform(light_instance,t);
@@ -3884,7 +3907,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
p->add_separator();
p->add_shortcut(ED_SHORTCUT("spatial_editor/transform_dialog", TTR("Transform Dialog..")), MENU_TRANSFORM_DIALOG);
- p->connect("item_pressed", this,"_menu_item_pressed");
+ p->connect("id_pressed", this,"_menu_item_pressed");
view_menu = memnew( MenuButton );
view_menu->set_text(TTR("View"));
@@ -3922,7 +3945,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
p->set_item_checked( p->get_item_index(MENU_VIEW_GRID), true );
- p->connect("item_pressed", this,"_menu_item_pressed");
+ p->connect("id_pressed", this,"_menu_item_pressed");
/* REST OF MENU */
@@ -3956,7 +3979,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
VBoxContainer *snap_dialog_vbc = memnew( VBoxContainer );
snap_dialog->add_child(snap_dialog_vbc);
- snap_dialog->set_child_rect(snap_dialog_vbc);
+ //snap_dialog->set_child_rect(snap_dialog_vbc);
snap_translate = memnew( LineEdit );
snap_translate->set_text("1");
@@ -3978,13 +4001,13 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
settings_vbc = memnew( VBoxContainer );
settings_vbc->set_custom_minimum_size(Size2(200,0));
settings_dialog->add_child(settings_vbc);
- settings_dialog->set_child_rect(settings_vbc);
+ //settings_dialog->set_child_rect(settings_vbc);
- settings_light_base = memnew( Control );
+ settings_light_base = memnew( ViewportContainer );
settings_light_base->set_custom_minimum_size(Size2(128,128));
- settings_light_base->connect("input_event",this,"_default_light_angle_input");
+ settings_light_base->connect("gui_input",this,"_default_light_angle_input");
settings_vbc->add_margin_child(TTR("Default Light Normal:"),settings_light_base);
settings_light_vp = memnew( Viewport );
settings_light_vp->set_disable_input(true);
@@ -4013,8 +4036,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));
@@ -4022,21 +4045,21 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
settings_fov->set_max(179);
settings_fov->set_min(1);
settings_fov->set_step(0.01);
- settings_fov->set_val(EDITOR_DEF("3d_editor/default_fov",60.0));
+ settings_fov->set_value(EDITOR_DEF("editors/3d/default_fov",60.0));
settings_vbc->add_margin_child(TTR("Perspective FOV (deg.):"),settings_fov);
settings_znear = memnew( SpinBox );
settings_znear->set_max(10000);
settings_znear->set_min(0.1);
settings_znear->set_step(0.01);
- settings_znear->set_val(EDITOR_DEF("3d_editor/default_z_near",0.1));
+ settings_znear->set_value(EDITOR_DEF("editors/3d/default_z_near",0.1));
settings_vbc->add_margin_child(TTR("View Z-Near:"),settings_znear);
settings_zfar = memnew( SpinBox );
settings_zfar->set_max(10000);
settings_zfar->set_min(0.1);
settings_zfar->set_step(0.01);
- settings_zfar->set_val(EDITOR_DEF("3d_editor/default_z_far",1500));
+ settings_zfar->set_value(EDITOR_DEF("editors/3d/default_z_far",1500));
settings_vbc->add_margin_child(TTR("View Z-Far:"),settings_zfar);
//settings_dialog->get_cancel()->hide();
@@ -4104,9 +4127,9 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
set_process_unhandled_key_input(true);
add_to_group("_spatial_editor_group");
- EDITOR_DEF("3d_editor/manipulator_gizmo_size",80);
+ EDITOR_DEF("editors/3d/manipulator_gizmo_size",80);
EditorSettings::get_singleton()->add_property_hint(PropertyInfo(Variant::INT,"3d_editor/manipulator_gizmo_size",PROPERTY_HINT_RANGE,"16,1024,1"));
- EDITOR_DEF("3d_editor/manipulator_gizmo_opacity",0.2);
+ EDITOR_DEF("editors/3d/manipulator_gizmo_opacity",0.2);
over_gizmo_handle=-1;
}
@@ -4145,7 +4168,7 @@ void SpatialEditorPlugin::edit(Object *p_object) {
bool SpatialEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("Spatial");
+ return p_object->is_class("Spatial");
}
Dictionary SpatialEditorPlugin::get_state() const {
@@ -4164,7 +4187,7 @@ void SpatialEditor::snap_cursor_to_plane(const Plane& p_plane) {
void SpatialEditorPlugin::_bind_methods() {
- ObjectTypeDB::bind_method("snap_cursor_to_plane",&SpatialEditorPlugin::snap_cursor_to_plane);
+ ClassDB::bind_method("snap_cursor_to_plane",&SpatialEditorPlugin::snap_cursor_to_plane);
}
diff --git a/tools/editor/plugins/spatial_editor_plugin.h b/tools/editor/plugins/spatial_editor_plugin.h
index 89587526ee..e09a29d4f8 100644
--- a/tools/editor/plugins/spatial_editor_plugin.h
+++ b/tools/editor/plugins/spatial_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -45,7 +45,7 @@ class SpatialEditorGizmos;
class SpatialEditorGizmo : public SpatialGizmo {
- OBJ_TYPE(SpatialEditorGizmo,SpatialGizmo);
+ GDCLASS(SpatialEditorGizmo,SpatialGizmo);
bool selected;
public:
@@ -66,7 +66,7 @@ public:
class SpatialEditorViewport : public Control {
- OBJ_TYPE( SpatialEditorViewport, Control );
+ GDCLASS( SpatialEditorViewport, Control );
friend class SpatialEditor;
enum {
@@ -267,7 +267,7 @@ public:
class SpatialEditorSelectedItem : public Object {
- OBJ_TYPE(SpatialEditorSelectedItem,Object);
+ GDCLASS(SpatialEditorSelectedItem,Object);
public:
@@ -283,7 +283,7 @@ public:
class SpatialEditor : public VBoxContainer {
- OBJ_TYPE(SpatialEditor, VBoxContainer );
+ GDCLASS(SpatialEditor, VBoxContainer );
public:
enum ToolMode {
@@ -332,8 +332,8 @@ private:
bool grid_enabled;
Ref<Mesh> move_gizmo[3], rotate_gizmo[3];
- Ref<FixedMaterial> gizmo_color[3];
- Ref<FixedMaterial> gizmo_hl;
+ Ref<FixedSpatialMaterial> gizmo_color[3];
+ Ref<FixedSpatialMaterial> gizmo_hl;
int over_gizmo_handle;
@@ -345,8 +345,8 @@ private:
RID indicators_instance;
RID cursor_mesh;
RID cursor_instance;
- RID indicator_mat;
- RID cursor_material;
+ Ref<FixedSpatialMaterial> indicator_mat;
+ Ref<FixedSpatialMaterial> cursor_material;
/*
struct Selected {
@@ -431,7 +431,7 @@ private:
float settings_default_light_rot_x;
float settings_default_light_rot_y;
- Control *settings_light_base;
+ ViewportContainer *settings_light_base;
Viewport *settings_light_vp;
ColorPickerButton *settings_ambient_color;
Image settings_light_dir_image;
@@ -481,7 +481,7 @@ protected:
void _notification(int p_what);
- //void _input_event(InputEvent p_event);
+ //void _gui_input(InputEvent p_event);
void _unhandled_key_input(InputEvent p_event);
static void _bind_methods();
@@ -491,9 +491,9 @@ public:
static SpatialEditor *get_singleton() { return singleton; }
void snap_cursor_to_plane(const Plane& p_plane);
- float get_znear() const { return settings_znear->get_val(); }
- float get_zfar() const { return settings_zfar->get_val(); }
- float get_fov() const { return settings_fov->get_val(); }
+ float get_znear() const { return settings_znear->get_value(); }
+ float get_zfar() const { return settings_zfar->get_value(); }
+ float get_fov() const { return settings_fov->get_value(); }
Transform get_gizmo_transform() const { return gizmo.transform; }
bool is_gizmo_visible() const { return gizmo.visible; }
@@ -546,7 +546,7 @@ public:
class SpatialEditorPlugin : public EditorPlugin {
- OBJ_TYPE( SpatialEditorPlugin, EditorPlugin );
+ GDCLASS( SpatialEditorPlugin, EditorPlugin );
SpatialEditor *spatial_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/sprite_frames_editor_plugin.cpp b/tools/editor/plugins/sprite_frames_editor_plugin.cpp
index 41beaa96a1..67948b0302 100644
--- a/tools/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/tools/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -35,7 +35,7 @@
-void SpriteFramesEditor::_input_event(InputEvent p_event) {
+void SpriteFramesEditor::_gui_input(InputEvent p_event) {
}
@@ -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));
@@ -605,7 +605,7 @@ void SpriteFramesEditor::_update_library(bool p_skip_selector) {
tree->select(tree->get_item_count()-1);
}
- anim_speed->set_val(frames->get_animation_speed(edited_anim));
+ anim_speed->set_value(frames->get_animation_speed(edited_anim));
anim_loop->set_pressed(frames->get_animation_loop(edited_anim));
updating=false;
@@ -700,7 +700,7 @@ bool SpriteFramesEditor::can_drop_data_fw(const Point2& p_point,const Variant& p
String file = files[0];
String ftype = EditorFileSystem::get_singleton()->get_file_type(file);
- if (!ObjectTypeDB::is_type(ftype,"Texture")) {
+ if (!ClassDB::is_parent_class(ftype,"Texture")) {
return false;
}
@@ -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);
}
@@ -754,27 +754,27 @@ void SpriteFramesEditor::drop_data_fw(const Point2& p_point,const Variant& p_dat
void SpriteFramesEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_input_event"),&SpriteFramesEditor::_input_event);
- ObjectTypeDB::bind_method(_MD("_load_pressed"),&SpriteFramesEditor::_load_pressed);
- ObjectTypeDB::bind_method(_MD("_empty_pressed"),&SpriteFramesEditor::_empty_pressed);
- ObjectTypeDB::bind_method(_MD("_empty2_pressed"),&SpriteFramesEditor::_empty2_pressed);
- ObjectTypeDB::bind_method(_MD("_item_edited"),&SpriteFramesEditor::_item_edited);
- ObjectTypeDB::bind_method(_MD("_delete_pressed"),&SpriteFramesEditor::_delete_pressed);
- ObjectTypeDB::bind_method(_MD("_paste_pressed"),&SpriteFramesEditor::_paste_pressed);
- ObjectTypeDB::bind_method(_MD("_delete_confirm_pressed"),&SpriteFramesEditor::_delete_confirm_pressed);
- ObjectTypeDB::bind_method(_MD("_file_load_request","files","atpos"),&SpriteFramesEditor::_file_load_request,DEFVAL(-1));
- ObjectTypeDB::bind_method(_MD("_update_library","skipsel"),&SpriteFramesEditor::_update_library,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("_up_pressed"),&SpriteFramesEditor::_up_pressed);
- ObjectTypeDB::bind_method(_MD("_down_pressed"),&SpriteFramesEditor::_down_pressed);
- ObjectTypeDB::bind_method(_MD("_animation_select"),&SpriteFramesEditor::_animation_select);
- ObjectTypeDB::bind_method(_MD("_animation_name_edited"),&SpriteFramesEditor::_animation_name_edited);
- ObjectTypeDB::bind_method(_MD("_animation_add"),&SpriteFramesEditor::_animation_add);
- ObjectTypeDB::bind_method(_MD("_animation_remove"),&SpriteFramesEditor::_animation_remove);
- ObjectTypeDB::bind_method(_MD("_animation_loop_changed"),&SpriteFramesEditor::_animation_loop_changed);
- ObjectTypeDB::bind_method(_MD("_animation_fps_changed"),&SpriteFramesEditor::_animation_fps_changed);
- ObjectTypeDB::bind_method(_MD("get_drag_data_fw"), &SpriteFramesEditor::get_drag_data_fw);
- ObjectTypeDB::bind_method(_MD("can_drop_data_fw"), &SpriteFramesEditor::can_drop_data_fw);
- ObjectTypeDB::bind_method(_MD("drop_data_fw"), &SpriteFramesEditor::drop_data_fw);
+ ClassDB::bind_method(_MD("_gui_input"),&SpriteFramesEditor::_gui_input);
+ ClassDB::bind_method(_MD("_load_pressed"),&SpriteFramesEditor::_load_pressed);
+ ClassDB::bind_method(_MD("_empty_pressed"),&SpriteFramesEditor::_empty_pressed);
+ ClassDB::bind_method(_MD("_empty2_pressed"),&SpriteFramesEditor::_empty2_pressed);
+ ClassDB::bind_method(_MD("_item_edited"),&SpriteFramesEditor::_item_edited);
+ ClassDB::bind_method(_MD("_delete_pressed"),&SpriteFramesEditor::_delete_pressed);
+ ClassDB::bind_method(_MD("_paste_pressed"),&SpriteFramesEditor::_paste_pressed);
+ ClassDB::bind_method(_MD("_delete_confirm_pressed"),&SpriteFramesEditor::_delete_confirm_pressed);
+ ClassDB::bind_method(_MD("_file_load_request","files","atpos"),&SpriteFramesEditor::_file_load_request,DEFVAL(-1));
+ ClassDB::bind_method(_MD("_update_library","skipsel"),&SpriteFramesEditor::_update_library,DEFVAL(false));
+ ClassDB::bind_method(_MD("_up_pressed"),&SpriteFramesEditor::_up_pressed);
+ ClassDB::bind_method(_MD("_down_pressed"),&SpriteFramesEditor::_down_pressed);
+ ClassDB::bind_method(_MD("_animation_select"),&SpriteFramesEditor::_animation_select);
+ ClassDB::bind_method(_MD("_animation_name_edited"),&SpriteFramesEditor::_animation_name_edited);
+ ClassDB::bind_method(_MD("_animation_add"),&SpriteFramesEditor::_animation_add);
+ ClassDB::bind_method(_MD("_animation_remove"),&SpriteFramesEditor::_animation_remove);
+ ClassDB::bind_method(_MD("_animation_loop_changed"),&SpriteFramesEditor::_animation_loop_changed);
+ ClassDB::bind_method(_MD("_animation_fps_changed"),&SpriteFramesEditor::_animation_fps_changed);
+ ClassDB::bind_method(_MD("get_drag_data_fw"), &SpriteFramesEditor::get_drag_data_fw);
+ ClassDB::bind_method(_MD("can_drop_data_fw"), &SpriteFramesEditor::can_drop_data_fw);
+ ClassDB::bind_method(_MD("drop_data_fw"), &SpriteFramesEditor::drop_data_fw);
}
@@ -929,7 +929,7 @@ void SpriteFramesEditorPlugin::edit(Object *p_object) {
bool SpriteFramesEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("SpriteFrames");
+ return p_object->is_class("SpriteFrames");
}
void SpriteFramesEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/sprite_frames_editor_plugin.h b/tools/editor/plugins/sprite_frames_editor_plugin.h
index f0aa84c23a..36a022b7e4 100644
--- a/tools/editor/plugins/sprite_frames_editor_plugin.h
+++ b/tools/editor/plugins/sprite_frames_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -41,7 +41,7 @@
class SpriteFramesEditor : public PanelContainer {
- OBJ_TYPE(SpriteFramesEditor, PanelContainer );
+ GDCLASS(SpriteFramesEditor, PanelContainer );
Button *load;
Button *_delete;
@@ -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();
@@ -104,7 +104,7 @@ class SpriteFramesEditor : public PanelContainer {
protected:
void _notification(int p_what);
- void _input_event(InputEvent p_event);
+ void _gui_input(InputEvent p_event);
static void _bind_methods();
public:
@@ -116,7 +116,7 @@ public:
class SpriteFramesEditorPlugin : public EditorPlugin {
- OBJ_TYPE( SpriteFramesEditorPlugin, EditorPlugin );
+ GDCLASS( SpriteFramesEditorPlugin, EditorPlugin );
SpriteFramesEditor *frames_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/stream_editor_plugin.cpp b/tools/editor/plugins/stream_editor_plugin.cpp
index d896784074..00d7b208c8 100644
--- a/tools/editor/plugins/stream_editor_plugin.cpp
+++ b/tools/editor/plugins/stream_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -59,8 +59,8 @@ void StreamEditor::_stop() {
void StreamEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_play"),&StreamEditor::_play);
- ObjectTypeDB::bind_method(_MD("_stop"),&StreamEditor::_stop);
+ ClassDB::bind_method(_MD("_play"),&StreamEditor::_play);
+ ClassDB::bind_method(_MD("_stop"),&StreamEditor::_stop);
}
@@ -104,7 +104,7 @@ void StreamEditorPlugin::edit(Object *p_object) {
bool StreamEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("StreamPlayer") || p_object->is_type("SpatialStreamPlayer");
+ return p_object->is_class("StreamPlayer") || p_object->is_class("SpatialStreamPlayer");
}
void StreamEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/stream_editor_plugin.h b/tools/editor/plugins/stream_editor_plugin.h
index 5730612d61..af29f64f93 100644
--- a/tools/editor/plugins/stream_editor_plugin.h
+++ b/tools/editor/plugins/stream_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -40,7 +40,7 @@
class StreamEditor : public Control {
- OBJ_TYPE(StreamEditor, Control );
+ GDCLASS(StreamEditor, Control );
Button * play;
Button * stop;
@@ -62,7 +62,7 @@ public:
class StreamEditorPlugin : public EditorPlugin {
- OBJ_TYPE( StreamEditorPlugin, EditorPlugin );
+ GDCLASS( StreamEditorPlugin, EditorPlugin );
StreamEditor *stream_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/style_box_editor_plugin.cpp b/tools/editor/plugins/style_box_editor_plugin.cpp
index d5c885bd55..4319832adb 100644
--- a/tools/editor/plugins/style_box_editor_plugin.cpp
+++ b/tools/editor/plugins/style_box_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -48,10 +48,10 @@ void StyleBoxEditor::_sb_changed() {
void StyleBoxEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_sb_changed",&StyleBoxEditor::_sb_changed);
-// ObjectTypeDB::bind_method("_import",&StyleBoxEditor::_import);
-// ObjectTypeDB::bind_method("_import_accept",&StyleBoxEditor::_import_accept);
-// ObjectTypeDB::bind_method("_preview_text_changed",&StyleBoxEditor::_preview_text_changed);
+ ClassDB::bind_method("_sb_changed",&StyleBoxEditor::_sb_changed);
+// ClassDB::bind_method("_import",&StyleBoxEditor::_import);
+// ClassDB::bind_method("_import_accept",&StyleBoxEditor::_import_accept);
+// ClassDB::bind_method("_preview_text_changed",&StyleBoxEditor::_preview_text_changed);
}
StyleBoxEditor::StyleBoxEditor() {
@@ -85,7 +85,7 @@ void StyleBoxEditorPlugin::edit(Object *p_node) {
bool StyleBoxEditorPlugin::handles(Object *p_node) const{
- return p_node->is_type("StyleBox");
+ return p_node->is_class("StyleBox");
}
void StyleBoxEditorPlugin::make_visible(bool p_visible){
diff --git a/tools/editor/plugins/style_box_editor_plugin.h b/tools/editor/plugins/style_box_editor_plugin.h
index 737f830bbb..b2288b8e74 100644
--- a/tools/editor/plugins/style_box_editor_plugin.h
+++ b/tools/editor/plugins/style_box_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -37,7 +37,7 @@
class StyleBoxEditor : public Control {
- OBJ_TYPE( StyleBoxEditor, Control );
+ GDCLASS( StyleBoxEditor, Control );
Panel *panel;
Panel *preview;
@@ -61,7 +61,7 @@ public:
class StyleBoxEditorPlugin : public EditorPlugin {
- OBJ_TYPE( StyleBoxEditorPlugin, EditorPlugin );
+ GDCLASS( StyleBoxEditorPlugin, EditorPlugin );
StyleBoxEditor *stylebox_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/texture_editor_plugin.cpp b/tools/editor/plugins/texture_editor_plugin.cpp
index 1305e91105..7ff7d0f2f7 100644
--- a/tools/editor/plugins/texture_editor_plugin.cpp
+++ b/tools/editor/plugins/texture_editor_plugin.cpp
@@ -4,7 +4,7 @@
#include "globals.h"
#include "tools/editor/editor_settings.h"
-void TextureEditor::_input_event(InputEvent p_event) {
+void TextureEditor::_gui_input(InputEvent p_event) {
}
@@ -49,7 +49,7 @@ void TextureEditor::_notification(int p_what) {
if (texture->cast_to<ImageTexture>()) {
format = Image::get_format_name(texture->cast_to<ImageTexture>()->get_format());
} else {
- format=texture->get_type();
+ format=texture->get_class();
}
String text = itos(texture->get_width())+"x"+itos(texture->get_height())+" "+format;
@@ -84,7 +84,7 @@ void TextureEditor::edit(Ref<Texture> p_texture) {
void TextureEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_input_event"),&TextureEditor::_input_event);
+ ClassDB::bind_method(_MD("_gui_input"),&TextureEditor::_gui_input);
}
@@ -106,7 +106,7 @@ void TextureEditorPlugin::edit(Object *p_object) {
bool TextureEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("Texture");
+ return p_object->is_class("Texture");
}
void TextureEditorPlugin::make_visible(bool p_visible) {
diff --git a/tools/editor/plugins/texture_editor_plugin.h b/tools/editor/plugins/texture_editor_plugin.h
index 5f58f4fcdb..4b05f7f7ab 100644
--- a/tools/editor/plugins/texture_editor_plugin.h
+++ b/tools/editor/plugins/texture_editor_plugin.h
@@ -10,14 +10,14 @@
class TextureEditor : public Control {
- OBJ_TYPE(TextureEditor, Control);
+ GDCLASS(TextureEditor, Control);
Ref<Texture> texture;
protected:
void _notification(int p_what);
- void _input_event(InputEvent p_event);
+ void _gui_input(InputEvent p_event);
static void _bind_methods();
public:
@@ -28,7 +28,7 @@ public:
class TextureEditorPlugin : public EditorPlugin {
- OBJ_TYPE( TextureEditorPlugin, EditorPlugin );
+ GDCLASS( TextureEditorPlugin, EditorPlugin );
TextureEditor *texture_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/texture_region_editor_plugin.cpp b/tools/editor/plugins/texture_region_editor_plugin.cpp
index 9348f683f2..fd3e8fb0f3 100644
--- a/tools/editor/plugins/texture_region_editor_plugin.cpp
+++ b/tools/editor/plugins/texture_region_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Author: Mariano Suligoy */
/* */
@@ -61,7 +61,6 @@ void TextureRegionEditor::_region_draw()
mtx.elements[2]=-draw_ofs;
mtx.scale_basis(Vector2(draw_zoom,draw_zoom));
- VS::get_singleton()->canvas_item_set_clip(edit_draw->get_canvas_item(),true);
VS::get_singleton()->canvas_item_add_set_transform(edit_draw->get_canvas_item(),mtx);
edit_draw->draw_texture(base_tex,Point2());
VS::get_singleton()->canvas_item_add_set_transform(edit_draw->get_canvas_item(),Matrix32());
@@ -166,13 +165,13 @@ void TextureRegionEditor::_region_draw()
hscroll->set_min(scroll_rect.pos.x);
hscroll->set_max(scroll_rect.pos.x+scroll_rect.size.x);
hscroll->set_page(edit_draw->get_size().x);
- hscroll->set_val(draw_ofs.x);
+ hscroll->set_value(draw_ofs.x);
hscroll->set_step(0.001);
vscroll->set_min(scroll_rect.pos.y);
vscroll->set_max(scroll_rect.pos.y+scroll_rect.size.y);
vscroll->set_page(edit_draw->get_size().y);
- vscroll->set_val(draw_ofs.y);
+ vscroll->set_value(draw_ofs.y);
vscroll->set_step(0.001);
updating_scroll=false;
@@ -400,8 +399,8 @@ void TextureRegionEditor::_region_input(const InputEvent& p_input)
if (mm.button_mask&BUTTON_MASK_MIDDLE || Input::get_singleton()->is_key_pressed(KEY_SPACE)) {
Vector2 draged(mm.relative_x,mm.relative_y);
- hscroll->set_val( hscroll->get_val()-draged.x );
- vscroll->set_val( vscroll->get_val()-draged.y );
+ hscroll->set_value( hscroll->get_value()-draged.x );
+ vscroll->set_value( vscroll->get_value()-draged.y );
} else if (drag) {
@@ -500,8 +499,8 @@ void TextureRegionEditor::_scroll_changed(float)
if (updating_scroll)
return;
- draw_ofs.x=hscroll->get_val();
- draw_ofs.y=vscroll->get_val();
+ draw_ofs.x=hscroll->get_value();
+ draw_ofs.y=vscroll->get_value();
edit_draw->update();
}
@@ -615,21 +614,21 @@ void TextureRegionEditor::_node_removed(Object *p_obj)
void TextureRegionEditor::_bind_methods()
{
- ObjectTypeDB::bind_method(_MD("_edit_region"),&TextureRegionEditor::_edit_region);
- ObjectTypeDB::bind_method(_MD("_region_draw"),&TextureRegionEditor::_region_draw);
- ObjectTypeDB::bind_method(_MD("_region_input"),&TextureRegionEditor::_region_input);
- ObjectTypeDB::bind_method(_MD("_scroll_changed"),&TextureRegionEditor::_scroll_changed);
- ObjectTypeDB::bind_method(_MD("_node_removed"),&TextureRegionEditor::_node_removed);
- ObjectTypeDB::bind_method(_MD("_set_snap_mode"),&TextureRegionEditor::_set_snap_mode);
- ObjectTypeDB::bind_method(_MD("_set_snap_off_x"),&TextureRegionEditor::_set_snap_off_x);
- ObjectTypeDB::bind_method(_MD("_set_snap_off_y"),&TextureRegionEditor::_set_snap_off_y);
- ObjectTypeDB::bind_method(_MD("_set_snap_step_x"),&TextureRegionEditor::_set_snap_step_x);
- ObjectTypeDB::bind_method(_MD("_set_snap_step_y"),&TextureRegionEditor::_set_snap_step_y);
- ObjectTypeDB::bind_method(_MD("_set_snap_sep_x"),&TextureRegionEditor::_set_snap_sep_x);
- ObjectTypeDB::bind_method(_MD("_set_snap_sep_y"),&TextureRegionEditor::_set_snap_sep_y);
- ObjectTypeDB::bind_method(_MD("_zoom_in"),&TextureRegionEditor::_zoom_in);
- ObjectTypeDB::bind_method(_MD("_zoom_reset"),&TextureRegionEditor::_zoom_reset);
- ObjectTypeDB::bind_method(_MD("_zoom_out"),&TextureRegionEditor::_zoom_out);
+ ClassDB::bind_method(_MD("_edit_region"),&TextureRegionEditor::_edit_region);
+ ClassDB::bind_method(_MD("_region_draw"),&TextureRegionEditor::_region_draw);
+ ClassDB::bind_method(_MD("_region_input"),&TextureRegionEditor::_region_input);
+ ClassDB::bind_method(_MD("_scroll_changed"),&TextureRegionEditor::_scroll_changed);
+ ClassDB::bind_method(_MD("_node_removed"),&TextureRegionEditor::_node_removed);
+ ClassDB::bind_method(_MD("_set_snap_mode"),&TextureRegionEditor::_set_snap_mode);
+ ClassDB::bind_method(_MD("_set_snap_off_x"),&TextureRegionEditor::_set_snap_off_x);
+ ClassDB::bind_method(_MD("_set_snap_off_y"),&TextureRegionEditor::_set_snap_off_y);
+ ClassDB::bind_method(_MD("_set_snap_step_x"),&TextureRegionEditor::_set_snap_step_x);
+ ClassDB::bind_method(_MD("_set_snap_step_y"),&TextureRegionEditor::_set_snap_step_y);
+ ClassDB::bind_method(_MD("_set_snap_sep_x"),&TextureRegionEditor::_set_snap_sep_x);
+ ClassDB::bind_method(_MD("_set_snap_sep_y"),&TextureRegionEditor::_set_snap_sep_y);
+ ClassDB::bind_method(_MD("_zoom_in"),&TextureRegionEditor::_zoom_in);
+ ClassDB::bind_method(_MD("_zoom_reset"),&TextureRegionEditor::_zoom_reset);
+ ClassDB::bind_method(_MD("_zoom_out"),&TextureRegionEditor::_zoom_out);
}
void TextureRegionEditor::edit(Object *p_obj)
@@ -818,7 +817,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode* p_editor)
for (int i = 0; i < 4; i++)
p->set_item_as_checkable(i,true);
p->set_item_checked(0,true);
- p->connect("item_pressed", this, "_set_snap_mode");
+ p->connect("id_pressed", this, "_set_snap_mode");
hb_grid = memnew( HBoxContainer );
hb_tools->add_child(hb_grid);
hb_grid->add_child( memnew( VSeparator ));
@@ -829,7 +828,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode* p_editor)
sb_off_x->set_min(-256);
sb_off_x->set_max(256);
sb_off_x->set_step(1);
- sb_off_x->set_val(snap_offset.x);
+ sb_off_x->set_value(snap_offset.x);
sb_off_x->set_suffix("px");
sb_off_x->connect("value_changed", this, "_set_snap_off_x");
hb_grid->add_child(sb_off_x);
@@ -838,7 +837,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode* p_editor)
sb_off_y->set_min(-256);
sb_off_y->set_max(256);
sb_off_y->set_step(1);
- sb_off_y->set_val(snap_offset.y);
+ sb_off_y->set_value(snap_offset.y);
sb_off_y->set_suffix("px");
sb_off_y->connect("value_changed", this, "_set_snap_off_y");
hb_grid->add_child(sb_off_y);
@@ -850,7 +849,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode* p_editor)
sb_step_x->set_min(-256);
sb_step_x->set_max(256);
sb_step_x->set_step(1);
- sb_step_x->set_val(snap_step.x);
+ sb_step_x->set_value(snap_step.x);
sb_step_x->set_suffix("px");
sb_step_x->connect("value_changed", this, "_set_snap_step_x");
hb_grid->add_child(sb_step_x);
@@ -859,7 +858,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode* p_editor)
sb_step_y->set_min(-256);
sb_step_y->set_max(256);
sb_step_y->set_step(1);
- sb_step_y->set_val(snap_step.y);
+ sb_step_y->set_value(snap_step.y);
sb_step_y->set_suffix("px");
sb_step_y->connect("value_changed", this, "_set_snap_step_y");
hb_grid->add_child(sb_step_y);
@@ -871,7 +870,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode* p_editor)
sb_sep_x->set_min(0);
sb_sep_x->set_max(256);
sb_sep_x->set_step(1);
- sb_sep_x->set_val(snap_separation.x);
+ sb_sep_x->set_value(snap_separation.x);
sb_sep_x->set_suffix("px");
sb_sep_x->connect("value_changed", this, "_set_snap_sep_x");
hb_grid->add_child(sb_sep_x);
@@ -880,7 +879,7 @@ TextureRegionEditor::TextureRegionEditor(EditorNode* p_editor)
sb_sep_y->set_min(0);
sb_sep_y->set_max(256);
sb_sep_y->set_step(1);
- sb_sep_y->set_val(snap_separation.y);
+ sb_sep_y->set_value(snap_separation.y);
sb_sep_y->set_suffix("px");
sb_sep_y->connect("value_changed", this, "_set_snap_sep_y");
hb_grid->add_child(sb_sep_y);
@@ -921,10 +920,12 @@ TextureRegionEditor::TextureRegionEditor(EditorNode* p_editor)
hscroll->connect("value_changed",this,"_scroll_changed");
edit_draw->connect("draw",this,"_region_draw");
- edit_draw->connect("input_event",this,"_region_input");
+ edit_draw->connect("gui_input",this,"_region_input");
draw_zoom=1.0;
updating_scroll=false;
+ edit_draw->set_clip_contents(true);
+
}
void TextureRegionEditorPlugin::edit(Object *p_node)
@@ -934,7 +935,7 @@ void TextureRegionEditorPlugin::edit(Object *p_node)
bool TextureRegionEditorPlugin::handles(Object *p_obj) const
{
- return p_obj->is_type("Sprite") || p_obj->is_type("Patch9Frame") || p_obj->is_type("StyleBoxTexture") || p_obj->is_type("AtlasTexture");
+ return p_obj->is_class("Sprite") || p_obj->is_class("Patch9Frame") || p_obj->is_class("StyleBoxTexture") || p_obj->is_class("AtlasTexture");
}
void TextureRegionEditorPlugin::make_visible(bool p_visible)
@@ -971,22 +972,22 @@ void TextureRegionEditorPlugin::set_state(const Dictionary& p_state){
if (state.has("snap_step")) {
Vector2 s = state["snap_step"];
- region_editor->sb_step_x->set_val(s.x);
- region_editor->sb_step_y->set_val(s.y);
+ region_editor->sb_step_x->set_value(s.x);
+ region_editor->sb_step_y->set_value(s.y);
region_editor->snap_step = s;
}
if (state.has("snap_offset")) {
Vector2 ofs = state["snap_offset"];
- region_editor->sb_off_x->set_val(ofs.x);
- region_editor->sb_off_y->set_val(ofs.y);
+ region_editor->sb_off_x->set_value(ofs.x);
+ region_editor->sb_off_y->set_value(ofs.y);
region_editor->snap_offset = ofs;
}
if (state.has("snap_separation")) {
Vector2 sep = state["snap_separation"];
- region_editor->sb_sep_x->set_val(sep.x);
- region_editor->sb_sep_y->set_val(sep.y);
+ region_editor->sb_sep_x->set_value(sep.x);
+ region_editor->sb_sep_y->set_value(sep.y);
region_editor->snap_separation = sep;
}
diff --git a/tools/editor/plugins/texture_region_editor_plugin.h b/tools/editor/plugins/texture_region_editor_plugin.h
index f0bb7c9bc2..32cf389c35 100644
--- a/tools/editor/plugins/texture_region_editor_plugin.h
+++ b/tools/editor/plugins/texture_region_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Author: Mariano Suligoy */
/* */
@@ -42,7 +42,7 @@
class TextureRegionEditor : public Control {
- OBJ_TYPE(TextureRegionEditor, Control );
+ GDCLASS(TextureRegionEditor, Control );
enum SnapMode {
SNAP_NONE,
@@ -132,7 +132,7 @@ public:
class TextureRegionEditorPlugin : public EditorPlugin
{
- OBJ_TYPE( TextureRegionEditorPlugin, EditorPlugin );
+ GDCLASS( TextureRegionEditorPlugin, EditorPlugin );
Button *region_button;
TextureRegionEditor *region_editor;
diff --git a/tools/editor/plugins/theme_editor_plugin.cpp b/tools/editor/plugins/theme_editor_plugin.cpp
index 84568aa8c0..a700ddce7a 100644
--- a/tools/editor/plugins/theme_editor_plugin.cpp
+++ b/tools/editor/plugins/theme_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -631,12 +631,12 @@ void ThemeEditor::_notification(int p_what) {
void ThemeEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_type_menu_cbk",&ThemeEditor::_type_menu_cbk);
- ObjectTypeDB::bind_method("_name_menu_about_to_show",&ThemeEditor::_name_menu_about_to_show);
- ObjectTypeDB::bind_method("_name_menu_cbk",&ThemeEditor::_name_menu_cbk);
- ObjectTypeDB::bind_method("_theme_menu_cbk",&ThemeEditor::_theme_menu_cbk);
- ObjectTypeDB::bind_method("_dialog_cbk",&ThemeEditor::_dialog_cbk);
- ObjectTypeDB::bind_method("_save_template_cbk",&ThemeEditor::_save_template_cbk);
+ ClassDB::bind_method("_type_menu_cbk",&ThemeEditor::_type_menu_cbk);
+ ClassDB::bind_method("_name_menu_about_to_show",&ThemeEditor::_name_menu_about_to_show);
+ ClassDB::bind_method("_name_menu_cbk",&ThemeEditor::_name_menu_cbk);
+ ClassDB::bind_method("_theme_menu_cbk",&ThemeEditor::_theme_menu_cbk);
+ ClassDB::bind_method("_dialog_cbk",&ThemeEditor::_dialog_cbk);
+ ClassDB::bind_method("_save_template_cbk",&ThemeEditor::_save_template_cbk);
}
ThemeEditor::ThemeEditor() {
@@ -679,7 +679,7 @@ ThemeEditor::ThemeEditor() {
add_child(theme_menu);
theme_menu->set_pos(Vector2(3,3)*EDSCALE);
- theme_menu->get_popup()->connect("item_pressed", this,"_theme_menu_cbk");
+ theme_menu->get_popup()->connect("id_pressed", this,"_theme_menu_cbk");
HBoxContainer *main_hb = memnew( HBoxContainer );
@@ -711,7 +711,7 @@ ThemeEditor::ThemeEditor() {
first_vb->add_child(cbx );
- ButtonGroup *bg = memnew( ButtonGroup );
+ VBoxContainer *bg = memnew( VBoxContainer );
bg->set_v_size_flags(SIZE_EXPAND_FILL);
VBoxContainer *gbvb = memnew( VBoxContainer );
gbvb->set_v_size_flags(SIZE_EXPAND_FILL);
@@ -750,7 +750,7 @@ ThemeEditor::ThemeEditor() {
first_vb->add_child( memnew( HScrollBar ));
first_vb->add_child( memnew( SpinBox ));
ProgressBar *pb=memnew( ProgressBar );
- pb->set_val(50);
+ pb->set_value(50);
first_vb->add_child( pb);
Panel *pn=memnew( Panel );
pn->set_custom_minimum_size(Size2(40,40)*EDSCALE);
@@ -898,7 +898,7 @@ ThemeEditor::ThemeEditor() {
type_menu->set_text("..");
add_del_dialog->add_child(type_menu);
- type_menu->get_popup()->connect("item_pressed", this,"_type_menu_cbk");
+ type_menu->get_popup()->connect("id_pressed", this,"_type_menu_cbk");
l = memnew( Label );
l->set_pos( Point2(200,5)*EDSCALE );
@@ -918,7 +918,7 @@ ThemeEditor::ThemeEditor() {
add_del_dialog->add_child(name_menu);
name_menu->get_popup()->connect("about_to_show", this,"_name_menu_about_to_show");
- name_menu->get_popup()->connect("item_pressed", this,"_name_menu_cbk");
+ name_menu->get_popup()->connect("id_pressed", this,"_name_menu_cbk");
type_select_label= memnew( Label );
type_select_label->set_pos( Point2(400,5)*EDSCALE );
@@ -963,7 +963,7 @@ void ThemeEditorPlugin::edit(Object *p_node) {
bool ThemeEditorPlugin::handles(Object *p_node) const{
- return p_node->is_type("Theme");
+ return p_node->is_class("Theme");
}
void ThemeEditorPlugin::make_visible(bool p_visible){
diff --git a/tools/editor/plugins/theme_editor_plugin.h b/tools/editor/plugins/theme_editor_plugin.h
index ea8f8c1d3c..0af9128bf2 100644
--- a/tools/editor/plugins/theme_editor_plugin.h
+++ b/tools/editor/plugins/theme_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -44,7 +44,7 @@
class ThemeEditor : public Control {
- OBJ_TYPE( ThemeEditor, Control );
+ GDCLASS( ThemeEditor, Control );
ScrollContainer *scroll;
@@ -103,7 +103,7 @@ public:
class ThemeEditorPlugin : public EditorPlugin {
- OBJ_TYPE( ThemeEditorPlugin, EditorPlugin );
+ GDCLASS( ThemeEditorPlugin, EditorPlugin );
ThemeEditor *theme_editor;
EditorNode *editor;
diff --git a/tools/editor/plugins/tile_map_editor_plugin.cpp b/tools/editor/plugins/tile_map_editor_plugin.cpp
index 43fe7d7ea9..1b3bcb7d2c 100644
--- a/tools/editor/plugins/tile_map_editor_plugin.cpp
+++ b/tools/editor/plugins/tile_map_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -189,7 +189,7 @@ void TileMapEditor::_sbox_input(const InputEvent& p_ie) {
p_ie.key.scancode == KEY_PAGEUP ||
p_ie.key.scancode == KEY_PAGEDOWN ) ) {
- palette->call("_input_event", p_ie);
+ palette->call("_gui_input", p_ie);
search_box->accept_event();
}
}
@@ -212,16 +212,16 @@ void TileMapEditor::_update_palette() {
if (tiles.empty())
return;
- float min_size = EDITOR_DEF("tile_map/preview_size", 64);
+ float min_size = EDITOR_DEF("editors/tile_map/preview_size", 64);
min_size *= EDSCALE;
- int hseparation = EDITOR_DEF("tile_map/palette_item_hseparation",8);
- bool show_tile_names = bool(EDITOR_DEF("tile_map/show_tile_names", true));
+ int hseparation = EDITOR_DEF("editors/tile_map/palette_item_hseparation",8);
+ bool show_tile_names = bool(EDITOR_DEF("editors/tile_map/show_tile_names", true));
palette->add_constant_override("hseparation", hseparation*EDSCALE);
palette->add_constant_override("vseparation", 8*EDSCALE);
palette->set_fixed_icon_size(Size2(min_size, min_size));
- palette->set_fixed_column_width(min_size * MAX(size_slider->get_val(), 1));
+ palette->set_fixed_column_width(min_size * MAX(size_slider->get_value(), 1));
String filter = search_box->get_text().strip_edges();
@@ -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) {
+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,14 +297,43 @@ 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>();
}
- Rect2 r = node->get_item_rect();
+ Rect2i r = node->get_item_rect();
r.pos = r.pos/node->get_cell_size();
r.size = r.size/node->get_cell_size();
- DVector<Vector2> points;
+ int area = r.get_area();
+ if(preview) {
+ // Test if we can re-use the result from preview bucket fill
+ bool invalidate_cache = false;
+ // Area changed
+ if(r != bucket_cache_rect)
+ _clear_bucket_cache();
+ // Cache grid is not initialized
+ if(bucket_cache_visited == 0) {
+ bucket_cache_visited = new bool[area];
+ invalidate_cache = true;
+ }
+ // Tile ID changed or position wasn't visited by the previous fill
+ int loc = (p_start.x - r.get_pos().x) + (p_start.y - r.get_pos().y) * r.get_size().x;
+ if(prev_id != bucket_cache_tile || !bucket_cache_visited[loc]) {
+ invalidate_cache = true;
+ }
+ if(invalidate_cache) {
+ for(int i = 0; i < area; ++i)
+ bucket_cache_visited[i] = false;
+ bucket_cache = PoolVector<Vector2>();
+ bucket_cache_tile = prev_id;
+ bucket_cache_rect = r;
+ }
+ else {
+ return bucket_cache;
+ }
+ }
+
+ PoolVector<Vector2> points;
List<Point2i> queue;
queue.push_back(p_start);
@@ -319,9 +348,17 @@ DVector<Vector2> TileMapEditor::_bucket_fill(const Point2i& p_start, bool erase)
if (node->get_cell(n.x, n.y) == prev_id) {
- node->set_cellv(n, id, flip_h, flip_v, transpose);
-
- points.push_back(n);
+ if(preview) {
+ int loc = (n.x - r.get_pos().x) + (n.y - r.get_pos().y) * r.get_size().x;
+ if(bucket_cache_visited[loc])
+ continue;
+ bucket_cache_visited[loc] = true;
+ bucket_cache.push_back(n);
+ }
+ else {
+ node->set_cellv(n, id, flip_h, flip_v, transpose);
+ points.push_back(n);
+ }
queue.push_back(n + Point2i(0, 1));
queue.push_back(n + Point2i(0, -1));
@@ -330,13 +367,13 @@ DVector<Vector2> TileMapEditor::_bucket_fill(const Point2i& p_start, bool erase)
}
}
- return points;
+ 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"];
@@ -349,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++) {
@@ -468,6 +505,25 @@ void TileMapEditor::_draw_cell(int p_cell, const Point2i& p_point, bool p_flip_h
canvas_item_editor->draw_texture_rect_region(t, rect, r, Color(1,1,1,0.5), p_transpose);
}
+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) {
+
+ 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();
+
+ for(int i = 0; i < len; ++i) {
+ _draw_cell(p_cell, pr[i], p_flip_h, p_flip_v, p_transpose, p_xform);
+ }
+}
+
+void TileMapEditor::_clear_bucket_cache() {
+ if(bucket_cache_visited) {
+ delete[] bucket_cache_visited;
+ bucket_cache_visited = 0;
+ }
+}
+
void TileMapEditor::_update_copydata() {
copydata.clear();
@@ -539,7 +595,7 @@ static inline Vector<Point2i> line(int x0, int x1, int y0, int y1) {
return points;
}
-bool TileMapEditor::forward_input_event(const InputEvent& p_event) {
+bool TileMapEditor::forward_gui_input(const InputEvent& p_event) {
if (!node || !node->get_tileset().is_valid() || !node->is_visible())
return false;
@@ -692,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;
@@ -798,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;
@@ -1148,8 +1204,8 @@ void TileMapEditor::_canvas_draw() {
canvas_item_editor->draw_line(endpoints[i],endpoints[(i+1)%4],col,2);
- if (tool==TOOL_SELECTING || tool==TOOL_PICKING || tool==TOOL_BUCKET) {
-
+ bool bucket_preview = EditorSettings::get_singleton()->get("editors/tile_map/bucket_fill_preview");
+ if (tool==TOOL_SELECTING || tool==TOOL_PICKING || !bucket_preview) {
return;
}
@@ -1214,6 +1270,11 @@ void TileMapEditor::_canvas_draw() {
canvas_item_editor->draw_colored_polygon(points, Color(0.2,1.0,0.8,0.2));
+ } else if(tool == TOOL_BUCKET) {
+
+ int tile = get_selected_tile();
+ _draw_fill_preview(tile, over_tile, flip_h, flip_v, transpose, xform);
+
} else {
int st = get_selected_tile();
@@ -1264,6 +1325,8 @@ void TileMapEditor::edit(Node *p_tile_map) {
if (node)
node->connect("settings_changed",this,"_tileset_settings_changed");
+ _clear_bucket_cache();
+
}
void TileMapEditor::_tileset_settings_changed() {
@@ -1283,20 +1346,20 @@ void TileMapEditor::_icon_size_changed(float p_value) {
void TileMapEditor::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_text_entered"),&TileMapEditor::_text_entered);
- ObjectTypeDB::bind_method(_MD("_text_changed"),&TileMapEditor::_text_changed);
- ObjectTypeDB::bind_method(_MD("_sbox_input"),&TileMapEditor::_sbox_input);
- ObjectTypeDB::bind_method(_MD("_menu_option"),&TileMapEditor::_menu_option);
- ObjectTypeDB::bind_method(_MD("_canvas_draw"),&TileMapEditor::_canvas_draw);
- ObjectTypeDB::bind_method(_MD("_canvas_mouse_enter"),&TileMapEditor::_canvas_mouse_enter);
- ObjectTypeDB::bind_method(_MD("_canvas_mouse_exit"),&TileMapEditor::_canvas_mouse_exit);
- ObjectTypeDB::bind_method(_MD("_tileset_settings_changed"),&TileMapEditor::_tileset_settings_changed);
- ObjectTypeDB::bind_method(_MD("_update_transform_buttons"),&TileMapEditor::_update_transform_buttons);
+ ClassDB::bind_method(_MD("_text_entered"),&TileMapEditor::_text_entered);
+ ClassDB::bind_method(_MD("_text_changed"),&TileMapEditor::_text_changed);
+ ClassDB::bind_method(_MD("_sbox_input"),&TileMapEditor::_sbox_input);
+ ClassDB::bind_method(_MD("_menu_option"),&TileMapEditor::_menu_option);
+ ClassDB::bind_method(_MD("_canvas_draw"),&TileMapEditor::_canvas_draw);
+ ClassDB::bind_method(_MD("_canvas_mouse_enter"),&TileMapEditor::_canvas_mouse_enter);
+ ClassDB::bind_method(_MD("_canvas_mouse_exit"),&TileMapEditor::_canvas_mouse_exit);
+ ClassDB::bind_method(_MD("_tileset_settings_changed"),&TileMapEditor::_tileset_settings_changed);
+ ClassDB::bind_method(_MD("_update_transform_buttons"),&TileMapEditor::_update_transform_buttons);
- ObjectTypeDB::bind_method(_MD("_fill_points"),&TileMapEditor::_fill_points);
- ObjectTypeDB::bind_method(_MD("_erase_points"),&TileMapEditor::_erase_points);
+ ClassDB::bind_method(_MD("_fill_points"),&TileMapEditor::_fill_points);
+ ClassDB::bind_method(_MD("_erase_points"),&TileMapEditor::_erase_points);
- ObjectTypeDB::bind_method(_MD("_icon_size_changed"), &TileMapEditor::_icon_size_changed);
+ ClassDB::bind_method(_MD("_icon_size_changed"), &TileMapEditor::_icon_size_changed);
}
TileMapEditor::CellOp TileMapEditor::_get_op_from_cell(const Point2i& p_pos)
@@ -1365,6 +1428,9 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
flip_v=false;
transpose=false;
+ bucket_cache_tile = -1;
+ bucket_cache_visited = 0;
+
ED_SHORTCUT("tile_map_editor/erase_selection", TTR("Erase selection"), KEY_DELETE);
ED_SHORTCUT("tile_map_editor/find_tile", TTR("Find tile"), KEY_MASK_CMD+KEY_F);
ED_SHORTCUT("tile_map_editor/transpose", TTR("Transpose"));
@@ -1375,7 +1441,7 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
search_box->set_h_size_flags(SIZE_EXPAND_FILL);
search_box->connect("text_entered", this, "_text_entered");
search_box->connect("text_changed", this, "_text_changed");
- search_box->connect("input_event", this, "_sbox_input");
+ search_box->connect("gui_input", this, "_sbox_input");
add_child(search_box);
size_slider = memnew( HSlider );
@@ -1383,11 +1449,11 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
size_slider->set_min(0.1f);
size_slider->set_max(4.0f);
size_slider->set_step(0.1f);
- size_slider->set_val(1.0f);
+ size_slider->set_value(1.0f);
size_slider->connect("value_changed", this, "_icon_size_changed");
add_child(size_slider);
- int mw = EDITOR_DEF("tile_map/palette_min_width", 80);
+ int mw = EDITOR_DEF("editors/tile_map/palette_min_width", 80);
// Add tile palette
palette = memnew( ItemList );
@@ -1423,7 +1489,7 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
p->add_shortcut(ED_SHORTCUT("tile_map_editor/duplicate_selection", TTR("Duplicate Selection"), KEY_MASK_CMD+KEY_D), OPTION_DUPLICATE);
p->add_shortcut(ED_GET_SHORTCUT("tile_map_editor/erase_selection"), OPTION_ERASE_SELECTION);
- p->connect("item_pressed", this, "_menu_option");
+ p->connect("id_pressed", this, "_menu_option");
toolbar->add_child(options);
@@ -1479,6 +1545,10 @@ TileMapEditor::TileMapEditor(EditorNode *p_editor) {
rotate_0->set_pressed(true);
}
+TileMapEditor::~TileMapEditor() {
+ _clear_bucket_cache();
+}
+
///////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////
@@ -1490,7 +1560,7 @@ void TileMapEditorPlugin::edit(Object *p_object) {
bool TileMapEditorPlugin::handles(Object *p_object) const {
- return p_object->is_type("TileMap");
+ return p_object->is_class("TileMap");
}
void TileMapEditorPlugin::make_visible(bool p_visible) {
@@ -1509,9 +1579,10 @@ void TileMapEditorPlugin::make_visible(bool p_visible) {
TileMapEditorPlugin::TileMapEditorPlugin(EditorNode *p_node) {
- EDITOR_DEF("tile_map/preview_size",64);
- EDITOR_DEF("tile_map/palette_item_hseparation",8);
- EDITOR_DEF("tile_map/show_tile_names", true);
+ EDITOR_DEF("editors/tile_map/preview_size",64);
+ EDITOR_DEF("editors/tile_map/palette_item_hseparation",8);
+ EDITOR_DEF("editors/tile_map/show_tile_names", true);
+ EDITOR_DEF("editors/tile_map/bucket_fill_preview", true);
tile_map_editor = memnew( TileMapEditor(p_node) );
add_control_to_container(CONTAINER_CANVAS_EDITOR_SIDE, tile_map_editor);
diff --git a/tools/editor/plugins/tile_map_editor_plugin.h b/tools/editor/plugins/tile_map_editor_plugin.h
index 2f24002770..79c2dcd0bd 100644
--- a/tools/editor/plugins/tile_map_editor_plugin.h
+++ b/tools/editor/plugins/tile_map_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -44,7 +44,7 @@
class TileMapEditor : public VBoxContainer {
- OBJ_TYPE(TileMapEditor, VBoxContainer );
+ GDCLASS(TileMapEditor, VBoxContainer );
enum Tool {
@@ -106,6 +106,11 @@ class TileMapEditor : public VBoxContainer {
Point2i over_tile;
+ bool * bucket_cache_visited;
+ Rect2i bucket_cache_rect;
+ int bucket_cache_tile;
+ PoolVector<Vector2> bucket_cache;
+
struct CellOp {
int idx;
bool xf;
@@ -129,14 +134,17 @@ class TileMapEditor : public VBoxContainer {
void _pick_tile(const Point2& p_pos);
- DVector<Vector2> _bucket_fill(const Point2i& p_start, bool erase=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);
void _draw_cell(int p_cell, const Point2i& p_point, bool p_flip_h, bool p_flip_v, bool p_transpose, const Matrix32& p_xform);
+ void _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);
+ void _clear_bucket_cache();
+
void _update_copydata();
int get_selected_tile() const;
@@ -167,21 +175,22 @@ public:
HBoxContainer *get_toolbar() const { return toolbar; }
- bool forward_input_event(const InputEvent& p_event);
+ bool forward_gui_input(const InputEvent& p_event);
void edit(Node *p_tile_map);
TileMapEditor(EditorNode *p_editor);
+ ~TileMapEditor();
};
class TileMapEditorPlugin : public EditorPlugin {
- OBJ_TYPE( TileMapEditorPlugin, EditorPlugin );
+ GDCLASS( TileMapEditorPlugin, EditorPlugin );
TileMapEditor *tile_map_editor;
public:
- virtual bool forward_canvas_input_event(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return tile_map_editor->forward_input_event(p_event); }
+ virtual bool forward_canvas_gui_input(const Matrix32& p_canvas_xform,const InputEvent& p_event) { return tile_map_editor->forward_gui_input(p_event); }
virtual String get_name() const { return "TileMap"; }
bool has_main_screen() const { return false; }
diff --git a/tools/editor/plugins/tile_set_editor_plugin.cpp b/tools/editor/plugins/tile_set_editor_plugin.cpp
index 39a15189e7..34002ee863 100644
--- a/tools/editor/plugins/tile_set_editor_plugin.cpp
+++ b/tools/editor/plugins/tile_set_editor_plugin.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -221,9 +221,9 @@ Error TileSetEditor::update_library_file(Node *p_base_scene, Ref<TileSet> ml,boo
void TileSetEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_menu_cbk",&TileSetEditor::_menu_cbk);
- ObjectTypeDB::bind_method("_menu_confirm",&TileSetEditor::_menu_confirm);
- ObjectTypeDB::bind_method("_name_dialog_confirm",&TileSetEditor::_name_dialog_confirm);
+ ClassDB::bind_method("_menu_cbk",&TileSetEditor::_menu_cbk);
+ ClassDB::bind_method("_menu_confirm",&TileSetEditor::_menu_confirm);
+ ClassDB::bind_method("_name_dialog_confirm",&TileSetEditor::_name_dialog_confirm);
}
TileSetEditor::TileSetEditor(EditorNode *p_editor) {
@@ -240,7 +240,7 @@ TileSetEditor::TileSetEditor(EditorNode *p_editor) {
options->get_popup()->add_separator();
options->get_popup()->add_item(TTR("Create from Scene"),MENU_OPTION_CREATE_FROM_SCENE);
options->get_popup()->add_item(TTR("Merge from Scene"),MENU_OPTION_MERGE_FROM_SCENE);
- options->get_popup()->connect("item_pressed", this,"_menu_cbk");
+ options->get_popup()->connect("id_pressed", this,"_menu_cbk");
editor=p_editor;
cd = memnew(ConfirmationDialog);
add_child(cd);
@@ -268,7 +268,7 @@ void TileSetEditorPlugin::edit(Object *p_node) {
bool TileSetEditorPlugin::handles(Object *p_node) const{
- return p_node->is_type("TileSet");
+ return p_node->is_class("TileSet");
}
void TileSetEditorPlugin::make_visible(bool p_visible){
diff --git a/tools/editor/plugins/tile_set_editor_plugin.h b/tools/editor/plugins/tile_set_editor_plugin.h
index 3f47520e2a..7fec7fa162 100644
--- a/tools/editor/plugins/tile_set_editor_plugin.h
+++ b/tools/editor/plugins/tile_set_editor_plugin.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -38,7 +38,7 @@
class TileSetEditor : public Control {
- OBJ_TYPE( TileSetEditor, Control );
+ GDCLASS( TileSetEditor, Control );
Ref<TileSet> tileset;
@@ -78,7 +78,7 @@ public:
class TileSetEditorPlugin : public EditorPlugin {
- OBJ_TYPE( TileSetEditorPlugin, EditorPlugin );
+ GDCLASS( TileSetEditorPlugin, EditorPlugin );
TileSetEditor *tileset_editor;
EditorNode *editor;
diff --git a/tools/editor/progress_dialog.cpp b/tools/editor/progress_dialog.cpp
index a950f7acfc..03303b8c48 100644
--- a/tools/editor/progress_dialog.cpp
+++ b/tools/editor/progress_dialog.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -42,7 +42,7 @@ void BackgroundProgress::_add_task(const String& p_task,const String& p_label, i
t.hb->add_child(l);
t.progress = memnew( ProgressBar );
t.progress->set_max(p_steps);
- t.progress->set_val(p_steps);
+ t.progress->set_value(p_steps);
Control *ec = memnew( Control );
ec->set_h_size_flags(SIZE_EXPAND_FILL);
ec->set_v_size_flags(SIZE_EXPAND_FILL);
@@ -83,9 +83,9 @@ void BackgroundProgress::_task_step(const String& p_task, int p_step){
Task &t=tasks[p_task];
if (p_step<0)
- t.progress->set_val(t.progress->get_val()+1);
+ t.progress->set_value(t.progress->get_value()+1);
else
- t.progress->set_val(p_step);
+ t.progress->set_value(p_step);
}
void BackgroundProgress::_end_task(const String& p_task){
@@ -101,10 +101,10 @@ void BackgroundProgress::_end_task(const String& p_task){
void BackgroundProgress::_bind_methods(){
- ObjectTypeDB::bind_method("_add_task",&BackgroundProgress::_add_task);
- ObjectTypeDB::bind_method("_task_step",&BackgroundProgress::_task_step);
- ObjectTypeDB::bind_method("_end_task",&BackgroundProgress::_end_task);
- ObjectTypeDB::bind_method("_update",&BackgroundProgress::_update);
+ ClassDB::bind_method("_add_task",&BackgroundProgress::_add_task);
+ ClassDB::bind_method("_task_step",&BackgroundProgress::_task_step);
+ ClassDB::bind_method("_end_task",&BackgroundProgress::_end_task);
+ ClassDB::bind_method("_update",&BackgroundProgress::_update);
}
@@ -182,7 +182,7 @@ void ProgressDialog::add_task(const String& p_task,const String& p_label,int p_s
t.vb->add_margin_child(p_label,vb2);
t.progress = memnew( ProgressBar );
t.progress->set_max(p_steps);
- t.progress->set_val(p_steps);
+ t.progress->set_value(p_steps);
vb2->add_child(t.progress);
t.state=memnew( Label );
t.state->set_clip_text(true);
@@ -206,9 +206,9 @@ void ProgressDialog::task_step(const String& p_task, const String& p_state, int
Task &t=tasks[p_task];
if (p_step<0)
- t.progress->set_val(t.progress->get_val()+1);
+ t.progress->set_value(t.progress->get_value()+1);
else
- t.progress->set_val(p_step);
+ t.progress->set_value(p_step);
t.state->set_text(p_state);
last_progress_tick=OS::get_singleton()->get_ticks_usec();
diff --git a/tools/editor/progress_dialog.h b/tools/editor/progress_dialog.h
index c254d45753..60acf825a9 100644
--- a/tools/editor/progress_dialog.h
+++ b/tools/editor/progress_dialog.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -37,7 +37,7 @@
class BackgroundProgress : public HBoxContainer {
- OBJ_TYPE(BackgroundProgress,HBoxContainer);
+ GDCLASS(BackgroundProgress,HBoxContainer);
_THREAD_SAFE_CLASS_
@@ -72,7 +72,7 @@ public:
class ProgressDialog : public Popup {
- OBJ_TYPE( ProgressDialog, Popup );
+ GDCLASS( ProgressDialog, Popup );
struct Task {
String task;
diff --git a/tools/editor/project_export.cpp b/tools/editor/project_export.cpp
index f4f3959729..27f2f7dbc9 100644
--- a/tools/editor/project_export.cpp
+++ b/tools/editor/project_export.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -274,7 +274,7 @@ void ProjectExportDialog::_script_edited(Variant v) {
void ProjectExportDialog::_sample_convert_edited(int what) {
EditorImportExport::get_singleton()->sample_set_action( EditorImportExport::SampleAction(sample_mode->get_selected()));
- EditorImportExport::get_singleton()->sample_set_max_hz( sample_max_hz->get_val() );
+ EditorImportExport::get_singleton()->sample_set_max_hz( sample_max_hz->get_value() );
EditorImportExport::get_singleton()->sample_set_trim( sample_trim->is_pressed() );
_save_export_cfg();
@@ -325,8 +325,8 @@ void ProjectExportDialog::_notification(int p_what) {
tree_vb->show();
image_action->select(EditorImportExport::get_singleton()->get_export_image_action());
- image_quality->set_val(EditorImportExport::get_singleton()->get_export_image_quality());
- image_shrink->set_val(EditorImportExport::get_singleton()->get_export_image_shrink());
+ image_quality->set_value(EditorImportExport::get_singleton()->get_export_image_quality());
+ image_shrink->set_value(EditorImportExport::get_singleton()->get_export_image_shrink());
_update_script();
@@ -350,7 +350,7 @@ void ProjectExportDialog::_notification(int p_what) {
_update_group_tree();
sample_mode->select( EditorImportExport::get_singleton()->sample_get_action() );
- sample_max_hz->set_val( EditorImportExport::get_singleton()->sample_get_max_hz() );
+ sample_max_hz->set_value( EditorImportExport::get_singleton()->sample_get_max_hz() );
sample_trim->set_pressed( EditorImportExport::get_singleton()->sample_get_trim() );
sample_mode->connect("item_selected",this,"_sample_convert_edited");
@@ -448,7 +448,7 @@ void ProjectExportDialog::_export_mode_changed(int p_idx) {
void ProjectExportDialog::_export_action(const String& p_file) {
- String location = Globals::get_singleton()->globalize_path(p_file).get_base_dir().replace("\\","/");
+ String location = GlobalConfig::get_singleton()->globalize_path(p_file).get_base_dir().replace("\\","/");
while(true) {
@@ -674,7 +674,7 @@ void ProjectExportDialog::_create_android_keystore_window() {
vb->add_child(hb);
keystore_create_dialog->add_child(vb);
- keystore_create_dialog->set_child_rect(vb);
+ //keystore_create_dialog->set_child_rect(vb);
add_child(keystore_create_dialog);
keystore_create_dialog->connect("confirmed", this, "_create_android_keystore");
@@ -733,7 +733,7 @@ void ProjectExportDialog::_create_android_keystore() {
info=info.replace("$"+names[i], edit->get_text());
}
- String jarsigner=EditorSettings::get_singleton()->get("android/jarsigner");
+ String jarsigner=EditorSettings::get_singleton()->get("export/android/jarsigner");
String keytool=jarsigner.get_base_dir().plus_file("keytool");
String os_name=OS::get_singleton()->get_name();
if (os_name.to_lower()=="windows") {
@@ -886,8 +886,8 @@ void ProjectExportDialog::_update_group() {
StringName name = _get_selected_group();
group_image_action->select(EditorImportExport::get_singleton()->image_export_group_get_image_action(name));
group_atlas->set_pressed(EditorImportExport::get_singleton()->image_export_group_get_make_atlas(name));
- group_shrink->set_val(EditorImportExport::get_singleton()->image_export_group_get_shrink(name));
- group_lossy_quality->set_val(EditorImportExport::get_singleton()->image_export_group_get_lossy_quality(name));
+ group_shrink->set_value(EditorImportExport::get_singleton()->image_export_group_get_shrink(name));
+ group_lossy_quality->set_value(EditorImportExport::get_singleton()->image_export_group_get_lossy_quality(name));
if (group_atlas->is_pressed())
atlas_preview->show();
else
@@ -1009,8 +1009,8 @@ void ProjectExportDialog::_group_changed(Variant v) {
EditorNode::get_undo_redo()->create_action(TTR("Change Image Group"));
EditorNode::get_undo_redo()->add_do_method(EditorImportExport::get_singleton(),"image_export_group_set_image_action",name,group_image_action->get_selected());
EditorNode::get_undo_redo()->add_do_method(EditorImportExport::get_singleton(),"image_export_group_set_make_atlas",name,group_atlas->is_pressed());
- EditorNode::get_undo_redo()->add_do_method(EditorImportExport::get_singleton(),"image_export_group_set_shrink",name,group_shrink->get_val());
- EditorNode::get_undo_redo()->add_do_method(EditorImportExport::get_singleton(),"image_export_group_set_lossy_quality",name,group_lossy_quality->get_val());
+ EditorNode::get_undo_redo()->add_do_method(EditorImportExport::get_singleton(),"image_export_group_set_shrink",name,group_shrink->get_value());
+ EditorNode::get_undo_redo()->add_do_method(EditorImportExport::get_singleton(),"image_export_group_set_lossy_quality",name,group_lossy_quality->get_value());
EditorNode::get_undo_redo()->add_undo_method(EditorImportExport::get_singleton(),"image_export_group_set_image_action",name,EditorImportExport::get_singleton()->image_export_group_get_image_action(name));
EditorNode::get_undo_redo()->add_undo_method(EditorImportExport::get_singleton(),"image_export_group_set_make_atlas",name,EditorImportExport::get_singleton()->image_export_group_get_make_atlas(name));
EditorNode::get_undo_redo()->add_undo_method(EditorImportExport::get_singleton(),"image_export_group_set_shrink",name,EditorImportExport::get_singleton()->image_export_group_get_shrink(name));
@@ -1243,11 +1243,11 @@ void ProjectExportDialog::_group_atlas_preview() {
int flags=0;
- if (Globals::get_singleton()->get("image_loader/filter"))
+ if (GlobalConfig::get_singleton()->get("image_loader/filter"))
flags|=EditorTextureImportPlugin::IMAGE_FLAG_FILTER;
- if (!Globals::get_singleton()->get("image_loader/gen_mipmaps"))
+ if (!GlobalConfig::get_singleton()->get("image_loader/gen_mipmaps"))
flags|=EditorTextureImportPlugin::IMAGE_FLAG_NO_MIPMAPS;
- if (!Globals::get_singleton()->get("image_loader/repeat"))
+ if (!GlobalConfig::get_singleton()->get("image_loader/repeat"))
flags|=EditorTextureImportPlugin::IMAGE_FLAG_REPEAT;
flags|=EditorTextureImportPlugin::IMAGE_FLAG_FIX_BORDER_ALPHA;
@@ -1292,44 +1292,44 @@ void ProjectExportDialog::_image_filter_changed(String) {
void ProjectExportDialog::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_rescan"),&ProjectExportDialog::_rescan);
- ObjectTypeDB::bind_method(_MD("_tree_changed"),&ProjectExportDialog::_tree_changed);
- ObjectTypeDB::bind_method(_MD("_scan_finished"),&ProjectExportDialog::_scan_finished);
- ObjectTypeDB::bind_method(_MD("_platform_selected"),&ProjectExportDialog::_platform_selected);
- ObjectTypeDB::bind_method(_MD("_prop_edited"),&ProjectExportDialog::_prop_edited);
- ObjectTypeDB::bind_method(_MD("_export_mode_changed"),&ProjectExportDialog::_export_mode_changed);
- ObjectTypeDB::bind_method(_MD("_filters_edited"),&ProjectExportDialog::_filters_edited);
- ObjectTypeDB::bind_method(_MD("_filters_exclude_edited"),&ProjectExportDialog::_filters_exclude_edited);
- ObjectTypeDB::bind_method(_MD("_export_action"),&ProjectExportDialog::_export_action);
- ObjectTypeDB::bind_method(_MD("_export_action_pck"),&ProjectExportDialog::_export_action_pck);
- ObjectTypeDB::bind_method(_MD("_quality_edited"),&ProjectExportDialog::_quality_edited);
- ObjectTypeDB::bind_method(_MD("_shrink_edited"),&ProjectExportDialog::_shrink_edited);
- ObjectTypeDB::bind_method(_MD("_image_export_edited"),&ProjectExportDialog::_image_export_edited);
- ObjectTypeDB::bind_method(_MD("_format_toggled"),&ProjectExportDialog::_format_toggled);
- ObjectTypeDB::bind_method(_MD("_group_changed"),&ProjectExportDialog::_group_changed);
- ObjectTypeDB::bind_method(_MD("_group_add"),&ProjectExportDialog::_group_add);
- ObjectTypeDB::bind_method(_MD("_group_del"),&ProjectExportDialog::_group_del);
- ObjectTypeDB::bind_method(_MD("_group_selected"),&ProjectExportDialog::_group_selected);
- ObjectTypeDB::bind_method(_MD("_update_group"),&ProjectExportDialog::_update_group);
- ObjectTypeDB::bind_method(_MD("_update_group_list"),&ProjectExportDialog::_update_group_list);
- ObjectTypeDB::bind_method(_MD("_select_group"),&ProjectExportDialog::_select_group);
- ObjectTypeDB::bind_method(_MD("_update_group_tree"),&ProjectExportDialog::_update_group_tree);
- ObjectTypeDB::bind_method(_MD("_group_item_edited"),&ProjectExportDialog::_group_item_edited);
- ObjectTypeDB::bind_method(_MD("_save_export_cfg"),&ProjectExportDialog::_save_export_cfg);
- ObjectTypeDB::bind_method(_MD("_image_filter_changed"),&ProjectExportDialog::_image_filter_changed);
- ObjectTypeDB::bind_method(_MD("_group_atlas_preview"),&ProjectExportDialog::_group_atlas_preview);
- ObjectTypeDB::bind_method(_MD("_group_select_all"),&ProjectExportDialog::_group_select_all);
- ObjectTypeDB::bind_method(_MD("_group_select_none"),&ProjectExportDialog::_group_select_none);
- ObjectTypeDB::bind_method(_MD("_script_edited"),&ProjectExportDialog::_script_edited);
- ObjectTypeDB::bind_method(_MD("_update_script"),&ProjectExportDialog::_update_script);
- ObjectTypeDB::bind_method(_MD("_sample_convert_edited"),&ProjectExportDialog::_sample_convert_edited);
-
-
- ObjectTypeDB::bind_method(_MD("export_platform"),&ProjectExportDialog::export_platform);
- ObjectTypeDB::bind_method(_MD("_create_android_keystore"),&ProjectExportDialog::_create_android_keystore);
- ObjectTypeDB::bind_method(_MD("_check_keystore_path"),&ProjectExportDialog::_check_keystore_path);
- ObjectTypeDB::bind_method(_MD("_keystore_dir_selected"),&ProjectExportDialog::_keystore_dir_selected);
- ObjectTypeDB::bind_method(_MD("_keystore_created"),&ProjectExportDialog::_keystore_created);
+ ClassDB::bind_method(_MD("_rescan"),&ProjectExportDialog::_rescan);
+ ClassDB::bind_method(_MD("_tree_changed"),&ProjectExportDialog::_tree_changed);
+ ClassDB::bind_method(_MD("_scan_finished"),&ProjectExportDialog::_scan_finished);
+ ClassDB::bind_method(_MD("_platform_selected"),&ProjectExportDialog::_platform_selected);
+ ClassDB::bind_method(_MD("_prop_edited"),&ProjectExportDialog::_prop_edited);
+ ClassDB::bind_method(_MD("_export_mode_changed"),&ProjectExportDialog::_export_mode_changed);
+ ClassDB::bind_method(_MD("_filters_edited"),&ProjectExportDialog::_filters_edited);
+ ClassDB::bind_method(_MD("_filters_exclude_edited"),&ProjectExportDialog::_filters_exclude_edited);
+ ClassDB::bind_method(_MD("_export_action"),&ProjectExportDialog::_export_action);
+ ClassDB::bind_method(_MD("_export_action_pck"),&ProjectExportDialog::_export_action_pck);
+ ClassDB::bind_method(_MD("_quality_edited"),&ProjectExportDialog::_quality_edited);
+ ClassDB::bind_method(_MD("_shrink_edited"),&ProjectExportDialog::_shrink_edited);
+ ClassDB::bind_method(_MD("_image_export_edited"),&ProjectExportDialog::_image_export_edited);
+ ClassDB::bind_method(_MD("_format_toggled"),&ProjectExportDialog::_format_toggled);
+ ClassDB::bind_method(_MD("_group_changed"),&ProjectExportDialog::_group_changed);
+ ClassDB::bind_method(_MD("_group_add"),&ProjectExportDialog::_group_add);
+ ClassDB::bind_method(_MD("_group_del"),&ProjectExportDialog::_group_del);
+ ClassDB::bind_method(_MD("_group_selected"),&ProjectExportDialog::_group_selected);
+ ClassDB::bind_method(_MD("_update_group"),&ProjectExportDialog::_update_group);
+ ClassDB::bind_method(_MD("_update_group_list"),&ProjectExportDialog::_update_group_list);
+ ClassDB::bind_method(_MD("_select_group"),&ProjectExportDialog::_select_group);
+ ClassDB::bind_method(_MD("_update_group_tree"),&ProjectExportDialog::_update_group_tree);
+ ClassDB::bind_method(_MD("_group_item_edited"),&ProjectExportDialog::_group_item_edited);
+ ClassDB::bind_method(_MD("_save_export_cfg"),&ProjectExportDialog::_save_export_cfg);
+ ClassDB::bind_method(_MD("_image_filter_changed"),&ProjectExportDialog::_image_filter_changed);
+ ClassDB::bind_method(_MD("_group_atlas_preview"),&ProjectExportDialog::_group_atlas_preview);
+ ClassDB::bind_method(_MD("_group_select_all"),&ProjectExportDialog::_group_select_all);
+ ClassDB::bind_method(_MD("_group_select_none"),&ProjectExportDialog::_group_select_none);
+ ClassDB::bind_method(_MD("_script_edited"),&ProjectExportDialog::_script_edited);
+ ClassDB::bind_method(_MD("_update_script"),&ProjectExportDialog::_update_script);
+ ClassDB::bind_method(_MD("_sample_convert_edited"),&ProjectExportDialog::_sample_convert_edited);
+
+
+ ClassDB::bind_method(_MD("export_platform"),&ProjectExportDialog::export_platform);
+ ClassDB::bind_method(_MD("_create_android_keystore"),&ProjectExportDialog::_create_android_keystore);
+ ClassDB::bind_method(_MD("_check_keystore_path"),&ProjectExportDialog::_check_keystore_path);
+ ClassDB::bind_method(_MD("_keystore_dir_selected"),&ProjectExportDialog::_keystore_dir_selected);
+ ClassDB::bind_method(_MD("_keystore_created"),&ProjectExportDialog::_keystore_created);
// ADD_SIGNAL(MethodInfo("instance"));
@@ -1345,7 +1345,7 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
sections = memnew( TabContainer );
add_child(sections);
- set_child_rect(sections);
+ //set_child_rect(sections);
VBoxContainer *pvbox = memnew( VBoxContainer );
sections->add_child(pvbox);
@@ -1516,7 +1516,7 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
group_lossy_quality->set_min(0.1);
group_lossy_quality->set_max(1.0);
group_lossy_quality->set_step(0.01);
- group_lossy_quality->set_val(0.7);
+ group_lossy_quality->set_value(0.7);
group_lossy_quality->connect("value_changed",this,"_quality_edited");
HBoxContainer *gqhb = memnew( HBoxContainer );
@@ -1535,7 +1535,7 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
group_shrink = memnew(SpinBox);
group_shrink->set_min(1);
group_shrink->set_max(8);
- group_shrink->set_val(1);
+ group_shrink->set_value(1);
group_shrink->set_step(0.001);
group_options->add_margin_child(TTR("Shrink By:"),group_shrink);
group_shrink->connect("value_changed",this,"_group_changed");
@@ -1577,7 +1577,7 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
atlas_preview_dialog = memnew( AcceptDialog );
ScrollContainer *scroll = memnew( ScrollContainer );
atlas_preview_dialog->add_child(scroll);
- atlas_preview_dialog->set_child_rect(scroll);
+ //atlas_preview_dialog->set_child_rect(scroll);
atlas_preview_frame = memnew( TextureFrame );
scroll->add_child(atlas_preview_frame);
add_child(atlas_preview_dialog);
@@ -1661,7 +1661,7 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
file_export = memnew( EditorFileDialog );
add_child(file_export);
file_export->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
- file_export->set_current_dir( EditorSettings::get_singleton()->get("global/default_project_export_path") );
+ file_export->set_current_dir( EditorSettings::get_singleton()->get("filesystem/directories/default_project_export_path") );
file_export->set_title(TTR("Export Project"));
file_export->connect("file_selected", this,"_export_action");
@@ -1673,7 +1673,7 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) {
pck_export = memnew( EditorFileDialog );
pck_export->set_access(EditorFileDialog::ACCESS_FILESYSTEM);
- pck_export->set_current_dir( EditorSettings::get_singleton()->get("global/default_project_export_path") );
+ pck_export->set_current_dir( EditorSettings::get_singleton()->get("filesystem/directories/default_project_export_path") );
pck_export->set_title(TTR("Export Project PCK"));
pck_export->connect("file_selected", this,"_export_action_pck");
pck_export->add_filter("*.pck ; Data Pack");
@@ -1702,7 +1702,7 @@ void ProjectExport::popup_export() {
presets.insert("default");
List<PropertyInfo> pi;
- Globals::get_singleton()->get_property_list(&pi);
+ GlobalConfig::get_singleton()->get_property_list(&pi);
export_preset->clear();
for (List<PropertyInfo>::Element *E=pi.front();E;E=E->next()) {
@@ -1732,8 +1732,8 @@ Error ProjectExport::export_project(const String& p_preset) {
String selected=p_preset;
- DVector<String> preset_settings = Globals::get_singleton()->get("export_presets/"+selected);
- String preset_path=Globals::get_singleton()->get("export_presets_path/"+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=="") {
error->set_text("Export path empty, see export options");
@@ -1787,7 +1787,7 @@ Error ProjectExport::export_project(const String& p_preset) {
}
}
- Vector<String> names = Globals::get_singleton()->get_optimizer_presets();
+ Vector<String> names = GlobalConfig::get_singleton()->get_optimizer_presets();
//prepare base paths
@@ -1897,7 +1897,7 @@ Error ProjectExport::export_project(const String& p_preset) {
print_line("Exporting "+itos(idx)+"/"+itos(export_action.size())+": "+path);
- String base_dir = Globals::get_singleton()->localize_path(path.get_base_dir()).replace("\\","/").replace("res://","");
+ String base_dir = GlobalConfig::get_singleton()->localize_path(path.get_base_dir()).replace("\\","/").replace("res://","");
DirAccess *da=DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
String cwd = d->get_current_dir();
da->change_dir(cwd);
@@ -1947,14 +1947,14 @@ Error ProjectExport::export_project(const String& p_preset) {
delete_source=true;
//create an optimized source file
- if (!Globals::get_singleton()->has("optimizer_presets/"+preset)) {
+ if (!GlobalConfig::get_singleton()->has("optimizer_presets/"+preset)) {
memdelete(d);
ERR_EXPLAIN("Unknown optimizer preset: "+preset);
ERR_FAIL_V(ERR_INVALID_DATA);
}
- Dictionary dc = Globals::get_singleton()->get("optimizer_presets/"+preset);
+ Dictionary dc = GlobalConfig::get_singleton()->get("optimizer_presets/"+preset);
ERR_FAIL_COND_V(!dc.has("__type__"),ERR_INVALID_DATA);
String type=dc["__type__"];
@@ -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());
@@ -2099,7 +2099,7 @@ Error ProjectExport::export_project(const String& p_preset) {
String engine_cfg_path=d->get_current_dir()+"/engine.cfg";
print_line("enginecfg: "+engine_cfg_path);
- Globals::get_singleton()->save_custom(engine_cfg_path,added_settings);
+ GlobalConfig::get_singleton()->save_custom(engine_cfg_path,added_settings);
memdelete(d);
return OK;
@@ -2111,7 +2111,7 @@ ProjectExport::ProjectExport(EditorData* p_data) {
editor_data=p_data;
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
- set_child_rect(vbc);
+ //set_child_rect(vbc);
set_title(TTR("Project Export"));
label = memnew( Label );
label->set_text(TTR("Export Preset:"));
diff --git a/tools/editor/project_export.h b/tools/editor/project_export.h
index c749e04b95..2110c54b9d 100644
--- a/tools/editor/project_export.h
+++ b/tools/editor/project_export.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -49,7 +49,7 @@
class EditorNode;
class ProjectExportDialog : public ConfirmationDialog {
- OBJ_TYPE( ProjectExportDialog, ConfirmationDialog );
+ GDCLASS( ProjectExportDialog, ConfirmationDialog );
public:
enum ExportAction {
@@ -223,7 +223,7 @@ public:
class EditorData;
class ProjectExport : public ConfirmationDialog {
- OBJ_TYPE( ProjectExport, ConfirmationDialog );
+ GDCLASS( ProjectExport, ConfirmationDialog );
EditorData *editor_data;
diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp
index c678e4a6b0..74ae66d727 100644
--- a/tools/editor/project_manager.cpp
+++ b/tools/editor/project_manager.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -54,7 +54,7 @@
class NewProjectDialog : public ConfirmationDialog {
- OBJ_TYPE(NewProjectDialog,ConfirmationDialog);
+ GDCLASS(NewProjectDialog,ConfirmationDialog);
public:
@@ -335,11 +335,11 @@ protected:
static void _bind_methods() {
- ObjectTypeDB::bind_method("_browse_path",&NewProjectDialog::_browse_path);
- ObjectTypeDB::bind_method("_text_changed",&NewProjectDialog::_text_changed);
- ObjectTypeDB::bind_method("_path_text_changed",&NewProjectDialog::_path_text_changed);
- ObjectTypeDB::bind_method("_path_selected",&NewProjectDialog::_path_selected);
- ObjectTypeDB::bind_method("_file_selected",&NewProjectDialog::_file_selected);
+ ClassDB::bind_method("_browse_path",&NewProjectDialog::_browse_path);
+ ClassDB::bind_method("_text_changed",&NewProjectDialog::_text_changed);
+ ClassDB::bind_method("_path_text_changed",&NewProjectDialog::_path_text_changed);
+ ClassDB::bind_method("_path_selected",&NewProjectDialog::_path_selected);
+ ClassDB::bind_method("_file_selected",&NewProjectDialog::_file_selected);
ADD_SIGNAL( MethodInfo("project_created") );
}
@@ -404,7 +404,7 @@ public:
VBoxContainer *vb = memnew( VBoxContainer );
add_child(vb);
- set_child_rect(vb);
+ // set_child_rect(vb);
Label* l = memnew(Label);
l->set_text(TTR("Project Path:"));
@@ -451,7 +451,7 @@ public:
fdialog = memnew( FileDialog );
add_child(fdialog);
fdialog->set_access(FileDialog::ACCESS_FILESYSTEM);
- fdialog->set_current_dir( EditorSettings::get_singleton()->get("global/default_project_path") );
+ fdialog->set_current_dir( EditorSettings::get_singleton()->get("filesystem/directories/default_project_path") );
project_name->connect("text_changed", this,"_text_changed");
project_path->connect("text_changed", this,"_path_text_changed");
fdialog->connect("dir_selected", this,"_path_selected");
@@ -856,14 +856,14 @@ void ProjectManager::_load_recent_projects() {
hb->set_meta("main_scene",main_scene);
hb->set_meta("favorite",is_favorite);
hb->connect("draw",this,"_panel_draw",varray(hb));
- hb->connect("input_event",this,"_panel_input",varray(hb));
+ hb->connect("gui_input",this,"_panel_input",varray(hb));
hb->add_constant_override("separation",10*EDSCALE);
VBoxContainer *favorite_box = memnew( VBoxContainer );
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);
@@ -886,7 +886,7 @@ void ProjectManager::_load_recent_projects() {
Label *fpath = memnew( Label(path) );
fpath->set_name("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);
@@ -1154,7 +1154,7 @@ void ProjectManager::_files_dropped(StringArray p_files, int p_screen) {
dir->list_dir_begin();
String file = dir->get_next();
while(confirm && file!=String()) {
- if (!da->current_is_dir() && file.ends_with("engine.cfg")) {
+ if (!dir->current_is_dir() && file.ends_with("engine.cfg")) {
confirm = false;
}
file = dir->get_next();
@@ -1183,27 +1183,27 @@ void ProjectManager::_scan_multiple_folders(StringArray p_files)
void ProjectManager::_bind_methods() {
- ObjectTypeDB::bind_method("_open_project",&ProjectManager::_open_project);
- ObjectTypeDB::bind_method("_open_project_confirm",&ProjectManager::_open_project_confirm);
- ObjectTypeDB::bind_method("_run_project",&ProjectManager::_run_project);
- ObjectTypeDB::bind_method("_run_project_confirm",&ProjectManager::_run_project_confirm);
- ObjectTypeDB::bind_method("_scan_projects",&ProjectManager::_scan_projects);
- ObjectTypeDB::bind_method("_scan_begin",&ProjectManager::_scan_begin);
- ObjectTypeDB::bind_method("_import_project",&ProjectManager::_import_project);
- ObjectTypeDB::bind_method("_new_project",&ProjectManager::_new_project);
- ObjectTypeDB::bind_method("_erase_project",&ProjectManager::_erase_project);
- ObjectTypeDB::bind_method("_erase_project_confirm",&ProjectManager::_erase_project_confirm);
- ObjectTypeDB::bind_method("_exit_dialog",&ProjectManager::_exit_dialog);
- ObjectTypeDB::bind_method("_load_recent_projects",&ProjectManager::_load_recent_projects);
- ObjectTypeDB::bind_method("_on_project_created",&ProjectManager::_on_project_created);
- ObjectTypeDB::bind_method("_update_scroll_pos",&ProjectManager::_update_scroll_pos);
- ObjectTypeDB::bind_method("_panel_draw",&ProjectManager::_panel_draw);
- ObjectTypeDB::bind_method("_panel_input",&ProjectManager::_panel_input);
- ObjectTypeDB::bind_method("_unhandled_input",&ProjectManager::_unhandled_input);
- ObjectTypeDB::bind_method("_favorite_pressed",&ProjectManager::_favorite_pressed);
- ObjectTypeDB::bind_method("_install_project",&ProjectManager::_install_project);
- ObjectTypeDB::bind_method("_files_dropped",&ProjectManager::_files_dropped);
- ObjectTypeDB::bind_method(_MD("_scan_multiple_folders", "files"),&ProjectManager::_scan_multiple_folders);
+ ClassDB::bind_method("_open_project",&ProjectManager::_open_project);
+ ClassDB::bind_method("_open_project_confirm",&ProjectManager::_open_project_confirm);
+ ClassDB::bind_method("_run_project",&ProjectManager::_run_project);
+ ClassDB::bind_method("_run_project_confirm",&ProjectManager::_run_project_confirm);
+ ClassDB::bind_method("_scan_projects",&ProjectManager::_scan_projects);
+ ClassDB::bind_method("_scan_begin",&ProjectManager::_scan_begin);
+ ClassDB::bind_method("_import_project",&ProjectManager::_import_project);
+ ClassDB::bind_method("_new_project",&ProjectManager::_new_project);
+ ClassDB::bind_method("_erase_project",&ProjectManager::_erase_project);
+ ClassDB::bind_method("_erase_project_confirm",&ProjectManager::_erase_project_confirm);
+ ClassDB::bind_method("_exit_dialog",&ProjectManager::_exit_dialog);
+ ClassDB::bind_method("_load_recent_projects",&ProjectManager::_load_recent_projects);
+ ClassDB::bind_method("_on_project_created",&ProjectManager::_on_project_created);
+ ClassDB::bind_method("_update_scroll_pos",&ProjectManager::_update_scroll_pos);
+ ClassDB::bind_method("_panel_draw",&ProjectManager::_panel_draw);
+ ClassDB::bind_method("_panel_input",&ProjectManager::_panel_input);
+ ClassDB::bind_method("_unhandled_input",&ProjectManager::_unhandled_input);
+ ClassDB::bind_method("_favorite_pressed",&ProjectManager::_favorite_pressed);
+ ClassDB::bind_method("_install_project",&ProjectManager::_install_project);
+ ClassDB::bind_method("_files_dropped",&ProjectManager::_files_dropped);
+ ClassDB::bind_method(_MD("_scan_multiple_folders", "files"),&ProjectManager::_scan_multiple_folders);
}
@@ -1218,7 +1218,7 @@ ProjectManager::ProjectManager() {
EditorSettings::get_singleton()->set_optimize_save(false); //just write settings as they came
{
- int dpi_mode = EditorSettings::get_singleton()->get("global/hidpi_mode");
+ int dpi_mode = EditorSettings::get_singleton()->get("interface/hidpi_mode");
if (dpi_mode==0) {
editor_set_scale( OS::get_singleton()->get_screen_dpi(0) > 150 && OS::get_singleton()->get_screen_size(OS::get_singleton()->get_current_screen()).x>2000 ? 2.0 : 1.0 );
} else if (dpi_mode==1) {
@@ -1232,7 +1232,7 @@ ProjectManager::ProjectManager() {
}
}
- FileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("file_dialog/show_hidden_files"));
+ FileDialog::set_default_show_hidden_files(EditorSettings::get_singleton()->get("filesytem/file_dialog/show_hidden_files"));
set_area_as_parent_rect();
set_theme(create_editor_theme());
@@ -1256,7 +1256,7 @@ ProjectManager::ProjectManager() {
String cp;
cp.push_back(0xA9);
cp.push_back(0);
- OS::get_singleton()->set_window_title(_MKSTR(VERSION_NAME)+String(" - ")+TTR("Project Manager")+" - "+cp+" 2008-2016 Juan Linietsky, Ariel Manzur.");
+ OS::get_singleton()->set_window_title(_MKSTR(VERSION_NAME)+String(" - ")+TTR("Project Manager")+" - "+cp+" 2008-2017 Juan Linietsky, Ariel Manzur.");
HBoxContainer *top_hb = memnew( HBoxContainer);
vb->add_child(top_hb);
@@ -1341,7 +1341,7 @@ ProjectManager::ProjectManager() {
scan_dir->set_access(FileDialog::ACCESS_FILESYSTEM);
scan_dir->set_mode(FileDialog::MODE_OPEN_DIR);
scan_dir->set_title(TTR("Select a Folder to Scan")); // must be after mode or it's overridden
- scan_dir->set_current_dir( EditorSettings::get_singleton()->get("global/default_project_path") );
+ scan_dir->set_current_dir( EditorSettings::get_singleton()->get("filesystem/directories/default_project_path") );
gui_base->add_child(scan_dir);
scan_dir->connect("dir_selected",this,"_scan_begin");
@@ -1418,8 +1418,8 @@ ProjectManager::ProjectManager() {
npdialog->connect("project_created", this,"_on_project_created");
_load_recent_projects();
- if ( EditorSettings::get_singleton()->get("global/autoscan_project_path") ) {
- _scan_begin( EditorSettings::get_singleton()->get("global/autoscan_project_path") );
+ if ( EditorSettings::get_singleton()->get("filesystem/directories/autoscan_project_path") ) {
+ _scan_begin( EditorSettings::get_singleton()->get("filesystem/directories/autoscan_project_path") );
}
//get_ok()->set_text("Open");
@@ -1486,9 +1486,9 @@ void ProjectListFilter::_notification(int p_what) {
void ProjectListFilter::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_command"),&ProjectListFilter::_command);
- ObjectTypeDB::bind_method(_MD("_search_text_changed"), &ProjectListFilter::_search_text_changed);
- ObjectTypeDB::bind_method(_MD("_filter_option_selected"), &ProjectListFilter::_filter_option_selected);
+ ClassDB::bind_method(_MD("_command"),&ProjectListFilter::_command);
+ ClassDB::bind_method(_MD("_search_text_changed"), &ProjectListFilter::_search_text_changed);
+ ClassDB::bind_method(_MD("_filter_option_selected"), &ProjectListFilter::_filter_option_selected);
ADD_SIGNAL( MethodInfo("filter_changed") );
}
diff --git a/tools/editor/project_manager.h b/tools/editor/project_manager.h
index af2d47aeb3..2240e252fc 100644
--- a/tools/editor/project_manager.h
+++ b/tools/editor/project_manager.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -40,7 +40,7 @@ class NewProjectDialog;
class ProjectListFilter;
class ProjectManager : public Control {
- OBJ_TYPE( ProjectManager, Control );
+ GDCLASS( ProjectManager, Control );
Button *erase_btn;
Button *open_btn;
@@ -109,7 +109,7 @@ public:
class ProjectListFilter : public HBoxContainer {
- OBJ_TYPE( ProjectListFilter, HBoxContainer );
+ GDCLASS( ProjectListFilter, HBoxContainer );
private:
diff --git a/tools/editor/project_settings.cpp b/tools/editor/project_settings.cpp
index 02d95abfa2..6e9ea5e873 100644
--- a/tools/editor/project_settings.cpp
+++ b/tools/editor/project_settings.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -74,7 +74,7 @@ void ProjectSettings::_notification(int p_what) {
if (p_what==NOTIFICATION_ENTER_TREE) {
- globals_editor->edit(Globals::get_singleton());
+ globals_editor->edit(GlobalConfig::get_singleton());
search_button->set_icon(get_icon("Zoom","EditorIcons"));
clear_button->set_icon(get_icon("Close","EditorIcons"));
@@ -82,8 +82,8 @@ void ProjectSettings::_notification(int p_what) {
translation_list->connect("button_pressed",this,"_translation_delete");
_update_actions();
popup_add->add_icon_item(get_icon("Keyboard","EditorIcons"),TTR("Key "),InputEvent::KEY);//"Key " - because the word 'key' has already been used as a key animation
- popup_add->add_icon_item(get_icon("JoyButton","EditorIcons"),TTR("Joy Button"),InputEvent::JOYSTICK_BUTTON);
- popup_add->add_icon_item(get_icon("JoyAxis","EditorIcons"),TTR("Joy Axis"),InputEvent::JOYSTICK_MOTION);
+ popup_add->add_icon_item(get_icon("JoyButton","EditorIcons"),TTR("Joy Button"),InputEvent::JOYPAD_BUTTON);
+ popup_add->add_icon_item(get_icon("JoyAxis","EditorIcons"),TTR("Joy Axis"),InputEvent::JOYPAD_MOTION);
popup_add->add_icon_item(get_icon("Mouse","EditorIcons"),TTR("Mouse Button"),InputEvent::MOUSE_BUTTON);
List<String> tfn;
@@ -136,7 +136,7 @@ void ProjectSettings::_action_edited() {
String action_prop="input/"+new_name;
- if (Globals::get_singleton()->has(action_prop)) {
+ if (GlobalConfig::get_singleton()->has(action_prop)) {
ti->set_text(0,old_name);
add_at="input/"+old_name;
@@ -146,20 +146,17 @@ void ProjectSettings::_action_edited() {
return;
}
- int order = Globals::get_singleton()->get_order(add_at);
- Array va = Globals::get_singleton()->get(add_at);
- bool persisting = Globals::get_singleton()->is_persisting(add_at);
+ int order = GlobalConfig::get_singleton()->get_order(add_at);
+ Array va = GlobalConfig::get_singleton()->get(add_at);
setting=true;
undo_redo->create_action(TTR("Rename Input Action Event"));
- undo_redo->add_do_method(Globals::get_singleton(),"clear",add_at);
- undo_redo->add_do_method(Globals::get_singleton(),"set",action_prop,va);
- undo_redo->add_do_method(Globals::get_singleton(),"set_persisting",action_prop,persisting);
- undo_redo->add_do_method(Globals::get_singleton(),"set_order",action_prop,order);
- undo_redo->add_undo_method(Globals::get_singleton(),"clear",action_prop);
- undo_redo->add_undo_method(Globals::get_singleton(),"set",add_at,va);
- undo_redo->add_undo_method(Globals::get_singleton(),"set_persisting",add_at,persisting);
- undo_redo->add_undo_method(Globals::get_singleton(),"set_order",add_at,order);
+ undo_redo->add_do_method(GlobalConfig::get_singleton(),"clear",add_at);
+ undo_redo->add_do_method(GlobalConfig::get_singleton(),"set",action_prop,va);
+ undo_redo->add_do_method(GlobalConfig::get_singleton(),"set_order",action_prop,order);
+ undo_redo->add_undo_method(GlobalConfig::get_singleton(),"clear",action_prop);
+ undo_redo->add_undo_method(GlobalConfig::get_singleton(),"set",add_at,va);
+ undo_redo->add_undo_method(GlobalConfig::get_singleton(),"set_order",add_at,order);
undo_redo->add_do_method(this,"_update_actions");
undo_redo->add_undo_method(this,"_update_actions");
undo_redo->add_do_method(this,"_settings_changed");
@@ -179,9 +176,9 @@ void ProjectSettings::_device_input_add() {
InputEvent ie;
String name=add_at;
- Variant old_val = Globals::get_singleton()->get(name);
+ Variant old_val = GlobalConfig::get_singleton()->get(name);
Array arr=old_val;
- ie.device=device_id->get_val();
+ ie.device=device_id->get_value();
ie.type=add_type;
@@ -201,7 +198,7 @@ void ProjectSettings::_device_input_add() {
}
} break;
- case InputEvent::JOYSTICK_MOTION: {
+ case InputEvent::JOYPAD_MOTION: {
ie.joy_motion.axis = device_index->get_selected()>>1;
ie.joy_motion.axis_value = device_index->get_selected()&1?1:-1;
@@ -210,20 +207,20 @@ void ProjectSettings::_device_input_add() {
for(int i=0;i<arr.size();i++) {
InputEvent aie=arr[i];
- if (aie.device == ie.device && aie.type==InputEvent::JOYSTICK_MOTION && aie.joy_motion.axis==ie.joy_motion.axis && aie.joy_motion.axis_value==ie.joy_motion.axis_value) {
+ if (aie.device == ie.device && aie.type==InputEvent::JOYPAD_MOTION && aie.joy_motion.axis==ie.joy_motion.axis && aie.joy_motion.axis_value==ie.joy_motion.axis_value) {
return;
}
}
} break;
- case InputEvent::JOYSTICK_BUTTON: {
+ case InputEvent::JOYPAD_BUTTON: {
ie.joy_button.button_index=device_index->get_selected();
for(int i=0;i<arr.size();i++) {
InputEvent aie=arr[i];
- if (aie.device == ie.device && aie.type==InputEvent::JOYSTICK_BUTTON && aie.joy_button.button_index==ie.joy_button.button_index) {
+ if (aie.device == ie.device && aie.type==InputEvent::JOYPAD_BUTTON && aie.joy_button.button_index==ie.joy_button.button_index) {
return;
}
}
@@ -236,9 +233,8 @@ void ProjectSettings::_device_input_add() {
arr.push_back(ie);
undo_redo->create_action(TTR("Add Input Action Event"));
- undo_redo->add_do_method(Globals::get_singleton(),"set",name,arr);
- undo_redo->add_do_method(Globals::get_singleton(),"set_persisting",name,true);
- undo_redo->add_undo_method(Globals::get_singleton(),"set",name,old_val);
+ undo_redo->add_do_method(GlobalConfig::get_singleton(),"set",name,arr);
+ undo_redo->add_undo_method(GlobalConfig::get_singleton(),"set",name,old_val);
undo_redo->add_do_method(this,"_update_actions");
undo_redo->add_undo_method(this,"_update_actions");
undo_redo->add_do_method(this,"_settings_changed");
@@ -260,7 +256,7 @@ void ProjectSettings::_press_a_key_confirm() {
ie.key.mod=last_wait_for_key.key.mod;
String name=add_at;
- Variant old_val = Globals::get_singleton()->get(name);
+ Variant old_val = GlobalConfig::get_singleton()->get(name);
Array arr=old_val;
for(int i=0;i<arr.size();i++) {
@@ -274,9 +270,8 @@ void ProjectSettings::_press_a_key_confirm() {
arr.push_back(ie);
undo_redo->create_action(TTR("Add Input Action Event"));
- undo_redo->add_do_method(Globals::get_singleton(),"set",name,arr);
- undo_redo->add_do_method(Globals::get_singleton(),"set_persisting",name,true);
- undo_redo->add_undo_method(Globals::get_singleton(),"set",name,old_val);
+ undo_redo->add_do_method(GlobalConfig::get_singleton(),"set",name,arr);
+ undo_redo->add_undo_method(GlobalConfig::get_singleton(),"set",name,old_val);
undo_redo->add_do_method(this,"_update_actions");
undo_redo->add_undo_method(this,"_update_actions");
undo_redo->add_do_method(this,"_settings_changed");
@@ -352,7 +347,7 @@ void ProjectSettings::_add_item(int p_item){
} break;
case InputEvent::MOUSE_BUTTON: {
- device_id->set_val(0);
+ device_id->set_value(0);
device_index_label->set_text(TTR("Mouse Button Index:"));
device_index->clear();
device_index->add_item(TTR("Left Button"));
@@ -366,10 +361,10 @@ void ProjectSettings::_add_item(int p_item){
device_index->add_item(TTR("Button 9"));
device_input->popup_centered_minsize(Size2(350,95));
} break;
- case InputEvent::JOYSTICK_MOTION: {
+ case InputEvent::JOYPAD_MOTION: {
- device_id->set_val(0);
- device_index_label->set_text(TTR("Joystick Axis Index:"));
+ device_id->set_value(0);
+ device_index_label->set_text(TTR("Joypad Axis Index:"));
device_index->clear();
for(int i=0;i<JOY_AXIS_MAX*2;i++) {
@@ -379,10 +374,10 @@ void ProjectSettings::_add_item(int p_item){
device_input->popup_centered_minsize(Size2(350,95));
} break;
- case InputEvent::JOYSTICK_BUTTON: {
+ case InputEvent::JOYPAD_BUTTON: {
- device_id->set_val(3);
- device_index_label->set_text(TTR("Joystick Button Index:"));
+ device_id->set_value(3);
+ device_index_label->set_text(TTR("Joypad Button Index:"));
device_index->clear();
for(int i=0;i<JOY_BUTTON_MAX;i++) {
@@ -423,14 +418,13 @@ void ProjectSettings::_action_button_pressed(Object* p_obj, int p_column,int p_i
//remove main thing
String name="input/"+ti->get_text(0);
- Variant old_val = Globals::get_singleton()->get(name);
- int order=Globals::get_singleton()->get_order(name);
+ Variant old_val = GlobalConfig::get_singleton()->get(name);
+ int order=GlobalConfig::get_singleton()->get_order(name);
undo_redo->create_action(TTR("Add Input Action"));
- undo_redo->add_do_method(Globals::get_singleton(),"clear",name);
- undo_redo->add_undo_method(Globals::get_singleton(),"set",name,old_val);
- undo_redo->add_undo_method(Globals::get_singleton(),"set_order",name,order);
- undo_redo->add_undo_method(Globals::get_singleton(),"set_persisting",name,Globals::get_singleton()->is_persisting(name));
+ undo_redo->add_do_method(GlobalConfig::get_singleton(),"clear",name);
+ undo_redo->add_undo_method(GlobalConfig::get_singleton(),"set",name,old_val);
+ undo_redo->add_undo_method(GlobalConfig::get_singleton(),"set_order",name,order);
undo_redo->add_do_method(this,"_update_actions");
undo_redo->add_undo_method(this,"_update_actions");
undo_redo->add_do_method(this,"_settings_changed");
@@ -440,7 +434,7 @@ void ProjectSettings::_action_button_pressed(Object* p_obj, int p_column,int p_i
} else {
//remove action
String name="input/"+ti->get_parent()->get_text(0);
- Variant old_val = Globals::get_singleton()->get(name);
+ Variant old_val = GlobalConfig::get_singleton()->get(name);
int idx = ti->get_metadata(0);
Array va = old_val;
@@ -456,8 +450,8 @@ void ProjectSettings::_action_button_pressed(Object* p_obj, int p_column,int p_i
undo_redo->create_action(TTR("Erase Input Action Event"));
- undo_redo->add_do_method(Globals::get_singleton(),"set",name,va);
- undo_redo->add_undo_method(Globals::get_singleton(),"set",name,old_val);
+ undo_redo->add_do_method(GlobalConfig::get_singleton(),"set",name,va);
+ undo_redo->add_undo_method(GlobalConfig::get_singleton(),"set",name,old_val);
undo_redo->add_do_method(this,"_update_actions");
undo_redo->add_undo_method(this,"_update_actions");
undo_redo->add_do_method(this,"_settings_changed");
@@ -480,7 +474,7 @@ void ProjectSettings::_update_actions() {
input_editor->set_hide_root(true);
List<PropertyInfo> props;
- Globals::get_singleton()->get_property_list(&props);
+ GlobalConfig::get_singleton()->get_property_list(&props);
for(List<PropertyInfo>::Element *E=props.front();E;E=E->next()) {
@@ -496,7 +490,7 @@ void ProjectSettings::_update_actions() {
//item->set_cell_mode(0,TreeItem::CELL_MODE_CHECK);
item->set_text(0,name);
item->add_button(0,get_icon("Add","EditorIcons"),1);
- if (!Globals::get_singleton()->get_input_presets().find(pi.name)) {
+ if (!GlobalConfig::get_singleton()->get_input_presets().find(pi.name)) {
item->add_button(0,get_icon("Remove","EditorIcons"),2);
item->set_editable(0,true);
}
@@ -504,7 +498,7 @@ void ProjectSettings::_update_actions() {
//item->set_checked(0,pi.usage&PROPERTY_USAGE_CHECKED);
- Array actions=Globals::get_singleton()->get(pi.name);
+ Array actions=GlobalConfig::get_singleton()->get(pi.name);
for(int i=0;i<actions.size();i++) {
@@ -532,7 +526,7 @@ void ProjectSettings::_update_actions() {
action->set_icon(0,get_icon("Keyboard","EditorIcons"));
} break;
- case InputEvent::JOYSTICK_BUTTON: {
+ case InputEvent::JOYPAD_BUTTON: {
String str = TTR("Device")+" "+itos(ie.device)+", "+TTR("Button")+" "+itos(ie.joy_button.button_index);
if (ie.joy_button.button_index>=0 && ie.joy_button.button_index<JOY_BUTTON_MAX)
@@ -558,7 +552,7 @@ void ProjectSettings::_update_actions() {
action->set_text(0,str);
action->set_icon(0,get_icon("Mouse","EditorIcons"));
} break;
- case InputEvent::JOYSTICK_MOTION: {
+ case InputEvent::JOYPAD_MOTION: {
int ax = ie.joy_motion.axis;
int n = 2*ax + (ie.joy_motion.axis_value<0 ? 0:1);
@@ -636,13 +630,12 @@ void ProjectSettings::_item_add() {
undo_redo->create_action("Add Global Property");
- undo_redo->add_do_property(Globals::get_singleton(), name, value);
- undo_redo->add_do_method(Globals::get_singleton(), "set_persisting", name, true);
+ undo_redo->add_do_property(GlobalConfig::get_singleton(), name, value);
- if (Globals::get_singleton()->has(name)) {
- undo_redo->add_undo_property(Globals::get_singleton(), name, Globals::get_singleton()->get(name));
+ if (GlobalConfig::get_singleton()->has(name)) {
+ undo_redo->add_undo_property(GlobalConfig::get_singleton(), name, GlobalConfig::get_singleton()->get(name));
} else {
- undo_redo->add_undo_property(Globals::get_singleton(), name, Variant());
+ undo_redo->add_undo_property(GlobalConfig::get_singleton(), name, Variant());
}
undo_redo->add_do_method(globals_editor, "update_category_list");
@@ -669,10 +662,9 @@ void ProjectSettings::_item_del() {
undo_redo->create_action("Delete Global Property");
- undo_redo->add_do_property(Globals::get_singleton(), name, Variant());
+ undo_redo->add_do_property(GlobalConfig::get_singleton(), name, Variant());
- undo_redo->add_undo_property(Globals::get_singleton(), name, Globals::get_singleton()->get(name));
- undo_redo->add_undo_method(Globals::get_singleton(), "set_persisting", name, Globals::get_singleton()->is_persisting(name));
+ undo_redo->add_undo_property(GlobalConfig::get_singleton(), name, GlobalConfig::get_singleton()->get(name));
undo_redo->add_do_method(globals_editor, "update_category_list");
undo_redo->add_undo_method(globals_editor, "update_category_list");
@@ -699,7 +691,7 @@ void ProjectSettings::_action_add() {
return;
}
- if (Globals::get_singleton()->has("input/"+action)) {
+ if (GlobalConfig::get_singleton()->has("input/"+action)) {
message->set_text(vformat(TTR("Action '%s' already exists!"),action));
message->popup_centered(Size2(300,100));
return;
@@ -708,9 +700,8 @@ void ProjectSettings::_action_add() {
Array va;
String name = "input/"+action;
undo_redo->create_action(TTR("Add Input Action Event"));
- undo_redo->add_do_method(Globals::get_singleton(),"set",name,va);
- undo_redo->add_do_method(Globals::get_singleton(),"set_persisting",name,true);
- undo_redo->add_undo_method(Globals::get_singleton(),"clear",name);
+ undo_redo->add_do_method(GlobalConfig::get_singleton(),"set",name,va);
+ undo_redo->add_undo_method(GlobalConfig::get_singleton(),"clear",name);
undo_redo->add_do_method(this,"_update_actions");
undo_redo->add_undo_method(this,"_update_actions");
undo_redo->add_do_method(this,"_settings_changed");
@@ -737,23 +728,14 @@ void ProjectSettings::_action_add() {
void ProjectSettings::_item_checked(const String& p_item, bool p_check) {
- undo_redo->create_action(TTR("Toggle Persisting"));
- String full_item = globals_editor->get_full_item_path(p_item);
- undo_redo->add_do_method(Globals::get_singleton(),"set_persisting",full_item,p_check);
- undo_redo->add_undo_method(Globals::get_singleton(),"set_persisting",full_item,!p_check);
- undo_redo->add_do_method(this,"_settings_changed");
- undo_redo->add_undo_method(this,"_settings_changed");
- undo_redo->add_do_method(globals_editor->get_property_editor(),"update_tree");
- undo_redo->add_undo_method(globals_editor->get_property_editor(),"update_tree");
- undo_redo->commit_action();
}
void ProjectSettings::_save() {
- Error err = Globals::get_singleton()->save();
+ Error err = GlobalConfig::get_singleton()->save();
message->set_text(err!=OK?TTR("Error saving settings."):TTR("Settings saved OK."));
message->popup_centered(Size2(300,100));
}
@@ -764,21 +746,6 @@ void ProjectSettings::_settings_prop_edited(const String& p_name) {
String full_item = globals_editor->get_full_item_path(p_name);
- if (!Globals::get_singleton()->is_persisting(full_item)) {
- Globals::get_singleton()->set_persisting(full_item,true);
-
- {
- //small usability workaround, if anything related to resolution scaling or size is modified, change all of them together
- if (full_item=="display/width" || full_item=="display/height" || full_item=="display/stretch_mode") {
- Globals::get_singleton()->set_persisting("display/height",true);
- Globals::get_singleton()->set_persisting("display/width",true);
- }
- }
-
-
-// globals_editor->update_property(p_name);
- globals_editor->get_property_editor()->update_tree();
- }
_settings_changed();
}
@@ -810,12 +777,12 @@ void ProjectSettings::_copy_to_platform(int p_which) {
}
String name = catname+"/"+propname;
- Variant value=Globals::get_singleton()->get(name);
+ Variant value=GlobalConfig::get_singleton()->get(name);
catname+="."+popup_platform->get_popup()->get_item_text(p_which);;
name = catname+"/"+propname;
- Globals::get_singleton()->set(name,value);
+ GlobalConfig::get_singleton()->set(name,value);
globals_editor->get_property_editor()->update_tree();
}
@@ -828,7 +795,7 @@ void ProjectSettings::add_translation(const String& p_translation) {
void ProjectSettings::_translation_add(const String& p_path) {
- StringArray translations = Globals::get_singleton()->get("locale/translations");
+ StringArray translations = GlobalConfig::get_singleton()->get("locale/translations");
for(int i=0;i<translations.size();i++) {
@@ -839,9 +806,8 @@ void ProjectSettings::_translation_add(const String& p_path) {
translations.push_back(p_path);
undo_redo->create_action(TTR("Add Translation"));
- undo_redo->add_do_property(Globals::get_singleton(),"locale/translations",translations);
- undo_redo->add_undo_property(Globals::get_singleton(),"locale/translations",Globals::get_singleton()->get("locale/translations"));
- undo_redo->add_do_method(Globals::get_singleton(),"set_persisting","locale/translations",true);
+ undo_redo->add_do_property(GlobalConfig::get_singleton(),"locale/translations",translations);
+ undo_redo->add_undo_property(GlobalConfig::get_singleton(),"locale/translations",GlobalConfig::get_singleton()->get("locale/translations"));
undo_redo->add_do_method(this,"_update_translations");
undo_redo->add_undo_method(this,"_update_translations");
undo_redo->add_do_method(this,"_settings_changed");
@@ -862,15 +828,15 @@ void ProjectSettings::_translation_delete(Object *p_item,int p_column, int p_but
int idx=ti->get_metadata(0);
- StringArray translations = Globals::get_singleton()->get("locale/translations");
+ StringArray translations = GlobalConfig::get_singleton()->get("locale/translations");
ERR_FAIL_INDEX(idx,translations.size());
translations.remove(idx);
undo_redo->create_action(TTR("Remove Translation"));
- undo_redo->add_do_property(Globals::get_singleton(),"locale/translations",translations);
- undo_redo->add_undo_property(Globals::get_singleton(),"locale/translations",Globals::get_singleton()->get("locale/translations"));
+ undo_redo->add_do_property(GlobalConfig::get_singleton(),"locale/translations",translations);
+ undo_redo->add_undo_property(GlobalConfig::get_singleton(),"locale/translations",GlobalConfig::get_singleton()->get("locale/translations"));
undo_redo->add_do_method(this,"_update_translations");
undo_redo->add_undo_method(this,"_update_translations");
undo_redo->add_do_method(this,"_settings_changed");
@@ -891,8 +857,8 @@ void ProjectSettings::_translation_res_add(const String& p_path){
Variant prev;
Dictionary remaps;
- if (Globals::get_singleton()->has("locale/translation_remaps")) {
- remaps = Globals::get_singleton()->get("locale/translation_remaps");
+ if (GlobalConfig::get_singleton()->has("locale/translation_remaps")) {
+ remaps = GlobalConfig::get_singleton()->get("locale/translation_remaps");
prev=remaps;
}
@@ -902,9 +868,8 @@ void ProjectSettings::_translation_res_add(const String& p_path){
remaps[p_path]=StringArray();
undo_redo->create_action(TTR("Add Remapped Path"));
- undo_redo->add_do_property(Globals::get_singleton(),"locale/translation_remaps",remaps);
- undo_redo->add_do_method(Globals::get_singleton(),"set_persisting","locale/translation_remaps",true);
- undo_redo->add_undo_property(Globals::get_singleton(),"locale/translation_remaps",prev);
+ undo_redo->add_do_property(GlobalConfig::get_singleton(),"locale/translation_remaps",remaps);
+ undo_redo->add_undo_property(GlobalConfig::get_singleton(),"locale/translation_remaps",prev);
undo_redo->add_do_method(this,"_update_translations");
undo_redo->add_undo_method(this,"_update_translations");
undo_redo->add_do_method(this,"_settings_changed");
@@ -920,9 +885,9 @@ void ProjectSettings::_translation_res_option_file_open(){
}
void ProjectSettings::_translation_res_option_add(const String& p_path) {
- ERR_FAIL_COND(!Globals::get_singleton()->has("locale/translation_remaps"));
+ ERR_FAIL_COND(!GlobalConfig::get_singleton()->has("locale/translation_remaps"));
- Dictionary remaps = Globals::get_singleton()->get("locale/translation_remaps");
+ Dictionary remaps = GlobalConfig::get_singleton()->get("locale/translation_remaps");
TreeItem *k = translation_remap->get_selected();
ERR_FAIL_COND(!k);
@@ -936,9 +901,8 @@ void ProjectSettings::_translation_res_option_add(const String& p_path) {
undo_redo->create_action(TTR("Resource Remap Add Remap"));
- undo_redo->add_do_property(Globals::get_singleton(),"locale/translation_remaps",remaps);
- undo_redo->add_do_method(Globals::get_singleton(),"set_persisting","locale/translation_remaps",true);
- undo_redo->add_undo_property(Globals::get_singleton(),"locale/translation_remaps",Globals::get_singleton()->get("locale/translation_remaps"));
+ undo_redo->add_do_property(GlobalConfig::get_singleton(),"locale/translation_remaps",remaps);
+ undo_redo->add_undo_property(GlobalConfig::get_singleton(),"locale/translation_remaps",GlobalConfig::get_singleton()->get("locale/translation_remaps"));
undo_redo->add_do_method(this,"_update_translations");
undo_redo->add_undo_method(this,"_update_translations");
undo_redo->add_do_method(this,"_settings_changed");
@@ -963,10 +927,10 @@ void ProjectSettings::_translation_res_option_changed() {
if (updating_translations)
return;
- if (!Globals::get_singleton()->has("locale/translation_remaps"))
+ if (!GlobalConfig::get_singleton()->has("locale/translation_remaps"))
return;
- Dictionary remaps = Globals::get_singleton()->get("locale/translation_remaps");
+ Dictionary remaps = GlobalConfig::get_singleton()->get("locale/translation_remaps");
TreeItem *k = translation_remap->get_selected();
ERR_FAIL_COND(!k);
@@ -991,9 +955,8 @@ void ProjectSettings::_translation_res_option_changed() {
updating_translations=true;
undo_redo->create_action(TTR("Change Resource Remap Language"));
- undo_redo->add_do_property(Globals::get_singleton(),"locale/translation_remaps",remaps);
- undo_redo->add_do_method(Globals::get_singleton(),"set_persisting","locale/translation_remaps",true);
- undo_redo->add_undo_property(Globals::get_singleton(),"locale/translation_remaps",Globals::get_singleton()->get("locale/translation_remaps"));
+ undo_redo->add_do_property(GlobalConfig::get_singleton(),"locale/translation_remaps",remaps);
+ undo_redo->add_undo_property(GlobalConfig::get_singleton(),"locale/translation_remaps",GlobalConfig::get_singleton()->get("locale/translation_remaps"));
undo_redo->add_do_method(this,"_update_translations");
undo_redo->add_undo_method(this,"_update_translations");
undo_redo->add_do_method(this,"_settings_changed");
@@ -1010,10 +973,10 @@ void ProjectSettings::_translation_res_delete(Object *p_item,int p_column, int p
if (updating_translations)
return;
- if (!Globals::get_singleton()->has("locale/translation_remaps"))
+ if (!GlobalConfig::get_singleton()->has("locale/translation_remaps"))
return;
- Dictionary remaps = Globals::get_singleton()->get("locale/translation_remaps");
+ Dictionary remaps = GlobalConfig::get_singleton()->get("locale/translation_remaps");
TreeItem *k = p_item->cast_to<TreeItem>();
@@ -1023,9 +986,8 @@ void ProjectSettings::_translation_res_delete(Object *p_item,int p_column, int p
remaps.erase(key);
undo_redo->create_action(TTR("Remove Resource Remap"));
- undo_redo->add_do_property(Globals::get_singleton(),"locale/translation_remaps",remaps);
- undo_redo->add_do_method(Globals::get_singleton(),"set_persisting","locale/translation_remaps",true);
- undo_redo->add_undo_property(Globals::get_singleton(),"locale/translation_remaps",Globals::get_singleton()->get("locale/translation_remaps"));
+ undo_redo->add_do_property(GlobalConfig::get_singleton(),"locale/translation_remaps",remaps);
+ undo_redo->add_undo_property(GlobalConfig::get_singleton(),"locale/translation_remaps",GlobalConfig::get_singleton()->get("locale/translation_remaps"));
undo_redo->add_do_method(this,"_update_translations");
undo_redo->add_undo_method(this,"_update_translations");
undo_redo->add_do_method(this,"_settings_changed");
@@ -1038,10 +1000,10 @@ void ProjectSettings::_translation_res_option_delete(Object *p_item,int p_column
if (updating_translations)
return;
- if (!Globals::get_singleton()->has("locale/translation_remaps"))
+ if (!GlobalConfig::get_singleton()->has("locale/translation_remaps"))
return;
- Dictionary remaps = Globals::get_singleton()->get("locale/translation_remaps");
+ Dictionary remaps = GlobalConfig::get_singleton()->get("locale/translation_remaps");
TreeItem *k = translation_remap->get_selected();
ERR_FAIL_COND(!k);
@@ -1059,9 +1021,8 @@ void ProjectSettings::_translation_res_option_delete(Object *p_item,int p_column
undo_redo->create_action(TTR("Remove Resource Remap Option"));
- undo_redo->add_do_property(Globals::get_singleton(),"locale/translation_remaps",remaps);
- undo_redo->add_do_method(Globals::get_singleton(),"set_persisting","locale/translation_remaps",true);
- undo_redo->add_undo_property(Globals::get_singleton(),"locale/translation_remaps",Globals::get_singleton()->get("locale/translation_remaps"));
+ undo_redo->add_do_property(GlobalConfig::get_singleton(),"locale/translation_remaps",remaps);
+ undo_redo->add_undo_property(GlobalConfig::get_singleton(),"locale/translation_remaps",GlobalConfig::get_singleton()->get("locale/translation_remaps"));
undo_redo->add_do_method(this,"_update_translations");
undo_redo->add_undo_method(this,"_update_translations");
undo_redo->add_do_method(this,"_settings_changed");
@@ -1082,9 +1043,9 @@ void ProjectSettings::_update_translations() {
translation_list->clear();
TreeItem *root = translation_list->create_item(NULL);
translation_list->set_hide_root(true);
- if (Globals::get_singleton()->has("locale/translations")) {
+ if (GlobalConfig::get_singleton()->has("locale/translations")) {
- StringArray translations = Globals::get_singleton()->get("locale/translations");
+ StringArray translations = GlobalConfig::get_singleton()->get("locale/translations");
for(int i=0;i<translations.size();i++) {
TreeItem *t = translation_list->create_item(root);
@@ -1121,9 +1082,9 @@ void ProjectSettings::_update_translations() {
langnames+=names[i];
}
- if (Globals::get_singleton()->has("locale/translation_remaps")) {
+ if (GlobalConfig::get_singleton()->has("locale/translation_remaps")) {
- Dictionary remaps = Globals::get_singleton()->get("locale/translation_remaps");
+ Dictionary remaps = GlobalConfig::get_singleton()->get("locale/translation_remaps");
List<Variant> rk;
remaps.get_key_list(&rk);
Vector<String> keys;
@@ -1213,41 +1174,41 @@ void ProjectSettings::set_plugins_page() {
void ProjectSettings::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_item_selected"),&ProjectSettings::_item_selected);
- ObjectTypeDB::bind_method(_MD("_item_add"),&ProjectSettings::_item_add);
- ObjectTypeDB::bind_method(_MD("_item_adds"),&ProjectSettings::_item_adds);
- ObjectTypeDB::bind_method(_MD("_item_del"),&ProjectSettings::_item_del);
- ObjectTypeDB::bind_method(_MD("_item_checked"),&ProjectSettings::_item_checked);
- ObjectTypeDB::bind_method(_MD("_save"),&ProjectSettings::_save);
- ObjectTypeDB::bind_method(_MD("_action_add"),&ProjectSettings::_action_add);
- ObjectTypeDB::bind_method(_MD("_action_adds"),&ProjectSettings::_action_adds);
- ObjectTypeDB::bind_method(_MD("_action_selected"),&ProjectSettings::_action_selected);
- ObjectTypeDB::bind_method(_MD("_action_edited"),&ProjectSettings::_action_edited);
- ObjectTypeDB::bind_method(_MD("_action_button_pressed"),&ProjectSettings::_action_button_pressed);
- ObjectTypeDB::bind_method(_MD("_update_actions"),&ProjectSettings::_update_actions);
- ObjectTypeDB::bind_method(_MD("_wait_for_key"),&ProjectSettings::_wait_for_key);
- ObjectTypeDB::bind_method(_MD("_add_item"),&ProjectSettings::_add_item);
- ObjectTypeDB::bind_method(_MD("_device_input_add"),&ProjectSettings::_device_input_add);
- ObjectTypeDB::bind_method(_MD("_press_a_key_confirm"),&ProjectSettings::_press_a_key_confirm);
- ObjectTypeDB::bind_method(_MD("_settings_prop_edited"),&ProjectSettings::_settings_prop_edited);
- ObjectTypeDB::bind_method(_MD("_copy_to_platform"),&ProjectSettings::_copy_to_platform);
- ObjectTypeDB::bind_method(_MD("_update_translations"),&ProjectSettings::_update_translations);
- ObjectTypeDB::bind_method(_MD("_translation_delete"),&ProjectSettings::_translation_delete);
- ObjectTypeDB::bind_method(_MD("_settings_changed"),&ProjectSettings::_settings_changed);
- ObjectTypeDB::bind_method(_MD("_translation_add"),&ProjectSettings::_translation_add);
- ObjectTypeDB::bind_method(_MD("_translation_file_open"),&ProjectSettings::_translation_file_open);
-
- ObjectTypeDB::bind_method(_MD("_translation_res_add"),&ProjectSettings::_translation_res_add);
- ObjectTypeDB::bind_method(_MD("_translation_res_file_open"),&ProjectSettings::_translation_res_file_open);
- ObjectTypeDB::bind_method(_MD("_translation_res_option_add"),&ProjectSettings::_translation_res_option_add);
- ObjectTypeDB::bind_method(_MD("_translation_res_option_file_open"),&ProjectSettings::_translation_res_option_file_open);
- ObjectTypeDB::bind_method(_MD("_translation_res_select"),&ProjectSettings::_translation_res_select);
- ObjectTypeDB::bind_method(_MD("_translation_res_option_changed"),&ProjectSettings::_translation_res_option_changed);
- ObjectTypeDB::bind_method(_MD("_translation_res_delete"),&ProjectSettings::_translation_res_delete);
- ObjectTypeDB::bind_method(_MD("_translation_res_option_delete"),&ProjectSettings::_translation_res_option_delete);
-
- ObjectTypeDB::bind_method(_MD("_clear_search_box"),&ProjectSettings::_clear_search_box);
- ObjectTypeDB::bind_method(_MD("_toggle_search_bar"),&ProjectSettings::_toggle_search_bar);
+ ClassDB::bind_method(_MD("_item_selected"),&ProjectSettings::_item_selected);
+ ClassDB::bind_method(_MD("_item_add"),&ProjectSettings::_item_add);
+ ClassDB::bind_method(_MD("_item_adds"),&ProjectSettings::_item_adds);
+ ClassDB::bind_method(_MD("_item_del"),&ProjectSettings::_item_del);
+ ClassDB::bind_method(_MD("_item_checked"),&ProjectSettings::_item_checked);
+ ClassDB::bind_method(_MD("_save"),&ProjectSettings::_save);
+ ClassDB::bind_method(_MD("_action_add"),&ProjectSettings::_action_add);
+ ClassDB::bind_method(_MD("_action_adds"),&ProjectSettings::_action_adds);
+ ClassDB::bind_method(_MD("_action_selected"),&ProjectSettings::_action_selected);
+ ClassDB::bind_method(_MD("_action_edited"),&ProjectSettings::_action_edited);
+ ClassDB::bind_method(_MD("_action_button_pressed"),&ProjectSettings::_action_button_pressed);
+ ClassDB::bind_method(_MD("_update_actions"),&ProjectSettings::_update_actions);
+ ClassDB::bind_method(_MD("_wait_for_key"),&ProjectSettings::_wait_for_key);
+ ClassDB::bind_method(_MD("_add_item"),&ProjectSettings::_add_item);
+ ClassDB::bind_method(_MD("_device_input_add"),&ProjectSettings::_device_input_add);
+ ClassDB::bind_method(_MD("_press_a_key_confirm"),&ProjectSettings::_press_a_key_confirm);
+ ClassDB::bind_method(_MD("_settings_prop_edited"),&ProjectSettings::_settings_prop_edited);
+ ClassDB::bind_method(_MD("_copy_to_platform"),&ProjectSettings::_copy_to_platform);
+ ClassDB::bind_method(_MD("_update_translations"),&ProjectSettings::_update_translations);
+ ClassDB::bind_method(_MD("_translation_delete"),&ProjectSettings::_translation_delete);
+ ClassDB::bind_method(_MD("_settings_changed"),&ProjectSettings::_settings_changed);
+ ClassDB::bind_method(_MD("_translation_add"),&ProjectSettings::_translation_add);
+ ClassDB::bind_method(_MD("_translation_file_open"),&ProjectSettings::_translation_file_open);
+
+ ClassDB::bind_method(_MD("_translation_res_add"),&ProjectSettings::_translation_res_add);
+ ClassDB::bind_method(_MD("_translation_res_file_open"),&ProjectSettings::_translation_res_file_open);
+ ClassDB::bind_method(_MD("_translation_res_option_add"),&ProjectSettings::_translation_res_option_add);
+ ClassDB::bind_method(_MD("_translation_res_option_file_open"),&ProjectSettings::_translation_res_option_file_open);
+ ClassDB::bind_method(_MD("_translation_res_select"),&ProjectSettings::_translation_res_select);
+ ClassDB::bind_method(_MD("_translation_res_option_changed"),&ProjectSettings::_translation_res_option_changed);
+ ClassDB::bind_method(_MD("_translation_res_delete"),&ProjectSettings::_translation_res_delete);
+ ClassDB::bind_method(_MD("_translation_res_option_delete"),&ProjectSettings::_translation_res_option_delete);
+
+ ClassDB::bind_method(_MD("_clear_search_box"),&ProjectSettings::_clear_search_box);
+ ClassDB::bind_method(_MD("_toggle_search_bar"),&ProjectSettings::_toggle_search_bar);
}
@@ -1262,7 +1223,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
tab_container = memnew( TabContainer );
add_child(tab_container);
- set_child_rect(tab_container);
+ //set_child_rect(tab_container);
//tab_container->set_anchor_and_margin(MARGIN_LEFT,ANCHOR_BEGIN, 15 );
//tab_container->set_anchor_and_margin(MARGIN_RIGHT,ANCHOR_END, 15 );
@@ -1347,6 +1308,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
globals_editor = memnew( SectionedPropertyEditor );
props_base->add_child(globals_editor);
+ globals_editor->get_property_editor()->set_undo_redo(EditorNode::get_singleton()->get_undo_redo());
//globals_editor->hide_top_label();
globals_editor->set_v_size_flags(Control::SIZE_EXPAND_FILL);
globals_editor->get_property_editor()->register_text_enter(search_box);
@@ -1389,7 +1351,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
}
- popup_platform->get_popup()->connect("item_pressed",this,"_copy_to_platform");
+ popup_platform->get_popup()->connect("id_pressed",this,"_copy_to_platform");
get_ok()->set_text(TTR("Close"));
set_hide_on_ok(true);
@@ -1437,7 +1399,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
input_editor->connect("button_pressed",this,"_action_button_pressed");
popup_add = memnew( PopupMenu );
add_child(popup_add);
- popup_add->connect("item_pressed",this,"_add_item");
+ popup_add->connect("id_pressed",this,"_add_item");
press_a_key = memnew( ConfirmationDialog );
press_a_key->set_focus_mode(FOCUS_ALL);
@@ -1451,7 +1413,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
l->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_BEGIN,30);
press_a_key_label=l;
press_a_key->add_child(l);
- press_a_key->connect("input_event",this,"_wait_for_key");
+ press_a_key->connect("gui_input",this,"_wait_for_key");
press_a_key->connect("confirmed",this,"_press_a_key_confirm");
@@ -1462,7 +1424,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
hbc = memnew( HBoxContainer );
device_input->add_child(hbc);
- device_input->set_child_rect(hbc);
+// device_input->set_child_rect(hbc);
VBoxContainer *vbc_left = memnew( VBoxContainer );
hbc->add_child(vbc_left);
@@ -1472,7 +1434,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
vbc_left->add_child(l);
device_id = memnew( SpinBox );
- device_id->set_val(0);
+ device_id->set_value(0);
vbc_left->add_child(device_id);
VBoxContainer *vbc_right = memnew( VBoxContainer );
@@ -1606,7 +1568,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) {
timer = memnew( Timer );
timer->set_wait_time(1.5);
- timer->connect("timeout",Globals::get_singleton(),"save");
+ timer->connect("timeout",GlobalConfig::get_singleton(),"save");
timer->set_one_shot(true);
add_child(timer);
diff --git a/tools/editor/project_settings.h b/tools/editor/project_settings.h
index 61ad094d00..bb925a5fd9 100644
--- a/tools/editor/project_settings.h
+++ b/tools/editor/project_settings.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -40,7 +40,7 @@
//#include "project_export_settings.h"
class ProjectSettings : public AcceptDialog {
- OBJ_TYPE( ProjectSettings, AcceptDialog );
+ GDCLASS( ProjectSettings, AcceptDialog );
TabContainer *tab_container;
diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp
index ef6b1aa47c..4c69412b3b 100644
--- a/tools/editor/property_editor.cpp
+++ b/tools/editor/property_editor.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -173,9 +173,9 @@ void CustomPropertyEditor::_menu_option(int p_which) {
propvalues.push_back(p);
}
- String orig_type = res_orig->get_type();
+ String orig_type = res_orig->get_class();
- Object *inst = ObjectTypeDB::instance( orig_type );
+ Object *inst = ClassDB::instance( orig_type );
Ref<Resource> res = Ref<Resource>( inst->cast_to<Resource>() );
@@ -226,15 +226,26 @@ void CustomPropertyEditor::_menu_option(int p_which) {
ERR_FAIL_COND( inheritors_array.empty() );
+
+
String intype=inheritors_array[p_which-TYPE_BASE_ID];
- Object *obj = ObjectTypeDB::instance(intype);
+ if (intype=="ViewportTexture") {
+
+ scene_tree->set_title(TTR("Pick a Viewport"));
+ scene_tree->popup_centered_ratio();
+ picking_viewport=true;
+ return;
+
+ }
+
+ Object *obj = ClassDB::instance(intype);
ERR_BREAK( !obj );
Resource *res=obj->cast_to<Resource>();
ERR_BREAK( !res );
if (owner && hint==PROPERTY_HINT_RESOURCE_TYPE && hint_text=="Script") {
//make visual script the right type
- res->call("set_instance_base_type",owner->get_type());
+ res->call("set_instance_base_type",owner->get_class());
}
v=Ref<Resource>(res).get_ref_ptr();
@@ -341,14 +352,14 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty
slider->set_min(min);
slider->set_max(max);
slider->set_step(step);
- slider->set_val(v);
+ slider->set_value(v);
slider->show();
set_size(Size2(110,30)*EDSCALE);
} else {
spinbox->set_min(min);
spinbox->set_max(max);
spinbox->set_step(step);
- spinbox->set_val(v);
+ spinbox->set_value(v);
spinbox->show();
set_size(Size2(70,35)*EDSCALE);
}
@@ -871,7 +882,7 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty
Set<String> valid_inheritors;
valid_inheritors.insert(base);
List<StringName> inheritors;
- ObjectTypeDB::get_inheriters_from(base.strip_edges(),&inheritors);
+ ClassDB::get_inheriters_from_class(base.strip_edges(),&inheritors);
List<StringName>::Element *E=inheritors.front();
while(E) {
valid_inheritors.insert(E->get());
@@ -880,7 +891,7 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty
for(Set<String>::Element *E=valid_inheritors.front();E;E=E->next()) {
String t = E->get();
- if (!ObjectTypeDB::can_instance(t))
+ if (!ClassDB::can_instance(t))
continue;
inheritors_array.push_back(t);
@@ -934,7 +945,7 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty
paste_valid=true;
else
for (int i = 0; i < hint_text.get_slice_count(",");i++)
- if (ObjectTypeDB::is_type(cb->get_type(),hint_text.get_slice(",",i))) {
+ if (ClassDB::is_parent_class(cb->get_class(),hint_text.get_slice(",",i))) {
paste_valid=true;
break;
}
@@ -1012,7 +1023,7 @@ void CustomPropertyEditor::_file_selected(String p_file) {
if (hint==PROPERTY_HINT_FILE || hint==PROPERTY_HINT_DIR) {
- v=Globals::get_singleton()->localize_path(p_file);
+ v=GlobalConfig::get_singleton()->localize_path(p_file);
emit_signal("variant_changed");
hide();
}
@@ -1095,13 +1106,13 @@ void CustomPropertyEditor::_type_create_selected(int p_idx) {
ERR_FAIL_INDEX(p_idx,inheritors_array.size());
//List<String> inheritors;
- //ObjectTypeDB::get_inheriters_from(hint_text,&inheritors);
+ //ClassDB::get_inheriters_from(hint_text,&inheritors);
//inheritors.push_front(hint_text);
//ERR_FAIL_INDEX( p_idx, inheritors.size() );
String intype=inheritors_array[p_idx];
- Object *obj = ObjectTypeDB::instance(intype);
+ Object *obj = ClassDB::instance(intype);
ERR_FAIL_COND( !obj );
@@ -1126,6 +1137,22 @@ void CustomPropertyEditor::_color_changed(const Color& p_color) {
void CustomPropertyEditor::_node_path_selected(NodePath p_path) {
+ if (picking_viewport) {
+
+ Node* to_node=get_node(p_path);
+ if (!to_node->cast_to<Viewport>()) {
+ EditorNode::get_singleton()->show_warning("Selected node is not a Viewport!");
+ return;
+ }
+
+ Ref<ViewportTexture> vt;
+ vt.instance();
+ vt->set_viewport_path_in_scene(get_tree()->get_edited_scene_root()->get_path_to(to_node));
+ vt->setup_local_to_scene();
+ v=vt;
+ emit_signal("variant_changed");
+ return;
+ }
if (hint==PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE && hint_text!=String()) {
@@ -1142,9 +1169,9 @@ void CustomPropertyEditor::_node_path_selected(NodePath p_path) {
Node *node=NULL;
- if (owner->is_type("Node"))
+ if (owner->is_class("Node"))
node = owner->cast_to<Node>();
- else if (owner->is_type("ArrayPropertyEdit"))
+ else if (owner->is_class("ArrayPropertyEdit"))
node = owner->cast_to<ArrayPropertyEdit>()->get_node();
if (!node) {
@@ -1262,7 +1289,8 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
if (p_which==0) {
-
+ picking_viewport=false;
+ scene_tree->set_title(TTR("Pick a Node"));
scene_tree->popup_centered_ratio();
} else if (p_which==1) {
@@ -1285,7 +1313,7 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
if (hint==PROPERTY_HINT_RESOURCE_TYPE) {
- Object *obj = ObjectTypeDB::instance(intype);
+ Object *obj = ClassDB::instance(intype);
ERR_BREAK( !obj );
Resource *res=obj->cast_to<Resource>();
ERR_BREAK( !res );
@@ -1353,7 +1381,7 @@ void CustomPropertyEditor::_action_pressed(int p_which) {
propvalues.push_back(p);
}
- Ref<Resource> res = Ref<Resource>( ObjectTypeDB::instance( res_orig->get_type() ));
+ Ref<Resource> res = Ref<Resource>( ClassDB::instance( res_orig->get_class() ));
ERR_FAIL_COND(res.is_null());
@@ -1914,22 +1942,22 @@ void CustomPropertyEditor::config_value_editors(int p_amount, int p_columns,int
void CustomPropertyEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_focus_enter", &CustomPropertyEditor::_focus_enter);
- ObjectTypeDB::bind_method("_focus_exit", &CustomPropertyEditor::_focus_exit);
- ObjectTypeDB::bind_method("_modified",&CustomPropertyEditor::_modified);
- ObjectTypeDB::bind_method("_range_modified", &CustomPropertyEditor::_range_modified);
- ObjectTypeDB::bind_method("_scroll_modified",&CustomPropertyEditor::_scroll_modified);
- ObjectTypeDB::bind_method("_action_pressed",&CustomPropertyEditor::_action_pressed);
- ObjectTypeDB::bind_method("_file_selected",&CustomPropertyEditor::_file_selected);
- ObjectTypeDB::bind_method("_type_create_selected",&CustomPropertyEditor::_type_create_selected);
- ObjectTypeDB::bind_method("_node_path_selected",&CustomPropertyEditor::_node_path_selected);
- ObjectTypeDB::bind_method("_color_changed",&CustomPropertyEditor::_color_changed);
- ObjectTypeDB::bind_method("_draw_easing",&CustomPropertyEditor::_draw_easing);
- ObjectTypeDB::bind_method("_drag_easing",&CustomPropertyEditor::_drag_easing);
- ObjectTypeDB::bind_method( "_text_edit_changed",&CustomPropertyEditor::_text_edit_changed);
- ObjectTypeDB::bind_method( "_menu_option",&CustomPropertyEditor::_menu_option);
- ObjectTypeDB::bind_method( "_create_dialog_callback",&CustomPropertyEditor::_create_dialog_callback);
- ObjectTypeDB::bind_method( "_create_selected_property",&CustomPropertyEditor::_create_selected_property);
+ ClassDB::bind_method("_focus_enter", &CustomPropertyEditor::_focus_enter);
+ ClassDB::bind_method("_focus_exit", &CustomPropertyEditor::_focus_exit);
+ ClassDB::bind_method("_modified",&CustomPropertyEditor::_modified);
+ ClassDB::bind_method("_range_modified", &CustomPropertyEditor::_range_modified);
+ ClassDB::bind_method("_scroll_modified",&CustomPropertyEditor::_scroll_modified);
+ ClassDB::bind_method("_action_pressed",&CustomPropertyEditor::_action_pressed);
+ ClassDB::bind_method("_file_selected",&CustomPropertyEditor::_file_selected);
+ ClassDB::bind_method("_type_create_selected",&CustomPropertyEditor::_type_create_selected);
+ ClassDB::bind_method("_node_path_selected",&CustomPropertyEditor::_node_path_selected);
+ ClassDB::bind_method("_color_changed",&CustomPropertyEditor::_color_changed);
+ ClassDB::bind_method("_draw_easing",&CustomPropertyEditor::_draw_easing);
+ ClassDB::bind_method("_drag_easing",&CustomPropertyEditor::_drag_easing);
+ ClassDB::bind_method( "_text_edit_changed",&CustomPropertyEditor::_text_edit_changed);
+ ClassDB::bind_method( "_menu_option",&CustomPropertyEditor::_menu_option);
+ ClassDB::bind_method( "_create_dialog_callback",&CustomPropertyEditor::_create_dialog_callback);
+ ClassDB::bind_method( "_create_selected_property",&CustomPropertyEditor::_create_selected_property);
@@ -2017,7 +2045,7 @@ CustomPropertyEditor::CustomPropertyEditor() {
type_button = memnew( MenuButton );
add_child(type_button);
type_button->hide();
- type_button->get_popup()->connect("item_pressed", this,"_type_create_selected");
+ type_button->get_popup()->connect("id_pressed", this,"_type_create_selected");
scene_tree = memnew( SceneTreeDialog );
@@ -2033,13 +2061,13 @@ CustomPropertyEditor::CustomPropertyEditor() {
add_child(easing_draw);
easing_draw->hide();
easing_draw->connect("draw",this,"_draw_easing");
- easing_draw->connect("input_event",this,"_drag_easing");
+ easing_draw->connect("gui_input",this,"_drag_easing");
//easing_draw->emit_signal(SceneStringNames::get_singleton()->input_event,InputEvent());
easing_draw->set_default_cursor_shape(Control::CURSOR_MOVE);
menu = memnew(PopupMenu);
add_child(menu);
- menu->connect("item_pressed",this,"_menu_option");
+ menu->connect("id_pressed",this,"_menu_option");
evaluator = NULL;
@@ -2404,8 +2432,8 @@ void PropertyEditor::set_item_text(TreeItem *p_item, int p_type, const String& p
} else {
RES res = obj->get( p_name ).operator RefPtr();
- if (res->is_type("Texture")) {
- int tw = EditorSettings::get_singleton()->get("property_editor/texture_preview_width");
+ if (res->is_class("Texture")) {
+ int tw = EditorSettings::get_singleton()->get("docks/property_editor/texture_preview_width");
p_item->set_icon_max_width(1,tw);
p_item->set_icon(1,res);
p_item->set_text(1,"");
@@ -2416,20 +2444,20 @@ void PropertyEditor::set_item_text(TreeItem *p_item, int p_type, const String& p
} else if (res->get_path()!="" && !res->get_path().begins_with("local://")) {
p_item->set_text(1, res->get_path().get_file());
} else {
- p_item->set_text(1,"<"+res->get_type()+">");
+ p_item->set_text(1,"<"+res->get_class()+">");
};
if (res.is_valid() && res->get_path().is_resource_file()) {
p_item->set_tooltip(1,res->get_path());
} else if (res.is_valid()) {
- p_item->set_tooltip(1,res->get_name()+" ("+res->get_type()+")");
+ p_item->set_tooltip(1,res->get_name()+" ("+res->get_class()+")");
}
- if (has_icon(res->get_type(),"EditorIcons")) {
+ if (has_icon(res->get_class(),"EditorIcons")) {
- p_item->set_icon(0,get_icon(res->get_type(),"EditorIcons"));
+ p_item->set_icon(0,get_icon(res->get_class(),"EditorIcons"));
} else {
Dictionary d = p_item->get_metadata(0);
@@ -2448,7 +2476,7 @@ void PropertyEditor::set_item_text(TreeItem *p_item, int p_type, const String& p
}
}
- if (!res->is_type("Texture")) {
+ if (!res->is_class("Texture")) {
//texture already previews via itself
EditorResourcePreview::get_singleton()->queue_edited_resource_preview(res,this,"_resource_preview_done",p_item->get_instance_ID());
}
@@ -2509,6 +2537,12 @@ void PropertyEditor::_check_reload_status(const String&p_name, TreeItem* item) {
}
+ if (obj->call("property_can_revert",p_name).operator bool()) {
+
+ has_reload=true;
+ }
+
+
if (!has_reload && !obj->get_script().is_null()) {
Ref<Script> scr = obj->get_script();
Variant orig_value;
@@ -2555,7 +2589,7 @@ bool PropertyEditor::_is_drop_valid(const Dictionary& p_drag_data, const Diction
Ref<Resource> res = drag_data["resource"];
for(int i=0;i<allowed_type.get_slice_count(",");i++) {
String at = allowed_type.get_slice(",",i).strip_edges();
- if (res.is_valid() && ObjectTypeDB::is_type(res->get_type(),at)) {
+ if (res.is_valid() && ClassDB::is_parent_class(res->get_class(),at)) {
return true;
}
}
@@ -2573,7 +2607,7 @@ bool PropertyEditor::_is_drop_valid(const Dictionary& p_drag_data, const Diction
for(int i=0;i<allowed_type.get_slice_count(",");i++) {
String at = allowed_type.get_slice(",",i).strip_edges();
- if (ObjectTypeDB::is_type(ftype,at)) {
+ if (ClassDB::is_parent_class(ftype,at)) {
return true;
}
}
@@ -2923,7 +2957,7 @@ void PropertyEditor::refresh() {
if (refresh_countdown>0)
return;
- refresh_countdown=EditorSettings::get_singleton()->get("property_editor/auto_refresh_interval");
+ refresh_countdown=EditorSettings::get_singleton()->get("docks/property_editor/auto_refresh_interval");
}
@@ -2998,6 +3032,8 @@ void PropertyEditor::update_tree() {
TreeItem * current_category=NULL;
String filter = search_box ? search_box->get_text() : "";
+ String group;
+ String group_base;
for (List<PropertyInfo>::Element *I=plist.front() ; I ; I=I->next()) {
@@ -3005,7 +3041,17 @@ void PropertyEditor::update_tree() {
//make sure the property can be edited
- if (p.usage&PROPERTY_USAGE_CATEGORY) {
+ if (p.usage&PROPERTY_USAGE_GROUP) {
+
+ group=p.name;
+ group_base=p.hint_string;
+
+ continue;
+
+ } else if (p.usage&PROPERTY_USAGE_CATEGORY) {
+
+ group="";
+ group_base="";
if (!show_categories)
continue;
@@ -3062,12 +3108,27 @@ void PropertyEditor::update_tree() {
} else if ( ! (p.usage&PROPERTY_USAGE_EDITOR ) )
continue;
- String name = (p.name.find("/")!=-1)?p.name.right( p.name.find_last("/")+1 ):p.name;
+ String basename=p.name;
+ if (group!="") {
+ if (group_base!="") {
+ if (basename.begins_with(group_base)) {
+ basename=basename.replace_first(group_base,"");
+ } else {
+ group=""; //no longer using group base, clear
+ }
+ }
+ }
+
+ if (group!="") {
+ basename=group+"/"+basename;
+ }
+
+ String name = (basename.find("/")!=-1)?basename.right( basename.find_last("/")+1 ):basename;
if (capitalize_paths)
name = name.camelcase_to_underscore().capitalize();
- String path=p.name.left( p.name.find_last("/") ) ;
+ String path=basename.left( basename.find_last("/") ) ;
if (use_filter && filter!="") {
@@ -3080,7 +3141,7 @@ void PropertyEditor::update_tree() {
continue;
}
- //printf("property %s\n",p.name.ascii().get_data());
+ //printf("property %s\n",basename.ascii().get_data());
TreeItem * parent = get_parent_node(path,item_path,current_category?current_category:root );
//if (parent->get_parent()==root)
// parent=root;
@@ -3122,7 +3183,7 @@ void PropertyEditor::update_tree() {
if (use_doc_hints) {
StringName setter;
StringName type;
- if (ObjectTypeDB::get_setter_and_type_for_property(obj->get_type_name(),p.name,type,setter)) {
+ if (ClassDB::get_setter_and_type_for_property(obj->get_class_name(),p.name,type,setter)) {
String descr;
bool found=false;
@@ -3635,8 +3696,8 @@ void PropertyEditor::update_tree() {
} else {
RES res = obj->get( p.name ).operator RefPtr();
- if (res->is_type("Texture")) {
- int tw = EditorSettings::get_singleton()->get("property_editor/texture_preview_width");
+ if (res->is_class("Texture")) {
+ int tw = EditorSettings::get_singleton()->get("docks/property_editor/texture_preview_width");
item->set_icon_max_width(1,tw);
item->set_icon(1,res);
item->set_text(1,"");
@@ -3648,19 +3709,19 @@ void PropertyEditor::update_tree() {
item->set_text(1, res->get_path().get_file());
} else {
- item->set_text(1,"<"+res->get_type()+">");
+ item->set_text(1,"<"+res->get_class()+">");
}
- if (has_icon(res->get_type(),"EditorIcons")) {
- type=res->get_type();
+ if (has_icon(res->get_class(),"EditorIcons")) {
+ type=res->get_class();
}
if (res.is_valid() && res->get_path().is_resource_file()) {
item->set_tooltip(1,res->get_path());
} else if (res.is_valid()) {
- item->set_tooltip(1,res->get_name()+" ("+res->get_type()+")");
+ item->set_tooltip(1,res->get_name()+" ("+res->get_class()+")");
}
- if (!res->is_type("Texture")) {
+ if (!res->is_class("Texture")) {
//texture already previews via itself
EditorResourcePreview::get_singleton()->queue_edited_resource_preview(res,this,"_resource_preview_done",item->get_instance_ID());
}
@@ -3715,6 +3776,12 @@ void PropertyEditor::update_tree() {
}
+ if (obj->call("property_can_revert",p.name).operator bool()) {
+
+ item->add_button(1,get_icon("ReloadSmall","EditorIcons"),3);
+ has_reload=true;
+ }
+
if (!has_reload && !obj->get_script().is_null()) {
Ref<Script> scr = obj->get_script();
Variant orig_value;
@@ -3765,22 +3832,34 @@ void PropertyEditor::_edit_set(const String& p_name, const Variant& p_value) {
} else {
-
undo_redo->create_action(TTR("Set")+" "+p_name,UndoRedo::MERGE_ENDS);
undo_redo->add_do_property(obj,p_name,p_value);
undo_redo->add_undo_property(obj,p_name,obj->get(p_name));
+
+
undo_redo->add_do_method(this,"_changed_callback",obj,p_name);
undo_redo->add_undo_method(this,"_changed_callback",obj,p_name);
- undo_redo->add_undo_method(this,"_changed_callback",obj,p_name);
+
Resource *r = obj->cast_to<Resource>();
if (r) {
if (!r->is_edited() && String(p_name)!="resource/edited") {
undo_redo->add_do_method(r,"set_edited",true);
undo_redo->add_undo_method(r,"set_edited",false);
}
+
+ if (String(p_name)=="resource_local_to_scene") {
+ bool prev = obj->get(p_name);
+ bool next = p_value;
+ if (next) {
+ undo_redo->add_do_method(this,"setup_local_to_scene");
+ }
+ if (prev) {
+ undo_redo->add_undo_method(this,"setup_local_to_scene");
+ }
+ }
}
- _prop_edited_name[0]=p_name;
- undo_redo->add_do_method(this,"emit_signal",_prop_edited,_prop_edited_name);
+ undo_redo->add_do_method(this,"emit_signal",_prop_edited,p_name);
+ undo_redo->add_undo_method(this,"emit_signal",_prop_edited,p_name);
undo_redo->commit_action();
}
}
@@ -4043,6 +4122,11 @@ void PropertyEditor::_edit_button(Object *p_item, int p_column, int p_button) {
return;
}
+ if (obj->call("property_can_revert",prop).operator bool()) {
+ Variant rev = obj->call("property_get_revert",prop);
+ _edit_set(prop,rev);
+ }
+
if (!obj->get_script().is_null()) {
Ref<Script> scr = obj->get_script();
Variant orig_value;
@@ -4206,7 +4290,7 @@ void PropertyEditor::_resource_preview_done(const String& p_path,const Ref<Textu
ERR_FAIL_COND(!ti);
- int tw = EditorSettings::get_singleton()->get("property_editor/texture_preview_width");
+ int tw = EditorSettings::get_singleton()->get("docks/property_editor/texture_preview_width");
ti->set_icon(1,p_preview); //should be scaled I think?
ti->set_icon_max_width(1,tw);
@@ -4214,24 +4298,24 @@ void PropertyEditor::_resource_preview_done(const String& p_path,const Ref<Textu
}
void PropertyEditor::_bind_methods() {
- ObjectTypeDB::bind_method( "_item_edited",&PropertyEditor::_item_edited);
- ObjectTypeDB::bind_method( "_item_selected",&PropertyEditor::_item_selected);
- ObjectTypeDB::bind_method( "_custom_editor_request",&PropertyEditor::_custom_editor_request);
- ObjectTypeDB::bind_method( "_custom_editor_edited",&PropertyEditor::_custom_editor_edited);
- ObjectTypeDB::bind_method( "_resource_edit_request",&PropertyEditor::_resource_edit_request);
- ObjectTypeDB::bind_method( "_node_removed",&PropertyEditor::_node_removed);
- ObjectTypeDB::bind_method( "_edit_button",&PropertyEditor::_edit_button);
- ObjectTypeDB::bind_method( "_changed_callback",&PropertyEditor::_changed_callbacks);
- ObjectTypeDB::bind_method( "_draw_flags",&PropertyEditor::_draw_flags);
- ObjectTypeDB::bind_method( "_set_range_def",&PropertyEditor::_set_range_def);
- ObjectTypeDB::bind_method( "_filter_changed",&PropertyEditor::_filter_changed);
- ObjectTypeDB::bind_method( "update_tree",&PropertyEditor::update_tree);
- ObjectTypeDB::bind_method( "_resource_preview_done",&PropertyEditor::_resource_preview_done);
- ObjectTypeDB::bind_method( "refresh",&PropertyEditor::refresh);
-
- ObjectTypeDB::bind_method(_MD("get_drag_data_fw"), &PropertyEditor::get_drag_data_fw);
- ObjectTypeDB::bind_method(_MD("can_drop_data_fw"), &PropertyEditor::can_drop_data_fw);
- ObjectTypeDB::bind_method(_MD("drop_data_fw"), &PropertyEditor::drop_data_fw);
+ ClassDB::bind_method( "_item_edited",&PropertyEditor::_item_edited);
+ ClassDB::bind_method( "_item_selected",&PropertyEditor::_item_selected);
+ ClassDB::bind_method( "_custom_editor_request",&PropertyEditor::_custom_editor_request);
+ ClassDB::bind_method( "_custom_editor_edited",&PropertyEditor::_custom_editor_edited);
+ ClassDB::bind_method( "_resource_edit_request",&PropertyEditor::_resource_edit_request);
+ ClassDB::bind_method( "_node_removed",&PropertyEditor::_node_removed);
+ ClassDB::bind_method( "_edit_button",&PropertyEditor::_edit_button);
+ ClassDB::bind_method( "_changed_callback",&PropertyEditor::_changed_callbacks);
+ ClassDB::bind_method( "_draw_flags",&PropertyEditor::_draw_flags);
+ ClassDB::bind_method( "_set_range_def",&PropertyEditor::_set_range_def);
+ ClassDB::bind_method( "_filter_changed",&PropertyEditor::_filter_changed);
+ ClassDB::bind_method( "update_tree",&PropertyEditor::update_tree);
+ ClassDB::bind_method( "_resource_preview_done",&PropertyEditor::_resource_preview_done);
+ ClassDB::bind_method( "refresh",&PropertyEditor::refresh);
+
+ ClassDB::bind_method(_MD("get_drag_data_fw"), &PropertyEditor::get_drag_data_fw);
+ ClassDB::bind_method(_MD("can_drop_data_fw"), &PropertyEditor::can_drop_data_fw);
+ ClassDB::bind_method(_MD("drop_data_fw"), &PropertyEditor::drop_data_fw);
ADD_SIGNAL( MethodInfo("property_toggled",PropertyInfo( Variant::STRING, "property"),PropertyInfo( Variant::BOOL, "value")));
ADD_SIGNAL( MethodInfo("resource_selected", PropertyInfo( Variant::OBJECT, "res"),PropertyInfo( Variant::STRING, "prop") ) );
@@ -4317,7 +4401,7 @@ void PropertyEditor::set_subsection_selectable(bool p_selectable) {
PropertyEditor::PropertyEditor() {
_prop_edited="property_edited";
- _prop_edited_name.push_back(String());
+
undo_redo=NULL;
obj=NULL;
search_box=NULL;
@@ -4379,7 +4463,7 @@ PropertyEditor::PropertyEditor() {
use_doc_hints=false;
use_filter=false;
subsection_selectable=false;
- show_type_icons=EDITOR_DEF("inspector/show_type_icons",false);
+ show_type_icons=EDITOR_DEF("interface/show_type_icons",false);
}
@@ -4398,10 +4482,11 @@ PropertyEditor::~PropertyEditor()
class SectionedPropertyEditorFilter : public Object {
- OBJ_TYPE( SectionedPropertyEditorFilter, Object );
+ GDCLASS( SectionedPropertyEditorFilter, Object );
Object *edited;
String section;
+ bool allow_sub;
bool _set(const StringName& p_name, const Variant& p_value) {
@@ -4415,6 +4500,7 @@ class SectionedPropertyEditorFilter : public Object {
bool valid;
edited->set(name,p_value,&valid);
+ //_change_notify(p_name.operator String().utf8().get_data());
return valid;
}
@@ -4446,25 +4532,48 @@ class SectionedPropertyEditorFilter : public Object {
PropertyInfo pi=E->get();
int sp = pi.name.find("/");
- if (sp!=-1) {
- String ss = pi.name.substr(0,sp);
- if (ss==section) {
- pi.name=pi.name.substr(sp+1,pi.name.length());
- p_list->push_back(pi);
- }
- } else {
- if (section=="")
- p_list->push_back(pi);
+ if (pi.name=="resource_path" || pi.name=="resource_name") //skip resource stuff
+ continue;
+
+ if (sp==-1) {
+ pi.name="Global/"+pi.name;
+
+ }
+
+ if (pi.name.begins_with(section+"/")) {
+ pi.name=pi.name.replace_first(section+"/","");
+ if (!allow_sub && pi.name.find("/")!=-1)
+ continue;
+ p_list->push_back(pi);
}
}
}
+
+ bool property_can_revert(const String& p_name) {
+
+ return edited->call("property_can_revert",section+"/"+p_name);
+ }
+
+ Variant property_get_revert(const String& p_name) {
+
+ return edited->call("property_get_revert",section+"/"+p_name);
+ }
+
+protected:
+ static void _bind_methods() {
+
+ ClassDB::bind_method("property_can_revert",&SectionedPropertyEditorFilter::property_can_revert);
+ ClassDB::bind_method("property_get_revert",&SectionedPropertyEditorFilter::property_get_revert);
+ }
+
public:
- void set_section(const String& p_section) {
+ void set_section(const String& p_section,bool p_allow_sub) {
section=p_section;
+ allow_sub=p_allow_sub;
_change_notify();
}
@@ -4482,36 +4591,30 @@ public:
void SectionedPropertyEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_section_selected",&SectionedPropertyEditor::_section_selected);
+ ClassDB::bind_method("_section_selected",&SectionedPropertyEditor::_section_selected);
- ObjectTypeDB::bind_method("update_category_list", &SectionedPropertyEditor::update_category_list);
+ ClassDB::bind_method("update_category_list", &SectionedPropertyEditor::update_category_list);
}
-void SectionedPropertyEditor::_section_selected(int p_which) {
+void SectionedPropertyEditor::_section_selected() {
+
+ if (!sections->get_selected())
+ return;
- filter->set_section( sections->get_item_metadata(p_which) );
+ filter->set_section( sections->get_selected()->get_metadata(0), sections->get_selected()->get_children()==NULL);
}
void SectionedPropertyEditor::set_current_section(const String& p_section) {
- int section_idx = sections->find_metadata(p_section);
-
- if (section_idx==sections->get_current())
- return;
-
- if (section_idx!=-1) {
- sections->select(section_idx);
- _section_selected(section_idx);
- } else if (sections->get_item_count()) {
- sections->select(0);
- _section_selected(0);
+ if (section_map.has(p_section)) {
+ section_map[p_section]->select(0);;
}
}
String SectionedPropertyEditor::get_current_section() const {
- if (sections->get_current()!=-1)
- return sections->get_item_metadata( sections->get_current() );
+ if (sections->get_selected())
+ return sections->get_selected()->get_metadata(0);
else
return "";
}
@@ -4548,8 +4651,9 @@ void SectionedPropertyEditor::edit(Object* p_object) {
filter->set_edited(p_object);
editor->edit(filter);
- sections->select(0);
- _section_selected(0);
+ if (sections->get_root()->get_children()) {
+ sections->get_root()->get_children()->select(0);
+ }
} else {
update_category_list();
@@ -4569,7 +4673,12 @@ void SectionedPropertyEditor::update_category_list() {
List<PropertyInfo> pinfo;
o->get_property_list(&pinfo);
- Set<String> existing_sections;
+ section_map.clear();
+
+ TreeItem *root = sections->create_item();
+ section_map[""]=root;
+
+
for (List<PropertyInfo>::Element *E=pinfo.front();E;E=E->next()) {
PropertyInfo pi=E->get();
@@ -4579,27 +4688,41 @@ void SectionedPropertyEditor::update_category_list() {
else if ( !(pi.usage&PROPERTY_USAGE_EDITOR) )
continue;
- if (pi.name.find(":")!=-1 || pi.name=="script/script" || pi.name.begins_with("resource/"))
+ if (pi.name.find(":")!=-1 || pi.name=="script/script" || pi.name=="resource_name" || pi.name=="resource_path")
continue;
int sp = pi.name.find("/");
- if (sp!=-1) {
- String sname=pi.name.substr(0,sp);
- if (!existing_sections.has(sname)) {
- existing_sections.insert(sname);
- sections->add_item(sname.capitalize());
- sections->set_item_metadata(sections->get_item_count()-1,sname);
+ if (sp==-1)
+ pi.name="Global/"+pi.name;
+
+ Vector<String> sectionarr = pi.name.split("/");
+ String metasection;
+
+
+ for(int i=0;i<MIN(2,sectionarr.size()-1);i++) {
+
+ TreeItem *parent = section_map[metasection];
+
+ if (i>0) {
+ metasection+="/"+sectionarr[i];
+ } else {
+ metasection=sectionarr[i];
}
- } else {
- if (!existing_sections.has("")) {
- existing_sections.insert("");
- sections->add_item(TTR("Global"));
- sections->set_item_metadata(sections->get_item_count()-1,"");
+
+ if (!section_map.has(metasection)) {
+ TreeItem *ms = sections->create_item(parent);
+ section_map[metasection]=ms;
+ ms->set_text(0,sectionarr[i].capitalize());
+ ms->set_metadata(0,metasection);
+
}
}
+
}
- set_current_section(selected_category);
+ if (section_map.has(selected_category)) {
+ section_map[selected_category]->select(0);
+ }
}
PropertyEditor *SectionedPropertyEditor::get_property_editor() {
@@ -4615,8 +4738,9 @@ SectionedPropertyEditor::SectionedPropertyEditor() {
left_vb->set_custom_minimum_size(Size2(160,0)*EDSCALE);
add_child(left_vb);
- sections = memnew( ItemList );
+ sections = memnew( Tree );
sections->set_v_size_flags(SIZE_EXPAND_FILL);
+ sections->set_hide_root(true);
left_vb->add_margin_child(TTR("Sections:"),sections,true);
@@ -4634,7 +4758,7 @@ SectionedPropertyEditor::SectionedPropertyEditor() {
editor->hide_top_label();
- sections->connect("item_selected",this,"_section_selected");
+ sections->connect("cell_selected",this,"_section_selected");
}
diff --git a/tools/editor/property_editor.h b/tools/editor/property_editor.h
index cd9e754cb6..af7d01f935 100644
--- a/tools/editor/property_editor.h
+++ b/tools/editor/property_editor.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -53,7 +53,7 @@ class PropertySelector;
class CustomPropertyEditor : public Popup {
- OBJ_TYPE( CustomPropertyEditor, Popup );
+ GDCLASS( CustomPropertyEditor, Popup );
enum {
MAX_VALUE_EDITORS=12,
@@ -99,6 +99,7 @@ class CustomPropertyEditor : public Popup {
ColorPicker *color_picker;
TextEdit *text_edit;
bool read_only;
+ bool picking_viewport;
CheckBox *checks20[20];
SpinBox *spinbox;
HSlider *slider;
@@ -163,7 +164,7 @@ public:
class PropertyEditor : public Control {
- OBJ_TYPE( PropertyEditor, Control );
+ GDCLASS( PropertyEditor, Control );
Tree *tree;
Label *top_label;
@@ -174,7 +175,7 @@ class PropertyEditor : public Control {
Object* obj;
- Array _prop_edited_name;
+
StringName _prop_edited;
bool capitalize_paths;
@@ -289,17 +290,19 @@ class SectionedPropertyEditorFilter;
class SectionedPropertyEditor : public HBoxContainer {
- OBJ_TYPE(SectionedPropertyEditor,HBoxContainer);
+ GDCLASS(SectionedPropertyEditor,HBoxContainer);
ObjectID obj;
- ItemList *sections;
+ Tree *sections;
SectionedPropertyEditorFilter *filter;
+
+ Map<String,TreeItem*> section_map;
PropertyEditor *editor;
static void _bind_methods();
- void _section_selected(int p_which);
+ void _section_selected();
public:
@@ -317,7 +320,7 @@ public:
};
class PropertyValueEvaluator : public ValueEvaluator {
- OBJ_TYPE( PropertyValueEvaluator, ValueEvaluator );
+ GDCLASS( PropertyValueEvaluator, ValueEvaluator );
Object *obj;
ScriptLanguage *script_language;
diff --git a/tools/editor/property_selector.cpp b/tools/editor/property_selector.cpp
index 20b72240d9..3d9695ac2a 100644
--- a/tools/editor/property_selector.cpp
+++ b/tools/editor/property_selector.cpp
@@ -18,7 +18,7 @@ void PropertySelector::_sbox_input(const InputEvent& p_ie) {
case KEY_PAGEUP:
case KEY_PAGEDOWN: {
- search_options->call("_input_event", p_ie);
+ search_options->call("_gui_input", p_ie);
search_box->accept_event();
TreeItem *root = search_options->get_root();
@@ -87,8 +87,8 @@ void PropertySelector::_update_search() {
StringName base=base_type;
while(base) {
props.push_back(PropertyInfo(Variant::NIL,base,PROPERTY_HINT_NONE,"",PROPERTY_USAGE_CATEGORY));
- ObjectTypeDB::get_property_list(base,&props,true);
- base=ObjectTypeDB::type_inherits_from(base);
+ ClassDB::get_property_list(base,&props,true);
+ base=ClassDB::get_parent_class(base);
}
}
@@ -194,8 +194,8 @@ void PropertySelector::_update_search() {
StringName base=base_type;
while(base) {
methods.push_back(MethodInfo("*"+String(base)));
- ObjectTypeDB::get_method_list(base,&methods,true);
- base=ObjectTypeDB::type_inherits_from(base);
+ ClassDB::get_method_list(base,&methods,true);
+ base=ClassDB::get_parent_class(base);
}
}
@@ -321,8 +321,8 @@ void PropertySelector::_item_selected() {
case InputEvent::KEY: class_type="InputEventKey"; break;
case InputEvent::MOUSE_MOTION: class_type="InputEventMouseMotion"; break;
case InputEvent::MOUSE_BUTTON: class_type="InputEventMouseButton"; break;
- case InputEvent::JOYSTICK_MOTION: class_type="InputEventJoystickMotion"; break;
- case InputEvent::JOYSTICK_BUTTON: class_type="InputEventJoystickButton"; break;
+ case InputEvent::JOYPAD_MOTION: class_type="InputEventJoypadMotion"; break;
+ case InputEvent::JOYPAD_BUTTON: class_type="InputEventJoypadButton"; break;
case InputEvent::SCREEN_TOUCH: class_type="InputEventScreenTouch"; break;
case InputEvent::SCREEN_DRAG: class_type="InputEventScreenDrag"; break;
case InputEvent::ACTION: class_type="InputEventAction"; break;
@@ -358,14 +358,14 @@ void PropertySelector::_item_selected() {
}
}
- at_class=ObjectTypeDB::type_inherits_from(at_class);
+ at_class=ClassDB::get_parent_class(at_class);
}
if (text==String()) {
StringName setter;
StringName type;
- if (ObjectTypeDB::get_setter_and_type_for_property(class_type,name,type,setter)) {
+ if (ClassDB::get_setter_and_type_for_property(class_type,name,type,setter)) {
Map<String,DocData::ClassDoc>::Element *E=dd->class_list.find(type);
if (E) {
for(int i=0;i<E->get().methods.size();i++) {
@@ -395,7 +395,7 @@ void PropertySelector::_item_selected() {
}
}
- at_class=ObjectTypeDB::type_inherits_from(at_class);
+ at_class=ClassDB::get_parent_class(at_class);
}
}
@@ -470,7 +470,7 @@ void PropertySelector::select_method_from_basic_type(Variant::Type p_type, const
void PropertySelector::select_method_from_instance(Object* p_instance, const String &p_current){
- base_type=p_instance->get_type();
+ base_type=p_instance->get_class();
selected=p_current;
type=Variant::NIL;
script=0;
@@ -559,10 +559,10 @@ void PropertySelector::select_property_from_instance(Object* p_instance, const S
void PropertySelector::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_text_changed"),&PropertySelector::_text_changed);
- ObjectTypeDB::bind_method(_MD("_confirmed"),&PropertySelector::_confirmed);
- ObjectTypeDB::bind_method(_MD("_sbox_input"),&PropertySelector::_sbox_input);
- ObjectTypeDB::bind_method(_MD("_item_selected"),&PropertySelector::_item_selected);
+ ClassDB::bind_method(_MD("_text_changed"),&PropertySelector::_text_changed);
+ ClassDB::bind_method(_MD("_confirmed"),&PropertySelector::_confirmed);
+ ClassDB::bind_method(_MD("_sbox_input"),&PropertySelector::_sbox_input);
+ ClassDB::bind_method(_MD("_item_selected"),&PropertySelector::_item_selected);
ADD_SIGNAL(MethodInfo("selected",PropertyInfo(Variant::STRING,"name")));
@@ -574,11 +574,11 @@ PropertySelector::PropertySelector() {
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
- set_child_rect(vbc);
+ //set_child_rect(vbc);
search_box = memnew( LineEdit );
vbc->add_margin_child(TTR("Search:"),search_box);
search_box->connect("text_changed",this,"_text_changed");
- search_box->connect("input_event",this,"_sbox_input");
+ search_box->connect("gui_input",this,"_sbox_input");
search_options = memnew( Tree );
vbc->add_margin_child(TTR("Matches:"),search_options,true);
get_ok()->set_text(TTR("Open"));
diff --git a/tools/editor/property_selector.h b/tools/editor/property_selector.h
index f7f0e7e167..4823d50e0f 100644
--- a/tools/editor/property_selector.h
+++ b/tools/editor/property_selector.h
@@ -6,7 +6,7 @@
#include "editor_help.h"
class PropertySelector : public ConfirmationDialog {
- OBJ_TYPE(PropertySelector,ConfirmationDialog )
+ GDCLASS(PropertySelector,ConfirmationDialog )
LineEdit *search_box;
diff --git a/tools/editor/pvrtc_compress.cpp b/tools/editor/pvrtc_compress.cpp
index 75b5c69bc2..7f84d8d00e 100644
--- a/tools/editor/pvrtc_compress.cpp
+++ b/tools/editor/pvrtc_compress.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -38,7 +38,7 @@ static void (*_base_image_compress_pvrtc4_func)(Image *)=NULL;
static void _compress_image(Image::CompressMode p_mode,Image *p_image) {
- String ttpath = EditorSettings::get_singleton()->get("PVRTC/texture_tool");
+ String ttpath = EditorSettings::get_singleton()->get("filesystem/import/pvrtc_texture_tool");
if (ttpath.strip_edges()=="" || !FileAccess::exists(ttpath)) {
switch(p_mode) {
@@ -82,10 +82,10 @@ static void _compress_image(Image::CompressMode p_mode,Image *p_image) {
}
- if (EditorSettings::get_singleton()->get("PVRTC/fast_conversion").operator bool()) {
+ if (EditorSettings::get_singleton()->get("filesystem/import/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/pvrtc_compress.h b/tools/editor/pvrtc_compress.h
index 129faee080..4ba29026c5 100644
--- a/tools/editor/pvrtc_compress.h
+++ b/tools/editor/pvrtc_compress.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/quick_open.cpp b/tools/editor/quick_open.cpp
index e18dc584d5..ff5ecdf01b 100644
--- a/tools/editor/quick_open.cpp
+++ b/tools/editor/quick_open.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -86,7 +86,7 @@ void EditorQuickOpen::_sbox_input(const InputEvent& p_ie) {
case KEY_PAGEUP:
case KEY_PAGEDOWN: {
- search_options->call("_input_event", p_ie);
+ search_options->call("_gui_input", p_ie);
search_box->accept_event();
TreeItem *root = search_options->get_root();
@@ -166,7 +166,7 @@ void EditorQuickOpen::_parse_fs(EditorFileSystemDirectory *efsd, Vector< Pair< S
String file = efsd->get_file_path(i);
file=file.substr(6,file.length());
- if (ObjectTypeDB::is_type(efsd->get_file_type(i),base_type) && (search_text.is_subsequence_ofi(file))) {
+ if (ClassDB::is_parent_class(efsd->get_file_type(i),base_type) && (search_text.is_subsequence_ofi(file))) {
Pair< String, Ref<Texture> > pair;
pair.first = file;
pair.second = get_icon((has_icon(efsd->get_file_type(i), ei) ? efsd->get_file_type(i) : ot), ei);
@@ -252,9 +252,9 @@ StringName EditorQuickOpen::get_base_type() const {
void EditorQuickOpen::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_text_changed"),&EditorQuickOpen::_text_changed);
- ObjectTypeDB::bind_method(_MD("_confirmed"),&EditorQuickOpen::_confirmed);
- ObjectTypeDB::bind_method(_MD("_sbox_input"),&EditorQuickOpen::_sbox_input);
+ ClassDB::bind_method(_MD("_text_changed"),&EditorQuickOpen::_text_changed);
+ ClassDB::bind_method(_MD("_confirmed"),&EditorQuickOpen::_confirmed);
+ ClassDB::bind_method(_MD("_sbox_input"),&EditorQuickOpen::_sbox_input);
ADD_SIGNAL(MethodInfo("quick_open"));
@@ -266,11 +266,11 @@ EditorQuickOpen::EditorQuickOpen() {
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
- set_child_rect(vbc);
+ //set_child_rect(vbc);
search_box = memnew( LineEdit );
vbc->add_margin_child(TTR("Search:"),search_box);
search_box->connect("text_changed",this,"_text_changed");
- search_box->connect("input_event",this,"_sbox_input");
+ search_box->connect("gui_input",this,"_sbox_input");
search_options = memnew( Tree );
vbc->add_margin_child(TTR("Matches:"),search_options,true);
get_ok()->set_text(TTR("Open"));
diff --git a/tools/editor/quick_open.h b/tools/editor/quick_open.h
index c253f7606e..ef91d910b1 100644
--- a/tools/editor/quick_open.h
+++ b/tools/editor/quick_open.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -35,7 +35,7 @@
#include "pair.h"
class EditorQuickOpen : public ConfirmationDialog {
- OBJ_TYPE(EditorQuickOpen,ConfirmationDialog )
+ GDCLASS(EditorQuickOpen,ConfirmationDialog )
LineEdit *search_box;
Tree *search_options;
diff --git a/tools/editor/register_exporters.h b/tools/editor/register_exporters.h
index dccaa0641f..30ec522a00 100644
--- a/tools/editor/register_exporters.h
+++ b/tools/editor/register_exporters.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/tools/editor/reparent_dialog.cpp b/tools/editor/reparent_dialog.cpp
index 38b0372232..a8909b0772 100644
--- a/tools/editor/reparent_dialog.cpp
+++ b/tools/editor/reparent_dialog.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -75,8 +75,8 @@ void ReparentDialog::set_current(const Set<Node*>& p_selection) {
void ReparentDialog::_bind_methods() {
- ObjectTypeDB::bind_method("_reparent",&ReparentDialog::_reparent);
- ObjectTypeDB::bind_method("_cancel",&ReparentDialog::_cancel);
+ ClassDB::bind_method("_reparent",&ReparentDialog::_reparent);
+ ClassDB::bind_method("_cancel",&ReparentDialog::_cancel);
ADD_SIGNAL( MethodInfo("reparent",PropertyInfo(Variant::NODE_PATH,"path"),PropertyInfo(Variant::BOOL,"keep_global_xform")));
}
@@ -88,7 +88,7 @@ ReparentDialog::ReparentDialog() {
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
- set_child_rect(vbc);
+// set_child_rect(vbc);
tree = memnew( SceneTreeEditor(false) );
tree->set_show_enabled_subscene(true);
diff --git a/tools/editor/reparent_dialog.h b/tools/editor/reparent_dialog.h
index 1c0fbd2459..5e21f84581 100644
--- a/tools/editor/reparent_dialog.h
+++ b/tools/editor/reparent_dialog.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -40,7 +40,7 @@
*/
class ReparentDialog : public ConfirmationDialog {
- OBJ_TYPE( ReparentDialog, ConfirmationDialog );
+ GDCLASS( ReparentDialog, ConfirmationDialog );
SceneTreeEditor *tree;
CheckBox *keep_transform;
diff --git a/tools/editor/resources_dock.cpp b/tools/editor/resources_dock.cpp
index c73c8c081c..c8fa1eda77 100644
--- a/tools/editor/resources_dock.cpp
+++ b/tools/editor/resources_dock.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -129,7 +129,7 @@ void ResourcesDock::save_resource(const String& p_path,const Ref<Resource>& p_re
//if (EditorSettings::get_singleton()->get("on_save/save_paths_as_relative"))
// flg|=ResourceSaver::FLAG_RELATIVE_PATHS;
- String path = Globals::get_singleton()->localize_path(p_path);
+ String path = GlobalConfig::get_singleton()->localize_path(p_path);
Error err = ResourceSaver::save(path,p_resource,flg|ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS);
if (err!=OK) {
@@ -161,7 +161,7 @@ void ResourcesDock::save_resource_as(const Ref<Resource>& p_resource) {
String existing;
if (extensions.size()) {
- existing="new_"+res->get_type().to_lower()+"."+extensions.front()->get().to_lower();
+ existing="new_"+res->get_class().to_lower()+"."+extensions.front()->get().to_lower();
}
file->set_current_file(existing);
@@ -214,7 +214,7 @@ void ResourcesDock::_update_name(TreeItem *item) {
else if (res->get_path()!="" && res->get_path().find("::")==-1)
item->set_text(0,res->get_path().get_file());
else
- item->set_text(0,res->get_type()+" ("+itos(res->get_instance_ID())+")");
+ item->set_text(0,res->get_class()+" ("+itos(res->get_instance_ID())+")");
}
@@ -267,8 +267,8 @@ void ResourcesDock::add_resource(const Ref<Resource>& p_resource) {
TreeItem *res = resources->create_item(root);
res->set_metadata(0,p_resource);
- if (has_icon(p_resource->get_type(),"EditorIcons")) {
- res->set_icon(0,get_icon(p_resource->get_type(),"EditorIcons"));
+ if (has_icon(p_resource->get_class(),"EditorIcons")) {
+ res->set_icon(0,get_icon(p_resource->get_class(),"EditorIcons"));
}
_update_name(res);
@@ -319,12 +319,12 @@ void ResourcesDock::_create() {
void ResourcesDock::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_tool_selected"),&ResourcesDock::_tool_selected);
- ObjectTypeDB::bind_method(_MD("_create"),&ResourcesDock::_create);
- ObjectTypeDB::bind_method(_MD("_resource_selected"),&ResourcesDock::_resource_selected);
- ObjectTypeDB::bind_method(_MD("_delete"),&ResourcesDock::_delete);
- ObjectTypeDB::bind_method(_MD("remove_resource"),&ResourcesDock::remove_resource);
- ObjectTypeDB::bind_method(_MD("_file_action"),&ResourcesDock::_file_action);
+ ClassDB::bind_method(_MD("_tool_selected"),&ResourcesDock::_tool_selected);
+ ClassDB::bind_method(_MD("_create"),&ResourcesDock::_create);
+ ClassDB::bind_method(_MD("_resource_selected"),&ResourcesDock::_resource_selected);
+ ClassDB::bind_method(_MD("_delete"),&ResourcesDock::_delete);
+ ClassDB::bind_method(_MD("remove_resource"),&ResourcesDock::remove_resource);
+ ClassDB::bind_method(_MD("_file_action"),&ResourcesDock::_file_action);
@@ -366,7 +366,7 @@ ResourcesDock::ResourcesDock(EditorNode *p_editor) {
mb->set_tooltip(TTR("Save Resource"));
mb->get_popup()->add_item(TTR("Save Resource"),TOOL_SAVE);
mb->get_popup()->add_item(TTR("Save Resource As.."),TOOL_SAVE_AS);
- mb->get_popup()->connect("item_pressed",this,"_tool_selected" );
+ mb->get_popup()->connect("id_pressed",this,"_tool_selected" );
hbc->add_child( mb );
button_save=mb;
@@ -377,7 +377,7 @@ ResourcesDock::ResourcesDock(EditorNode *p_editor) {
mb->get_popup()->add_item(TTR("Make Local"),TOOL_MAKE_LOCAL);
mb->get_popup()->add_item(TTR("Copy"),TOOL_COPY);
mb->get_popup()->add_item(TTR("Paste"),TOOL_PASTE);
- mb->get_popup()->connect("item_pressed",this,"_tool_selected" );
+ mb->get_popup()->connect("id_pressed",this,"_tool_selected" );
hbc->add_child( mb );
button_tools=mb;
diff --git a/tools/editor/resources_dock.h b/tools/editor/resources_dock.h
index 978291fc3f..e225786583 100644
--- a/tools/editor/resources_dock.h
+++ b/tools/editor/resources_dock.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -45,7 +45,7 @@ class EditorNode;
class ResourcesDock : public VBoxContainer {
- OBJ_TYPE( ResourcesDock, VBoxContainer );
+ GDCLASS( ResourcesDock, VBoxContainer );
enum {
TOOL_NEW,
diff --git a/tools/editor/run_settings_dialog.cpp b/tools/editor/run_settings_dialog.cpp
index abcfe125f3..4d69c7ad84 100644
--- a/tools/editor/run_settings_dialog.cpp
+++ b/tools/editor/run_settings_dialog.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -47,8 +47,8 @@ String RunSettingsDialog::get_custom_arguments() const {
void RunSettingsDialog::_bind_methods() {
- ObjectTypeDB::bind_method("_run_mode_changed",&RunSettingsDialog::_run_mode_changed);
- //ObjectTypeDB::bind_method("_browse_selected_file",&RunSettingsDialog::_browse_selected_file);
+ ClassDB::bind_method("_run_mode_changed",&RunSettingsDialog::_run_mode_changed);
+ //ClassDB::bind_method("_browse_selected_file",&RunSettingsDialog::_browse_selected_file);
}
void RunSettingsDialog::_run_mode_changed(int idx) {
@@ -76,7 +76,7 @@ RunSettingsDialog::RunSettingsDialog() {
VBoxContainer *vbc = memnew( VBoxContainer );
add_child(vbc);
- set_child_rect(vbc);
+ //set_child_rect(vbc);
run_mode = memnew( OptionButton );
vbc->add_margin_child(TTR("Run Mode:"),run_mode);
diff --git a/tools/editor/run_settings_dialog.h b/tools/editor/run_settings_dialog.h
index 09319702f3..2efc18e43f 100644
--- a/tools/editor/run_settings_dialog.h
+++ b/tools/editor/run_settings_dialog.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -36,7 +36,7 @@
class RunSettingsDialog : public AcceptDialog {
- OBJ_TYPE( RunSettingsDialog, AcceptDialog);
+ GDCLASS( RunSettingsDialog, AcceptDialog);
public:
enum RunMode {
RUN_LOCAL_SCENE,
diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp
index 990d14196e..c171c49c7b 100644
--- a/tools/editor/scene_tree_dock.cpp
+++ b/tools/editor/scene_tree_dock.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -174,7 +174,7 @@ void SceneTreeDock::_perform_instance_scenes(const Vector<String>& p_files,Node*
}
- Node*instanced_scene=sdata->instance(true);
+ Node*instanced_scene=sdata->instance(PackedScene::GEN_EDIT_STATE_INSTANCE);
if (!instanced_scene) {
current_option=-1;
//accept->get_cancel()->hide();
@@ -198,7 +198,7 @@ void SceneTreeDock::_perform_instance_scenes(const Vector<String>& p_files,Node*
}
}
- instanced_scene->set_filename( Globals::get_singleton()->localize_path(p_files[i]) );
+ instanced_scene->set_filename( GlobalConfig::get_singleton()->localize_path(p_files[i]) );
instances.push_back(instanced_scene);
}
@@ -250,7 +250,7 @@ void SceneTreeDock::_replace_with_branch_scene(const String& p_file,Node* base)
return;
}
- Node *instanced_scene=sdata->instance(true);
+ Node *instanced_scene=sdata->instance(PackedScene::GEN_EDIT_STATE_INSTANCE);
if (!instanced_scene) {
accept->get_ok()->set_text(TTR("Ugh"));
accept->set_text(vformat(TTR("Error instancing scene from %s"),p_file));
@@ -375,7 +375,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
editor->push_item(existing.ptr());
else {
String path = selected->get_filename();
- script_create_dialog->config(selected->get_type(),path);
+ script_create_dialog->config(selected->get_class(),path);
script_create_dialog->popup_centered(Size2(300,290));
//script_create_dialog->popup_centered_minsize();
@@ -744,11 +744,11 @@ Node *SceneTreeDock::_duplicate(Node *p_node, Map<Node*,Node*> &duplimap) {
Ref<PackedScene> sd = ResourceLoader::load( p_node->get_filename() );
ERR_FAIL_COND_V(!sd.is_valid(),NULL);
- node = sd->instance(true);
+ node = sd->instance(PackedScene::GEN_EDIT_STATE_INSTANCE);
ERR_FAIL_COND_V(!node,NULL);
//node->generate_instance_state();
} else {
- Object *obj = ObjectTypeDB::instance(p_node->get_type());
+ Object *obj = ClassDB::instance(p_node->get_class());
ERR_FAIL_COND_V(!obj,NULL);
node = obj->cast_to<Node>();
if (!node)
@@ -846,7 +846,7 @@ void SceneTreeDock::_fill_path_renames(Vector<StringName> base_path,Vector<Strin
void SceneTreeDock::fill_path_renames(Node* p_node, Node *p_new_parent, List<Pair<NodePath,NodePath> > *p_renames) {
- if (!bool(EDITOR_DEF("animation/autorename_animation_tracks",true)))
+ if (!bool(EDITOR_DEF("editors/animation/autorename_animation_tracks",true)))
return;
@@ -879,7 +879,7 @@ void SceneTreeDock::perform_node_renames(Node* p_base,List<Pair<NodePath,NodePat
if (!r_rem_anims)
r_rem_anims=&rem_anims;
- if (!bool(EDITOR_DEF("animation/autorename_animation_tracks",true)))
+ if (!bool(EDITOR_DEF("editors/animation/autorename_animation_tracks",true)))
return;
if (!p_base) {
@@ -1378,7 +1378,7 @@ void SceneTreeDock::_create() {
String new_name = parent->validate_child_name(child);
ScriptEditorDebugger *sed = ScriptEditor::get_singleton()->get_debugger();
- editor_data->get_undo_redo().add_do_method(sed,"live_debug_create_node",edited_scene->get_path_to(parent),child->get_type(),new_name);
+ editor_data->get_undo_redo().add_do_method(sed,"live_debug_create_node",edited_scene->get_path_to(parent),child->get_class(),new_name);
editor_data->get_undo_redo().add_undo_method(sed,"live_debug_remove_node",NodePath(String(edited_scene->get_path_to(parent))+"/"+new_name));
} else {
@@ -1554,9 +1554,9 @@ void SceneTreeDock::_new_scene_from(String p_file) {
}
int flg=0;
- if (EditorSettings::get_singleton()->get("on_save/compress_binary_resources"))
+ if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources"))
flg|=ResourceSaver::FLAG_COMPRESS;
- //if (EditorSettings::get_singleton()->get("on_save/save_paths_as_relative"))
+ //if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative"))
// flg|=ResourceSaver::FLAG_RELATIVE_PATHS;
@@ -1831,7 +1831,7 @@ void SceneTreeDock::_focus_node() {
Node *node = scene_tree->get_selected();
ERR_FAIL_COND(!node);
- if (node->is_type("CanvasItem")) {
+ if (node->is_class("CanvasItem")) {
CanvasItemEditorPlugin *editor = editor_data->get_editor("2D")->cast_to<CanvasItemEditorPlugin>();
editor->get_canvas_item_editor()->focus_selection();
} else {
@@ -1848,33 +1848,33 @@ void SceneTreeDock::open_script_dialog(Node* p_for_node) {
void SceneTreeDock::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_tool_selected"),&SceneTreeDock::_tool_selected,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("_create"),&SceneTreeDock::_create);
- //ObjectTypeDB::bind_method(_MD("_script_created"),&SceneTreeDock::_script_created);
- ObjectTypeDB::bind_method(_MD("_node_reparent"),&SceneTreeDock::_node_reparent);
- ObjectTypeDB::bind_method(_MD("_set_owners"),&SceneTreeDock::_set_owners);
- ObjectTypeDB::bind_method(_MD("_node_selected"),&SceneTreeDock::_node_selected);
- ObjectTypeDB::bind_method(_MD("_node_renamed"),&SceneTreeDock::_node_renamed);
- ObjectTypeDB::bind_method(_MD("_script_created"),&SceneTreeDock::_script_created);
- ObjectTypeDB::bind_method(_MD("_load_request"),&SceneTreeDock::_load_request);
- ObjectTypeDB::bind_method(_MD("_script_open_request"),&SceneTreeDock::_script_open_request);
- ObjectTypeDB::bind_method(_MD("_unhandled_key_input"),&SceneTreeDock::_unhandled_key_input);
- ObjectTypeDB::bind_method(_MD("_input"),&SceneTreeDock::_input);
- ObjectTypeDB::bind_method(_MD("_nodes_drag_begin"),&SceneTreeDock::_nodes_drag_begin);
- ObjectTypeDB::bind_method(_MD("_delete_confirm"),&SceneTreeDock::_delete_confirm);
- ObjectTypeDB::bind_method(_MD("_node_prerenamed"),&SceneTreeDock::_node_prerenamed);
- ObjectTypeDB::bind_method(_MD("_import_subscene"),&SceneTreeDock::_import_subscene);
- ObjectTypeDB::bind_method(_MD("_selection_changed"),&SceneTreeDock::_selection_changed);
- ObjectTypeDB::bind_method(_MD("_new_scene_from"),&SceneTreeDock::_new_scene_from);
- ObjectTypeDB::bind_method(_MD("_nodes_dragged"),&SceneTreeDock::_nodes_dragged);
- ObjectTypeDB::bind_method(_MD("_files_dropped"),&SceneTreeDock::_files_dropped);
- ObjectTypeDB::bind_method(_MD("_script_dropped"),&SceneTreeDock::_script_dropped);
- ObjectTypeDB::bind_method(_MD("_tree_rmb"),&SceneTreeDock::_tree_rmb);
- ObjectTypeDB::bind_method(_MD("_filter_changed"),&SceneTreeDock::_filter_changed);
- ObjectTypeDB::bind_method(_MD("_focus_node"),&SceneTreeDock::_focus_node);
-
-
- ObjectTypeDB::bind_method(_MD("instance"),&SceneTreeDock::instance);
+ ClassDB::bind_method(_MD("_tool_selected"),&SceneTreeDock::_tool_selected,DEFVAL(false));
+ ClassDB::bind_method(_MD("_create"),&SceneTreeDock::_create);
+ //ClassDB::bind_method(_MD("_script_created"),&SceneTreeDock::_script_created);
+ ClassDB::bind_method(_MD("_node_reparent"),&SceneTreeDock::_node_reparent);
+ ClassDB::bind_method(_MD("_set_owners"),&SceneTreeDock::_set_owners);
+ ClassDB::bind_method(_MD("_node_selected"),&SceneTreeDock::_node_selected);
+ ClassDB::bind_method(_MD("_node_renamed"),&SceneTreeDock::_node_renamed);
+ ClassDB::bind_method(_MD("_script_created"),&SceneTreeDock::_script_created);
+ ClassDB::bind_method(_MD("_load_request"),&SceneTreeDock::_load_request);
+ ClassDB::bind_method(_MD("_script_open_request"),&SceneTreeDock::_script_open_request);
+ ClassDB::bind_method(_MD("_unhandled_key_input"),&SceneTreeDock::_unhandled_key_input);
+ ClassDB::bind_method(_MD("_input"),&SceneTreeDock::_input);
+ ClassDB::bind_method(_MD("_nodes_drag_begin"),&SceneTreeDock::_nodes_drag_begin);
+ ClassDB::bind_method(_MD("_delete_confirm"),&SceneTreeDock::_delete_confirm);
+ ClassDB::bind_method(_MD("_node_prerenamed"),&SceneTreeDock::_node_prerenamed);
+ ClassDB::bind_method(_MD("_import_subscene"),&SceneTreeDock::_import_subscene);
+ ClassDB::bind_method(_MD("_selection_changed"),&SceneTreeDock::_selection_changed);
+ ClassDB::bind_method(_MD("_new_scene_from"),&SceneTreeDock::_new_scene_from);
+ ClassDB::bind_method(_MD("_nodes_dragged"),&SceneTreeDock::_nodes_dragged);
+ ClassDB::bind_method(_MD("_files_dropped"),&SceneTreeDock::_files_dropped);
+ ClassDB::bind_method(_MD("_script_dropped"),&SceneTreeDock::_script_dropped);
+ ClassDB::bind_method(_MD("_tree_rmb"),&SceneTreeDock::_tree_rmb);
+ ClassDB::bind_method(_MD("_filter_changed"),&SceneTreeDock::_filter_changed);
+ ClassDB::bind_method(_MD("_focus_node"),&SceneTreeDock::_focus_node);
+
+
+ ClassDB::bind_method(_MD("instance"),&SceneTreeDock::instance);
}
@@ -2013,7 +2013,7 @@ SceneTreeDock::SceneTreeDock(EditorNode *p_editor,Node *p_scene_root,EditorSelec
menu = memnew( PopupMenu );
add_child(menu);
- menu->connect("item_pressed",this,"_tool_selected");
+ menu->connect("id_pressed",this,"_tool_selected");
first_enter=true;
restore_script_editor_on_drag=false;
diff --git a/tools/editor/scene_tree_dock.h b/tools/editor/scene_tree_dock.h
index f1b366a4c5..8dade67337 100644
--- a/tools/editor/scene_tree_dock.h
+++ b/tools/editor/scene_tree_dock.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -49,7 +49,7 @@ class EditorNode;
class SceneTreeDock : public VBoxContainer {
- OBJ_TYPE( SceneTreeDock, VBoxContainer );
+ GDCLASS( SceneTreeDock, VBoxContainer );
enum Tool {
diff --git a/tools/editor/scene_tree_editor.cpp b/tools/editor/scene_tree_editor.cpp
index f5628d0c8f..4052c0d468 100644
--- a/tools/editor/scene_tree_editor.cpp
+++ b/tools/editor/scene_tree_editor.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -206,28 +206,15 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item,int p_column,int p_id)
} else if (p_id==BUTTON_VISIBILITY) {
- if (n->is_type("Spatial")) {
-
- Spatial *ci = n->cast_to<Spatial>();
- if (!ci->is_visible() && ci->get_parent_spatial() && !ci->get_parent_spatial()->is_visible()) {
- error->set_text(TTR("This item cannot be made visible because the parent is hidden. Unhide the parent first."));
- error->popup_centered_minsize();
- return;
- }
+ if (n->is_class("Spatial")) {
bool v = !bool(n->call("is_hidden"));
undo_redo->create_action(TTR("Toggle Spatial Visible"));
undo_redo->add_do_method(n,"_set_visible_",!v);
undo_redo->add_undo_method(n,"_set_visible_",v);
undo_redo->commit_action();
- } else if (n->is_type("CanvasItem")) {
+ } else if (n->is_class("CanvasItem")) {
- CanvasItem *ci = n->cast_to<CanvasItem>();
- if (!ci->is_visible() && ci->get_parent_item() && !ci->get_parent_item()->is_visible()) {
- error->set_text(TTR("This item cannot be made visible because the parent is hidden. Unhide the parent first."));
- error->popup_centered_minsize();
- return;
- }
bool v = !bool(n->call("is_hidden"));
undo_redo->create_action(TTR("Toggle CanvasItem Visible"));
undo_redo->add_do_method(n,v?"hide":"show");
@@ -237,14 +224,14 @@ void SceneTreeEditor::_cell_button_pressed(Object *p_item,int p_column,int p_id)
} else if (p_id==BUTTON_LOCK) {
- if (n->is_type("CanvasItem")) {
+ if (n->is_class("CanvasItem")) {
n->set_meta("_edit_lock_", Variant());
_update_tree();
emit_signal("node_changed");
}
} else if (p_id==BUTTON_GROUP) {
- if (n->is_type("CanvasItem")) {
+ if (n->is_class("CanvasItem")) {
n->set_meta("_edit_group_", Variant());
_update_tree();
emit_signal("node_changed");
@@ -327,7 +314,7 @@ bool SceneTreeEditor::_add_nodes(Node *p_node,TreeItem *p_parent) {
if (p_node->has_meta("_editor_icon"))
icon=p_node->get_meta("_editor_icon");
else
- icon=get_icon( (has_icon(p_node->get_type(),"EditorIcons")?p_node->get_type():String("Object")),"EditorIcons");
+ icon=get_icon( (has_icon(p_node->get_class(),"EditorIcons")?p_node->get_class():String("Object")),"EditorIcons");
item->set_icon(0, icon );
item->set_metadata( 0,p_node->get_path() );
@@ -376,13 +363,13 @@ bool SceneTreeEditor::_add_nodes(Node *p_node,TreeItem *p_parent) {
if (p_node==get_scene_node() && p_node->get_scene_inherited_state().is_valid()) {
item->add_button(0,get_icon("InstanceOptions","EditorIcons"),BUTTON_SUBSCENE);
- item->set_tooltip(0,TTR("Inherits:")+" "+p_node->get_scene_inherited_state()->get_path()+"\n"+TTR("Type:")+" "+p_node->get_type());
+ item->set_tooltip(0,TTR("Inherits:")+" "+p_node->get_scene_inherited_state()->get_path()+"\n"+TTR("Type:")+" "+p_node->get_class());
} else if (p_node!=get_scene_node() && p_node->get_filename()!="" && can_open_instance) {
item->add_button(0,get_icon("InstanceOptions","EditorIcons"),BUTTON_SUBSCENE);
- item->set_tooltip(0,TTR("Instance:")+" "+p_node->get_filename()+"\n"+TTR("Type:")+" "+p_node->get_type());
+ item->set_tooltip(0,TTR("Instance:")+" "+p_node->get_filename()+"\n"+TTR("Type:")+" "+p_node->get_class());
} else {
- item->set_tooltip(0,String(p_node->get_name())+"\n"+TTR("Type:")+" "+p_node->get_type());
+ item->set_tooltip(0,String(p_node->get_name())+"\n"+TTR("Type:")+" "+p_node->get_class());
}
if (can_open_instance) {
@@ -396,7 +383,7 @@ bool SceneTreeEditor::_add_nodes(Node *p_node,TreeItem *p_parent) {
item->add_button(0,get_icon("Script","EditorIcons"),BUTTON_SCRIPT);
}
- if (p_node->is_type("CanvasItem")) {
+ if (p_node->is_class("CanvasItem")) {
bool is_locked = p_node->has_meta("_edit_lock_");//_edit_group_
if (is_locked)
@@ -415,7 +402,8 @@ bool SceneTreeEditor::_add_nodes(Node *p_node,TreeItem *p_parent) {
if (!p_node->is_connected("visibility_changed",this,"_node_visibility_changed"))
p_node->connect("visibility_changed",this,"_node_visibility_changed",varray(p_node));
- } else if (p_node->is_type("Spatial")) {
+ _update_visibility_color(p_node, item);
+ } else if (p_node->is_class("Spatial")) {
bool h = p_node->call("is_hidden");
if (h)
@@ -426,6 +414,7 @@ bool SceneTreeEditor::_add_nodes(Node *p_node,TreeItem *p_parent) {
if (!p_node->is_connected("visibility_changed",this,"_node_visibility_changed"))
p_node->connect("visibility_changed",this,"_node_visibility_changed",varray(p_node));
+ _update_visibility_color(p_node, item);
}
}
@@ -480,9 +469,9 @@ void SceneTreeEditor::_node_visibility_changed(Node *p_node) {
bool visible=false;
- if (p_node->is_type("CanvasItem")) {
+ if (p_node->is_class("CanvasItem")) {
visible = !p_node->call("is_hidden");
- } else if (p_node->is_type("Spatial")) {
+ } else if (p_node->is_class("Spatial")) {
visible = !p_node->call("is_hidden");
}
@@ -491,9 +480,20 @@ void SceneTreeEditor::_node_visibility_changed(Node *p_node) {
else
item->set_button(0,idx,get_icon("Visible","EditorIcons"));
-
+ _update_visibility_color(p_node, item);
}
+void SceneTreeEditor::_update_visibility_color(Node *p_node, TreeItem *p_item) {
+ if (p_node->is_class("CanvasItem") || p_node->is_class("Spatial")) {
+ Color color(1,1,1,1);
+ bool visible_on_screen = p_node->call("is_visible");
+ if (!visible_on_screen) {
+ color = Color(0.6,0.6,0.6,1);
+ }
+ int idx=p_item->get_button_by_id(0,BUTTON_VISIBILITY);
+ p_item->set_button_color(0,idx,color);
+ }
+}
void SceneTreeEditor::_node_script_changed(Node *p_node) {
@@ -524,7 +524,7 @@ void SceneTreeEditor::_node_removed(Node *p_node) {
if (p_node->is_connected("script_changed",this,"_node_script_changed"))
p_node->disconnect("script_changed",this,"_node_script_changed");
- if (p_node->is_type("Spatial") || p_node->is_type("CanvasItem")) {
+ if (p_node->is_class("Spatial") || p_node->is_class("CanvasItem")) {
if (p_node->is_connected("visibility_changed",this,"_node_visibility_changed"))
p_node->disconnect("visibility_changed",this,"_node_visibility_changed");
}
@@ -725,6 +725,12 @@ void SceneTreeEditor::set_selected(Node *p_node,bool p_emit_selected) {
TreeItem* item=p_node?_find(tree->get_root(),p_node->get_path()):NULL;
if (item) {
+ // make visible when it's collapsed
+ TreeItem* node=item->get_parent();
+ while (node && node!=tree->get_root()) {
+ node->set_collapsed(false);
+ node=node->get_parent();
+ }
item->select(0);
item->set_as_cursor(0);
selected=p_node;
@@ -953,7 +959,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();
@@ -1081,8 +1087,8 @@ void SceneTreeEditor::_warning_changed(Node* p_for_node) {
void SceneTreeEditor::_editor_settings_changed() {
- bool enable_rl = EditorSettings::get_singleton()->get("scenetree_editor/draw_relationship_lines");
- Color rl_color = EditorSettings::get_singleton()->get("scenetree_editor/relationship_line_color");
+ bool enable_rl = EditorSettings::get_singleton()->get("docks/scene_tree/draw_relationship_lines");
+ Color rl_color = EditorSettings::get_singleton()->get("docks/scene_tree/relationship_line_color");
if (enable_rl) {
tree->add_constant_override("draw_relationship_lines",1);
@@ -1096,31 +1102,31 @@ void SceneTreeEditor::_editor_settings_changed() {
void SceneTreeEditor::_bind_methods() {
- ObjectTypeDB::bind_method("_tree_changed",&SceneTreeEditor::_tree_changed);
- ObjectTypeDB::bind_method("_update_tree",&SceneTreeEditor::_update_tree);
- ObjectTypeDB::bind_method("_node_removed",&SceneTreeEditor::_node_removed);
- ObjectTypeDB::bind_method("_selected_changed",&SceneTreeEditor::_selected_changed);
- ObjectTypeDB::bind_method("_renamed",&SceneTreeEditor::_renamed);
- ObjectTypeDB::bind_method("_rename_node",&SceneTreeEditor::_rename_node);
- ObjectTypeDB::bind_method("_test_update_tree",&SceneTreeEditor::_test_update_tree);
- ObjectTypeDB::bind_method("_cell_multi_selected",&SceneTreeEditor::_cell_multi_selected);
- ObjectTypeDB::bind_method("_selection_changed",&SceneTreeEditor::_selection_changed);
- ObjectTypeDB::bind_method("_cell_button_pressed",&SceneTreeEditor::_cell_button_pressed);
- ObjectTypeDB::bind_method("_cell_collapsed",&SceneTreeEditor::_cell_collapsed);
- ObjectTypeDB::bind_method("_subscene_option",&SceneTreeEditor::_subscene_option);
- ObjectTypeDB::bind_method("_rmb_select",&SceneTreeEditor::_rmb_select);
- ObjectTypeDB::bind_method("_warning_changed",&SceneTreeEditor::_warning_changed);
+ ClassDB::bind_method("_tree_changed",&SceneTreeEditor::_tree_changed);
+ ClassDB::bind_method("_update_tree",&SceneTreeEditor::_update_tree);
+ ClassDB::bind_method("_node_removed",&SceneTreeEditor::_node_removed);
+ ClassDB::bind_method("_selected_changed",&SceneTreeEditor::_selected_changed);
+ ClassDB::bind_method("_renamed",&SceneTreeEditor::_renamed);
+ ClassDB::bind_method("_rename_node",&SceneTreeEditor::_rename_node);
+ ClassDB::bind_method("_test_update_tree",&SceneTreeEditor::_test_update_tree);
+ ClassDB::bind_method("_cell_multi_selected",&SceneTreeEditor::_cell_multi_selected);
+ ClassDB::bind_method("_selection_changed",&SceneTreeEditor::_selection_changed);
+ ClassDB::bind_method("_cell_button_pressed",&SceneTreeEditor::_cell_button_pressed);
+ ClassDB::bind_method("_cell_collapsed",&SceneTreeEditor::_cell_collapsed);
+ ClassDB::bind_method("_subscene_option",&SceneTreeEditor::_subscene_option);
+ ClassDB::bind_method("_rmb_select",&SceneTreeEditor::_rmb_select);
+ ClassDB::bind_method("_warning_changed",&SceneTreeEditor::_warning_changed);
- ObjectTypeDB::bind_method("_node_script_changed",&SceneTreeEditor::_node_script_changed);
- ObjectTypeDB::bind_method("_node_visibility_changed",&SceneTreeEditor::_node_visibility_changed);
+ ClassDB::bind_method("_node_script_changed",&SceneTreeEditor::_node_script_changed);
+ ClassDB::bind_method("_node_visibility_changed",&SceneTreeEditor::_node_visibility_changed);
- ObjectTypeDB::bind_method("_editor_settings_changed", &SceneTreeEditor::_editor_settings_changed);
+ ClassDB::bind_method("_editor_settings_changed", &SceneTreeEditor::_editor_settings_changed);
- ObjectTypeDB::bind_method(_MD("get_drag_data_fw"), &SceneTreeEditor::get_drag_data_fw);
- ObjectTypeDB::bind_method(_MD("can_drop_data_fw"), &SceneTreeEditor::can_drop_data_fw);
- ObjectTypeDB::bind_method(_MD("drop_data_fw"), &SceneTreeEditor::drop_data_fw);
+ ClassDB::bind_method(_MD("get_drag_data_fw"), &SceneTreeEditor::get_drag_data_fw);
+ ClassDB::bind_method(_MD("can_drop_data_fw"), &SceneTreeEditor::can_drop_data_fw);
+ ClassDB::bind_method(_MD("drop_data_fw"), &SceneTreeEditor::drop_data_fw);
- ObjectTypeDB::bind_method(_MD("update_tree"), &SceneTreeEditor::update_tree);
+ ClassDB::bind_method(_MD("update_tree"), &SceneTreeEditor::update_tree);
ADD_SIGNAL( MethodInfo("node_selected") );
ADD_SIGNAL( MethodInfo("node_renamed") );
@@ -1204,14 +1210,14 @@ SceneTreeEditor::SceneTreeEditor(bool p_label,bool p_can_rename, bool p_can_open
instance_menu->add_item(TTR("Discard Instancing"),SCENE_MENU_CLEAR_INSTANCING);
instance_menu->add_separator();
instance_menu->add_item(TTR("Open in Editor"),SCENE_MENU_OPEN);
- instance_menu->connect("item_pressed",this,"_subscene_option");
+ instance_menu->connect("id_pressed",this,"_subscene_option");
add_child(instance_menu);
inheritance_menu = memnew( PopupMenu );
inheritance_menu->add_item(TTR("Clear Inheritance"),SCENE_MENU_CLEAR_INHERITANCE);
inheritance_menu->add_separator();
inheritance_menu->add_item(TTR("Open in Editor"),SCENE_MENU_OPEN_INHERITED);
- inheritance_menu->connect("item_pressed",this,"_subscene_option");
+ inheritance_menu->connect("id_pressed",this,"_subscene_option");
add_child(inheritance_menu);
@@ -1227,7 +1233,7 @@ SceneTreeEditor::SceneTreeEditor(bool p_label,bool p_can_rename, bool p_can_open
add_child(update_timer);
script_types = memnew(List<StringName>);
- ObjectTypeDB::get_inheriters_from("Script", script_types);
+ ClassDB::get_inheriters_from_class("Script", script_types);
}
@@ -1283,8 +1289,8 @@ void SceneTreeDialog::_select() {
void SceneTreeDialog::_bind_methods() {
- ObjectTypeDB::bind_method("_select",&SceneTreeDialog::_select);
- ObjectTypeDB::bind_method("_cancel",&SceneTreeDialog::_cancel);
+ ClassDB::bind_method("_select",&SceneTreeDialog::_select);
+ ClassDB::bind_method("_cancel",&SceneTreeDialog::_cancel);
ADD_SIGNAL( MethodInfo("selected",PropertyInfo(Variant::NODE_PATH,"path")));
}
@@ -1296,7 +1302,7 @@ SceneTreeDialog::SceneTreeDialog() {
tree = memnew( SceneTreeEditor(false,false) );
add_child(tree);
- set_child_rect(tree);
+ //set_child_rect(tree);
tree->get_scene_tree()->connect("item_activated",this,"_select");
diff --git a/tools/editor/scene_tree_editor.h b/tools/editor/scene_tree_editor.h
index 12d85ecdeb..3cc1bd2388 100644
--- a/tools/editor/scene_tree_editor.h
+++ b/tools/editor/scene_tree_editor.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -40,7 +40,7 @@
*/
class SceneTreeEditor : public Control {
- OBJ_TYPE( SceneTreeEditor, Control );
+ GDCLASS( SceneTreeEditor, Control );
EditorSelection *editor_selection;
@@ -117,6 +117,7 @@ class SceneTreeEditor : public Control {
void _update_selection(TreeItem *item);
void _node_script_changed(Node *p_node);
void _node_visibility_changed(Node *p_node);
+ void _update_visibility_color(Node *p_node, TreeItem *p_item);
void _subscene_option(int p_idx);
void _node_replace_owner(Node* p_base,Node* p_node,Node* p_root);
@@ -171,7 +172,7 @@ public:
class SceneTreeDialog : public ConfirmationDialog {
- OBJ_TYPE( SceneTreeDialog, ConfirmationDialog );
+ GDCLASS( SceneTreeDialog, ConfirmationDialog );
SceneTreeEditor *tree;
// Button *select;
diff --git a/tools/editor/script_create_dialog.cpp b/tools/editor/script_create_dialog.cpp
index d7fc87167b..d1095271fc 100644
--- a/tools/editor/script_create_dialog.cpp
+++ b/tools/editor/script_create_dialog.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -133,7 +133,7 @@ void ScriptCreateDialog::_create_new() {
scr->set_name(cname);
if (!internal->is_pressed()) {
- String lpath = Globals::get_singleton()->localize_path(file_path->get_text());
+ String lpath = GlobalConfig::get_singleton()->localize_path(file_path->get_text());
scr->set_path(lpath);
if (!path_valid) {
alert->set_text(TTR("Invalid path!"));
@@ -243,7 +243,7 @@ void ScriptCreateDialog::_browse_path() {
void ScriptCreateDialog::_file_selected(const String& p_file) {
- String p = Globals::get_singleton()->localize_path(p_file);
+ String p = GlobalConfig::get_singleton()->localize_path(p_file);
file_path->set_text(p);
_path_changed(p);
@@ -262,7 +262,7 @@ void ScriptCreateDialog::_path_changed(const String& p_path) {
}
- p = Globals::get_singleton()->localize_path(p);
+ p = GlobalConfig::get_singleton()->localize_path(p);
if (!p.begins_with("res://")) {
path_error_label->set_text(TTR("Path is not local"));
@@ -338,12 +338,12 @@ void ScriptCreateDialog::_update_controls() {
void ScriptCreateDialog::_bind_methods() {
- ObjectTypeDB::bind_method("_class_name_changed",&ScriptCreateDialog::_class_name_changed);
- ObjectTypeDB::bind_method("_lang_changed",&ScriptCreateDialog::_lang_changed);
- ObjectTypeDB::bind_method("_built_in_pressed",&ScriptCreateDialog::_built_in_pressed);
- ObjectTypeDB::bind_method("_browse_path",&ScriptCreateDialog::_browse_path);
- ObjectTypeDB::bind_method("_file_selected",&ScriptCreateDialog::_file_selected);
- ObjectTypeDB::bind_method("_path_changed",&ScriptCreateDialog::_path_changed);
+ ClassDB::bind_method("_class_name_changed",&ScriptCreateDialog::_class_name_changed);
+ ClassDB::bind_method("_lang_changed",&ScriptCreateDialog::_lang_changed);
+ ClassDB::bind_method("_built_in_pressed",&ScriptCreateDialog::_built_in_pressed);
+ ClassDB::bind_method("_browse_path",&ScriptCreateDialog::_browse_path);
+ ClassDB::bind_method("_file_selected",&ScriptCreateDialog::_file_selected);
+ ClassDB::bind_method("_path_changed",&ScriptCreateDialog::_path_changed);
ADD_SIGNAL(MethodInfo("script_created",PropertyInfo(Variant::OBJECT,"script",PROPERTY_HINT_RESOURCE_TYPE,"Script")));
}
@@ -353,7 +353,7 @@ ScriptCreateDialog::ScriptCreateDialog() {
VBoxContainer *vb = memnew( VBoxContainer );
add_child(vb);
- set_child_rect(vb);
+ //set_child_rect(vb);
class_name = memnew( LineEdit );
diff --git a/tools/editor/script_create_dialog.h b/tools/editor/script_create_dialog.h
index 77e5a9fddd..df16efc73c 100644
--- a/tools/editor/script_create_dialog.h
+++ b/tools/editor/script_create_dialog.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -37,7 +37,7 @@
#include "scene/gui/check_button.h"
class ScriptCreateDialog : public ConfirmationDialog {
- OBJ_TYPE(ScriptCreateDialog,ConfirmationDialog);
+ GDCLASS(ScriptCreateDialog,ConfirmationDialog);
LineEdit *class_name;
Label *error_label;
diff --git a/tools/editor/script_editor_debugger.cpp b/tools/editor/script_editor_debugger.cpp
index c8170ca9a3..24b7befb9f 100644
--- a/tools/editor/script_editor_debugger.cpp
+++ b/tools/editor/script_editor_debugger.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -46,7 +46,7 @@
class ScriptEditorDebuggerVariables : public Object {
- OBJ_TYPE( ScriptEditorDebuggerVariables, Object );
+ GDCLASS( ScriptEditorDebuggerVariables, Object );
List<PropertyInfo> props;
Map<StringName,Variant> values;
@@ -114,7 +114,7 @@ public:
class ScriptEditorDebuggerInspectedObject : public Object {
- OBJ_TYPE( ScriptEditorDebuggerInspectedObject, Object);
+ GDCLASS( ScriptEditorDebuggerInspectedObject, Object);
@@ -581,7 +581,6 @@ void ScriptEditorDebugger::_parse_message(const String& p_msg,const Array& p_dat
//LOG
if (EditorNode::get_log()->is_hidden()) {
- log_forced_visible=true;
if (EditorNode::get_singleton()->are_bottom_panels_hidden()) {
EditorNode::get_singleton()->make_bottom_panel_item_visible(EditorNode::get_log());
}
@@ -957,7 +956,6 @@ void ScriptEditorDebugger::_notification(int p_what) {
break;
EditorNode::get_log()->add_message("** Debug Process Started **");
- log_forced_visible=false;
ppeer->set_stream_peer(connection);
@@ -1089,11 +1087,11 @@ void ScriptEditorDebugger::start() {
stop();
- if (!EditorNode::get_log()->is_visible()) {
- EditorNode::get_singleton()->make_bottom_panel_item_visible(EditorNode::get_log());
+ if (is_visible()) {
+ EditorNode::get_singleton()->make_bottom_panel_item_visible(this);
}
- uint16_t port = GLOBAL_DEF("debug/remote_port",6007);
+ uint16_t port = GLOBAL_GET("network/debug/remote_port");
perf_history.clear();
for(int i=0;i<Performance::MONITOR_MAX;i++) {
@@ -1132,13 +1130,6 @@ void ScriptEditorDebugger::stop(){
pending_in_queue=0;
message.clear();
- if (log_forced_visible) {
- //EditorNode::get_singleton()->make_bottom_panel_item_visible(this);
- if (EditorNode::get_log()->is_visible())
- EditorNode::get_singleton()->hide_bottom_panel();
- log_forced_visible=false;
- }
-
node_path_cache.clear();
res_path_cache.clear();
profiler_signature.clear();
@@ -1643,39 +1634,39 @@ void ScriptEditorDebugger::_paused() {
void ScriptEditorDebugger::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_stack_dump_frame_selected"),&ScriptEditorDebugger::_stack_dump_frame_selected);
- ObjectTypeDB::bind_method(_MD("debug_next"),&ScriptEditorDebugger::debug_next);
- ObjectTypeDB::bind_method(_MD("debug_step"),&ScriptEditorDebugger::debug_step);
- ObjectTypeDB::bind_method(_MD("debug_break"),&ScriptEditorDebugger::debug_break);
- ObjectTypeDB::bind_method(_MD("debug_continue"),&ScriptEditorDebugger::debug_continue);
- ObjectTypeDB::bind_method(_MD("_output_clear"),&ScriptEditorDebugger::_output_clear);
- ObjectTypeDB::bind_method(_MD("_performance_draw"),&ScriptEditorDebugger::_performance_draw);
- ObjectTypeDB::bind_method(_MD("_performance_select"),&ScriptEditorDebugger::_performance_select);
- ObjectTypeDB::bind_method(_MD("_scene_tree_request"),&ScriptEditorDebugger::_scene_tree_request);
- ObjectTypeDB::bind_method(_MD("_video_mem_request"),&ScriptEditorDebugger::_video_mem_request);
- ObjectTypeDB::bind_method(_MD("_live_edit_set"),&ScriptEditorDebugger::_live_edit_set);
- ObjectTypeDB::bind_method(_MD("_live_edit_clear"),&ScriptEditorDebugger::_live_edit_clear);
-
- ObjectTypeDB::bind_method(_MD("_error_selected"),&ScriptEditorDebugger::_error_selected);
- ObjectTypeDB::bind_method(_MD("_error_stack_selected"),&ScriptEditorDebugger::_error_stack_selected);
- ObjectTypeDB::bind_method(_MD("_profiler_activate"),&ScriptEditorDebugger::_profiler_activate);
- ObjectTypeDB::bind_method(_MD("_profiler_seeked"),&ScriptEditorDebugger::_profiler_seeked);
-
- ObjectTypeDB::bind_method(_MD("_paused"),&ScriptEditorDebugger::_paused);
-
- ObjectTypeDB::bind_method(_MD("_scene_tree_selected"),&ScriptEditorDebugger::_scene_tree_selected);
- ObjectTypeDB::bind_method(_MD("_scene_tree_folded"),&ScriptEditorDebugger::_scene_tree_folded);
-
-
- ObjectTypeDB::bind_method(_MD("live_debug_create_node"),&ScriptEditorDebugger::live_debug_create_node);
- ObjectTypeDB::bind_method(_MD("live_debug_instance_node"),&ScriptEditorDebugger::live_debug_instance_node);
- ObjectTypeDB::bind_method(_MD("live_debug_remove_node"),&ScriptEditorDebugger::live_debug_remove_node);
- ObjectTypeDB::bind_method(_MD("live_debug_remove_and_keep_node"),&ScriptEditorDebugger::live_debug_remove_and_keep_node);
- ObjectTypeDB::bind_method(_MD("live_debug_restore_node"),&ScriptEditorDebugger::live_debug_restore_node);
- ObjectTypeDB::bind_method(_MD("live_debug_duplicate_node"),&ScriptEditorDebugger::live_debug_duplicate_node);
- ObjectTypeDB::bind_method(_MD("live_debug_reparent_node"),&ScriptEditorDebugger::live_debug_reparent_node);
- ObjectTypeDB::bind_method(_MD("_scene_tree_property_select_object"),&ScriptEditorDebugger::_scene_tree_property_select_object);
- ObjectTypeDB::bind_method(_MD("_scene_tree_property_value_edited"),&ScriptEditorDebugger::_scene_tree_property_value_edited);
+ ClassDB::bind_method(_MD("_stack_dump_frame_selected"),&ScriptEditorDebugger::_stack_dump_frame_selected);
+ ClassDB::bind_method(_MD("debug_next"),&ScriptEditorDebugger::debug_next);
+ ClassDB::bind_method(_MD("debug_step"),&ScriptEditorDebugger::debug_step);
+ ClassDB::bind_method(_MD("debug_break"),&ScriptEditorDebugger::debug_break);
+ ClassDB::bind_method(_MD("debug_continue"),&ScriptEditorDebugger::debug_continue);
+ ClassDB::bind_method(_MD("_output_clear"),&ScriptEditorDebugger::_output_clear);
+ ClassDB::bind_method(_MD("_performance_draw"),&ScriptEditorDebugger::_performance_draw);
+ ClassDB::bind_method(_MD("_performance_select"),&ScriptEditorDebugger::_performance_select);
+ ClassDB::bind_method(_MD("_scene_tree_request"),&ScriptEditorDebugger::_scene_tree_request);
+ ClassDB::bind_method(_MD("_video_mem_request"),&ScriptEditorDebugger::_video_mem_request);
+ ClassDB::bind_method(_MD("_live_edit_set"),&ScriptEditorDebugger::_live_edit_set);
+ ClassDB::bind_method(_MD("_live_edit_clear"),&ScriptEditorDebugger::_live_edit_clear);
+
+ ClassDB::bind_method(_MD("_error_selected"),&ScriptEditorDebugger::_error_selected);
+ ClassDB::bind_method(_MD("_error_stack_selected"),&ScriptEditorDebugger::_error_stack_selected);
+ ClassDB::bind_method(_MD("_profiler_activate"),&ScriptEditorDebugger::_profiler_activate);
+ ClassDB::bind_method(_MD("_profiler_seeked"),&ScriptEditorDebugger::_profiler_seeked);
+
+ ClassDB::bind_method(_MD("_paused"),&ScriptEditorDebugger::_paused);
+
+ ClassDB::bind_method(_MD("_scene_tree_selected"),&ScriptEditorDebugger::_scene_tree_selected);
+ ClassDB::bind_method(_MD("_scene_tree_folded"),&ScriptEditorDebugger::_scene_tree_folded);
+
+
+ ClassDB::bind_method(_MD("live_debug_create_node"),&ScriptEditorDebugger::live_debug_create_node);
+ ClassDB::bind_method(_MD("live_debug_instance_node"),&ScriptEditorDebugger::live_debug_instance_node);
+ ClassDB::bind_method(_MD("live_debug_remove_node"),&ScriptEditorDebugger::live_debug_remove_node);
+ ClassDB::bind_method(_MD("live_debug_remove_and_keep_node"),&ScriptEditorDebugger::live_debug_remove_and_keep_node);
+ ClassDB::bind_method(_MD("live_debug_restore_node"),&ScriptEditorDebugger::live_debug_restore_node);
+ ClassDB::bind_method(_MD("live_debug_duplicate_node"),&ScriptEditorDebugger::live_debug_duplicate_node);
+ ClassDB::bind_method(_MD("live_debug_reparent_node"),&ScriptEditorDebugger::live_debug_reparent_node);
+ ClassDB::bind_method(_MD("_scene_tree_property_select_object"),&ScriptEditorDebugger::_scene_tree_property_select_object);
+ ClassDB::bind_method(_MD("_scene_tree_property_value_edited"),&ScriptEditorDebugger::_scene_tree_property_value_edited);
ADD_SIGNAL(MethodInfo("goto_script_line"));
ADD_SIGNAL(MethodInfo("breaked",PropertyInfo(Variant::BOOL,"reallydid"),PropertyInfo(Variant::BOOL,"can_debug")));
@@ -1980,8 +1971,6 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor){
msgdialog = memnew( AcceptDialog );
add_child(msgdialog);
- log_forced_visible=false;
-
p_editor->get_undo_redo()->set_method_notify_callback(_method_changeds,this);
p_editor->get_undo_redo()->set_property_notify_callback(_property_changeds,this);
live_debug=false;
diff --git a/tools/editor/script_editor_debugger.h b/tools/editor/script_editor_debugger.h
index c4a7cea1b7..a02934bbaf 100644
--- a/tools/editor/script_editor_debugger.h
+++ b/tools/editor/script_editor_debugger.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -55,7 +55,7 @@ class ScriptEditorDebuggerInspectedObject;
class ScriptEditorDebugger : public Control {
- OBJ_TYPE( ScriptEditorDebugger, Control );
+ GDCLASS( ScriptEditorDebugger, Control );
AcceptDialog *msgdialog;
@@ -96,7 +96,6 @@ class ScriptEditorDebugger : public Control {
TabContainer *tabs;
LineEdit *reason;
- bool log_forced_visible;
ScriptEditorDebuggerVariables *variables;
Button *step;
diff --git a/tools/editor/settings_config_dialog.cpp b/tools/editor/settings_config_dialog.cpp
index 50989ea5cb..c72f2641b7 100644
--- a/tools/editor/settings_config_dialog.cpp
+++ b/tools/editor/settings_config_dialog.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -55,7 +55,7 @@ void EditorSettingsDialog::_settings_property_edited(const String& p_name) {
// Small usability workaround to update the text color settings when the
// color theme is changed
- if (full_name == "text_editor/color_theme") {
+ if (full_name == "text_editor/theme/color_theme") {
property_editor->get_property_editor()->update_tree();
}
}
@@ -288,16 +288,16 @@ void EditorSettingsDialog::_press_a_key_confirm() {
void EditorSettingsDialog::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("_settings_save"),&EditorSettingsDialog::_settings_save);
- ObjectTypeDB::bind_method(_MD("_settings_changed"),&EditorSettingsDialog::_settings_changed);
- ObjectTypeDB::bind_method(_MD("_settings_property_edited"),&EditorSettingsDialog::_settings_property_edited);
- ObjectTypeDB::bind_method(_MD("_clear_search_box"),&EditorSettingsDialog::_clear_search_box);
- ObjectTypeDB::bind_method(_MD("_clear_shortcut_search_box"),&EditorSettingsDialog::_clear_shortcut_search_box);
- ObjectTypeDB::bind_method(_MD("_shortcut_button_pressed"),&EditorSettingsDialog::_shortcut_button_pressed);
- ObjectTypeDB::bind_method(_MD("_filter_shortcuts"),&EditorSettingsDialog::_filter_shortcuts);
- ObjectTypeDB::bind_method(_MD("_update_shortcuts"),&EditorSettingsDialog::_update_shortcuts);
- ObjectTypeDB::bind_method(_MD("_press_a_key_confirm"),&EditorSettingsDialog::_press_a_key_confirm);
- ObjectTypeDB::bind_method(_MD("_wait_for_key"),&EditorSettingsDialog::_wait_for_key);
+ ClassDB::bind_method(_MD("_settings_save"),&EditorSettingsDialog::_settings_save);
+ ClassDB::bind_method(_MD("_settings_changed"),&EditorSettingsDialog::_settings_changed);
+ ClassDB::bind_method(_MD("_settings_property_edited"),&EditorSettingsDialog::_settings_property_edited);
+ ClassDB::bind_method(_MD("_clear_search_box"),&EditorSettingsDialog::_clear_search_box);
+ ClassDB::bind_method(_MD("_clear_shortcut_search_box"),&EditorSettingsDialog::_clear_shortcut_search_box);
+ ClassDB::bind_method(_MD("_shortcut_button_pressed"),&EditorSettingsDialog::_shortcut_button_pressed);
+ ClassDB::bind_method(_MD("_filter_shortcuts"),&EditorSettingsDialog::_filter_shortcuts);
+ ClassDB::bind_method(_MD("_update_shortcuts"),&EditorSettingsDialog::_update_shortcuts);
+ ClassDB::bind_method(_MD("_press_a_key_confirm"),&EditorSettingsDialog::_press_a_key_confirm);
+ ClassDB::bind_method(_MD("_wait_for_key"),&EditorSettingsDialog::_wait_for_key);
}
@@ -307,7 +307,7 @@ EditorSettingsDialog::EditorSettingsDialog() {
tabs = memnew( TabContainer );
add_child(tabs);
- set_child_rect(tabs);
+ //set_child_rect(tabs);
VBoxContainer *vbc = memnew( VBoxContainer );
tabs->add_child(vbc);
@@ -380,7 +380,7 @@ EditorSettingsDialog::EditorSettingsDialog() {
l->set_anchor_and_margin(MARGIN_BOTTOM,ANCHOR_BEGIN,30);
press_a_key_label=l;
press_a_key->add_child(l);
- press_a_key->connect("input_event",this,"_wait_for_key");
+ press_a_key->connect("gui_input",this,"_wait_for_key");
press_a_key->connect("confirmed",this,"_press_a_key_confirm");
//Button *load = memnew( Button );
diff --git a/tools/editor/settings_config_dialog.h b/tools/editor/settings_config_dialog.h
index 3b91c7f019..17a05c27d3 100644
--- a/tools/editor/settings_config_dialog.h
+++ b/tools/editor/settings_config_dialog.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -36,7 +36,7 @@
class EditorSettingsDialog : public AcceptDialog {
- OBJ_TYPE(EditorSettingsDialog,AcceptDialog);
+ GDCLASS(EditorSettingsDialog,AcceptDialog);
diff --git a/tools/editor/spatial_editor_gizmos.cpp b/tools/editor/spatial_editor_gizmos.cpp
index 84803eb6db..ed96fe9e3f 100644
--- a/tools/editor/spatial_editor_gizmos.cpp
+++ b/tools/editor/spatial_editor_gizmos.cpp
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -41,6 +41,8 @@
// Keep small children away from this file.
// It's so ugly it will eat them alive
+
+
#define HANDLE_HALF_SIZE 0.05
void EditorSpatialGizmo::clear() {
@@ -82,7 +84,6 @@ void EditorSpatialGizmo::Instance::create_instance(Spatial *p_base) {
if (extra_margin)
VS::get_singleton()->instance_set_extra_visibility_margin(instance,1);
VS::get_singleton()->instance_geometry_set_cast_shadows_setting(instance,VS::SHADOW_CASTING_SETTING_OFF);
- VS::get_singleton()->instance_geometry_set_flag(instance,VS::INSTANCE_FLAG_RECEIVE_SHADOWS,false);
VS::get_singleton()->instance_set_layer_mask(instance,1<<SpatialEditorViewport::GIZMO_EDIT_LAYER); //gizmos are 26
}
@@ -116,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);
@@ -132,7 +133,7 @@ void EditorSpatialGizmo::add_lines(const Vector<Vector3> &p_lines, const Ref<Mat
a[Mesh::ARRAY_COLOR]=color;
- mesh->add_surface(Mesh::PRIMITIVE_LINES,a);
+ mesh->add_surface_from_arrays(Mesh::PRIMITIVE_LINES,a);
mesh->surface_set_material(0,p_material);
if (p_billboard) {
@@ -181,7 +182,7 @@ void EditorSpatialGizmo::add_unscaled_billboard(const Ref<Material>& p_material,
a.resize(Mesh::ARRAY_MAX);
a[Mesh::ARRAY_VERTEX]=vs;
a[Mesh::ARRAY_TEX_UV]=uv;
- mesh->add_surface(Mesh::PRIMITIVE_TRIANGLE_FAN,a);
+ mesh->add_surface_from_arrays(Mesh::PRIMITIVE_TRIANGLE_FAN,a);
mesh->surface_set_material(0,p_material);
if (true) {
@@ -244,10 +245,11 @@ void EditorSpatialGizmo::add_handles(const Vector<Vector3> &p_handles, bool p_bi
Array a;
a.resize(VS::ARRAY_MAX);
a[VS::ARRAY_VERTEX]=p_handles;
- DVector<Color> colors;
+ print_line("handles?: "+itos(p_handles.size()));
+ 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);
@@ -258,7 +260,7 @@ void EditorSpatialGizmo::add_handles(const Vector<Vector3> &p_handles, bool p_bi
}
a[VS::ARRAY_COLOR]=colors;
- mesh->add_surface(Mesh::PRIMITIVE_POINTS,a);
+ mesh->add_surface_from_arrays(Mesh::PRIMITIVE_POINTS,a);
mesh->surface_set_material(0,SpatialEditorGizmos::singleton->handle2_material);
if (p_billboard) {
@@ -614,14 +616,14 @@ void EditorSpatialGizmo::free(){
void EditorSpatialGizmo::_bind_methods() {
- ObjectTypeDB::bind_method(_MD("add_lines","lines","material:Material","billboard"),&EditorSpatialGizmo::add_lines,DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("add_mesh","mesh:Mesh","billboard","skeleton"),&EditorSpatialGizmo::add_mesh,DEFVAL(false),DEFVAL(RID()));
- ObjectTypeDB::bind_method(_MD("add_collision_segments","segments"),&EditorSpatialGizmo::add_collision_segments);
- ObjectTypeDB::bind_method(_MD("add_collision_triangles","triangles:TriangleMesh"),&EditorSpatialGizmo::add_collision_triangles);
- ObjectTypeDB::bind_method(_MD("add_unscaled_billboard","material:Material","default_scale"),&EditorSpatialGizmo::add_unscaled_billboard,DEFVAL(1));
- ObjectTypeDB::bind_method(_MD("add_handles","handles","billboard","secondary"),&EditorSpatialGizmo::add_handles,DEFVAL(false),DEFVAL(false));
- ObjectTypeDB::bind_method(_MD("set_spatial_node","node:Spatial"),&EditorSpatialGizmo::_set_spatial_node);
- ObjectTypeDB::bind_method(_MD("clear"),&EditorSpatialGizmo::clear);
+ ClassDB::bind_method(_MD("add_lines","lines","material:Material","billboard"),&EditorSpatialGizmo::add_lines,DEFVAL(false));
+ ClassDB::bind_method(_MD("add_mesh","mesh:Mesh","billboard","skeleton"),&EditorSpatialGizmo::add_mesh,DEFVAL(false),DEFVAL(RID()));
+ ClassDB::bind_method(_MD("add_collision_segments","segments"),&EditorSpatialGizmo::add_collision_segments);
+ ClassDB::bind_method(_MD("add_collision_triangles","triangles:TriangleMesh"),&EditorSpatialGizmo::add_collision_triangles);
+ ClassDB::bind_method(_MD("add_unscaled_billboard","material:Material","default_scale"),&EditorSpatialGizmo::add_unscaled_billboard,DEFVAL(1));
+ ClassDB::bind_method(_MD("add_handles","handles","billboard","secondary"),&EditorSpatialGizmo::add_handles,DEFVAL(false),DEFVAL(false));
+ ClassDB::bind_method(_MD("set_spatial_node","node:Spatial"),&EditorSpatialGizmo::_set_spatial_node);
+ ClassDB::bind_method(_MD("clear"),&EditorSpatialGizmo::clear);
BIND_VMETHOD( MethodInfo("redraw"));
BIND_VMETHOD( MethodInfo(Variant::STRING,"get_handle_name",PropertyInfo(Variant::INT,"index")));
@@ -667,9 +669,9 @@ String LightSpatialGizmo::get_handle_name(int p_idx) const {
Variant LightSpatialGizmo::get_handle_value(int p_idx) const{
if (p_idx==0)
- return light->get_parameter(Light::PARAM_RADIUS);
+ return light->get_param(Light::PARAM_RANGE);
if (p_idx==1)
- return light->get_parameter(Light::PARAM_SPOT_ANGLE);
+ return light->get_param(Light::PARAM_SPOT_ANGLE);
return Variant();
}
@@ -727,7 +729,7 @@ void LightSpatialGizmo::set_handle(int p_idx,Camera *p_camera, const Point2& p_p
if (d<0)
d=0;
- light->set_parameter(Light::PARAM_RADIUS,d);
+ light->set_param(Light::PARAM_RANGE,d);
} else if (light->cast_to<OmniLight>()) {
Plane cp=Plane( gt.origin, p_camera->get_transform().basis.get_axis(2));
@@ -736,15 +738,15 @@ void LightSpatialGizmo::set_handle(int p_idx,Camera *p_camera, const Point2& p_p
if (cp.intersects_ray(ray_from,ray_dir,&inters)) {
float r = inters.distance_to(gt.origin);
- light->set_parameter(Light::PARAM_RADIUS,r);
+ light->set_param(Light::PARAM_RANGE,r);
}
}
} else if (p_idx==1) {
- float a = _find_closest_angle_to_half_pi_arc(s[0],s[1],light->get_parameter(Light::PARAM_RADIUS),gt);
- light->set_parameter(Light::PARAM_SPOT_ANGLE,CLAMP(a,0.01,89.99));
+ float a = _find_closest_angle_to_half_pi_arc(s[0],s[1],light->get_param(Light::PARAM_RANGE),gt);
+ light->set_param(Light::PARAM_SPOT_ANGLE,CLAMP(a,0.01,89.99));
}
}
@@ -752,21 +754,21 @@ void LightSpatialGizmo::commit_handle(int p_idx,const Variant& p_restore,bool p_
if (p_cancel) {
- light->set_parameter(p_idx==0?Light::PARAM_RADIUS:Light::PARAM_SPOT_ANGLE,p_restore);
+ light->set_param(p_idx==0?Light::PARAM_RANGE:Light::PARAM_SPOT_ANGLE,p_restore);
} else if (p_idx==0) {
UndoRedo *ur = SpatialEditor::get_singleton()->get_undo_redo();
ur->create_action(TTR("Change Light Radius"));
- ur->add_do_method(light,"set_parameter",Light::PARAM_RADIUS,light->get_parameter(Light::PARAM_RADIUS));
- ur->add_undo_method(light,"set_parameter",Light::PARAM_RADIUS,p_restore);
+ ur->add_do_method(light,"set_param",Light::PARAM_RANGE,light->get_param(Light::PARAM_RANGE));
+ ur->add_undo_method(light,"set_param",Light::PARAM_RANGE,p_restore);
ur->commit_action();
} else if (p_idx==1) {
UndoRedo *ur = SpatialEditor::get_singleton()->get_undo_redo();
ur->create_action(TTR("Change Light Radius"));
- ur->add_do_method(light,"set_parameter",Light::PARAM_SPOT_ANGLE,light->get_parameter(Light::PARAM_SPOT_ANGLE));
- ur->add_undo_method(light,"set_parameter",Light::PARAM_SPOT_ANGLE,p_restore);
+ ur->add_do_method(light,"set_param",Light::PARAM_SPOT_ANGLE,light->get_param(Light::PARAM_SPOT_ANGLE));
+ ur->add_undo_method(light,"set_param",Light::PARAM_SPOT_ANGLE,p_restore);
ur->commit_action();
}
@@ -829,7 +831,7 @@ void LightSpatialGizmo::redraw() {
OmniLight *on = light->cast_to<OmniLight>();
- float r = on->get_parameter(Light::PARAM_RADIUS);
+ float r = on->get_param(Light::PARAM_RANGE);
Vector<Vector3> points;
@@ -869,9 +871,9 @@ void LightSpatialGizmo::redraw() {
Vector<Vector3> points;
SpotLight *on = light->cast_to<SpotLight>();
- float r = on->get_parameter(Light::PARAM_RADIUS);
- float w = r*Math::sin(Math::deg2rad(on->get_parameter(Light::PARAM_SPOT_ANGLE)));
- float d = r*Math::cos(Math::deg2rad(on->get_parameter(Light::PARAM_SPOT_ANGLE)));
+ float r = on->get_param(Light::PARAM_RANGE);
+ float w = r*Math::sin(Math::deg2rad(on->get_param(Light::PARAM_SPOT_ANGLE)));
+ float d = r*Math::cos(Math::deg2rad(on->get_param(Light::PARAM_SPOT_ANGLE)));
@@ -1423,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;
@@ -1541,7 +1543,7 @@ void RayCastSpatialGizmo::redraw() {
}
-RayCastSpatialGizmo::RayCastSpatialGizmo(RayCast* p_raycast){
+RayCastSpatialGizmo::RayCastSpatialGizmo(RayCast* p_raycast) {
set_spatial_node(p_raycast);
raycast=p_raycast;
@@ -2054,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) {
@@ -2237,6 +2239,321 @@ VisibilityNotifierGizmo::VisibilityNotifierGizmo(VisibilityNotifier* p_notifier)
////////
+///
+
+
+String ReflectionProbeGizmo::get_handle_name(int p_idx) const {
+
+ switch(p_idx) {
+ case 0: return "Extents X";
+ case 1: return "Extents Y";
+ case 2: return "Extents Z";
+ case 3: return "Origin X";
+ case 4: return "Origin Y";
+ case 5: return "Origin Z";
+ }
+
+ return "";
+}
+Variant ReflectionProbeGizmo::get_handle_value(int p_idx) const{
+
+ return AABB(probe->get_extents(),probe->get_origin_offset());
+}
+void ReflectionProbeGizmo::set_handle(int p_idx,Camera *p_camera, const Point2& p_point){
+
+ Transform gt = probe->get_global_transform();
+ //gt.orthonormalize();
+ Transform gi = gt.affine_inverse();
+
+
+ if (p_idx<3) {
+ Vector3 extents = probe->get_extents();
+
+ Vector3 ray_from = p_camera->project_ray_origin(p_point);
+ Vector3 ray_dir = p_camera->project_ray_normal(p_point);
+
+ Vector3 sg[2]={gi.xform(ray_from),gi.xform(ray_from+ray_dir*16384)};
+
+ Vector3 axis;
+ axis[p_idx]=1.0;
+
+ Vector3 ra,rb;
+ Geometry::get_closest_points_between_segments(Vector3(),axis*16384,sg[0],sg[1],ra,rb);
+ float d = ra[p_idx];
+ if (d<0.001)
+ d=0.001;
+
+ extents[p_idx]=d;
+ probe->set_extents(extents);
+ } else {
+
+ p_idx-=3;
+
+ Vector3 origin = probe->get_origin_offset();
+ origin[p_idx]=0;
+
+ Vector3 ray_from = p_camera->project_ray_origin(p_point);
+ Vector3 ray_dir = p_camera->project_ray_normal(p_point);
+
+ Vector3 sg[2]={gi.xform(ray_from),gi.xform(ray_from+ray_dir*16384)};
+
+ Vector3 axis;
+ axis[p_idx]=1.0;
+
+ Vector3 ra,rb;
+ Geometry::get_closest_points_between_segments(origin-axis*16384,origin+axis*16384,sg[0],sg[1],ra,rb);
+ float d = ra[p_idx];
+ d+=0.25;
+
+ origin[p_idx]=d;
+ probe->set_origin_offset(origin);
+
+ }
+}
+
+void ReflectionProbeGizmo::commit_handle(int p_idx,const Variant& p_restore,bool p_cancel){
+
+ AABB restore = p_restore;
+
+ if (p_cancel) {
+ probe->set_extents(restore.pos);
+ probe->set_origin_offset(restore.size);
+ return;
+ }
+
+ UndoRedo *ur = SpatialEditor::get_singleton()->get_undo_redo();
+ ur->create_action(TTR("Change Probe Extents"));
+ ur->add_do_method(probe,"set_extents",probe->get_extents());
+ ur->add_do_method(probe,"set_origin_offset",probe->get_origin_offset());
+ ur->add_undo_method(probe,"set_extents",restore.pos);
+ ur->add_undo_method(probe,"set_origin_offset",restore.size);
+ ur->commit_action();
+
+}
+
+void ReflectionProbeGizmo::redraw(){
+
+ clear();
+
+ Vector<Vector3> lines;
+ Vector<Vector3> internal_lines;
+ Vector3 extents = probe->get_extents();
+
+ AABB aabb;
+ aabb.pos=-extents;
+ aabb.size=extents*2;
+
+ for(int i=0;i<12;i++) {
+ Vector3 a,b;
+ aabb.get_edge(i,a,b);
+ lines.push_back(a);
+ lines.push_back(b);
+ }
+
+ for(int i=0;i<8;i++) {
+ Vector3 ep = aabb.get_endpoint(i);
+ internal_lines.push_back(probe->get_origin_offset());
+ internal_lines.push_back(ep);
+
+
+ }
+
+ Vector<Vector3> handles;
+
+
+ for(int i=0;i<3;i++) {
+
+ Vector3 ax;
+ ax[i]=aabb.pos[i]+aabb.size[i];
+ handles.push_back(ax);
+ }
+
+ for(int i=0;i<3;i++) {
+
+
+ Vector3 orig_handle=probe->get_origin_offset();
+ orig_handle[i]-=0.25;
+ lines.push_back(orig_handle);
+ handles.push_back(orig_handle);
+
+ orig_handle[i]+=0.5;
+ lines.push_back(orig_handle);
+ }
+
+ add_lines(lines,SpatialEditorGizmos::singleton->reflection_probe_material);
+ add_lines(internal_lines,SpatialEditorGizmos::singleton->reflection_probe_material_internal);
+ //add_unscaled_billboard(SpatialEditorGizmos::singleton->visi,0.05);
+ add_collision_segments(lines);
+ add_handles(handles);
+
+}
+ReflectionProbeGizmo::ReflectionProbeGizmo(ReflectionProbe* p_probe){
+
+ probe=p_probe;
+ set_spatial_node(p_probe);
+}
+
+////////
+
+
+
+///
+
+
+String GIProbeGizmo::get_handle_name(int p_idx) const {
+
+ switch(p_idx) {
+ case 0: return "Extents X";
+ case 1: return "Extents Y";
+ case 2: return "Extents Z";
+ }
+
+ return "";
+}
+Variant GIProbeGizmo::get_handle_value(int p_idx) const{
+
+ return probe->get_extents();
+}
+void GIProbeGizmo::set_handle(int p_idx,Camera *p_camera, const Point2& p_point){
+
+ Transform gt = probe->get_global_transform();
+ //gt.orthonormalize();
+ Transform gi = gt.affine_inverse();
+
+
+ Vector3 extents = probe->get_extents();
+
+ Vector3 ray_from = p_camera->project_ray_origin(p_point);
+ Vector3 ray_dir = p_camera->project_ray_normal(p_point);
+
+ Vector3 sg[2]={gi.xform(ray_from),gi.xform(ray_from+ray_dir*16384)};
+
+ Vector3 axis;
+ axis[p_idx]=1.0;
+
+ Vector3 ra,rb;
+ Geometry::get_closest_points_between_segments(Vector3(),axis*16384,sg[0],sg[1],ra,rb);
+ float d = ra[p_idx];
+ if (d<0.001)
+ d=0.001;
+
+ extents[p_idx]=d;
+ probe->set_extents(extents);
+
+}
+
+void GIProbeGizmo::commit_handle(int p_idx,const Variant& p_restore,bool p_cancel){
+
+ Vector3 restore = p_restore;
+
+ if (p_cancel) {
+ probe->set_extents(restore);
+ return;
+ }
+
+ UndoRedo *ur = SpatialEditor::get_singleton()->get_undo_redo();
+ ur->create_action(TTR("Change Probe Extents"));
+ ur->add_do_method(probe,"set_extents",probe->get_extents());
+ ur->add_undo_method(probe,"set_extents",restore);
+ ur->commit_action();
+
+}
+
+void GIProbeGizmo::redraw(){
+
+ clear();
+
+ Vector<Vector3> lines;
+ Vector3 extents = probe->get_extents();
+
+ static const int subdivs[GIProbe::SUBDIV_MAX]={64,128,256,512};
+
+ AABB aabb = AABB(-extents,extents*2);
+ int subdiv = subdivs[probe->get_subdiv()];
+ float cell_size = aabb.get_longest_axis_size()/subdiv;
+
+
+ for(int i=0;i<12;i++) {
+ Vector3 a,b;
+ aabb.get_edge(i,a,b);
+ lines.push_back(a);
+ lines.push_back(b);
+ }
+
+ add_lines(lines,SpatialEditorGizmos::singleton->gi_probe_material);
+ add_collision_segments(lines);
+
+ lines.clear();
+
+ for(int i=1;i<subdiv;i++) {
+
+ for(int j=0;j<3;j++) {
+
+
+
+ if (cell_size*i>aabb.size[j]) {
+ continue;
+ }
+
+ Vector2 dir;
+ dir[j]=1.0;
+ Vector2 ta,tb;
+ int j_n1=(j+1)%3;
+ int j_n2=(j+2)%3;
+ ta[j_n1]=1.0;
+ tb[j_n2]=1.0;
+
+
+ for(int k=0;k<4;k++) {
+
+ Vector3 from=aabb.pos,to=aabb.pos;
+ from[j]+= cell_size*i;
+ to[j]+=cell_size*i;
+
+ if (k&1) {
+ to[j_n1]+=aabb.size[j_n1];
+ } else {
+
+ to[j_n2]+=aabb.size[j_n2];
+ }
+
+ if (k&2) {
+ from[j_n1]+=aabb.size[j_n1];
+ from[j_n2]+=aabb.size[j_n2];
+ }
+
+ lines.push_back(from);
+ lines.push_back(to);
+ }
+
+ }
+
+ }
+
+ add_lines(lines,SpatialEditorGizmos::singleton->reflection_probe_material_internal);
+
+ Vector<Vector3> handles;
+
+
+ for(int i=0;i<3;i++) {
+
+ Vector3 ax;
+ ax[i]=aabb.pos[i]+aabb.size[i];
+ handles.push_back(ax);
+ }
+
+
+ add_handles(handles);
+
+}
+GIProbeGizmo::GIProbeGizmo(GIProbe* p_probe){
+
+ probe=p_probe;
+ set_spatial_node(p_probe);
+}
+
+////////
+
void NavigationMeshSpatialGizmo::redraw() {
@@ -2245,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);
@@ -2265,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;
@@ -2320,7 +2637,7 @@ void NavigationMeshSpatialGizmo::redraw() {
Array a;
a.resize(Mesh::ARRAY_MAX);
a[0]=tmeshfaces;
- m->add_surface(Mesh::PRIMITIVE_TRIANGLES,a);
+ m->add_surface_from_arrays(Mesh::PRIMITIVE_TRIANGLES,a);
m->surface_set_material(0,navmesh->is_enabled()?SpatialEditorGizmos::singleton->navmesh_solid_material:SpatialEditorGizmos::singleton->navmesh_solid_material_disabled);
add_mesh(m);
add_collision_segments(lines);
@@ -2928,6 +3245,17 @@ Ref<SpatialEditorGizmo> SpatialEditorGizmos::get_gizmo(Spatial *p_spatial) {
return misg;
}
+ if (p_spatial->cast_to<ReflectionProbe>()) {
+
+ Ref<ReflectionProbeGizmo> misg = memnew( ReflectionProbeGizmo(p_spatial->cast_to<ReflectionProbe>()) );
+ return misg;
+ }
+ if (p_spatial->cast_to<GIProbe>()) {
+
+ Ref<GIProbeGizmo> misg = memnew( GIProbeGizmo(p_spatial->cast_to<GIProbe>()) );
+ return misg;
+ }
+
if (p_spatial->cast_to<VehicleWheel>()) {
Ref<VehicleWheelSpatialGizmo> misg = memnew( VehicleWheelSpatialGizmo(p_spatial->cast_to<VehicleWheel>()) );
@@ -2974,25 +3302,26 @@ Ref<SpatialEditorGizmo> SpatialEditorGizmos::get_gizmo(Spatial *p_spatial) {
}
-Ref<FixedMaterial> SpatialEditorGizmos::create_line_material(const Color& p_base_color) {
+Ref<FixedSpatialMaterial> SpatialEditorGizmos::create_line_material(const Color& p_base_color) {
- Ref<FixedMaterial> line_material = Ref<FixedMaterial>( memnew( FixedMaterial ));
- line_material->set_flag(Material::FLAG_UNSHADED, true);
+ Ref<FixedSpatialMaterial> line_material = Ref<FixedSpatialMaterial>( memnew( FixedSpatialMaterial ));
+ line_material->set_flag(FixedSpatialMaterial::FLAG_UNSHADED, true);
line_material->set_line_width(3.0);
- line_material->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA, true);
- line_material->set_fixed_flag(FixedMaterial::FLAG_USE_COLOR_ARRAY, true);
- line_material->set_parameter(FixedMaterial::PARAM_DIFFUSE,p_base_color);
+ line_material->set_feature(FixedSpatialMaterial::FEATURE_TRANSPARENT, true);
+ //line_material->set_flag(FixedSpatialMaterial::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
+ //->set_flag(FixedSpatialMaterial::FLAG_SRGB_VERTEX_COLOR, true);
+ line_material->set_albedo(p_base_color);
return line_material;
}
-Ref<FixedMaterial> SpatialEditorGizmos::create_solid_material(const Color& p_base_color) {
+Ref<FixedSpatialMaterial> SpatialEditorGizmos::create_solid_material(const Color& p_base_color) {
- Ref<FixedMaterial> line_material = Ref<FixedMaterial>( memnew( FixedMaterial ));
- line_material->set_flag(Material::FLAG_UNSHADED, true);
- line_material->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA, true);
- line_material->set_parameter(FixedMaterial::PARAM_DIFFUSE,p_base_color);
+ Ref<FixedSpatialMaterial> line_material = Ref<FixedSpatialMaterial>( memnew( FixedSpatialMaterial ));
+ line_material->set_flag(FixedSpatialMaterial::FLAG_UNSHADED, true);
+ line_material->set_feature(FixedSpatialMaterial::FEATURE_TRANSPARENT, true);
+ line_material->set_albedo(p_base_color);
return line_material;
@@ -3002,65 +3331,68 @@ SpatialEditorGizmos::SpatialEditorGizmos() {
singleton=this;
- handle_material = Ref<FixedMaterial>( memnew( FixedMaterial ));
- handle_material->set_flag(Material::FLAG_UNSHADED, true);
- handle_material->set_parameter(FixedMaterial::PARAM_DIFFUSE,Color(0.8,0.8,0.8));
+ handle_material = Ref<FixedSpatialMaterial>( memnew( FixedSpatialMaterial ));
+ handle_material->set_flag(FixedSpatialMaterial::FLAG_UNSHADED, true);
+ handle_material->set_albedo(Color(0.8,0.8,0.8));
- handle2_material = Ref<FixedMaterial>( memnew( FixedMaterial ));
- handle2_material->set_flag(Material::FLAG_UNSHADED, true);
- handle2_material->set_fixed_flag(FixedMaterial::FLAG_USE_POINT_SIZE, true);
+ handle2_material = Ref<FixedSpatialMaterial>( memnew( FixedSpatialMaterial ));
+ handle2_material->set_flag(FixedSpatialMaterial::FLAG_UNSHADED, true);
+ handle2_material->set_flag(FixedSpatialMaterial::FLAG_USE_POINT_SIZE, true);
handle_t = SpatialEditor::get_singleton()->get_icon("Editor3DHandle","EditorIcons");
handle2_material->set_point_size(handle_t->get_width());
- handle2_material->set_texture(FixedMaterial::PARAM_DIFFUSE,handle_t);
- handle2_material->set_parameter(FixedMaterial::PARAM_DIFFUSE,Color(1,1,1));
- handle2_material->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA, true);
- handle2_material->set_fixed_flag(FixedMaterial::FLAG_USE_COLOR_ARRAY, true);
+ handle2_material->set_texture(FixedSpatialMaterial::TEXTURE_ALBEDO,handle_t);
+ handle2_material->set_albedo(Color(1,1,1));
+ handle2_material->set_feature(FixedSpatialMaterial::FEATURE_TRANSPARENT, true);
+ handle2_material->set_flag(FixedSpatialMaterial::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
+ handle2_material->set_flag(FixedSpatialMaterial::FLAG_SRGB_VERTEX_COLOR, true);
light_material = create_line_material(Color(1,1,0.2));
- light_material_omni_icon = Ref<FixedMaterial>( memnew( FixedMaterial ));
- light_material_omni_icon->set_flag(Material::FLAG_UNSHADED, true);
- light_material_omni_icon->set_flag(Material::FLAG_DOUBLE_SIDED, true);
- light_material_omni_icon->set_depth_draw_mode(Material::DEPTH_DRAW_NEVER);
- light_material_omni_icon->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA, true);
- light_material_omni_icon->set_parameter(FixedMaterial::PARAM_DIFFUSE,Color(1,1,1,0.9));
- light_material_omni_icon->set_texture(FixedMaterial::PARAM_DIFFUSE,SpatialEditor::get_singleton()->get_icon("GizmoLight","EditorIcons"));
+ light_material_omni_icon = Ref<FixedSpatialMaterial>( memnew( FixedSpatialMaterial ));
+ light_material_omni_icon->set_flag(FixedSpatialMaterial::FLAG_UNSHADED, true);
+ light_material_omni_icon->set_cull_mode(FixedSpatialMaterial::CULL_DISABLED);
+ light_material_omni_icon->set_depth_draw_mode(FixedSpatialMaterial::DEPTH_DRAW_DISABLED);
+ light_material_omni_icon->set_feature(FixedSpatialMaterial::FEATURE_TRANSPARENT, true);
+ light_material_omni_icon->set_albedo(Color(1,1,1,0.9));
+ light_material_omni_icon->set_texture(FixedSpatialMaterial::TEXTURE_ALBEDO,SpatialEditor::get_singleton()->get_icon("GizmoLight","EditorIcons"));
- light_material_directional_icon = Ref<FixedMaterial>( memnew( FixedMaterial ));
- light_material_directional_icon->set_flag(Material::FLAG_UNSHADED, true);
- light_material_directional_icon->set_flag(Material::FLAG_DOUBLE_SIDED, true);
- light_material_directional_icon->set_depth_draw_mode(Material::DEPTH_DRAW_NEVER);
- light_material_directional_icon->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA, true);
- light_material_directional_icon->set_parameter(FixedMaterial::PARAM_DIFFUSE,Color(1,1,1,0.9));
- light_material_directional_icon->set_texture(FixedMaterial::PARAM_DIFFUSE,SpatialEditor::get_singleton()->get_icon("GizmoDirectionalLight","EditorIcons"));
+ light_material_directional_icon = Ref<FixedSpatialMaterial>( memnew( FixedSpatialMaterial ));
+ light_material_directional_icon->set_flag(FixedSpatialMaterial::FLAG_UNSHADED, true);
+ light_material_directional_icon->set_cull_mode(FixedSpatialMaterial::CULL_DISABLED);
+ light_material_directional_icon->set_depth_draw_mode(FixedSpatialMaterial::DEPTH_DRAW_DISABLED);
+ light_material_directional_icon->set_feature(FixedSpatialMaterial::FEATURE_TRANSPARENT, true);
+ light_material_directional_icon->set_albedo(Color(1,1,1,0.9));
+ light_material_directional_icon->set_texture(FixedSpatialMaterial::TEXTURE_ALBEDO,SpatialEditor::get_singleton()->get_icon("GizmoDirectionalLight","EditorIcons"));
camera_material = create_line_material(Color(1.0,0.5,1.0));
navmesh_edge_material = create_line_material(Color(0.1,0.8,1.0));
navmesh_solid_material = create_solid_material(Color(0.1,0.8,1.0,0.4));
- navmesh_edge_material->set_fixed_flag(FixedMaterial::FLAG_USE_COLOR_ARRAY, false);
- navmesh_solid_material->set_flag(Material::FLAG_DOUBLE_SIDED,true);
+ navmesh_edge_material->set_flag(FixedSpatialMaterial::FLAG_ALBEDO_FROM_VERTEX_COLOR, false);
+ navmesh_edge_material->set_flag(FixedSpatialMaterial::FLAG_SRGB_VERTEX_COLOR, false);
+ navmesh_solid_material->set_cull_mode(FixedSpatialMaterial::CULL_DISABLED);
navmesh_edge_material_disabled = create_line_material(Color(1.0,0.8,0.1));
navmesh_solid_material_disabled = create_solid_material(Color(1.0,0.8,0.1,0.4));
- navmesh_edge_material_disabled->set_fixed_flag(FixedMaterial::FLAG_USE_COLOR_ARRAY, false);
- navmesh_solid_material_disabled->set_flag(Material::FLAG_DOUBLE_SIDED,true);
+ navmesh_edge_material_disabled->set_flag(FixedSpatialMaterial::FLAG_ALBEDO_FROM_VERTEX_COLOR, false);
+ navmesh_edge_material_disabled->set_flag(FixedSpatialMaterial::FLAG_SRGB_VERTEX_COLOR, false);
+ navmesh_solid_material_disabled->set_cull_mode(FixedSpatialMaterial::CULL_DISABLED);
skeleton_material = create_line_material(Color(0.6,1.0,0.3));
- skeleton_material->set_flag(Material::FLAG_DOUBLE_SIDED,true);
- skeleton_material->set_flag(Material::FLAG_UNSHADED,true);
- skeleton_material->set_flag(Material::FLAG_ONTOP,true);
- skeleton_material->set_depth_draw_mode(Material::DEPTH_DRAW_NEVER);
+ skeleton_material->set_cull_mode(FixedSpatialMaterial::CULL_DISABLED);
+ skeleton_material->set_flag(FixedSpatialMaterial::FLAG_UNSHADED,true);
+ skeleton_material->set_flag(FixedSpatialMaterial::FLAG_ONTOP,true);
+ skeleton_material->set_depth_draw_mode(FixedSpatialMaterial::DEPTH_DRAW_DISABLED);
//position 3D Shared mesh
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));
@@ -3075,85 +3407,91 @@ SpatialEditorGizmos::SpatialEditorGizmos() {
cursor_colors.push_back(Color(0.5,0.5,1,0.7));
cursor_colors.push_back(Color(0.5,0.5,1,0.7));
- Ref<FixedMaterial> mat = memnew( FixedMaterial );
- mat->set_flag(Material::FLAG_UNSHADED,true);
- mat->set_fixed_flag(FixedMaterial::FLAG_USE_COLOR_ARRAY,true);
- mat->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA,true);
+ Ref<FixedSpatialMaterial> mat = memnew( FixedSpatialMaterial );
+ mat->set_flag(FixedSpatialMaterial::FLAG_UNSHADED,true);
+ mat->set_flag(FixedSpatialMaterial::FLAG_ALBEDO_FROM_VERTEX_COLOR,true);
+ mat->set_flag(FixedSpatialMaterial::FLAG_SRGB_VERTEX_COLOR,true);
+ mat->set_feature(FixedSpatialMaterial::FEATURE_TRANSPARENT,true);
mat->set_line_width(3);
Array d;
d.resize(VS::ARRAY_MAX);
d[Mesh::ARRAY_VERTEX]=cursor_points;
d[Mesh::ARRAY_COLOR]=cursor_colors;
- pos3d_mesh->add_surface(Mesh::PRIMITIVE_LINES,d);
+ pos3d_mesh->add_surface_from_arrays(Mesh::PRIMITIVE_LINES,d);
pos3d_mesh->surface_set_material(0,mat);
}
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));
cursor_colors.push_back(Color(0.5, 0.5, 0.5, 0.7));
- Ref<FixedMaterial> mat = memnew(FixedMaterial);
- mat->set_flag(Material::FLAG_UNSHADED, true);
- mat->set_fixed_flag(FixedMaterial::FLAG_USE_COLOR_ARRAY, true);
- mat->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA, true);
+ Ref<FixedSpatialMaterial> mat = memnew(FixedSpatialMaterial);
+ mat->set_flag(FixedSpatialMaterial::FLAG_UNSHADED, true);
+ mat->set_flag(FixedSpatialMaterial::FLAG_ALBEDO_FROM_VERTEX_COLOR, true);
+ mat->set_flag(FixedSpatialMaterial::FLAG_SRGB_VERTEX_COLOR, true);
+ mat->set_feature(FixedSpatialMaterial::FEATURE_TRANSPARENT, true);
mat->set_line_width(3);
Array d;
d.resize(VS::ARRAY_MAX);
d[Mesh::ARRAY_VERTEX] = cursor_points;
d[Mesh::ARRAY_COLOR] = cursor_colors;
- listener_line_mesh->add_surface(Mesh::PRIMITIVE_LINES, d);
+ listener_line_mesh->add_surface_from_arrays(Mesh::PRIMITIVE_LINES, d);
listener_line_mesh->surface_set_material(0, mat);
}
- sample_player_icon = Ref<FixedMaterial>( memnew( FixedMaterial ));
- sample_player_icon->set_flag(Material::FLAG_UNSHADED, true);
- sample_player_icon->set_flag(Material::FLAG_DOUBLE_SIDED, true);
- sample_player_icon->set_depth_draw_mode(Material::DEPTH_DRAW_NEVER);
- sample_player_icon->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA, true);
- sample_player_icon->set_parameter(FixedMaterial::PARAM_DIFFUSE,Color(1,1,1,0.9));
- sample_player_icon->set_texture(FixedMaterial::PARAM_DIFFUSE,SpatialEditor::get_singleton()->get_icon("GizmoSpatialSamplePlayer","EditorIcons"));
+ sample_player_icon = Ref<FixedSpatialMaterial>( memnew( FixedSpatialMaterial ));
+ sample_player_icon->set_flag(FixedSpatialMaterial::FLAG_UNSHADED, true);
+ sample_player_icon->set_cull_mode(FixedSpatialMaterial::CULL_DISABLED);
+ sample_player_icon->set_depth_draw_mode(FixedSpatialMaterial::DEPTH_DRAW_DISABLED);
+ sample_player_icon->set_feature(FixedSpatialMaterial::FEATURE_TRANSPARENT, true);
+ sample_player_icon->set_albedo(Color(1,1,1,0.9));
+ sample_player_icon->set_texture(FixedSpatialMaterial::TEXTURE_ALBEDO,SpatialEditor::get_singleton()->get_icon("GizmoSpatialSamplePlayer","EditorIcons"));
room_material = create_line_material(Color(1.0,0.6,0.9));
portal_material = create_line_material(Color(1.0,0.8,0.6));
raycast_material = create_line_material(Color(1.0,0.8,0.6));
car_wheel_material = create_line_material(Color(0.6,0.8,1.0));
visibility_notifier_material = create_line_material(Color(1.0,0.5,1.0));
+ reflection_probe_material = create_line_material(Color(0.5,1.0,0.7));
+ reflection_probe_material_internal = create_line_material(Color(0.3,0.8,0.5,0.15));
+ gi_probe_material = create_line_material(Color(0.7,1.0,0.5));
+ gi_probe_material_internal = create_line_material(Color(0.5,0.8,0.3,0.4));
joint_material = create_line_material(Color(0.6,0.8,1.0));
- stream_player_icon = Ref<FixedMaterial>( memnew( FixedMaterial ));
- stream_player_icon->set_flag(Material::FLAG_UNSHADED, true);
- stream_player_icon->set_flag(Material::FLAG_DOUBLE_SIDED, true);
- stream_player_icon->set_depth_draw_mode(Material::DEPTH_DRAW_NEVER);
- stream_player_icon->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA, true);
- stream_player_icon->set_parameter(FixedMaterial::PARAM_DIFFUSE,Color(1,1,1,0.9));
- stream_player_icon->set_texture(FixedMaterial::PARAM_DIFFUSE,SpatialEditor::get_singleton()->get_icon("GizmoSpatialStreamPlayer","EditorIcons"));
-
- visibility_notifier_icon = Ref<FixedMaterial>( memnew( FixedMaterial ));
- visibility_notifier_icon->set_flag(Material::FLAG_UNSHADED, true);
- visibility_notifier_icon->set_flag(Material::FLAG_DOUBLE_SIDED, true);
- visibility_notifier_icon->set_depth_draw_mode(Material::DEPTH_DRAW_NEVER);
- visibility_notifier_icon->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA, true);
- visibility_notifier_icon->set_parameter(FixedMaterial::PARAM_DIFFUSE,Color(1,1,1,0.9));
- visibility_notifier_icon->set_texture(FixedMaterial::PARAM_DIFFUSE,SpatialEditor::get_singleton()->get_icon("Visible","EditorIcons"));
-
- listener_icon = Ref<FixedMaterial>(memnew(FixedMaterial));
- listener_icon->set_flag(Material::FLAG_UNSHADED, true);
- listener_icon->set_flag(Material::FLAG_DOUBLE_SIDED, true);
- listener_icon->set_depth_draw_mode(Material::DEPTH_DRAW_NEVER);
- listener_icon->set_fixed_flag(FixedMaterial::FLAG_USE_ALPHA, true);
- listener_icon->set_parameter(FixedMaterial::PARAM_DIFFUSE, Color(1, 1, 1, 0.9));
- listener_icon->set_texture(FixedMaterial::PARAM_DIFFUSE, SpatialEditor::get_singleton()->get_icon("GizmoListener", "EditorIcons"));
+ stream_player_icon = Ref<FixedSpatialMaterial>( memnew( FixedSpatialMaterial ));
+ stream_player_icon->set_flag(FixedSpatialMaterial::FLAG_UNSHADED, true);
+ stream_player_icon->set_cull_mode(FixedSpatialMaterial::CULL_DISABLED);
+ stream_player_icon->set_depth_draw_mode(FixedSpatialMaterial::DEPTH_DRAW_DISABLED);
+ stream_player_icon->set_feature(FixedSpatialMaterial::FEATURE_TRANSPARENT, true);
+ stream_player_icon->set_albedo(Color(1,1,1,0.9));
+ stream_player_icon->set_texture(FixedSpatialMaterial::TEXTURE_ALBEDO,SpatialEditor::get_singleton()->get_icon("GizmoSpatialStreamPlayer","EditorIcons"));
+
+ visibility_notifier_icon = Ref<FixedSpatialMaterial>( memnew( FixedSpatialMaterial ));
+ visibility_notifier_icon->set_flag(FixedSpatialMaterial::FLAG_UNSHADED, true);
+ visibility_notifier_icon->set_cull_mode(FixedSpatialMaterial::CULL_DISABLED);
+ visibility_notifier_icon->set_depth_draw_mode(FixedSpatialMaterial::DEPTH_DRAW_DISABLED);
+ visibility_notifier_icon->set_feature(FixedSpatialMaterial::FEATURE_TRANSPARENT, true);
+ visibility_notifier_icon->set_albedo(Color(1,1,1,0.9));
+ visibility_notifier_icon->set_texture(FixedSpatialMaterial::TEXTURE_ALBEDO,SpatialEditor::get_singleton()->get_icon("Visible","EditorIcons"));
+
+ listener_icon = Ref<FixedSpatialMaterial>(memnew(FixedSpatialMaterial));
+ listener_icon->set_flag(FixedSpatialMaterial::FLAG_UNSHADED, true);
+ listener_icon->set_cull_mode(FixedSpatialMaterial::CULL_DISABLED);
+ listener_icon->set_depth_draw_mode(FixedSpatialMaterial::DEPTH_DRAW_DISABLED);
+ listener_icon->set_feature(FixedSpatialMaterial::FEATURE_TRANSPARENT, true);
+ listener_icon->set_albedo( Color(1, 1, 1, 0.9));
+ listener_icon->set_texture(FixedSpatialMaterial::TEXTURE_ALBEDO, SpatialEditor::get_singleton()->get_icon("GizmoListener", "EditorIcons"));
{
- DVector<Vector3> vertices;
+ PoolVector<Vector3> vertices;
#undef ADD_VTX
#define ADD_VTX(m_idx);\
@@ -3198,3 +3536,4 @@ SpatialEditorGizmos::SpatialEditorGizmos() {
}
+
diff --git a/tools/editor/spatial_editor_gizmos.h b/tools/editor/spatial_editor_gizmos.h
index 3d7272f522..8fde52b05a 100644
--- a/tools/editor/spatial_editor_gizmos.h
+++ b/tools/editor/spatial_editor_gizmos.h
@@ -5,7 +5,7 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2016 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -45,6 +45,8 @@
#include "scene/3d/portal.h"
#include "scene/3d/ray_cast.h"
#include "scene/3d/navigation_mesh.h"
+#include "scene/3d/reflection_probe.h"
+#include "scene/3d/gi_probe.h"
#include "scene/3d/vehicle_body.h"
#include "scene/3d/collision_polygon.h"
@@ -55,7 +57,7 @@ class Camera;
class EditorSpatialGizmo : public SpatialEditorGizmo {
- OBJ_TYPE(EditorSpatialGizmo,SpatialGizmo);
+ GDCLASS(EditorSpatialGizmo,SpatialGizmo);
struct Instance{
@@ -127,7 +129,7 @@ public:
class LightSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(LightSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(LightSpatialGizmo,EditorSpatialGizmo);
Light* light;
@@ -146,7 +148,7 @@ public:
class ListenerSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(ListenerSpatialGizmo, EditorSpatialGizmo);
+ GDCLASS(ListenerSpatialGizmo, EditorSpatialGizmo);
Listener* listener;
@@ -159,7 +161,7 @@ public:
class CameraSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(CameraSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(CameraSpatialGizmo,EditorSpatialGizmo);
Camera* camera;
@@ -180,7 +182,7 @@ public:
class MeshInstanceSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(MeshInstanceSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(MeshInstanceSpatialGizmo,EditorSpatialGizmo);
MeshInstance* mesh;
@@ -193,7 +195,7 @@ public:
class Position3DSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(Position3DSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(Position3DSpatialGizmo,EditorSpatialGizmo);
Position3D* p3d;
@@ -206,7 +208,7 @@ public:
class SkeletonSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(SkeletonSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(SkeletonSpatialGizmo,EditorSpatialGizmo);
Skeleton* skel;
@@ -222,7 +224,7 @@ public:
class SpatialPlayerSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(SpatialPlayerSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(SpatialPlayerSpatialGizmo,EditorSpatialGizmo);
SpatialPlayer* splayer;
@@ -237,7 +239,7 @@ public:
class TestCubeSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(TestCubeSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(TestCubeSpatialGizmo,EditorSpatialGizmo);
TestCube* tc;
@@ -250,7 +252,7 @@ public:
class RoomSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(RoomSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(RoomSpatialGizmo,EditorSpatialGizmo);
struct _EdgeKey {
@@ -275,7 +277,7 @@ public:
class PortalSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(PortalSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(PortalSpatialGizmo,EditorSpatialGizmo);
Portal* portal;
@@ -289,7 +291,7 @@ public:
class VisibilityNotifierGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(VisibilityNotifierGizmo ,EditorSpatialGizmo);
+ GDCLASS(VisibilityNotifierGizmo ,EditorSpatialGizmo);
VisibilityNotifier* notifier;
@@ -307,10 +309,48 @@ public:
};
+class ReflectionProbeGizmo : public EditorSpatialGizmo {
+
+ GDCLASS(ReflectionProbeGizmo ,EditorSpatialGizmo);
+
+
+ ReflectionProbe* probe;
+
+public:
+
+ virtual String get_handle_name(int p_idx) const;
+ virtual Variant get_handle_value(int p_idx) const;
+ virtual void set_handle(int p_idx,Camera *p_camera, const Point2& p_point);
+ virtual void commit_handle(int p_idx,const Variant& p_restore,bool p_cancel=false);
+
+ void redraw();
+ ReflectionProbeGizmo(ReflectionProbe* p_notifier=NULL);
+
+};
+
+class GIProbeGizmo : public EditorSpatialGizmo {
+
+ GDCLASS(GIProbeGizmo ,EditorSpatialGizmo);
+
+
+ GIProbe* probe;
+
+public:
+
+ virtual String get_handle_name(int p_idx) const;
+ virtual Variant get_handle_value(int p_idx) const;
+ virtual void set_handle(int p_idx,Camera *p_camera, const Point2& p_point);
+ virtual void commit_handle(int p_idx,const Variant& p_restore,bool p_cancel=false);
+
+ void redraw();
+ GIProbeGizmo(GIProbe* p_notifier=NULL);
+
+};
+
class CollisionShapeSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(CollisionShapeSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(CollisionShapeSpatialGizmo,EditorSpatialGizmo);
CollisionShape* cs;
@@ -327,7 +367,7 @@ public:
class CollisionPolygonSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(CollisionPolygonSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(CollisionPolygonSpatialGizmo,EditorSpatialGizmo);
CollisionPolygon* polygon;
@@ -339,9 +379,10 @@ public:
};
+
class RayCastSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(RayCastSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(RayCastSpatialGizmo,EditorSpatialGizmo);
RayCast* raycast;
@@ -356,7 +397,7 @@ public:
class VehicleWheelSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(VehicleWheelSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(VehicleWheelSpatialGizmo,EditorSpatialGizmo);
VehicleWheel* car_wheel;
@@ -370,7 +411,7 @@ public:
class NavigationMeshSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(NavigationMeshSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(NavigationMeshSpatialGizmo,EditorSpatialGizmo);
struct _EdgeKey {
@@ -395,7 +436,7 @@ public:
class PinJointSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(PinJointSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(PinJointSpatialGizmo,EditorSpatialGizmo);
PinJoint* p3d;
@@ -409,7 +450,7 @@ public:
class HingeJointSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(HingeJointSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(HingeJointSpatialGizmo,EditorSpatialGizmo);
HingeJoint* p3d;
@@ -422,7 +463,7 @@ public:
class SliderJointSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(SliderJointSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(SliderJointSpatialGizmo,EditorSpatialGizmo);
SliderJoint* p3d;
@@ -435,7 +476,7 @@ public:
class ConeTwistJointSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(ConeTwistJointSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(ConeTwistJointSpatialGizmo,EditorSpatialGizmo);
ConeTwistJoint* p3d;
@@ -449,7 +490,7 @@ public:
class Generic6DOFJointSpatialGizmo : public EditorSpatialGizmo {
- OBJ_TYPE(Generic6DOFJointSpatialGizmo,EditorSpatialGizmo);
+ GDCLASS(Generic6DOFJointSpatialGizmo,EditorSpatialGizmo);
Generic6DOFJoint* p3d;
@@ -464,34 +505,38 @@ public:
class SpatialEditorGizmos {
public:
- Ref<FixedMaterial> create_line_material(const Color& p_base_color);
- Ref<FixedMaterial> create_solid_material(const Color& p_base_color);
- Ref<FixedMaterial> handle2_material;
- Ref<FixedMaterial> handle_material;
- Ref<FixedMaterial> light_material;
- Ref<FixedMaterial> light_material_omni_icon;
- Ref<FixedMaterial> light_material_directional_icon;
- Ref<FixedMaterial> camera_material;
- Ref<FixedMaterial> skeleton_material;
- Ref<FixedMaterial> room_material;
- Ref<FixedMaterial> portal_material;
- Ref<FixedMaterial> raycast_material;
- Ref<FixedMaterial> visibility_notifier_material;
- Ref<FixedMaterial> car_wheel_material;
- Ref<FixedMaterial> joint_material;
-
- Ref<FixedMaterial> navmesh_edge_material;
- Ref<FixedMaterial> navmesh_solid_material;
- Ref<FixedMaterial> navmesh_edge_material_disabled;
- Ref<FixedMaterial> navmesh_solid_material_disabled;
-
- Ref<FixedMaterial> listener_icon;
-
- Ref<FixedMaterial> sample_player_icon;
- Ref<FixedMaterial> stream_player_icon;
- Ref<FixedMaterial> visibility_notifier_icon;
-
- Ref<FixedMaterial> shape_material;
+ Ref<FixedSpatialMaterial> create_line_material(const Color& p_base_color);
+ Ref<FixedSpatialMaterial> create_solid_material(const Color& p_base_color);
+ Ref<FixedSpatialMaterial> handle2_material;
+ Ref<FixedSpatialMaterial> handle_material;
+ Ref<FixedSpatialMaterial> light_material;
+ Ref<FixedSpatialMaterial> light_material_omni_icon;
+ Ref<FixedSpatialMaterial> light_material_directional_icon;
+ Ref<FixedSpatialMaterial> camera_material;
+ Ref<FixedSpatialMaterial> skeleton_material;
+ Ref<FixedSpatialMaterial> reflection_probe_material;
+ Ref<FixedSpatialMaterial> reflection_probe_material_internal;
+ Ref<FixedSpatialMaterial> gi_probe_material;
+ Ref<FixedSpatialMaterial> gi_probe_material_internal;
+ Ref<FixedSpatialMaterial> room_material;
+ Ref<FixedSpatialMaterial> portal_material;
+ Ref<FixedSpatialMaterial> raycast_material;
+ Ref<FixedSpatialMaterial> visibility_notifier_material;
+ Ref<FixedSpatialMaterial> car_wheel_material;
+ Ref<FixedSpatialMaterial> joint_material;
+
+ Ref<FixedSpatialMaterial> navmesh_edge_material;
+ Ref<FixedSpatialMaterial> navmesh_solid_material;
+ Ref<FixedSpatialMaterial> navmesh_edge_material_disabled;
+ Ref<FixedSpatialMaterial> navmesh_solid_material_disabled;
+
+ Ref<FixedSpatialMaterial> listener_icon;
+
+ Ref<FixedSpatialMaterial> sample_player_icon;
+ Ref<FixedSpatialMaterial> stream_player_icon;
+ Ref<FixedSpatialMaterial> visibility_notifier_icon;
+
+ Ref<FixedSpatialMaterial> shape_material;
Ref<Texture> handle_t;
Ref<Mesh> pos3d_mesh;
@@ -505,5 +550,4 @@ public:
SpatialEditorGizmos();
};
-
#endif // SPATIAL_EDITOR_GIZMOS_H