mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-25 06:26:42 +01:00
- Surface dimension project property now persisted.
This commit is contained in:
parent
320ba73b40
commit
6b564b56c3
8 changed files with 37 additions and 3 deletions
|
@ -425,6 +425,7 @@
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_resize.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_resize.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_use_experssion.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_use_experssion.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_use_global.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_use_global.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
||||||
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_node_use_project.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_noti_icon_console_failed.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_noti_icon_console_failed.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_noti_icon_console.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_noti_icon_console.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
||||||
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_noti_icon_error_strip2.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
{"resourceType":"GMIncludedFile","resourceVersion":"1.0","name":"s_noti_icon_error_strip2.png","CopyToMask":-1,"filePath":"datafiles/data/themes/default/graphics/icon",},
|
||||||
|
|
Binary file not shown.
|
@ -236,6 +236,13 @@ function drawWidget(xx, yy, ww, _m, jun, global_var = true, _hover = false, _foc
|
||||||
if(jun.connect_type == JUNCTION_CONNECT.input) {
|
if(jun.connect_type == JUNCTION_CONNECT.input) {
|
||||||
wid.setInteract(!jun.hasJunctionFrom());
|
wid.setInteract(!jun.hasJunctionFrom());
|
||||||
if(_focus) wid.register(_scrollPane);
|
if(_focus) wid.register(_scrollPane);
|
||||||
|
|
||||||
|
if(jun.value_tag == "dimension") {
|
||||||
|
var _proj = jun.node.attributes.use_project_dimension;
|
||||||
|
|
||||||
|
wid.side_button.icon_index = _proj;
|
||||||
|
wid.side_button.icon_blend = _proj? c_white : COLORS._main_icon;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
wid.setInteract(false);
|
wid.setInteract(false);
|
||||||
}
|
}
|
||||||
|
|
|
@ -907,6 +907,9 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static attributeDeserialize = function(attr) { #region
|
static attributeDeserialize = function(attr) { #region
|
||||||
|
if(struct_has(attributes, "use_project_dimension") && !struct_has(attr, "use_project_dimension"))
|
||||||
|
attributes.use_project_dimension = false;
|
||||||
|
|
||||||
if(struct_has(attr, "layer_visible"))
|
if(struct_has(attr, "layer_visible"))
|
||||||
attributes.layer_visible = attr.layer_visible;
|
attributes.layer_visible = attr.layer_visible;
|
||||||
|
|
||||||
|
|
|
@ -831,6 +831,9 @@ function Node_Composite(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static attributeDeserialize = function(attr) { #region
|
static attributeDeserialize = function(attr) { #region
|
||||||
|
if(struct_has(attributes, "use_project_dimension") && !struct_has(attr, "use_project_dimension"))
|
||||||
|
attributes.use_project_dimension = false;
|
||||||
|
|
||||||
if(struct_has(attr, "layer_visible"))
|
if(struct_has(attr, "layer_visible"))
|
||||||
attributes.layer_visible = attr.layer_visible;
|
attributes.layer_visible = attr.layer_visible;
|
||||||
|
|
||||||
|
|
|
@ -1774,7 +1774,12 @@ function Node(_x, _y, _group = PANEL_GRAPH.getCurrentContext()) : __Node_Base(_x
|
||||||
createNewInput();
|
createNewInput();
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
static attributeDeserialize = function(attr) { struct_override(attributes, attr); }
|
static attributeDeserialize = function(attr) {
|
||||||
|
if(struct_has(attributes, "use_project_dimension") && !struct_has(attr, "use_project_dimension"))
|
||||||
|
attributes.use_project_dimension = false;
|
||||||
|
struct_override(attributes, attr);
|
||||||
|
}
|
||||||
|
|
||||||
static postDeserialize = function() {}
|
static postDeserialize = function() {}
|
||||||
static processDeserialize = function() {}
|
static processDeserialize = function() {}
|
||||||
|
|
||||||
|
|
|
@ -574,6 +574,7 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||||
def_length = is_array(def_val)? array_length(def_val) : 0;
|
def_length = is_array(def_val)? array_length(def_val) : 0;
|
||||||
unit = new nodeValueUnit(self);
|
unit = new nodeValueUnit(self);
|
||||||
dyna_depo = ds_list_create();
|
dyna_depo = ds_list_create();
|
||||||
|
value_tag = "";
|
||||||
|
|
||||||
is_changed = true;
|
is_changed = true;
|
||||||
cache_value = [ false, false, undefined, undefined ];
|
cache_value = [ false, false, undefined, undefined ];
|
||||||
|
@ -849,6 +850,15 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||||
|
|
||||||
if(len == 2) {
|
if(len == 2) {
|
||||||
extract_node = [ "Node_Vector2", "Node_Path" ];
|
extract_node = [ "Node_Vector2", "Node_Path" ];
|
||||||
|
|
||||||
|
if(def_val == DEF_SURF) {
|
||||||
|
value_tag = "dimension";
|
||||||
|
node.attributes.use_project_dimension = true;
|
||||||
|
editWidget.side_button = button(function() {
|
||||||
|
node.attributes.use_project_dimension = !node.attributes.use_project_dimension;
|
||||||
|
node.triggerRender();
|
||||||
|
}).setIcon(THEME.node_use_project, 0, COLORS._main_icon).setTooltip("Use project dimension");
|
||||||
|
}
|
||||||
} else if(len == 3)
|
} else if(len == 3)
|
||||||
extract_node = "Node_Vector3";
|
extract_node = "Node_Vector3";
|
||||||
else if(len == 4)
|
else if(len == 4)
|
||||||
|
@ -1389,6 +1399,8 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||||
static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { #region
|
static getValue = function(_time = CURRENT_FRAME, applyUnit = true, arrIndex = 0, useCache = false, log = false) { #region
|
||||||
if(type == VALUE_TYPE.trigger)
|
if(type == VALUE_TYPE.trigger)
|
||||||
useCache = false;
|
useCache = false;
|
||||||
|
if(value_tag == "dimension" && node.attributes.use_project_dimension)
|
||||||
|
return PROJECT.attributes.surface_dimension;
|
||||||
|
|
||||||
global.cache_call++;
|
global.cache_call++;
|
||||||
if(useCache && use_cache) {
|
if(useCache && use_cache) {
|
||||||
|
@ -1715,6 +1727,9 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||||
|
|
||||||
if(!updated) return false;
|
if(!updated) return false;
|
||||||
|
|
||||||
|
if(value_tag == "dimension" && struct_try_get(node.attributes, "use_project_dimension"))
|
||||||
|
node.attributes.use_project_dimension = false;
|
||||||
|
|
||||||
draw_junction_index = type;
|
draw_junction_index = type;
|
||||||
if(type == VALUE_TYPE.surface) {
|
if(type == VALUE_TYPE.surface) {
|
||||||
var _sval = val;
|
var _sval = val;
|
||||||
|
|
|
@ -59,8 +59,8 @@
|
||||||
} #endregion
|
} #endregion
|
||||||
|
|
||||||
attributeEditor = [ #region
|
attributeEditor = [ #region
|
||||||
[ "Default Surface", "surface_dimension", new vectorBox(2, function(ind, val) { attributes.surface_dimension[ind] = val; return true; }) ],
|
[ "Default Surface", "surface_dimension", new vectorBox(2, function(ind, val) { attributes.surface_dimension[ind] = val; RENDER_ALL return true; }) ],
|
||||||
[ "Palette", "palette", new buttonPalette(function(pal) { attributes.palette = pal; return true; }) ],
|
[ "Palette", "palette", new buttonPalette(function(pal) { attributes.palette = pal; RENDER_ALL return true; }) ],
|
||||||
]; #endregion
|
]; #endregion
|
||||||
|
|
||||||
timelines = new timelineItemGroup();
|
timelines = new timelineItemGroup();
|
||||||
|
|
Loading…
Reference in a new issue