Commit Graph

190 Commits

Author SHA1 Message Date
48639af5f8 use input and output slots for bmesh operators, needed for the python api to get return values. 2012-11-19 14:58:31 +00:00
ffd98941b5 Support for connected style proportional editing in UV editor. Now when connected proportional editing is on, only UVs on the same island will be proportionally moved. The implementation simply rejects UVs whose island does not belong to islands of selected vertices and decrements the total count of transform elements appropriately. Memory usage could be better but it would require some more preprocessing. 2012-10-22 07:29:38 +00:00
ad3f01e1d8 fix/workaround [#31811] Subdivision Surface (Apply modifier to editing cage during Editmode) Loop Cut Crash
A correct fix for this bug likely involves changuing how operators are called in the event loop but such changes better not be made just before the release.
2012-09-28 11:02:43 +00:00
0d5d2146eb code cleanup: make shape key api names consistent with our new convention. 2012-09-19 10:12:07 +00:00
d1cde59ed3 fix [#32442] UNDO causes actual shape key to be lost, undoing a modification of another shape key. 2012-09-17 06:14:09 +00:00
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
04418fe8dd code cleanup: header had many incorrect sections for function/file, also rename mouse_mesh() --> EDBM_select_pick() 2012-09-07 00:22:10 +00:00
fe9b1c644f Fix #32458: changing UV image in image editor not working when the active face
was not selected. Now changed it so that the active face must also have its
UVs shown in the image editor to be used as the source of the image shown.
2012-08-31 15:01:40 +00:00
dfd54c61d1 Possible fix for #32446: after undo in mesh edit mode, vertex/edge/face
selection syncing would not work correct, in this case deselecting an edge
would deselect the two vertices even if it wasn't needed.
2012-08-30 14:18:14 +00:00
90d215535e add option so operators can be called with a flag, currently the only flag is to respect hidden geometry.
this is useful for bmesh tools that operate in object mode or for modifiers which would previously use hidden faces in some cases.
2012-07-21 00:58:02 +00:00
c8db1e832d minor edits for bmesh api 2012-07-20 09:49:54 +00:00
69a7e0af02 rename bmesh ops since they are exposed in an api now. 2012-06-30 15:27:13 +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
c91cee2bb9 code cleanup: naming - BKE_mesh_* 2012-05-05 21:28:12 +00:00
a731e13043 code cleanup: function naming, use BKE_*type* prefix. 2012-05-05 14:03:12 +00:00
5da2135eef code cleanup: double promotion & some style cleanup 2012-05-03 21:35:04 +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
47b6b60e5a code cleanup: no functional change - had both EDBM_editselection_* and BM_editselection_* funcs, replace EDBM_ funcs. 2012-04-24 21:19:18 +00:00
8baa5fbde2 - fix for python freeing its own bmesh clearing the global mirror cache.
- fix for own mistake (Ctrl+T didnt set beauty peroperty).
- remove bad level includes in bmesh.
2012-04-23 04:24:11 +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
3ef7943910 code cleanup: first step to replace BM_ITER BM_ITER_INDEX macros. 2012-04-19 12:45:56 +00:00
75b869e428 style cleanup: BM_ITER / BM_ITER_INDEX / BMO_ITER 2012-04-19 11:44:12 +00:00
34814e4755 Port multires_topology_changed to new bmesh api
This call is still needed when loading editmesh because some operations
are not creating CD layer for new loops (like crating new face) and
to prevent loosing all sculpted data when running disps correct
displacement maps should be allocated on loading edit mesh.
2012-04-16 11:03:42 +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
e9358a3806 bmesh api changes:
- remove recently added BM_mesh_select_flush_strip(), functions purpose wasn't clear.
- add BM_mesh_elem_hflag_disable_test(), BM_mesh_elem_hflag_enable_test()
  to match existing BM_mesh_elem_hflag_enable/disable_all(), these take a hflag to test before editing each element.
  This replaces the need for BM_mesh_select_flush_strip().
2012-04-13 04:02:26 +00:00
f5bb4635c6 fix [#30852] Wrong Material ID applied for the new faces 2012-04-09 05:17:07 +00:00
817a407a62 patch [#30779] Multiselect mode cause inconsistent selection growing
from Francisco De La Cruz (xercesblue)

The test to use faces was incorrect since mixed vertex and edge mode would be treated as faces.

made own minor change.
2012-04-03 02:46:44 +00:00
4253e52771 fix [#30768] Project from View UV map tool includes hidden geometry r45323
select all could select hidden faces, now BM_mesh_elem_flag_enable/disable_all takes an argument to skip hidden elements.
2012-04-02 04:45:44 +00:00
e0d94b7244 minor speedup converting a BMesh to a Mesh - avoid loop over all faces to count how many loops to use, since BMesh stores totloop.
also use camel case for UndoMesh (convention)
2012-03-30 06:45:13 +00:00
7b60ebf398 fix for unhiding faces showing invalid normals. 2012-03-30 01:11:11 +00:00
a173508f49 converting a mesh to an undo mesh now skips using bmesh operator. 2012-03-29 03:06:42 +00:00
42076f0a1f skip using bmesh operators for converting to/from undo meshes (gives some speedup) 2012-03-29 01:41:56 +00:00
5f0ef4435c fix [#30699] blender crashes when dissolving faces
thanks to Francisco De La Cruz for investigating and providing fix.
2012-03-28 06:44:19 +00:00
fc7624a6be fix for undoMesh_to_editbtMesh not setting BMEditMesh.ob field.
error found by XercesBlue on IRC
2012-03-27 04:54:52 +00:00
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
f83a93e454 bmesh todo, unlikly but possible - entering editmode with faces and no polys.
rather then printing a warning and failing - convert them to polys.
2012-03-27 01:28:25 +00:00
ca05219f3e fix [#30651] bpy.ops.object.mode_set(...) editmode removes faces.
problem was that BMesh had tessellation call when undo pushes were called.

if python called an operator with no undo push, tessfaces would not be created.

fix this by making it the responsibility of each editmesh operator to re-tessellate, as it is with notifiers and depsgraph.
added EDBM_update_generic() function to add notifier, tag for depsgraph update and optionally re-tessellate.
2012-03-27 00:01:35 +00:00
48f0444760 style cleanup: editors/mesh - mostly whitespace around operators 2012-03-26 02:56:48 +00:00
0c898514f0 code cleanup: bmesh_ source files in our editor dir, they are the same as other editmesh_ files. 2012-03-24 00:20:36 +00:00