mirror of
https://github.com/tiennm99/godot.git
synced 2026-08-05 18:24:32 +00:00
-Much improvement to baked light baker
-Fixed many bugs in stretch mode -Fixes to camera project and unproject as consequence of the above -added setget to script (documented in script doc) -more fixes to collada exporter for blender
This commit is contained in:
@@ -50,17 +50,24 @@ void VisualInstance::_notification(int p_what) {
|
||||
// CHECK ROOM
|
||||
Spatial * parent = get_parent_spatial();
|
||||
Room *room=NULL;
|
||||
bool is_geom = cast_to<GeometryInstance>();
|
||||
|
||||
while(parent) {
|
||||
|
||||
room = parent->cast_to<Room>();
|
||||
if (room)
|
||||
break;
|
||||
else
|
||||
parent=parent->get_parent_spatial();
|
||||
|
||||
if (is_geom && parent->cast_to<BakedLightSampler>()) {
|
||||
VS::get_singleton()->instance_geometry_set_baked_light_sampler(get_instance(),parent->cast_to<BakedLightSampler>()->get_instance());
|
||||
break;
|
||||
}
|
||||
|
||||
parent=parent->get_parent_spatial();
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (room) {
|
||||
|
||||
VisualServer::get_singleton()->instance_set_room(instance,room->get_instance());
|
||||
@@ -85,6 +92,7 @@ void VisualInstance::_notification(int p_what) {
|
||||
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() );
|
||||
|
||||
|
||||
} break;
|
||||
|
||||
Reference in New Issue
Block a user