| 1862 | } |
| 1863 | |
| 1864 | void GDScriptInstance::validate_property(PropertyInfo &p_property) const { |
| 1865 | const GDScript *sptr = script.ptr(); |
| 1866 | while (sptr) { |
| 1867 | if (likely(sptr->valid)) { |
| 1868 | HashMap<StringName, GDScriptFunction *>::ConstIterator E = sptr->member_functions.find(GDScriptLanguage::get_singleton()->strings._validate_property); |
| 1869 | if (E) { |
| 1870 | Variant property = (Dictionary)p_property; |
| 1871 | const Variant *args[1] = { &property }; |
| 1872 | |
| 1873 | Callable::CallError err; |
| 1874 | Variant ret = E->value->call(const_cast<GDScriptInstance *>(this), args, 1, err); |
| 1875 | if (err.error == Callable::CallError::CALL_OK) { |
| 1876 | p_property = PropertyInfo::from_dict(property); |
| 1877 | return; |
| 1878 | } |
| 1879 | } |
| 1880 | } |
| 1881 | sptr = sptr->_base; |
| 1882 | } |
| 1883 | } |
| 1884 | |
| 1885 | void GDScriptInstance::get_property_list(List<PropertyInfo> *p_properties) const { |
| 1886 | // exported members, not done yet! |