MCPcopy Create free account
hub / github.com/GDRETools/gdsdecomp / write_property

Method write_property

compat/resource_format_xml.cpp:2151–2737  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2149}*/
2150
2151void ResourceFormatSaverXMLInstance::write_property(const String &p_name, const Variant &p_property, bool *r_ok) {
2152 if (r_ok) {
2153 *r_ok = false;
2154 }
2155
2156 const char *type;
2157 String params;
2158 bool oneliner = true;
2159
2160 switch (p_property.get_type()) {
2161 case Variant::NIL:
2162 type = "nil";
2163 break;
2164 case Variant::BOOL:
2165 type = "bool";
2166 break;
2167 case Variant::INT:
2168 type = "int";
2169 break;
2170 case Variant::FLOAT:
2171 type = "real";
2172 break;
2173 case Variant::STRING:
2174 type = "string";
2175 break;
2176 case Variant::VECTOR2:
2177 type = "vector2";
2178 break;
2179 case Variant::RECT2:
2180 type = "rect2";
2181 break;
2182 case Variant::VECTOR3:
2183 type = "vector3";
2184 break;
2185 case Variant::PLANE:
2186 type = "plane";
2187 break;
2188 case Variant::AABB:
2189 type = "aabb";
2190 break;
2191 case Variant::QUATERNION:
2192 type = "quaternion";
2193 break;
2194 case Variant::TRANSFORM2D:
2195 type = "matrix32";
2196 break;
2197 case Variant::BASIS:
2198 type = "matrix3";
2199 break;
2200 case Variant::TRANSFORM3D:
2201 type = "transform";
2202 break;
2203 case Variant::COLOR:
2204 type = "color";
2205 break;
2206 case Variant::NODE_PATH:
2207 type = "node_path";
2208 break;

Callers

nothing calls this directly

Calls 10

escapeFunction · 0.85
lengthMethod · 0.80
get_typeMethod · 0.45
get_save_classMethod · 0.45
sizeMethod · 0.45
get_dataMethod · 0.45
containsMethod · 0.45
get_pathMethod · 0.45
findMethod · 0.45
store_8Method · 0.45

Tested by

no test coverage detected