Commit Graph

1537 Commits

Author SHA1 Message Date
5123238f7d BMesh-py attributes (readonly):
* is_valid (all types)
* is_wire (verts/edges)
* is_boundry (edge only)
* is_manifold (verts/edges)

also corrected own error, missed updating BMesh operator formatting char (broke erase only-faces)
2012-02-22 12:28:32 +00:00
c7185d2652 Stitch tool fully functional again. Many thanks to Howard Trickey for proposing the loop winding criterion for normal disambiguation of edges. Unfortunately some extra memory has to be allocated for this to work correctly. If the tool had been initially written for bmesh I would have used the already present adjacency information to make it work, avoiding some extra allocations. Maybe a project for another day though, when I am more proficient with bmesh internals. 2012-02-22 00:06:15 +00:00
a4e6967323 change UvElement to directly use BMLoop * instead of tfindex. This saves quite some lookups on uv sculpting and stitching. Based on BMESH todo by Campbell, thanks for the idea! 2012-02-21 19:41:38 +00:00
3bcca01c24 Another fix for using boolean slot as integer. This time in dissolve operator. 2012-02-20 15:58:01 +00:00
1953f042e6 added boolean type for bmesh operators, will make python wrapping clearer and also makes existing calls more obvious.
also corrected some error reports.
2012-02-20 01:52:35 +00:00
818e19713a fix [#30266] B-Mesh: Issue with Weight Painting
thanks to Nicholas Bishop for finding the cause of the problem.


don't tesselate on load, this means me->mface will be NULL by default.

we may need to have this set if existing uses of this array are not resolved before release - so add a define USE_TESSFACE_DEFAULT, to change this easily.


this is a rather indirect fix - need to take care here.
2012-02-20 00:18:35 +00:00
40c59b1a3d minor edits to have the game engine and player building. 2012-02-19 23:36:10 +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
56e41a3ef0 B-Mesh:
* Remove Doubles was missing the info how many vertices were removed, added that back.
2012-02-19 20:29:04 +00:00
0fd176e03d moved select interior faces into a C function (was python) 2012-02-19 20:27:30 +00:00
4504ac27a6 remove more unused files. 2012-02-19 19:32:41 +00:00
fd89fa15c5 sync some changes with trunk and rename bmeshutils.c 2012-02-19 17:11:40 +00:00
eee22fe2f6 rebane files to match trunk. 2012-02-19 16:54:53 +00:00
2fd4877c76 minor bmesh api changes.
- use SMOOTH flag for edges (removed sharp flag and inverted), gives us an extra flag slot available.
- rename BM_edge_is_nonmanifold --> BM_edge_is_manifold and invert result, BM_vert_is_nonmanifold too.
2012-02-18 11:44:30 +00:00
a677e016d6 remove function for testing selection (was only used in a few places) 2012-02-17 21:49:24 +00:00
3e78832dea remove OBJ export, better rely on the python exporter. 2012-02-17 21:37:16 +00:00
48006292d8 svn merge ^/trunk/blender -r44189:44204 2012-02-17 20:56:25 +00:00
61596d5bb3 patch [#30227] Various MSVC (32-bit) Warning and Typo Fixes
made some small edits
- removed changes to AVI reading since the data types are apart of the format spec.
- absf -> abs for a double value in render code.
2012-02-17 19:21:47 +00:00
2b7ca2304a unify include guard defines, __$FILENAME__
without the underscores these clogged up the namespace for autocompleation which was annoying.
2012-02-17 18:59:41 +00:00
02987fd5e1 fix [#30220] Knife Tool Leaks memory
both crash and leak are fixed now.
2012-02-17 05:33:23 +00:00
8a2bf0ba54 fix [#30220] Knife Tool Crashes Blender
though there is still a memory leak, but it looks like the leak may be in BLI_smallhash.c, not knife code.
2012-02-17 02:06:30 +00:00
19d47c0efd fix [#30208] Bmesh Edit Mode: Add Primitive keeps old verts selected.
cone depth was also incorrectly defaulting to 1.0
2012-02-16 19:33:46 +00:00
0e3537e374 fix [#30141] Add primitive sets only the default name "Mesh" 2012-02-16 19:13:04 +00:00
49ab580143 more knit-picky memory saving
don't store a flag array, (or pointer to a flag array) per BMLoop.
saves 4 pointers per quad - obviously, so this can add up a bit.
2012-02-16 16:44:10 +00:00
5fe525a6f6 style cleanup for code relating to BMLoop next/prev checks. 2012-02-16 09:44:22 +00:00
bc6bbcccc9 went over all uses of mesh->mface and added BMESH_TODO comments for
areas that need to be updated.
2012-02-15 14:39:18 +00:00
1eb48de199 fix [#30186] Crash in execute the "Operator Cheat Sheet" 2012-02-15 12:39:18 +00:00
beea6a4a17 bring back stitchability indicator, this can work even now 2012-02-14 00:55:01 +00:00
a9c6f553e7 Initial port of stitch operator for bmesh.
*operator now works with few limitations:

-still no preview(will be back soon)
-rotation will not work if only one uv is stitched between islands(will need method to calculate uv normal for manifold)

Also fixed island calculation for UvElements, fixes a crash when uv sculpting with "Sculpt all islands" turned off
2012-02-14 00:35:29 +00:00
cf0967bfe6 Code cleanup: add and use knife list utility functions
In preparation for code in progress that uses lists
allocated out of the knife arena.  This also makes
existing code more readable and understandable IMO.

Also removed an #if'd out function that will not
ever be needed.
2012-02-13 14:45:17 +00:00
cde2f11244 new bmesh tool - limited dissolve.
This is a kind of simplification/cleanup tool which joins adjacent faces and edges based on the angle.

I've written this as an exercise (since I havnt written a bmesh operator before), and because quite a few users were asking for the dissolve operator to be extended, but I think this kind of functionality needs its own operator.

access from specials menu and mesh menu.

notes
* this exposed a bug in angle_v3v3v3(). will merge fix into trunk after release.
* added utility function BM_vert_edge_angle(), to get the angle between 2 connecting edges of a vert.
2012-02-13 14:37:07 +00:00
db173f6ef8 Minor API Edits.
added BM_mesh_elem_flag_enable_all (only had disable function), and add
argunt for vert/edge/face type.

use these functions from EDBM_flag_enable/disable_all (had duplicate
code).
2012-02-13 06:59:25 +00:00
7d18115e14 own error - mixup with BMO_slot_mat_get/set 2012-02-13 05:59:14 +00:00
cf0aeddfc9 marked navmesh as BMESH_TODO, mixed mface/mpoly functions were being used for navmesh too, now editing funcs use polygons only. 2012-02-13 04:52:41 +00:00
2d1a05874b svn merge ^/trunk/blender -r44024:44076 2012-02-13 04:14:35 +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
992087a0de api name conventions, more minor changes: flag set/clear --> enable/disable 2012-02-12 19:18:30 +00:00
59d45d0ea6 * remove the MFace parts of join (we only need polygon data)
* other minor cleanups
2012-02-12 19:11:09 +00:00
5b2ea6f8a4 remove bm_get_cd_float, use CustomData_bmesh_get instead, this function only casts to a float, and doesnt simplify args. 2012-02-12 18:49:56 +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
9a92cd8008 bmesh minor refactor
* add DM_to_bmesh_ex, DM_to_bmesh for converting a derived mesh to a BMesh (rather than a BMEditMesh)
* have a generic variable for allocsize: bm_mesh_allocsize_default, rather than copying the values about.
2012-02-12 17:44:10 +00:00
2fcb6d058e style cleanup for bmesh headers
- use consistant header guards
- correct doxy comments
- remove ED_toolmode.h (unused)
2012-02-12 14:40:08 +00:00
6afa4da928 Fix #30152: Several drag and drop of image on mesh crashes
Issue was caused by making and loading editMesh in drop_named_image_invoke,
which lead to freeing/changing pointers used by CustomData layers. Some of
this pointers might be used by DerivedMesh, so we need to update DerivedMesh
after loading EditMesh.
2012-02-12 11:21:35 +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
025b10f7f2 correct bad level include. 2012-02-11 10:56:07 +00:00
83a8f4c19e another include cleanup 2012-02-11 10:50:48 +00:00
1dc3536268 mode bmesh include cleanup, remove unused file too. 2012-02-11 10:15:11 +00:00
acd568d751 include cleanup 2012-02-11 08:46:56 +00:00
91390b712a GPL Header Cleanup 2012-02-11 04:16:17 +00:00