fix brush tip and pattern import
This commit is contained in:
@@ -109,9 +109,11 @@
|
|||||||
<button-custom id="btn-down" thickness="1" color="0 0" border-color=".0" shrink="1" margin="0 2 0 0">
|
<button-custom id="btn-down" thickness="1" color="0 0" border-color=".0" shrink="1" margin="0 2 0 0">
|
||||||
<icon width="30" icon="bullet_arrow_down"/>
|
<icon width="30" icon="bullet_arrow_down"/>
|
||||||
</button-custom>
|
</button-custom>
|
||||||
|
<!--
|
||||||
<button-custom id="btn-save" thickness="1" color="0 0" border-color=".0" shrink="1" margin="0 2 0 0">
|
<button-custom id="btn-save" thickness="1" color="0 0" border-color=".0" shrink="1" margin="0 2 0 0">
|
||||||
<icon width="30" icon="bullet_disk"/>
|
<icon width="30" icon="bullet_disk"/>
|
||||||
</button-custom>
|
</button-custom>
|
||||||
|
-->
|
||||||
<node grow="1"></node>
|
<node grow="1"></node>
|
||||||
<button-custom id="btn-remove" thickness="1" color="0 0" border-color=".0" shrink="1" margin="0 10 0 0">
|
<button-custom id="btn-remove" thickness="1" color="0 0" border-color=".0" shrink="1" margin="0 10 0 0">
|
||||||
<icon width="30" icon="bin_closed"/>
|
<icon width="30" icon="bin_closed"/>
|
||||||
|
|||||||
@@ -66,13 +66,14 @@ void NodePanelBrush::init()
|
|||||||
std::string path_high = App::I.data_path + "/" + m_dir_name + "/" + name + ".png";
|
std::string path_high = App::I.data_path + "/" + m_dir_name + "/" + name + ".png";
|
||||||
std::string path_thumb = App::I.data_path + "/" + m_dir_name + "/thumbs/" + name + ".png";
|
std::string path_thumb = App::I.data_path + "/" + m_dir_name + "/thumbs/" + name + ".png";
|
||||||
|
|
||||||
img = img.resize_squared(glm::u8vec4(255));
|
//img = img.resize_squared(glm::u8vec4(255));
|
||||||
//img.gayscale_alpha();
|
if (m_dir_name == "brushes")
|
||||||
|
img.gayscale_alpha();
|
||||||
|
|
||||||
auto thumb = img.resize(64, 64);
|
auto thumb = img.resize(64, 64).resize_squared(glm::u8vec4(255));
|
||||||
thumb.save(path_thumb);
|
thumb.save(path_thumb);
|
||||||
auto po2 = img.resize_power2();
|
//auto po2 = img.resize_power2();
|
||||||
po2.save(path_high);
|
img.save(path_high);
|
||||||
|
|
||||||
async_start();
|
async_start();
|
||||||
NodeButtonBrush* brush = new NodeButtonBrush;
|
NodeButtonBrush* brush = new NodeButtonBrush;
|
||||||
|
|||||||
@@ -35,7 +35,8 @@ class NodePanelBrush : public Node
|
|||||||
NodeButtonCustom* m_btn_remove;
|
NodeButtonCustom* m_btn_remove;
|
||||||
struct header_t {
|
struct header_t {
|
||||||
char magic[5]{ 'P', 'P', 'B', 'R', 0 };
|
char magic[5]{ 'P', 'P', 'B', 'R', 0 };
|
||||||
uint16_t version = 0;
|
uint16_t version = 1;
|
||||||
|
uint16_t build = g_version_build;
|
||||||
uint16_t brushes = 0;
|
uint16_t brushes = 0;
|
||||||
uint16_t deleted = 0;
|
uint16_t deleted = 0;
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user