Commit Graph

319 Commits

Author SHA1 Message Date
6cff0b71a7 style cleanup 2012-06-05 21:54:21 +00:00
1aa27e240c code cleanup: replace some non utf8 chars 2012-06-03 11:16:13 +00:00
57b488574a style cleanup: comma placement 2012-05-23 22:45:39 +00:00
d2a37d464a code cleanup: double promotion warnings 2012-05-22 21:16:59 +00:00
3896ad4cbb code cleanup: spelling 2012-05-20 21:23:26 +00:00
2d2d36fe3b code cleanup:
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.
2012-05-20 19:49:27 +00:00
af3e348430 code cleanup: use TRUE/FALSE rather then 1/0 for better readability, also replace do prefix with do_ for bool vars. 2012-05-19 13:28:19 +00:00
5ff7ede1b5 modal operation for bevel and inset:
This commit adds some first building blocks for the two operators to work modally based on mouse input. To make their function easier, two hotkeys are introduced, Ctrl+B for bevel and I for inset.

TODO:
After discussion with Campbell, we would like to add scale-style line indicators for the operators. This is already done for transform operators but a new interface for mesh operations may have to be written using pieces from that code since, strictly speaking bevel and inset are not exactly "transform" operators.

Also, a better input method for inset is needed and more options exposed. The method implemented right now uses mouse move for thickness and ctrl-mouse move for depth. These are calculated using the distance of the selection center in screen space and the mouse position. While that may work and prevents abrupt changes in values when switching from thickness tweak mode to depth tweak mode, it limits the magnitude of values that can be put into the tool especially in small or large scale. 

Alternatives until a better method is written include:

* use relative offset (works but may give strange results)
* tweak manually after the operation.
2012-05-16 14:30:41 +00:00
2be8263db4 style cleanup: indentation 2012-05-16 12:14:31 +00:00
ed33320e3f Code cleanup: simplify standard GHash creation.
Added four new functions as shortcuts to creating GHashes that use the
standard ptr/str/int/pair hash and compare functions.

GHash *BLI_ghash_ptr_new(const char *info);
GHash *BLI_ghash_str_new(const char *info);
GHash *BLI_ghash_int_new(const char *info);
GHash *BLI_ghash_pair_new(const char *info);

Replaced almost all occurrences of BLI_ghash_new() with one of the
above functions.
2012-05-16 00:51:36 +00:00
305d341ec2 code cleanup: use vector math function minmax_v3v3_v3() and other minor vector function edits. 2012-05-13 11:05:52 +00:00
a314b70930 fix [#31354] Segfault with "Extrude Individual Faces and Move" 2012-05-07 18:12:31 +00:00
1118b3fe3f Mesh elements sorting refactor.
Now only one operator. Same options for vertices, edges and faces (so adds edges sorting, and some options to vertices sorting).

Face sorting should behave as previously. However, XSortVerts won’t pack anymore selected vertices at the begining of the vert array (as it used to), if you want such behavior you’ll have to first run SortElements with Selected action.

Also added bug ref I forgot in r46354 (armature.c).
2012-05-06 17:14:56 +00:00
f3230c7897 Second part of fix for [#31157]: Some (actually, 172) operators have no tooltip.
About 30 undocumented ops remaining...
2012-05-05 17:10:51 +00:00
a731e13043 code cleanup: function naming, use BKE_*type* prefix. 2012-05-05 14:03:12 +00:00
65b5362c74 fix [#31235] Limited Dissolve problems
this is in fact 2 bugs.
- unselected edges between 2 faces that were joined didnt get removed.
- in face mode, edges and verts at the boundary of the selection would get incorrectly dissolved.

also quiet float/double promotion warning.
2012-05-04 15:02:02 +00:00
5da2135eef code cleanup: double promotion & some style cleanup 2012-05-03 21:35:04 +00:00
3ee4be913b Fix #31139: fractal mesh subdivide was only working along normal where previously
it would displace in all directions. Now there's an operator option to control this.
2012-05-03 10:14:08 +00:00
6327c9aae1 style cleanup: whitespace, braces 2012-05-01 20:08:23 +00:00
f2ff1da6d7 Related to #31213: rename Delete > Edges & Faces to Only Edges & Faces, to try
to make it more clear that this keeps vertices.
2012-05-01 17:44:00 +00:00
7dce43da21 Fix a potential memory leak in recent vertex xsort/randomize code. 2012-05-01 12:38:26 +00:00
a5af5e8f50 style cleanup: re - http://wiki.blender.org/index.php/Dev:Doc/CodeStyle#Braces_with_Macros 2012-04-30 16:22:40 +00:00
70f1279eab Add convex hull operator (bmesh operator and wm operator.)
Image-heavy user documentation:
http://wiki.blender.org/index.php/User:Nicholasbishop/Convex_Hull

Thanks to Campbell for providing code review:
http://codereview.appspot.com/6114060
2012-04-29 16:09:40 +00:00
04d8ef3c47 wireframe option to crase edges at the hub, much nicer subsurf 2012-04-29 12:33:56 +00:00
41a5e731a2 bmesh: new wireframe tool
- makes wireframe from faces.
- options similar to inset (even offset, relative scale)
- copies face settings and loops (uvs, vcolors)
- optionally replaces the existing geometry.
2012-04-29 10:44:00 +00:00
c91fd5a0bf code cleanup: remove editmesh code left hanging around thats already been ported to bmesh, also remove main editmesh header. 2012-04-28 12:23:05 +00:00
b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
dc313ff00d add back lasso tool in the UV editor (Ctrl+LMB / Ctrl+Shift+LMB) 2012-04-28 01:59:21 +00:00
7669d0e317 disable bevel for release after discussion with brecht and sergey, this works far too poorly to be included in release. 2012-04-25 10:24:31 +00:00
4c873fec53 bmesh py api: functions to add/renmove customdata layers, eg.
bm.loops.layers.color.new("Testing")
2012-04-23 14:52:28 +00:00
b51590d55d code cleanup: bmesh subdivide code - BM_mesh_esubdivideflag() & "esubd" bmesh operator was passing a flag about in a fairly confusing way.
since we will eventually have python bmesh operator access better expose this as multiple booleans.

remove remaining editbutflag's
2012-04-23 03:43:02 +00:00
4c4389f6a4 code cleanup: remove editbutflag flag from toolsettings & related defines. 2012-04-23 02:48:05 +00:00
8765dfccf7 style cleanup: correct typos 2012-04-21 14:14:58 +00:00
1c54eaecd8 fix [#31049] New Faces (F) always solid shaded 2012-04-21 13:58:29 +00:00
b26865ba99 code cleanup: prefer BM_face/edge/vert_select_set() over BM_elem_select_set() when the type is known (saves switch statement check on the type).
Add asserts so the correct types are ensured.
2012-04-20 16:55:47 +00:00
384f87cd1c rip tool wasnt working on a single edge selection in some cases (own error in recent fix). 2012-04-19 23:16:57 +00:00
e387ccdb42 bmesh inset: add depth option (make use of relative and even offset options) 2012-04-19 19:03:15 +00:00
c7f8af329b BMESH_TODO: randomize vertices working again.
That whole "element re-arrange" area could use some love, though (e.g. make a single vert operator with more options, as faces; and make faces work in edit mode, probably no more reasons to switch to object mode?). Post-release TODO, anyway.

Also spotted a glitch in BLI_rand code, imho, which makes first element of an array not guarantied to be shuffled by BLI_array_randomize()... No correction though, as this might/would affect other parts of the code!
2012-04-19 18:53:32 +00:00
e730c1af6d committed check by mistake, its not needed. 2012-04-19 17:26:22 +00:00
475ecbb0ce remove BM_ITER, BM_ITER_INDEX macros, use ELEM or MESH variants only (the maceros had unused args in both cases). 2012-04-19 13:47:58 +00:00
3ef7943910 code cleanup: first step to replace BM_ITER BM_ITER_INDEX macros. 2012-04-19 12:45:56 +00:00
7cadd242d3 BMESH_TODO: xsort of vertices working again.
This commits adds a new function which can remap vertices/edges/faces of a BMesh in a new given order:
void BM_mesh_remap(BMesh *bm, int *vert_idx, int *edge_idx, int *face_idx)
2012-04-19 12:31:39 +00:00
75b869e428 style cleanup: BM_ITER / BM_ITER_INDEX / BMO_ITER 2012-04-19 11:44:12 +00:00
1f01d62d15 more replacement for BM_edge_face_count() use. 2012-04-18 06:57:28 +00:00
09f722740f move rip out into its own file 2012-04-17 10:25:23 +00:00
3486223607 code cleanup: remove/comment some unused code. 2012-04-17 05:09:37 +00:00
37a79f4727 fix [#30972] Editmesh split by materials not working. 2012-04-16 13:49:04 +00:00
4ebcae7158 bmesh todos:
- dont do name based object lookup to find the object for a mesh undo state (possibly object is renamed inbetween undos which would crash)
- remove some todo comments for things that are working as they should.
2012-04-16 09:34:43 +00:00
97538bd9ed Fix #30960: various mesh operators were missing tooltip descriptions. 2012-04-15 10:07:57 +00:00
637387b8ac Fix #30949: live unwrap when marking seams did not work with bmesh. 2012-04-15 09:20:42 +00:00