| 337 | } |
| 338 | |
| 339 | void EditorData::set_editor_plugin_states(const Dictionary &p_states) { |
| 340 | if (p_states.is_empty()) { |
| 341 | for (EditorPlugin *ep : editor_plugins) { |
| 342 | ep->clear(); |
| 343 | } |
| 344 | return; |
| 345 | } |
| 346 | |
| 347 | for (const KeyValue<Variant, Variant> &kv : p_states) { |
| 348 | String name = kv.key; |
| 349 | int idx = -1; |
| 350 | for (int i = 0; i < editor_plugins.size(); i++) { |
| 351 | if (editor_plugins[i]->get_plugin_name() == name) { |
| 352 | idx = i; |
| 353 | break; |
| 354 | } |
| 355 | } |
| 356 | |
| 357 | if (idx == -1) { |
| 358 | continue; |
| 359 | } |
| 360 | editor_plugins[idx]->set_state(kv.value); |
| 361 | } |
| 362 | } |
| 363 | |
| 364 | void EditorData::notify_edited_scene_changed() { |
| 365 | for (int i = 0; i < editor_plugins.size(); i++) { |
no test coverage detected