Blender Templates
Storing meeting notes here as a record of IRC conversation, may move this to other planning docs.
This page aims to make Blender's templates concrete, so we can make a start on their implementation.
2017 March 6,7
Meeting with Campbell Barton & Mike Pan
Blender 101, User Perception
Even though users may shy away from simplified software, in some cases the simplified versions of applications have become dominant:
(Mozilla -> Phoenix -> Firebird -> Firefox) is an example of this.
Done well, a simplified Blender has the potential to become popular, so while we must start with small steps, we should keep in mind a simplified Blender need not be a crippled application (as it often is with shareware or educational versions).
- "Blender 101" is a simple title but sounds a bit like ''"Kiddies First 3D Program"'' which may stop people from taking it seriously.
- Alternative names suggested: ''Blender Fundamentals'', ''Blender Core''.
On the other hand there are plans to simplify Blender's default keymap and UI for 2.8x too.
Since "Blender 101" is a fine working title, there is no need to be concerned with this right now.
Would templates be separate Blender downloads?
- We agree that including 101 template with default Blender should be the goal, since switching templates will be supported and the size added to the main download will be minimal.
- This has the advantage of not forcing users to make a choice early on, they can easily try both.
- Other templates may include data-files so may need to be downloaded ''(although downloading assets from within Blender is possible)''.
How do templates/workspaces fit together?
How templates and workspaces interact isn't totally clear, however workspaces will be contained within templates so we can first add templates and workspaces can be further developed within that.
Should we have a 3D-printing workspace or a 3D-printing template?
Workspaces having their own add-ons would make switching workspaces slow (to register/unregister), we probably would want to control their display - per workspace, not actually enable/disable them.
We can develop templates without relying on workspaces from 2.8x.
Will templates be developed in 2.7x or 2.8x
We may develop in 2.7x if OpenGL support isn't working well enough, although this isn't likely to conflict, a lot, so it doesn't matter too much where the branch is developed.
Who can make templates?
While anyone can make their own template, they will require some Python development experience.
EDIT: Templates could be written without any Python at all. However this depends on other areas of Blender being configurable without scripting.
UI configuration is part of 2.8x, important but no need to cover here.
Will templates share UI scripts?
Having each template write full UI scripts is too impractical to maintain.
We agreed that templates can optionally "override" regions, headers, etc. (probably not per-panel level).
Then they can choose to add their own UI, or use Python to import parts of Blender's default UI.
This way template developers can choose how much to share. If they really want they could import the UI for an entire region and use Python to manipulate its functions, while this is quite advanced, common changes such as filtering whats displayed could be put into a module.
This gives a good balance between maintainability and flexibility.
So, we will initially use Blender's UI. But allow to replace parts of it as the template requires.
Will templates share keymaps?
We will follow similar conventions to the UI here, where templates may replace keymaps as needed.
This depends on exactly whats planned for 2.8x too.
How to 'Hide' Options?
While hiding tools is simple (users just wont have direct access to tools), hiding options for rendering, animation for eg has implications because someone may load a file with some options enabled and not understand why one data-block behaves differently.
- Use presets, this way we allow users to avoid tweaking many options, Mike suggests to show the preset in the panel header and have these panels start collapsed. This way users can select presets in most cases and don't need to get involved with setting values.
Blender's current preset system is quite weak though, we would most likely want to detect presets from values, which would need to be calculated and cached for fast redrawing. There is also the issue that old files may be loaded that have one setting different from the preset, so it will show as "Custom". This is infact not so trivial to solve in a nice way, so for now we can accept using existing limited presets, but ideally Blender's preset-support will be improved if they're going to be used more.
An alternative would be to store the preset ID in the file and apply it on load... this has trade offs too and may complicate things is we like to modify templates since files will have their settings changed on load, depending on their Blender version.
- Users may just want to tweak a setting they know is enabled in a file and the 101 interface may not display it. Campbell likes to keep the option open for a generated spread-sheet style UI (similar to data-block browser but better organized). So users can change settings if they really want (without leaving the 101 template).
No need to do this early on, and best we try make 101 as good as we can without resorting to fallback advanced UI.
- Templates could declare a callback code that runs on loading a blend file that warns of options which are hidden and likely to cause problems.
Possibly with the ability to change those settings (examples of options might include lock-view-to-cursor or transform-object-centers.... although how to handle this isn't well defined).
Can templates contain assets?
- Yes, however they won't contain special features for asset management. They will be limited to features already in Blender:
- Startup Blend.
- Add-on's that insert menu entries, to the object "Add" menu for examples.
- File browser (open to a textures directory)
- Library browser (open inside a library blend).
Recommended ways to use assets within a template will be included in an example template to set some reasonable conventions.
templates/{template_name}/assets/{data_type}/{asset_name}.blend for example. With a script to list them.
Work on improving Blender's asset manager is important, but unrelated to the 101 project.
How will templates be stored on disk?
- Each template is a dir, in either Blender's system or home directory (as with add-ons), eg: /usr/share/blender/2.79/templates or ~/.config/blender/2.79/templates
- Templates can be installed similar to how add-ons can be installed (simply extract zip into a directory).
- Templates are application-data, however startup.blend will be saved in home directory using a structure that matches the templates/ directory as stored in the system path.
- User-level templates will be supported, as with add-ons, so templates will be detected in the users home directory too.
- Templates startup.blend will be named so there are 2 files (startup.blend & factory_startup.blend ?), One which is never written to, allowing the original to stay pristine so users can go back to the original without re-installing the template.
- Templates will manage their own assets and we will not restrict or define exactly how they do this however using Blend files per asset will be recommended.
- Templates will have their own startup.blend equivalent.
- Templates can be selected from the splash screen.
- Once selected and saved as a default, templates will be used immediately on load, but will still be able to be changed from the splash.
How will templates run?
- First the template will load it's associated startup.blend
- Then a startup script will run
- While there are no explicit rules on what the script will do, common operations will be:
- Add an addon directory so templates can bundle their own addons.
- Register its own interface classes to override Blender's default.
- Register its own keymaps.
How does this impact Blender's default configuration?
- It's not clear at this point, but we are thinking it might be simplest to have the default configuration also be a template. This wouldn't make any significant changes and means we don't need to account for a special case which isn't a template but shows up in template selector as one.
How will we manage templates?
- Where exactly templates are maintained is an open-topic, but we suggest to have repository for templates (svn for binary files). Alternative would be to use Blender's current lib/ svn.
- We will include a template template for people interested in writing their own :)
- One default template included in Blender is likely so developers can use Blender without installing templates.
How will user preferences for templates be separated?
- Templates will have their their own user-preferences, created when the user saves their preferences.
- Only some settings for them will be used.
- Rule of thumb, anything you may re-configure on a different system (DPI, OpenGL preferences, tablet options... etc) wont be used as part of template preferences.
- Templates will not share user preferences ''(this may be changed in the future for clever overlaying of preferences)''
Should templates contain themes?
Since themes are entirely a users personal preference, its not essential to include them in the template.
Mike suggests to at least support the ability for templates to set theme colors so template creators can do some of their own *branding*.
If branding is part of templates it came up that we might want to support custom splash artwork (keeping the top area containing Blender name and logo). This isn't needed for templates at all, but template authors may appreciate the ability.



