Repository: godotengine/godot
File: editor/plugins/sprite_frames_editor_plugin.h (C/C++)

Code before:
	Ref<Texture2D> empty_icon = memnew(ImageTexture);

	HBoxContainer *playback_container = nullptr;
	Button *stop = nullptr;
	Button *play = nullptr;
	Button *play_from = nullptr;
	Button *play_bw = nullptr;
	Button *play_bw_from = nullptr;

	Button *load = nullptr;
	Button *load_sheet = nullptr;
	Button *delete_frame = nullptr;
	Button *copy = nullptr;
	Button *paste = nullptr;
	Button *empty_before = nullptr;
	Button *empty_after = nullptr;
	Button *move_up = nullptr;
	Button *move_down = nullptr;
	Button *zoom_out = nullptr;
	Button *zoom_reset = nullptr;
	Button *zoom_in = nullptr;
	SpinBox *frame_duration = nullptr;
	ItemList *frame_list = nullptr;
	bool loading_scene;
	int sel;

	Button *add_anim = nullptr;
	Button *delete_anim = nullptr;
	SpinBox *anim_speed = nullptr;
	Button *anim_loop = nullptr;

	HBoxContainer *autoplay_container = nullptr;
	Button *autoplay = nullptr;

	LineEdit *anim_search_box = nullptr;
	Tree *animations = nullptr;

	Label *missing_anim_label = nullptr;
	VBoxContainer *anim_frames_vb = nullptr;

	EditorFileDialog *file = nullptr;

	AcceptDialog *dialog = nullptr;

	StringName edited_anim;

	ConfirmationDialog *delete_dialog = nullptr;

	ConfirmationDialog *split_sheet_dialog = nullptr;
	ScrollContainer *split_sheet_scroll = nullptr;
	TextureRect *split_sheet_preview = nullptr;

Review comment (suggestion):
I'm not sure about the frame clipboard. There are `EditorSettings::get_singleton()->{set,get}_resource_clipboard()` methods. You could use an array of `Ref<EditorSpriteFramesFrame>` or replace `EditorSpriteFramesFrame` with an `EditorSpriteFramesArray` resource (the class is not exposed, so this is not considered a compatibility break).

Note that you can paste not only frames (texture + duration) from the Sprite Frames editor, but also textures from other docks (in this case the duration is 1.0). Not sure if we have texture arrays in other places.

Code after:
	Ref<Texture2D> autoplay_icon;
	Ref<Texture2D> stop_icon;
	Ref<Texture2D> pause_icon;
	Ref<Texture2D> empty_icon = memnew(ImageTexture);

	HBoxContainer *playback_container = nullptr;
	Button *stop = nullptr;
	Button *play = nullptr;
	Button *play_from = nullptr;
	Button *play_bw = nullptr;
	Button *play_bw_from = nullptr;

	Button *load = nullptr;
	Button *load_sheet = nullptr;
	Button *delete_frame = nullptr;
	Button *copy = nullptr;
	Button *paste = nullptr;
	Button *empty_before = nullptr;
	Button *empty_after = nullptr;
	Button *move_up = nullptr;
	Button *move_down = nullptr;
	Button *zoom_out = nullptr;
	Button *zoom_reset = nullptr;
	Button *zoom_in = nullptr;
	SpinBox *frame_duration = nullptr;
	ItemList *frame_list = nullptr;
	bool loading_scene;
	Vector<int> selection;

	Button *add_anim = nullptr;
	Button *delete_anim = nullptr;
	SpinBox *anim_speed = nullptr;
	Button *anim_loop = nullptr;

	HBoxContainer *autoplay_container = nullptr;
	Button *autoplay = nullptr;

	LineEdit *anim_search_box = nullptr;
	Tree *animations = nullptr;

	Label *missing_anim_label = nullptr;
	VBoxContainer *anim_frames_vb = nullptr;

	EditorFileDialog *file = nullptr;

	AcceptDialog *dialog = nullptr;

	StringName edited_anim;

	ConfirmationDialog *delete_dialog = nullptr;