mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Hide render_priority except when using SpatialMaterials
This commit is contained in:
parent
66ab3ce954
commit
8c949016ff
5 changed files with 13 additions and 17 deletions
|
@ -80,6 +80,9 @@ void Material::_validate_property(PropertyInfo &property) const {
|
|||
if (!_can_do_next_pass() && property.name == "next_pass") {
|
||||
property.usage = PROPERTY_USAGE_NONE;
|
||||
}
|
||||
if (!_can_use_render_priority() && property.name == "render_priority") {
|
||||
property.usage = PROPERTY_USAGE_NONE;
|
||||
}
|
||||
}
|
||||
|
||||
void Material::inspect_native_shader_code() {
|
||||
|
@ -291,6 +294,10 @@ bool ShaderMaterial::_can_do_next_pass() const {
|
|||
return shader.is_valid() && shader->get_mode() == Shader::MODE_SPATIAL;
|
||||
}
|
||||
|
||||
bool ShaderMaterial::_can_use_render_priority() const {
|
||||
return shader.is_valid() && shader->get_mode() == Shader::MODE_SPATIAL;
|
||||
}
|
||||
|
||||
Shader::Mode ShaderMaterial::get_shader_mode() const {
|
||||
if (shader.is_valid()) {
|
||||
return shader->get_mode();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue