Commit Graph

319 Commits

Author SHA1 Message Date
c30fb009cc problem with own changes to triabgulate: calling beauty fill directly would re-allocate the faces which mean't triangulates output slots pointers became invalid. (noticed when using from py api) 2013-02-06 15:57:12 +00:00
441c7fb79a fix for crashes running some operators in background mode and some divide by zero errors. 2013-02-06 02:48:03 +00:00
95a13a2c02 Fix projection texture painting crash
It was caused by own mistake by not noticing externtex is used not
only by render engine. Now this function uses pool passed as argument
rather than using R.pool.
2013-01-22 08:05:00 +00:00
162c331417 style cleanup 2013-01-19 06:12:25 +00:00
9f2e845181 code cleanup: use BMW_begin insode for loops body. 2013-01-14 09:53:56 +00:00
5e6917a18e patch [#33738] Extend Selection option unified and added to few operators
from Sebastian Nell (codemanx), with minor edits
2013-01-12 10:48:10 +00:00
8ca977b16e change limited dissolve angle limit default from 15 -> 5 deg. since 15deg is quite high for 2 surfaces to be considered co-planar 2013-01-03 08:09:57 +00:00
ec1681fae7 style cleanup 2013-01-02 01:49:07 +00:00
ab960eea88 Add symmetrize operator for dynamic-topology sculpt mode 2012-12-30 18:31:01 +00:00
4e88bfca1b fix [#33677] Lambda is un-settable for mesh.vertices_smooth_laplacian
lambda is python keyword.
2012-12-28 11:12:46 +00:00
4e5d5e0d84 Add 'vertex_only' option to bevel tool.
Right now, changing segments to > 1 doesn't do anything,
but intend to work on making that cause rounded corners.
2012-12-28 02:45:10 +00:00
2a5cabb039 code cleanup and minor changes
- use DummyRNA_NULL_items to replace empty enums.
- replace calloc with malloc in copy_dverts since its copied over after.
- add wmGesture->userdata, so operators that use gestures have somewhere to store their own data (not used yet).
2012-12-22 01:08:42 +00:00
c27d22ab71 fix own regression in 2.65 [#33643] Rotation does not work at certain zoom level
caused by not projecting points behind the perspective view,
even though this worked in 2.64 the values were flipped (rotating direction was reversed and the center point was flipped).

added V3D_PROJ_TEST_CLIP_NEAR, when omitted ED_view3d_project_*** will project points from behind a perspective view plane.
2012-12-21 03:49:47 +00:00
66cac9ba71 extrude individual was crashing. 2012-12-19 15:15:00 +00:00
1f3e3b0d68 include cleanup 2012-12-19 04:49:32 +00:00
83b03b8dfd Fix [#33590] The Screw Tool in Edit Mode isn't calculating the correct angle step divisions per turn.
Degrees were used as radians... :p
Also tweaked min values of steps and turns!
2012-12-17 19:26:09 +00:00
18cb2d208c code cleanup: use 'const float *' when getting the 3d cursor and not editing it. 2012-12-17 05:38:50 +00:00
9a2290cf5f fix for bevel using the wrong property name when shift was held. 2012-12-16 14:22:48 +00:00
d5c2a1f8f4 remove context argument from EDBM_update_generic() 2012-12-12 15:22:54 +00:00
44b634bcb1 make EDBM_index_arrays's stay in memory, blender was allocating an array and filling it for verts/edges/faces on every redraw.
this may introduce bugs which I didn't catch, but they are very easy to identify in a debug build which has asserts to ensure the arrays are valid before use.

in my own test drawing ~98,304 quads - this gave an overall ~16% drawing speedup.
2012-12-12 06:53:39 +00:00
5446dc0bf3 fix for various asserts running operator tests - not likely any of these would cause real user bugs though. 2012-11-30 16:41:43 +00:00
c5a8bd498d use radians for 'spin' bmesh operator (since the rest of the py api uses radians). also rename BMO_OP_SLOT_SUBTYPE_MAP_FLOAT -> BMO_OP_SLOT_SUBTYPE_MAP_FLT for consistency. 2012-11-28 00:47:33 +00:00
8ecce451ab bmesh operator naming - use clearer names for args eg: (mat -> matrix, use_singleedge -> use_single_edge)
also remove duplicate docs for operator arg formatting.
2012-11-28 00:16:06 +00:00
7c36100930 new bevel was still referring to old property name (holding shift wasnt working while beveling). 2012-11-27 09:47:22 +00:00
c00a1b7493 use clearer names for 'single' bmesh operator args & add '%e' to BMO_op_vinitf comments. 2012-11-27 09:41:08 +00:00
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