The Python Version of nuArchitect is now coded.
Before I will load it up, I will do some final tests to it's scripts.
I looked the code I've coded and must say:
Some of the code would be changed, if I had to code it now. Why is that so? Because the work with Python and the LWSDK was new to me. And I have learned so much things. So with my experience changes, the code would Change too. For example: I would use much more exeption handling. I was not Aware of Python can do this (thanks to Oliver for posting a thred wich made me Aware of exception handling in python).Until now there is nearly no Python exception handling implemented. The libraries of nuArchitect would be more seperated and structured. The object oriented use of code would be more considered. On some of the code you can see steps of a beginner.
First I will Show you how to install the nuArchitect bundle.
At first there must be a Special structure in the filesystem of your Computer. This should look like this:
View attachment 143048
This structure is a must (and case sensitive). It does not matter where this structure is (this can be set in the scripts).
In the "nuSoft" folder itself are files with data for nuArchitect stored.
Some words about the structure:
It does not care where on your computer this structure of folders is located, but it does care that the names of the folders are the names you can see here. The only exception is the folder "nuSoft". This folder can have any name you want. And this is the folder you should set in the preferences tab (Path) of the scripts of nuArchitect. It must only be set once, all scripts are using the same path.
The folders of the GUI branch are used by nuGUIDesign only and hve the following content:
Code - The code that nuGUIDesign generates will be stored here by default.
Defines - If you save a creation, it goes here by default.
Funcs - Here are subfolders for every event a control can react on. In this folders you find ".txt" files with definitions that can be used in your GUIs. If you become more and more experienced in lwsdk and Python, you can expand this files by yourself. You can change the standard files, but you should not. If you are not satisfied by a standard file than creare a new one and give it a name which is telling you what it does.
GFX - Here you can store your graphics to find them faster in your project. This folder is empty after installation.
Templates - This is the path where nuGUIDesign stores your templates
Help - This folder should hold the Helpfiles of the LScript versions. If you have not installed the LScript versions, this folder and its subfolders are not in use. And they don't need to be installed. See the documentation of the LScript versions for more information.
Helpy - This folder and its subfolders are holding the helpfiles of the Python versions of nuArchitect. I've decided to strictly separate the helpfiles. This should prevent in wrongly mixing the files.
css - here is the stylesheet of the help located
img - here are the images of the helpsystem stored
js - here is the JavaScript of the helpsystem stored. The only function herein is "sizeme" which sizes the help page to display it correct.
Icons - This is the folder where nuIconDesign stores your icons by default.
Images - This is the folder where nuImage2Dat stores the imagedefinitions by default.
UVDefs - In this folder you will find the UV-Definitions from the UV-Map tab by default.
View attachment 143047
This structure is also a must and case sensitive. It must be placed in a path where Python in LW Looks for scripts. I would prefere the path:
"LW-Installation"\support\plugins\scripts\Python
(MAC users Change the "" to "/")
In this folder you find some folders that are installed during your installation of LW. The LW-Original folders "Common", "Layout", "Modeler" and "PRIS" are located there. Here you should create the following structure (in addition to all that is already located there):
Because Python names its libraries by default as so as the name of the folder of the respective lib, the names of the folders must be named as so as in this picture (case sensitive).
nuArchitect - all the geometry creating scripts should be placed here
dlgedit - here is the "dlgedit" library located.
guiedit - here is the "guiedit" library located.
nuSoftLib - here is the "nuSoftLib" library located.
Yes, the Installation is a bit tricky, but this isnt a single script, it is bundle of scripts with the ability to use stored files.
I am open to ideas on how to Change this to give the user a better way to install.
So far for now and regards,
KANUSO
Before I will load it up, I will do some final tests to it's scripts.
I looked the code I've coded and must say:
Some of the code would be changed, if I had to code it now. Why is that so? Because the work with Python and the LWSDK was new to me. And I have learned so much things. So with my experience changes, the code would Change too. For example: I would use much more exeption handling. I was not Aware of Python can do this (thanks to Oliver for posting a thred wich made me Aware of exception handling in python).Until now there is nearly no Python exception handling implemented. The libraries of nuArchitect would be more seperated and structured. The object oriented use of code would be more considered. On some of the code you can see steps of a beginner.
First I will Show you how to install the nuArchitect bundle.
At first there must be a Special structure in the filesystem of your Computer. This should look like this:
View attachment 143048
This structure is a must (and case sensitive). It does not matter where this structure is (this can be set in the scripts).
In the "nuSoft" folder itself are files with data for nuArchitect stored.
Some words about the structure:
It does not care where on your computer this structure of folders is located, but it does care that the names of the folders are the names you can see here. The only exception is the folder "nuSoft". This folder can have any name you want. And this is the folder you should set in the preferences tab (Path) of the scripts of nuArchitect. It must only be set once, all scripts are using the same path.
The folders of the GUI branch are used by nuGUIDesign only and hve the following content:
Code - The code that nuGUIDesign generates will be stored here by default.
Defines - If you save a creation, it goes here by default.
Funcs - Here are subfolders for every event a control can react on. In this folders you find ".txt" files with definitions that can be used in your GUIs. If you become more and more experienced in lwsdk and Python, you can expand this files by yourself. You can change the standard files, but you should not. If you are not satisfied by a standard file than creare a new one and give it a name which is telling you what it does.
GFX - Here you can store your graphics to find them faster in your project. This folder is empty after installation.
Templates - This is the path where nuGUIDesign stores your templates
Help - This folder should hold the Helpfiles of the LScript versions. If you have not installed the LScript versions, this folder and its subfolders are not in use. And they don't need to be installed. See the documentation of the LScript versions for more information.
Helpy - This folder and its subfolders are holding the helpfiles of the Python versions of nuArchitect. I've decided to strictly separate the helpfiles. This should prevent in wrongly mixing the files.
css - here is the stylesheet of the help located
img - here are the images of the helpsystem stored
js - here is the JavaScript of the helpsystem stored. The only function herein is "sizeme" which sizes the help page to display it correct.
Icons - This is the folder where nuIconDesign stores your icons by default.
Images - This is the folder where nuImage2Dat stores the imagedefinitions by default.
UVDefs - In this folder you will find the UV-Definitions from the UV-Map tab by default.
View attachment 143047
This structure is also a must and case sensitive. It must be placed in a path where Python in LW Looks for scripts. I would prefere the path:
"LW-Installation"\support\plugins\scripts\Python
(MAC users Change the "" to "/")
In this folder you find some folders that are installed during your installation of LW. The LW-Original folders "Common", "Layout", "Modeler" and "PRIS" are located there. Here you should create the following structure (in addition to all that is already located there):
Because Python names its libraries by default as so as the name of the folder of the respective lib, the names of the folders must be named as so as in this picture (case sensitive).
nuArchitect - all the geometry creating scripts should be placed here
dlgedit - here is the "dlgedit" library located.
guiedit - here is the "guiedit" library located.
nuSoftLib - here is the "nuSoftLib" library located.
Yes, the Installation is a bit tricky, but this isnt a single script, it is bundle of scripts with the ability to use stored files.
I am open to ideas on how to Change this to give the user a better way to install.
So far for now and regards,
KANUSO