A github.io page with occasional articles about Blender with Python, Python, Linden Scripting Language, or anything else that comes to mind. Recent changes: Experiments with Second Life’s Lua scripting language, now in alpha testing.
Let’s think about the design a bit. I’m envisioning six separate segments where cars or locomotive can be located:
I’ve become interested in railroad shunting, in particular the Inglenook Shunting game. Could we have something like that for Valkyrie Transport?
I really just wanted to say “variadic”. That’s the official term for functions with a variable number of arguments. Let’s see how those work in SLua.
Now let’s look at special SLua ways of calling functions, with optional arguments and variable lists of arguments. In this article, we’ll show how to handle an optional argument.
Today, we’ll start with my testing “framework” from yesterday, with no tests in it, and we’ll talk about a functions returning nothing, one thing, many things, even tables. Even other functions!
I promised to show you how the tests work. I just ginned up a trivial testing setup. Probably at some future time I’ll do something more fancy but this was enough for today:
By way of summing up, at least until the next article, today we’ll look at a complete example of a simple SLua class, and a diagram showing where the metatable that makes it work fits in.
I think we have the background now to describe Lua objects and how they work. Let’s try. Let me state our conclusion now and then build up to understanding it:
Do not tread beyond here unless you want to begin to learn what goes on behind the curtain.
This morning, we going to take a step toward understanding SLua objects, by discussing the fact that a table can have functions in it, not just data items. That’s the first step along the way to objects: there will be at least one more article about this, and probably more.
Wild idea: What if we didn’t put code in dataserver that knows so much about Person, but instead let the Person handle the dataserver event?
Let’s put in the second dataserver-requiring field, the pay info. It will work just like the one for rez date. We’ll proceed in tiny steps. Each step, we’ll try to put in the code that best deserves it.
The tricky bit in the homework is the dataserver bits. Let’s get started on that part.
This morning, we’ll start with a very small refactoring, and then produce the first draft of our desired report. At least that’s the plan: plans often go awry.
As an exercise, I am going to try to implement an object-oriented solution to the homework from the SLua class of April 16, 2025. Let’s start with some introduction to objects.
Summary notes from JR on a texturing session.
This article documents Scraper
, a very ad-hoc program that reads an article and downloads all referenced gyazo images into the assets folder of this project, ensuring that articles will not lose their images if gyazo versions are deleted.
JR: Local images
DS: are we doing any stuff up in S1 tonight?
A session on texturing in Blender from NS.
Yesterday, I got the geometry nodes network that produces the bent double spiral working. Today, I’m going to try to improve it. Here’s where we’re starting:
We’ve decided that our various input files should be kept in folders based in the user’s files, not inside the project, since new input objects will probably be created often, and the code will, we think, change much less often.
Here is a patch of code:
With the single-button import approved, let’s see what code we can remove from the rcg file.
If I recall from yesterday, I made a bit more progress but didn’t write it up. I tried about 97 times to set the starting folder,. Today I want to consolidate that gain.
I begin by adding a new label and button to the menu:
Today, with the help of ChatGPT, I plan to try to build a very simple add-on and get it to work in Blender via the standard add-on path. I am torn about using ChatGPT. Since I started trying it a week or so ago, it has been giving me very useful information, much more easily than I can get it even with my surely above-average search skills. (It is not always right, but it is good about trying again.)
Our Blender Python script has several buttons that do almost the same thing. So we had several button classes, differing only a small amount. It took days to find the info here, but here’s how we created a button that takes parameters.
On this site, I propose to provide occasional articles that might be useful to readers who are interested in Blender with Python, or perhaps Linden Scripting Language. I come here optimistic about all the things I’ll write, but I’m making no promises.