Hide Initial Clip property if not relevant in AudioStreamInteractive editor
If no clips have been created yet, there's no clip to choose from for the Initial Clip property.
This commit is contained in:
parent
3978628c6c
commit
378b684b28
|
@ -431,6 +431,10 @@ void AudioStreamInteractive::_validate_property(PropertyInfo &r_property) const
|
||||||
|
|
||||||
if (prop == "initial_clip") {
|
if (prop == "initial_clip") {
|
||||||
#ifdef TOOLS_ENABLED
|
#ifdef TOOLS_ENABLED
|
||||||
|
if (get_clip_count() == 0) {
|
||||||
|
// Hide property since there's no clip to choose from.
|
||||||
|
r_property.usage = PROPERTY_USAGE_NO_EDITOR;
|
||||||
|
}
|
||||||
r_property.hint_string = _get_streams_hint();
|
r_property.hint_string = _get_streams_hint();
|
||||||
#endif
|
#endif
|
||||||
} else if (prop.begins_with("clip_") && prop != "clip_count") {
|
} else if (prop.begins_with("clip_") && prop != "clip_count") {
|
||||||
|
|
Loading…
Reference in New Issue