General guidelines¶
Our workflow:¶
You have the freedom to code how you like, but follow pep8.
Implementing ideas from other add-ons is fine, if you have the appropriate licenses (GPL), written consent or rights. We don’t accept unattributed code you didn’t write.
Before you spend a lot of time making something, we recommend you tell us about it beforehand in the Issue Tracker. Sometimes the thing you want to make already exists, or we have plans for it already with placeholder code.
Brainstorm and discuss solutions. We use the issue tracker a lot and will give our honest opinion and interpretations of new code. We are artists and technical people trying to solve complicated and interesting issues using code and Blender. We care about optimal code but also accept working and novel solutions.
Test your code, Test your proposed changes. Write automated tests for your code whenever it makes sense. Please refer to this document for details.
Code structure:¶
There is a convention that all classes that are subclasses of blender classes - have to have prefix
Sv
, ie SvColors.sverchok/node_tree.py
andsverchok/utils/nodes_mixins
contains base classes of nodes.sverchok/data_structure.py
has a lot of function to manipulate with lists.Utils folder has:
CADmodule - to provide lines intersection
IndexViewerDraw - to provide OpenGL drawing of INDXview node in basics
sv_bmeshutils - manipulation with Blender builtin mesh data structure
text_editor_plugins - for sandbox node scripted node (SN) to implement Ctrl+I auto complete function
text_editor_submenu - templates of SN
voronoi - for delaunai and voronoi functions of correspond nodes
Node scripts folder for every template for SN (see utils-e.)
Nodes folder for categorized nodes.
to CHANGE some node, please, follow next (in case if changes will brock backward compatibility):
Copy node file to ../old_nodes;
Change
bl_idname
to old_bl_idname + MK2.
Note
The overview of Sverchok code is really poor.