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
2005-07-15 - switch em_{vert,solid,wire}offs to be unsignedDaniel Dunbar
- some other twiddles to fix mixed signedness compiler warnings And from the "Dear lazy programmers" file: After you have extern declared a variable 5 or more times at the top a function, you would have actually saved a lot of effort by just putting it in the header where it belonged. Or perhaps you thought by hiding it no one else would notice you were using global variables to pass information around. Tsk tsk.
2005-07-13Well here it is. Subdivision/Loop Tools Recode Commit #1Johnny Matthews
Ton has been pushing me to get this in and finish it up with help, so here is a run down of the commit Revised Features Subdivide now is Edge based, allows for multicut Loopcut was recoded, now has multi option Knife tool now has multi option New Features Edgeslide Edgering select Removed Features Alt-B Edgeloop selection (use alt-RMB in edgemode) Shift-R Faceloop selection (use alt-RMB in facemode) Old Subdivide (Except for smooth which is left in until new one works) Todo Subdivide Smooth Math is broken - could use some help here (look for alter_co in editmesh_tools.c) Tweak mouse control of Edgeslide is hackish ATM Add Non-proportional movement to edgeslide Add smooth option to new loopcut I probably left something out. See here for more info http://wiki.blender.org/bin/view.pl/Blenderdev/EdgeSubdivision
2005-02-16This commit adds rotate edges Clockwise and CounterClockwise to the Edge ↵Johnny Matthews
Specials Menu (and of course the code to back them up)
2004-11-24Bug reported on IRC by Chris WantTon Roosendaal
Remove doubles, editmode Mesh, returns short. doesnt work nice on large meshes! Is int now.
2004-11-05Bug report #1732Ton Roosendaal
Function "deselect vertex group" didn't use proper code for new edge/face flags yet.
2004-10-01Accidentally previous commit went out, while i tried to abort it. :)Ton Roosendaal
This is a fix for propert circular clipping for circleselect, when it uses backbuffer selecting
2004-10-01- Improved memory system for pupmenu(), which now stores 255 entries max.Ton Roosendaal
Meaning menus come back to previous selection almost always. Also fixed annoying bug that caused Mirror menu (M in editmode) to start at 2nd item - New hotkey (test :) CTRL+TAB in editmode gives (and shows!) current selectmode. I prefer this over cycling, since the menu is informing you what happens. - To enforce pupmenus to start at specific item, use pupmenu_set_active() - pupmenu_col() to be done
2004-09-30Special request; Lasso Select (thanks andy for nagging! :)Ton Roosendaal
Is committed now for further test; What works: - Hold CTRL while leftmouse-draw (gesture) for lasso-select - Hold also SHIFT for lasso-deselect - In Object mode it only selects on object centers now - In Mesh edit mode it works on same level as borderselect Not: - other editmodes or objects in general Also fixed crash with circle-selecting outside of window edge. Also put back wire-extra draw for curves (previous trial broke mball wire) Turned borderselect, circle, lasso into dashed lines for visual language.
2004-09-29Borderselect and circleselect now use backbuffer method too.Ton Roosendaal
Maybe its time to make this a default now?
2004-09-26Added initialize code for zbuffer-select option, where it reads largerTon Roosendaal
parts of zbuffer on border/circle select. Should speed up quite some.
2004-09-25Two nice workflow improvements;Ton Roosendaal
- Zbuffer clipped selection Based on same algos as for drawing (blender polygon offset) vertices, edges and faces now are clipped for draw and selection when Zbuffer is used. Note that it works for endpoint vertices of edges, and for facecenters. Also works for border and circle-select - Optimal draw subsurfs This now draws optimal with faces and edges selected/unselected, hiding the original 'cage' (mesh) completely. TODO: edge select, which still uses original (invisible) edge. http://www.blender3d.org/cms/Mesh_editing_rewrite.425.0.html
2004-09-24All kinds of fixes for new selection modesTon Roosendaal
- circle-select now works - delete options for edge/face select work as to be expected. should check on a better set of choices in menu though - assign material / select material options work for new modes - shift+f fill didnt leave proper select flags... - border select on face-gones (fgons) works - 'draw normals' and fgons works now
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-09-19Part one of editmesh.c refactoring. The huge file has been split inTon Roosendaal
logical parts, and include files altered to denote internal and external functions. include/editmesh.h: internal calls for editmesh_xxx.c files include/BIF_editmesh.h: external calls for these files src/editmesh.c: basic alloc/lists and in/out editmode, undo, separate src/editmesh_lib.c: basic utility calls for all editmesh_xxx.c (no UI) src/editmesh_add.c: add prim, add duplicate, add vertex/edge/face (UI) src/editmesh_mods.c: selecting, transforming (UI) src/editmesh_loop.c: loop tools like knife, loop select, loop subdiv (UI) src/editmesh_tools.c: other tools (extrude, spin, etc) (UI) And a new file: src/meshtools.c: tools for Mesh outside of editmode (normals, draw flags)
2004-09-19Evil commit! Nothing really changed except;Ton Roosendaal
- EditVlak -> EditFace - variables called 'evl' -> 'efa' - functions with 'vlak' in it now have 'face' Just thought was nice starter for editmesh recode...
2004-09-18Another step in the undo evolution.Ton Roosendaal
- Made unified API for undo calls, to be found in space.c BIF_undo_push(char *str) BIF_undo(void) BIF_redo(void) These calls will do all undo levels, including editmode and vpaint. The transition is work in progress, because mesh undo needs recode. - New global hotkey CTR+Z for undo Note: 'shaded draw mode' still is SHIFT+Z, the old CTRL+Z was to recalc the lighting in shaded mode, which already became much more interactive, like during/after any transform(). Recalc hotkey now is SHIFT+ALT+Z CTRL+<any modifier>+Z is redo. - For OSX users; the Apple-key ("Command") now maps to CTRL as well. This disables the one-mouse-button hack for rightmouse btw, will be fixed in next commit. At least we can use Apple-Z :) - Old Ukey for undo is still there, as a training period... my preference is to restore Ukey to "reload original data" as in past, and only use new CTRL+Z for undo. - Added undo_push() for all of editobject.c and editview.c. Meaning we can start using/testing global undo in the 3d window. Please dont comment on missing parts for now, first I want someone to volunteer to tackle all of that. - Since the global undo has a full 'file' in memory, it can save extremely fast on exit to <temp dir>/quit.blend. That's default now when global undo is enabled. It prints "Saved session recovery to ..." in console then. - In file menu, a new option is added "Recover Last Session". Note that this reads the undo-save, which is without UI. - With such nice new features we then can also kill the disputed Cancel/Confirm menu on Q-KEY. - Added fix which initializes seam/normal theme color on saved themes. They showed black now.... (Note: that's in usiblender.c!)
2004-08-21This commit adds the 'Rotate Edges' functionality. Select edges and ctrl-E ↵Johnny Matthews
and choose rotate edges. is also in the mesh->edges menus in 3d header and toolbox. I put it here since there was not concensus about replacing the code for CTRL-F with this code.
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.
2004-07-09Quite a large one this time... but now we have:Ton Roosendaal
Edges in Mesh - adds automatic when you use creases. For other situations; call the void make_edges(Mesh *me) in mesh.c. Of course, once in editmode the edges are automatically recreated. - in F9 buttons you can add/remove edges too - both for Mesh and DisplistMesh, so it speeds up drawing quite some in wireframe - render for edges can't work... edges have no material nor tface nor col.. so here still the faces are rendered in wire Creases in Subsurf - based on the code by Chris McFarlen - main changes is that now edges are used, saving quite some data in file - use SHIFT+E in editmode to set edges-sharpness. values go from 0-1 - in F9 buttons you can set draw-crease mode. It draws now blended from wire color to edge-select color (as provided in Theme) Known issue: setting sharpness on 1 cube (subdiv 2) gives weird results with some values... Chris, can you check? Further; code cleanups, changing 0 in NULL when needed, no warnings, etc etc
2004-04-04- Added source\blender\python to MSVC 6 debug target include path for KX_KetsjiRoel Spruit
- Added vertex_loop_select to bif_editmesh.h (gave a warning) - Re-added "Get Same Uv" feature. this selects all faces that have the same uv-texture as the active face. it's placed in the Select headermenu while in faceselect mode.
2004-03-21 - added editmesh_[de]select_by_material functionDaniel Dunbar
- added mesh_set_smooth_flag, mesh_delete_material_index function - isolated some globals - got rid of reliance on meshdata in buttons_editing.c and material.c
2004-01-22New loopcut version. much praise goes to Johnny Matthews who implemented ↵Roel Spruit
precision cutting. new features: - after choosing a loop to cut you go into a second mode that lets you choose where exactly on the edge you want to cut. the placement is in percentages, so 0% is one side of the edge, and 100% is the other side. - holding CTRL snaps the placement to whole percentages. 1.00 instead of the standard 0.01 of a percentage. - Pressing S while you place the cut turns on Smooth-subdivide for the cut (or as I like to call it: Loopcutsubdividesmooth :) - the percentages and the ON/OFF for smooth cut can be seen in the view3D header. fixes: - loop takes into account hidden vertices, this solves bug #895. - Cutpreviews are drawn correctly for triangular faces. - renamed the function from loop -> loopoperations. I'm sure someone has a problem with the new name too, but BLAH! :D - the parameters for the function are defines. loopoperations(LOOP_CUT) cuts, and loopoperation(LOOP_SELECT) selects (duh). this is changes in all the places the function gets called. if people find new bugs, feel free to yell! :) Roel
2004-01-03* Ported mesh editmode 'select random' from tuhopuu by popular requestMatt Ebb
Description: Mesh editmode header/toolbox: Select -> Random... Randomly selects a user-set percentage of vertices, adding to the current selection. * Modified some menu entries to be consistent with the guidelines doc. * Added 'Align Active Camera to View' in 3D View menu
2004-01-03Three new selection techniques in mesh edit mode, two of which areChris Want
controversial: * "Select non-manifold geometry" via ctrl-alt-shift-M, or through the menu or toolbox. Great for troubleshooting weirdness on a subsurf, or for preparing a mesh for decimation or for rapid prototyping. * "Select more" via ctrl-PADPLUS, or through the menu or toolbox. If a selected vert shares an edge with an unselected vert, the unselected one gets selected too. Similar to PADPLUS in wings3d. This is controversial because maybe it would be more useful to select all of the verts that share a face (instead of just an edge) with a selected vert -- what do *you* think? * "Select less" via ctrl-PADMINUS, or through the menu or toolbox. If a selected vert shares an edge with an unselected vert, the selected one gets unselected too. Similar to PADMINUS in wings3d. Also, selected non-manifold geometry becomes unselected. This is controversial because of the non-manifold stuff ... is it needed? What do *you* think?
2003-12-15BEVEL FOR MESH **** LONG LOG WARNING ****Martin Poirier
The interesting part: Bevelling functions for meshes. Accessible through the Wkey menu. You then have to enter the recursivity level (Warning, don't use 3 on a big mesh) and interactivly set the bevel width by moving the mouse. It draws the new faces in yellow. Ctrl constraint to 0.1 multiples, Shift switches to low gear, Space to type a value directly. Support for selective bevelling isn't really working yet, so be sure to select all the vertices beforehand. The less interesting part: Code done by intrr (logical stuff, how the algorithm works) and me (math stuff and the interactive bevel width code). The splitting and bevelling algorithm is not yet fully optimized, and the face shrinking math still doesn't like too big bevel width values. So this will have to be cleaned too. Selective bevel is on the list next. If you have any questions about how the code works, send the questions regarding the logic of the method to intrr and math questions to me. This is very much testing code (or should I say teasing code), so please don't flood me with bug reports. (This excludes OFFICIAL Blender developpers who were there at the meeting and pretty much know what the limitations of the code is and what it should do.)
2003-11-06Discovered I never remapped RMB to cancel in get_mouse_trail(). Done now.Robert Wenzlaff
2003-10-29- added another load of items to new toolbox... yeez, what anTon Roosendaal
ENORMOUS job Matt has done with the menus! :) - followed as much as possible order and options in pulldowns, but since toolbox has more categories, it is split up sometimes. - did some minor changes in pulldowns to make it more consistant - not yet: armature & text options... - not yet: toolbox in other window types (warning; shift+a now is new... eek!)
2003-10-27 Added K Menu for Loop Select, Loop Cut, and Knife tools.Robert Wenzlaff
2003-10-20Editmesh Undo:Robert Wenzlaff
User Info: Pressing UKey in mesh edit mode now undoes only last step. Undo can save upto 64 steps of undo info. This is configurable under User Prefs-> Edit Methods. The default is 32. High numbers of undo steps use a lot of memory, since each step stores a copy of the mesh. Shift-U redoes the last undone step (Undoes the undo.) Alt-U brings up a menu of possible steps that can be undone. Selecting an item on the list undoes that item plus all items before it on the list. The top selection "Undo All" is identical to the old Ukey. It undoes all editing since entering Editmode, even if all regular undo steps are used up. Undo info is only saved for one object at a time. You can leave and re- enter editmode for the same object, and all undo steps for that object are preserved. Undo info for an object is lost once a different object is edited. Coder Info: In order for undo to work, a checkpoint save has to be made. This is done with a call to undo_push_mesh("name of step"). This should be done after the last quick abort for a function (typ. the "if (G.obedit==0) return;", or similar). the undo_push_mesh() does alter some flags, so don't try to be too tricky and call undo_push_mesh() too late. The step name is what shows up in the undo_menu. The name "U" is reserved.
2003-10-19Adding Knife tool as to be released in 2.3Robert Wenzlaff
User Info: To use this tool, select a group of verts, it can be larger than the desired cut as explained below. Then hit Shift-K. The tool will prompt for cut type (Exact line or Edge centers), Select, then use LMB to draw a "cut-line". Holding down LMB causes a freehand draw, clicking LMB causes a polyline draw. MMB locks the axis. When done press enter to divide mesh on cut line. Subdivide routines have been modified to produce fewer triangles as part of this tool. Edge Centers preserves UV info, Exact Line does not (it will be there, just slightly distorted). Since the cut line exists in 2D space, and does not make a persistant selection that can be modified in another 3D view, the knife selection is the AND of the vertex selection and the knife line, ie; the edge will be subdivided only if both verts are selected, and the knife line crosses the edge. Select your verts first, but you don't have to be overly precise. If you want to cut a few faces on the front of a sphere, you can select the whole front of the sphere, then knife the faces you want. Coder Info: KnifeSubdivide is called with 1 of 3 modes. KNIFE_PROMPT, KNIFE_EXACT, KNIFE_MIDPOINTS. The hotkey calls KNIFE_PROMPT. When adding to a menu or button, explicitly call out the mode. Part of the tool provides get_mouse_trail() that returns a CutCurve struct that defines a knife line. There are modes defined, but currently they are not implimented. Another part of this tool defines new behaviour for subdivideflag(). Setting beauty param to B_KNIFE tells subdivideflag() that the edges are preselected ans to skip the vert check. Also setting B_PERCENTSUB tells subdivideflag() to divide the edge at a percentage of the distance from eed->v1 to eed->v2. This percentage is passed in the eed->f1 flag as a short (ie, setting eed->f1 to 16384 cuts the edge half-way).
2003-10-17Preliminary work on faceloop selection and faceloop cutting. Commiting in ↵Roel Spruit
steps to prevent Ton from sneaking in between me! :D some small things to fix: - cutting on 1 face doesn't work - options now under shift/ctrl R, they will be under a K menu that will contain DetectiveThorn's Knife tool too. Roel
2003-10-13Robert (DetectiveThorn) Wenzlaff's Knife subdivide tool. See previousAlexander Ewering
message on Bf-committers for description.
2003-09-21added 2 new features:Roel Spruit
- "Seperate loose parts" is an option in the new pkey popup (in mesh editmode) that seperates a mesh based on objects in it that are not connected. - "Select same uv" is an option in the wkey popup (in facemode) that selects all faces in the mesh that have the same uv texture assigned as the current active face. ps. first commit! I hope I can live up to expectations...but don't expect too much! :D
2002-12-27Removed the config.h thing from the .h's in the source dir.Kent Mein
So we should be all set now :) Kent -- mein@cs.umn.edu
2002-11-25Did all of the .h's in sourceKent Mein
(adding) #ifdef HAVE_CONFIG_H #include <config.h> #endif also the Makefile.in's were from previous patch adding the system depend stuff to configure.ac Kent -- mein@cs.umn.edu
2002-10-30fixed spacing in the headers to get rid of some warnings and some otherKent Mein
little minor spacing issues.
2002-10-12Initial revisionv2.25Hans Lambermont