Page 1 of 5 123 ... LastLast
Results 1 to 15 of 74

Thread: nuArchitect python version

  1. #1
    Registered User
    Join Date
    May 2017
    Location
    Lampertheim, Germany
    Posts
    129

    nuArchitect python version

    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:
    Click image for larger version. 

Name:	install1.jpg 
Views:	101 
Size:	29.0 KB 
ID:	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.

    Click image for larger version. 

Name:	install2.jpg 
Views:	57 
Size:	6.6 KB 
ID:	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

  2. #2
    Registered User
    Join Date
    May 2017
    Location
    Lampertheim, Germany
    Posts
    129

    Description of the contents

    What is included in the base packet of nuArchitect bundle?

    1. nuArches - is to create gothic/roman arches
    2. nuArchStones - is to create arches made of single stones
    3. nuBridgeStones - is to create bridges made of single stones
    4. nuCathCei - is to create cathedral like ceilings
    5. nuCirclePlan - is to create Stone circles
    6. nuColumns - is to create columns
    7. nuCrackedStones - is to create cracked stones
    8. nuDoors - is to create doors
    9. nuFences - is to create fences
    10. nuFloors - is to create floors
    11. nuGates - is to create gates
    12. nuGothBlk - is to create blocks of gothic/roman look
    13. nuGothXPass - is to create gothic passes (I don't know if this is called "pass" in english)
    14. nuGroundplan - is to create stonewalls that follow a groundplan
    15. nuOrnaments - is to create ornaments (like those from a blacksmith)
    16. nuPedestals - is to create pedestals
    17. nuPlaque - is to create plaques
    18. nuRoofGable - is to create Roof gables
    19. nuRopePath - is to create ropes/chains that follow a path
    20. nuRopes - is to create ropes/chains that hanging around (sag)
    21. nuRota - is to create rotational objects
    22. nuSockets - is to create sockets like those from statues
    23. nuStairStones - is to create stairs made of single stones
    24. nuTombstone - is to create tombstones
    25. nuWallStones - is to create walls with Windows, passes and doors, made of single stones
    26. nuWell - is to create wells
    27. nuWinsGoth - is to create gothic/roman windows
    28. nuWinsStd - is to create Standard Windows
    29. nuGUIDesign - is to create scripts of a GUI Definition (this is a complex script that is made to create python scripts)
    30. nuIconDesign - is to create Textfiles, that can be used to cut and paste Icon-definitions in a python script
    31. nuImage2Dat - is to create Textfiles, that can be used to cut and paste Image-definitions in a python script
    32. nuUV2TGA - is to save a UV's out to a TGA file


    Regards,
    KANUSO

  3. #3
    great and congratulations for getting this out! looking forward to this...
    3dworks visual computing
    demo reel on vimeo
    instagram

    OSX 10.12.x, macpro 5.1, nvidia gtx 980 ti, LW2015.x / 2018.x, octane 3.x

  4. #4

    looks nice  

    this will run faster than the lws files then?
    LW vidz   DPont donate   LightWiki   RHiggit   IKBooster   My vidz

  5. #5
    Super Member JohnMarchant's Avatar
    Join Date
    Mar 2003
    Location
    Murcia, Spain
    Posts
    3,017
    Great work, cant wait to test the speed using python.
    Dell XPS 15
    15.6-inch (3840 x 2160) 4K 282ppi IPS LCD
    Intel i7 7700HQ 2.8GHz
    Windows 10 64Bit
    NVidia GeForce GTX 1050 Ti
    1TB SDD
    32Gb Ram

    LightWave 2019.03

    Very nice Laptop

  6. #6
    Super Member Kryslin's Avatar
    Join Date
    Feb 2009
    Location
    Prescott, IA
    Posts
    1,522
    Excellent...I was just going to ask when the GUI designer would be released...
    --------
    My Scripts for Lightwave
    Intel Core i7 960 @3.20 Ghz, 24 GB ram, EVGA 6GB GTX980Ti "Classified" driving 2 x HP LA2405.

  7. #7
    Registered User
    Join Date
    May 2017
    Location
    Lampertheim, Germany
    Posts
    129

    The files

    The Python nuArchitect bundle is as so as all other Versions released as donationware. There is no must of any donation, but if you find this usefull or use it Commercial than you should (no must) donate to [email protected] via PayPal.


    The file
    nuArchitect_dat1.zip
    includes data that is used by nuArchitect

    The file
    nuArchitect_dat2.zip
    includes html for showing some example Pictures

    The file
    nuArchitect_src.zip
    includes the scripts


    What to do with that files?
    The files has the structure in them, that is in use by the nuArchitect bundle. See the first entry in this thread for further Information.

    nuArchitect_dat1.zip has the structure of the "nuSoft" path. Copy it complete to anywhere on your Computer. Remember this path and set it in any of the geometry-creating script of the nuArchitect bundle. You will find a tab in those scripts named "Preferences". There you can set the path.

    The file nuArchitect_dat2.zip has the structure of a html Directory in it, that you can use to Display some example Pictures of the nuArchitect bundle.

    The file nuArchitect_src.zip includes the structure of the scripts itself. Copy the Contents to any path that Python Looks for scripts in LW. I prefere the path:
    "LW-Installation"\Support\plugins\scripts\Python
    (MAC users should Exchange the "" to "/")

    If you have all done well, than you should restart LW in order to the scripts will be recognized.
    You can even edit a menu for the scripts (Edit Menu Layout) in the mainmenu of the modeler. The script nuGUIDesignL.py can be started from the Layout module of LW.

    A issue that I am Aware of is:
    If you set a new color-Setting with the preferences tab, than you should press "Store" and restart the Modeler. I didn't find how to delete a Surface and overwriting the Settings seem not to lead to the wanted effect. So if you don't restart, the previouse Setting will stay intact.

    Regards,
    KANUSO
    Last edited by KANUSO; 10-10-2018 at 02:31 AM.

  8. #8
    Registered User
    Join Date
    May 2017
    Location
    Lampertheim, Germany
    Posts
    129

    Additional information

    All future extensions, bugfixes, changes will be posted here in this thread.

    At the Moment there is planned a Extension "nuFountain" wich will create fountains.


    @erikals and JohnMarchant:
    I didnt stop times, but...
    Yes the scripts will run faster (exept the parts where the Speed depends on the LW-core for example togglepatches/freezecurves etc.)
    On some parts the Speed is increased very high, on other parts not noticeable. So I would say, Yes but....

    But you should make your own tests.

    @Kryslin:
    You should see the Step by Step examples in the Documentation. There you can see how the things work together

    Best regards,
    KANUSO

  9. #9
    Big fan of coffee raw-m's Avatar
    Join Date
    Jul 2003
    Location
    London
    Posts
    2,338
    Big thanks, looking forward to this! But, I'm afraid I can't make any sense of the installation guides!

    I'm on a Mac, I've put the the nuArchitect folder here:
    ....LightWave3D_2018.0.6/support/plugins/scripts/Python

    I've moved the nuArchitect_dat1 folder elsewhere so I can enter it's path in the your nuArchitect preference.

    I've no idea what plugin to run in Modeller to get to the nuArchitect interface, all I get are errors.

    Sorry if I'm being daft, what am I missing?

  10. #10
    Registered User
    Join Date
    May 2017
    Location
    Lampertheim, Germany
    Posts
    129
    Hello raw-m,

    to help you out, I must get more Information about how exactly you install the bundle. What errors are fired? If all is right installed, every script shown in the previouse post "Description of the contents" should run. They all start with "nu" and Ends with ".py". If you enter the "Edit Menu Layout" form the mainmenu of the Modeler, and type in "nu" in the left TextBox, are than the scripts listed? If not there is something wrong with the Installation.

    As nobody in my Company works with MAC anymore (the one we had isn't anymore present), so I cant test. Maybe someone who is working with MAC can help, if this is a Problem only on MAC.

    Regards,
    KANUSO
    Last edited by KANUSO; 10-10-2018 at 08:36 AM.

  11. #11
    Big fan of coffee raw-m's Avatar
    Join Date
    Jul 2003
    Location
    London
    Posts
    2,338
    Thanks for your patience KANUSO!

    I think the python scripts loads automatically which is great. Not sure which one I need to load in order to get the interface up? If I create a shortcut to "Python nuArches" for instance, I get the attached error.

    If any Mac users have better luck please share
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	nu.png 
Views:	61 
Size:	36.8 KB 
ID:	143061   Click image for larger version. 

Name:	nu_error.png 
Views:	74 
Size:	51.9 KB 
ID:	143062  

  12. #12
    Registered User
    Join Date
    May 2017
    Location
    Lampertheim, Germany
    Posts
    129
    Ok, this Looks like there is a bug in my code. This will affect all scripts. I will Change them and upload them again. I don't know how Long this will last. I will check the code for other path-issues with MAC.

    Sorry for that.

    If all goes well you only have to Exchange the old scripts with the new ones...

    Rgards,
    KANUSO

  13. #13
    Big fan of coffee raw-m's Avatar
    Join Date
    Jul 2003
    Location
    London
    Posts
    2,338
    Cheers KANUSO, looking forward

  14. #14
    Registered User
    Join Date
    May 2017
    Location
    Lampertheim, Germany
    Posts
    129

    Bugfix

    Bugfix to all scripts in the nuArchitect bundle.

    There is an error, that belongs to all scripts. After a new Installation of nuArchitect bundle, the engine can't find the file "nuSoft.dat". This is because the path isn't defined to the scripts. To solve this Problem I have coded a script to initial set the path. This script is named "nuSetPath.py".
    Please overwrite the scripts you have previousely installed with the ones from the following file.

    nuArchitect_fix.zip

    After you have installed the new Versions, restart LW.
    Start the Modeler.
    Change to the menu "Utilities"
    Click on "Python" on the left side
    Navigate to the path where you have installed the scripts
    Choose the file "nuSetPath.py" and click "Open"
    In the Dialog that opens, use the "Path" control to navigate to the path where you have the "nuSoft" structure installed (or enter the path by your own)
    Click Store
    Click the "nuSoft" button to the bottom right

    Now the scripts should run correct.

    Sorry again and regards,
    KANUSO
    Last edited by KANUSO; 10-10-2018 at 03:36 PM.

  15. #15
    Big fan of coffee raw-m's Avatar
    Join Date
    Jul 2003
    Location
    London
    Posts
    2,338
    Hi KANUSO

    Nearly there but getting an error.

    The new script works well. nuSetPath.py opens up and I can select my path and hit Store - everything seems OK, but when I click on the logo the window closes but nothing else happens.

    Running any off the scripts gives me the attached errors. What is the make of the python script I should apply to the menus to open the interface?
    Attached Thumbnails Attached Thumbnails Click image for larger version. 

Name:	ERROR.png 
Views:	61 
Size:	57.7 KB 
ID:	143076  

Page 1 of 5 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •