mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-24 14:06:23 +01:00
Bug fix or something.
This commit is contained in:
parent
f69bc86ff0
commit
ea58e07865
24 changed files with 158 additions and 90 deletions
|
@ -249,8 +249,8 @@
|
|||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"NotoSans-Bold.ttf","CopyToMask":-1,"filePath":"datafiles/data/locale/sample locale/fonts",},
|
||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"NotoSans-Medium.ttf","CopyToMask":-1,"filePath":"datafiles/data/locale/sample locale/fonts",},
|
||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"NotoSans-SemiBold.ttf","CopyToMask":-1,"filePath":"datafiles/data/locale/sample locale/fonts",},
|
||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"nodes.json","CopyToMask":-1,"filePath":"datafiles/data/locale/sample locale",},
|
||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"HOW TO LOCALE.txt","CopyToMask":-1,"filePath":"datafiles/data/locale/sample locale",},
|
||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"nodes.json","CopyToMask":-1,"filePath":"datafiles/data/locale/sample locale",},
|
||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"UI.json","CopyToMask":-1,"filePath":"datafiles/data/locale/sample locale",},
|
||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"words.json","CopyToMask":-1,"filePath":"datafiles/data/locale/sample locale",},
|
||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"nodes.json","CopyToMask":-1,"filePath":"datafiles/data",},
|
||||
|
|
|
@ -244,12 +244,15 @@
|
|||
|
||||
#region async
|
||||
globalvar PORT_MAP, NETWORK_SERVERS, NETWORK_CLIENTS;
|
||||
globalvar IMAGE_FETCH_MAP;
|
||||
|
||||
global.FILE_LOAD_ASYNC = ds_map_create();
|
||||
PORT_MAP = ds_map_create();
|
||||
NETWORK_SERVERS = ds_map_create();
|
||||
NETWORK_CLIENTS = ds_map_create();
|
||||
|
||||
IMAGE_FETCH_MAP = ds_map_create();
|
||||
|
||||
asyncInit();
|
||||
#endregion
|
||||
|
||||
|
|
5
objects/o_main/Other_60.gml
Normal file
5
objects/o_main/Other_60.gml
Normal file
|
@ -0,0 +1,5 @@
|
|||
/// @description
|
||||
if(!ds_map_exists(IMAGE_FETCH_MAP, async_load[? "id"])) exit;
|
||||
|
||||
var _callback = IMAGE_FETCH_MAP[? async_load[? "id"]];
|
||||
_callback(async_load);
|
|
@ -22,6 +22,7 @@
|
|||
{"resourceType":"GMEvent","resourceVersion":"1.0","name":"","collisionObjectId":null,"eventNum":1,"eventType":9,"isDnD":false,},
|
||||
{"resourceType":"GMEvent","resourceVersion":"1.0","name":"","collisionObjectId":null,"eventNum":69,"eventType":7,"isDnD":false,},
|
||||
{"resourceType":"GMEvent","resourceVersion":"1.0","name":"","collisionObjectId":null,"eventNum":68,"eventType":7,"isDnD":false,},
|
||||
{"resourceType":"GMEvent","resourceVersion":"1.0","name":"","collisionObjectId":null,"eventNum":60,"eventType":7,"isDnD":false,},
|
||||
],
|
||||
"managed": true,
|
||||
"overriddenProperties": [],
|
||||
|
|
|
@ -434,7 +434,7 @@ function Node_VFX_Spawner_Base(_x, _y, _group = noone) : Node(_x, _y, _group) co
|
|||
static onPartDestroy = function(part) {}
|
||||
|
||||
static postDeserialize = function() {
|
||||
if(PROJECT.version < SAVE_VERSION) {
|
||||
if(PROJECT.version < 11480) {
|
||||
for( var i = 37; i <= 39; i++ )
|
||||
array_insert(load_map.inputs, i, noone);
|
||||
}
|
||||
|
|
|
@ -3,7 +3,7 @@ function APPEND(_path, context = PANEL_GRAPH.getCurrentContext()) {
|
|||
var _map = json_load_struct(_path);
|
||||
|
||||
if(_map == -1) {
|
||||
printlog("Decode error");
|
||||
printIf(log, "Decode error");
|
||||
return noone;
|
||||
}
|
||||
|
||||
|
@ -42,7 +42,7 @@ function __APPEND_MAP(_map, context = PANEL_GRAPH.getCurrentContext()) {
|
|||
var _node = nodeLoad(_node_list[i], true, context);
|
||||
if(_node) ds_list_add(appended_list, _node);
|
||||
}
|
||||
printlog("Load time: " + string(current_time - t)); t = current_time;
|
||||
printIf(log, "Load time: " + string(current_time - t)); t = current_time;
|
||||
|
||||
try {
|
||||
for(var i = 0; i < ds_list_size(appended_list); i++) {
|
||||
|
@ -55,7 +55,7 @@ function __APPEND_MAP(_map, context = PANEL_GRAPH.getCurrentContext()) {
|
|||
} catch(e) {
|
||||
log_warning("APPEND, node", exception_print(e));
|
||||
}
|
||||
printlog("Load group time: " + string(current_time - t)); t = current_time;
|
||||
printIf(log, "Load group time: " + string(current_time - t)); t = current_time;
|
||||
|
||||
try {
|
||||
for(var i = 0; i < ds_list_size(appended_list); i++)
|
||||
|
@ -63,7 +63,7 @@ function __APPEND_MAP(_map, context = PANEL_GRAPH.getCurrentContext()) {
|
|||
} catch(e) {
|
||||
log_warning("APPEND, deserialize", exception_print(e));
|
||||
}
|
||||
printlog("Deserialize time: " + string(current_time - t)); t = current_time;
|
||||
printIf(log, "Deserialize time: " + string(current_time - t)); t = current_time;
|
||||
|
||||
try {
|
||||
for(var i = 0; i < ds_list_size(appended_list); i++)
|
||||
|
@ -71,7 +71,7 @@ function __APPEND_MAP(_map, context = PANEL_GRAPH.getCurrentContext()) {
|
|||
} catch(e) {
|
||||
log_warning("LOAD, apply deserialize", exception_print(e));
|
||||
}
|
||||
printlog("Apply deserialize time: " + string(current_time - t)); t = current_time;
|
||||
printIf(log, "Apply deserialize time: " + string(current_time - t)); t = current_time;
|
||||
|
||||
try {
|
||||
for(var i = 0; i < ds_list_size(appended_list); i++)
|
||||
|
@ -81,7 +81,7 @@ function __APPEND_MAP(_map, context = PANEL_GRAPH.getCurrentContext()) {
|
|||
} catch(e) {
|
||||
log_warning("APPEND, connect", exception_print(e));
|
||||
}
|
||||
printlog("Connect time: " + string(current_time - t)); t = current_time;
|
||||
printIf(log, "Connect time: " + string(current_time - t)); t = current_time;
|
||||
|
||||
try {
|
||||
for(var i = 0; i < ds_list_size(appended_list); i++)
|
||||
|
@ -89,7 +89,7 @@ function __APPEND_MAP(_map, context = PANEL_GRAPH.getCurrentContext()) {
|
|||
} catch(e) {
|
||||
log_warning("APPEND, update", exception_print(e));
|
||||
}
|
||||
printlog("Update time: " + string(current_time - t)); t = current_time;
|
||||
printIf(log, "Update time: " + string(current_time - t)); t = current_time;
|
||||
|
||||
Render(true);
|
||||
|
||||
|
@ -115,7 +115,7 @@ function __APPEND_MAP(_map, context = PANEL_GRAPH.getCurrentContext()) {
|
|||
log_warning("APPEND, Conflict solver error : ", exception_print(e));
|
||||
}
|
||||
}
|
||||
printlog("Conflict time: " + string(current_time - t)); t = current_time;
|
||||
printIf(log, "Conflict time: " + string(current_time - t)); t = current_time;
|
||||
|
||||
try {
|
||||
for(var i = 0; i < ds_list_size(appended_list); i++)
|
||||
|
|
|
@ -2,11 +2,17 @@ function FileObject(_name, _path) constructor {
|
|||
name = _name;
|
||||
path = _path;
|
||||
spr_path = [];
|
||||
spr = -1;
|
||||
content = -1;
|
||||
surface = noone;
|
||||
meta = noone;
|
||||
type = FILE_TYPE.collection;
|
||||
spr = -1;
|
||||
sprFetchID = noone;
|
||||
|
||||
content = -1;
|
||||
surface = noone;
|
||||
|
||||
var _mdir = filename_dir(path);
|
||||
var _mname = filename_name_only(path);
|
||||
meta_path = $"{_mdir}/{_mname}.meta";
|
||||
meta = noone;
|
||||
type = FILE_TYPE.collection;
|
||||
|
||||
switch(string_lower(filename_ext(path))) {
|
||||
case ".png" :
|
||||
|
@ -44,40 +50,55 @@ function FileObject(_name, _path) constructor {
|
|||
}
|
||||
|
||||
static getSpr = function() {
|
||||
if(sprite_exists(spr)) return spr;
|
||||
if(sprite_exists(spr)) return spr;
|
||||
if(sprFetchID != noone) return -1;
|
||||
|
||||
if(array_length(spr_path) == 0) {
|
||||
spr = sprite_add(self.path, 0, false, false, 0, 0);
|
||||
sprite_set_offset(spr, sprite_get_width(spr) / 2, sprite_get_height(spr) / 2);
|
||||
sprFetchID = sprite_add_ext(self.path, 0, 0, 0, false);
|
||||
IMAGE_FETCH_MAP[? sprFetchID] = function(load_result) {
|
||||
spr = load_result[? "id"];
|
||||
sprite_set_offset(spr, sprite_get_width(spr) / 2, sprite_get_height(spr) / 2);
|
||||
};
|
||||
return spr;
|
||||
}
|
||||
|
||||
var path = array_safe_get(spr_path, 0);
|
||||
var amo = array_safe_get(spr_path, 1);
|
||||
var cent = array_safe_get(spr_path, 2);
|
||||
|
||||
if(path == 0) return -1;
|
||||
spr = sprite_add(path, amo, false, false, 0, 0);
|
||||
if(cent)
|
||||
sprite_set_offset(spr, sprite_get_width(spr) / 2, sprite_get_height(spr) / 2);
|
||||
|
||||
sprFetchID = sprite_add_ext(path, amo, 0, 0, false);
|
||||
IMAGE_FETCH_MAP[? sprFetchID] = function(load_result) {
|
||||
spr = load_result[? "id"];
|
||||
if(array_safe_get(spr_path, 2))
|
||||
sprite_set_offset(spr, sprite_get_width(spr) / 2, sprite_get_height(spr) / 2);
|
||||
};
|
||||
|
||||
return spr;
|
||||
}
|
||||
|
||||
static getMetadata = function() {
|
||||
retrive_data = true;
|
||||
if(!file_exists(path)) return noone;
|
||||
if(meta != noone) return meta;
|
||||
if(meta == undefined) return noone;
|
||||
|
||||
var _f = file_text_read_all(path);
|
||||
var m = json_decode(_f);
|
||||
if(!file_exists(path)) return noone;
|
||||
if(meta != noone) return meta;
|
||||
if(meta == undefined) return noone;
|
||||
|
||||
meta = new MetaDataManager();
|
||||
if(ds_map_exists(m, "metadata"))
|
||||
meta.deserialize(m[? "metadata"]);
|
||||
if(ds_map_exists(m, "preview"))
|
||||
thumbnail_data = json_try_parse(m[? "preview"], -1);
|
||||
|
||||
meta.version = m[? "version"];
|
||||
if(file_exists(meta_path)) {
|
||||
var m = json_load(meta_path);
|
||||
meta.deserialize(m);
|
||||
} else {
|
||||
var m = json_load(path);
|
||||
|
||||
if(ds_map_exists(m, "metadata"))
|
||||
meta.deserialize(m[? "metadata"]);
|
||||
if(ds_map_exists(m, "preview"))
|
||||
thumbnail_data = json_try_parse(m[? "preview"], -1);
|
||||
meta.version = m[? "version"];
|
||||
}
|
||||
|
||||
meta.name = name;
|
||||
|
||||
switch(filename_ext(path)) {
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
active = true;
|
||||
|
||||
path = "";
|
||||
version = 0;
|
||||
version = SAVE_VERSION;
|
||||
seed = irandom_range(100000, 999999);
|
||||
|
||||
modified = false;
|
||||
|
|
|
@ -19,7 +19,7 @@ function MetaDataManager() constructor {
|
|||
author_steam_id = 0;
|
||||
file_id = 0;
|
||||
tags = [];
|
||||
version = 0;
|
||||
version = SAVE_VERSION;
|
||||
steam = false;
|
||||
|
||||
static displays = [
|
||||
|
@ -32,13 +32,14 @@ function MetaDataManager() constructor {
|
|||
|
||||
static serialize = function() {
|
||||
var m = {};
|
||||
m.description = description;
|
||||
m.author = author;
|
||||
m.contact = contact;
|
||||
m.alias = alias;
|
||||
m.aut_id = author_steam_id;
|
||||
m.file_id = file_id;
|
||||
m.tags = tags;
|
||||
m.description = description;
|
||||
m.author = author;
|
||||
m.contact = contact;
|
||||
m.alias = alias;
|
||||
m.aut_id = author_steam_id;
|
||||
m.file_id = file_id;
|
||||
m.tags = tags;
|
||||
m.version = version;
|
||||
|
||||
return m;
|
||||
}
|
||||
|
@ -51,6 +52,7 @@ function MetaDataManager() constructor {
|
|||
author_steam_id = struct_try_get(m, "aut_id", author_steam_id);
|
||||
file_id = struct_try_get(m, "file_id", file_id);
|
||||
tags = struct_try_get(m, "tags", tags);
|
||||
version = struct_try_get(m, "version", version);
|
||||
|
||||
return self;
|
||||
}
|
||||
|
|
|
@ -1,11 +1,13 @@
|
|||
function Node_RGB_Channel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) constructor {
|
||||
name = "RGBA Extract";
|
||||
|
||||
inputs[| 0] = nodeValue("Surface in", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
|
||||
inputs[| 0] = nodeValue("Surface In", self, JUNCTION_CONNECT.input, VALUE_TYPE.surface, 0);
|
||||
|
||||
inputs[| 1] = nodeValue("Output type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||
inputs[| 1] = nodeValue("Output Type", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||
.setDisplay(VALUE_DISPLAY.enum_scroll, ["Channel value", "Greyscale"]);
|
||||
|
||||
inputs[| 2] = nodeValue("Keep Alpha", self, JUNCTION_CONNECT.input, VALUE_TYPE.boolean, false);
|
||||
|
||||
outputs[| 0] = nodeValue("Red", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||
outputs[| 1] = nodeValue("Green", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||
outputs[| 2] = nodeValue("Blue", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||
|
@ -15,6 +17,7 @@ function Node_RGB_Channel(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
|||
|
||||
static process_data = function(_outSurf, _data, output_index) {
|
||||
var _out = _data[1];
|
||||
var _alp = _data[2];
|
||||
|
||||
surface_set_target(_outSurf);
|
||||
DRAW_CLEAR
|
||||
|
@ -25,6 +28,8 @@ function Node_RGB_Channel(_x, _y, _group = noone) : Node_Processor(_x, _y, _grou
|
|||
case 2 : shader_set(_out? sh_channel_B_grey : sh_channel_B); break;
|
||||
case 3 : shader_set(_out? sh_channel_A_grey : sh_channel_A); break;
|
||||
}
|
||||
shader_set_i("keepAlpha", _alp);
|
||||
|
||||
draw_surface_safe(_data[0], 0, 0);
|
||||
shader_reset();
|
||||
BLEND_NORMAL;
|
||||
|
|
|
@ -1461,8 +1461,8 @@ function Panel_Animation() : PanelContent() constructor {
|
|||
var ot = 0, ov = true;
|
||||
var x0 = 0, x1 = 0;
|
||||
|
||||
for( var i = 0; i < ds_list_size(active_inp.animator.values); i++ ) {
|
||||
var k = active_inp.animator.values[| i];
|
||||
for( var j = 0; j < ds_list_size(active_inp.animator.values); j++ ) {
|
||||
var k = active_inp.animator.values[| j];
|
||||
|
||||
var t = k.time;
|
||||
var v = k.value;
|
||||
|
|
|
@ -39,17 +39,20 @@ function Panel_Collection() : PanelContent() constructor {
|
|||
if(meta == noone || !meta.steam) {
|
||||
contentMenu = [
|
||||
menuItem(__txtx("panel_collection_replace", "Replace with selected"), function() {
|
||||
saveCollection(PANEL_INSPECTOR.inspecting, _menu_node.data_path, _menu_node.path, false, _menu_node.meta);
|
||||
var _path = filename_dir(_menu_node.path);
|
||||
var _name = filename_name(_menu_node.path);
|
||||
|
||||
saveCollection(PANEL_INSPECTOR.inspecting, _path, _name, false, _menu_node.meta);
|
||||
}),
|
||||
menuItem(__txtx("panel_collection_edit_meta", "Edit metadata") + "...", function() {
|
||||
var dia = dialogCall(o_dialog_file_name_collection, mouse_mx + ui(8), mouse_my + ui(-320));
|
||||
var dia = dialogCall(o_dialog_file_name_collection, mouse_mx + ui(8), mouse_my + ui(-320));
|
||||
var meta = _menu_node.getMetadata();
|
||||
if(meta != noone && meta != undefined)
|
||||
dia.meta = meta;
|
||||
|
||||
dia.node = PANEL_INSPECTOR.inspecting;
|
||||
dia.data_path = data_path;
|
||||
dia.updating = _menu_node;
|
||||
dia.updating = _menu_node;
|
||||
dia.doExpand();
|
||||
}),
|
||||
-1,
|
||||
|
|
|
@ -122,6 +122,8 @@ function SAVE_AT(project = PROJECT, path = "", log = "save at ") {
|
|||
return true;
|
||||
}
|
||||
|
||||
/////////////////////////////////////////////////////// COLLECTION ///////////////////////////////////////////////////////
|
||||
|
||||
function SAVE_COLLECTIONS(_list, _path, save_surface = true, metadata = noone, context = PANEL_GRAPH.getCurrentContext()) {
|
||||
var _content = {};
|
||||
_content.version = SAVE_VERSION;
|
||||
|
@ -148,12 +150,16 @@ function SAVE_COLLECTIONS(_list, _path, save_surface = true, metadata = noone, c
|
|||
SAVE_NODE(_nodes, _list[| i], cx, cy, true, context);
|
||||
_content.nodes = _nodes;
|
||||
|
||||
if(metadata != noone)
|
||||
_content.metadata = metadata.serialize();
|
||||
json_save_struct(_path, _content, !PREF_MAP[? "save_file_minify"]);
|
||||
|
||||
var file = file_text_open_write(_path);
|
||||
file_text_write_string(file, PREF_MAP[? "save_file_minify"]? json_stringify_minify(_content) : json_stringify(_content, true));
|
||||
file_text_close(file);
|
||||
if(metadata != noone) {
|
||||
var _meta = metadata.serialize();
|
||||
var _dir = filename_dir(_path);
|
||||
var _name = filename_name_only(_path);
|
||||
var _mpath = $"{_dir}/{_name}.meta";
|
||||
|
||||
json_save_struct(_mpath, _meta, true);
|
||||
}
|
||||
|
||||
var pane = findPanel("Panel_Collection");
|
||||
if(pane) pane.refreshContext();
|
||||
|
@ -178,12 +184,16 @@ function SAVE_COLLECTION(_node, _path, save_surface = true, metadata = noone, co
|
|||
SAVE_NODE(_nodes, _node, _node.x, _node.y, true, context);
|
||||
_content.nodes = _nodes;
|
||||
|
||||
if(metadata != noone)
|
||||
_content.metadata = metadata.serialize();
|
||||
json_save_struct(_path, _content, !PREF_MAP[? "save_file_minify"]);
|
||||
|
||||
var file = file_text_open_write(_path);
|
||||
file_text_write_string(file, PREF_MAP[? "save_file_minify"]? json_stringify_minify(_content) : json_stringify(_content, true));
|
||||
file_text_close(file);
|
||||
if(metadata != noone) {
|
||||
var _meta = metadata.serialize();
|
||||
var _dir = filename_dir(_path);
|
||||
var _name = filename_name_only(_path);
|
||||
var _mpath = $"{_dir}/{_name}.meta";
|
||||
|
||||
json_save_struct(_mpath, _meta, true);
|
||||
}
|
||||
|
||||
var pane = findPanel("Panel_Collection");
|
||||
if(pane) pane.refreshContext();
|
||||
|
|
|
@ -9,6 +9,8 @@ function steam_ugc_create_collection(file) {
|
|||
directory_destroy(DIRECTORY + "steamUGC");
|
||||
directory_create(DIRECTORY + "steamUGC");
|
||||
file_copy(file.path, DIRECTORY + "steamUGC/" + filename_name(file.path));
|
||||
file_copy(file.meta_path, DIRECTORY + "steamUGC/" + filename_name(file.meta_path));
|
||||
|
||||
if(array_safe_get(file.spr_path, 0, 0) != 0)
|
||||
file_copy(file.spr_path[0], DIRECTORY + "steamUGC/" + filename_name(file.spr_path[0]));
|
||||
steam_ugc_collection_generate(file);
|
||||
|
@ -27,6 +29,7 @@ function steam_ugc_update_collection(file, update_preview = false) {
|
|||
directory_destroy(DIRECTORY + "steamUGC");
|
||||
directory_create(DIRECTORY + "steamUGC");
|
||||
file_copy(file.path, DIRECTORY + "steamUGC/" + filename_name(file.path));
|
||||
file_copy(file.meta_path, DIRECTORY + "steamUGC/" + filename_name(file.meta_path));
|
||||
if(array_safe_get(file.spr_path, 0, 0) != 0)
|
||||
file_copy(file.spr_path[0], DIRECTORY + "steamUGC/" + filename_name(file.spr_path[0]));
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ function __test_update_current_collections() {
|
|||
print(" > Updating " + _node.path);
|
||||
var _map = json_load(_node.path);
|
||||
_map[? "version"] = SAVE_VERSION;
|
||||
json_save(_node.path, _map);
|
||||
json_save(_node.meta_path, _map);
|
||||
}
|
||||
|
||||
for( var i = 0; i < ds_list_size(_st.subDir); i++ )
|
||||
|
@ -36,7 +36,7 @@ function __test_update_sample_projects() {
|
|||
print(" > Updating " + _proj.path);
|
||||
var _map = json_load(_proj.path);
|
||||
_map[? "version"] = SAVE_VERSION;
|
||||
json_save(_proj.path, _map);
|
||||
json_save(_proj.meta_path, _map);
|
||||
}
|
||||
|
||||
print("---------- PROJECT UPDATING ENDED ----------");
|
||||
|
@ -125,7 +125,7 @@ function __test_load_all_nodes() {
|
|||
if(index > inded) break;
|
||||
if(index > indst) {
|
||||
var node = ALL_NODES[? k];
|
||||
print("==== Building " + node.node);
|
||||
print($"==== Building {node.node} ====");
|
||||
var b = node.build(xx, yy);
|
||||
|
||||
if(++ind > col) {
|
||||
|
@ -156,7 +156,8 @@ function __test_metadata_current_collections() {
|
|||
|
||||
print("---------- COLLECTION UPDATING STARTED ----------");
|
||||
|
||||
var sel = PANEL_GRAPH.node_focus, outj = noone;
|
||||
var sel = PANEL_GRAPH.node_focus, outj = noone;
|
||||
var _meta = METADATA.serialize();
|
||||
if(sel != noone) outj = sel.outputs[| 0];
|
||||
|
||||
while(!ds_stack_empty(st)) {
|
||||
|
@ -165,9 +166,7 @@ function __test_metadata_current_collections() {
|
|||
var _node = _st.content[| i];
|
||||
|
||||
print(" > Updating " + _node.path);
|
||||
var _map = json_load(_node.path);
|
||||
ds_map_add_map(_map, "metadata", METADATA.serialize());
|
||||
json_save(_node.path, _map);
|
||||
json_save_struct(_node.meta_path, _meta, true);
|
||||
}
|
||||
|
||||
for( var i = 0; i < ds_list_size(_st.subDir); i++ )
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform int keepAlpha;
|
||||
|
||||
void main() {
|
||||
vec4 col = texture2D( gm_BaseTexture, v_vTexcoord);
|
||||
gl_FragColor = vec4(vec3(1.), col.a);
|
||||
|
|
|
@ -4,6 +4,8 @@
|
|||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform int keepAlpha;
|
||||
|
||||
void main() {
|
||||
vec4 col = texture2D( gm_BaseTexture, v_vTexcoord);
|
||||
gl_FragColor = vec4(col.a, col.a, col.a, 1.);
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform int keepAlpha;
|
||||
|
||||
void main() {
|
||||
vec4 col = texture2D( gm_BaseTexture, v_vTexcoord);
|
||||
gl_FragColor = vec4(0., 0., col.b, 1.);
|
||||
gl_FragColor = vec4(0., 0., col.b, keepAlpha == 1? col.a : 1.);
|
||||
}
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform int keepAlpha;
|
||||
|
||||
void main() {
|
||||
vec4 col = texture2D( gm_BaseTexture, v_vTexcoord);
|
||||
gl_FragColor = vec4(col.b, col.b, col.b, 1.);
|
||||
gl_FragColor = vec4(col.b, col.b, col.b, keepAlpha == 1? col.a : 1.);
|
||||
}
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform int keepAlpha;
|
||||
|
||||
void main() {
|
||||
vec4 col = texture2D( gm_BaseTexture, v_vTexcoord);
|
||||
gl_FragColor = vec4(0., col.g, 0., 1.);
|
||||
gl_FragColor = vec4(0., col.g, 0., keepAlpha == 1? col.a : 1.);
|
||||
}
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform int keepAlpha;
|
||||
|
||||
void main() {
|
||||
vec4 col = texture2D( gm_BaseTexture, v_vTexcoord);
|
||||
gl_FragColor = vec4(col.g, col.g, col.g, 1.);
|
||||
gl_FragColor = vec4(col.g, col.g, col.g, keepAlpha == 1? col.a : 1.);
|
||||
}
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform int keepAlpha;
|
||||
|
||||
void main() {
|
||||
vec4 col = texture2D( gm_BaseTexture, v_vTexcoord);
|
||||
gl_FragColor = vec4(col.r, 0., 0., 1.);
|
||||
gl_FragColor = vec4(col.r, 0., 0., keepAlpha == 1? col.a : 1.);
|
||||
}
|
||||
|
|
|
@ -4,7 +4,9 @@
|
|||
varying vec2 v_vTexcoord;
|
||||
varying vec4 v_vColour;
|
||||
|
||||
uniform int keepAlpha;
|
||||
|
||||
void main() {
|
||||
vec4 col = texture2D( gm_BaseTexture, v_vTexcoord);
|
||||
gl_FragColor = vec4(col.r, col.r, col.r, 1.);
|
||||
gl_FragColor = vec4(col.r, col.r, col.r, keepAlpha == 1? col.a : 1.);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue