1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-07 12:30:27 +00:00

-Massive clean up to gizmos

-Make sure handles are always visible (on top)
-Fixed instanced scene selection (should work properly now)
-Added interpolated camera
-Customizable gizmo colors in editor settings
This commit is contained in:
Juan Linietsky
2017-08-26 00:40:45 -03:00
parent d9e94fa0c3
commit 1894157c9f
31 changed files with 498 additions and 1732 deletions

View File

@@ -29,7 +29,6 @@
/*************************************************************************/
#include "visual_instance.h"
#include "room_instance.h"
#include "scene/scene_string_names.h"
#include "servers/visual_server.h"
#include "skeleton.h"
@@ -54,29 +53,6 @@ void VisualInstance::_notification(int p_what) {
case NOTIFICATION_ENTER_WORLD: {
// CHECK ROOM
Spatial *parent = get_parent_spatial();
Room *room = NULL;
bool is_geom = Object::cast_to<GeometryInstance>(this);
/* while(parent) {
room = Object::cast_to<Room>(parent);
if (room)
break;
if (is_geom && Object::cast_to<BakedLightSampler>(parent)) {
VS::get_singleton()->instance_geometry_set_baked_light_sampler(get_instance(),Object::cast_to<BakedLightSampler>(parent)->get_instance());
break;
}
parent=parent->get_parent_spatial();
}*/
if (room) {
VisualServer::get_singleton()->instance_set_room(instance, room->get_instance());
}
// CHECK SKELETON => moving skeleton attaching logic to MeshInstance
/*
Skeleton *skeleton=Object::cast_to<Skeleton>(get_parent());
@@ -96,7 +72,6 @@ void VisualInstance::_notification(int p_what) {
case NOTIFICATION_EXIT_WORLD: {
VisualServer::get_singleton()->instance_set_scenario(instance, RID());
VisualServer::get_singleton()->instance_set_room(instance, RID());
VisualServer::get_singleton()->instance_attach_skeleton(instance, RID());
//VS::get_singleton()->instance_geometry_set_baked_light_sampler(instance, RID() );
@@ -303,7 +278,6 @@ void GeometryInstance::_bind_methods() {
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "material_override", PROPERTY_HINT_RESOURCE_TYPE, "ShaderMaterial,SpatialMaterial"), "set_material_override", "get_material_override");
ADD_PROPERTY(PropertyInfo(Variant::INT, "cast_shadow", PROPERTY_HINT_ENUM, "Off,On,Double-Sided,Shadows Only"), "set_cast_shadows_setting", "get_cast_shadows_setting");
ADD_PROPERTY(PropertyInfo(Variant::REAL, "extra_cull_margin", PROPERTY_HINT_RANGE, "0,16384,0"), "set_extra_cull_margin", "get_extra_cull_margin");
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "visible_in_all_rooms"), "set_flag", "get_flag", FLAG_VISIBLE_IN_ALL_ROOMS);
ADD_PROPERTYI(PropertyInfo(Variant::BOOL, "use_in_baked_light"), "set_flag", "get_flag", FLAG_USE_BAKED_LIGHT);
ADD_GROUP("LOD", "lod_");
@@ -314,7 +288,6 @@ void GeometryInstance::_bind_methods() {
//ADD_SIGNAL( MethodInfo("visibility_changed"));
BIND_CONSTANT(FLAG_VISIBLE_IN_ALL_ROOMS);
BIND_CONSTANT(FLAG_MAX);
BIND_CONSTANT(SHADOW_CASTING_SETTING_OFF);