Commit Graph

149 Commits

Author SHA1 Message Date
bf462149a6 BLI_bitmap: rename macros
- BLI_BITMAP_SET -> BLI_BITMAP_ENABLE
- BLI_BITMAP_CLEAR -> BLI_BITMAP_DISABLE
- BLI_BITMAP_GET -> BLI_BITMAP_TEST
- BLI_BITMAP_MODIFY -> BLI_BITMAP_SET
2014-06-14 00:47:12 +10:00
4ca67869cc Code cleanup: remove unused includes
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-05-01 04:47:51 +10:00
c67bd49e56 Code cleanup: use 'const' for arrays (editors) 2014-04-27 00:25:15 +10:00
3264461598 move bmesh array lookup data and utility functions from editmesh into bmesh,
since enough bmesh operations can also take advantage of direct index lookups on verts/edges/faces.

developers note:
- EDBM_index_arrays_init/ensure/free -> BM_mesh_elem_table_ensure/init/free
- EDBM_vert/edge/face_at_index -> BM_vert/edge/face_at_index
- EDBM_uv_element_map_create/free -> BM_uv_element_map_create/free
- ED_uv_element_get -> BM_uv_element_get
2013-10-28 02:05:33 +00:00
a4f12a3e31 fix [#36697] Topology mirror causes vertices to jump?
don't give up too early finding unique geometry by keeping track of edges with matching vertex hashes and keep checking for unique topology as long as the total of these edges keeps increasing.
2013-09-11 02:36:37 +00:00
a75702b467 code cleanup: remove duplicate checks 2013-08-03 16:55:49 +00:00
04ea8c0ee8 remove the pointer from BLI_bitmap's typedef,
hides that an arg passed is really an array which may be modified by other functions.
2013-07-22 23:20:48 +00:00
80738a1828 add checks in paintface_flush_flags for faces which have no original index values. (could give out of bounds writes) 2013-07-09 08:25:30 +00:00
6d9de6a72b fix [#35975] "Select Linked" = "Select All" in Weight Paint mode?
looks like this was broken since bmesh merge.
2013-07-03 09:53:06 +00:00
418011907c remove nan copyrights from code added since blender become opensource (copy paste errors), also remove BKE_script.h 2013-07-02 10:14:59 +00:00
a7858767f4 fix [#35858] Weight Paint: Hiding faces isnt flushing the flag to the vertices. 2013-06-26 02:47:56 +00:00
6a60bf2f03 Added support for Vertex Weight panel in weight Paint Mode 2013-06-15 10:18:16 +00:00
860fce4eb9 Code cleanup: removed some unused UI button types
* CHARTAB: not needed anymore with improved copy/paste support and text input.
* IDPOIN: replaced by SEARCH_MENU.
* ICONROW/ICONTEXTROW: replaced by RNA enums.
* NUMABS: can use min/max limits instead.
* BUT_TOGDUAL, TOG3, TOGR, SLI: not used in 2.5 interface.
2013-06-09 18:05:50 +00:00
7c97a95911 improve topology mirror, increase chance of finding unique match. 2013-05-29 01:21:49 +00:00
319036f2d5 fix [#35026] Curve build modifier 2013-04-22 12:00:37 +00:00
6da961775f code cleanup: rename BKE_tessmesh -> BKE_editmesh, rename EditDerivedBMesh.tc -> em. ('tc' is odd name which isn't used elsewhere). 2013-04-13 20:31:52 +00:00
1c3c4f3954 code cleanup: use bool's for vgroup and editmode. 2013-04-05 14:58:30 +00:00
e7c15beaf6 code cleanup: use booleans for mesh and selection code. 2013-03-19 23:17:44 +00:00
8a4a034325 patch [#34634] Select vertices without a group
from Kevin Mackay (yakca)
2013-03-16 16:11:50 +00:00
2d21e6521f Fix: multisample viewport drawing didn't work well with selection or particle
brushes, due to issues with color coded drawing or slow/buggy reading from such
a buffer on some systems.

In case multisample is enabled now, it uses an offscreen buffer for such drawing,
which is not multisampled and so should not cause issues. This does mean there is
some extra GPU memory usage when multisample is enabled, and we could optimize
triple buffer to work together here somehow to share buffers, but it's better than
having selection not working.
2013-03-15 19:56:33 +00:00
aaa8a13c49 code cleanup: use const events for modal and invoke operators. 2013-03-13 09:03:46 +00:00
ddddb7bab1 code cleanup: favor braces when blocks have mixed brace use. 2013-03-09 03:46:30 +00:00
1810913f81 fix for bmesh regression similar to last revision r54920. only effected loading old blend files without edge data. 2013-02-28 04:18:01 +00:00
d17c13d145 fix for regression since BMesh merge, selecting linked faces in face-mask mode was using an incorrect lookup on loops which made select-linked fail 2013-02-28 03:39:41 +00:00
04d628a5b5 Another huge bunch of new UI translations (some reported by Leon Cheung, thanks!)... 2013-02-19 15:45:56 +00:00
1692f17c9b fix for long standing annoyance with weight-paint mode selection.
There was no selection flushing when faces or verts were selected, this allowed incorrect selection states like selected face with unselected vertices.

add flush commands to paintface_flush_flags() and paintvert_flush_flags()
2013-01-01 13:08:07 +00:00
0ac66ada2d initial support for 'occlude background geometry' in weight paint mode.
Only support mouse vertex select at the moment.
2012-12-23 01:54:11 +00:00
1f3e3b0d68 include cleanup 2012-12-19 04:49:32 +00:00
44b634bcb1 make EDBM_index_arrays's stay in memory, blender was allocating an array and filling it for verts/edges/faces on every redraw.
this may introduce bugs which I didn't catch, but they are very easy to identify in a debug build which has asserts to ensure the arrays are valid before use.

in my own test drawing ~98,304 quads - this gave an overall ~16% drawing speedup.
2012-12-12 06:53:39 +00:00
cf723e5e7c use htype flags as arguments to EDBM_index_arrays_init(), no functional changes. 2012-12-12 05:27:52 +00:00
00acdb6292 remove CD_POLYINDEX customdata layer:
reported as [#29376] BMESH_TODO: remove tessface CD_ORIGINDEX layer

for a single mesh there could be 3 origindex mappings stored, one on the polygons and 2 on the tessfaces.
(CD_POLYINDEX and CD_ORIGINDEX).

as Andrew suggests, now tessfaces (which are really a cache of polygons), using origindex to point to polygons on
the same derived mesh, and polygons only store the original index values.
2012-10-30 19:20:17 +00:00
e8872a8ea2 style cleanup: if(); 2012-10-07 09:48:59 +00:00
872cc0c4c0 Kind of cleanup of "menu strings": always have a space between the entry's label and value (these strings are a nightmare to handle in RTL languages like arabic or persian, but a bit less of a nightmare this way ;) ). 2012-10-04 13:59:14 +00:00
232571c61a code cleanup: replace macro for BLI_rect size/center with inline functions. 2012-09-15 11:48:20 +00:00
aa2d84da37 style cleanup:
also remove some redundant conversions int -> short -> int
2012-09-09 00:00:21 +00:00
704c5f09b5 remove makeDerivedMesh from ED_mesh_pick_face(), this was added 44256 (bmesh merge), but is pretty bad (rebuilding entire derived mesh to pick a face), tested with subsurf modifier, sintel mesh - it works ok without it.
Also - other select modes like border-select dont do this, so looks safe to disable.
2012-09-07 00:58:00 +00:00
aca97317af code cleanup: move vertex and face picking functions into meshtools.c 2012-09-06 23:50:28 +00:00
77f47799dd code cleanup: use BLI_RCT_SIZE macro 2012-08-20 23:06:17 +00:00
c567cf3fab code cleanup: WM naming conventions 2012-08-11 21:35:24 +00:00
0b5a995cfd code cleanup: rename G.rt to G.debug_value 2012-08-08 18:21:54 +00:00
84bf3e48c0 style cleanup: use c style comments in C code 2012-07-06 23:56:59 +00:00
19e1d05461 Modifications to the view3d.select() operator:
1. Two new boolean options have been added to the operator: "deselect"
   and "toggle".
2. The previous behavior of "extend" (toggling the selection) has
   been moved to the "toggle" option.
3. "extend" now only extends the selection, it never deselects.
4. "deselect" is pretty self-explanatory: it deselects (i.e. opposite
   of extend).
5. The built-in keymap has been changed to use "toggle" where
   "extend" was used before for this operator, to maintain the
   previous behavior in the default keymap.

In short, this works towards making "extend" and "deselect" fully
consistent across all selection tools (adding to and removing from
selection, respectively), but still preserves the old behavior
as well.

(Patch reviewed by Brecht.)
2012-05-24 21:05:27 +00:00
3896ad4cbb code cleanup: spelling 2012-05-20 21:23:26 +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
305d341ec2 code cleanup: use vector math function minmax_v3v3_v3() and other minor vector function edits. 2012-05-13 11:05:52 +00:00
1dccd4c98a code cleanup: naming - pose/armature/image
also use ..._find_name(..., name) rather then ..._find_named(..., name) --- both were used.
2012-05-05 16:03:57 +00:00
950ed69297 code cleanup:
- replace inline face UV center calc.
- use const float[3] for mesh and uv functions.
- remove unused define
2012-04-28 08:29:20 +00:00
6701933f5c style cleanup 2012-04-21 12:51:47 +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