Commit Graph

274 Commits

Author SHA1 Message Date
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
b5e90d6b1c fix [#32357] Subdivide fails on newly created edge
problem since bmesh merge, new edges were not selected.
2012-08-24 14:54:14 +00:00
efa97ea40f Fix #32391: new remove doubles "unselected" option was enabled by default, don't
think this was intentional.
2012-08-23 10:56:16 +00:00
c0c575751d bmesh tool: support for merged-bridge (like bridge, collapsing), with a
factor to blend between loops.
2012-08-23 04:55:59 +00:00
857a3cd112 Fix #32334: mesh separate by material with > 2 materials could include some
incorrect extra edges.
2012-08-21 14:49:07 +00:00
be4ac3a860 Fix #32355: select vertex path not working when vertices are selected with e.g.
border select. There was a fix before bmesh where it would require exactly two
vertices to be selected, but this was not ported over, and it also wasn't quite
correct.

This case should also work: click on two vertices, selected the path between
them, and then click on a 3rd vertex and select path, to extend the path further
from the 2nd to the 3rd vertex.

Now both use cases should work.
2012-08-21 13:19:31 +00:00
817965613b added 'Unselected' option to remove doubles, merges selected vertices into unselected ones, but not each other. 2012-08-20 00:11:13 +00:00
c8cdad1748 fix [#32300] Convex Hull Poll Shouldn't Require 3D View 2012-08-10 11:38:52 +00:00
f86bd9d39a fix crash in sorting mesh elements when called without a viewport. 2012-08-01 14:51:49 +00:00
c41e1e434a code cleanup: replace MIN2/MAX2 with minf/maxf 2012-07-29 16:59:51 +00:00
718569dc16 Fix #32199: Smooth Vertex no longer has X, Y and Z options. 2012-07-27 17:35:02 +00:00
409a6ee57b use B key to toggle 'boundary' option for modal inset. 2012-07-27 14:17:05 +00:00
99947eb744 change behavior of ediutmesh separate not to cleanup geometry - its not really needed and caused a bug with some of my recent edits.
If its important it could be added back but dont think its worthwhile.
2012-07-24 21:07:29 +00:00
a5d08781fc Bugfix [#31994] Blend from Shape "Add" mode incorrectly added the full mesh
shape instead of just the difference/deltas applied by the source shape

Apparently this was a regression from that crept in during the BMesh merge. I've
just restored the pre-BMesh method, adapted for the BMesh style.

Also, removed a somewhat superfluous (?) copy at the end of each step (from co
back to sco). It didn't seem to be serving any purpose (i.e. we're not trying to
modify the source shape at all).
2012-07-23 13:33:09 +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
e94ef6ca6c ignore hidden faces when splitting by loose parts of materials. 2012-07-20 13:54:05 +00:00
3b26b46631 Separate meshes by loose parts and materials now works in object mode as well as editmode. 2012-07-20 10:33:15 +00:00
9c8edae7d4 fix for separate loose parts doing full depsgraph rebuild for every object split off. 2012-07-19 10:23:25 +00:00
01c3db149c Fix [#32086] Missing bevel "hold shift" for better accuracy.
This commit adds "shift" and numtype to both Bevel and Inset mesh operators.

It also gets rid of the magicnumber used in NumInput to str operation (currently, 20 chars per element, now defined as NUM_STR_REP_LEN in ED_numinput.h).
2012-07-14 14:03:36 +00:00
84bf3e48c0 style cleanup: use c style comments in C code 2012-07-06 23:56:59 +00:00
558721ab59 More spell checking. 2012-07-04 15:04:38 +00:00