my advice would be don't use maxscript and regex Python has easy to use libraries for accessing JSON elements and making changes. I'd strongly suggest doing that instead
in my first steps with python and Qt more or less i understand how it works, in next steps i have a mini troubles for example i don't know how does this fix: if evaluate in max, it works. Someone could light my way, please ^^
I use Sublime Text 3 with a couple of packages. * Send To Max - binds Ctrl + E (like the maxscript Editor) to execute the current file in Max. * Anaconda - Python IDE and Autocomplete * Perforce - for source control * Theme - Freesia - dark theme, like my soul
I think that i got it. I need two, because will be cases with Maxplus doesn't have the correctly command or function and i need pymxs. So, in any cases of this, i understand that i could refactor my mxs scripts with Python ( obviously with MaxPlus and pymxs ), aren't they?
poopipe is right, don't bother with Regex. The python code for this is pretty easy. The only issue was I had to paste your Json text in to an online linter before Python could read it. https://jsonlint.com/ import json #open file for reading data_file = open("C:\Users\monst\Desktop\data.json", mode='r') #load the json file…
Hi @EspiSensei You're importing the pymxs module but you're not using it! I assume you went to the documentation and saw rt.customScript() and assumed it would work, but you first need to define the rt object. This is the line I believe you need:rt = pymxs.runtime Place it somewhere before line 5. This will load the pymxs…
It's because the interpreter/linter in Visual Studio Code doesn't know of the existence of the MaxPlus/pymxs module, those modules only exist in the Max specific interpreter. You can change the settings for this somewhere to point to it I'm sure but I'm not a Max user and don't have it installed (nor did I know until now…
Doh!, sorry guys for this noobs mistakes! haha But I've tried with your feedback and doesn`t work :( the error which 3ds max gave me was: The same error gave the Listener: "Traceback (most recent call last): SyntaxError: invalid syntax (<input>, line 132)" And in my IDE(Visual Studio Code), the pylynt says the same:…
Hi guys! i have a little doubt about custom functions (its a dle, this function call a C++ script), the sintax in maxscript is the following: local customScriptOK = customSript theObjs thePath settings:customScriptSettingsFile log:customScriptLogFiletheObjs = #(obj1,obj2) thePath = "C://" this script you can call like…