diff --git a/core/global_constants.cpp b/core/global_constants.cpp index 92e50a8b96f..89d918fed97 100644 --- a/core/global_constants.cpp +++ b/core/global_constants.cpp @@ -476,6 +476,16 @@ static _GlobalConstant _global_constants[]={ BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_EDITOR ), BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_NETWORK ), BIND_GLOBAL_CONSTANT( PROPERTY_USAGE_DEFAULT ), + + BIND_GLOBAL_CONSTANT( METHOD_FLAG_NORMAL ), + BIND_GLOBAL_CONSTANT( METHOD_FLAG_EDITOR ), + BIND_GLOBAL_CONSTANT( METHOD_FLAG_NOSCRIPT ), + BIND_GLOBAL_CONSTANT( METHOD_FLAG_CONST ), + BIND_GLOBAL_CONSTANT( METHOD_FLAG_REVERSE ), + BIND_GLOBAL_CONSTANT( METHOD_FLAG_VIRTUAL ), + BIND_GLOBAL_CONSTANT( METHOD_FLAG_FROM_SCRIPT ), + BIND_GLOBAL_CONSTANT( METHOD_FLAGS_DEFAULT ), + {"TYPE_NIL",Variant::NIL}, {"TYPE_BOOL",Variant::BOOL}, {"TYPE_INT",Variant::INT}, diff --git a/core/method_bind.h b/core/method_bind.h index 4c2598e50cb..da3d7c10626 100644 --- a/core/method_bind.h +++ b/core/method_bind.h @@ -50,6 +50,7 @@ enum MethodFlags { METHOD_FLAG_CONST=8, METHOD_FLAG_REVERSE=16, // used for events METHOD_FLAG_VIRTUAL=32, + METHOD_FLAG_FROM_SCRIPT=64, METHOD_FLAGS_DEFAULT=METHOD_FLAG_NORMAL, }; diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp index 62c5eb735a7..8f48a3d6a73 100644 --- a/modules/gdscript/gd_script.cpp +++ b/modules/gdscript/gd_script.cpp @@ -2456,6 +2456,7 @@ void GDInstance::get_method_list(List *p_list) const { MethodInfo mi; mi.name=E->key(); + mi.flags|=METHOD_FLAG_FROM_SCRIPT; for(int i=0;iget().get_argument_count();i++) mi.arguments.push_back(PropertyInfo(Variant::NIL,"arg"+itos(i))); p_list->push_back(mi);