mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-11-14 22:43:53 +01:00
ar
This commit is contained in:
parent
72c1b8ec7a
commit
913f537f6a
@ -125,7 +125,7 @@ event_inherited();
|
||||
var _ny = yy + grid_size - _th;
|
||||
|
||||
draw_sprite_stretched_ext(THEME.ui_panel, 0, _nx, _ny, _tw, _th - 1, COLORS.panel_bg_clear_inner, 0.85);
|
||||
draw_text_add(xx + grid_size - ui(3), yy + grid_size + ui(1), _txt);
|
||||
draw_text_add(xx + grid_size - ui(3), yy + grid_size - ui(2), _txt);
|
||||
}
|
||||
|
||||
if(sHOVER && contentPane.hover && point_in_rectangle(_m[0], _m[1], xx, yy, xx + grid_size, yy + grid_size)) {
|
||||
|
@ -55,9 +55,7 @@ function FileObject(_name, _path) constructor {
|
||||
}
|
||||
|
||||
static getSpr = function() {
|
||||
if(spr != -1 && sprite_exists(spr))
|
||||
return spr;
|
||||
|
||||
if(spr != -1 && sprite_exists(spr)) return spr;
|
||||
if(sprFetchID != noone) return -1;
|
||||
|
||||
if(array_empty(spr_path)) {
|
||||
|
@ -42,7 +42,7 @@
|
||||
LATEST_VERSION = 1_18_00_0;
|
||||
VERSION = 1_18_04_0;
|
||||
SAVE_VERSION = 1_18_02_0;
|
||||
VERSION_STRING = MAC? "1.18.003m" : "1.18.4.006";
|
||||
VERSION_STRING = MAC? "1.18.003m" : "1.18.4.007";
|
||||
BUILD_NUMBER = 1_18_03_1;
|
||||
|
||||
HOTKEYS = ds_map_create();
|
||||
|
@ -1,6 +1,6 @@
|
||||
function __armature_bind_data(_surface, _bone, _tran, _aang, _pang, _asca, _psca) constructor {
|
||||
surface = new Surface(_surface);
|
||||
bone = _bone.ID;
|
||||
function __armature_bind_data(_surface, _bone = noone, _tran = 0, _aang = 0, _pang = 0, _asca = 0, _psca = 0) constructor {
|
||||
surface = is_struct(_surface)? _surface : new Surface(_surface);
|
||||
bone = _bone == noone? noone : _bone.ID;
|
||||
transform = _tran;
|
||||
applyRot = _aang;
|
||||
applyRotl = _pang;
|
||||
@ -19,6 +19,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
||||
|
||||
newInput(2, nodeValue_Struct("Bind data", self, noone))
|
||||
.setVisible(true, true)
|
||||
.shortenDisplay()
|
||||
.setArrayDepth(1);
|
||||
|
||||
newInput(3, nodeValue_Vec2("Bone transform", self, [ 0, 0 ]));
|
||||
@ -34,6 +35,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
||||
.rejectArrayProcess();
|
||||
|
||||
newOutput(2, nodeValue_Output("Bind data", self, VALUE_TYPE.struct, []))
|
||||
.shortenDisplay()
|
||||
.setArrayDepth(1);
|
||||
|
||||
attribute_surface_depth();
|
||||
@ -482,7 +484,7 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
||||
ds_stack_destroy(_bst);
|
||||
}
|
||||
|
||||
static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
||||
static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) {
|
||||
if(isUsingTool("Pose")) {
|
||||
var _arm = inputs[1].value_from;
|
||||
if(_arm == noone) return;
|
||||
@ -846,12 +848,13 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
||||
var _dpos = _data[3];
|
||||
var _dsca = _data[4];
|
||||
var cDep = attrDepth();
|
||||
var use_data = _bind != noone;
|
||||
|
||||
setBone();
|
||||
|
||||
//////////////////////////////////////////
|
||||
|
||||
if(getInputAmount() == 0) return _outData;
|
||||
if(!use_data && getInputAmount() == 0) return _outData;
|
||||
dynamic_input_inspecting = clamp(dynamic_input_inspecting, 0, getInputAmount() - 1);
|
||||
|
||||
overlay_w = _dim[0];
|
||||
@ -862,7 +865,6 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
||||
surface_clear(temp_surface[i]);
|
||||
}
|
||||
|
||||
var use_data = _bind != noone;
|
||||
var imageAmo = use_data? array_length(_bind) : (array_length(inputs) - input_fix_len) / data_length;
|
||||
var _vis = attributes.layer_visible;
|
||||
var _bg = 0, _s, _i;
|
||||
@ -876,13 +878,17 @@ function Node_Armature_Bind(_x, _y, _group = noone) : Node_Processor(_x, _y, _gr
|
||||
if(use_data) {
|
||||
var _bdat = array_safe_get_fast(_bind, i);
|
||||
if(is(_bdat, __armature_bind_data))
|
||||
_s = _bdat.surface.get();
|
||||
_s = _bdat.surface;
|
||||
|
||||
if(is(_s, Surface))
|
||||
_s = _s.get();
|
||||
|
||||
} else
|
||||
_s = array_safe_get_fast(_data, _i);
|
||||
|
||||
if(is(_s, RiggedMeshedSurface)) {
|
||||
meshBind(_s, _bg);
|
||||
array_push(bind_data, new __armature_bind_data(_s));
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -1691,6 +1691,9 @@ function NodeValue(_name, _node, _connect, _type, _value, _tooltip = "") constru
|
||||
static setFrom = function(_valueFrom, _update = true, checkRecur = true, log = false) { //// Set from
|
||||
|
||||
if(is_dummy && dummy_get != noone) {
|
||||
var conn = isConnectable(_valueFrom, checkRecur, log);
|
||||
if(conn < 0) return conn;
|
||||
|
||||
var _targ = dummy_get();
|
||||
dummy_target = _targ;
|
||||
UNDO_HOLDING = true;
|
||||
|
@ -35,6 +35,8 @@ function __NodeValue_Output(_name, _node, _type, _value, _tooltip = "") : NodeVa
|
||||
output_value = val;
|
||||
return true;
|
||||
}
|
||||
|
||||
static shortenDisplay = function() { editWidget.shorted = true; return self; }
|
||||
}
|
||||
|
||||
function __NodeValue_Input_Bypass(_from, _name, _node, _type, _index) : __NodeValue_Output(_name, _node, _type, 0, "") constructor {
|
||||
|
@ -2,4 +2,5 @@ function nodeValue_Struct(_name, _node, _value, _tooltip = "") { return new __No
|
||||
|
||||
function __NodeValue_Struct(_name, _node, _value, _tooltip = "") : __NodeValue_Object_Generic(_name, _node, VALUE_TYPE.struct, _value, _tooltip) constructor {
|
||||
|
||||
static shortenDisplay = function() { editWidget.shorted = true; return self; }
|
||||
}
|
@ -1,5 +1,6 @@
|
||||
function outputBox() : widget() constructor {
|
||||
expand = false;
|
||||
expand = false;
|
||||
shorted = false;
|
||||
|
||||
static trigger = function() { }
|
||||
|
||||
@ -15,7 +16,7 @@ function outputBox() : widget() constructor {
|
||||
|
||||
draw_set_text(font, fa_left, fa_top, COLORS._main_text_sub);
|
||||
|
||||
if(string_length(_value) > 512) {
|
||||
if(shorted || string_length(_value) > 512) {
|
||||
var _hh = string_height("l") + ui(16);
|
||||
|
||||
draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _y, _w, _hh, COLORS._main_icon_light);
|
||||
@ -69,7 +70,8 @@ function outputBox() : widget() constructor {
|
||||
}
|
||||
|
||||
function outputStructBox() : widget() constructor {
|
||||
expand = false;
|
||||
expand = false;
|
||||
shorted = false;
|
||||
|
||||
static trigger = function() { }
|
||||
|
||||
@ -85,6 +87,13 @@ function outputStructBox() : widget() constructor {
|
||||
|
||||
draw_set_text(font, fa_left, fa_top, COLORS._main_text_sub);
|
||||
|
||||
if(shorted) {
|
||||
var _hh = string_height("l") + ui(16);
|
||||
draw_sprite_stretched_ext(THEME.ui_panel_bg, 1, _x, _y, _w, _hh, COLORS._main_icon_light);
|
||||
draw_text_add(_x + ui(8), _y + ui(8), "Output...");
|
||||
return _hh;
|
||||
}
|
||||
|
||||
var _txt = json_stringify(_value, true);
|
||||
var _bh = string_height("l");
|
||||
var _sh = string_height_ext(_txt, -1, w - ui(16));
|
||||
|
Loading…
Reference in New Issue
Block a user