4 ms·
This just made me wonder how is it like to script in Blender. Found this video https://www.youtube.com/watch?v=r8hqLh_HE08 https://www.youtube.com/watch?v=r8hqL
by fimdomeio 4y ago
This just made me wonder how is it like to script in Blender.
Found this video https://www.youtube.com/watch?v=r8hqLh_HE08 https://www.youtube.com/watch?v=r8hqLh_HE08 which seems to give a good quick overview.
The info window that shows ui interactions as code seems incredible ergonomic if you just want to fool around with scripting without a big learning curve.
- nkozyra 4y agoIt's nice having it all together, but if you're used to VSCode or Jetbrains it's somewhat of a frustrating experience. Little things like code completion, a weird run window, errors that aren't caught until running, etc., can be annoying.
- victornomad 4y agoyou can use VSCode and Blender :) I just mentioned it above but this training in the Blender cloud is very good! https://studio.blender.org/training/scripting-for-artists/ https://studio.blender.org/training/scripting-for-artists/
- nkozyra 4y agoOh no doubt, but then you lose the big benefit of doing it in blender!
- victornomad 4y agoI think you can do everything in VSCode. You can get also autocompletition and autoreload with a vscode plugin
- nkozyra 4y agoWell I mean that you'd have to tile your windows instead of having the I part of the IDE.
- semi-extrinsic 4y agoIt's pretty nice, but there are some quirks. For instance commands depend on which Blender UI tab has mouse foucs (kind of natural for a GUI application).
- boppo1 4y agoThat's just if you're running stuff through bpy.ops. If you work at a state level with bpy.data it's a lot more agnostic.
- Etherlord87 4y agoSome stuff can only be done through bpy.ops, like changing the order of modifiers (if you really didn't want to use bpy.ops, you would need to remove all modifiers and recreate them, though this would severe any references to the old modifiers outside of your script, so you really can't do it without bpy.ops). Also sometimes operators are faster, so resigning from them sacrifices performance. And of course sometimes there just isn't an equivalent non-operator function, so you would need to recreate a functionality in order to not use an operator.
- boppo1 4y agoI have a work thing I can't talk about too much that has basically been a month of me fooling around all day figuring out how to script stuff in Blender. I love it, most of the time everything is exactly where I expect it to be, the documentation is killer, and worst-case-scenario, if I have to engage in "programming by asking a forum", the community turns around an answer for me in about 1-5 hours. Compare that to 24+ for any other time I have to use that last resort.
- edflsafoiewq 4y agoUnfortunately the functions the UI calls are not very usable in actual scripts, either because they are incredibly sensitive to state (ie. the mouse needs to be over a particular area, etc.) or because they're too slow (most operations update everything in the scene afterwards).