zeffii / BlenderPythonRecipes

curated snippets for bpy (mostly for Blender <= 2.79 ), some changes are needed to maintain compatibility with 2.8+
GNU General Public License v2.0
121 stars 9 forks source link

recipes for Blender 2.8+ #7

Open zeffii opened 5 years ago

zeffii commented 5 years ago

A lot of this stuff is not entirely compatible with Blender 2.8+ bpy API. Mostly things covered in these wiki pages will need subtle adjustments to work in 2.8+. The API now enjoys some renames, relocations, new namespaces, and changes in approaches.

Blender Developers applied a considerable set of changes to the whole API, luckily these BlenderPythonRecipes only touched a small portion of the API.

zeffii commented 5 years ago

off the top of my head

groups

these things are now located in .data.collections

grease pencil

still under development, .data.grease_pencil is now data.grease_pencils

Operator properties

rather than directly adding Properties like bpy.props.StringProperty() into the class definitions, you now make them annotations of the class.

class SomeClass( ):
    some_prop_name: StringProperty(....)   # this is the annotation syntax for python 3.7+

Particles

now you must obtain the current dependency graph ( find examples in devtalk at blender.org )