.NET and it's Implications for Maxscript [Max 9]

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

THREAD CLOSED
 
Thread Tools Display Modes
  10 October 2006
NET seems promising allthough I'm not completely sure what we can do with it when it's connected to Max.
Interfaces sounds like the most useful, but I guess mathematical functions would be cool too.
It should be much easier to create a NET "extension" than to do it in c++, right?

It's quite difficult to do maxScript extensions with c++. Especially formatting the data when you send it back and forth can be hard. For example try sending arrays of 3d objects back and it gets tricky.

For me it's a serious drawback that it only works in max9. For that reason I can't do anything related to PolySpeed since it supports Max7.

We use c# and Net for our 3d tools at work, but so far all the plugins etc is done in Visual Net 2003. Now with max9 we will move over to use Visual Studio 2005 but only c++ so far.

Anyone has more ideas of what cool things we can do with this NET connection?
/Andreas
__________________
Rare - Lead VFX Artist
 
  10 October 2006
Have you tried setting enableAccelerators to false?

(I haven't tested a rich edit control yet)

Chris J.
 
  10 October 2006
Originally Posted by f97ao: NET seems promising allthough I'm not completely sure what we can do with it when it's connected to Max.
Interfaces sounds like the most useful, but I guess mathematical functions would be cool too.
It should be much easier to create a NET "extension" than to do it in c++, right?

It's quite difficult to do maxScript extensions with c++. Especially formatting the data when you send it back and forth can be hard. For example try sending arrays of 3d objects back and it gets tricky.

For me it's a serious drawback that it only works in max9. For that reason I can't do anything related to PolySpeed since it supports Max7.

We use c# and Net for our 3d tools at work, but so far all the plugins etc is done in Visual Net 2003. Now with max9 we will move over to use Visual Studio 2005 but only c++ so far.

Anyone has more ideas of what cool things we can do with this NET connection?
/Andreas


Well, realistically, anything you can do in the win32 api is exposed via the .NET framework. And just about everything exposed in the .NET framework can be accessed now through maxscript. So use your imagination I suppose. I for instance have been using System.XML.XMLDocument quite extensively for a while, and really love it. I can't wait to try out regular expressions...

Chris Johnson
 
  10 October 2006
@Chris: I didn't before.
I just tried it now and it doesn't seem to work.
__________________
||||| www.wahooney.net |||||
Head Towards the Light

Learning to use Blender3d

Last edited by Wahooney : 10 October 2006 at 07:16 PM.
 
  10 October 2006
wahooney, i think in an earlier test of mine it worked, i don't have the code anymore though

disabling and re-enabling keyboard acceleration is much nicer with .net since it has getFocus and looseFocus (similar) eventhandlers for all ui elements.
__________________
Kai Stavginski

www.Aearon.de

"There's nothing to it but to do it!"
 
  10 October 2006
Originally Posted by f97ao: NET seems promising allthough I'm not completely sure what we can do with it when it's connected to Max.
Interfaces sounds like the most useful, but I guess mathematical functions would be cool too.
It should be much easier to create a NET "extension" than to do it in c++, right?

It's quite difficult to do maxScript extensions with c++. Especially formatting the data when you send it back and forth can be hard. For example try sending arrays of 3d objects back and it gets tricky.

For me it's a serious drawback that it only works in max9. For that reason I can't do anything related to PolySpeed since it supports Max7.

We use c# and Net for our 3d tools at work, but so far all the plugins etc is done in Visual Net 2003. Now with max9 we will move over to use Visual Studio 2005 but only c++ so far.

Anyone has more ideas of what cool things we can do with this NET connection?
/Andreas


I think with this connection it will be possible for example to use class libraries from toolset and use them in order to write an exporter for example.
Also some parts of the .Net framework are handy ; like Xml read/write, .Net controls and dialogs, network and file access, 2D drawing etc...

Also, it's possible to write a managed wrapper using C++/CLI in order to expose an engine (C++) to the toolset (C# and now MAXScript!).

Yes, I agree with you : it will be better and much easier to write MAXScript extensions in C#!

.Net connection is a cool extension to MAXScript and this feature will be very useful and powerful.
__________________

Last edited by ypuech : 10 October 2006 at 09:23 PM.
 
  10 October 2006
So does anyone know if its possible to write code in .net in visual studio, not via maxscript. Then complile it the same way as done with a c++ plugin?

I would this this would be a very fast way to do c# style scripts instead of doing it via maxscript interface?
__________________

 
  10 October 2006
Would it be possible to read for example joystick data? Directly from the joystick that is?
Really would like to learn this stuff!

Thanx,
-Johan
__________________
Online: LinkedIn
 
  02 February 2007
okily ppl...i go figure there's some serious talent and knowledge gathered in this thread...so i thought i might jump in and ask a quick question.

First off all i played with dotNet and serious fell in love with the new possibilities. It IS indeed somewhat cumbersome compared to the straightforward rollout system, but alone the dedicated anchoring and layout controls i know from delphi and love so much make it worth the hassle

Anyways i managed to write a wrapper similar to the rolloutcreator to ease often to do tasks in basic UI creation. I managed to add in custom dotNet controls (played with the stimulsoft controls and love em ) but now ran into a serious dead-end.

Creating and populating the ui works like a charm but i just dont manage to get the wrapper to create proper eventhandlers for Controls. The listener ends up in spitting ">> MAXScript MacroScript Error Exception: -- Unable to convert: "xrefSelButton1" to type: dotNetObject <<" In my face. xRefSelButton one is a dotNet Button on a dotNet form and both have been created in the wrapper wich creates a big string that is executed (similar to the rolloutcreator system). No matter if i try to create the handler programmatically too or if i try to add it manually behind the form creation in the main script i end up with that error. Any Pointers maybe ?

Kind Regards,
Thorsten

P.S. Bobo, you rock...PERIOD...wouldnt have come so far with both mxs and dotNet without you! Keep it coming!!
 
  02 February 2007
Originally Posted by instinct-vfx:
Creating and populating the ui works like a charm but i just dont manage to get the wrapper to create proper eventhandlers for Controls. The listener ends up in spitting ">> MAXScript MacroScript Error Exception: -- Unable to convert: "xrefSelButton1" to type: dotNetObject <<" In my face. xRefSelButton one is a dotNet Button on a dotNet form and both have been created in the wrapper wich creates a big string that is executed (similar to the rolloutcreator system). No matter if i try to create the handler programmatically too or if i try to add it manually behind the form creation in the main script i end up with that error. Any Pointers maybe ?


Pointer: When you call Execute() on a string, the string is evaluated in global scope. If the variables referenced in the string are not visible in the global scope, it would fail. Of course, it could be something else, but you asked for pointers and that's the first thing that comes to mind...
__________________
Bobo
 
  02 February 2007
Originally Posted by ypuech: Yes, I agree with you : it will be better and much easier to write MAXScript extensions in C#!


Why will it be better?
C# is slower then c++ (depending on what you do).
So I'm not sure if it would be better.
It will be easier...that's true.

-Kees
 
  02 February 2007
thanks a lot bobo...managed to get it to work by creating controls as global vars. Is that generally a bad idea ? Or the way to go ?

Thanks a lot once more,
Thorsten
 
  02 February 2007
Originally Posted by instinct-vfx: ...

Creating and populating the ui works like a charm but i just dont manage to get the wrapper to create proper eventhandlers for Controls. The listener ends up in spitting ">> MAXScript MacroScript Error Exception: -- Unable to convert: "xrefSelButton1" to type: dotNetObject <<" In my face. xRefSelButton one is a dotNet Button on a dotNet form and both have been created in the wrapper wich creates a big string that is executed (similar to the rolloutcreator system). No matter if i try to create the handler programmatically too or if i try to add it manually behind the form creation in the main script i end up with that error. Any Pointers maybe ?
...


It sounds like you have either two many parameters in your event handler, or one less then you need.

Either way, it's really useless to complain that something doesn't work when you don't post code. If I can't see your code, I can't debug it.

Anyways, I think this thread should not be used to debug anyone's personal scripts. It's big enough, and should be used for discussing .NET. If you have a problem with a particular script, then start another thread. You will probably get more visibility that way.
 
  02 February 2007
Originally Posted by kees: Why will it be better?
C# is slower then c++ (depending on what you do).
So I'm not sure if it would be better.
It will be easier...that's true.

-Kees


Kees, I totally agree with you ; C++ is usually faster than C#. I said that C# is better than C++ in the way that C# code is more concise, easiest to debug and read, memory management and exception handling are better than in C++.
For example, a lot of video games and CG/VFX companies are now developing many of their tools using C#+.NET because this combination is now the best to develop softwares, but not to develop (good) games.
__________________
 
  02 February 2007
i,m tring to wire xform gizmo scale to aspinner But when i try to use the spinner it givse me an error it is


unable to convert:[1,1,1] to type:float


could any Body help me solving this issue i,m working on 3dmax9

thank you
ns
 
Thread Closed share thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
CGSociety
Society of Digital Artists
www.cgsociety.org

Powered by vBulletin
Copyright ©2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump
Miscellaneous

All times are GMT. The time now is 12:40 PM.


Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.