Warning: the following requirements are not fully satisfied in the current scripts. This issue needs to be fixed.
PEP8 with an exception of using 120-column-limit.
yapf
users can easily ensure this rule by the following command:
find . -name "*.py" | xargs -I {} yapf --style='{based_on_style: pep8, column_limit: 120}' -i {}
Useful link: https://wiki.blender.org/wiki/Style_Guide/Python
mypy *.py --ignore-missing-import --strict --implicit-reexport
Note that the current codes do not satisfy this above condition. This needs to be fixed.
- A function named
create_XXX
instantiates anbpy.types.Object
/bpy.types.Node
to the specifiedscene
/node_tree
. This function returns the newly createdbpy.types.Object
/bpy.types.Node
. - A function named
create_XXXs
instantiates a set ofbpy.types.Object
/bpy.types.Node
to the specifiedscene
/node_tree
. This function returns a tuple of the newly createdbpy.types.Object
/bpy.types.Node
. - A function named
build_XXX
manipulates the specifiedscene
/node_tree
by various operations; for example, by instantiating a set of objects. This function does not return anything. - A function named
set_XXX
changes parameters of specified objects etc. This function does not instantiate new objects. This function does not return anything. - A function named
add_XXX_constraint
/modifier
adds either a constraint or modifier to an object. This function does not instantiate new objects. This function does not return anything. - A function named
add_XXX_YYY
adds a data-block to data-blocks inbpy.data.YYYs
. This function does not instantiate anybpy.types.Object
/bpy.types.Node
toscene
/node_tree
. This function returns the newly addedYYY
.
- A variable named
XXX_object
(orobject
) has the typebpy.types.Object
. In addition, an instance ofbpy.types.Object
that has itstype
ofYYY
(e.g.,Mesh
) should have a name likeXXX_YYY_object
(e.g.,cube_mesh_object
). - A variable named
XXX_node
(ornode
) has the typebpy.types.Node
. - An instance of a subclass of
bpy.types.ID
, saybpy.type.Camera
for example, should have a name likeXXX_camera
.