mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-11-14 22:43:53 +01:00
inline group shift
This commit is contained in:
parent
7f15c0fbd3
commit
cf4fdc83b0
@ -35,6 +35,7 @@ function Node_Array_Split(_x, _y, _group = noone) : Node(_x, _y, _group) constru
|
||||
array_delete(outputs, array_length(outputs) - 1, 1);
|
||||
|
||||
for (var i = 0, n = amo; i < n; i++) {
|
||||
outputs[i].index = i;
|
||||
outputs[i].setType(type);
|
||||
outputs[i].resetDisplay();
|
||||
}
|
||||
|
@ -31,6 +31,8 @@ function Node_Collection_Inline(_x, _y, _group = noone) : Node(_x, _y, _group) c
|
||||
if(node.inline_context == self)
|
||||
node.inline_context = noone;
|
||||
onRemoveNode(node);
|
||||
|
||||
// print($"Pose remove node : {array_length(nodes)}");
|
||||
}
|
||||
|
||||
static onRemoveNode = function(node) {}
|
||||
@ -42,8 +44,11 @@ function Node_Collection_Inline(_x, _y, _group = noone) : Node(_x, _y, _group) c
|
||||
|
||||
array_push_unique(attributes.members, node.node_id);
|
||||
array_push_unique(nodes, node);
|
||||
refreshGroupBG();
|
||||
|
||||
onAddNode(node);
|
||||
|
||||
// print($"Pose add node : {array_length(nodes)}");
|
||||
}
|
||||
|
||||
static addPoint = function(_x, _y) {
|
||||
@ -182,26 +187,14 @@ function Node_Collection_Inline(_x, _y, _group = noone) : Node(_x, _y, _group) c
|
||||
if(key_mod_down(SHIFT)) {
|
||||
if(group_hovering) {
|
||||
group_adding = true;
|
||||
for( var i = 0, n = array_length(_list); i < n; i++ ) {
|
||||
if(_list[i].manual_ungroupable)
|
||||
addNode(_list[i]);
|
||||
}
|
||||
for( var i = 0, n = array_length(_list); i < n; i++ )
|
||||
if(_list[i].manual_ungroupable) addNode(_list[i]);
|
||||
|
||||
} else {
|
||||
for( var i = 0, n = array_length(_list); i < n; i++ ) {
|
||||
if(_list[i].manual_ungroupable)
|
||||
removeNode(_list[i]);
|
||||
}
|
||||
for( var i = 0, n = array_length(_list); i < n; i++ )
|
||||
if(_list[i].manual_ungroupable) removeNode(_list[i]);
|
||||
}
|
||||
}
|
||||
|
||||
if(keyboard_check_pressed(vk_shift)) {
|
||||
for( var i = 0, n = array_length(_list); i < n; i++ ) {
|
||||
if(_list[i].manual_ungroupable)
|
||||
removeNode(_list[i]);
|
||||
}
|
||||
refreshMember();
|
||||
refreshGroupBG();
|
||||
}
|
||||
}
|
||||
|
||||
if(group_dragging && mouse_release(mb_left)) {
|
||||
|
@ -16,27 +16,19 @@ function Node_Find_Pixel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
|
||||
newInput(5, nodeValue_Float("Alpha tolerance", self, 0.2))
|
||||
.setDisplay(VALUE_DISPLAY.slider);
|
||||
|
||||
// newInput(6, nodeValue_Enum_Button("Axis", self, 1, [ "X", "Y" ]));
|
||||
|
||||
newOutput(0, nodeValue_Output("Position", self, VALUE_TYPE.integer, [ 0, 0 ]))
|
||||
.setDisplay(VALUE_DISPLAY.vector);
|
||||
|
||||
input_display_list = [ 0,
|
||||
["Search", false], 1, 2, 3,
|
||||
["Search", false ], 1, 2, 3,
|
||||
["Alpha", true, 4], 5,
|
||||
]
|
||||
|
||||
static getPreviewValues = function() { return getInputData(0); }
|
||||
|
||||
temp_surface = [ surface_create(1, 1) ];
|
||||
|
||||
static step = function() { #region
|
||||
// var _all = getInputData(3);
|
||||
|
||||
// inputs[6].setVisible(_all);
|
||||
} #endregion
|
||||
static getPreviewValues = function() { return getInputData(0); }
|
||||
|
||||
static processData = function(_output, _data, _output_index, _array_index = 0) { #region
|
||||
static processData = function(_output, _data, _output_index, _array_index = 0) {
|
||||
var _surf = _data[0];
|
||||
var _col = _data[1];
|
||||
var _tol = _data[2];
|
||||
@ -44,7 +36,6 @@ function Node_Find_Pixel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
|
||||
|
||||
var _alp = _data[4];
|
||||
var _alpT = _data[5];
|
||||
// var _axis = _data[6];
|
||||
|
||||
if(!is_surface(_surf)) return [0, 0];
|
||||
|
||||
@ -81,9 +72,9 @@ function Node_Find_Pixel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
|
||||
|
||||
buffer_delete(_buff);
|
||||
return _all? res : [ -1, -1 ];
|
||||
} #endregion
|
||||
}
|
||||
|
||||
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) { #region
|
||||
static onDrawNode = function(xx, yy, _mx, _my, _s, _hover, _focus) {
|
||||
var bbox = drawGetBbox(xx, yy, _s);
|
||||
var col = getInputData(1);
|
||||
|
||||
@ -95,5 +86,5 @@ function Node_Find_Pixel(_x, _y, _group = noone) : Node_Processor(_x, _y, _group
|
||||
}
|
||||
|
||||
drawColor(col, bbox.x0, bbox.y0, bbox.w, bbox.h);
|
||||
} #endregion
|
||||
}
|
||||
}
|
@ -2246,10 +2246,8 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||
}
|
||||
|
||||
static connect = function(log = false) {
|
||||
//print($"{node} | {con_node} : {con_index}");
|
||||
|
||||
if(con_node == -1 || con_index == -1)
|
||||
return true;
|
||||
if(con_node == -1 || con_index == -1) return true;
|
||||
// print($"{node} | {con_node} : {con_index}");
|
||||
|
||||
var _node = con_node;
|
||||
if(APPENDING) {
|
||||
@ -2552,8 +2550,8 @@ function drawJuncConnection(from, to, params) {
|
||||
|
||||
switch(PREFERENCES.curve_connection_line) {
|
||||
case 0 :
|
||||
if(downDirection) draw_line_width_color(jx, jy, frx, fry, th, c1, c0);
|
||||
else draw_line_connect(frx, fry, jx, jy, ss, th, c1, c0, _drawParam);
|
||||
if(downDirection) draw_line_width_color(jx, jy, frx, fry, th, c0, c1);
|
||||
else draw_line_connect(frx, fry, jx, jy, ss, th, c0, c1, _drawParam);
|
||||
break;
|
||||
|
||||
case 1 :
|
||||
|
@ -50,13 +50,13 @@
|
||||
}
|
||||
|
||||
graphGrid = {
|
||||
show : true,
|
||||
show : true,
|
||||
show_origin : false,
|
||||
snap : true,
|
||||
size : 16,
|
||||
opacity : 0.05,
|
||||
color : cola(c_white),
|
||||
highlight : 12,
|
||||
snap : true,
|
||||
size : 16,
|
||||
color : cola(c_white),
|
||||
opacity : 0.05,
|
||||
highlight : 12,
|
||||
}
|
||||
|
||||
graph_display_parameter = {
|
||||
@ -75,12 +75,12 @@
|
||||
addons = {};
|
||||
|
||||
onion_skin = {
|
||||
enabled: false,
|
||||
range: [ -1, 1 ],
|
||||
step: 1,
|
||||
color: [ cola(c_red), cola(c_blue) ],
|
||||
alpha: 0.5,
|
||||
on_top: true,
|
||||
enabled : false,
|
||||
range : [ -1, 1 ],
|
||||
step : 1,
|
||||
color : [ cola(c_red), cola(c_blue) ],
|
||||
alpha : 0.5,
|
||||
on_top : true,
|
||||
};
|
||||
|
||||
tunnels_in = ds_map_create();
|
||||
|
Loading…
Reference in New Issue
Block a user