Mostly the same as the recently added editmode tool with some extras.
* Options to disable filling in the rim between inner and outer surface, since its faster not to detect this in cases where its not needed.
* Option to disable high quality normal calculation, mostly noticable when operating on building walls, not needed for cloth or more organic shapes.
* Option to disable 'even thickness', again, not needed in some cases.
Also options for creasing inner/outer and rim edges, need this for makign Sintels cloths solid since zero crease looks far too soft.
note:
* UVs and VCols etc are copied to the new skin however rim faces dont get the UVs or vcols set from the faces they are created from yet.
* Normals are assumed to be pointing outwards
* used patch from Uncle Entity as a template since it added the DNA and RNA entries but the actual modifier from the patch wasnt used.
The weak point now is the thread-safe atomic access to normals from multiple
threads, did not seem to be a bottleneck in my tests but I don't really trust
it to be fast.
* Objects now support up to 32767 material slots. It's easy to
increase this further, but I prefer not to increase the memory
usage of mesh faces, it seems unlikely that someone would
create 32767 distinct materials?
* Forward compatibility: the only thing you can potentially lose
reading a 2.5 file in 2.4 is object linking (instead of default
data), though usually that will go fine too. Reading files with
> 32 material slots in 2.4 can start giving issues.
* The ob->colbits variable is deprecated by the array ob->matbits
but I didn't remove the ob->colbits updates in very few places
it is set.
* I hope I changed all the relevant things, various places just
hardcoded the number 16 instead of using the MAXMAT define.
* Join Objects operator back. This is using the version from the
animsys2 branch coded by Joshua, which means it now supports
joining of shape keys.
* Fix for crash reading file saved during render.
* Started porting over to python, menus nearly done, header WIP.
* Game Properties panel is in python too
* Deprecated "Tiles" as a per face flag here, now it's always on
the image, used to be both, working in a very confusing way.
Unlikely someone actually had a purpose for this being per face.
* Remove GPC_PolygonMaterial.cpp/h, it's not actually used anymore,
so I don't want to bother updating it.
* Fix crash in image painting (own mistake in porting over bugfix
from 2.4x).
soc-2008-nicholasbishop branch.
Note: any old code with multires_test() or multires_level1_test() can
just be deleted, not needed by the multires modifier.
DONE:
* moved almost all declarations from BLI_blenlib.h into their own proper header files.
* BLI_blenlib.h still includes all the declarations for convenience and to avoid changes in existing code
* split util.c into several files, where it wasn't done already
* DynamicList -> dynamiclist,
* ListBase -> listbase,
* String utility functions -> string.c
* removed a few unused macros and functions, if they're needed back, they're still in svn ;)
TODO:
* btempdir global
* further cleanup in the code of the different modules (especially util.c)
=======================================
Alpha blending + sorting was revised, to fix bugs and get it
to work more predictable.
* A new per texture face "Sort" setting defines if the face
is alpha sorted or not, instead of abusing the "ZTransp"
setting as it did before.
* Existing files are converted to hopefully match the old
behavior as much as possible with a version patch.
* On new meshes the Sort flag is disabled by the default, to
avoid unexpected and hard to find slowdowns.
* Alpha sorting for faces was incredibly slow. Sorting faces
in a mesh with 600 faces lowered the framerate from 200 to
70 fps in my test.. the sorting there case goes about 15x
faster now, but it is still advised to use Clip Alpha if
possible instead of regular Alpha.
* There still various limitations in the alpha sorting code,
I've added some comments to the code about this.
Some docs at the bottom of the page:
http://www.blender.org/development/current-projects/changes-since-246/realtime-glsl-materials/
Merged some fixes from the apricot branch, most important
change is that tangents are now exactly the same as the rest
of Blender, instead of being computed in the game engine with a
different algorithm.
Also, the subversion was bumped to 1.
The following is a commit of Levi Schooley's bevel code and
the bmesh library it depends on. The current editmode bevel has
been replaced with a new per edge bevel function. Vertex beveling is
also availible.
To set weights for the modifier to use, use the ctrl-shift-e shortcut on either edges
or vertices.
Recursive beveling is turned of for the time being.
=========
Merge of the famous particle patch by Janne Karhu, a full rewrite
of the Blender particle system. This includes:
- Emitter, Hair and Reactor particle types.
- Newtonian, Keyed and Boids physics.
- Various particle visualisation and rendering types.
- Vertex group and texture control for various properties.
- Interpolated child particles from parents.
- Hair editing with combing, growing, cutting, .. .
- Explode modifier.
- Harmonic, Magnetic fields, and multiple falloff types.
.. and lots of other things, some more info is here:
http://wiki.blender.org/index.php/BlenderDev/Particles_Rewritehttp://wiki.blender.org/index.php/BlenderDev/Particles_Rewrite_Doc
The new particle system cannot be backwards compatible. Old particle
systems are being converted to the new system, but will require
tweaking to get them looking the same as before.
Point Cache
===========
The new system to replace manual baking, based on automatic caching
on disk. This is currently used by softbodies and the particle system.
See the Cache API section on:
http://wiki.blender.org/index.php/BlenderDev/PhysicsSprint
Documentation
=============
These new features still need good docs for the release logs, help
for this is appreciated.
using the last selected face was almost good enough however when selecting verts and edges the last selected face would become inactive and the space image would flicker about too much.
The active face is used for getting the space image at the moment and keeps scripts that use this flag working also.
This has 2 commands to get and set, so the variable is not accessed directly.
all "UV Calculate" scripts work now
last commit crashed when in solid draw mode, it seems subsurf modifier is ignoring the displayMask since MTFACE is available. just made it do a null check for now.
uvcalc_follow_active_coords.py - should be done inC and put in the snap menu.
* Small optimization to multires based on profiling data; calculation of edge boudndaries is now cached along with multires mapping data to improve the performance of the catmull-clark code.
* Removed an unneeded call to create the temporary data when loading files.
In order to give import/export script authors the ability to add properties
to inidividual faces, vertices and edges in the same manner as they are able
to do with ID structures three new custom data types have been added to blender
for floats, integers and strings.
Things to note:
-Since property Layers are custom data, they are added to all verts, edges
or faces at once.
-Only one property layer for each unique property name may exist. In other
words, you cannot have a float layer as well as an integer layer
both with the same name.
-No user interface for this exists at the moment.
The following methods and attributes have been added to the Blender.Mesh
Python module and it's object types:
->MVert/Edge/FaceSeq:
addPropertyLayer(name, type)
removePropertyLayer(name)
renamePropertyLayer(original name, new name)
properties(readonly list.)
->MVert/Edge/Face
getProperty(name)
setProperty(name, value)
->Mesh module
PropertyTypes (readonly dictionary)
* Moved the multires vertex data from struct MultiresLevel to struct Multires. There's no longer any reason to store data seperately for each level; it was just taking up extra memory.
* Incremented the subversion to 2 and adjusted do_versions to correctly load older files.
* Refactored the multires update process (which handles propagating changes to other levels)
using mface->flag for both.
Also found that the cdDM_drawMappedFaces and cdDM_drawFacesTex_common could get normals mixed up when rendering hidden faces. because hidden/invisible faces used continue without advancing to the next normal.
Partial fix for bug #5771, Multires tool deletes crease flags on edges
* Modified the edge flags code to support all of the edge flags (not just seams.)
* Added a new array to the Multires struct to store creases.
* For Mark Sharp, Clear Sharp, and Crease, displays an error if applied to a multires mesh not on level 1.
Changes to CustomData:
Some functions would only return the current active layer, added extra variants that take an index to select the level (modeled after CustomData_get_layer_n.)
Still todo:
* UVs are being interpolated linearly, should probably offer Catmull-Clark subdivision like Subsurf modifier.
* Vertex Colors still don't support multiple customdata layers.
* Editing UV data on levels other than 1 should be disabled in the interface (same for weights)
All data layers, including MVert/MEdge/MFace, are now managed as custom
data layers. The pointers like Mesh.mvert, Mesh.dvert or Mesh.mcol are
still used of course, but allocating, copying or freeing these arrays
should be done through the CustomData API.
Work in progress documentation on this is here:
http://mediawiki.blender.org/index.php/BlenderDev/BlenderArchitecture/CustomData
Replaced TFace by MTFace:
This is the same struct, except that it does not contain color, that now
always stays separated in MCol. This was not a good design decision to
begin with, and it is needed for adding multiple color layers later. Note
that this does mean older Blender versions will not be able to read UV
coordinates from the next release, due to an SDNA limitation.
Removed DispListMesh:
This now fully replaced by DerivedMesh. To provide access to arrays of
vertices, edges and faces, like DispListMesh does. The semantics of the
DerivedMesh.getVertArray() and similar functions were changed to return
a pointer to an array if one exists, or otherwise allocate a temporary
one. On releasing the DerivedMesh, this temporary array will be removed
automatically.
Removed ssDM and meshDM DerivedMesh backends:
The ssDM backend was for DispListMesh, so that became obsolete automatically.
The meshDM backend was replaced by the custom data backend, that now figures
out which layers need to be modified, and only duplicates those.
This changes code in many places, and overall removes 2514 lines of code.
So, there's a good chance this might break some stuff, although I've been
testing it for a few days now. The good news is, adding multiple color and
uv layers should now become easy.
Stored selections now get saved to mesh library blocks as direct data.
The idea that stored selections are 'erased' when leaving editmode and
switching objects is pretty mysterious for the user. Note that currently
the mselect array in a mesh is not written to file. Not sure whether
to change this or not.
- Mark Border Seam: mark edges on the border of face selection as seam.
- Clear Seam: clears seams in selected faces.
Hotkey: Ctrl+E
- Alt+RMB Click: mark/clear edge as seam
- Alt+Shift+RMB Click: mark/clear seams along the shortest/straightest path
from last marked seam. The cost of the path also includes some measure of
'straightness' next to the typical distance to make things work more
predicatble and edgeloop friendly. Note that this cuts a path from edge to
edge, not vertex to vertex. That gives some nice control over the direction
of the seam.
Also includes:
- Removed old LSCM code.
- Fix updates glitches with DerivedMesh/Subsurf drawing in FaceSelect mode.
Now there's a drawMappedFacesTex instead of drawFacesTex.
- Minimize Stretch menu entry called Limit Stitch.
- Removed the lasttface global, was being set before it was used anyway, so
might as wel return from a function.
- Moved some backbuf sampling code to drawview.c from editmesh, so it can be
used by Faceselect and VPaint.
- Use BLI_heap in parametrizer.c.
This fixes most of the UV distortion issues with subsurf. Near seams
however there might still be some distortion, but this should at least
not be worse than before. Subsurf UV is enabled by default on new meshes,
and can be enabled in the modifier panel for existing ones.
Before and after:
http://users.pandora.be/blendix/notsmooth.pnghttp://users.pandora.be/blendix/smooth.png
Radiosity didn't add edges block, on "Replace Meshes". Caused wireframe
not to draw, but also crashes like for join().
Also: added patch that sets the drawflags in edges derived from the
ones set in faces. This ensures the conversion to be done correct.
TODO: this edges call also used in other areas in code, that has to be
catched and done differently.
- revert to drawLooseEdges instead of general drawEdgesFlag
- ditched TFace edge flags, done dynamically now which also
means don't need to recalc surface on flag changes
- added BLI_edgehash, guess what it does
to get rid of faces with MFace.v3==0
- change all Mesh's to have ->medge now. This is forced by make_edges
on readfile, and in the various exotic important routines, and on
conversion back in python.
- make python NMesh structure always have medges now (needs testing)
- with above two changes it is guarenteed that mf->v3 is never ==0
in main blender code (i.e., all MFace's are actually triangles
or quads) and so I went through and removed all the historic tests
to deal with MFace.v3==0. Equals lots of deleting, I am in heaven!
- removed MEdge edcode flag, no longer needed
- added experimental replacement for edge flag system
Still are some inconsistencies in FACESELECT mode edge drawing to
be ironed out.
NOTE: This commit adds an experimental edge flag calc system, based
on 10-seconds-of-thought algorithm by yours truly. Would appreciate
feedback on how this system works, esp compared to old one and esp
on complex or interesting models.
To Use: New system is enabled by setting G.rt to a value between
1 and 1000 (Value of 0 uses old system). Value 1000 is reserved for
"auto" edge, which is more or less identical to old system but also
makes sure that at least 10% of edges are drawn (solves errors for
super subdivided meshes). Values between 1 and 999 act as percent
(out of 1000) of edges that should be drawn, starting with "most
interesting" edges first. Please try it and comment!
mapping (instead of Edit{Vert,Edge,Face} pointers)
- dropped convertToDispListMeshMapped (whew, glad of it too)
- added DerivedMesh drawMappedFaces function
- dropped EM suffix for DerivedMesh functions, it was neither
particularly correct nor descriptive
- converted test_index_mface to test_index_face that also corrects
MCol and TFace. Good thing we had three versions of this routine,
you never know when one might burn down.
- removed flipnorm_mesh, not used anymore (and was incorrect to
boot)
- Getting face select to work with modifiers turned out to be much
more complicated than expected. Reworked mapping architecture for
modifiers - basically elements in a DispListMesh are now required
to be stored in an order that corresponds exactly to original
ordering. MVert/MEdge/MFace all have a new flag ME_XXX_STEPINDEX
that is set on each element that is set on the first derived element
of each original element. I can't say the code to follow these
requirements for subsurf is particularly transparent, but on the
upside it is a reasonably consistent and simple system that is memory
efficient and allows keeping the DispListMesh structure.
- rewrote mirror modifier to be simpler/conform to new requirements
for mapped DispListMesh structure. This also means that mirror interacts
much better with incremental subsurf calculation (it used to recalc
one entire side on any topology change, now it generally avoids that).
- added EM_{init,free}_index_arrays and EM_get_{vert,edge,face}_for_index
functions to handle mapping indices back into appropriate EditMesh
structures.
- bug fix, make edges didn't recalc object data
- bug fix, initial image assignment to TFace's didn't recalc object data
- new feature, added circle select support for FACESELECT
- bug fix, creating new faces in editmode duplicated the TFACE active
flag - but there should only be one active tface
- bug fix, possible crash when deleting all faces in faceselect mode
on mesh with tfaces...
Still todo: TFace edge drawing is still not always correct in face
mode, in particular with a mirror modifier when mesh has edges (and
no preceeding subsurf). Have not yet decided how to deal with this.
Best solution is probably to do switch to meshes all having MEdge's,
in which case I can get rid of TFace edge flags (and need to recalc
modifiers on tface selection change).
- removed DerivedMesh.drawLooseEdges and replaced with much more
general drawEdgesFlag function that draws based edge flags.
- switch DerivedMesh.drawFacesTex to give user control over which
faces are drawn
- added object_uvs_changed and object_tface_flags_changed functions
to do object recalc flag flush/redraw queueing and added calls
in appropriate places
- added various edge flags to mark TFace information. This is used
by the drawEdgesFlag routine and was the best way I could come
up with to deal with drawing TFace information from modifier stack.
Unfortunate side effects are (1) uses a lot of MEdge flags (although
not needed in file so thats fine) and (2) requires recalculation
of modifier stack on UV selection changes. #2 is disappointing
but I could not find a better solution.
- update UV mesh shadow drawing to use modifier result. At the moment
just uses the final result but probably should be integrated with
the editmode cage option.
- convert draw_tfaces3D to use drawEdgesFlag routine which cleaned
up the code quite a bit.
- convert draw_tface_mesh to draw using result of modifier stack.
Same comment about which result actually gets draw in FACESELECT
mode as for UV editor shadow drawing applies.
There is a still a bug in that selection is using the wrong
mesh to draw.
- New: "Spray" is an option now. This used to be the only available vertex
painting method, while holding the mousebutton and move mouse, it keeps
applying (adding, blending) the color.
Disabling "Spray" will give more a 'paint' effect, only applying the
maximum what you indicated to be painting.
- Weight Paint now offers all options Vertex Paint has. This includes "Add",
"Mult", "Sub", and "Filter". And of course the "Spray", which is default
off btw.
Since Weight Paint might need totally different settings, they are stored
separate from Vertex Paint options.
- Renamed the weird "Area" and "Soft" options into something that tells what
it actually does (Even tooltips were wrong).
Area -> "All Faces", option to have all Faces inside the brush being
painted on. Disabling this only paints on the face under the cursor.
Soft -> "Vertex Dist", option that uses distances from cursor to vertex
to calculate the effect. Disable it to only paint per-face.
If someone knows better names... go ahead! :)
- New WeightPaint option in the Panel: "Clear", which removes reference
to this deform group from all vertices.
- Removed code that deleted 'deform vertices' from Mesh on exit editmode,
when vertexgroups were empty. This just worked against you... you could
not paint on empty groups.
- Made Weight Paint painting much nicer. The way it applied values was very
harsh without good transitions. Mainly because it didn't use the
"Vertex Dist" option, but also because it applied colors 3 or 4 times per
vertex (tria/quad).
- Weight Paint undo now restores on a 2nd Undo.
- Vertex Paint Panel button "Clear" didn't work even.
with "loose" edges (edges without a face) and drawing in
solid mode. they would either not draw, or draw with a nasty
selection outline. Added a ME_LOOSEEDGE flag to mark such
edges in displists/mesh and editmode sets it.
- changed DerivedMesh drawEdges to take an argument whether
it should draw loose edges or not
- added ME_EDGERENDER flag, barely changes things atm except makes
sure plain meshes with FasterDraw/etc set still render all edges.
The edge drawing system needs a bit of a revamping - it is a cool
feature but could use several improvements:
(1) The algorithm could be better in choosing the best edges to
draw.
(2) The drawflags should interact well with modifiers. It is wierd
to have a large grid with a deformer that draws no edges because
flags are only calculated based on base mesh.
(3) Drawflags should not be destroyed by editmode. Better design
would be a "Draw % of edges" button.
Of course, could also be the feature is not worth it and we
should just drop. Feel free to comment if you have an opinion.
wondered what these silly data pointers in MDeformVert were for.
Turns out they aren't even need! Just taking up extra memory and
space and confusing the armature deform algorithm. Naturally I
had to clean things up. Sorry Ton.
Deform weights are still stored in a pretty expensive and unnecessary
way, probably use about twice as much memory as needed, and do
way too many memory allocs.
- moved armature_deform_verts into armature.c
- some python code accessed the MDeformWeight data pointers, but
did so in a completely wrong way, I am positive this code could
never have worked (or maybe things changed during tons refactor),
regardless it wouldn't work now... will test later.
and this is better left to user (whee this was a fun commit! so
much deleting!)
- removed mesh_calculate_vertex_normals (replaced by mesh_calc_normals)
- hide flags now save correctly in mesh, to restore after going in/out
editmode
- after an extrude, faces/edges could have wrong select flags
(only in vertex select mode)
- new rule for addfacelist(); this now copies edges too, if an example
is provided. That prevents a lot of awkward code, still testing if it
goes as desired though...