Commit Graph

294 Commits

Author SHA1 Message Date
f8bc346eff bmesh/py operator api:
add type checking for element buffers, there was nothing stopping python from passing any element type into an argument when in some cases only verts/edges/faces were expected.
now operator args define which types they support.
2012-11-27 00:50:59 +00:00
cf2c459325 Fix #33285: loop cut is not supposed to cut through triangles/ngons, but it
still happened  when the loop would go all the way around the mesh with just one
triangle/ngon inbetween to close the loop.
2012-11-26 06:59:59 +00:00
7ecf054295 Bevel: allow page up / page down shortcuts for segments in addition to mousewheel. 2012-11-26 06:59:50 +00:00
e77e1f183a fix for uninitialized memory use with numeric input:
bevel/inset/marker-move would use uninitialized memory when used as modal operators and pressing backspace after entering values.
2012-11-26 03:47:20 +00:00
3d64381e4d use more rigid type checking for bmesh slot subtypes. 2012-11-26 03:16:29 +00:00
8be86d3254 use a search popup for 'blend from shape' tool, suggested by Juan Pablo.
use standard operator panel, since the popup was too easy to cancel by accident, especially with a popup search menu.
2012-11-24 05:38:20 +00:00
f5bf63dc96 Fix #33277: vertex merge would merge UVs by default, disabled that now by again
like it did before bmesh.

Neither method is perfect, ideally it should do smart detection of UV islands
but without that it's better to disable because it is more difficult to recover
from incorrectly merged UVs than ones that were not merged.
2012-11-23 19:10:56 +00:00
7189a9db51 Fix bevel crash in OSX debug build.
Code to select from output slot moved before
EDBM_op_finish, which frees slot buffers.
2012-11-23 03:15:16 +00:00
ebaf1306b8 bmesh operator api:
avoid per vert/edge/face string lookups in BMO_slot_map_* functions --- used in array modifier, subdivide, remove doubles and other tools.
2012-11-20 13:29:27 +00:00
dbdc76c9d0 code cleanup: make bmesh operator names more consistant since python has access to these as input arguments and return values.
all output values currently have ".out" suffix, this may go in the future, but for now it makes it clear in C code what are inputs and outputs.
2012-11-20 05:50:19 +00:00
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
185cf6095e improvements to bevel
- the resulting selection is now correct

internal details
- bev_rebuild_polygon() now only rebuilds polygons that are attached to a bevel vertex (was rebuilding ALL).
  ... need to take care we don't leave faces pointing to removed geometry, so far this works fine.

-  bev_rebuild_polygon() uses stack memory for <32 size ngons to reduce allocs.

- skip hash lookup when removing bevel verts (use tag instead).
2012-11-19 02:26:59 +00:00
a9af563526 bmesh: lazy initialize bmesh tool flag pool, has the advantage that modifiers that dont use bmesh operators can skip allocating it. 2012-11-18 12:14:22 +00:00
4cd129bb50 fix for the update issue reported in [#32452]
When blending shape key, opening the popup didnt execute anything - making it so pressing a button would update the result even if the value didnt change.
2012-11-14 06:13:42 +00:00
ebde2d579a each different remove doubles function used a different property name, use 'threshold' for all now. 2012-11-14 03:13:51 +00:00
5ebe7d6a13 Bevel: patch from Thomas Beck fixes numeric offset input and adds wheel input for number of segments. 2012-11-10 13:59:45 +00:00
2bb174cfa4 style cleanup: indentation 2012-11-09 09:33:28 +00:00
da4441f7c5 Merge gsoc Bevel (with rounding) into trunk. 2012-11-08 15:12:21 +00:00
53160bd508 minor edits to mesh operators
- Rename 'mesh.select_nth' operator menu item 'Every N Number of Verts' to 'Checker Deselect',
  since its not just de-selecting verts (works on edges and faces too) and the term 'checker' gives a better description of the result.

- Rename 'mesh.select_by_number_vertices' to 'mesh.select_face_by_sides', since this is a face selection tool, which wasnt obvious from its name.

also remove dissolve by type menu since the option has been removed from the operator and was giving an error.
2012-11-01 05:07:15 +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
c93978d445 code cleanup: some edits for unused vars in recent smooth addition and some style edits. 2012-10-24 11:31:57 +00:00
3ce334e188 Merge GSoC project from branch: Laplacian Smooth (Operator & Modifier)
by Alexander Pinzon Fernandez (apinzonf)

Supported by Google Summer of Code 2012

Project Documentation:
http://wiki.blender.org/index.php/User:Apinzonf

Manual Page:
http://wiki.blender.org/index.php/User:Apinzonf/Doc:2.6/Manual/Modifiers/Deform/Laplacian_Smooth
2012-10-24 10:39:11 +00:00
1dadd3b7c6 Partially replace convex hull implementation with Bullet implementation
* Bullet's convex hull implementation is significantly more robust
  than the one I implemented, as well as being faster.

* This fixes bug [#32864] "Convex Hull fails in some cases."
  projects.blender.org/tracker/?func=detail&aid=32864&group_id=9&atid=498

  That bug, and others like it, relate to the poor handling of
  co-planar surfaces in the input. Pretty much any model that is
  simple-subdivided a few times gave very bad results before, Bullet's
  implementation handles this much better.

* In order to ensure a smooth transition, the Bullet output is
  translated into the existing HullTriangle hash structure. This makes
  it easy to ensure that the existing slot output stays the same; the
  interactions between the slots are somewhat complicated, detangling
  is a TODO.

* Reviewed by Brecht:
  https://codereview.appspot.com/6741063
2012-10-23 23:54:15 +00:00
f70d2c65d8 rename api functions...
- minf, maxf, mini, maxi --> min_ff, max_ff, min_ii, max_ii
2012-10-23 13:28:22 +00:00
a82af0d220 add option to planar decimator to collapse all verts that define face boundries (verts that 2 faces share and have 2 edge users).
avoids ugly stepping between faces when applying on curves surfaces. (but less useful for architectural style models)
2012-10-23 06:13:56 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
c56a911cd9 style cleanup: comments 2012-10-20 20:20:02 +00:00
9f8070d047 code cleanup:
- define array sizes for functions that take vectors.
- quiet some -Wshadow warnings.
- some copy/paste error in readfile.c made it set the same particle recalc flag twice.
2012-10-20 08:02:18 +00:00
f72f1dca6c More UI messages fixes and tweaks, BKE_report<->BKE_reportf, and stuff to translate... 2012-10-19 16:43:10 +00:00
3a41ab73ff fix for some issues with modal mesh tool interaction.
When inset and bevel used the mouse input as a distance value, the change could be far too great when zoomed in, or far too small when zoomed out. Now get the pixel-size based on the center point of the selection.
2012-10-19 12:45:31 +00:00
12a8c19956 un-subdivide bmesh operator, useful for making lower polygon versions of models, can give nicer results then edge collapsing which tends to give a lot of sharp triangles.
works on edges and faces, has iteration option to further reduce the poly count.

access from the edge menu, under subdivide.

example: http://www.graphicall.org/ftp/ideasman42/bmesh_unsubdivide.png
2012-10-16 16:04:12 +00:00
af6abc8c80 MESH_OT_vert_connect was missing select flush (newly created edges were not selected).
also <120 line length for cycles property descriptions.
2012-10-16 03:21:22 +00:00
1de76baf88 Add BMesh and WM symmetrize operators
* The symmetrize operation makes the input mesh elements symmetrical,
  but unlike mirroring it only copies in one direction. The edges and
  faces that cross the plane of symmetry are split as needed to
  enforce symmetry.

* The symmetrize operator can be controlled with the "direction"
  property, which combines the choices of symmetry plane and
  positive-negative/negative-positive. The enum for this is
  BMO_SymmDirection.

* Added menu items in the top-level Mesh menu and the WKEY specials
  menu.

* Documentation:
  http://wiki.blender.org/index.php/User:Nicholasbishop/Symmetrize

* Reviewed by Brecht:
  https://codereview.appspot.com/6618059
2012-10-15 23:50:09 +00:00
9f21b799c4 And more UI messages spell check. 2012-10-13 13:40:05 +00:00
67e2768570 quiet some -Wshadow warnings 2012-10-12 14:35:10 +00:00
40186a8c11 remove BLI_noise from BLI_blenlib.h, not that many files need this. 2012-10-12 00:18:32 +00:00
28c20e456f fix for many RNA definitions having soft/hard ranges swapped, make this BLI_assert() on debug builds. 2012-10-11 23:46:12 +00:00
8b7896814f code cleanup: reduce change the size of some float vectors that were bigger then they needed to be.
update to clang_array_check.py - parse function definitions lazily for some speedup.
2012-10-08 07:08:29 +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
080f4441d2 Improvements for knife tool execute function (code was a bit sloppy & could leak memory).
- vertex to screenspace projections were not checking for failure to project (vertex behind the view for eg).
- vertex screenspace 2d vectors were each malloc'd and added to own ghash, then fetched for each edge.
  now just store a vertex aligned array and do index lookups.
- projections were done in global space, now do them in object space (avoids a matrix multiply).
- error cases were commented out and would fail silently, now report them to the operator.
- remove MAX_CUTS hard coded limit, dynamically allocate the mouse path.
- add missing free calls in error cases.
2012-10-05 03:06:01 +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
d8144ef0f5 style cleanup: comment blocks 2012-10-04 13:26:15 +00:00
c01dc37e7a fix [#32716] continuous grab bevel inset faces 2012-10-01 14:51:53 +00:00
5327c2f486 fix [#32602] Bevel operator's transform input is inverted
inset was inverted also
2012-09-20 12:42:22 +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
25c96bc9f3 code cleanup: remove unused macros, commet some which may be useful later - or good to keep for completeness. quieted some warnings and add flags -Wmissing-include-dirs and -Wno-div-by-zero to cmake/gcc 2012-09-20 01:02:39 +00:00
e00bf04912 fix [#32575] Seperate more than one object from a mesh generates additional edges 2012-09-19 00:09:14 +00:00
0ecbc047e8 code cleanup 2012-09-06 23:41:03 +00:00
3da7e0f3bf mesh bridge tool now leaves bridge faces selected. 2012-08-24 17:58:49 +00:00