Hacker Newsnew | past | comments | ask | show | jobs | submit | rguetzkow's commentslogin

I am not a lawyer and the opinions expressed herein are my own.

The argument is not that the API itself is protected by copyright. This wouldn't work anyway, as APIs aren't protected by copyright under EU law. From my understanding the argument is that the implementation of the API is protected by copyright. If the script/add-on for Blender depends on the `bpy` package (Blender's implementation of the API) and is not being able to function without out it, then it should be considered a "single program" based on the interpretation of the FSF provided in their FAQ [0]. Thus the script/add-on is derivative work and subject to the GPL license. This assumes that the interpretation the FSFs provides in their FAQ would hold up in court.

[0] https://www.gnu.org/licenses/gpl-faq.en.html#GPLPlugins


Unless the example is from 2.79 and earlier it shouldn't take any or only minimal adjustments. There have been some API changes between versions since 2.81, but they usually wouldn't affect a lot of add-ons or are very easy to change.

All the API changes are also documented in the release notes [0] and the API docs allow to view the Python API for each version [1].

What change between versions caused you problems and what parts of the API docs were lacking?

[0] https://wiki.blender.org/wiki/Reference/Release_Notes [1] https://docs.blender.org/api/current/index.html


Upgrading your plugins is not so much a problem.

What is a problem, though, is that when you google an issue, and find a solution, you then have to upgrade that solution to your version of Blender. That is very annoying because unless you're familiar with Blender, you can't tell if the solution is wrong, or correct but outdated.


From my experience script examples usually indicate what version they were made for and add-ons have to declare the minimum supported Blender version in their `bl_info`, which tells what API version it was implemented for. I know that at least on Blender's Stack Exchange the community tries to provide updated answers if anything relevant has changed in a new version.

I can see that older scripts for 2.79 and earlier may cause the issue you're describing, but this doesn't seem like a Blender specific issue. How did Maya handle API changes between versions? I would assume that there were breaking changes at some point that caused similar issues.


I have never developed a plugin for Maya so I cannot compare the two, but this statement confuses me:

> I was always amazed at Maya's basic architecture: Every UI action maps to a command that is run by the interpreter.

That is pretty much how it works in Blender. All the buttons and properties in the UI are accessible through the Python API.


> That is pretty much how it works in Blender. All the buttons and properties in the UI are accessible through the Python API.

Yes, it seems that way, and I was hopeful at first. But then I tried to use it.

In Maya, you can just copy paste a command from the command window, and it will work.

When you do that in Blender, it will probably give you an unspecific error message like "not possible in the current context". Because you need to manually switch Blender e. g. from Object mode to Edit mode (Faces), and your command only works in that context. So you develop a script that works initially, but later you find that it only works if Blender is in a certain state. That state is nowhere documented, you have to guess what it wants.

While Maya uses arguments to commands, Blender uses the equivalent of global variables.


That is specific to operators (Blender's implementation of buttons) since they are closely tied to their use in the UI. They may expect a specific context which is checked by the operator's `poll()` function. The namespace the operator is in should hint at what that context is, e.g. `bpy.ops.mesh` works with mesh data which is accessed in edit mode. Other operator namespaces directly reference area types, those need to be executed within that area. For instance operators `bpy.ops.view3d` will most likely require to be executed in an area of type `VIEW3D`. That is a requirement because the data that the operator needs is otherwise not accessible. I understand that the approach you are used to in Maya is more convenient.

When you have issues with calling an operator due to a wrong context, there are different ways to approach the problem:

1. Figure out what the necessary context is and switch modes, areas, etc. to match the requirements.

2. Figure out what the necessary context is and override the context.

3. Avoid using operators.

Approach 1.) could be accomplished by checking where the operator is originally used in Blender. For instance the `bpy.ops.mesh.remove_doubles()` is available in edit mode in the Mesh > Clean up menu. Thus edit mode is required to run the operator. This will work for many operators because they don't have very complicated requirements.

Approach 2.) is for when you must use an operator, it requires a complicated context and you know about Blender's internals. You can look at the operator's (poll) implementation and construct a specific context that is passed into the operator [0]. This should only be used if there is no better alternative.

Approach 3.) is preferable when you are working with mesh data. Instead of using regular operators you can use bmesh instead [1]. It doesn't require switching to edit mode or passing a context. It's usually the more efficient approach as well.

[0] https://docs.blender.org/api/current/bpy.ops.html#overriding...

[1] https://docs.blender.org/api/current/bmesh.html


The comment above is more of an explanation of how this currently works in Blender and how one can approach the aforementioned challenge.

I do agree that the Python API is often just a thin wrapper around the C/C++ code [0] and that the documentation of the required context for operators is a bit lacking for people who are not familiar with Blender's implementation. This is also acknowledged in the API docs [1]. However, I do think the API is quite usable and not particularly complicated to understand.

[0] https://docs.blender.org/api/current/info_gotcha.html

[1] https://docs.blender.org/api/current/info_gotcha.html#why-do...


Do you intend to use the GPU for rendering with Cycles? This isn't possible with current versions of Blender on macOS as Nvidia has stopped development of the CUDA toolkit for macOS and Apple has deprecated the OpenCL compiler. Since Cycles doesn't yet support Metal you cannot use GPU rendering on macOS. It is planned though and there are improvements being made with the Cycles X project. It is possible to use other render engines that support Metal though.


You need to hire the highly skilled Mike Newbon to design your reports.


This isn't Blender's fault, Nvidia discontinued the development of the CUDA Toolkit for macOS. Version 10.2. was the last version released for macOS [0].

> CUDA 10.2 (Toolkit and NVIDIA driver) is the last release to support macOS for developing and running CUDA applications. Support for macOS will not be available starting with the next release of CUDA.

[0]: https://docs.nvidia.com/cuda/archive/10.2/cuda-toolkit-relea...


This is a really weird response.

1. Nowhere did I mention Blender, although yes, this is a primary gripe

2. Even if I had, where does the inference that Blender somehow drove this come from?

3. Why leave out Metal2 and AMD frome the discussion?


Sorry for the late reply. I assumed that your comment was about Blender given that you've commented on a post about it. I also assumed that the comment was directed at Blender because there have been plenty similar comments/questions w.r.t. CUDA support on Blender's Stack Exchange in the past. Since you were addressing CUDA in particular, that's what I did in my reply as well.


No worries, CUDA (non)support on Mac is clearly directly created by Apple


I think there are quite a lot more developers contributing to the project than those employed by the Foundation or supported by developer grants [0]. However, the complex changes on the roadmap of Blender's development are planned and implemented by the core team.

[0]: https://www.blender.org/about/credits/


Huh, TIL, thank you


The Blender Foundation is quite upfront about this though to prevent misunderstandings. It's directly addressed on the page that explains the license: https://www.blender.org/about/license/


The case in point here though was GIMP not Blender. I'm not sure whether they provide or provided such clarification.



I fully agree, it's both a fantastic software and community. I would also recommend it to everybody who is interested in contributing to open source software.


This year is a bit unusual and secretive to provide a bit of a surprise. The past conferences had a proper schedule, see e.g. the one from last year[0].

[0] https://conference.blender.org/2019/schedule/


Thank you for the link. It seems like there were a few sessions there that could have been interesting to me. I'll keep an eye out this year as well.


You can watch (almost) all past talks of previous conferences on Blender's YouTube channel [0].

[0]: https://www.youtube.com/c/BlenderFoundation/playlists


There's also the Blender Peertube instance, in case you care about it: https://video.blender.org/


This is a great feature addition[1].

I've not tried to use blender for a while, but I love applications that give you a command palette, especially when they get proper fuzzy and prefix matching like this. Like the dude in the video says, it must be a godsend for non-native english speakers with something as complex as blender.

[1] https://video.blender.org/videos/watch/791b0736-9a55-4b72-9e...


Very cool link. Truly depressing that every video only has 30 views!


Only one way to add more!

Well, disregarding (h/c)racking the server or some other abuse I suppose.

Edit: Honestly, I think it's more important that it exists than that it gets heavy use. As it is now, it allows Blender to A) Have a better platform to link people to, and B) Have a fallback if Youtube starts causing problems.

I honestly think A is more important.


I will become a user! I think I've been waiting for this for a while.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: