![]() |
custom classes for scriptOp with maxscript on-fly assembly ? - Printable Version +- tyFlow Forum (https://forum.tyflow.com) +-- Forum: tyFlow Discussion (https://forum.tyflow.com/forum-1.html) +--- Forum: General Discussion (https://forum.tyflow.com/forum-2.html) +--- Thread: custom classes for scriptOp with maxscript on-fly assembly ? (/thread-1760.html) |
custom classes for scriptOp with maxscript on-fly assembly ? - Geoff - 05-31-2020 Hi Tyson, I would like to have all my C# classes and functions loaded in all tyflow scriptOps with the "using" command... do I have to compile my C# code or can I go with the on-fly maxscript method? I tried but with no luck... I don't want to open visual studio! please tell me it's possible! and how ![]() RE: custom classes for scriptOp with maxscript on-fly assembly ? - tyFlow - 05-31-2020 Can you be more specific about how you'd like to load the classes? Do you have a pre-built DLL you want to import or is it just a .cs file? RE: custom classes for scriptOp with maxscript on-fly assembly ? - Geoff - 05-31-2020 Here is what I'm trying to achieve from maxscript in order to get my classes back I thaught just typing "using MyNamespace;" in a scriptOp would work but no.. Code: fn MyAssembly = I wanted to do it from maxscript for convenience and of course for not having to restart max, but if prebuild dll is the only way, I'll do it. I'm writing a Max helper pugin for character rigging purposes and IK solving, for now in maxscript/C# and maybe totally C# later.., and I want it to work for both rigs and tyActors! It would be great if you could point me how to load/access my classes in the scriptOp? whether it be on max startup or on fly, using maxscript, cs file, or prebuilt dll... thanks! RE: custom classes for scriptOp with maxscript on-fly assembly ? - Geoff - 06-05-2020 I'm just starting learning C# and really enjoyed using the script operator so far, this my new favorite hobby! But problems began when I wanted to use my own classes in different scriptOps... Just for you to know, my classes are just made of dictionnaries or arrays of int, quat and point3 with a few methods... but the code is getting bigger and bigger! I hope not to bother you with all these questions, I don't even know if my last request implies that you recompile tyflow to add references from my cs files ![]() Anyway, it seems way more difficult than manipulting dotnet objects in maxscript! and writing c# for late use in tyflow is far from being a simple csproj tutorial ![]() I know you're busy but any examples, tips or links regarding the usage of cs.files or pre build dll with tyflow script operator would be much appreciated! thanks! |