mirror of
https://github.com/Ttanasart-pt/Pixel-Composer.git
synced 2024-12-23 21:46:17 +01:00
- [Graph, Preview Panel] Fix single modifier hotket not triggering (use to activate ctrl, alt click for pan/zoom)
This commit is contained in:
parent
363a1dec53
commit
094b428c17
6 changed files with 27 additions and 19 deletions
|
@ -39,7 +39,7 @@
|
|||
LATEST_VERSION = 11700;
|
||||
VERSION = 11780;
|
||||
SAVE_VERSION = 11700;
|
||||
VERSION_STRING = "1.17.9.006";
|
||||
VERSION_STRING = "1.17.9.007";
|
||||
BUILD_NUMBER = 11780;
|
||||
|
||||
HOTKEYS = ds_map_create();
|
||||
|
|
|
@ -132,8 +132,7 @@
|
|||
}
|
||||
|
||||
function addHotkey(_context, _name, _key, _mod, _action) {
|
||||
if(is_string(_key))
|
||||
_key = key_get_index(_key);
|
||||
if(is_string(_key)) _key = key_get_index(_key);
|
||||
|
||||
var key = new hotkeyObject(_context, _name, _key, _mod, _action);
|
||||
|
||||
|
|
|
@ -148,7 +148,7 @@ enum MOD_KEY {
|
|||
|
||||
function key_press(_key, _mod = MOD_KEY.none) {
|
||||
if(WIDGET_CURRENT) return false;
|
||||
if(_mod == MOD_KEY.none && _key == 0) return false;
|
||||
if(_mod == MOD_KEY.none && _key == noone) return false;
|
||||
|
||||
return keyboard_check_pressed(_key) && HOTKEY_MOD == _mod;
|
||||
return (_key == noone || keyboard_check_pressed(_key)) && HOTKEY_MOD == _mod;
|
||||
}
|
|
@ -32,12 +32,16 @@ function Node_RM_Cloud(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
inputs[| 10] = nodeValue("Detail Attenuation", self, JUNCTION_CONNECT.input, VALUE_TYPE.float, 0.5)
|
||||
.setDisplay(VALUE_DISPLAY.slider);
|
||||
|
||||
inputs[| 11] = nodeValue("Shape", self, JUNCTION_CONNECT.input, VALUE_TYPE.integer, 0)
|
||||
.setDisplay(VALUE_DISPLAY.enum_scroll, [ "Volume", "Plane" ]);
|
||||
|
||||
outputs[| 0] = nodeValue("Surface Out", self, JUNCTION_CONNECT.output, VALUE_TYPE.surface, noone);
|
||||
|
||||
input_display_list = [ 0,
|
||||
["Transform", false], 1, 2, 3,
|
||||
["Camera", false], 4, 5,
|
||||
["Cloud", false], 6, 8, 7, 9, 10,
|
||||
["Cloud", false], 11, 6, 8,
|
||||
["Noise", false], 7, 9, 10,
|
||||
];
|
||||
|
||||
static drawOverlay = function(hover, active, _x, _y, _s, _mx, _my, _snx, _sny) {}
|
||||
|
@ -56,10 +60,12 @@ function Node_RM_Cloud(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
var _fov = _data[4];
|
||||
var _rng = _data[5];
|
||||
|
||||
var _dens = _data[6];
|
||||
var _itrr = _data[7];
|
||||
var _thrs = _data[8];
|
||||
var _dsca = _data[9];
|
||||
var _type = _data[11];
|
||||
var _dens = _data[ 6];
|
||||
var _thrs = _data[ 8];
|
||||
|
||||
var _itrr = _data[ 7];
|
||||
var _dsca = _data[ 9];
|
||||
var _datt = _data[10];
|
||||
|
||||
_outSurf = surface_verify(_outSurf, _dim[0], _dim[1]);
|
||||
|
@ -73,9 +79,11 @@ function Node_RM_Cloud(_x, _y, _group = noone) : Node_Processor(_x, _y, _group)
|
|||
shader_set_f("fov", _fov);
|
||||
shader_set_2("viewRange", _rng);
|
||||
|
||||
shader_set_i("iteration", _itrr);
|
||||
shader_set_i("type", _type);
|
||||
shader_set_f("density", _dens);
|
||||
shader_set_f("threshold", _thrs);
|
||||
|
||||
shader_set_i("iteration", _itrr);
|
||||
shader_set_f("detailScale", _dsca);
|
||||
shader_set_f("detailAtten", _datt);
|
||||
|
||||
|
|
|
@ -187,11 +187,10 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
|
|||
highlight : false,
|
||||
}
|
||||
|
||||
connection_param = new connectionParameter();
|
||||
connection_param = new connectionParameter();
|
||||
show_view_control = 1;
|
||||
|
||||
bg_color = c_black;
|
||||
|
||||
show_view_control = 1;
|
||||
#endregion
|
||||
|
||||
#region ---- position ----
|
||||
|
@ -842,9 +841,11 @@ function Panel_Graph(project = PROJECT) : PanelContent() constructor {
|
|||
if(mouse_press(PREFERENCES.pan_mouse_key)) {
|
||||
_doDragging = true;
|
||||
drag_key = PREFERENCES.pan_mouse_key;
|
||||
|
||||
} else if(mouse_press(mb_left) && graph_dragging_key) {
|
||||
_doDragging = true;
|
||||
drag_key = mb_left;
|
||||
|
||||
} else if(mouse_press(mb_left) && graph_zooming_key) {
|
||||
_doZooming = true;
|
||||
drag_key = mb_left;
|
||||
|
|
|
@ -15,6 +15,7 @@ uniform float objectScale;
|
|||
uniform float fov;
|
||||
uniform vec2 viewRange;
|
||||
|
||||
uniform int type;
|
||||
uniform float density;
|
||||
uniform int iteration;
|
||||
uniform float threshold;
|
||||
|
@ -195,7 +196,10 @@ float volume(vec3 pos, float ratio) {
|
|||
|
||||
ds *= d1;
|
||||
|
||||
return ds;
|
||||
if(type == 0) return ds;
|
||||
else if(type == 1) return smoothstep(-.1, .1, pos.y) * ds;
|
||||
|
||||
return 0.;
|
||||
}
|
||||
|
||||
float marchDensity(vec3 camera, vec3 direction) {
|
||||
|
@ -225,10 +229,6 @@ void main() {
|
|||
dir = normalize(vec3((v_vTexcoord - .5) * 2., -z));
|
||||
eye = vec3(0., 0., 5.);
|
||||
|
||||
// vec2 cps = (v_vTexcoord - .5) * 2.;
|
||||
// dir = vec3(0., 0., -1.);
|
||||
// eye = vec3(cps, 5.);
|
||||
|
||||
dir = normalize(irotMatrix * dir) / objectScale;
|
||||
eye = irotMatrix * eye;
|
||||
eye /= objectScale;
|
||||
|
|
Loading…
Reference in a new issue