Live data from Hacker News

Blender 2.93 LTS

blender.org

61–70 of 77 posts

Re: Blender 2.93 LTS

#61
I have a small company that sells 3D printed jewelry (https://lulimjewelry.com) and I use blender to automatically generate STL files ready for printing with my customers designs engraved on them.

Their scripting support is top notch. Virtually everything you can do in the GUI is accessible with the scripting library. You can even pop open a window that shows the equivalent python commands to actions you are doing in the GUI. They have a nice integrated editor for writing/debugging, and when you are all done you can run it headless from the command line.

I have blender running in a docker container on google cloud run that spits out STL files, which is awesome.

Re: Blender 2.93 LTS

#62

2.8 was game changer, i used to hate blender, i now love it! the UI upgrade changed everything!

I dream that one day whoever did that incredible transformation to Blender would do the same to Inkscape and Gimp UIs. In one or two versions it went from the past to the future!

Also, Krita.

Blender, Inkscape, Krita and GIMP are all good software that can compete with paid alternatives, but only Blender was successful at making modern UI that gives you fast comfortable workflow.

Re: Blender 2.93 LTS

#63
post #30

Wow, Blender's video editor is really coming along. I'll have to try it out. Might be the best open source video editor available.

I haven't tried Blender's video editor that much, but you should give kdenlive a try https://kdenlive.org/en/ I think you'll like it.

Although if you already know Blender shortcuts and concepts, the built in video editor makes a lot of sense to use as everything works the same way as you already know it.

Re: Blender 2.93 LTS

#64
post #2

The Blender dev team never ceases to amaze me with their incredible iteration speed. It's crazy how much you can get done when you assemble a team of highly skilled, organized, and passionate people to all work on what they love full time. Blender is hands-down my favorite piece of software I've ever used. I use it for professional purposes semi-regularly, and with each new update just keeps on getting better and bet…

Probably very much depends on what you do with Blender. I've been trying to port my exporter plugin from Maya to Blender, and it has been nothing but frustrating. It's been quite a while since I wrote it for Maya, but I remember the Maya API (C++ and MEL) to be well documented, well structured, and quite pleasant to work with. I was always amazed at Maya's basic architecture: Every UI action maps to a command that is…

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.

Re: Blender 2.93 LTS

#65
post #51

Earlier quoted context omitted.

Probably very much depends on what you do with Blender. I've been trying to port my exporter plugin from Maya to Blender, and it has been nothing but frustrating. It's been quite a while since I wrote it for Maya, but I remember the Maya API (C++ and MEL) to be well documented, well structured, and quite pleasant to work with. I was always amazed at Maya's basic architecture: Every UI action maps to a command that is…

Another problem is that the code changes from version to version, so a big chance that example you found no longer works. While annoying it’s not insurmountable, but a good doc would help a lot indeed! Perhaps with the LTS release that’s a thing to solve.

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

Re: Blender 2.93 LTS

#66

Earlier quoted context omitted.

Probably very much depends on what you do with Blender. I've been trying to port my exporter plugin from Maya to Blender, and it has been nothing but frustrating. It's been quite a while since I wrote it for Maya, but I remember the Maya API (C++ and MEL) to be well documented, well structured, and quite pleasant to work with. I was always amazed at Maya's basic architecture: Every UI action maps to a command that is…

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.

Re: Blender 2.93 LTS

#67
post #51

Earlier quoted context omitted.

Another problem is that the code changes from version to version, so a big chance that example you found no longer works. While annoying it’s not insurmountable, but a good doc would help a lot indeed! Perhaps with the LTS release that’s a thing to solve.

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…

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.

Re: Blender 2.93 LTS

#68

Earlier quoted context omitted.

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".…

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

Re: Blender 2.93 LTS

#69

Earlier quoted context omitted.

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…

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.

Re: Blender 2.93 LTS

#70

Earlier quoted context omitted.

> 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".…

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…

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...

Post reply on HN