[Node Editor] Script Error

Next
 From:  Smoluck
9810.1 
Hi,

I just jump on the MOI trend (bought it today) and now i dig into the Node Editor again.
(using the latest V4 Beta)

I wanted to create a Macro to measure a curve.
so i started creating a Macro, then changed the input to Object, and added a BBox-Infos... got this issue:



what is the trick to correct that ?

best regards, Franck
Attachments:

  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)
9810.2 In reply to 9810.1 
Not more easy with Curve_length ?



The Macro

EDITED: 18 May 2020 by PILOU

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

Message 9810.3 deleted 18 May 2020 by WAYNEHILL5202

Previous
Next
 From:  Michael Gibson
9810.4 In reply to 9810.1 
Hi Franck, what version of the node editor are you using? Can you post a .zip file of your node editor folder so I can test with the same version you are using?

The code there looks kind of dubious, it looks like it is making an object list but not adding any objects to it before trying to get the bounding box. It probably needs a little tuneup.

- 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:  Smoluck
9810.5 In reply to 9810.4 
I will see if the error comes back.


to be honnest i'm really interested in the Node Editor instead of the direct tool.
(wich is maybe an error, but procedural is my passion)

i followed those steps back:

install V4 via setup.
Then under AppData\Roaming\Moi install the latest nodeeditor release from James. (http://moi3d.com/forum/index.php?webtag=MOI&msg=9358.1)
Launch MOI and open the Options/ ShortcutKey and press Add.
Create a new one on "D" and paste this script below

script: if ( moi.majorVersionNumber == 3 ) { moi.ui.createDialog( 'nodeeditor/index.html', 'resizeable,defaultWidth:680,defaultHeight:420', moi.ui.mainWindow ); } else if ( moi.majorVersionNumber == 4 ) { moi.ui.createDialog( 'moi://appdata/nodeeditor/index.html', 'resizeable,defaultWidth:680,defaultHeight:420', moi.ui.mainWindow ); }

Copy this moi.css to the C:\Program Files\MoI 4.0 beta Jan-22-2020\ui folder, to install the Dark theme.
  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
9810.6 In reply to 9810.5 
Hi Smoluck, well I was able to get that all set up but I can't seem to trigger the error:



Earlier I wrote:

> The code there looks kind of dubious, it looks like it is making an object list but not adding any objects
> to it before trying to get the bounding box. It probably needs a little tuneup.

This was wrong, but there is a bug somewhere in the works there where under some particular condition there isn't an object list being returned out there like the rest of that node's code is expecting. Probably.

If you can figure out a consistent way to reproduce it, then I would have a good shot at figuring it out.


> to be honnest i'm really interested in the Node Editor instead of the direct tool.
> (wich is maybe an error, but procedural is my passion)

Well, possibly, but not necessarily. It kind of depends on what you're looking for. If you're interested in something open source and where it's a small community and you would like to help move it along then you might be in the right spot. If you want something with tutorials and documentation and resources (like training and books) then probably not, Rhino+Grasshopper would be a better fit.

- 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:  Frenchy Pilou (PILOU)
9810.7 
If you want a true monster nodal procedural forms on line you have this one! ;)

https://cables.gl
Scroll the splach screen examples...some astononished!
Have happy discoveries...

EDITED: 18 May 2020 by PILOU

  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)
9810.8 In reply to 9810.7 
Pilou,

Nice concept. Another software company with their hands on the subscription format on/off switch. Here today, gone tomorrow and you are locked out of your data on the cloud.

Have you tried the Litegraph editor the Node Editor is based on?

https://github.com/jagenjo/litegraph.js

It has many more features that Max Smirnov removed for compatibility with MoI. WebGL would be nice to have in the Node Editor.

Litegraph is actively maintained.

Wayne

EDITED: 20 May 2020 by WAYNEHILL5202

  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)
9810.9 In reply to 9810.8 
No sorry I have no time in this moment too much things to do! :)

There is also this sort of things ;)

https://www.nodebox.net/node/

https://www.nodebox.net/blog/2013/01/29/kaleidoscope-tutorial.html

---
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:  James (JFH)
9810.10 In reply to 9810.8 
Wayne,

"It has many more features that Max Smirnov removed for compatibility with MoI. WebGL would be nice to have in the Node Editor."

Can you expand on this?

Are you talking about incorporating materials and light effects into NE.
Would there be any implication for modelling?

There are a number of other advancements to litegraph that could be useful inclusions to NE.
I raised this some time ago regarding groups (http://moi3d.com/forum/index.php?webtag=MOI&msg=7713.865) but also UI controls on the node themselves could be a game-changer.



Also, I have been thinking for awhile about how Growth algorithms such as reaction-diffusion may be implemented in NE. These morphogenic (Evo-Devo) styles of motifs are defining characteristic of our contemporary visual culture in much the same way as Mondrian's primary coloured compositions were to International style I modernism.

https://awesomeopensource.com/project/jasonwebb/morphogenesis-resources
https://thecodingtrain.com/CodingChallenges/013-reactiondiffusion-p5.html

The problem being that these algorithms generally deal with pixel manipulation rather than points in space connected by lines.

Having looked again at webglstudio.org I wonder if there could be something akin to its "Visualization" node, in which an algorithm could be run (evolve) and halted at a point of the users choosing, and this node linked to your "ImgSampler" node, to be output as a heightmap?

Anyway, I may be revealing my lack of knowledge here, but is this something that would even be possible someway down the track?

James

James
https://www.instagram.com/nodeology/

  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
9810.11 In reply to 9810.10 
WebGL is disabled in the WebKit engine that is included with MoI, because of the added size.

- 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:  wayne hill (WAYNEHILL5202)
9810.12 In reply to 9810.10 
James,

Take a look at the Node Editor source - core - main.js code at lines 2709 - 2735:

code:

// this file allows to render the canvas using WebGL instead of Canvas2D
// this is useful if you plant to render 3D objects inside your nodes

LGraphCanvas.prototype.enableWebGL = function()
{
	// TODO

	// if (typeof(GL) === undefined) throw("litegl.js must be included to use a WebGL canvas");
	// if (typeof(enableWebGLCanvas) === undefined) throw("webglCanvas.js must be included to use this feature");
	// this.gl = this.ctx = enableWebGLCanvas(this.canvas);
	// this.ctx.webgl = true;
	// this.bgcanvas = this.canvas;
	// this.bgctx = this.gl;
	// GL.create({ canvas: this.bgcanvas });
	// this.bgctx = enableWebGLCanvas( this.bgcanvas );
	// window.gl = this.gl;
}

/**
* marks as dirty the canvas, this way it will be rendered again
*
* @class LGraphCanvas
* @method setDirty
* @param {bool} fgcanvas if the foreground canvas is dirty (the one containing the nodes)
* @param {bool} bgcanvas if the background canvas is dirty (the one containing the wires)
*/



That is why I think it was removed because of increased complexity involved with WebGL drivers.

It would be great to have a 3D rendering node in the node editor, but it is well beyond my skill set to even consider the challenge. Tie it in with, say the https://threejs.org/ library, it could be fantastic.


Edit: Michael - "WebGL is disabled in the WebKit engine that is included with MoI, because of the added size." -- My Moment of Inspiration has faded.

Maybe MoI 5.0? :-)

Wayne

EDITED: 20 May 2020 by WAYNEHILL5202

  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:  James (JFH)
9810.13 In reply to 9810.11 
Michael,

"WebGL is disabled in the WebKit engine that is included with MoI, because of the added size."

Thank you for the information.
Could WebGl be an add-on for user who choose to download as a separate package?
Again, I may be exposing my ignorance here.

James
https://www.instagram.com/nodeology/
  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
9810.14 In reply to 9810.13 
Hi James,

re:
> Thank you for the information.
> Could WebGl be an add-on for user who choose to download as a separate package?

I guess theoretically, but it would be something like a customized whole version of MoI, not really just an add-on module.

- 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:  wayne hill (WAYNEHILL5202)
9810.15 In reply to 9810.11 
Hi Michael,

Just curious. Is SVG also disabled in the WebKit? Trying to use SVG in the Node Editor with no success so far.

Thank you,
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
 From:  Michael Gibson
9810.16 In reply to 9810.15 
Hi Wayne, yes that's correct the version of WebKit bundled with MoI has SVG disabled because of its large footprint.

- 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
 

Reply to All Reply to All