Commit Graph

407 Commits

Author SHA1 Message Date
ee6aaafd31 code cleanup: typos and set gcc attributes for string formatting. 2012-04-25 06:06:40 +00:00
e7eac6c3f2 fix [#31080], edge slide UV correction wasnt working for UVs surrounding the end of the slide selection (one edge sliding on a grid for example). 2012-04-25 02:46:32 +00:00
c4abd6cf5a code cleanup: edge slide code had oddly named variables, added some comments and renamed vars.
also made BM_elem_select_set() a function (was a macro calling a function).
2012-04-25 01:24:55 +00:00
48893dba24 style cleanup: no functional changes 2012-04-24 22:50:49 +00:00
5c89138684 style cleanup: comments 2012-04-22 11:54:53 +00:00
6701933f5c style cleanup 2012-04-21 12:51:47 +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
b40476455e code cleanup: remove unused BMesh args. 2012-04-19 14:38:09 +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
75b869e428 style cleanup: BM_ITER / BM_ITER_INDEX / BMO_ITER 2012-04-19 11:44:12 +00:00
6d346724d3 Fix redo not working correct after keyboard input for shear, shrink/flatten,
push/pull, edge slide tools. Patch by Nicholas Rishel.
2012-04-18 08:26:58 +00:00
1f01d62d15 more replacement for BM_edge_face_count() use. 2012-04-18 06:57:28 +00:00
8ae502ae99 Fix #30977: error loading modal keymaps from keyconfiguration presets. 2012-04-17 15:40:04 +00:00
3f9fce6542 Fix #30980: edge slide Correct UVs option not working.
Was a bmesh todo, main issue was with shape keys, now disabled any changes to
the shape key data layer, and disabled the option altogether when editing
non-basis shape keys.
2012-04-17 14:24:04 +00:00
285970753e fix/workaround an error related to [#30735]
when a single face in a loop is hidden, loop cut will subdivide edges on both sides.
creating an edge between the hidden faces.

without this workaround the edge ends up hidden and selected.

added a check in BM_mesh_validate() for hidden/selected elements.
2012-04-03 07:31:11 +00:00
d98c1770f9 patch [#30780] Transform operator leak in aborted edge slide mode
from Francisco De La Cruz (xercesblue)
2012-04-03 02:52:34 +00:00
1ce2c73816 Code style cleaup for motion-tracking modules.
Should be no functional changes.
2012-03-25 23:19:21 +00:00
6faeac9fe2 style cleanup: add braces around checks - 'if ELEM() {...}', confuses some parsers that done expand macros. 2012-03-25 22:35:18 +00:00
ab4a2aaf4a style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:38:07 +00:00
ccbed13343 Quiet warnings about unused functions and variables.
Commented or '#if 0' these functions/variables and marked with
'UNUSED' comment so they can be restored in the future if needed.
2012-03-19 22:21:40 +00:00
c2c0597239 Fix #30594: UV editor transform tools did not show help/pivot line to indicate
transform center as it did in 2.49.
2012-03-19 17:21:46 +00:00
4f19c1a995 spelling cleanup 2012-03-18 07:38:51 +00:00
be7477c638 fix [#30542] Shear Vertical Seg Faults Blender
honor the T_FREE_CUSTOMDATA flag.
2012-03-15 00:57:14 +00:00
aedd4af57e code cleanup/bugfix uninitialized values
- edgebisect bmesh operator used uninialized beauty field.
- BLI_join_dirfile could read from before the string bounds when passed an empty dir string.
- pransform could use an uninitialized projected coordinate (unlikely but possible)
- RNA_property_path_from_ID_check would compare against an uninitialized pointer when the path wasn't found.

also have bmesh walker use BM_edge_other_vert() utility function.
2012-03-12 06:53:47 +00:00
b330abc290 remove Object member from BMesh struct - was only used for undo and BMEditMesh already stores an object pointer.
also fix for own mistake with mesh conversion refactor, shape key index was off by 1 when switching editmode.
2012-03-11 19:58:56 +00:00
4f7bdc59d3 style cleanup: spelling.
also remove large, duplicate comments from sunsky.h
2012-03-09 00:41:09 +00:00
081aa382ed fix
- access to a meshs editmesh before the pointer was checked to be a mesh.
- uninitialized memory use in transform (not a problem practically but nice to quiet the error in valgrind).
2012-03-08 01:22:49 +00:00
46045fbb09 style cleanup - braces & else / if's 2012-03-07 04:53:43 +00:00
31d2ee9bf7 style cleanup, brackets in else/if, some indentation. 2012-03-06 18:40:15 +00:00
3f04564724 Disable interpolation of customdata layers on edge slide
This option might be useful in some cases like keeping UV coordinated in kind of
"correct" state so sliding edge loop will also slide edges in UV. But for other
layers like shapekeys and vertex colors it's arguable it's actually needed.

The way it's currently done isn't actually acceptable because it doesn't take
flags like UVCALC_TRANSFORM_CORRECT into account and also makes extra unwanted
things like interpolating shapekeys which leads to propagating changes into
basis keys and also results with slide applied twice for relative keys because
offset is also applying on loading edit mesh.

Also discussed with Brecht who agreed with marking this things as TODO and
disabling for now.

This should fix issue reported in #30387: Edge Slide propogates to Basis Shape Key
2012-03-05 21:42:17 +00:00
a0ab2eefb9 * rename BM_face_other_loop --> BM_face_other_edge_loop
* optimize BM_face_other_edge_loop to do about half as many iterations for quad heavy meshes, with ngons the gain is much more since searching around the entire ngon when the edge already stores its loop is silly.
 ... also nicer in cases where edge has no face users it avoids a loop on all face corners.
2012-03-04 16:36:31 +00:00
76e9f91d1c switch arg order for BM_face_other_* funcs (make face come first), and add nice ascii art for BM_face_other_vert_loop since this stuff is hard to grasp as text. 2012-03-04 16:01:02 +00:00
f6ae27daef style cleanup - comment spelling + translate some dutch. 2012-03-04 04:35:12 +00:00
a2c182e923 style cleanup - use aligned * prefixed blocks for descriptive comments (was already used a lot and part of proposed style guide). 2012-03-03 16:31:46 +00:00
7bbf4b7831 style cleanup
- spelling - turns out we had tessellation spelt wrong all over.
- use \directive for doxy (not @directive)
- remove BLI_sparsemap.h - was from bmesh merge IIRC but entire file commented and not used.
2012-03-02 16:05:54 +00:00
ea13ec1699 Spelling Cleanup 2012-03-01 12:20:18 +00:00
1d5a3886a1 Fix crash on edge slide when object has got multires modifier
Issue was caused by fix for slide+automerge bug resulted in accessing to freed memory
from multires projection code. Solved by moving multires projection from cleanup callback
to special_aftertrans_update.

Patch by Antony Riakiotakis with some own corrections.
2012-03-01 07:10:45 +00:00
ed04c21374 code cleanup: use float vector size in function definitions, and const's where the values are unchanged. 2012-02-28 14:05:00 +00:00
d55c1d59f9 Fix: confirming edge slide with factor 0 and automerge turned on would delete the selected edges. Caused by automerging the edges with temporary geometry used for the operation, that was getting deleted later. Now deleting the temporary geometry before automerging. 2012-02-27 16:45:48 +00:00
130668b12f minor bmesh api naming edits. 2012-02-27 14:07:19 +00:00
d232815481 - swap arg order for BM_face_copy() boolean options.
- use edge example for BM_face_split().
2012-02-23 04:26:24 +00:00
c8b53d2aaf code style cleanup, no functional changes. 2012-02-23 02:23:42 +00:00
a368e6771a - remove some unused editmesh functions.
- copy & rename EditMesh stricts for use with scanfill (remove unused members)
2012-02-19 22:17:30 +00:00
5148828356 svn merge ^/trunk/blender -r44235:44250 2012-02-19 17:59:30 +00:00
02b28e9162 replace MIN2 / MAX2 with minf / maxf to avoid calling functions multiple times. 2012-02-19 05:11:24 +00:00
7be1cd733d more bmesh minor api cleanup
* remove BMO_elem_flag_* functions, since there are already defines for this.
* ifdef unused bevel functions.
* rename defines BMOP_ --> BMO_OP_
2012-02-13 02:42:50 +00:00
37ff2a291f BMesh api function naming.
`_set` suffix was used in two ways (confusing)
* to set a flag to be enabled.
* to set a value passed as an argument.

now use enable/disable rather then set/clear for functions which change flags.

also remove BME_weld.c, the file didnt contain much code and the current extrude works well
2012-02-12 18:43:59 +00:00
b6dcdb065d code refactor, function renaming for bmesh.
These changes are to make the bmesh api more consistent and easier to learn, grouping similar functions which is convenient for autocomplete.
This uses similar convention to RNA. 

* use face/loop/edge/vert as a prefix for functions.
* use 'elem' as a prefix too for functions that can take any type with a BMHeader.
* changed from camel case to underscore separated (like RNA).
2012-02-12 10:51:45 +00:00
8b43813b69 rename BM_ flags for BMHeader->hflag to BM_ELEM_ to be more clear that these flags apply to bmesh elements. 2012-02-12 06:24:12 +00:00
051cf6abf8 Style Cleanup:
replace 0/1 with TRUE/FALSE define.
2012-02-07 17:42:46 +00:00