MoI discussion forum
MoI discussion forum

Full Version: Scripting and Node Editor in Moi3D V5

Show messages:  1-4  5-24  25-28

From: NaN
17 Apr 2023   [#5] In reply to [#4]
Thank you, great overview!
The examples are pretty awesome! Could something like this be integrated into the node editor? Like in Max(MSP) where you can click on any object to get a description and a usage example.
From: NaN
17 Apr 2023   [#6] In reply to [#5]
Is there a tutorial how to build a design from scratch with the node editor?
So building a parametric sketch. Then applying parametric features to that, etc. (On first sight most examples for graphic primitives like Polyline etc. in the overview from Pilou start with existing, "selected" geometry.)
Something really basic that can act as how-to cookbook, like the introductory examples from this code cad: https://build123d.readthedocs.io/en/latest/introductory_examples.html
From: NaN
17 Apr 2023   [#7] In reply to [#6]
Some features don't seem to work with MoI V4? E.g. when clicking on "Macro" I get:

Image Attachments:
Screenshot 2023-04-18 003630.png 


From: NaN
17 Apr 2023   [#8] In reply to [#7]
The nkallen extension that automatically generates node trees from UI interactions is probably the best "node editor howto tutorial" one can have.
These node graphs get pretty involved quickly... :) (From a certain complexity on one probably would have to structure node graphs like programs. My guess is that the (currently non functioning(?) macro feature would provide that - kind of sub-patches that allow to structure larger graphs?)
From: bemfarmer
17 Apr 2023   [#9] In reply to [#8]
The nodeeditor Macro feature IS functioning.

MoI wiki has section on nodeeditor, and link to some Macro documentation.

- Brian
From: NaN
17 Apr 2023   [#10] In reply to [#9]
Thank you for writing this macro documentation!
Hm, then something is wrong with my installation. I don't even get to the Create etc. menu when clicking on the Macro entry in the top menu - I get the error message from the screenshot above right away.
From: Michael Gibson
17 Apr 2023   [#11] In reply to [#10]
Which version of the node editor are you using when getting the macro error?

Does it happen if you use the version from James here:
http://moi3d.com/forum/index.php?webtag=MOI&msg=9358.1
?

- Michael
From: Michael Gibson
17 Apr 2023   [#12] In reply to [#1]
Hi NaN,

in reply to your first message in this thread:

re:
> Would such a step also make sense for Moi3d V5?

I'm reluctant to do so because it would signal that those areas would be core first class supported features when that is not the case currently.

The main reason for that is the amount of work required - as you note documentation would need to be created which is very time consuming and also just general support of other developers is also very time consuming.

I don't mind the current support load which comes with the implicit understanding that you need to be quite a bit on the "self starter" side to work in these areas. But it could get pretty hard for me to find the time for it if it was advertised as a core area.

- Michael
From: NaN
17 Apr 2023   [#13] In reply to [#12]
Hi Michael,

thanks for the feedback. Even though that is not the answer I was hoping for I can understand that support effort would increase and that you have to manage your time.

So my last plead in this regard would be to at least consider to ensure that the node editor stays compatible with new Moi3d versions and to continue offering scripting capabilities for new features. Then people who want to spend the effort can work with what is there and rely on it staying functional without overboarding support effort.
From: NaN
17 Apr 2023   [#14] In reply to [#11]
^^Yes, I used the node editor version from James with the recent version of MoI V4. I can retry with the V5 beta when at home again.

Edit: I just installed the Moi3D V5 beta (this time on a M2 Mac instead of a Windows machine) and am getting exactly the same error message when clicking on "Macro".
I placed the uncompressed node editor under "Moi v5 beta Apr-13-2023.app/Resources/ui" and added this start script to the shortcuts: moi.ui.createDialog( 'nodeeditor/index.html', 'resizeable,defaultWidth:680,defaultHeight:420', moi.ui.mainWindow )
From: Michael Gibson
17 Apr 2023   [#15] In reply to [#14]
Hi NaN, re: Macro error message - looking at the error it kind of looks like the macro code is assuming that the node editor is installed in the appdata folder instead of in the ui folder.

On Mac the appdata folder is at "~/Library/Application Support/Moi", note that the Library folder is hidden by default, you can show it by holding down Shift+Cmd+. (period), or from the menu use Go > Go to Folder

On Windows open the Start menu and type %AppData%\Moi and push Enter, which will expand to something like C:\Users\<Your user name>l\AppData\Roaming\Moi

It's actually generally better to install stuff in the appdata folder since it's a centralized location outside of any one version's app bundle, so new versions will find things there without needing to copy files into each new version's individual .app bundle.

So put it in a folder like: ~/Library/Application Support/Moi/nodeeditor , and then for the launching script on a shortcut key you'll need to have moi://appdata at the start of the URL like this:

script: moi.ui.createDialog( 'moi://appdata/nodeeditor/index.html', 'resizeable,defaultWidth:680,defaultHeight:420', moi.ui.mainWindow );

If that solves it let me know, I'll update the wiki. Probably the wiki install information is from Moi version 3 which was before there was appdata folder support.

- Michael
From: NaN
17 Apr 2023   [#16] In reply to [#15]
Yay, thanks, that works!
From: bemfarmer
21 Apr 2023   [#17]
AFAIK, nodeeditor does not have any Group related nodes?

- Brian
From: NaN
21 Apr 2023   [#18] In reply to [#17]
I have been experimenting with "macro" as group. Seems to do the job!
Edit: Oh, you probably mean selecting existing geometry and grouping it via nodes, not grouping nodes? Hm, no idea in that case. (Still only scratching on the surface)
From: wayne hill (WAYNEHILL5202)
21 Apr 2023   [#19] In reply to [#18]
Hi NaN,

Not quite clear on node groupings, but holding down the shift key while selecting nodes will group them to drag around the screen and select menu options.

Wayne
From: c3g (LONG)
16 Jun 2023   [#20] In reply to [#13]
There is no case for Nodeeditor, I am very interested in Nodeeditor modeling
From: Michael Gibson
16 Jun 2023   [#21] In reply to [#20]
Hi c3g, there is some information on the node editor here: https://moi3d.com/wiki/nodeeditor

- Michael
From: svenster
12 Jan   [#22] In reply to [#15]
Hi Forum. On Ubuntu using Wine following these directions I'm unable to relocate node editor to "/home/sven/.wine/drive_c/users/sven/AppData/Roaming/Moi" (assuming "I" in original post is a mistake). It does work in "/home/sven/.wine/drive_c/Program Files/MoI 5.0 beta Dec-1-2023/ui". Can sombody confirm this should work as posted ?

Sven
From: Michael Gibson
12 Jan   [#23] In reply to [#22]
Hi Sven, if you put it in "/home/sven/.wine/drive_c/users/sven/AppData/Roaming/Moi then to launch it you would need this in your shortcut key:

script: moi.ui.createDialog( 'moi://appdata/nodeeditor/index.html', 'resizeable,defaultWidth:680,defaultHeight:420', moi.ui.mainWindow );

If you put it inside /home/sven/.wine/drive_c/Program Files/MoI 5.0 beta Dec-1-2023/ui then the script to launch it is slightly different the URL starts with moi://ui instead of moi://appdata like this:

script: moi.ui.createDialog( 'moi://ui/nodeeditor/index.html', 'resizeable,defaultWidth:680,defaultHeight:420', moi.ui.mainWindow );

- Michael
From: svenster
13 Jan   [#24] In reply to [#23]
Hi Michael. Confirming your paths and copying & pasting your scripts from your reply it still works via the ui directory, but NOT the appdata directory.

Sven

Show messages:  1-4  5-24  25-28