4 ms·
This is very cool. After a quick skim I noticed this relies on Blender's ops api. Using bpy.ops is generally considered a bad practice because a lot of the bpy.
by valine 9y ago
This is very cool. After a quick skim I noticed this relies on Blender's ops api. Using bpy.ops is generally considered a bad practice because a lot of the bpy.ops operators depend on the state of the UI - things like which objects are selected and which object interaction mode is active. The alternative to bpy.ops is to write scripts that manipulate the datablocks directly. Using bpy.ops can save a lot of time as it maps more cleanly to the GUI, but if you use it too much things can spiral out of control. Its just something to be aware of.
- th0ma5 9y agoThe fact the scripting seems to be on top of the GUI state rather than the underlying scene graph is what turns me off to Blender scripting.
- valine 9y agoYou can access the underlying datablocks. The blender python api basically give you access to everything, so it's up to you if you want a script that's lower level or simply fires off GUI events.