Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2009-12-21Solidify modifier for Durian (allow cloth sim on single layer and make solid ↵Campbell Barton
after) 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.
2009-11-04Sculpt: updating normals now no longer uses the vert-face map, to save memory.Brecht Van Lommel
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.
2009-07-132.5Brecht Van Lommel
* 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.
2009-06-162.5: Image EditorBrecht Van Lommel
* 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).
2009-01-06Got rid of old multires code, brought in multires modifier from Nicholas Bishop
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.
2008-12-202.5 BLI_blenlib cleanupAndrea Weikert
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)
2008-09-02-> Fix for 64 bit alignment of Vertex colors in bmeshGeoffrey Bantle
Vertex color structure in bmesh needed to be padded for 8 byte aligned memory access.
2008-07-29Game Engine: alpha blending and sortingBrecht Van Lommel
======================================= 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.
2008-07-04-> Vertex Group support for bevel (editmode only)Geoffrey Bantle
Vertex groups are now preserved when beveling (editmode only). Modifier support as well as uv/vert colors to follow soon.
2008-06-09adding clip alpha (binary alpha) to the 3D view and game engine.Campbell Barton
2008-04-17Patch from GSR that a) fixes a whole bunch of GPL/BL licenseChris Want
blocks that were previously missed; and b) greatly increase my ohloh stats!
2008-02-24-> Bevel tools and Bmesh kernelGeoffrey Bantle
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.
2008-02-09== Multires ==Nicholas Bishop
Fixed bug #8215, Crash with shaded view + multires mesh
2007-11-27ParticlesBrecht Van Lommel
========= 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_Rewrite http://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.
2007-09-22added an active face for the mesh editmode and normal mesh - this is needed ↵Campbell Barton
because the TFace flag was not always easy to access from editmode. 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.
2007-07-19added commends to some DNA_*.h files - as well as some TODO's for removal.Campbell Barton
header_view3d.c was doign an implicit declaration also.
2007-06-11== Multires ==Nicholas Bishop
* 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.
2007-06-10== Multires ==Nicholas Bishop
Removed an unused integer from MultiresFace
2007-06-04-> Custom Properties for Mesh entitiesGeoffrey Bantle
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)
2007-06-01== Multires ==Nicholas Bishop
* 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)
2007-04-29dont use tface hide or select anymore, since maintaining 2 sets of ↵Campbell Barton
hide/select data for each face is annoying. 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.
2007-04-10Found a bug where "make dupes real" would crash, when the group was an ↵Campbell Barton
extternal link. - 1 liner fix from Ton. Also added "sort faces by selection" to the sort menu. DNA_meshdata_types use C comments for GCC verbose warnings to be quiet
2007-01-22== Multires ==Nicholas Bishop
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.
2007-01-10A few cleanups for multires (removed commented-out code, unused variables), ↵Nicholas Bishop
also removed use_tex flag from the Multires struct (that is now stored implicitly by the fdata struct.)
2007-01-10Large fix for multires. Changed UV coordinates (MTFaces) to be special ↵Nicholas Bishop
first-level data in multires. The data is now stored in a standard CustomData struct in Multires, rather than being stored for each level. (The UVs can now only be edited on level 1.) Changes allow multiple sets of UVs to work correctly. This change should also decrease multires memory usage some (though only when UVs are being used, of course.) 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)
2007-01-05Retyped texcolfaces.tex_page to match MTFace.Nicholas Bishop
2006-12-31Added propagation of the edge seam flag for multires. Note that the flag is ↵Nicholas Bishop
only stored for level 1.
2006-12-20As Brecht suggested, changed multires vert maps to use one big chunk of ↵Nicholas Bishop
memory rather than many small ones.
2006-12-11Do a better job of propagating face data in multires, including flags and ↵Nicholas Bishop
materials
2006-12-05Damn! Commit for render passes in wrong dir....Ton Roosendaal
2006-12-03Modified multires to use CustomData for deformedverts. Deformedverts now ↵Nicholas Bishop
load properly from editmesh.
2006-11-20Added custom vertex/edge/face data for meshes:Brecht Van Lommel
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.
2006-11-06Merged Google Summer of Code sculptmode/multires/retopo tools.Nicholas Bishop
From the tracker: https://projects.blender.org/tracker/index.php?func=detail&aid=5018&group_id=9&atid=127
2006-08-28Integration of the Google Summer of Code Modifier Stack Upgrade project. TheBen Batt
main features are: * Modifiers can now be in any order in the modifier stack * DerivedMesh now has a standard framework for custom element data to be passed through the stack with mesh data (being copied and interpolated as appropriate), so modifiers can access whatever data they need * The modifier stack code has been refactored and a number of bugs have been removed * The EdgeSplit modifier has been added: http://mediawiki.blender.org/index.php/BlenderDev/EdgeSplitModifier * The DerivedMesh modifier has been added: http://mediawiki.blender.org/index.php/BlenderDev/DisplaceModifier * The UVProject modifier has been added: http://mediawiki.blender.org/index.php/BlenderDev/UVProjectModifier For more info, see: http://mediawiki.blender.org/index.php/User:Artificer/ModifierStackUpgrade (currently undergoing reorganisation)
2006-04-03-> Stored Selections in Mesh DNAGeoffrey Bantle
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.
2006-02-09Seam Cutting in Faceselect Mode:Brecht Van Lommel
- 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.
2006-01-10Apply Subsurf to UV's.Brecht Van Lommel
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.png http://users.pandora.be/blendix/smooth.png
2005-09-22Bugfix #3077Ton Roosendaal
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.
2005-08-22 - sillyness... added drawMappedEdges for meshDaniel Dunbar
- 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
2005-08-21 - added mesh_strip_loose_faces, works in conjunction with make_edgesDaniel Dunbar
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!
2005-08-20 - convert all DerivedMesh map functions to use index basedDaniel Dunbar
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).
2005-08-18 - added DerivedMesh.drawUVEdges function & implementationsDaniel Dunbar
- 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.
2005-08-16Weight Paint & Vertex Paint goodies;Ton Roosendaal
- 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.
2005-08-14 - cleaned up edge drawing a tad, there were issues with mesh'sDaniel Dunbar
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
2005-08-13 - readded Subsurf "optimal" edge drawing/renderingDaniel Dunbar
- 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.
2005-08-11 - couldn't help myself, got distracted working on something else andDaniel Dunbar
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.
2005-07-23 - removed mface->puno flags, was only used to flip normals in displayDaniel Dunbar
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)
2004-09-24- basic code for fake-polygon support (called FGon in code). Disabled nowTon Roosendaal
- 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...
2004-09-24EditMesh refactory + undo recodeTon Roosendaal
The changelog is very long... it's on the web too: http://www.blender3d.org/cms/Mesh_editing_rewrite.425.0.html EditMesh refactor notes (user) **** New selection modes When entering Edit Mode for a Mesh, you now have the choice for three selection modes. These are shown as icons in the 3D header (hotkey is being searched for!). - Vertex Select Select vertices as usual, fully compatible with how previous version work - Edge Select Vertices are not drawn anymore, and selections happen by default on the edges. It is a true edge select, meaning that you can select three out of four edges in a face, without automatic having the 4th edge selected. - Face Select Instead of vertices, now selection 'points' are drawn in the face centers. Selected faces also get a colored outline, like for edges. This also is true face select, for each face individual regardless selection status of its vertices or edges. While holding SHIFT, and press a selection mode, you can also combine the above choices. Now selection becomes mixed, and will behave as expected. For example; in Edge+Face select mode, selecting the 4 edges of a face will select the face too. The selection modes and optional drawing modes (like transparant faces, normals, or solid drawing) all work together. All of Blender's mesh editing tools now react to the correct selection mode as well. Most noticeable it's in: **** Extrude Extruding in Edge or Face Select mode allows much more precise control over what's extruded and what should be excluded. Try for example a checker pattern selection, and extrude it. New is the fixed translation when faces are extruded. This always follows the (averaged) face normal(s) of the old face(s), enabling much easier working in 3D views . A single 'G' (Grab) or 'R' (Rotate) or 'S' (Scale) will change transform modus as usual. **** Other things to note - Hiding edges/faces will also behave different based on Select Mode. - while editing, normals of faces are updated always now - Border select (BKEY) has 2 different rules for edges; when one edge is fully inside of the border, it will only select edges that are fully inside. Otherwise it selects each edge intersecting with the border. - in face mode, adding vertices, edges or a circle is invisible... - "Add monkey" now works as a normal primitive (rotated and on 3d cursor) - Mesh undo was fully recoded, hopefully solving issues now with Vertex Keys and Groups - Going in and out of editmode was fully recoded. Especially on larger models you'll notice substantial speed gain. **** Todo Add 'FaceSelect mode' functionality in EditMode, including zbuffered selection, display and editing of UV texture. EditMesh refactor notes (coder) **** Usage of flags in general The "->f" flags are reserved for the editmesh.c and editmesh_lib.c core functions. Actually only selection status is there now. The "->f1" and "->f2" flags are free to use. They're available in vertex/edge/face structs. Since they're free, check carefully when calling other functions that use these flags... for example extrude() or subdivide() use them. **** Selection flags EditVert: eve->f & SELECT EditEdge: eed->f & SELECT EditFace: efa->f & SELECT - Selection is only possible when not-hidden! - Selection flags are always up-to-date, BUT: if selection mode >= SELECT_EDGE vertex selection flags can be incorrect if selection mode == SELECT_FACE vertex/edge selection flags can be incorrect This because of shared vertices or edges. - use for selecting vertices: eve->f &= SELECT - use for selecting edges always: void EM_select_edge(eed, 1) // 1 = select, 0 = deselect - use for selecting faces always: void EM_select_face(efa, 1) // 1 = select, 0 = deselect - To set the 'f' flags in all of the data: void EM_set_flag_all(int flag); void EM_clear_flag_all(int flag); - the old faceselectedOR() and faceselectedAND() are still there, but only to be used for evaluating its vertices **** Code hints for handling selection If the selectmode is 'face'; vertex or edge selections need to be flushed upward. Same is true for 'edge' selection mode. This means that you'll have to keep track of all selections while coding... selecting the four vertices in a face doesn't automatically select the face anymore. However, by using the above calls, at least selections flush downward (to vertex level). You then can call: void EM_selectmode_flush(void); Which flushes selections back upward, based on the selectmode setting. This function does the following: - if selectmode 'vertex': select edges/faces based on its selected vertices - if selectmode 'edge': select faces based its selected edges This works fine in nice controlled situations. However, only changing the vertex selections then still doesn't select a face in face mode! If you really can't avoid only working with vertex selections, you can use this call: void EM_select_flush(void); Now selection is flushed upward regardless current selectmode. That can be destructive for special cases however, like checkerboard selected faces. So use this only when you know everything else was deselected (or deselect it). Example: adding primitives. **** Hide flags EditVert: eve->h EditEdge: eed->h EditFace: efa->h - all hide flags are always up-to-date - hidden vertices/edges/faces are always deselected. so when you operate on selection only, there's no need to check for hide flag. **** Unified undo for editmode New file: editmode_undo.h A pretty nice function pointer handler style undo. Just code three functions, and your undo will fly! The c file has a good reference. Also note that the old undo system has been replaced. It currently uses minimal dependencies on Meshes themselves (no abuse of going in/out editmode), and is restricted nicely to editmode functions. **** Going in/out editmode As speedup now all vertices/faces/edges are allocated in three big chunks. In vertices/faces/edges now tags are set to denote such data cannot be freed. ALso the hashtable (lookup) for edges uses no mallocs at all anymore, but is part of the EditEdge itself.
2004-07-13Added LSCM UV Unwrapping:Brecht Van Lommel
http://www.loria.fr/~levy/Galleries/LSCM/index.html http://www.loria.fr/~levy/Papers/2002/s2002_lscm.pdf Implementation Least Squares Conformal Maps parameterization, based on chapter 2 of: Bruno Levy, Sylvain Petitjean, Nicolas Ray, Jerome Maillot. Least Squares Conformal Maps for Automatic Texture Atlas Generation. In Siggraph 2002, July 2002. Seams: Stored as a flag (ME_SEAM) in the new MEdge struct, these seams define where a mesh will be cut when executing LSCM unwrapping. Seams can be marked and cleared in Edit Mode. Ctrl+EKEY will pop up a menu allowing to Clear or Mark the selected edges as seams. Select Linked in Face Select Mode now only selects linked faces if no seams separate them. So if seams are defined, this will now select the 'face group' defined by the seams. Hotkey is still LKEY. LSCM Unwrap: unwrap UV's by calculating a conformal mapping (preserving local angles). Based on seams, the selected faces will be 'cut'. If multiple 'face groups' are selected, they will be unwrapped separately and packed in the image rectangle in the UV Editor. Packing uses a simple and fast algorithm, only designed to avoid having overlapping faces. LSCM can be found in the Unwrap menu (UKEY), and the UV Calculation panel. Pinning: UV's can be pinned in the UV Editor. When LSCM Unwrap is then executed, these UV's will stay in place, allowing to tweak the solution. PKEY and ALT+PKEY will respectively pin and unpin selected UV's. Face Select Mode Drawing Changes: - Draw Seams option to enable disable drawing of seams - Draw Faces option to enable drawing of selected faces in transparent purple - Draw Hidden Edges option to enable drawing of edges of hidden faces - Draw Edges option to enable drawing of edges of visible faces The colors for these seams, faces and edges are themeable.