Skip to content

Commit

Permalink
Put encoded voxel data in the system clipboard
Browse files Browse the repository at this point in the history
  • Loading branch information
madd-games committed Oct 2, 2024
1 parent 1513050 commit f477378
Showing 1 changed file with 2 additions and 17 deletions.
19 changes: 2 additions & 17 deletions src/goxel.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
#include "file_format.h"
#include "script.h"
#include "shader_cache.h"
#include "system.h"
#include "utils/box.h"
#include "volume.h"
#include "xxhash.h"
Expand Down Expand Up @@ -1681,24 +1682,8 @@ static void copy_action(void)
}

char *encoded_voxels = volume_copy_to_string(goxel.image->active_layer->volume, aabb);
printf("%s\n", encoded_voxels);
sys_callbacks.set_clipboard_text(sys_callbacks.user, encoded_voxels);
free(encoded_voxels);

#if 0
painter_t painter;

volume_delete(goxel.clipboard.volume);
mat4_copy(img->selection_box, goxel.clipboard.box);
goxel.clipboard.volume = volume_copy(goxel.image->active_layer->volume);
if (!box_is_null(img->selection_box)) {
painter = (painter_t) {
.shape = &shape_cube,
.mode = MODE_INTERSECT,
.color = {255, 255, 255, 255},
};
volume_op(goxel.clipboard.volume, &painter, img->selection_box);
}
#endif
}

static void paste_action(void)
Expand Down

0 comments on commit f477378

Please sign in to comment.