Skip to content

Commit

Permalink
Update design_principles.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Theverat authored Aug 26, 2018
1 parent f0fb213 commit 9db7c4b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions doc/design_principles.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
### Design Principles

The following are some points I try to keep in mind during my work on this addon. Sometimes I do not follow them perfectly, some of them I have discovered after writing large parts of the addon, so if you spot a violation of these ideas in the code, do not hesitate to fix it.

* If a setting is wrong and will cause a warning or error to be thrown at render time, warn the user **directly in the ui** about the problem.
Example: Any node using 2D mapping will show a warning label if the mesh does not have a UV map.
The only exception are cases where it is obvious, e.g. do not show a warning if no image is selected in the imagemap node.
Expand All @@ -10,5 +12,7 @@

* The export should fail only on the gravest of errors. Do not abort the export process due to missing image maps for example - replace them with a warning color instead, like Blender Internal and Cycles do it. These kinds of errors are collected in the error log and during the render, the user is shown a message in the statistics saying "3 errors during export". This point is important for developers, because we often get test scenes with missing images/HDRIs along with bug reports.

* If possible, fail fast. If a critical error can be detected before starting the time-consuming parts of the export process, check for it as early as possible and cancel all following operations. This prevents frustration: If you wait 2 minutes for your giant scene to export, only to have it fail after all this time, it is very annoying.

The [fish](https://github.com/fish-shell/fish-shell#fish---the-friendly-interactive-shell-) shell
[design document](https://fishshell.com/docs/current/design.html) outlines some more principles that are also used in BlendLuxCore, especially the *The law of discoverability*.

0 comments on commit 9db7c4b

Please sign in to comment.