diff options
Diffstat (limited to 'scene/3d/visual_instance.cpp')
-rw-r--r-- | scene/3d/visual_instance.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scene/3d/visual_instance.cpp b/scene/3d/visual_instance.cpp index 625da9b093..d6c46f9bf6 100644 --- a/scene/3d/visual_instance.cpp +++ b/scene/3d/visual_instance.cpp @@ -276,6 +276,18 @@ bool GeometryInstance::get_flag(Flags p_flag) const{ } +void GeometryInstance::set_baked_light_texture_id(int p_id) { + + baked_light_texture_id=p_id; + VS::get_singleton()->instance_geometry_set_baked_light_texture_index(get_instance(),baked_light_texture_id); + +} + +int GeometryInstance::get_baked_light_texture_id() const{ + + return baked_light_texture_id; +} + void GeometryInstance::_bind_methods() { @@ -291,6 +303,9 @@ void GeometryInstance::_bind_methods() { ObjectTypeDB::bind_method(_MD("set_draw_range_end","mode"), &GeometryInstance::set_draw_range_end); ObjectTypeDB::bind_method(_MD("get_draw_range_end"), &GeometryInstance::get_draw_range_end); + ObjectTypeDB::bind_method(_MD("set_baked_light_texture_id","id"), &GeometryInstance::set_baked_light_texture_id); + ObjectTypeDB::bind_method(_MD("get_baked_light_texture_id"), &GeometryInstance::get_baked_light_texture_id); + ObjectTypeDB::bind_method(_MD("_baked_light_changed"), &GeometryInstance::_baked_light_changed); ADD_PROPERTYI( PropertyInfo( Variant::BOOL, "geometry/visible"), _SCS("set_flag"), _SCS("get_flag"),FLAG_VISIBLE); @@ -304,6 +319,7 @@ void GeometryInstance::_bind_methods() { ADD_PROPERTYI( PropertyInfo( Variant::BOOL, "geometry/depth_scale"), _SCS("set_flag"), _SCS("get_flag"),FLAG_DEPH_SCALE); ADD_PROPERTYI( PropertyInfo( Variant::BOOL, "geometry/visible_in_all_rooms"), _SCS("set_flag"), _SCS("get_flag"),FLAG_VISIBLE_IN_ALL_ROOMS); ADD_PROPERTYI( PropertyInfo( Variant::BOOL, "geometry/use_baked_light"), _SCS("set_flag"), _SCS("get_flag"),FLAG_USE_BAKED_LIGHT); + ADD_PROPERTY( PropertyInfo( Variant::INT, "geometry/baked_light_tex_id"), _SCS("set_baked_light_texture_id"), _SCS("get_baked_light_texture_id")); ADD_SIGNAL( MethodInfo("visibility_changed")); @@ -329,6 +345,7 @@ GeometryInstance::GeometryInstance() { flags[FLAG_DEPH_SCALE]=false; flags[FLAG_VISIBLE_IN_ALL_ROOMS]=false; baked_light_instance=NULL; + baked_light_texture_id=0; } |