Campbell Barton
b27854bd47
use booleans for bmesh api.
2013-01-14 16:42:43 +00:00
Campbell Barton
0c3e570868
remove CustomData_get_active_offset(), use CustomData_get_offset to return the active layer, matching CustomData_get()
2013-01-11 01:41:27 +00:00
Campbell Barton
c3c3df3aec
editmesh texface drawing, reuse customdata offset rather then looking up each UV and vertex color, gives overall ~9.5% drawing speedup in my tests.
...
was also doing NULL checks on UV's which are never NULL in this case.
2013-01-10 12:07:01 +00:00
Campbell Barton
ceb9701507
don't store bevel weights or edge crease customdata layers in editmode unless they are needed.
...
configurable in 'Geometry Data' panel, will be added when running crease edges transform for example.
2013-01-10 04:43:31 +00:00
Campbell Barton
97d1abfe95
speedup for editmesh getVert and getEdge, were doing 2x customdata layer lookups for crease and bevel weight, also make use of the existing meshdata array for lookups.
2013-01-09 18:20:11 +00:00
Campbell Barton
f0c1bc830c
add option to BLI_scanfill_calc() - BLI_SCANFILL_CALC_HOLES, gives some speedup for BMesh ngons which never have holes and ensures predictable triangle count (totvert - 2), which is needed for pre-calculating array size.
2012-12-27 06:39:27 +00:00
Campbell Barton
89364fd0fa
remove realloc's during BMEdit_RecalcTessellation(), instead use poly_to_tri_count() to calculate how many triangles are needed.
2012-12-27 04:18:22 +00:00
Campbell Barton
f576c281ba
speedup for face tessellation:
...
- quads, tris now use direct pointer access rather then iterators.
- for ngons also avoid iterator, just loop over the loops.
also minor change, use floorf rather then floor for ED_view3d_project_short_ex, ED_view3d_project_int_ex
2012-12-21 07:24:31 +00:00
Campbell Barton
a6bee579e9
move pbvh into BKE, it used many BKE bad level includes.
...
now blenlib/BLI doesn't depend on any blenkern/BKE functions,
there are still some bad level includes but these are only to access G.background and the blender version define.
2012-12-15 15:59:25 +00:00
Campbell Barton
cf723e5e7c
use htype flags as arguments to EDBM_index_arrays_init(), no functional changes.
2012-12-12 05:27:52 +00:00
Campbell Barton
0526fcf13f
revert part of r52720, Id rather leave these as-is, even if they give warnings under some configurations.
2012-12-03 08:11:04 +00:00
Bastien Montagne
818a345be3
Silent a bunch of gcc warnings (usually dummy, but noisy!).
2012-12-02 16:01:06 +00:00
Campbell Barton
f9e339ef00
fix/workaround [ #33281 ] script goes into not responding
...
scanfill remove-doubles pass assumes ordered edges (as with curves), otherwise it can hang.
workaround this problem by skipping removing-doubles for mesh ngons, since this isnt such a common case as it is with curves and we can just not support it.
2012-11-26 23:18:04 +00:00
Campbell Barton
f5d3e361ce
fix for missing NULL check in init_render_texture() (possibly own fault), also remove some redundant code.
2012-09-19 08:09:22 +00:00
Campbell Barton
e647c748fb
fix [ #32518 ] Vertex slide crash sometimes.
...
Undo would leave BMEditMesh->me pointer NULL, this would likely crash EDBM_verts_mirror_cache_begin() too.
Rather then restore 'me', remove the pointer altogether and use BMEditMesh->ob->data to save us having to keep track of 2 pointers.
2012-09-10 03:42:29 +00:00
Campbell Barton
2812dd92cf
code cleanup: use BMEdit_FromObject() rather then me->edit_btmesh in more places.
2012-09-10 03:34:43 +00:00
Campbell Barton
e9caa21830
fix own error in recent smoothview cleanup, also correct some cross references in bmesh docs.
2012-08-17 14:43:20 +00:00
Campbell Barton
1931aac1f7
style cleanup: (indentation)
2012-06-06 14:48:39 +00:00
Campbell Barton
b33f0ef0e3
style cleanup
2012-05-27 19:40:36 +00:00
Nicholas Bishop
417ac69320
Draw skin vertex roots in edit mode.
...
Roots are drawn with a view-oriented dashed red circle around the
vertex location. The circle's radius is the average if the skin
vertex's X and Y radii.
Skin modifier documentation:
http://wiki.blender.org/index.php/User:Nicholasbishop/SkinModifier
2012-05-22 15:29:27 +00:00
Campbell Barton
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
Campbell Barton
599d213115
style cleanup: line length and ensure some macros error when not ending with ';'
2012-05-17 07:59:25 +00:00
Campbell Barton
0f43da2234
style cleanup: macro line breaks
2012-05-13 16:05:10 +00:00
Campbell Barton
c8ebfe1d12
code cleanup:
...
- use bmesh iterator macros in more places
- rename scanfill variables (were using same names as mesh faces/verts which was confusing)
2012-05-13 14:47:53 +00:00
Campbell Barton
305d341ec2
code cleanup: use vector math function minmax_v3v3_v3() and other minor vector function edits.
2012-05-13 11:05:52 +00:00
Campbell Barton
cffaa42d3a
style cleanup: blenkernel
2012-05-12 19:18:02 +00:00
Campbell Barton
4c5502bfd6
code cleanup: function naming for BLI functions.
2012-05-05 00:23:55 +00:00
Jason Wilkins
a0ce240de9
Renamed "fake" OpenGL identifiers.
...
Any identifier that looks like an OpenGL identifier, but isn't, causes a false alarm by the glreport.py tool. Most of these were in comments so I just rephrased the comments. There were a couple of static functions/macros that were easy enough to rename. Only the glTexco and glIndex fields of the DMVertexAttribs struct was public and had non-local uses.
2012-05-04 11:50:11 +00:00
Campbell Barton
552a70f177
code cleanup:
...
- replace iterators with macros
- move vertexCos checks outside the for loops (use 2 for loops).
- style cleanup
2012-05-03 21:19:31 +00:00
Sergey Sharybin
fcb84663cd
Fix #31162 : Applying textures to rigged models causes crash and no textures in appear in edit mode
...
Issue was caused by doing stuff like binding textures from glBegin/glEnd block.
2012-05-01 15:59:28 +00:00
Campbell Barton
e701f9b670
style cleanup: whitespace / commas
2012-04-29 15:47:02 +00:00
Campbell Barton
ef054e165c
style cleanup: format 'for' loop macros the same as for loops, some renaming to BLI_array macros.
2012-04-28 15:14:16 +00:00
Campbell Barton
6701933f5c
style cleanup
2012-04-21 12:51:47 +00:00
Campbell Barton
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
Campbell Barton
75b869e428
style cleanup: BM_ITER / BM_ITER_INDEX / BMO_ITER
2012-04-19 11:44:12 +00:00
Brecht Van Lommel
e4734d3d01
Fix part of #30982 : dupliface object with modifiers did not show duplis correct
...
while in edit mode.
2012-04-17 13:07:13 +00:00
Brecht Van Lommel
3d2f1fd8f9
Fix crash with texture draw in edit mode after commit 45672.
...
Don't create empty tesselated faces layers in edit derivedmesh, these are
being created on the fly so this will conflicted, and use loop data for
opengl attributes for edit derivedmesh drawing.
2012-04-17 11:02:32 +00:00
Campbell Barton
195d6c1b1a
minor speedup for scanfill, dont calculate the normal if its already known - use for editmode ngon filling.
2012-04-16 18:24:49 +00:00
Campbell Barton
0635f8101c
make scanfill threadsafe (wasnt threadsafe before BMesh merge but before the merge it didn't need to be) - now rendering uses its better if its threadsafe.
2012-04-16 06:48:57 +00:00
Campbell Barton
79693e4543
code cleanup: avoid confusion with incorrectly named argument to BLI_edgefill(), was 'mat_nr', now 'do_quad_tri_speedup'
2012-04-16 05:03:04 +00:00
Campbell Barton
d89db25c53
bmesh api todo:
...
emDM_getTessFaceDataArray now returns UV's and Colors from editmode loops.
2012-04-16 04:17:33 +00:00
Campbell Barton
d5953568c8
use 'const float[3]' for derived mesh callback args.
2012-04-09 07:06:06 +00:00
Campbell Barton
a173508f49
converting a mesh to an undo mesh now skips using bmesh operator.
2012-03-29 03:06:42 +00:00
Campbell Barton
09f29c0b70
style/name cleanup: have EDBM_* functions match our style guide and also match BM_ function naming conventions
2012-03-27 04:46:52 +00:00
Campbell Barton
7ff77ed4ea
code cleanup: use zero_v3
2012-03-23 20:18:09 +00:00
Campbell Barton
303cecf139
spelling cleanup: tesselate -> tessellate (last of these found)
2012-03-20 22:56:26 +00:00
Campbell Barton
91580c0929
swap BMLoopCol r/b color, requires subversion bump.
...
old mesh MCol 'r' was blue, 'b' was red, but theres no reason to keep this for bmesh with MLoopCol.
Loading old files works, saving legacy format works too.
What wont work is loading a file after this revision and loading it in an older revision since the bmesh merge.
(it wont crash but the blue and red will be swapped on vertex color layers).
2012-03-17 20:39:28 +00:00
Campbell Barton
19400d418d
fix for debug assignment left in from own commit r44778
...
also removed private face normal update functions - they were same as public.
2012-03-11 15:27:08 +00:00
Campbell Barton
4f7bdc59d3
style cleanup: spelling.
...
also remove large, duplicate comments from sunsky.h
2012-03-09 00:41:09 +00:00
Nicholas Bishop
640b0adb98
Code cleanup: use named values for options in DerivedMesh drawing.
...
The DMSetDrawOptions[Tex] callbacks return 0 (skip), 1 (draw), or 2
(either stipple or skip mcols.) In the CDDM, EDDM, and CCGDM draw
functions, as well as the callbacks in drawmesh/drawobject, replace
these numbers with values from an enum, DMDrawOptions.
2012-03-08 06:47:05 +00:00