diff --git a/misc/py_wrap_generator.py b/misc/py_wrap_generator.py index b0ac1e82e0e..0be07453ef8 100644 --- a/misc/py_wrap_generator.py +++ b/misc/py_wrap_generator.py @@ -1273,6 +1273,11 @@ def from_string(str_def, containing_file, class_, line_number, namespace): func.duplicate = False func.namespace = namespace str_def = str_def.replace("operator ","operator") + + # remove attributes from the start + if str.startswith(str_def, "[[") and "]]" in str_def: + str_def = str_def[str_def.find("]]")+2:] + if str.startswith(str_def, "static "): func.is_static = True str_def = str_def[7:]