diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2020-02-12 13:29:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-12 13:29:44 +0100 |
commit | 49eef1180b441d6778d1b03168226bee7c815f3d (patch) | |
tree | 65a290d7cd69a1ab14a913a7e9fe71c95b04ed83 /scene | |
parent | 70dd7f4e1ae890534692067797c42337c45d3daf (diff) | |
parent | 0e3d6257377d9f73520e5ccdb7677fde23be3398 (diff) |
Merge pull request #36135 from akien-mga/doc-update
doc: Sync classref with current source
Diffstat (limited to 'scene')
-rw-r--r-- | scene/3d/gi_probe.cpp | 5 | ||||
-rw-r--r-- | scene/resources/environment.cpp | 2 | ||||
-rw-r--r-- | scene/resources/material.cpp | 26 | ||||
-rw-r--r-- | scene/resources/mesh.cpp | 2 | ||||
-rw-r--r-- | scene/resources/texture.cpp | 9 |
5 files changed, 31 insertions, 13 deletions
diff --git a/scene/3d/gi_probe.cpp b/scene/3d/gi_probe.cpp index 1d86575b16..34540525af 100644 --- a/scene/3d/gi_probe.cpp +++ b/scene/3d/gi_probe.cpp @@ -226,8 +226,7 @@ void GIProbeData::_validate_property(PropertyInfo &property) const { } void GIProbeData::_bind_methods() { - - ClassDB::bind_method(D_METHOD("allocate", "to_cell_xform", "aabb", "octree_size", "octree_cells", "octree_data", "octree_level_count"), &GIProbeData::allocate); + ClassDB::bind_method(D_METHOD("allocate", "to_cell_xform", "aabb", "octree_size", "octree_cells", "data_cells", "distance_field", "level_counts"), &GIProbeData::allocate); ClassDB::bind_method(D_METHOD("get_bounds"), &GIProbeData::get_bounds); ClassDB::bind_method(D_METHOD("get_octree_size"), &GIProbeData::get_octree_size); @@ -269,7 +268,7 @@ void GIProbeData::_bind_methods() { ClassDB::bind_method(D_METHOD("_set_data", "data"), &GIProbeData::_set_data); ClassDB::bind_method(D_METHOD("_get_data"), &GIProbeData::_get_data); - ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_data", "_get_data"); + ADD_PROPERTY(PropertyInfo(Variant::DICTIONARY, "_data", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_data", "_get_data"); ADD_PROPERTY(PropertyInfo(Variant::INT, "dynamic_range", PROPERTY_HINT_RANGE, "0,8,0.01"), "set_dynamic_range", "get_dynamic_range"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "energy", PROPERTY_HINT_RANGE, "0,64,0.01"), "set_energy", "get_energy"); diff --git a/scene/resources/environment.cpp b/scene/resources/environment.cpp index d72036462e..285b11fefd 100644 --- a/scene/resources/environment.cpp +++ b/scene/resources/environment.cpp @@ -1107,11 +1107,11 @@ void Environment::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::REAL, "adjustment_saturation", PROPERTY_HINT_RANGE, "0.01,8,0.01"), "set_adjustment_saturation", "get_adjustment_saturation"); ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "adjustment_color_correction", PROPERTY_HINT_RESOURCE_TYPE, "Texture2D"), "set_adjustment_color_correction", "get_adjustment_color_correction"); - BIND_ENUM_CONSTANT(BG_KEEP); BIND_ENUM_CONSTANT(BG_CLEAR_COLOR); BIND_ENUM_CONSTANT(BG_COLOR); BIND_ENUM_CONSTANT(BG_SKY); BIND_ENUM_CONSTANT(BG_CANVAS); + BIND_ENUM_CONSTANT(BG_KEEP); BIND_ENUM_CONSTANT(BG_CAMERA_FEED); BIND_ENUM_CONSTANT(BG_MAX); diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp index c4e0161cc2..b8c396062a 100644 --- a/scene/resources/material.cpp +++ b/scene/resources/material.cpp @@ -2375,11 +2375,6 @@ void BaseMaterial3D::_bind_methods() { ADD_PROPERTY(PropertyInfo(Variant::REAL, "distance_fade_min_distance", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_distance_fade_min_distance", "get_distance_fade_min_distance"); ADD_PROPERTY(PropertyInfo(Variant::REAL, "distance_fade_max_distance", PROPERTY_HINT_RANGE, "0,4096,0.01"), "set_distance_fade_max_distance", "get_distance_fade_max_distance"); - BIND_ENUM_CONSTANT(TRANSPARENCY_DISABLED); - BIND_ENUM_CONSTANT(TRANSPARENCY_ALPHA); - BIND_ENUM_CONSTANT(TRANSPARENCY_ALPHA_SCISSOR); - BIND_ENUM_CONSTANT(TRANSPARENCY_ALPHA_DEPTH_PRE_PASS); - BIND_ENUM_CONSTANT(TEXTURE_ALBEDO); BIND_ENUM_CONSTANT(TEXTURE_METALLIC); BIND_ENUM_CONSTANT(TEXTURE_ROUGHNESS); @@ -2396,11 +2391,31 @@ void BaseMaterial3D::_bind_methods() { BIND_ENUM_CONSTANT(TEXTURE_DETAIL_MASK); BIND_ENUM_CONSTANT(TEXTURE_DETAIL_ALBEDO); BIND_ENUM_CONSTANT(TEXTURE_DETAIL_NORMAL); + BIND_ENUM_CONSTANT(TEXTURE_ORM); BIND_ENUM_CONSTANT(TEXTURE_MAX); + BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST); + BIND_ENUM_CONSTANT(TEXTURE_FILTER_LINEAR); + BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS); + BIND_ENUM_CONSTANT(TEXTURE_FILTER_LINEAR_WITH_MIPMAPS); + BIND_ENUM_CONSTANT(TEXTURE_FILTER_NEAREST_WITH_MIMPAMPS_ANISOTROPIC); + BIND_ENUM_CONSTANT(TEXTURE_FILTER_LINEAR_WITH_MIPMAPS_ANISOTROPIC); + BIND_ENUM_CONSTANT(TEXTURE_FILTER_MAX); + BIND_ENUM_CONSTANT(DETAIL_UV_1); BIND_ENUM_CONSTANT(DETAIL_UV_2); + BIND_ENUM_CONSTANT(TRANSPARENCY_DISABLED); + BIND_ENUM_CONSTANT(TRANSPARENCY_ALPHA); + BIND_ENUM_CONSTANT(TRANSPARENCY_ALPHA_SCISSOR); + BIND_ENUM_CONSTANT(TRANSPARENCY_ALPHA_DEPTH_PRE_PASS); + BIND_ENUM_CONSTANT(TRANSPARENCY_MAX); + + BIND_ENUM_CONSTANT(SHADING_MODE_UNSHADED); + BIND_ENUM_CONSTANT(SHADING_MODE_PER_PIXEL); + BIND_ENUM_CONSTANT(SHADING_MODE_PER_VERTEX); + BIND_ENUM_CONSTANT(SHADING_MODE_MAX); + BIND_ENUM_CONSTANT(FEATURE_EMISSION); BIND_ENUM_CONSTANT(FEATURE_NORMAL_MAPPING); BIND_ENUM_CONSTANT(FEATURE_RIM); @@ -2444,6 +2459,7 @@ void BaseMaterial3D::_bind_methods() { BIND_ENUM_CONSTANT(FLAG_DISABLE_AMBIENT_LIGHT); BIND_ENUM_CONSTANT(FLAG_USE_SHADOW_TO_OPACITY); BIND_ENUM_CONSTANT(FLAG_USE_TEXTURE_REPEAT); + BIND_ENUM_CONSTANT(FLAG_INVERT_HEIGHTMAP); BIND_ENUM_CONSTANT(FLAG_MAX); BIND_ENUM_CONSTANT(DIFFUSE_BURLEY); diff --git a/scene/resources/mesh.cpp b/scene/resources/mesh.cpp index 571415a045..6049d96fee 100644 --- a/scene/resources/mesh.cpp +++ b/scene/resources/mesh.cpp @@ -1589,7 +1589,7 @@ void ArrayMesh::_bind_methods() { ClassDB::bind_method(D_METHOD("_set_surfaces", "surfaces"), &ArrayMesh::_set_surfaces); ClassDB::bind_method(D_METHOD("_get_surfaces"), &ArrayMesh::_get_surfaces); - ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "_surfaces", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR), "_set_surfaces", "_get_surfaces"); + ADD_PROPERTY(PropertyInfo(Variant::ARRAY, "_surfaces", PROPERTY_HINT_NONE, "", PROPERTY_USAGE_NOEDITOR | PROPERTY_USAGE_INTERNAL), "_set_surfaces", "_get_surfaces"); ADD_PROPERTY(PropertyInfo(Variant::INT, "blend_shape_mode", PROPERTY_HINT_ENUM, "Normalized,Relative"), "set_blend_shape_mode", "get_blend_shape_mode"); ADD_PROPERTY(PropertyInfo(Variant::AABB, "custom_aabb", PROPERTY_HINT_NONE, ""), "set_custom_aabb", "get_custom_aabb"); diff --git a/scene/resources/texture.cpp b/scene/resources/texture.cpp index 20c3654c2f..4ddceed58e 100644 --- a/scene/resources/texture.cpp +++ b/scene/resources/texture.cpp @@ -46,18 +46,21 @@ Size2 Texture2D::get_size() const { bool Texture2D::is_pixel_opaque(int p_x, int p_y) const { return true; } + void Texture2D::draw(RID p_canvas_item, const Point2 &p_pos, const Color &p_modulate, bool p_transpose, const Ref<Texture2D> &p_normal_map, const Ref<Texture2D> &p_specular_map, const Color &p_specular_color_shininess, VS::CanvasItemTextureFilter p_texture_filter, VS::CanvasItemTextureRepeat p_texture_repeat) const { RID normal_rid = p_normal_map.is_valid() ? p_normal_map->get_rid() : RID(); RID specular_rid = p_specular_map.is_valid() ? p_specular_map->get_rid() : RID(); VisualServer::get_singleton()->canvas_item_add_texture_rect(p_canvas_item, Rect2(p_pos, get_size()), get_rid(), false, p_modulate, p_transpose, normal_rid, specular_rid, p_specular_color_shininess, p_texture_filter, p_texture_repeat); } + void Texture2D::draw_rect(RID p_canvas_item, const Rect2 &p_rect, bool p_tile, const Color &p_modulate, bool p_transpose, const Ref<Texture2D> &p_normal_map, const Ref<Texture2D> &p_specular_map, const Color &p_specular_color_shininess, VS::CanvasItemTextureFilter p_texture_filter, VS::CanvasItemTextureRepeat p_texture_repeat) const { RID normal_rid = p_normal_map.is_valid() ? p_normal_map->get_rid() : RID(); RID specular_rid = p_specular_map.is_valid() ? p_specular_map->get_rid() : RID(); VisualServer::get_singleton()->canvas_item_add_texture_rect(p_canvas_item, p_rect, get_rid(), p_tile, p_modulate, p_transpose, normal_rid, specular_rid, p_specular_color_shininess, p_texture_filter, p_texture_repeat); } + void Texture2D::draw_rect_region(RID p_canvas_item, const Rect2 &p_rect, const Rect2 &p_src_rect, const Color &p_modulate, bool p_transpose, const Ref<Texture2D> &p_normal_map, const Ref<Texture2D> &p_specular_map, const Color &p_specular_color_shininess, VS::CanvasItemTextureFilter p_texture_filter, VS::CanvasItemTextureRepeat p_texture_repeat, bool p_clip_uv) const { RID normal_rid = p_normal_map.is_valid() ? p_normal_map->get_rid() : RID(); @@ -79,9 +82,9 @@ void Texture2D::_bind_methods() { ClassDB::bind_method(D_METHOD("get_height"), &Texture2D::get_height); ClassDB::bind_method(D_METHOD("get_size"), &Texture2D::get_size); ClassDB::bind_method(D_METHOD("has_alpha"), &Texture2D::has_alpha); - ClassDB::bind_method(D_METHOD("draw", "canvas_item", "position", "modulate", "transpose", "normal_map", "specular_map", "specular_color_shininess"), &Texture2D::draw, DEFVAL(Color(1, 1, 1)), DEFVAL(false), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Color(1, 1, 1, 1))); - ClassDB::bind_method(D_METHOD("draw_rect", "canvas_item", "rect", "tile", "modulate", "transpose", "normal_map", "specular_map", "specular_color_shininess"), &Texture2D::draw_rect, DEFVAL(Color(1, 1, 1)), DEFVAL(false), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Color(1, 1, 1, 1))); - ClassDB::bind_method(D_METHOD("draw_rect_region", "canvas_item", "rect", "src_rect", "modulate", "transpose", "normal_map", "clip_uv", "specular_map", "specular_color_shininess"), &Texture2D::draw_rect_region, DEFVAL(Color(1, 1, 1)), DEFVAL(false), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(true)); + ClassDB::bind_method(D_METHOD("draw", "canvas_item", "position", "modulate", "transpose", "normal_map", "specular_map", "specular_color_shininess", "texture_filter", "texture_repeat"), &Texture2D::draw, DEFVAL(Color(1, 1, 1)), DEFVAL(false), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(VS::CANVAS_ITEM_TEXTURE_FILTER_DEFAULT), DEFVAL(VS::CANVAS_ITEM_TEXTURE_REPEAT_DEFAULT)); + ClassDB::bind_method(D_METHOD("draw_rect", "canvas_item", "rect", "tile", "modulate", "transpose", "normal_map", "specular_map", "specular_color_shininess", "texture_filter", "texture_repeat"), &Texture2D::draw_rect, DEFVAL(Color(1, 1, 1)), DEFVAL(false), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(VS::CANVAS_ITEM_TEXTURE_FILTER_DEFAULT), DEFVAL(VS::CANVAS_ITEM_TEXTURE_REPEAT_DEFAULT)); + ClassDB::bind_method(D_METHOD("draw_rect_region", "canvas_item", "rect", "src_rect", "modulate", "transpose", "normal_map", "specular_map", "specular_color_shininess", "texture_filter", "texture_repeat", "clip_uv"), &Texture2D::draw_rect_region, DEFVAL(Color(1, 1, 1)), DEFVAL(false), DEFVAL(Variant()), DEFVAL(Variant()), DEFVAL(Color(1, 1, 1, 1)), DEFVAL(VS::CANVAS_ITEM_TEXTURE_FILTER_DEFAULT), DEFVAL(VS::CANVAS_ITEM_TEXTURE_REPEAT_DEFAULT), DEFVAL(true)); ClassDB::bind_method(D_METHOD("get_data"), &Texture2D::get_data); ADD_GROUP("", ""); |