PDA

View Full Version : Does Modo come with an SDK


tjnyc
09-27-2004, 03:51 PM
I don't remember if this was brought up, but does Modo when I get the package come with a SDK? I went through scripting in Modo and I can't say that I am too happy with how it is implemented and I would much rather have access to the SDK.


Cheers,

nuclearfessel
09-27-2004, 04:49 PM
I don't remember if this was brought up, but does Modo when I get the package come with a SDK? I went through scripting in Modo and I can't say that I am too happy with how it is implemented and I would much rather have access to the SDK.


Cheers,
i believe they are working on it right now and will be released seperately

Pazur
09-27-2004, 04:50 PM
from what I know SDK will be released with the forthcoming update, it's not in there currently.
Just out of curiosity, what didn't You like about perl scripting?

Per-Anders
09-27-2004, 05:14 PM
can only speak for myself here, and i don't have modo so i don't know how much power it's given in modo (and it sounds like there's not even a scripting sdk yet so that's an additional area of the SDK that needs to be there), but in general scripting isn't deep enough. basically it's not as powerful. it's ok if you want to join up some existing components, but generally not good enough to make brand new tools that can't be made with existing tool combinations, and that would function at a decent speed.

also personally i just don't like perl.

tjnyc
09-27-2004, 06:36 PM
from what I know SDK will be released with the forthcoming update, it's not in there currently.
Just out of curiosity, what didn't You like about perl scripting?
I never said I didn't like perl scripting, that isn't what I was talking about. It is the implementation of scripting in Modo that I don't like. Perl in fact isn't even intergrated into Modo, but is I guess is interpreted.

Currently, I have to make command execution calls to Modo's scripting interface via lxq, lxout and so on calls in my scripts. There is NO direct access to the API what-so-ever. I can't call a method directly, or objects, so on and so forth. I have to make unnecessay execution calls, which frankly is a very ineffective approach to coding.


Cheers,

Griffon
09-27-2004, 08:21 PM
The SDK has not been released yet. We are working on it and it is forthcoming.

Scripting allows access to every command in modo. In addition to the standard commands, we also have "service" commands. These allow access to all of the internal geometry info and such. The lx and lxq calls from perl take nothing away from scripting and means that any commands added through plugins such are easily called from perl. It also allows new scripting languages to be added that can access all commands.

tjnyc
09-27-2004, 09:29 PM
The SDK has not been released yet. We are working on it and it is forthcoming.

Scripting allows access to every command in modo. In addition to the standard commands, we also have "service" commands. These allow access to all of the internal geometry info and such. The lx and lxq calls from perl take nothing away from scripting and means that any commands added through plugins such are easily called from perl. It also allows new scripting languages to be added that can access all commands.It is obvious that command calls is the base of working with scripting in Modo and that you guys have provided a well structured series of commands, but it doesn't make up for a lack of an actual scripting API. Most apps with scripting provide scripting based API's some are limited and only exposes some objects, functions, and so on, but others like XSI supports more than one language and expose a wealth of the API within an well intergrated scripting environment.

The command call system in Modo is also a practical contradiction, because users have to learn convoluted series of command calls, which in turn is a little like learning a new language and its workings, which counters the argument that Perl scripting was used to make it easier for people NOT to learn a new language. Also, scripting is always good for rapid prototyping of new tools, functions and so on, but how well will command calls scripts translate to programming with the SDK. I seriously doubt you guys have made the SDK a command call based system, and because there is such a difference in development environments, there will also be transititional issues in moving development work from scripts to the SDK.


Sorry for the rant, but I would have preferred a system that exposes a scripting API that would mirror in many ways the SDK, with support for Perl or a C-type language. Thanks for hearing me out and I look forward to the SDK.


Cheers,

onlooker
09-27-2004, 09:48 PM
Griffon, is there going to be a script editor, or terminal similar to Maya's that will pick up the actions as you work in the GUI so you can watch how the calls are made, or anything similar to that in the future?

Griffon
09-27-2004, 09:51 PM
Valid points. I don't think calling commands is any more convoluted then say MEL. MEL being custom commands in a custom c-like language. Modo using a set of custom commands called from an established language. The "service" commands are meant as an iterface to SDK functions. As we expand and push the SDK more of this will be accessible from the scripting language. I have prototyped many tools in MEL prior to writing the actual Maya plugins. I too feel the need.

jangell
09-27-2004, 11:07 PM
Griffon, is there going to be a script editor, or terminal similar to Maya's that will pick up the actions as you work in the GUI so you can watch how the calls are made, or anything similar to that in the future?

Well, there's the command history. Most everything in the app is done through commands, and as such they should be recorded in the history. The undo stack is a streamlined version of the history that shows the effects of undos rather than the undo commands themselves.

-- Joe

onlooker
09-28-2004, 12:48 AM
Joe, what I was getting at was how easy learning MEL is for a beginning MEL scripter by just looking at what happens in the script editor while your working. I would say it was an extremely valuable resource, and a great reference when I started.

I have not gotten around to finding the command history yet in modo - I just bought it yesterday. I'll take a look at it tomorrow. Today is all pencil day for me (besides the surfing/typing).

Griffon, I didn't mean calling commands it was a slip of the tongue. I was just wondering if there would be anything similar to MEL, and the script editor.

jangell
09-28-2004, 01:01 AM
Joe, I have not gotten around to finding the command history yet in modo - I just bought it yesterday. I'll take a look at it tomorrow. Today is all pencil day for me (besides the surfing/typing).

Make the little command entry thingy in the lower-right corner taller. There's a macro recorder that helps create simple macros as well, and can be used as a starting point for scripts.

-- Joe

meta_Nerd
10-01-2004, 08:19 PM
I have played with the scripting quite a bit, and have found some strange things.

1: I can create a user.def and create a popup for it, but I cannot then access the data with a query. for instance:

of course after defineing a new user val user.defNew Chris.test ....ect.

$chance = lxq("user.value Chris.test ?");
lxout("query value before:: chance = $chance");

$chance = lx("user.value Chris.test ?");
lxout("open popup:: chance = $chance");

$chance = lxq("user.value Chris.test ?");
lxout("query value2:: chance = $chance");

I can see the data being updated in the commandHistory, but
nowhere here can I access the user.value . Is this possible?

2. If I want to get a list of verts and then move specific ones it seems that there are alot of extra steps to do to get this to work nicely.
example :

my @fgPtsSel = lxq("query layerservice verts ? selected");
now my problem is how do I go through these and move these selected points.

I can get vert positions, but not for my specific verts (@fgPtsSel)
my @fgVertPos = lxq("query layerservice vert.pos ? first");

the only way I have got this working was to use element select and set the move tool. Then loop through each @fgPtsSel setting the move tool attrs, and finally apply the tool. This works but seems like a long way around.

Am I missing something here?( I could easily be.) I really love the software, and I like the organization of the scripting language , I also like that modo took the opportunities to use a pre-existing scripting language much like Digital Fusion did with LUA. I think this is a very smart move. I just wish I had more information on the subject, or a forum to ask questions.

Thank you , and sorry if this is not the place for this post, but I need answers and this is the first place that I have seen anyone talking about the scripting.

I too cannot wait for the sdk to become availiable.

Excellent work luxology.

Chris Reid

Griffon
10-01-2004, 09:30 PM
Griffon, I didn't mean calling commands it was a slip of the tongue. I was just wondering if there would be anything similar to MEL, and the script editor.

Currently no plans for a build in text editor.

jangell
10-01-2004, 11:30 PM
1: I can create a user.def and create a popup for it, but I cannot then access the data with a query. for instance:

of course after defineing a new user val user.defNew Chris.test ....ect.

$chance = lxq("user.value Chris.test ?");
lxout("query value before:: chance = $chance");

$chance = lx("user.value Chris.test ?");
lxout("open popup:: chance = $chance");

$chance = lxq("user.value Chris.test ?");
lxout("query value2:: chance = $chance");

I can see the data being updated in the commandHistory, but
nowhere here can I access the user.value . Is this possible?

It should be possible; that's the whole point of user values. I wrote the RandomSel.pl example in the scripting docs (that and the scripting docs), and my test worked.

I _DID_ find a problem where if the user.value didn't already have a value, user.value would fail.

Can you email me the script you're using so I can check it out?


2. If I want to get a list of verts and then move specific ones it seems that there are alot of extra steps to do to get this to work nicely.
example :

my @fgPtsSel = lxq("query layerservice verts ? selected");
now my problem is how do I go through these and move these selected points.

I can get vert positions, but not for my specific verts (@fgPtsSel)
my @fgVertPos = lxq("query layerservice vert.pos ? first");

the only way I have got this working was to use element select and set the move tool. Then loop through each @fgPtsSel setting the move tool attrs, and finally apply the tool. This works but seems like a long way around.

To get the list of vertices, do what you were doing:

my @fgPtsSel = lxq("query layerservice verts ? selected");

Then use that list as a series of selectors:


foreach my $fgPt (fgPtsSel) {
my @pos = lxq("query layerservice vert.pos ? $fgPt");


Is that what you want to do?

To manipulate the selection use tools and commands to manipulate geometry in space.

-- Joe

meta_Nerd
10-02-2004, 12:31 AM
~~ I have edited this post all edits will be in red:

first of all I must say: I am new to perl, so I am really just learning as I go.

One thing I find in perl that is a bit odd for a 3D application is that it doesn't natively support multi-Dimensional arrays. There are work Arounds, but that makes some things a bit awkward.

found this isn't true, The info I had looked up had told me that there were no multi-D arrays.
Found explanations here:
http://search.cpan.org/~nwclark/perl-5.8.5/pod/perllol.pod (http://search.cpan.org/~nwclark/perl-5.8.5/pod/perllol.pod)


If anybody could shed some light on this or point me to a great spot to learn, I would really appriciate it.

This still holds true

Chris

meta_Nerd
10-02-2004, 09:26 AM
Code:
foreach my $fgPt (fgPtsSel) { my @pos = lxq("query layerservice vert.pos ? $fgPt");
***** small correction "@fgPtsSel" instead of "fgPtsSel" in foreach...


Thanks, this is what I was looking for. In the docs it only shows that you can do first,next,previous,... but not the actual point.

Hope we can get a scripting forum together soon. I know this has helped very much in the other apps that I have used.

As far as the user.data stuff. I will try to get it to work again and see if I can email something to you. Thanks for the value detail, That could be it.

Chris Reid

jangell
10-02-2004, 03:23 PM
Thanks for fixing the missing @.

[/left]
Thanks, this is what I was looking for. In the docs it only shows that you can do first,next,previous,... but not the actual point.

I was pretty sure that I'd mentioned in the docs that the attributes ending in 's' (such as "verts", "edges", etc.) can be used as selectors for the "verts.???", etc. attributes in addition to the layer_elements selectors... I'll make sure the docs are more clear on the subject for the next version.

-- Joe

meta_Nerd
10-02-2004, 06:40 PM
I was pretty sure that I'd mentioned in the docs that the attributes ending in 's' (such as "verts", "edges", etc.) can be used as selectors for the "verts.???", etc. attributes in addition to the layer_elements selectors... I'll make sure the docs are more clear on the subject for the next version.
The problem that is when you are first learning it, you don't really know enough about what selectors are etc. this looks scary to the beginner "verts.???" (of course I tried to learn everything in 1 night..probably not the best idea), It totally makes sense now. I would reccommend just one little example of how that works. I will email you privately for some other stuff.

Thanks for all of your help.

jangell
10-02-2004, 07:13 PM
The problem that is when you are first learning it, you don't really know enough about what selectors are etc. this looks scary to the beginner "verts.???" (of course I tried to learn everything in 1 night..probably not the best idea), It totally makes sense now. I would reccommend just one little example of how that works. I will email you privately for some other stuff.

Ah, that's right; the RandomSel.pl example gets a list of all elements, not just the selected ones. I'll make sure there's an example that works on the current selection in the next version of the docs.

-- Joe

CGTalk Moderation
01-19-2006, 10:00 AM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.