PDA

View Full Version : Possible to create nodes via LScript?



jrandom
04-09-2011, 02:01 PM
In my playing around with surface node networks, it occurred to me that it would be really handy if I could condense some of my node setups into a single node.

Is it possible to do this in LScript? I've been digging through the docs and the SDK but haven't found anything yet.

I also couldn't find any information on how to include other pre-existing nodes when creating a compiled C plug-in either -- if this isn't possible via LScript then a compiled plug-in will be required and knowing how to use pre-existing nodes inside a compiled node would be very handy.

Any pointers/documention/etc...?

Sensei
04-09-2011, 06:18 PM
Not possible in LScript, and not possible in C/C++.
The only way is the one I used in TrueGroup.
http://www.trueart.pl/?URIType=Directory&URI=Products/Plug-Ins/TrueGroup

jrandom
04-09-2011, 06:36 PM
Hmm... what I'm looking to do isn't quite like what TrueGroup is doing (cool plugin, though!), but similar.

The "internal" nodes don't need to be editable as nodes, but I do need to use those interior nodes' input/output. To simplify: I want to write a node that calls other nodes internally. Is this still impossible?

(Obviously it has to be possible in C/C++ or TrueGroup couldn't exist. :) )

Sensei
04-09-2011, 07:30 PM
To simplify: I want to write a node that calls other nodes internally. Is this still impossible?

Correct. It's not possible.

jrandom
04-09-2011, 08:54 PM
Odd. It has to be possible on some level or TrueGroup couldn't exist. I can understand you not wanting to give away how your plug-in works, but I'm not attempting to build a competing plug-in -- I just want to simplify the design of the node networks I'm building. And if something is possible then I can figure out how to do it.

I was just hoping to save some time by getting some specific pointers into the LW plug-in API (which I am very unfamiliar with at the moment).

evenflcw
04-09-2011, 09:34 PM
Sensei IS correct.

Only LW knows how to run it's plugins. The nodes aren't bits of reusable code that can be called from anywhere and anyhow. Nodes are plugins aswell! And only LW, or specifically the Node Editor architecture, has the code to run them (internally). TrueArt hasn't written any code that can execute LW nodes or directly called a function to evaluate all nodes within a network. Their evaluation is handled by the Node Editor architecture. And that is what TrueGroup relies on. It provides nodes with selfcontained node editors. Put nodes inside those editors and LW executes them as it does nodes in any other node editor. TrueGroup relays the inputs and outputs to and from the nodes and the node editor instances it handles. Everything inbetween input and output, LW/Node Editor architecture takes care of. Atleast that's my understanding.

And if your gonna do anything with nodes you must use SDK, as Lscript contains nothing related to nodes or node editors whatsoever, except that it can activate the surface node editor via command sequence.

jrandom
04-09-2011, 09:40 PM
Ah hah! Knew it was possible! So I should be focusing on Node Editors then. Got it! Thank you.

jrandom
04-09-2011, 10:02 PM
I looked over this thread and decided I came off as a bit confrontational. Sorry about that, t'was not my intention.

The reason I'm not just purchasing TrueGroup (which I can certainly afford and is a steal at that price): Lightwave has a real lack of production-quality material/surface presets. After I'm done building my surfacing library I'd like to distribute it here, but I can't do that if any of them rely on commercial plug-ins.

If I have to write my own code as a result, so be it. :)