MoI discussion forum
MoI discussion forum

Full Version: Parametric design in MoI?

Show messages:  1-7  …  708-727  728-747  748-767  768-787  788-807  808-827  828-847  …  908-912

From: Max Smirnov (SMIRNOV)
11 Jan 2018   [#768]
Few weeks ago I bought a 4k monitor, and as a result, Nodeeditor is fully compatible with HiDPI displays. :)
Mac version looks great (check the attached file), but i still have a problems with Windows version. (I will ask Michael about it)
From: speedy (AL2000)
12 Jan 2018   [#769]
Thanks Max for the detailed information
Happy New Year and Good Job
Thanks again
best
alberto
From: Max Smirnov (SMIRNOV)
20 Jan 2018   [#770]
Nodeeditor 1.0 release candidate 1

added: HiDPI/Retina screen support. Now NE interface depends on system dpi settings and system UI scale. Should work good with all MoI versions: v3/v4 Win/Mac. Please test it.
removed: css files. I removed all waste from css files, and moved css data to index.html.
changed: context menu and info panel design
added: alt+double click - reset viewport
changed: alignToGrid function (now you can't create two nodes with same coordinates)

http://moi.maxsm.net/nodeeditor/
From: Frenchy Pilou (PILOU)
20 Jan 2018   [#771] In reply to [#770]
Seems new translations (if new nodes or other goodies)
and
Updates French site in perspective! :) Site Fr - Done : http://moiscript.weebly.com/elephant-systegraveme-nodal.html
From: Michael Gibson
21 Jan 2018   [#772] In reply to [#770]
Great work Max, almost at 1.0 !

- Michael
From: mkdm
21 Jan 2018   [#773] In reply to [#770]
Wanderful!!!! Thanks Max!!
From: Frenchy Pilou (PILOU)
21 Jan 2018   [#774]
@Max
file lang.js with French translations of official and "deviant" nodes! ;) (1.0 Canddidate)
http://moiscript.weebly.com/uploads/3/9/3/8/3938813/lang_21_01_18_vf.zip
From: James (JFH)
30 Jan 2018   [#775] In reply to [#767]
Hi Max,

I've just returned from 6 weeks away, and are attempting to update nodeeditor.

I've attached the code: "moi.ui.createDialog( 'moi://appdata/nodeeditor/index.html', 'resizeable,defaultWidth:680,defaultHeight:420', moi.ui.mainWindow );" to NE icon in custom UI
and extracted archive into folder directory as per your instructions (?)

But alas, it opens a blank window.

Please let me know if I done something wrong (I'm still a bit jet-lagged)

Thanks James
From: Frenchy Pilou (PILOU)
30 Jan 2018   [#776] In reply to [#775]
<< Blank window

Sure not : take a look at the right column of the Core Folder! ;)
There is a vertical list!
All is present! :)
From: Michael Gibson
30 Jan 2018   [#777] In reply to [#775]
Hi James, which version of MoI are you running it on?

- Michael
From: James (JFH)
30 Jan 2018   [#778] In reply to [#777]
Hi Michael,

>> which version of MoI are you running it on? <<

MoI v4 beta Dec-11-2017

James

UPDATED: I've updated to MoI v4 beta Dec-12-2017
but again blank window
From: Michael Gibson
30 Jan 2018   [#779] In reply to [#775]
Hi James, taking a closer look at your directories there, it looks like the problem is you've got it in the root /Library instead of your user one.

Put it just as you have done except under /Users/[your user name]/Library/Application Support/Moi - you should find a Moi directory there already which has your moi.ini file in it.

Hopefully that should get you going!

- Michael
From: James (JFH)
30 Jan 2018   [#780] In reply to [#779]
Thank you Michael,

I had forgotten that Apple hides the User Library files by default
(tip for Mac users: Cmd Shift . [period] will unhide hidden system files)
So all good now.

While I've got you: there is a bug with interacting with NE interface via MacBook trackpad,
which Max is unable to reproduce because he doesn't have access to these devices (macbook or mac trackpad).

I've not experience any similar issue with Moi v4 interfacing, so it is likely to be specific to Max's
code, but is there something within the rewriting of v4 that has altered the handling of trackpad events
that may have follow on effects? I understand that NE operation is outside your principle concern, but if
there is something obvious to you that may cause this issue, perhaps you could steer Max right.

Either way, thanks again for your help

James
From: Michael Gibson
30 Jan 2018   [#781] In reply to [#780]
Hi James, well the MoI viewport trackpad handling is done through C++ code responding to Qt events, it's not handled by any script processing. The node editor is running through script and webkit events and yeah there have been quite a few changes in the newer webkit version that MoI v4 is now using.

I do have a macbook here with a trackpad so I can test it over here. I know you've reported it previously but can you please describe the problem again? And do you mean that it used to work ok in MoI v3?

- Michael
From: James (JFH)
30 Jan 2018   [#782] In reply to [#781]
Hi Michael,

RE: trackpad interfacing with NE

>> And do you mean that it used to work ok in MoI v3? <<

The issue only occurs with v4.
All NE updates up to 0.99 work as expected in Moi v3.1

I have not tried "Nodeeditor 1.0 rc1" with v3 but experiences the issue with v4
as has all earlier versions of NE.

.>> please describe the problem again <<

The problem is principally with two finger interactions:
At times panning becomes locked on, so that having changed to single finger movement
it continue to behave as if using two fingers.

At other times attempted panning fails to do anything;
or alternatively will unintentionally select a node and move it.

Similarly with zooming, at time it fails and instead a marque is drawn on screen,
or nothing will happen except for detail info next to each node appearing & disappearing.

As I said before, these issues do not occur with Moi v3.1, only v4 beta and with every iteration of NE
unto and including most recent.

Please let me know if you cannot repeat my problems on your MacBook.

Regards
James
From: Michael Gibson
31 Jan 2018   [#783] In reply to [#782]
Hi James yes I can see there is some difference in behavior between MoI v3 and v4 , maybe v4 is sending events in some unexpected order. I'll see if I can find out what.

But part of the problem is it's based only on mouse oriented behavior - 2 fingers just lightly touching doesn't do panning at all right, it's only 2 fingers _clicked_ down and dragged that does panning. That it keeps panning until you remove both fingers from the click doesn't seem like a bug.

2 fingers lightly touching doesn't do any panning over here, only a mousewheel type zoom if you move up and down.

For a trackpad it's probably better for panning to work by 2 finger movement and zooming with pinching.

I see that in main.js there are some event handlers set up for touch events, but in the handler it's just translating these into mouse events and not handling them as drag/pinch gestures. It could be possible that MoI v3 being based on a older Webkit version did not fire these touch events and MoI v4 does and that's why there is different behavior.

Please give this a try - in the file main.js line 2738 where it sets up the multitouch event handlers, which looks like this:

code:
	//touch events
	this._touchpad_callback = this.bindFunction(this.touchHandler, this);
	//if( 'touchstart' in document.documentElement ) {
	canvas.addEventListener("touchstart", this._touchpad_callback, true);
	canvas.addEventListener("touchmove", this._touchpad_callback, true);
	canvas.addEventListener("touchend", this._touchpad_callback, true);
	canvas.addEventListener("touchcancel", this._touchpad_callback, true);
	//}


Comment out that whole block by adding /* */ around it so it looks like this:

code:
        /*
	//touch events
	this._touchpad_callback = this.bindFunction(this.touchHandler, this);
	//if( 'touchstart' in document.documentElement ) {
	canvas.addEventListener("touchstart", this._touchpad_callback, true);
	canvas.addEventListener("touchmove", this._touchpad_callback, true);
	canvas.addEventListener("touchend", this._touchpad_callback, true);
	canvas.addEventListener("touchcancel", this._touchpad_callback, true);
	//}
        */


Then give that a try and see if you now have the same behavior in MoI v4 as v3 had.

Qt will automatically synthesize mouse events for touches if not already done, so it shouldn't be necessary to have an additional touch handler in HTML that just generates mouse events, that's probably making most of the odd behavior.

If that part is straightened out then maybe it's possible to add different handling for touch gestures to make it behave more trackpad like, like 2 fingers panning and pinching for zooming.

- Michael
From: James (JFH)
31 Jan 2018   [#784] In reply to [#783]
Hi Michael,

Thank you so much...It works perfectly now.

>> For a trackpad it's probably better for panning to work by 2 finger movement and zooming with pinching. <<

Yes zooming by pinching would be a welcome addition, but for now I'm just happy that NE with v4 works just as with v3

Thanks again, much appreciated!
James
From: Michael Gibson
31 Jan 2018   [#785] In reply to [#784]
Hi James, I'm glad that worked. I also looked through the old Webkit version v3 used and did confirm that it did not support touch events so that's definitely why there was a behavior difference between v3 and v4.

After looking through the node editor a bit more I also saw that there are some removeEventListener() for the touch events that should probably be taken out as well if the addEventListener() calls are removed.

I'll also see if I can add a way for a dialog to opt-in to receive some trackpad specific events so it can differentiate between a trackpad scroll (used for panning) versus a mouse wheel scroll (used for zooming) without having to do low level touch event handling.

- Michael
From: Max Smirnov (SMIRNOV)
31 Jan 2018   [#786]
Hi Michael,

thank you very much for your help. I'll add a version check in the next NE release.
code:
if (moi.majorVersionNumber<4) {
	this._touchpad_callback = this.bindFunction(this.touchHandler, this);
	canvas.addEventListener("touchstart", this._touchpad_callback, true);
	canvas.addEventListener("touchmove", this._touchpad_callback, true);
	canvas.addEventListener("touchend", this._touchpad_callback, true);
	canvas.addEventListener("touchcancel", this._touchpad_callback, true);
}

From: Michael Gibson
31 Jan 2018   [#787] In reply to [#786]
Hi Max,

> thank you very much for your help. I'll add a version check in the next NE release.

You're welcome - that version check should work fine although I think the older Webkit in MoI v3 doesn't support those touch events anyway.

- Michael

Show messages:  1-7  …  708-727  728-747  748-767  768-787  788-807  808-827  828-847  …  908-912