6 ms·
Feel free to downvote me but the title is quite misleading as I was expecting a developer introduction to 3D to be heavier on code and show what's behind the ho
by yohann305 11y ago
Feel free to downvote me but the title is quite misleading as I was expecting a developer introduction to 3D to be heavier on code and show what's behind the hood.
For example, the tutorial starts by creating box, I'd love see the equivalent using code. Same goes for adding vertices, moving vertices.
Cheers!
- entr0x 11y agoI agree, this is why I'm commenting. It's a non-article that doesn't even deliver what the title promises. Just an article to fill writing obligations and farm clicks.
- semi-extrinsic 11y agoI've done a bit of Blender Python scripting, and it's a bloody pain. The API is very much an afterthought, and it can't be much used by anyone. As an example, function calls in your script do different things based on which part of the UI has mouse focus. It's very easy to make loops eat all your RAM, hang everything for a few minutes and then segfault. I've even had it crash my X session. And the built-in IDE is crap. /rant
- berkut 11y agoIs this post 2.5? I thought (and I don't know the answer, hence why I'm asking) 2.5's interface was built on the Python API? I tried doing some Python stuff with it in the 2.4 days and thought it was pretty poor as well, haven't tried since, but had (possibly incorrectly?) assumed 2.5 fixed this.
- semi-extrinsic 11y agoI did most of the stuff on 2.7 and late 2.6. I believe what you say is true though, the interface is built on top of Python, so every button in the UI corresponds to a Python function. That has both pros and cons, I guess.
- 332451b 11y agoThe mouse focus issue is more related to missing APIs. If you call operators (tools) from Python they do indeed depend on context, just like they would if you use them from a toolbar, menu or shortcut key. These are not intended to be used for scripting really, but they are available and sometimes the only way to do things because there is no equivalent API function available.
- semi-extrinsic 11y agoProbably yes. A really nice feature is that you can hover over a button and see the name of that Python function. Then it's hard to know if you're supposed to do it that way or not when scripting. Another gripe I remember is that angles in the UI are specified in degrees and in Python they are specified in radians.
- 332451b 11y agoYes, a big problem is indeed API documentation and making it easier to follow best practices. Regarding angles, users want to see degrees in the UI, but the python functions like math.sin and math.cos and basically any other graphics code you find uses radians. Whatever solution is chosen is always going to make someone unhappy.
- mwfunk 11y agoIf an app, any app, crashes your X session, you should be far more upset at X or your graphics drivers than Blender.