Chaosophia opened this issue on Mar 14, 2012 · 21 posts
RobynsVeil posted Mon, 26 March 2012 at 12:27 PM
Quote - ...I then opened up the python script to the shader I was trying to have matmatic read saved as a mm1 file, and received a bunch of syntax errors on that upon compiling in matmatic, guessing the encryptions on the texted played that part out and layed that idea to rest.
You don't open or insert or convert existing Python scripts (those with a .py extention) in matmatic, particularly if those scripts are not designed to generate materials. Generally, that won't work. You really need to study the documentation that comes with matmatic (any version). Matmatic scripts use the Python syntax, but the programme is designed to use the methods included in matmatic to make a node set mt5 or mc6, not to use Python scripts in general that are not designed to create materials.
The idea of matmatic is as Bagginsbill clearly defined: "Its purpose is to facilitate (make easier) the creation of Poser materials using words and math instead of node diagrams and mouse. It is an authoring tool." I.e., you write the code yourself using the methods provided in its included matmatic library, and matmatic will to make a material when you compile it.
Have a careful read of the documentation provided. No where does it state you can take existing Python scripts that are designed for other functions (even those for Poser) and by tacking on an mm1 extension generate a material.
Quote - Ok I have opened a few python scripts in notepad +
What was the intent of the original script (the one you took the code from)? Was it written - originally - to be compiled to be matmatic? If not, you are using code that isn't designed to be used in matmatic.
Quote - and the coding is legiable so as to say not incrypted, I save as a .mm1
Saving some random Python script with an .mm1 extension will not automagically make it a valid matmatic sc ript, any more than saving a .doc file with a .txt extention will make it a valid text file.
Quote - ...file and have matmatic compile it to alter the values around compaired to second mm1 from python shader, is this the correct working of Matmatic?
No, it isn't. You need to write your own scripts - after a careful study of the documentation - and compile them. I suggest starting with something simple and work your way up.
Quote - I have been getting syntax errors on python scripts that I have opened up and changed to the mm1 file type
...and you will. Those scripts are not designed to work as material-making scripts. You need to learn to write your own. It's not that hard - if I can do it, anyone can - but you will need to learn Python syntax and matmatic methods. There are no shortcuts, unfortunately. Using other peoples scripts that were made for other purposes won't work. Ever.
Quote - but I am curious to know why or how it is that the script works to load a texture from the menu in poser, and it has no syntax errors, but compiler picks them up? That really messed my head up when looking at it.
That is because you are using a script that was not designed to be compiled in matmatic into a material. You need to study the manual that came with matmatic and learn to write your own, specifically designed matmatic scripts.
Python is not Python is not Python. For instance, running a Blender Python script in Poser will more than likely generate errors. You need to understand the methods specific to the Python for the application you are trying to use it in to use the right methods for the desired results. So, taking a Poser Python script and trying to compile it in Matmatic is going to fail.
Learn to write from scratch. No shortcuts.
Monterey/Mint21.x/Win10 - Blender3.x - PP11.3(cm) - Musescore3.6.2
Wir sind gewohnt, daß die Menschen verhöhnen was sie nicht verstehen
[it is clear that humans have contempt for that which they do not understand]