Remove unintentional PROPERTY_USAGE_INTERNAL
The flag only matters for property definition, but was also used in _validate_property a lot.
This commit is contained in:
parent
83f2723893
commit
c25b8f2876
|
@ -590,7 +590,7 @@ void CSGShape3D::_validate_property(PropertyInfo &property) const {
|
|||
//hide collision if not root
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
} else if (is_collision_prefixed && !bool(get("use_collision"))) {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
GeometryInstance3D::_validate_property(property);
|
||||
}
|
||||
|
|
|
@ -97,7 +97,7 @@ void NoiseTexture::_bind_methods() {
|
|||
void NoiseTexture::_validate_property(PropertyInfo &property) const {
|
||||
if (property.name == "bump_strength") {
|
||||
if (!as_normal_map) {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -515,7 +515,7 @@ Dictionary VisualScriptFunctionCall::_get_argument_cache() const {
|
|||
void VisualScriptFunctionCall::_validate_property(PropertyInfo &property) const {
|
||||
if (property.name == "base_type") {
|
||||
if (call_mode != CALL_MODE_INSTANCE) {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1293,7 +1293,7 @@ VisualScriptPropertySet::AssignOp VisualScriptPropertySet::get_assign_op() const
|
|||
void VisualScriptPropertySet::_validate_property(PropertyInfo &property) const {
|
||||
if (property.name == "base_type") {
|
||||
if (call_mode != CALL_MODE_INSTANCE) {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1999,7 +1999,7 @@ StringName VisualScriptPropertyGet::get_index() const {
|
|||
void VisualScriptPropertyGet::_validate_property(PropertyInfo &property) const {
|
||||
if (property.name == "base_type") {
|
||||
if (call_mode != CALL_MODE_INSTANCE) {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -512,25 +512,25 @@ void Area2D::_validate_property(PropertyInfo &property) const {
|
|||
property.hint_string = options;
|
||||
} else if (property.name.begins_with("gravity") && property.name != "gravity_space_override") {
|
||||
if (gravity_space_override == SPACE_OVERRIDE_DISABLED) {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
} else {
|
||||
if (gravity_is_point) {
|
||||
if (property.name == "gravity_direction") {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
} else {
|
||||
if (property.name.begins_with("gravity_point_")) {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (property.name.begins_with("linear_damp") && property.name != "linear_damp_space_override") {
|
||||
if (linear_damp_space_override == SPACE_OVERRIDE_DISABLED) {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
} else if (property.name.begins_with("angular_damp") && property.name != "angular_damp_space_override") {
|
||||
if (angular_damp_space_override == SPACE_OVERRIDE_DISABLED) {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1065,7 +1065,7 @@ void RigidDynamicBody2D::_bind_methods() {
|
|||
void RigidDynamicBody2D::_validate_property(PropertyInfo &property) const {
|
||||
if (center_of_mass_mode != CENTER_OF_MASS_MODE_CUSTOM) {
|
||||
if (property.name == "center_of_mass") {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1779,11 +1779,11 @@ void CharacterBody2D::_bind_methods() {
|
|||
void CharacterBody2D::_validate_property(PropertyInfo &property) const {
|
||||
if (motion_mode == MOTION_MODE_FLOATING) {
|
||||
if (property.name.begins_with("floor_") || property.name == "up_direction" || property.name == "slide_on_ceiling") {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
} else {
|
||||
if (property.name == "wall_min_slide_angle") {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -612,25 +612,25 @@ void Area3D::_validate_property(PropertyInfo &property) const {
|
|||
property.hint_string = options;
|
||||
} else if (property.name.begins_with("gravity") && property.name != "gravity_space_override") {
|
||||
if (gravity_space_override == SPACE_OVERRIDE_DISABLED) {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
} else {
|
||||
if (gravity_is_point) {
|
||||
if (property.name == "gravity_direction") {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
} else {
|
||||
if (property.name.begins_with("gravity_point_")) {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else if (property.name.begins_with("linear_damp") && property.name != "linear_damp_space_override") {
|
||||
if (linear_damp_space_override == SPACE_OVERRIDE_DISABLED) {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
} else if (property.name.begins_with("angular_damp") && property.name != "angular_damp_space_override") {
|
||||
if (angular_damp_space_override == SPACE_OVERRIDE_DISABLED) {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1127,7 +1127,7 @@ void RigidDynamicBody3D::_bind_methods() {
|
|||
void RigidDynamicBody3D::_validate_property(PropertyInfo &property) const {
|
||||
if (center_of_mass_mode != CENTER_OF_MASS_MODE_CUSTOM) {
|
||||
if (property.name == "center_of_mass") {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
}
|
||||
PhysicsBody3D::_validate_property(property);
|
||||
|
@ -2025,7 +2025,7 @@ void CharacterBody3D::_bind_methods() {
|
|||
void CharacterBody3D::_validate_property(PropertyInfo &property) const {
|
||||
if (motion_mode == MOTION_MODE_FLOATING) {
|
||||
if (property.name.begins_with("floor_") || property.name == "up_direction" || property.name == "slide_on_ceiling") {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
}
|
||||
PhysicsBody3D::_validate_property(property);
|
||||
|
|
|
@ -181,7 +181,7 @@ AABB ReflectionProbe::get_aabb() const {
|
|||
void ReflectionProbe::_validate_property(PropertyInfo &property) const {
|
||||
if (property.name == "ambient_color" || property.name == "ambient_color_energy") {
|
||||
if (ambient_mode != AMBIENT_COLOR) {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
}
|
||||
VisualInstance3D::_validate_property(property);
|
||||
|
|
|
@ -1040,37 +1040,37 @@ void Environment::_update_adjustment() {
|
|||
void Environment::_validate_property(PropertyInfo &property) const {
|
||||
if (property.name == "sky" || property.name == "sky_custom_fov" || property.name == "sky_rotation" || property.name == "ambient_light_sky_contribution") {
|
||||
if (bg_mode != BG_SKY && ambient_source != AMBIENT_SOURCE_SKY && reflection_source != REFLECTION_SOURCE_SKY) {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
}
|
||||
|
||||
if (property.name == "fog_aerial_perspective") {
|
||||
if (bg_mode != BG_SKY) {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
}
|
||||
|
||||
if (property.name == "tonemap_white" && tone_mapper == TONE_MAPPER_LINEAR) {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
|
||||
if (property.name == "glow_intensity" && glow_blend_mode == GLOW_BLEND_MODE_MIX) {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
|
||||
if (property.name == "glow_mix" && glow_blend_mode != GLOW_BLEND_MODE_MIX) {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
|
||||
if (property.name == "background_color") {
|
||||
if (bg_mode != BG_COLOR && ambient_source != AMBIENT_SOURCE_COLOR) {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
}
|
||||
|
||||
if (property.name == "background_canvas_max_layer") {
|
||||
if (bg_mode != BG_CANVAS) {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1108,7 +1108,7 @@ void Environment::_validate_property(PropertyInfo &property) const {
|
|||
|
||||
String enabled = prefix + "enabled";
|
||||
if (property.name.begins_with(prefix) && property.name != enabled && !bool(get(enabled))) {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -1121,7 +1121,7 @@ void Environment::_validate_property(PropertyInfo &property) const {
|
|||
String prefix = String(*prefixes);
|
||||
|
||||
if (property.name.begins_with(prefix)) {
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR | PROPERTY_USAGE_INTERNAL;
|
||||
property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue