|
@@ -216,7 +216,7 @@ RES ResourceFormatLoaderShader::load(const String &p_path, const String &p_origi
|
|
|
}
|
|
|
|
|
|
void ResourceFormatLoaderShader::get_recognized_extensions(List<String> *p_extensions) const {
|
|
|
-
|
|
|
+ p_extensions->push_back("gdshader");
|
|
|
p_extensions->push_back("shader");
|
|
|
}
|
|
|
|
|
@@ -228,8 +228,9 @@ bool ResourceFormatLoaderShader::handles_type(const String &p_type) const {
|
|
|
String ResourceFormatLoaderShader::get_resource_type(const String &p_path) const {
|
|
|
|
|
|
String el = p_path.get_extension().to_lower();
|
|
|
- if (el == "shader")
|
|
|
+ if (el == "gdshader" || el == "shader") {
|
|
|
return "Shader";
|
|
|
+ }
|
|
|
return "";
|
|
|
}
|
|
|
|
|
@@ -260,10 +261,12 @@ void ResourceFormatSaverShader::get_recognized_extensions(const RES &p_resource,
|
|
|
|
|
|
if (const Shader *shader = Object::cast_to<Shader>(*p_resource)) {
|
|
|
if (shader->is_text_shader()) {
|
|
|
+ p_extensions->push_back("gdshader");
|
|
|
p_extensions->push_back("shader");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
bool ResourceFormatSaverShader::recognize(const RES &p_resource) const {
|
|
|
|
|
|
return p_resource->get_class_name() == "Shader"; //only shader, not inherited
|