Added export hint to 2D and 3D physics and render layers.
This commit is contained in:
parent
197b65f32a
commit
74d336d0f4
@ -4068,6 +4068,50 @@ void GDScriptParser::_parse_class(ClassNode *p_class) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (tokenizer->get_token() == GDScriptTokenizer::TK_IDENTIFIER && tokenizer->get_token_identifier() == "LAYERS_2D_RENDER") {
|
||||||
|
|
||||||
|
tokenizer->advance();
|
||||||
|
if (tokenizer->get_token() != GDScriptTokenizer::TK_PARENTHESIS_CLOSE) {
|
||||||
|
_set_error("Expected ')' in layers 2D render hint.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
current_export.hint = PROPERTY_HINT_LAYERS_2D_RENDER;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tokenizer->get_token() == GDScriptTokenizer::TK_IDENTIFIER && tokenizer->get_token_identifier() == "LAYERS_2D_PHYSICS") {
|
||||||
|
|
||||||
|
tokenizer->advance();
|
||||||
|
if (tokenizer->get_token() != GDScriptTokenizer::TK_PARENTHESIS_CLOSE) {
|
||||||
|
_set_error("Expected ')' in layers 2D physics hint.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
current_export.hint = PROPERTY_HINT_LAYERS_2D_PHYSICS;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tokenizer->get_token() == GDScriptTokenizer::TK_IDENTIFIER && tokenizer->get_token_identifier() == "LAYERS_3D_RENDER") {
|
||||||
|
|
||||||
|
tokenizer->advance();
|
||||||
|
if (tokenizer->get_token() != GDScriptTokenizer::TK_PARENTHESIS_CLOSE) {
|
||||||
|
_set_error("Expected ')' in layers 3D render hint.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
current_export.hint = PROPERTY_HINT_LAYERS_3D_RENDER;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (tokenizer->get_token() == GDScriptTokenizer::TK_IDENTIFIER && tokenizer->get_token_identifier() == "LAYERS_3D_PHYSICS") {
|
||||||
|
|
||||||
|
tokenizer->advance();
|
||||||
|
if (tokenizer->get_token() != GDScriptTokenizer::TK_PARENTHESIS_CLOSE) {
|
||||||
|
_set_error("Expected ')' in layers 3D physics hint.");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
current_export.hint = PROPERTY_HINT_LAYERS_3D_PHYSICS;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
if (tokenizer->get_token() == GDScriptTokenizer::TK_CONSTANT && tokenizer->get_token_constant().get_type() == Variant::STRING) {
|
if (tokenizer->get_token() == GDScriptTokenizer::TK_CONSTANT && tokenizer->get_token_constant().get_type() == Variant::STRING) {
|
||||||
//enumeration
|
//enumeration
|
||||||
current_export.hint = PROPERTY_HINT_ENUM;
|
current_export.hint = PROPERTY_HINT_ENUM;
|
||||||
|
Loading…
Reference in New Issue
Block a user