Blendflakes
Views
Actions
Namespaces
Variants
Tools
Introduction
This is a simple script that, like pyflakes for python scripts, checks a Blendfile for 'niceness' From our perspective, it does checks that make it easier for people to understand/use each other's library files, and uses/enforces/creates a text description file with the same name, so that we can describe our groups:
libraryfile.blend and libraryfile.txt
errors/warnings are written to libraryfile.err
Installation and Usage
Installation
- Start a new file and go to the User Preferences, select the Addons tab, and click on "Install Addon..." in the lower part of the window.
- Browse to the file blendflakes.py (usually in tubeSVN/lib/python/addons,) select it and hit Enter
- Check the activation box next to the addon, and then press "Save As Default" at the bottom of the window.
Usage
- Open a model file you want to check.
- Press 'w' and select Show Warnings/Errors in library file (you can also use the spacebar search)
- Blender will output all warnings by default, and select offending objects.
- If you use w and want to change options, do so in the last operator region in the toolbar, then press w again (If you use spacebar search you will get a popup anyway)
- warnings are shown in the info area (drag down the header)
- if export is checked, they are saved to libraryfile.err (where libraryfile is the name of your .blend file)
- If you have a lot of warnings you might want to uncheck some of them and tackle them a few at a time.
List of Warnings
Following is a list of the things we check for:
Default Data Name
Data not Named(default name)
The Object Data (e.g. Mesh or Curve) has a default name like Cube, Cone, Armature, (note not the object name)
Action
Change the object data names, preferebly to match their Objects. You can use the outliner, the properties editor, python console or an AddOn to do this. If Select was checked, the offending objects will be selected.
Out of Sync Data Name
Data Name not equal Object Name
The object data and object names do not match; i.e. Cube with the mesh Sphere; the script is smart enough to deal with multi-user data differently.
Action
Change the object data names to match their Objects. You can use the outliner, the properties editor, python console or an AddOn to do this. If Select was checked, the offending objects will be selected.
Group Unrecorded
Groups not in text file
Their is a group in the Blend file that is not in the description file
Action
Open the libraryfile.txt and add your group into it as follows: group name description of what the group is for (specify if it is for linking e.g.) comma seperated list of layers (starting with 0) that the group duplis. similar to the above, but for un-duplid layers blank line
Groups in Blend
Groups text file not in Blend
There is a group in the text file that is not in the .blend.
Action
Either delete it's lines from the text file (see above) if it is not needed, or create and use it in the .blend.
Group Descriptions
Group in text file without description
The Group description in the text file is a blank line.
Action
Open the libraryfile.txt and find the group. immeadiatly after it is a blank line, please type a meaningful description into this line, then save and commit.
Group Duplis
Group dupli layers don't match text file
the dupli layers (the ones that are in the group box in the property editor) don't match what it says in the description file.
Action
Either change the buttons in the .blend file to match the .txt file, or vice-versa, depending on what you think is correct. Please note that numbering here starts from zero, not one.
Group layers
Groups with objects in unspecified layers
txt
Action
txt
Unknown Groups
Objects not in groups
txt
Action
txt
Unknown Layers
Objects unspecified layers
txt
Action
txt
Copied Object Name
Object Name Copied (use _n not .nnn)
txt
Action
txt
Default Object Name
Object not Named(default name)
txt
Action
txt