Commit Graph

176 Commits

Author SHA1 Message Date
781184562b add api calls for BM_mesh_active_vert/edge_get.
inspecting the edit-selection inline was cumbersome.
2013-06-24 04:51:56 +00:00
bc79e226ee de-duplicate ED_mesh_active_dvert_* functions.
not to devs - please don't just copy static functions around, make them api calls and add to headers.
2013-06-24 04:41:03 +00:00
bab2dacc6c removed unnecessary return statement 2013-06-15 09:53:59 +00:00
ef4db04da8 code cleanup: lots of calls to BKE_mesh_calc_normals_mapping were not using the mapping functionality.
replace ED_mesh_calc_normals with BKE_mesh_calc_normals().
2013-05-28 14:23:07 +00:00
ec8d277c64 BLI_math rename functions:
- mult_m4_m4m4 -> mul_m4_m4m4
- mult_m3_m3m4 -> mul_m3_m3m4

these temporary names were used to avoid problems when argument order was switched.
2013-05-26 18:36:25 +00:00
7a547e441b avoid customdata lookups for selection test/enable disable.
also add uvedit_face_select_set, uvedit_edge_select_set, uvedit_uv_select_set - since quite a few areas where setting based on a boolean.
2013-05-10 06:46:32 +00:00
4df0c46f83 Make freestyle use local Main for temporary objects
This means main database is no longer pollutes with
temporary scene and objects needed for freestyle
render.

Actually, there're few of separated temporary mains
now. Ideally it's better to use single one, but it's
not so much trivial to pass it to all classes. Not
so big deal actually.

Required some changes to blender kernel, to make it
possible to add object to a given main, also to
check on mesh materials for objects in given main.
This is all straightforward changes.

As an additional, solved issue with main database
being infinitely polluted with text blocks created
by create_lineset_handler function.

This fixes:
- #35003: Freestyle crashes if user expands objects in FRS1_Scene
- #35012: ctrl+f12 rendering crashes when using Freestyle
2013-04-18 08:58:21 +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
6d8e25dfdc code cleanup: split editmesh_tools.c, into inset, bevel (both modal operators) and moved extrude operators into their own file.
also move some selection operators from editmesh_tools.c into editmesh_select.c
2013-04-01 10:18:01 +00:00
790374d07d code cleanup: rename editmode functions so we have ED_object_editmode_load/enter/exit 2013-03-21 14:18:17 +00:00
e7c15beaf6 code cleanup: use booleans for mesh and selection code. 2013-03-19 23:17:44 +00:00
3dababa7ec code cleanup: name mesh functions more consistently, also use bools for mesh args. 2013-03-17 19:55:10 +00:00
ddddb7bab1 code cleanup: favor braces when blocks have mixed brace use. 2013-03-09 03:46:30 +00:00
67f38af415 fix for own regression - joining meshes didn't merge customdata flags (could loose crease/bevel weights). 2013-02-27 05:38:48 +00:00
20220d47e3 Dependency Graph: some refactoring which should have no user visible impact
besides performance in some cases.

* DAG_scene_sort is now removed and replaced by DAG_relations_tag_update in
  most cases. This will clear the dependency graph, and only rebuild it right
  before it's needed again when the scene is re-evaluated.

  This is done because DAG_scene_sort is slow when called many times from
  python operators. Further the scene argument is not needed because most
  operations can potentially affect more than the current scene.

* DAG_scene_relations_update will now rebuild the dependency graph if it's not
  there yet, and DAG_scene_relations_rebuild will force a rebuild for the rare
  cases that need it.

* Remove various places where ob->recalc was set manually. This should go
  through DAG_id_tag_update() in nearly all cases instead since this is now
  a fast operation. Also removed DAG_ids_flush_update that goes along with
  such manual tagging of ob->recalc.
2013-02-21 19:33:04 +00:00
d5d38ef0c7 Fix #34256: join a mesh with non-uniform scale with another mesh showed wrong
normals, they need to be recalculated then.
2013-02-15 12:08:01 +00:00
45681464e7 use foreachMappedVert for ED_mesh_pick_vert() 2012-12-23 02:32:03 +00:00
b3128cf406 minor speedup ED_mesh_pick_vert, ED_mesh_pick_face_vert
avoid matrix multiply, use len_manhattan_v2v2
2012-12-23 02:04:38 +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
b2c66e268f replace MIN/MAX 3,4 with inline functions 2012-12-21 05:07:26 +00:00
1f3e3b0d68 include cleanup 2012-12-19 04:49:32 +00:00
12ed0c64bc make use customdata typeoffset more, add an assert to ensure its to date. 2012-10-31 09:50:24 +00:00
c9dade4fe0 Big i18n commit: add "reports" from bmesh/readfile/tracking/dynapaint (and a few others), and another bunch of UI messages tweaks/fixes, as well as some BKE_report()<->BKE_reportf()... 2012-10-26 17:32:50 +00:00
53d4685c95 skip updating tessface customdata layers when joining meshes & clear tessface data on the target mesh so stale tessface data isnt used. 2012-10-25 08:48:05 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
b8267a0dfb More UI messages and BKE_reportf<->BKE_report fixes... 2012-10-18 16:25:58 +00:00
c3ca19800c refactor screen foreach functions to accept float[2] arguments rather then int pairs.
overall means less converting between float and int (and short in some cases).
2012-10-10 01:22:19 +00:00
ccd9f1491a style cleanup: line length,
rename V3D_PROJ_RET_SUCCESS ->  V3D_PROJ_RET_OK
2012-10-07 14:00:18 +00:00
5770e44f43 replace most uses of ED_view3d_project_float_noclip() with ED_view3d_project_float_global/object 2012-10-05 03:57:56 +00:00
fdf55bcf66 fix for crash joining objects with shape keys - own mistake when fixing another bug. 2012-09-23 23:30:01 +00:00
edb78d090c code cleanup:
- make view3d project names more consistent.
- remove apply_project_float() its not needed.
- update comments referencing an old function name.
- move doxygen docs into the C file, prefer they are kept here to avoid getting out of sync with code.
2012-09-20 04:56:24 +00:00
15ce5f95b3 joining mesh objects now keeps relative key setting of each keyblock. also joining absolute shapekeys now sorts by time. 2012-09-19 12:11:28 +00:00
0d5d2146eb code cleanup: make shape key api names consistent with our new convention. 2012-09-19 10:12:07 +00:00
6d76f140d0 fix [#31569] Shapekey w/ Driver - Shapekey Influences Disappears After Going to Edit Mode
joining meshes would allow shape key UID's not to be unique.
This was caused by join adding new key blocks inline, now use add_keyblock() like everywhere else does.
2012-09-18 14:29:01 +00:00
a4ff2b9140 code cleanup: warnings 2012-09-18 03:15:12 +00:00
7a71f58af3 fixes for NULL checks, remove some redundant checks and add some in that have been removed by accident as code has been updated. 2012-09-14 06:17:14 +00:00
acfff7a65f fixes for weight paint mode:
- sample weight didnt work when the object was transformed.
- sample weight didnt work when vertex selection was enabled.
- 'All faces' option is used by weight paint mode, but there was no UI access.

add ED_mesh_pick_face_vert(). which uses the face selection buffer but returns the closest vertex.
2012-09-07 05:54:54 +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
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
aca97317af code cleanup: move vertex and face picking functions into meshtools.c 2012-09-06 23:50:28 +00:00
62a73381a7 use fabsf when using floats. 2012-07-21 15:27:40 +00:00
cfb7aee017 style cleanup 2012-07-07 22:51:57 +00:00
9beef7442c style cleanup: also some spelling correction. 2012-06-27 05:59:41 +00:00
ac9344de75 Fixes for modifier data in multi-user meshes.
When removing a skin or multires modifier, it skips deletion of the
associated CustomData layer if the object has any other modifiers of
that type. This check has been extended to all objects that use the
object's data.

Similarly, deleting higher multires levels and multires subdivision
will not update the maximum level of any other multires modifiers on
objects that link to the same mesh.

Note that modifier_apply_obdata() doesn't need any changes as it
does not allow applying to multi-user data.

Object joining has also been modified to synchronize multires levels
objects that share a mesh. This is needed because joining can
subdivide or delete levels in order to match the maximum level of the
join-from object to the join-to object.

Fixes bug [#31880] instance multiresolution modifier error.
http://projects.blender.org/tracker/index.php?func=detail&aid=31880&group_id=9&atid=498

Reviewed by Sergey:
http://codereview.appspot.com/6332047/
2012-06-24 20:18:32 +00:00
1a625d1416 code cleanup: use const float's where possible and specify vector size. 2012-06-12 23:19:52 +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
a731e13043 code cleanup: function naming, use BKE_*type* prefix. 2012-05-05 14:03:12 +00:00
a5af5e8f50 style cleanup: re - http://wiki.blender.org/index.php/Dev:Doc/CodeStyle#Braces_with_Macros 2012-04-30 16:22:40 +00:00
343edf2722 style cleanup: function calls & whitespace. 2012-04-29 17:11:40 +00:00
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