MoI discussion forum
MoI discussion forum

Full Version: Scripting

Show messages:  1-18  19-38  39-58  59-68

From: Bravlin
29 Nov 2018   [#59]
Is there some kind of a "UserData" mechanism in Moid3D ?
In Softimage "UserData" store information available any moment for plugin functions and objects.
Its like a global variable for plugin that lie in dynamic memory.
It helps store information between launches of the plugin.
So your first run plugin result calculations can be transferred to second run etc.
From: Michael Gibson
29 Nov 2018   [#60] In reply to [#59]
Hi Bravlin, sorry no there isn't currently any mechanism like that set up for MoI scripting.

- Michael
From: Bravlin
13 Dec 2018   [#61]
How shall i query current tool context ? Is it possible ?
For example if i start Trim command dialog ?
From: Michael Gibson
13 Dec 2018   [#62] In reply to [#61]
Hi Bravlin, do you mean you want to get the name of the currently running command, if there is one, from script?

- Michael
From: Bravlin
13 Dec 2018   [#63]
Yes currently runing command or dialog.
From: Michael Gibson
13 Dec 2018   [#64] In reply to [#63]
Hi Bravlin, there isn't anything set up for a script to get that currently but I will add a property at moi.command.currentCommandName for the next v4 beta.

- Michael
From: bemfarmer
21 Dec 2021   [#65]
Hi Michael,

What are the inputs for "network"?

Inputs for network:

0 : ObjectList - curves.
1 :
2 :
3 :
4:
5:
6:

From network.js Moi command:
4 moi.ui.bindUIToInput( 'mode', 'value', factory.getInput(4) );
5 moi.ui.bindUIToInput( 'tolerance', 'value', factory.getInput(5) );
6 moi.ui.bindUIToInput( 'numpoints', 'value', factory.getInput(6) );

From network.nod:
4 nFac.setInput(4, this.properties.mode[0]);
// nFac.setInput(4, 'normal');
5 nFac.setInput(5, this.properties.tolerance[0]);
6 nFac.setInput(6, this.properties.numPts[0]);

- Brian

(I plan on using network in a .js, .htm script.)

Thank you
From: Michael Gibson
21 Dec 2021   [#66] In reply to [#65]
Hi Brian, the inputs for Network go like this:

0: Object list - U curves
1: Object list - V curves
2: List of curve orientation values - U orientations, each has a "flipped" bool value and a "seam" parameter value.
3: List of curve orientation values - V orientations
4: String - Mode, one of "normal", "lighter", "custom", "uniform"
5: number - Custom tolerance, Fitting tolerance to use when mode = "custom"
6: int - Uniform Num Points, Number of interior points to use when mode = "uniform".

If you pile up all the curves in input 0 and leave input 1 blank and the orientation lists blank it will automatically sort the curves into separate U and V lists and generate the orientations.

- Michael
From: bemfarmer
21 Dec 2021   [#67] In reply to [#66]
Thank you very much Michael.
Separate u v inputs, availability seems nice.
Does this have any speed advantage?

I wonder a bit about what "List of curve orientation values means and how it works.
But probably do not need it.

Saw something about coons patch also...

- Brian
From: Michael Gibson
21 Dec 2021   [#68] In reply to [#67]
Hi Brian,

re:
> Does this have any speed advantage?

Not much speed advantage, but if you already know which set a curve is supposed to be in if you separate them then you won't run the risk of the automatic sorter making a mistake in classifying them.


re:
> I wonder a bit about what "List of curve orientation values means and how it works.
> But probably do not need it.

They will be created automatically for you if you leave it blank. It stores whether a curve should be flipped from its natural direction when used in the network and where the closing seam point of a closed curve should be switched to from its natural seam when used in the network.


> Saw something about coons patch also...

A Coons patch is when you have just 4 boundary curves, there is an "exact" option that can be used in this case.

- MIchael

Show messages:  1-18  19-38  39-58  59-68