summaryrefslogtreecommitdiff
path: root/scene/resources/material.cpp
diff options
context:
space:
mode:
authorPoommetee Ketson <poommetee@protonmail.com>2017-09-12 04:16:42 +0700
committerGitHub <noreply@github.com>2017-09-12 04:16:42 +0700
commitea5231fdf406b7f2e4050761e3d383061216b4ec (patch)
treedec4a0c4ca348d44a0396dd51bfe89d76b986a9e /scene/resources/material.cpp
parent5f39f3a2dfba500b6c9cd8f87b0dd35949043822 (diff)
parent1c063abf0d2e76a4e5a9e0b5c1fea7aaddb7c7c5 (diff)
Merge pull request #11168 from Noshyaar/pr-mat
Material: fix priority not int
Diffstat (limited to 'scene/resources/material.cpp')
-rw-r--r--scene/resources/material.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/resources/material.cpp b/scene/resources/material.cpp
index a187692bcb..abe9a00c3f 100644
--- a/scene/resources/material.cpp
+++ b/scene/resources/material.cpp
@@ -67,8 +67,8 @@ RID Material::get_rid() const {
}
void Material::_validate_property(PropertyInfo &property) const {
- if (!_can_do_next_pass() && property.name=="next_pass") {
- property.usage=0;
+ if (!_can_do_next_pass() && property.name == "next_pass") {
+ property.usage = 0;
}
}
@@ -80,7 +80,7 @@ void Material::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_render_priority", "priority"), &Material::set_render_priority);
ClassDB::bind_method(D_METHOD("get_render_priority"), &Material::get_render_priority);
- ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "render_priority", PROPERTY_HINT_RANGE, itos(RENDER_PRIORITY_MIN) + "," + itos(RENDER_PRIORITY_MAX) + ",1"), "set_render_priority", "get_render_priority");
+ ADD_PROPERTY(PropertyInfo(Variant::INT, "render_priority", PROPERTY_HINT_RANGE, itos(RENDER_PRIORITY_MIN) + "," + itos(RENDER_PRIORITY_MAX) + ",1"), "set_render_priority", "get_render_priority");
ADD_PROPERTY(PropertyInfo(Variant::OBJECT, "next_pass", PROPERTY_HINT_RESOURCE_TYPE, "Material"), "set_next_pass", "get_next_pass");
BIND_CONSTANT(RENDER_PRIORITY_MAX);
@@ -212,7 +212,7 @@ void ShaderMaterial::get_argument_options(const StringName &p_function, int p_id
bool ShaderMaterial::_can_do_next_pass() const {
- return shader.is_valid() && shader->get_mode()==Shader::MODE_SPATIAL;
+ return shader.is_valid() && shader->get_mode() == Shader::MODE_SPATIAL;
}
ShaderMaterial::ShaderMaterial() {