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

Function copy_imd_v2

utility/import_info.cpp:194–208  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194Ref<ResourceImportMetadatav2> copy_imd_v2(Ref<ResourceImportMetadatav2> p_cf) {
195 Ref<ResourceImportMetadatav2> r_imd;
196 r_imd.instantiate();
197 r_imd->set_editor(p_cf->get_editor());
198 int src_count = p_cf->get_source_count();
199 for (int i = 0; i < src_count; i++) {
200 r_imd->add_source(p_cf->get_source_path(i), p_cf->get_source_md5(i));
201 }
202 List<String> r_options;
203 p_cf->get_options(&r_options);
204 for (auto E = r_options.front(); E; E = E->next()) {
205 r_imd->set_option(E->get(), p_cf->get_option(E->get()));
206 }
207 return r_imd;
208}
209
210Ref<ImportInfo> ImportInfo::copy(const Ref<ImportInfo> &p_iinfo) {
211 ERR_FAIL_COND_V_MSG(p_iinfo.is_null(), Ref<ImportInfo>(), "ImportInfo is null");

Callers 1

copyMethod · 0.85

Calls 12

set_editorMethod · 0.80
get_editorMethod · 0.80
get_source_countMethod · 0.80
add_sourceMethod · 0.80
get_optionsMethod · 0.80
frontMethod · 0.80
nextMethod · 0.80
set_optionMethod · 0.80
get_optionMethod · 0.80
get_source_pathMethod · 0.45
get_source_md5Method · 0.45
getMethod · 0.45

Tested by

no test coverage detected