Commit Graph

2495 Commits

Author SHA1 Message Date
f7945c659b Knife: remove redundant allocations 2014-09-06 18:39:59 +10:00
7971e441c1 Knife: no need to find the face-loops
Just check if verts are used in the face.
2014-09-06 11:28:06 +10:00
c6b96c241b Vert-rip left an invalid selection with (>1 verts)
Now report the error and fail early.
2014-09-04 12:15:52 +10:00
6b3ec0c515 Fix editmesh-connect with hidden geometry
- ignore hidden faces & verts
- when cutting a pair, select edges co-linear to the cut.

Also support creating a buffer from hidden elem's even if BMO_FLAG_RESPECT_HIDE is enabled.
(if the hflag used includes BM_ELEM_HIDDEN).
2014-09-02 14:35:56 +10:00
e8f3fa99de Support more object types scene-scale (on creation)
- lamp
- camera
- font
- empty & effector

Also fix inconsistency with apply transform
(modified shape-keys for meshes but not curve/lattice)
2014-09-01 21:01:11 +10:00
0e3fa0b761 Fix T41590: When scene scale is not 1.0, and units are "None," Blender assumes translations are in meters.
Turned out there were several issues in handling of scale parameter by numinput.
Fixed that by factorizing more some code in common with 'usual' numbuttons eval code
(new `bUnit_getScaleUnit()` helper will return valid scaled value, depending on
given system and type).

Now, numinput behaves as expected - using default unit amended by scale in case no unit is given
(i.e. entering '20' with a scale of 0.01 will give you 20cm, and '20cm' as well!).
2014-08-26 12:31:08 +02:00
66b84ad159 Followup to previous commit: fix same wrong numinput handling in other modal ops.
Also stumbled uppon 'move marker' code, was needing a bunch of fixes, cleanup and simplification,
and added a candy feature - now you will enter numinput values in seconds when editor is
in 'time' mode, instead of frames!
2014-08-25 20:26:45 +02:00
b638696ca6 Fix T41534: Bevel practically unusable interactively if set to percent amount type.
Turned out to be a clean/fix up of modal bevel tool, percentage mode handling was broken,
numinput handling was broken, etc.

Also added a way to switch between bevel types (modes) with M key, and tweaked a bit
numinput code to return early in case of 'char' event with ctrl modifier.
2014-08-25 20:26:29 +02:00
ca1bca442a Fix T40993: Store selection history for extrude 2014-08-25 16:57:38 +10:00
90e1746d89 BMesh: correct flag use
Allowed fill to make duplicate faces
2014-08-21 13:08:13 +10:00
c3e59379c0 UI message fix (yeah, I know... :/ ). 2014-08-20 21:52:00 +02:00
b9ebf44139 BMesh: intersect tool
Modeling tool to cut intersections into geometry (like boolean, without calculating inside/outside).
Faces are split along intersections, leaving new edges selected.

Access from Face menu.
2014-08-18 17:09:30 +10:00
4795b61c1b Cleanup: assert / warn 2014-08-18 16:05:06 +10:00
1dd17bed4a Knife tool: simplify hit-depth calculation 2014-08-17 12:50:48 +10:00
f2821e392b hint checks to re-alloc as unlikely
also edit comments for knife tool
2014-08-14 11:07:33 +10:00
818a036c1a Fix T39387: Knife makes duplicate verts with subsurf 2014-08-13 15:06:38 +10:00
3529913629 Math Lib: name signed versions of dist_to_plane_v3 explicitly
also add unsigned versions
2014-08-13 14:34:58 +10:00
3e90d7971a Knife tool: avoid copying vectors 2014-08-13 13:56:53 +10:00
d17643ce1e Knife tool: cleanup threshold use, avoid sqrt 2014-08-13 08:08:18 +10:00
1510d0d441 Fix T41164: Knife creates duplicate verts 2014-08-13 08:03:31 +10:00
da638d49e3 Style cleanup 2014-08-01 02:03:09 +10:00
b64e36d26d BLI_listbase: consistent name prefix 2014-07-30 15:01:16 +10:00
1f55044617 Editmesh: Add option to tear boundary vertices when dissolving 2014-07-24 03:29:17 +10:00
00b29156e0 Defines: replace ELEM3-16 with ELEM(...), that can take varargs 2014-07-20 01:33:40 +10:00
00cb9e5f1c Editmesh: Add options for selecting manifold
Manifold was defined as any edges not using 2 faces,
however its useful to have some options here.

You can now select between Wire/Boundary/Multi-Face/Non-Contiguous/Verts

Note the Non-Contiguous option is new,
it selects edges between faces pointing in different directions.
2014-07-19 21:25:53 +10:00
70453c578d Fix T34664: bevel face material can be set in tool and modifier.
Now the bevel tool, modifier, and internal operator have a material
slot # parameter that the user can set. If left at default of -1,
behavior is as current -- bevel face material is taken from the
closest original face (this may be ambiguous). If material slot
is >= 0, it gives the material slot index number for the material
to use.
2014-07-17 09:20:22 -04:00
dd9a33dc83 Add mesh tool to split faces by wire edges (face menu)
This can be used in a similar way to the knife tool, but the edges are manually setup first.
2014-07-11 10:32:33 +10:00
cadf77d5ef Fix T40862: numinput transform did not take into account scale_length. 2014-06-30 10:57:39 +02:00
a4d9c8f579 Code cleanup: casts, dead assignment & arg order. 2014-06-26 15:46:42 +10:00
3a75381505 Apply fix for T40745 to extrude_face_region too 2014-06-23 00:12:06 +10:00
7bc2f54867 Code cleanup: style 2014-06-22 15:02:27 +10:00
d9de1b367e Revert "Fix flickering when transform snapping in edit mode and cursor is"
Looks like the cleanest way to handle this is to no do bounding box collision
for edit mode at all. But this is easy to enforce

This reverts commit 7b5fe4f316.

Conflicts:
	source/blender/editors/transform/transform_snap.c
2014-06-18 18:20:55 +03:00
f9b7617104 Fix T40646: Knife project fails with clipping 2014-06-17 04:07:03 +10:00
e848cb9e48 Fix for knife when in ortho camera view 2014-06-17 04:07:03 +10:00
5ca44ff952 Fix T40648: Bevel Tool - Amount value slider maximum does not adapt to Amount Type settings automaticly. 2014-06-16 09:03:54 +02:00
29e8c46e30 Rename 'Extend Vertex' to be clear it operates on many vertices 2014-06-14 16:27:46 +10:00
5861e528d6 New Editmesh Tool: Extend Vertex, (Alt+D) D512
Helps to easily add details to existing edges.

Similar to the rip tool it depends on cursor location to choose the edge to extend along.
2014-06-14 01:43:25 +10:00
bf462149a6 BLI_bitmap: rename macros
- BLI_BITMAP_SET -> BLI_BITMAP_ENABLE
- BLI_BITMAP_CLEAR -> BLI_BITMAP_DISABLE
- BLI_BITMAP_GET -> BLI_BITMAP_TEST
- BLI_BITMAP_MODIFY -> BLI_BITMAP_SET
2014-06-14 00:47:12 +10:00
9db947df41 Editmesh: Replace SmallHash with GSet for MESH_OT_loop_to_region
There no reason to assume hash will be small in this case
2014-06-14 00:47:12 +10:00
7b5fe4f316 Fix flickering when transform snapping in edit mode and cursor is
slightly outside the mesh.

Reported by Thomas Beck on irc. Issue here is that the mesh bounding box
changes as we are transforming the vertices. Solution is to collide
against the initial bounding box. Unfortunately the snapping functions
are made in a way that a lot of code needed to be tweaked here, but the
change should be straightforward and harmless (famous last words, I
know).

Ideally we might want to even increase the size of the bounding box a
little (as seen in screen space) to allow snapping even in cases where,
cursor is slightly outside the bounding box, but since this is not so
straightforward to do for all cases, at least for me, leaving this as
a TODO.
2014-06-12 01:43:38 +03:00
d53ed58c57 BMesh: avoid OpenMP use for low poly meshes (counting selection)
also use schedule(static) for simple for loops.
2014-06-06 23:54:15 +10:00
4e13616b04 Checker Deselect: keep active item selected by default 2014-05-23 20:50:27 +10:00
bec8cee7cf Fix T40324: Checker deselect fails for edge-rings 2014-05-23 20:50:27 +10:00
7e78322eef BMesh Walker: rename BMW_SHELL -> BMW_VERT_SHELL 2014-05-23 20:50:27 +10:00
07ffd9c790 Fix T40309: Select inner region 'bigger' failed with equal regions 2014-05-22 14:58:34 +10:00
a217db0d63 Fix T40297: Crash while ripping an edge when autosmooth is activated.
Turned out there was still quite a few cases were indices were set dirty,
but elem_index_dirty was not tagged accordingly (mostly for BM_LOOP,
but a few others as well). So probably this crash was not the only one
hidden here.

Hopefully all possible cases were catched this time!
2014-05-21 22:37:50 +02:00
71c11dbb02 Fix T40252: Knife snapping ignores axis-constraint 2014-05-20 13:53:52 +10:00
46bd759964 Code cleanup: rename BM_face_legal_splits -> BM_face_splits_check_legal 2014-05-13 17:48:25 +10:00
7660218202 Correct fix for knife interior use, distance needed to be in object-space 2014-05-06 09:32:06 +10:00
d2920e9876 Knife too: was using a ray-cast direction scaled down by the knife epsilon 2014-05-06 09:02:16 +10:00