move calls to the classes register/unregister function into register_class() / unregister_class() and add docs.
also other minor changes:
- remove face sorting keybinding, was Ctrl+Alt+F, this is quite and obscure feature and face order normally doesn't matter, so access from Face menu is enough.
- add commented out call to mesh.validate() in addon template since its useful to correct incomplete meshes during development.
Using environment map type "load" increased user counter on each
preview render.
Also noticed that this type of envmap use wasn't threadsafe, causing
imbufs being allocated for all threads. Also fixed that.
ui/ --> startup/bl_ui
op/ --> startup/bl_operators
scripts/startup/ is now the only auto-loading script dir which gives some speedup for blender loading too.
~/.blender/2.56/scripts/startup works for auto-loading scripts too.
* Particle emission now updates all parent objects too to the exact emission time.
* This only does object level animation as updating the object data for every particle would be too slow.
* A better fix could be to interpolate the emission location directly from the current particle emission location and the location from the previous frame, but for this some point cache changes have to be made, so it will have to wait.
Modified to only do one lookup.
from Martin:
"Basically, what it does is allow you to add register and unregister class methods to rna types, this way you don't have to rely on module register/unregister methods to setup your types properly (and it makes them easier to move around when reorganizing code and easier to understand what a type does when reading code). This is especially nice for PropertyGroup classes that are added as properties to existing types, you can easily see in their register methods where they are added and removed in their unregister method. Obviously, those two methods are optional, so current code still works fine."
weighted normals as the render engine, and the render engine will copy
normals from the mesh rather than always recalculating them.
Subsurf/multires still use regular vertex normals, but they are expected
to be sufficiently high resolution to not need this.
This means that normal maps displayed in the viewport actually match the
render engine exactly and don't have artifacts due to this discrepancy.
It of course also avoids unexpected surprises where your render normals
look different than your viewport normals.
Subversion bumped to 4 for version patch to recalculate normals.
Patch by Morten Mikkelsen, with some small changes.
* Separate out selection flags from file type flags, was bothering me since forever ;)
* Also renamed ACTIVEFILE to SELECTED_FILE to better reflect actual usage in code.
* Fix crash introduced with last commit, better check for valid selection
Patch from Alexander Kuznetsov: Toggle selection rather than just extending.
Implements behaviour that unintendedly was available with previously using macro operator for selection. This was removed and now the functionality is properly implemented.
Patch accepted with minor changes:
1. Used enum rather than #defines and added value for removing from selection (deselect)
2. Moved if (select) outside file_select_do and improved check for whether last file in selection is actually selected. (Necessary since toggle can deselect and toggle select should still make file active)
3. Additionally fixed check in file_select_invoke to be consistent with border select.
Patch from Alexander Kuznetsov: Real-time File Selection, thanks for the contribution.
Still made a few minor changes from latest patch:
1. Rename SELECTEDFILE to HILITED_FILE, since we are not actually selecting the file, but previewing/highliting the possible selection.
2. Also made this clearer by not drawing the files as selected, but just highlight them.
3. Removed the Select/Deselect toggle when clicking on file, will be committed separately soon.
Improving UI visualization of using Material nodes:
- Property editor: the context top line now shows the linkage path
(in material and texture view mode)
- Activating new material node refreshes preview in property editor
when in texture mode.
This should make editing textures with node materials a bit more clear.
Tried to resolve todo item "Layer change in 3d view header doesn't update
dependencies on changed previously visible objects". Code is too much spread
around now though, and the 3d view header shares RNA code for changing layers.
I'll let this be a "glitch" for now.
- script_load_addons: loads and onloads all addons, error if any cant be enabled or disabled.
- script_load_modules: loads all blenders modules, error if any modules raise an exception or if any modules in the scripts dir are not tested (except for presets and templates).
These are useful because lazy module loading means a module can have an error which isnt raised until the tools used. This gives a way to detect basic errors that used to happen on startup or when enabling the addon.
reported by Georg K
with patch [#26469] Windows mouse fix
by Alexander Kuznetsov
The amount of mouse grabs wasn't properly balanced with ungrabs, thus preventing from using proper mouse input outside client area.
* The selected uv-vertices (the ones being transformed) weren't being disregarded as snapping targets, so moving two verts that were in the same location together was impossible.
* The old collisions code detected particle collisions by calculating the
collision times analytically from the collision mesh faces. This was
pretty accurate, but didn't support rotating/deforming faces at all, as
the equations for these quickly become quite nasty.
* The new code uses a simple "distance to plane/edge/vert" function and
iterates this with the Newton-Rhapson method to find the closest particle
distance during a simulation step.
* The advantage in this is that the collision object can now move, rotate,
scale or even deform freely and collisions are still detected reliably.
* For some extreme movements the calculation errors could stack up so much
that the detection fails, but this can be easily fixed by increasing the
particle size or simulation substeps.
* As a side note the algorithm doesn't really do point particles anymore,
but uses a very small radius as the particle size when "size deflect" isn't
selected.
* I've also updated the collision response code a bit, so now the particles
shouldn't leak even from tight corners.
All in all the collisions code is now much cleaner and more robust than before!