Scripting and Node Editor in Moi3D V5
 1-20  21-28

Next
 From:  NaN
11061.1 
On first sight Moi3D isn't really made for parametric designs - which is ok.
But on second sight it has everything on board to make parametric designs that even go beyond what most other parametric UI-driven tools can do - via scripting and the node editor!
Same thing with Rhino - Making Grashopper and Rhino-Python first class citizens were imho two of the most impactful features in V7.

Would such a step also make sense for Moi3d V5? I mean, both a scripting interface and a node editor already exist. They are currently just not very documented in the case of scripting and/or separate hobby-maintained plugins in the case of the node editor. Making them an integral part of Moi3D, moving them in the spotlight and providing a way for the community to exchange their modules and templates could be a BIG thing for the new version here also!

Is Moi3D internally generating scripts for all UI user interactions already? If yes, it might be great to provide this script representation - so one could copy out the auto generated "macro" and just replace some of the constants with parameters. An approach that could also be interesting for people without much programming experience to make parametric models in Moi3D.

And further down the line, perhaps it might also make sense to think about a convenience layer on top of the current scripting api - like e.g. build123d is a layer on top of the OCP wrapper around OpenCascade that mainly makes it much more comfortable to use. (On the other hand keeping a 1:1 mapping between UI interactions and scripting would also have it's merrit, so one can even "round-trip" between UI and code to some degree.)
But as a first step just making what already exists more visible and polished could be a big thing!

Edit: Just came across the amazing extension of the node-editor by nkallen that allows to auto-generate nodes when constructing in the UI and vice versa to change the parameterization of the nodes and regenerate the geometry. This is really impressive! Having this in the main application would be really great!
Perhaps even some mapping between node editor schemas and scripts - so one could edit a larger node schema in a text editor and auto-layout it in the node editor again for people who prefer the graphical representation. Full UI<->node editor<->scripting roundtrip!

EDITED: 16 Apr 2023 by NAN

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  pressure (PEER)
11061.2 In reply to 11061.1 
Hi NaN,

There's some info about scripting at http://moi3d.com/forum/index.php?webtag=MOI&msg=10889.2

Re:
> Is Moi3D internally generating scripts for all UI user interactions already?

Basically everything comes from static .js and .htm that you can inspect and modify. Look at the program files / package contents associated with MoI for these.

- Peer
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  NaN
11061.3 In reply to 11061.2 
Thanks for the pointers!

I understand that scripting was an "under the radar" feature for several releases. Even though one can find all the informations, a central documentation with examples would certainly help to move these features more into the spotlight! And I guess the majority of the MoI users don't even know that there is a capable node editor plugin that they could install and use. And then, a guide how to actually use it.
Official support would also add certainty that this is not potentially incompatible with the next MoI version, like it could happen as long as it is "just" an external fan plugin.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Frenchy Pilou (PILOU)
11061.4 In reply to 11061.3 
---
Pilou
Is beautiful that please without concept!
My Moi French Site My Gallery My MagicaVoxel Gallery
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  NaN
11061.5 In reply to 11061.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.

EDITED: 17 Apr 2023 by NAN

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  NaN
11061.6 In reply to 11061.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

EDITED: 17 Apr 2023 by NAN

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  NaN
11061.7 In reply to 11061.6 
Some features don't seem to work with MoI V4? E.g. when clicking on "Macro" I get:


  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  NaN
11061.8 In reply to 11061.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?)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
11061.9 In reply to 11061.8 
The nodeeditor Macro feature IS functioning.

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

- Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  NaN
11061.10 In reply to 11061.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.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
11061.11 In reply to 11061.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
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
11061.12 In reply to 11061.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
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  NaN
11061.13 In reply to 11061.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.
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  NaN
11061.14 In reply to 11061.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 )

EDITED: 17 Apr 2023 by NAN

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  Michael Gibson
11061.15 In reply to 11061.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

EDITED: 17 Apr 2023 by MICHAEL GIBSON

  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  NaN
11061.16 In reply to 11061.15 
Yay, thanks, that works!
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  bemfarmer
11061.17 
AFAIK, nodeeditor does not have any Group related nodes?

- Brian
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  NaN
11061.18 In reply to 11061.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)
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  wayne hill (WAYNEHILL5202)
11061.19 In reply to 11061.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
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged

Previous
Next
 From:  c3g (LONG)
11061.20 In reply to 11061.13 
There is no case for Nodeeditor, I am very interested in Nodeeditor modeling
  Reply Reply More Options
Post Options
Reply as PM Reply as PM
Print Print
Mark as unread Mark as unread
Relationship Relationship
IP Logged
 

Reply to All Reply to All

 

 
Show messages:  1-20  21-28