PDA

View Full Version : LWPy - An Intro to Python for Lightwave



BigHache
09-18-2012, 04:07 AM
I'm using this thread to link to my Intro to Python for Lightwave Video tutorials (http://www.youtube.com/user/mediadentist/videos?flow=grid&view=1). Four parts are online now.

-BH

safetyman
09-18-2012, 06:00 AM
Very cool. I'm not a programmer, so it's pretty foreign to me, but I think this is a very good idea.

BTW -- I realize it's early in LW 11's life and it's integration with python, but why haven't we seen some cool python scripts hitting the public yet? Is it difficult to take scripts that were created for other programs (Maya, Blender, etc.) and convert them for use with LW? Forgive my ignorance.

BigHache
09-18-2012, 08:23 AM
Very cool. I'm not a programmer, so it's pretty foreign to me, but I think this is a very good idea.

BTW -- I realize it's early in LW 11's life and it's integration with python, but why haven't we seen some cool python scripts hitting the public yet? Is it difficult to take scripts that were created for other programs (Maya, Blender, etc.) and convert them for use with LW? Forgive my ignorance.

Hey thanks! Actually, I'm not a programmer either (yet).

There is functionality from the host applications that wouldn't carry over even if you did sucessfully convert the program from say Maya to Lightwave. I would say the main reason there hasn't been a lot of Python activity is we're still learning it. There are some folks here like Celshader who are well-versed in Python, but writing a plug-in that gets called within Lightwave is very different. It's like writing a C plug-in that doesn't get compiled.

safetyman
09-18-2012, 10:03 AM
Thanks for the info. Really excited to see some neat info in future vids. Staying tuned.

Dexter2999
09-18-2012, 11:02 AM
Very cool. I'm not a programmer, so it's pretty foreign to me, but I think this is a very good idea.

BTW -- I realize it's early in LW 11's life and it's integration with python, but why haven't we seen some cool python scripts hitting the public yet? Is it difficult to take scripts that were created for other programs (Maya, Blender, etc.) and convert them for use with LW? Forgive my ignorance.

Actually, Jen Hachigan (spelling?) has put a few threads up posting scripts for functions she has found useful.

I think the situation is perhaps a bit of a cycle that needs to be broken. Most people in the LW community don't know Python. This makes it hard for them to get excited about it. Without excitement not many people are motivated to learn python (but rather stick to LScript)

It will take time and more people to learn Python and grow the userbase, and threads like this (and Jen's) will help.

skarloc
09-18-2012, 11:27 AM
I'd like to say that these are essential viewing for beginners - they really helped me start.

BigHache
09-19-2012, 09:17 PM
I'd like to say that these are essential viewing for beginners - they really helped me start.

Thanks, that's good to know.

It's still a major WIP but I think now is a good point to release this. I've started a LWPy Wiki (http://www.lawson3d.com/lwpywiki/) that hopefully we can all learn from. It's small but more stuff will be added.

egearbox
10-25-2012, 11:13 AM
+1 to this - I just upgraded to 11 and was all excited to jump in and start learning Python and programming cool stuff and got stopped cold. 11 is still shipping with the LW 10 docs, which make no mention of Python.

Having said that, I'm still excited and looking forward to not only learning but contributing back, hopefully. :)

Celshader
05-06-2013, 09:40 AM
LW11.5 ships with Python documentation in its "lwpython11.5.zip" in the "sdk" folder. 11.5 also offers a new option for simplified "single-shot formatting" for generic scripts. This means "Hello World" can now be written like this for LW11.5:


import lwsdk

lwMF = lwsdk.LWMessageFuncs()
lwMF.info("Presenting...", "Hello, World!")

Ryan Roye
07-14-2013, 08:45 PM
I just wanted to say thanks for the overview and though it's a ton to absorb, I feel way better off exploring Python after watching the videos. A great resource to the Lightwave community!

I know the videos were made a while ago, but I only recently upgraded to LW 11.5 :D

nickdigital
08-01-2013, 04:13 PM
Will more chapters to this video series be made?

BigHache
08-01-2013, 08:36 PM
I just wanted to say thanks for the overview and though it's a ton to absorb, I feel way better off exploring Python after watching the videos. A great resource to the Lightwave community!

I know the videos were made a while ago, but I only recently upgraded to LW 11.5 :D

Thanks!


Will more chapters to this video series be made?

I always intended to make more but I've been on other projects. I have to spend time learning before I can share info though.

nickdigital
08-02-2013, 12:32 AM
Thanks for the update. I'm still trying to get my head wrapped around python and your videos are slowly helping the process for me.

tonyrizo2003
07-11-2014, 04:27 PM
Thank you!! This is great!! I really want to get into making my own tools, and so I am confident this will help.

OTny :)

KANUSO
03-28-2018, 08:15 AM
Thank You, nice Job.

You did a really nice Job for us all. Thank you again.

I am very much the opinion, that this should have to come from the developers of the python-Integration (lwsdk).

But so we get a fine documentation too.
I am hard on the work to do some python script and I want to ask if there is interest in what I find out during my work. The documentation from NT is mainly stuff, that we could (most of it) get via the Pythons help command. We don't Need a documentation on the base: "Oh, look, we have implemented..." we Need more like: "Look we have implemented... and this way you can use it"
What I'am speeking of is... examples for the usage of the lwsdk, I'am not talking about python Basic-stuff... this should be found on python sites.
So my question is:
If my work is done and my Boss will give me some time to do so, than I would give the Information, that I did searched together bit for bit to the community. But only if there is interrest on it.
Even if I think, that this should have to come from NT.

Regards,
KANUSO

BigHache
03-28-2018, 07:32 PM
Hello and yes, there is definitely interest in any documentation for Python in LightWave.

I think some of the challenge for Python in LightWave is perception that the implementation is a bit more complex than was anticipated, initially.

Please share anything you come up with.

KANUSO
11-01-2018, 03:43 AM
Hello BigHache,

I will post here because I want to help others in creating Python scripts and the most users are not aware that the nuArchitect bundle includes a GUI-Designer.

I don't have documentation created for the GUI things in LW-Python. But I do have a script created that can build Python-Scripts (the GUI part and its handling). The created scripts are ready to run and only the work of your choice has to be implemented. This includes all actual possible controls and even some extended usages of them. So you can create for example GFX-Buttons (a button with a picture on it instead of text). You can create complex GUI's even TAB-CTL in TAB-CTL is alowed. This script is part of the Python nuArchitect bundle. At the moment it uses libraries, that are part of nuArchitect. But if the interest is high enough, I will develope a stand alone Version. At the Moment you have to install the complete bundle to use nuGUIDesign script.

You can look at nuArchitect python version (https://forums.newtek.com/showthread.php?158247-nuArchitect-python-version) in this Forum. There you will find more Information about the nuArchitect bundle and nuGUIDesign.

Regards,
KANUSO