One of the stated missions of Les Fées Spéciales is to publish as much of the code we use in production as possible. Publishing these scripts and programs falls under the copyrights laws—or author’s rights laws in our case, since we operate in France, a country under a civil law system.
In order for the community to use these scripts, the scripts need to carry a software license. Writing an overview of the history and inner workings of software license, and free software in particular, is way beyond the scope of this article, however it seems useful to remind scripters what they may do with their scripts, should they choose to publish them, particularly in the context of Blender scripts.
This article is published as part of an ongoing Ph.D thesis by Damien Picard on the subject of Free Software in Animation.
The information in this blog post is provided for general informational purposes only, and may not reflect the current law in your jurisdiction. No information contained in this post should be construed as legal advice from the author, nor is it intended to be a substitute for legal counsel on any subject matter. No reader of this post should act or refrain from acting on the basis of any information included in, or accessible through, this post without seeking the appropriate legal or other professional advice on the particular facts and circumstances at issue from a lawyer licensed in the recipient’s state, country or other appropriate licensing jurisdiction.
So you wrote a Blender script. You sent it to your sister/brother/cat, who thinks it’s really cool and you should put it online for the community to enjoy. Fair enough, how do I do that? I could just dump the script on a forum or on my website for everyone to read, and that’s it, right? Well, it’s not all that easy. In theory, you could do that, but the thing is, software is considered an original work, and is thus subject to copyright or author’s laws. This means that you must indicate in code that you are the author of the code, and a way to contact you. In practice this is a couple of lines looking like this:
# Copyright (C) 2017 Les Fées Spéciales # firstname.lastname@example.org
Note, in our case that the juridical person Les Fées Spéciales is considered the author of the code, and not any single natural person.
But that is not enough. Now users know you’re the author of the code. But what may they do with it? By default, nothing. Maybe read it, but even that is controversial. In any case, they may not modify it and redistribute it, because that would constitute a violation of copyright. So, you must state what a user may do with it. That is the purpose of software licenses. You attach a software license to source code in two ways:
- Add a header stating the license to every source file
- If the project is not a single file, it is customary to also add a
LICENSEfile at the root of the project with the full license text.
Okay, I must use a software license, but which one? Should I write my own, or…?
Let me stop you right here. This article is specifically about Blender. For general advice, well I’m not a lawyer. But for Blender, there isn’t much to choose from. In fact, you may and must choose from one license. That is the GNU General Public License.
This is stated clearly in Blender’s FAQ page:
If you share or publish Python scripts – if they use the Blender API calls – have to be made available compliant to the GNU GPL as well.
The reason why Blender scripts must be published under this license is twofold:
* A Blender script, that is, one which includes the ubiquitous
import bpy statement, actually links the
bpy API library (or module, in Python parlance). That is to say, a Blender script is considered legally a derivative work from the
* GPL is a copyleft free software license. This means that it includes a clause which prevents relicensing it. If you modify a file under a copyleft license, you must in turn publish it under the same license.
From these two points, one can see that a Blender script is a derivative work to a copyleft-licensed program, and thus must be distributed in the same conditions: under the GNU GPL license.
Why should I do it?
This is all very legal and theoretical. In practice, it is quite seldom that using code found online will lead to prosecution.
However if you publish a Blender script without the GPL license, the authors of Blender (mainly the Blender Foundation) could legally ask you to remove your code or license it under the GPL. They could even sue you. They probably won’t, they have better things to do, but they could. And if you find a piece of code lying somewhere on a forum and decide to use it in your script, and it is clearly identifiable and attributable to someone, that someone could also sue you, in addition to the original Blender authors.
The risk is small, granted, but you should protect yourself because one never knows the future.
The other reason you’d want to add that little bit of legal text in your code header, is that not only must you do it, you should. This allows others to use your code for the purposes stated by the GPL: run, study, modify and distribute it. This is not only the legal thing to do, it is the right thing to do.
A note on obfuscation
The practice which consists of making source code undecipherable to prevent unauthorized use of intellectual property or trade secrets, is called obfuscation. In binary, compiled form, executables constitute obfuscation in themselves, since retrieving the source code is unfeasible. In interpreted languages such as Python (the language used for Blender scripts), there is no formal distinction between source code and executable. However, it is possible to render interpreted code illegible to prevent reuse.
According to the Free Software Foundation, which maintains the GPL,
Obfuscated “source code” is not real source code and does not count as source code.
What is free software?
This is based on the following extract from the GPL:
The “source code” for a work means the preferred form of the work for making modifications to it.
GNU Public License, §1
The notion of “preferred form” is somewhat vague, but it basically means, “what we use internally”. So if I write code in a private repository, this is the preferred form, the one I should publish. It makes sense, since the purpose of free software is to grant more freedom to users than just using the software for a limited period of time.
If you like it then you should put a GPL on it.