feat: initialized template
This commit is contained in:
parent
57a18ebef7
commit
76dd9fbc62
10 changed files with 19 additions and 19 deletions
20
modules/terrain_editor/macros.h
Normal file
20
modules/terrain_editor/macros.h
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
#ifndef GODOT_EXTRA_MACROS_H
|
||||
#define GODOT_EXTRA_MACROS_H
|
||||
|
||||
#define BIND_GET_SET(m_property) \
|
||||
ClassDB::bind_method(D_METHOD("set_" #m_property, #m_property), \
|
||||
&self_type::set_##m_property); \
|
||||
ClassDB::bind_method(D_METHOD("get_" #m_property), \
|
||||
&self_type::get_##m_property)
|
||||
|
||||
#define BIND_HPROPERTY(m_type, m_property, ...) \
|
||||
BIND_GET_SET(m_property); \
|
||||
ADD_PROPERTY(PropertyInfo(m_type, #m_property, __VA_ARGS__), \
|
||||
"set_" #m_property, "get_" #m_property)
|
||||
|
||||
#define BIND_PROPERTY(m_type, m_property) \
|
||||
BIND_GET_SET(m_property); \
|
||||
ADD_PROPERTY(PropertyInfo(m_type, #m_property), "set_" #m_property, \
|
||||
"get_" #m_property)
|
||||
|
||||
#endif // !GODOT_EXTRA_MACROS_H
|
||||
Loading…
Add table
Add a link
Reference in a new issue