1.16.5
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 80 KiB After Width: | Height: | Size: 80 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
Before Width: | Height: | Size: 58 KiB After Width: | Height: | Size: 58 KiB |
|
@ -13,24 +13,23 @@
|
|||
#region window
|
||||
window_set_min_width(960);
|
||||
window_set_min_height(600);
|
||||
|
||||
draw_set_circle_precision(64);
|
||||
winManInit();
|
||||
|
||||
depth = 0;
|
||||
win_wp = WIN_W;
|
||||
win_hp = WIN_H;
|
||||
win_resize = false;
|
||||
depth = 0;
|
||||
win_wp = WIN_W;
|
||||
win_hp = WIN_H;
|
||||
win_resize = false;
|
||||
|
||||
room_width = WIN_W;
|
||||
room_height = WIN_H;
|
||||
|
||||
draw_set_circle_precision(64);
|
||||
DIALOG_DEPTH_HOVER = 0;
|
||||
UPDATE = RENDER_TYPE.none;
|
||||
CURSOR = cr_default;
|
||||
TOOLTIP = "";
|
||||
DRAGGING = noone;
|
||||
KEYBOARD_STRING = "";
|
||||
UPDATE = RENDER_TYPE.none;
|
||||
CURSOR = cr_default;
|
||||
TOOLTIP = "";
|
||||
DRAGGING = noone;
|
||||
KEYBOARD_STRING = "";
|
||||
|
||||
RENDER_QUEUE = new Queue();
|
||||
RENDER_ORDER = [];
|
||||
|
@ -38,7 +37,7 @@
|
|||
globalvar AUTO_SAVE_TIMER;
|
||||
AUTO_SAVE_TIMER = 0;
|
||||
|
||||
_cursor = CURSOR;
|
||||
_cursor = CURSOR;
|
||||
dc_check = 0;
|
||||
kb_time = 0;
|
||||
kb_hold = false;
|
||||
|
@ -46,36 +45,31 @@
|
|||
|
||||
panelInit();
|
||||
|
||||
addHotkey("", "New file", "N", MOD_KEY.ctrl, NEW);
|
||||
addHotkey("", "New file", "N", MOD_KEY.ctrl, NEW);
|
||||
if(!DEMO) {
|
||||
addHotkey("", "Save", "S", MOD_KEY.ctrl, SAVE );
|
||||
addHotkey("", "Save as", "S", MOD_KEY.ctrl | MOD_KEY.shift, SAVE_AS );
|
||||
addHotkey("", "Save all", "S", MOD_KEY.ctrl | MOD_KEY.alt, SAVE_ALL );
|
||||
addHotkey("", "Open", "O", MOD_KEY.ctrl, function() { LOAD(); });
|
||||
addHotkey("", "Save", "S", MOD_KEY.ctrl, SAVE);
|
||||
addHotkey("", "Save as", "S", MOD_KEY.ctrl | MOD_KEY.shift, SAVE_AS);
|
||||
addHotkey("", "Save all", "S", MOD_KEY.ctrl | MOD_KEY.alt, SAVE_ALL);
|
||||
addHotkey("", "Open", "O", MOD_KEY.ctrl, LOAD);
|
||||
}
|
||||
|
||||
addHotkey("", "Undo", "Z", MOD_KEY.ctrl, function() { UNDO(); });
|
||||
addHotkey("", "Redo", "Z", MOD_KEY.ctrl | MOD_KEY.shift, function() { REDO(); });
|
||||
addHotkey("", "Undo", "Z", MOD_KEY.ctrl, UNDO);
|
||||
addHotkey("", "Redo", "Z", MOD_KEY.ctrl | MOD_KEY.shift, REDO);
|
||||
|
||||
addHotkey("", "Full panel", "`", MOD_KEY.none, set_focus_fullscreen);
|
||||
addHotkey("", "Reset layout", vk_f10, MOD_KEY.ctrl, function() { resetPanel(); });
|
||||
addHotkey("", "Full panel", "`", MOD_KEY.none, set_focus_fullscreen);
|
||||
addHotkey("", "Reset layout", vk_f10, MOD_KEY.ctrl, resetPanel);
|
||||
|
||||
addHotkey("", "Open notification", vk_f12, MOD_KEY.none, function() { dialogPanelCall(new Panel_Notification()); });
|
||||
addHotkey("", "Open notification", vk_f12, MOD_KEY.none, function() { dialogPanelCall(new Panel_Notification()); });
|
||||
|
||||
addHotkey("", "Fullscreen", vk_f11, MOD_KEY.none, function() { winMan_setFullscreen(!window_is_fullscreen); });
|
||||
addHotkey("", "Fullscreen", vk_f11, MOD_KEY.none, global_fullscreen);
|
||||
addHotkey("", "Render all", vk_f5, MOD_KEY.none, global_render_all);
|
||||
|
||||
addHotkey("", "Render all", vk_f5, MOD_KEY.none, function() { RENDER_ALL_REORDER });
|
||||
|
||||
addHotkey("", "Close file", "Q", MOD_KEY.ctrl, function() { PANEL_GRAPH.close(); });
|
||||
addHotkey("", "Close program", vk_f4, MOD_KEY.alt, window_close);
|
||||
|
||||
addHotkey("", "Reload theme", vk_f10, MOD_KEY.ctrl | MOD_KEY.shift, function() {
|
||||
loadGraphic(PREFERENCES.theme);
|
||||
resetPanel();
|
||||
} );
|
||||
addHotkey("", "Close file", "Q", MOD_KEY.ctrl, global_project_close);
|
||||
addHotkey("", "Close program", vk_f4, MOD_KEY.alt, window_close);
|
||||
addHotkey("", "Reload theme", vk_f10, MOD_KEY.ctrl | MOD_KEY.shift, global_theme_reload);
|
||||
|
||||
globalvar HOTKEY_MOD, HOTKEY_BLOCK;
|
||||
HOTKEY_MOD = 0;
|
||||
HOTKEY_MOD = 0;
|
||||
HOTKEY_BLOCK = false;
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
function APPEND(_path, context = PANEL_GRAPH.getCurrentContext()) { #region
|
||||
CALL("APPEND");
|
||||
CALL("append");
|
||||
|
||||
if(_path == "") return noone;
|
||||
var _map = json_load_struct(_path);
|
||||
|
|
|
@ -281,7 +281,7 @@ function mergeAction(act) { #region
|
|||
} #endregion
|
||||
|
||||
function UNDO() { #region
|
||||
CALL("UNDO");
|
||||
CALL("undo");
|
||||
|
||||
if(ds_stack_empty(UNDO_STACK)) return;
|
||||
if(instance_exists(_p_dialog_undo_block)) return;
|
||||
|
@ -298,7 +298,7 @@ function UNDO() { #region
|
|||
} #endregion
|
||||
|
||||
function REDO() { #region
|
||||
CALL("REDO");
|
||||
CALL("redo");
|
||||
|
||||
if(ds_stack_empty(REDO_STACK)) return;
|
||||
if(instance_exists(_p_dialog_undo_block)) return;
|
||||
|
|
|
@ -14,14 +14,21 @@
|
|||
globalvar FUNCTIONS;
|
||||
FUNCTIONS = {};
|
||||
|
||||
__registerFunction("NEW", NEW, []);
|
||||
__registerFunction("SAVE_AT", SAVE_AT, [ ARG("project", function() { return PROJECT; }, true), ARG("path", ""), ARG("log", "save at ") ]);
|
||||
__registerFunction("LOAD_AT", LOAD_AT, [ ARG("path", ""), ARG("readonly", false), ARG("override", false) ]);
|
||||
__registerFunction("CLOSE", closeProject, [ ARG("project", function() { return PROJECT; }, true) ]);
|
||||
__registerFunction("APPEND", APPEND, [ ARG("path", ""), ARG("context", function() { return PANEL_GRAPH.getCurrentContext(); }, true) ]);
|
||||
__registerFunction("new", NEW);
|
||||
__registerFunction("save", SAVE_AT, [ ARG("project", function() { return PROJECT; }, true), ARG("path", ""), ARG("log", "save at ") ]);
|
||||
__registerFunction("load", LOAD_AT, [ ARG("path", ""), ARG("readonly", false), ARG("override", false) ]);
|
||||
__registerFunction("close", closeProject, [ ARG("project", function() { return PROJECT; }, true) ]);
|
||||
__registerFunction("append", APPEND, [ ARG("path", ""), ARG("context", function() { return PANEL_GRAPH.getCurrentContext(); }, true) ]);
|
||||
|
||||
__registerFunction("UNDO", UNDO, []);
|
||||
__registerFunction("REDO", REDO, []);
|
||||
__registerFunction("undo", UNDO);
|
||||
__registerFunction("redo", REDO);
|
||||
__registerFunction("exit", window_close);
|
||||
|
||||
__fnInit_Global();
|
||||
__fnInit_Preview();
|
||||
__fnInit_Inspector();
|
||||
__fnInit_Animation();
|
||||
__fnInit_Graph();
|
||||
}
|
||||
#endregion
|
||||
|
||||
|
|
|
@ -165,6 +165,22 @@
|
|||
DEF_SURFACE_RESET();
|
||||
#endregion
|
||||
|
||||
#region functions
|
||||
function __fnInit_Global() {
|
||||
__registerFunction("fullscreen", global_fullscreen);
|
||||
__registerFunction("render_all", global_render_all);
|
||||
__registerFunction("project_close", global_project_close);
|
||||
|
||||
__registerFunction("theme_reload", global_theme_reload);
|
||||
}
|
||||
|
||||
function global_fullscreen() { CALL("fullscreen"); winMan_setFullscreen(!window_is_fullscreen); }
|
||||
function global_render_all() { CALL("render_all"); RENDER_ALL_REORDER }
|
||||
function global_project_close() { CALL("project_close"); PANEL_GRAPH.close(); }
|
||||
|
||||
function global_theme_reload() { CALL("theme_reload"); loadGraphic(PREFERENCES.theme); resetPanel(); }
|
||||
#endregion
|
||||
|
||||
#region debug
|
||||
global.FLAG = {};
|
||||
#endregion
|
|
@ -65,22 +65,20 @@ function gradientObject(color = c_black) constructor { #region
|
|||
if(position <= keys[0].time) return keys[0].value;
|
||||
if(position >= keys[_len - 1].time) return keys[_len - 1].value;
|
||||
|
||||
var _pkey = keys[0];
|
||||
|
||||
for(var i = 1; i < _len; i++) {
|
||||
var _key = keys[i];
|
||||
if(_key.time < position) continue;
|
||||
if(_key.time == position) return keys[i].value;
|
||||
var _pkey = keys[i - 1];
|
||||
var _key = keys[i];
|
||||
|
||||
if(_key.time < position) continue;
|
||||
if(_key.time == position) return _key.value;
|
||||
|
||||
var rat = (position - _pkey.time) / (_key.time - _pkey.time);
|
||||
|
||||
switch(type) {
|
||||
case GRADIENT_INTER.smooth : return merge_color(_pkey.value, _key.value, rat);
|
||||
case GRADIENT_INTER.smooth : return merge_color (_pkey.value, _key.value, rat);
|
||||
case GRADIENT_INTER.hue : return merge_color_hsv(_pkey.value, _key.value, rat);
|
||||
case GRADIENT_INTER.none : return _pkey.value;
|
||||
}
|
||||
|
||||
_pkey = _key;
|
||||
}
|
||||
|
||||
return keys[array_length(keys) - 1].value; //after last color
|
||||
|
|
|
@ -50,7 +50,7 @@ function LOAD_PATH(path, readonly = false, safe_mode = false) { #region
|
|||
} #endregion
|
||||
|
||||
function LOAD_AT(path, readonly = false, override = false) { #region
|
||||
CALL("LOAD_AT");
|
||||
CALL("load");
|
||||
|
||||
//print($"========== Loading {path} =========="); var t = get_timer();
|
||||
|
||||
|
|
|
@ -33,13 +33,13 @@ function Node_Bend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
|
|||
static drawOverlay = function(active, _x, _y, _s, _mx, _my, _snx, _sny) { #region
|
||||
draw_set_color(COLORS._main_accent);
|
||||
|
||||
for( var i = 0, n = array_length(mesh); i < n; i++ ) {
|
||||
var _t = mesh[i];
|
||||
//for( var i = 0, n = array_length(mesh); i < n; i++ ) {
|
||||
// var _t = mesh[i];
|
||||
|
||||
draw_line(_x + _t[0][0] * _s, _y + _t[0][1] * _s, _x + _t[1][0] * _s, _y + _t[1][1] * _s);
|
||||
draw_line(_x + _t[1][0] * _s, _y + _t[1][1] * _s, _x + _t[2][0] * _s, _y + _t[2][1] * _s);
|
||||
draw_line(_x + _t[2][0] * _s, _y + _t[2][1] * _s, _x + _t[0][0] * _s, _y + _t[0][1] * _s);
|
||||
}
|
||||
// draw_line(_x + _t[0][0] * _s, _y + _t[0][1] * _s, _x + _t[1][0] * _s, _y + _t[1][1] * _s);
|
||||
// draw_line(_x + _t[1][0] * _s, _y + _t[1][1] * _s, _x + _t[2][0] * _s, _y + _t[2][1] * _s);
|
||||
// draw_line(_x + _t[2][0] * _s, _y + _t[2][1] * _s, _x + _t[0][0] * _s, _y + _t[0][1] * _s);
|
||||
//}
|
||||
} #endregion
|
||||
|
||||
static step = function() { #region
|
||||
|
@ -58,8 +58,32 @@ function Node_Bend(_x, _y, _group = noone) : Node_Processor(_x, _y, _group) cons
|
|||
var _sw = surface_get_width_safe(_surf);
|
||||
var _sh = surface_get_height_safe(_surf);
|
||||
|
||||
var _gw = min(16, floor(_sw / 4));
|
||||
var _gh = min(16, floor(_sh / 4));
|
||||
var _gw = min(32, floor(_sw / 2));
|
||||
var _gh = min(32, floor(_sh / 2));
|
||||
|
||||
switch(_typ) { #region
|
||||
case 0 :
|
||||
if(_axs == 0) {
|
||||
_gw = min(64, floor(_sw / 2));
|
||||
_gh = min(16, floor(_sh / 2));
|
||||
} else {
|
||||
_gw = min(16, floor(_sw / 2));
|
||||
_gh = min(64, floor(_sh / 2));
|
||||
}
|
||||
break;
|
||||
|
||||
case 1 :
|
||||
if(_axs == 0) {
|
||||
_gw = min(64, floor(_sw / 2));
|
||||
_gh = min(16, floor(_sh / 2));
|
||||
} else {
|
||||
_gw = min(16, floor(_sw / 2));
|
||||
_gh = min(64, floor(_sh / 2));
|
||||
}
|
||||
break;
|
||||
|
||||
} #endregion
|
||||
|
||||
var _dw = _sw / _gw;
|
||||
var _dh = _sh / _gh;
|
||||
|
||||
|
|
|
@ -1,3 +1,33 @@
|
|||
#region funtion calls
|
||||
function __fnInit_Animation() {
|
||||
__registerFunction("animation_play_pause", panel_animation_play_pause);
|
||||
__registerFunction("animation_resume", panel_animation_resume);
|
||||
|
||||
__registerFunction("animation_first_frame", panel_animation_first_frame);
|
||||
__registerFunction("animation_last_frame", panel_animation_last_frame);
|
||||
__registerFunction("animation_next_frame", panel_animation_next_frame);
|
||||
__registerFunction("animation_prev_frame", panel_animation_prev_frame);
|
||||
|
||||
__registerFunction("animation_delete_key", panel_animation_delete_key);
|
||||
__registerFunction("animation_duplicate", panel_animation_duplicate);
|
||||
__registerFunction("animation_copy", panel_animation_copy);
|
||||
__registerFunction("animation_paste", panel_animation_paste);
|
||||
}
|
||||
|
||||
function panel_animation_play_pause() { CALL("animation_play_pause"); if(IS_RENDERING) return; if(IS_PLAYING) PROJECT.animator.pause() else PROJECT.animator.play(); }
|
||||
function panel_animation_resume() { CALL("animation_resume"); if(IS_RENDERING) return; if(PROJECT.animator.is_playing) PROJECT.animator.pause() else PROJECT.animator.resume(); }
|
||||
|
||||
function panel_animation_first_frame() { CALL("animation_first_frame"); if(IS_RENDERING) return; PROJECT.animator.firstFrame(); }
|
||||
function panel_animation_last_frame() { CALL("animation_last_frame"); if(IS_RENDERING) return; PROJECT.animator.lastFrame(); }
|
||||
function panel_animation_next_frame() { CALL("animation_next_frame"); if(IS_RENDERING) return; PROJECT.animator.setFrame(min(PROJECT.animator.real_frame + 1, TOTAL_FRAMES - 1)); }
|
||||
function panel_animation_prev_frame() { CALL("animation_prev_frame"); if(IS_RENDERING) return; PROJECT.animator.setFrame(max(PROJECT.animator.real_frame - 1, 0)); }
|
||||
|
||||
function panel_animation_delete_key() { CALL("animation_delete_key"); PANEL_ANIMATION.deleteKeys(); }
|
||||
function panel_animation_duplicate() { CALL("animation_duplicate"); PANEL_ANIMATION.doDuplicate(); }
|
||||
function panel_animation_copy() { CALL("animation_copy"); PANEL_ANIMATION.doCopy(); }
|
||||
function panel_animation_paste() { CALL("animation_paste"); PANEL_ANIMATION.doPaste(PANEL_ANIMATION.value_focusing); }
|
||||
#endregion
|
||||
|
||||
enum KEYFRAME_DRAG_TYPE {
|
||||
move,
|
||||
ease_in,
|
||||
|
@ -172,18 +202,18 @@ function Panel_Animation() : PanelContent() constructor {
|
|||
#endregion
|
||||
|
||||
#region ++++ hotkeys ++++
|
||||
addHotkey("", "Play/Pause", vk_space, MOD_KEY.none, function() { if(IS_RENDERING) return; if(IS_PLAYING) PROJECT.animator.pause() else PROJECT.animator.play(); });
|
||||
addHotkey("", "Resume/Pause", vk_space, MOD_KEY.shift,function() { if(IS_RENDERING) return; if(PROJECT.animator.is_playing) PROJECT.animator.pause() else PROJECT.animator.resume(); });
|
||||
addHotkey("", "Play/Pause", vk_space, MOD_KEY.none, panel_animation_play_pause);
|
||||
addHotkey("", "Resume/Pause", vk_space, MOD_KEY.shift, panel_animation_resume);
|
||||
|
||||
addHotkey("", "First frame", vk_home, MOD_KEY.none, panel_animation_first_frame);
|
||||
addHotkey("", "Last frame", vk_end, MOD_KEY.none, panel_animation_last_frame);
|
||||
addHotkey("", "Next frame", vk_right, MOD_KEY.none, panel_animation_next_frame);
|
||||
addHotkey("", "Previous frame", vk_left, MOD_KEY.none, panel_animation_prev_frame);
|
||||
|
||||
addHotkey("", "First frame", vk_home, MOD_KEY.none, function() { if(IS_RENDERING) return; PROJECT.animator.firstFrame(); });
|
||||
addHotkey("", "Last frame", vk_end, MOD_KEY.none, function() { if(IS_RENDERING) return; PROJECT.animator.lastFrame(); });
|
||||
addHotkey("", "Next frame", vk_right, MOD_KEY.none, function() { if(IS_RENDERING) return; PROJECT.animator.setFrame(min(PROJECT.animator.real_frame + 1, TOTAL_FRAMES - 1)); });
|
||||
addHotkey("", "Previous frame", vk_left, MOD_KEY.none, function() { if(IS_RENDERING) return; PROJECT.animator.setFrame(max(PROJECT.animator.real_frame - 1, 0)); });
|
||||
|
||||
addHotkey("Animation", "Delete keys", vk_delete, MOD_KEY.none, function() { PANEL_ANIMATION.deleteKeys(); });
|
||||
addHotkey("Animation", "Duplicate", "D", MOD_KEY.ctrl, function() { PANEL_ANIMATION.doDuplicate(); });
|
||||
addHotkey("Animation", "Copy", "C", MOD_KEY.ctrl, function() { PANEL_ANIMATION.doCopy(); });
|
||||
addHotkey("Animation", "Paste", "V", MOD_KEY.ctrl, function() { PANEL_ANIMATION.doPaste(PANEL_ANIMATION.value_focusing); });
|
||||
addHotkey("Animation", "Delete keys", vk_delete, MOD_KEY.none, panel_animation_delete_key);
|
||||
addHotkey("Animation", "Duplicate", "D", MOD_KEY.ctrl, panel_animation_duplicate);
|
||||
addHotkey("Animation", "Copy", "C", MOD_KEY.ctrl, panel_animation_copy);
|
||||
addHotkey("Animation", "Paste", "V", MOD_KEY.ctrl, panel_animation_paste);
|
||||
#endregion
|
||||
|
||||
#region ++++ context menu ++++
|
||||
|
|
|
@ -847,29 +847,28 @@ function Panel(_parent, _x, _y, _w, _h) constructor { #region
|
|||
} #endregion
|
||||
|
||||
function PanelContent() constructor { #region
|
||||
title = "";
|
||||
icon = noone;
|
||||
title = "";
|
||||
icon = noone;
|
||||
context_str = "";
|
||||
draggable = true;
|
||||
expandable = true;
|
||||
resizable = true;
|
||||
|
||||
auto_pin = false;
|
||||
panel = noone;
|
||||
auto_pin = false;
|
||||
panel = noone;
|
||||
|
||||
mx = 0;
|
||||
my = 0;
|
||||
|
||||
x = 0;
|
||||
y = 0;
|
||||
w = 640;
|
||||
h = 480;
|
||||
x = 0;
|
||||
y = 0;
|
||||
w = 640;
|
||||
h = 480;
|
||||
padding = ui(16);
|
||||
title_height = ui(28);
|
||||
|
||||
tab_x = 0;
|
||||
|
||||
min_w = ui(40);
|
||||
min_h = ui(40);
|
||||
tab_x = 0;
|
||||
min_w = ui(40);
|
||||
min_h = ui(40);
|
||||
|
||||
pFOCUS = false;
|
||||
pHOVER = false;
|
||||
|
@ -922,7 +921,7 @@ function PanelContent() constructor { #region
|
|||
static draw = function(panel) { #region
|
||||
self.panel = panel;
|
||||
if(o_main.panel_dragging == noone) {
|
||||
pFOCUS = FOCUS == panel && panel.mouse_active;
|
||||
pFOCUS = FOCUS == panel/* && panel.mouse_active*/;
|
||||
pHOVER = HOVER == panel && panel.mouse_active;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,3 +1,85 @@
|
|||
#region funtion calls
|
||||
function __fnInit_Graph() {
|
||||
__registerFunction("graph_add_node", panel_graph_add_node);
|
||||
__registerFunction("graph_focus_content", panel_graph_focus_content);
|
||||
__registerFunction("graph_preview_focus", panel_graph_preview_focus);
|
||||
__registerFunction("graph_preview_window", panel_graph_preview_window);
|
||||
|
||||
__registerFunction("graph_import_image", panel_graph_import_image);
|
||||
__registerFunction("graph_import_image_array", panel_graph_import_image_array);
|
||||
__registerFunction("graph_add_number", panel_graph_add_number);
|
||||
__registerFunction("graph_add_vec2", panel_graph_add_vec2);
|
||||
__registerFunction("graph_add_vec3", panel_graph_add_vec3);
|
||||
__registerFunction("graph_add_vec4", panel_graph_add_vec4);
|
||||
__registerFunction("graph_add_transform", panel_graph_add_transform);
|
||||
|
||||
__registerFunction("graph_select_all", panel_graph_select_all);
|
||||
__registerFunction("graph_toggle_grid", panel_graph_toggle_grid);
|
||||
__registerFunction("graph_toggle_preview", panel_graph_toggle_preview);
|
||||
__registerFunction("graph_toggle_render", panel_graph_toggle_render);
|
||||
|
||||
__registerFunction("graph_export", panel_graph_export);
|
||||
|
||||
__registerFunction("graph_blend", panel_graph_blend);
|
||||
__registerFunction("graph_compose", panel_graph_compose);
|
||||
__registerFunction("graph_array", panel_graph_array);
|
||||
__registerFunction("graph_group", panel_graph_group);
|
||||
__registerFunction("graph_ungroup", panel_graph_ungroup);
|
||||
|
||||
__registerFunction("graph_canvas", panel_graph_canvas);
|
||||
__registerFunction("graph_canvas_blend", panel_graph_canvas_blend);
|
||||
|
||||
__registerFunction("graph_frame", panel_graph_frame);
|
||||
__registerFunction("graph_delete_break", panel_graph_delete_break);
|
||||
__registerFunction("graph_delete_merge", panel_graph_delete_merge);
|
||||
__registerFunction("graph_duplicate", panel_graph_duplicate);
|
||||
__registerFunction("graph_copy", panel_graph_copy);
|
||||
__registerFunction("graph_paste", panel_graph_paste);
|
||||
|
||||
__registerFunction("graph_pan", panel_graph_pan);
|
||||
__registerFunction("graph_zoom", panel_graph_zoom);
|
||||
}
|
||||
|
||||
function panel_graph_add_node() { CALL("graph_add_node"); PANEL_GRAPH.callAddDialog(); }
|
||||
function panel_graph_focus_content() { CALL("graph_focus_content"); PANEL_GRAPH.fullView(); }
|
||||
function panel_graph_preview_focus() { CALL("graph_preview_focus"); PANEL_GRAPH.setCurrentPreview(); }
|
||||
function panel_graph_preview_window() { CALL("graph_preview_window"); PANEL_GRAPH.create_preview_window(PANEL_GRAPH.getFocusingNode()); }
|
||||
|
||||
function panel_graph_import_image() { CALL("graph_import_image"); nodeBuild("Node_Image", PANEL_GRAPH.mouse_grid_x, PANEL_GRAPH.mouse_grid_y); }
|
||||
function panel_graph_import_image_array() { CALL("graph_import_image_array"); nodeBuild("Node_Image_Sequence", PANEL_GRAPH.mouse_grid_x, PANEL_GRAPH.mouse_grid_y); }
|
||||
function panel_graph_add_number() { CALL("graph_add_number"); nodeBuild("Node_Number", PANEL_GRAPH.mouse_grid_x, PANEL_GRAPH.mouse_grid_y); }
|
||||
function panel_graph_add_vec2() { CALL("graph_add_vec2"); nodeBuild("Node_Vector2", PANEL_GRAPH.mouse_grid_x, PANEL_GRAPH.mouse_grid_y); }
|
||||
function panel_graph_add_vec3() { CALL("graph_add_vec3"); nodeBuild("Node_Vector3", PANEL_GRAPH.mouse_grid_x, PANEL_GRAPH.mouse_grid_y); }
|
||||
function panel_graph_add_vec4() { CALL("graph_add_vec4"); nodeBuild("Node_Vector4", PANEL_GRAPH.mouse_grid_x, PANEL_GRAPH.mouse_grid_y); }
|
||||
function panel_graph_add_transform() { CALL("graph_add_transform"); PANEL_GRAPH.doTransform(); }
|
||||
|
||||
function panel_graph_select_all() { CALL("graph_select_all"); PANEL_GRAPH.nodes_selecting = ds_list_to_array(PANEL_GRAPH.nodes_list); }
|
||||
function panel_graph_toggle_grid() { CALL("graph_toggle_grid"); PANEL_GRAPH.display_parameter.show_grid = !PANEL_GRAPH.display_parameter.show_grid; }
|
||||
function panel_graph_toggle_preview() { CALL("graph_toggle_preview"); PANEL_GRAPH.setTriggerPreview(); }
|
||||
function panel_graph_toggle_render() { CALL("graph_toggle_render"); PANEL_GRAPH.setTriggerRender(); }
|
||||
|
||||
function panel_graph_export() { CALL("graph_export"); PANEL_GRAPH.setCurrentExport(); }
|
||||
|
||||
function panel_graph_blend() { CALL("graph_blend"); PANEL_GRAPH.doBlend(); }
|
||||
function panel_graph_compose() { CALL("graph_compose"); PANEL_GRAPH.doCompose(); }
|
||||
function panel_graph_array() { CALL("graph_array"); PANEL_GRAPH.doArray(); }
|
||||
function panel_graph_group() { CALL("graph_group"); PANEL_GRAPH.doGroup(); }
|
||||
function panel_graph_ungroup() { CALL("graph_ungroup"); PANEL_GRAPH.doUngroup(); }
|
||||
|
||||
function panel_graph_canvas() { CALL("graph_canvas"); PANEL_GRAPH.setCurrentCanvas(); }
|
||||
function panel_graph_canvas_blend() { CALL("graph_canvas_blend"); PANEL_GRAPH.setCurrentCanvasBlend(); }
|
||||
|
||||
function panel_graph_frame() { CALL("graph_frame"); PANEL_GRAPH.doFrame(); }
|
||||
function panel_graph_delete_break() { CALL("graph_delete_break"); PANEL_GRAPH.doDelete(false); }
|
||||
function panel_graph_delete_merge() { CALL("graph_delete_merge"); PANEL_GRAPH.doDelete(true); }
|
||||
function panel_graph_duplicate() { CALL("graph_duplicate"); PANEL_GRAPH.doDuplicate(); }
|
||||
function panel_graph_copy() { CALL("graph_copy"); PANEL_GRAPH.doCopy(); }
|
||||
function panel_graph_paste() { CALL("graph_paste"); PANEL_GRAPH.doPaste(); }
|
||||
|
||||
function panel_graph_pan() { CALL("graph_pan"); PANEL_GRAPH.graph_dragging_key = true; }
|
||||
function panel_graph_zoom() { CALL("graph_zoom"); PANEL_GRAPH.graph_zooming_key = true; }
|
||||
#endregion
|
||||
|
||||
function connectionParameter() constructor { #region
|
||||
log = false;
|
||||
active = true;
|
||||
|
@ -263,48 +345,46 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
|
|||
]; #endregion
|
||||
|
||||
#region ++++ hotkeys ++++
|
||||
addHotkey("Graph", "Add node", "A", MOD_KEY.none, function() { PANEL_GRAPH.callAddDialog(); });
|
||||
addHotkey("Graph", "Focus content", "F", MOD_KEY.none, function() { PANEL_GRAPH.fullView(); });
|
||||
addHotkey("Graph", "Preview focusing node", "P", MOD_KEY.none, function() { PANEL_GRAPH.setCurrentPreview(); });
|
||||
addHotkey("Graph", "Preview window", "P", MOD_KEY.ctrl, function() { create_preview_window(PANEL_GRAPH.getFocusingNode()); });
|
||||
addHotkey("Graph", "Import image", "I", MOD_KEY.none, function() { nodeBuild("Node_Image", PANEL_GRAPH.mouse_grid_x, PANEL_GRAPH.mouse_grid_y); });
|
||||
addHotkey("Graph", "Import image array", "I", MOD_KEY.shift, function() { nodeBuild("Node_Image_Sequence", PANEL_GRAPH.mouse_grid_x, PANEL_GRAPH.mouse_grid_y); });
|
||||
addHotkey("Graph", "Add number", "1", MOD_KEY.none, function() { nodeBuild("Node_Number", PANEL_GRAPH.mouse_grid_x, PANEL_GRAPH.mouse_grid_y); });
|
||||
addHotkey("Graph", "Add vector2", "2", MOD_KEY.none, function() { nodeBuild("Node_Vector2", PANEL_GRAPH.mouse_grid_x, PANEL_GRAPH.mouse_grid_y); });
|
||||
addHotkey("Graph", "Add vector3", "3", MOD_KEY.none, function() { nodeBuild("Node_Vector3", PANEL_GRAPH.mouse_grid_x, PANEL_GRAPH.mouse_grid_y); });
|
||||
addHotkey("Graph", "Add vector4", "4", MOD_KEY.none, function() { nodeBuild("Node_Vector4", PANEL_GRAPH.mouse_grid_x, PANEL_GRAPH.mouse_grid_y); });
|
||||
addHotkey("Graph", "Add node", "A", MOD_KEY.none, panel_graph_add_node);
|
||||
addHotkey("Graph", "Focus content", "F", MOD_KEY.none, panel_graph_focus_content);
|
||||
addHotkey("Graph", "Preview focusing node", "P", MOD_KEY.none, panel_graph_preview_focus);
|
||||
addHotkey("Graph", "Preview window", "P", MOD_KEY.ctrl, panel_graph_preview_window);
|
||||
|
||||
addHotkey("Graph", "Import image", "I", MOD_KEY.none, panel_graph_import_image);
|
||||
addHotkey("Graph", "Import image array", "I", MOD_KEY.shift, panel_graph_import_image_array);
|
||||
addHotkey("Graph", "Add number", "1", MOD_KEY.none, panel_graph_add_number);
|
||||
addHotkey("Graph", "Add vector2", "2", MOD_KEY.none, panel_graph_add_vec2);
|
||||
addHotkey("Graph", "Add vector3", "3", MOD_KEY.none, panel_graph_add_vec3);
|
||||
addHotkey("Graph", "Add vector4", "4", MOD_KEY.none, panel_graph_add_vec4);
|
||||
addHotkey("Graph", "Transform node", "T", MOD_KEY.ctrl, panel_graph_add_transform);
|
||||
|
||||
addHotkey("Graph", "Select all", "A", MOD_KEY.ctrl, panel_graph_select_all);
|
||||
addHotkey("Graph", "Toggle grid", "G", MOD_KEY.none, panel_graph_toggle_grid);
|
||||
addHotkey("Graph", "Toggle preview", "H", MOD_KEY.none, panel_graph_toggle_preview);
|
||||
addHotkey("Graph", "Toggle render", "R", MOD_KEY.none, panel_graph_toggle_render);
|
||||
|
||||
if(!DEMO) addHotkey("Graph", "Export", "E", MOD_KEY.ctrl, panel_graph_export);
|
||||
|
||||
addHotkey("Graph", "Transform node", "T", MOD_KEY.ctrl, function() { PANEL_GRAPH.doTransform(); });
|
||||
addHotkey("Graph", "Blend", "B", MOD_KEY.ctrl, panel_graph_blend);
|
||||
addHotkey("Graph", "Compose", "B", MOD_KEY.ctrl | MOD_KEY.shift, panel_graph_compose);
|
||||
addHotkey("Graph", "Array", "A", MOD_KEY.ctrl | MOD_KEY.shift, panel_graph_array);
|
||||
addHotkey("Graph", "Group", "G", MOD_KEY.ctrl, panel_graph_group);
|
||||
addHotkey("Graph", "Ungroup", "G", MOD_KEY.ctrl | MOD_KEY.shift, panel_graph_ungroup);
|
||||
|
||||
addHotkey("Graph", "Canvas", "C", MOD_KEY.ctrl | MOD_KEY.shift, panel_graph_canvas);
|
||||
addHotkey("Graph", "Canvas blend", "C", MOD_KEY.ctrl | MOD_KEY.alt, panel_graph_canvas_blend);
|
||||
|
||||
addHotkey("Graph", "Frame", "F", MOD_KEY.ctrl, panel_graph_frame);
|
||||
|
||||
addHotkey("Graph", "Select all", "A", MOD_KEY.ctrl, function() { nodes_selecting = ds_list_to_array(nodes_list); });
|
||||
addHotkey("Graph", "Toggle grid", "G", MOD_KEY.none, function() { display_parameter.show_grid = !display_parameter.show_grid; });
|
||||
addHotkey("Graph", "Toggle preview", "H", MOD_KEY.none, function() { PANEL_GRAPH.setTriggerPreview(); });
|
||||
addHotkey("Graph", "Toggle render", "R", MOD_KEY.none, function() { PANEL_GRAPH.setTriggerRender(); });
|
||||
addHotkey("Graph", "Delete (break)", vk_delete, MOD_KEY.shift, panel_graph_delete_break);
|
||||
addHotkey("Graph", "Delete (merge)", vk_delete, MOD_KEY.none, panel_graph_delete_merge);
|
||||
|
||||
if(!DEMO)
|
||||
addHotkey("Graph", "Export", "E", MOD_KEY.ctrl, function() { PANEL_GRAPH.setCurrentExport(); });
|
||||
|
||||
addHotkey("Graph", "Blend", "B", MOD_KEY.ctrl, function() { PANEL_GRAPH.doBlend(); });
|
||||
addHotkey("Graph", "Compose", "B", MOD_KEY.ctrl | MOD_KEY.shift, function() { PANEL_GRAPH.doCompose(); });
|
||||
addHotkey("Graph", "Array", "A", MOD_KEY.ctrl | MOD_KEY.shift, function() { PANEL_GRAPH.doArray(); });
|
||||
|
||||
addHotkey("Graph", "Group", "G", MOD_KEY.ctrl, function() { PANEL_GRAPH.doGroup(); });
|
||||
addHotkey("Graph", "Ungroup", "G", MOD_KEY.ctrl | MOD_KEY.shift, function() { PANEL_GRAPH.doUngroup(); });
|
||||
|
||||
addHotkey("Graph", "Canvas", "C", MOD_KEY.ctrl | MOD_KEY.shift, function() { PANEL_GRAPH.setCurrentCanvas(); });
|
||||
addHotkey("Graph", "Canvas blend", "C", MOD_KEY.ctrl | MOD_KEY.alt, function() { PANEL_GRAPH.setCurrentCanvasBlend(); });
|
||||
|
||||
addHotkey("Graph", "Frame", "F", MOD_KEY.ctrl, function() { PANEL_GRAPH.doFrame(); });
|
||||
|
||||
addHotkey("Graph", "Delete (break)", vk_delete, MOD_KEY.shift, function() { PANEL_GRAPH.doDelete(false); });
|
||||
addHotkey("Graph", "Delete (merge)", vk_delete, MOD_KEY.none, function() { PANEL_GRAPH.doDelete(true); });
|
||||
|
||||
addHotkey("Graph", "Duplicate", "D", MOD_KEY.ctrl, function() { PANEL_GRAPH.doDuplicate(); });
|
||||
addHotkey("Graph", "Copy", "C", MOD_KEY.ctrl, function() { PANEL_GRAPH.doCopy(); });
|
||||
addHotkey("Graph", "Paste", "V", MOD_KEY.ctrl, function() { PANEL_GRAPH.doPaste(); });
|
||||
|
||||
addHotkey("Graph", "Pan", "", MOD_KEY.ctrl, function() { PANEL_GRAPH.graph_dragging_key = true; });
|
||||
addHotkey("Graph", "Zoom", "", MOD_KEY.alt | MOD_KEY.ctrl, function() { PANEL_GRAPH.graph_zooming_key = true; });
|
||||
addHotkey("Graph", "Duplicate", "D", MOD_KEY.ctrl, panel_graph_duplicate);
|
||||
addHotkey("Graph", "Copy", "C", MOD_KEY.ctrl, panel_graph_copy);
|
||||
addHotkey("Graph", "Paste", "V", MOD_KEY.ctrl, panel_graph_paste);
|
||||
|
||||
addHotkey("Graph", "Pan", "", MOD_KEY.ctrl, panel_graph_pan);
|
||||
addHotkey("Graph", "Zoom", "", MOD_KEY.alt | MOD_KEY.ctrl, panel_graph_zoom);
|
||||
#endregion
|
||||
|
||||
#region ++++ node setters ++++
|
||||
|
|
|
@ -1,4 +1,20 @@
|
|||
function Inspector_Custom_Renderer(drawFn, registerFn = noone) : widget() constructor {
|
||||
#region funtion calls
|
||||
function __fnInit_Inspector() {
|
||||
__registerFunction("inspector_copy_prop", panel_inspector_copy_prop);
|
||||
__registerFunction("inspector_paste_prop", panel_inspector_paste_prop);
|
||||
__registerFunction("inspector_toggle_animation", panel_inspector_toggle_animation);
|
||||
|
||||
__registerFunction("inspector_color_pick", panel_inspector_color_pick);
|
||||
}
|
||||
|
||||
function panel_inspector_copy_prop() { CALL("inspector_copy_prop"); PANEL_INSPECTOR.propSelectCopy(); }
|
||||
function panel_inspector_paste_prop() { CALL("inspector_paste_prop"); PANEL_INSPECTOR.propSelectPaste(); }
|
||||
function panel_inspector_toggle_animation() { CALL("inspector_toggle_animation"); PANEL_INSPECTOR.anim_toggling = true; }
|
||||
|
||||
function panel_inspector_color_pick() { CALL("inspector_color_pick"); if(!PREFERENCES.alt_picker) return; PANEL_INSPECTOR.color_picking = true; }
|
||||
#endregion
|
||||
|
||||
function Inspector_Custom_Renderer(drawFn, registerFn = noone) : widget() constructor { #region
|
||||
h = 64;
|
||||
self.draw = drawFn;
|
||||
|
||||
|
@ -9,7 +25,7 @@ function Inspector_Custom_Renderer(drawFn, registerFn = noone) : widget() constr
|
|||
self.parent = parent;
|
||||
}
|
||||
}
|
||||
}
|
||||
} #endregion
|
||||
|
||||
function Inspector_Sprite(spr) constructor { self.spr = spr; }
|
||||
|
||||
|
@ -102,14 +118,11 @@ function Panel_Inspector() : PanelContent() constructor {
|
|||
#endregion
|
||||
|
||||
#region ++++ hotkeys ++++
|
||||
addHotkey("Inspector", "Copy property", "C", MOD_KEY.ctrl, function() { PANEL_INSPECTOR.propSelectCopy(); });
|
||||
addHotkey("Inspector", "Paste property", "V", MOD_KEY.ctrl, function() { PANEL_INSPECTOR.propSelectPaste(); });
|
||||
addHotkey("Inspector", "Toggle animation", "I", MOD_KEY.none, function() { PANEL_INSPECTOR.anim_toggling = true; });
|
||||
|
||||
addHotkey("", "Color picker", "", MOD_KEY.alt, function() {
|
||||
if(!PREFERENCES.alt_picker) return;
|
||||
PANEL_INSPECTOR.color_picking = true;
|
||||
});
|
||||
addHotkey("Inspector", "Copy property", "C", MOD_KEY.ctrl, panel_inspector_copy_prop);
|
||||
addHotkey("Inspector", "Paste property", "V", MOD_KEY.ctrl, panel_inspector_paste_prop);
|
||||
addHotkey("Inspector", "Toggle animation", "I", MOD_KEY.none, panel_inspector_toggle_animation);
|
||||
|
||||
addHotkey("", "Color picker", "", MOD_KEY.alt, panel_inspector_color_pick);
|
||||
#endregion
|
||||
|
||||
#region ++++ menus ++++
|
||||
|
|
|
@ -1,3 +1,25 @@
|
|||
#region funtion calls
|
||||
function __fnInit_Preview() {
|
||||
__registerFunction("preview_focus_content", panel_preview_focus_content);
|
||||
__registerFunction("preview_save_current_frame", panel_preview_save_current_frame);
|
||||
__registerFunction("preview_save_all_current_frame", panel_preview_save_all_current_frame);
|
||||
__registerFunction("preview_preview_window", panel_preview_preview_window);
|
||||
__registerFunction("preview_toggle_grid", panel_preview_toggle_grid);
|
||||
|
||||
__registerFunction("preview_pan", panel_preview_pan);
|
||||
__registerFunction("preview_zoom", panel_preview_zoom);
|
||||
}
|
||||
|
||||
function panel_preview_focus_content() { CALL("preview_focus_content"); PANEL_PREVIEW.fullView(); }
|
||||
function panel_preview_save_current_frame() { CALL("preview_save_current_frame"); PANEL_PREVIEW.saveCurrentFrame(); }
|
||||
function panel_preview_save_all_current_frame() { CALL("preview_save_all_current_frame"); PANEL_PREVIEW.saveAllCurrentFrames(); }
|
||||
function panel_preview_preview_window() { CALL("preview_preview_window"); PANEL_PREVIEW.create_preview_window(PANEL_PREVIEW.getNodePreview()); }
|
||||
function panel_preview_toggle_grid() { CALL("preview_toggle_grid"); PROJECT.previewGrid.show = !PROJECT.previewGrid.show; }
|
||||
|
||||
function panel_preview_pan() { CALL("preview_pan"); PANEL_PREVIEW.canvas_dragging_key = true; }
|
||||
function panel_preview_zoom() { CALL("preview_zoom"); PANEL_PREVIEW.canvas_zooming_key = true; }
|
||||
#endregion
|
||||
|
||||
function Panel_Preview() : PanelContent() constructor {
|
||||
title = __txt("Preview");
|
||||
context_str = "Preview";
|
||||
|
@ -274,14 +296,14 @@ function Panel_Preview() : PanelContent() constructor {
|
|||
#endregion
|
||||
|
||||
#region ++++ hotkey ++++
|
||||
addHotkey("Preview", "Focus content", "F", MOD_KEY.none, function() { PANEL_PREVIEW.fullView(); });
|
||||
addHotkey("Preview", "Save current frame", "S", MOD_KEY.shift, function() { PANEL_PREVIEW.saveCurrentFrame(); });
|
||||
addHotkey("Preview", "Save all current frame", -1, MOD_KEY.none, function() { PANEL_PREVIEW.saveAllCurrentFrames(); });
|
||||
addHotkey("Preview", "Preview window", "P", MOD_KEY.ctrl, function() { create_preview_window(PANEL_PREVIEW.getNodePreview()); });
|
||||
addHotkey("Preview", "Toggle grid", "G", MOD_KEY.ctrl, function() { PROJECT.previewGrid.show = !PROJECT.previewGrid.show; });
|
||||
addHotkey("Preview", "Focus content", "F", MOD_KEY.none, panel_preview_focus_content);
|
||||
addHotkey("Preview", "Save current frame", "S", MOD_KEY.shift, panel_preview_save_current_frame);
|
||||
addHotkey("Preview", "Save all current frame", -1, MOD_KEY.none, panel_preview_save_all_current_frame);
|
||||
addHotkey("Preview", "Preview window", "P", MOD_KEY.ctrl, panel_preview_preview_window);
|
||||
addHotkey("Preview", "Toggle grid", "G", MOD_KEY.ctrl, panel_preview_toggle_grid);
|
||||
|
||||
addHotkey("Preview", "Pan", "", MOD_KEY.ctrl, function() { PANEL_PREVIEW.canvas_dragging_key = true; });
|
||||
addHotkey("Preview", "Zoom", "", MOD_KEY.alt | MOD_KEY.ctrl, function() { PANEL_PREVIEW.canvas_zooming_key = true; });
|
||||
addHotkey("Preview", "Pan", "", MOD_KEY.ctrl, panel_preview_pan);
|
||||
addHotkey("Preview", "Zoom", "", MOD_KEY.alt | MOD_KEY.ctrl, panel_preview_zoom);
|
||||
#endregion
|
||||
|
||||
function setNodePreview(node) { #region
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
function closeProject(project) {
|
||||
CALL("CLOSE");
|
||||
CALL("close");
|
||||
|
||||
project.active = false;
|
||||
array_remove(PROJECTS, project);
|
||||
|
|
|
@ -2,7 +2,7 @@ globalvar SAVING;
|
|||
SAVING = false;
|
||||
|
||||
function NEW() { #region
|
||||
CALL("NEW");
|
||||
CALL("new");
|
||||
|
||||
PROJECT = new Project();
|
||||
array_push(PROJECTS, PROJECT);
|
||||
|
@ -111,7 +111,7 @@ function SAVE_AS(project = PROJECT) { #region
|
|||
} #endregion
|
||||
|
||||
function SAVE_AT(project = PROJECT, path = "", log = "save at ") { #region
|
||||
CALL("SAVE_AT");
|
||||
CALL("save");
|
||||
|
||||
if(DEMO) return false;
|
||||
|
||||
|
|
|
@ -5,6 +5,8 @@ function close_program() {
|
|||
}
|
||||
|
||||
function window_close() {
|
||||
CALL("exit");
|
||||
|
||||
var noSave = true;
|
||||
|
||||
for( var i = 0, n = array_length(PROJECTS); i < n; i++ ) {
|
||||
|
|