Commit Graph

36843 Commits

Author SHA1 Message Date
Campbell Barton
0c7487d1eb re: edge split with edges only connected to 2 faces (with no other faces around the verts)
turns out old code also had the same bug (just coincidance it was noticed after my change)

now boundry verts are tagged so edges connected to them are not seen is missing a tagged, adjacent edge.

this fixes [#30471]
2012-03-07 03:58:23 +00:00
Campbell Barton
4fe4cfdb88 revert own commit r44684 it broke edges with one vertex on a boundry 2012-03-07 03:46:30 +00:00
Campbell Barton
04beeea9c9 single vertex rip wasn't finishing with the best vertex selected. 2012-03-07 02:46:58 +00:00
Campbell Barton
6eb6877cdd minor improvement to Rip tool side calculation, measure distance to the edge line segment rather then midpoint. 2012-03-07 01:14:20 +00:00
Campbell Barton
f11d7a426f fix for bug in ED_view3d_project_float that only effected the 'Rip' tool.
when the source and destination vectors were the same pointer, the X value would get overwritten.

now the rip tool uses the best side to grab as in trunk.
2012-03-07 01:06:18 +00:00
Campbell Barton
400a0297b0 - simplify rip code not to expand/contract selection.
- disable BVH edge visibility test (ifdef'd out. dont think its really needed)
2012-03-07 00:08:00 +00:00
Sergey Sharybin
bf9de9d934 Fix #30436: Externally editing unsaved images fails 2012-03-06 21:54:33 +00:00
Sergey Sharybin
7c59666a27 Mango request: for range buttons copy start+1 to end if start>=0
Also copy end-1 to start if changing end boundary and end<=start.

Scene's start/end frames and ghost range in armature buttons are affected.
2012-03-06 21:42:03 +00:00
Nicholas Bishop
2fd7a56526 Fix textured-mode drawing in editmode.
It's currently not respecting the material color, probably since the
BMesh merge. There are a couple problems, both involving "dummy"
variables taking the place of actual MTFace/MCol data.

Code review: http://codereview.appspot.com/5753050/
2012-03-06 21:21:22 +00:00
Campbell Barton
ef67172587 bmesh edge split - use a faster method of finding isolated split edges. 2012-03-06 20:41:11 +00:00
Juha Mäki-Kanto
1148344f46 fix #30440, Collada import: no faces/uv after bmesh merge
Seems too simple, just missing call to convert_mfaces_to_mpolys.
2012-03-06 19:50:07 +00:00
Campbell Barton
d1937de1d2 fix for own error in edge-rotate keeping edge customdata - this was crashing when rotating multiple edges.
Now create the rotate edge in advance and copy its customdata (before joining the faces).

This commit also fixes an annoyance where tryangulating faces could create duplicate edges.
2012-03-06 19:29:05 +00:00
Campbell Barton
31d2ee9bf7 style cleanup, brackets in else/if, some indentation. 2012-03-06 18:40:15 +00:00
Campbell Barton
7b7214c722 code cleanup - give edge split more helpful var names and replace edgetag macros with static functions. 2012-03-06 17:23:26 +00:00
Sergey Sharybin
bffeab99ae Fix for fracture object crash
Issue was caused by incorrect resetting of tesselated fave data in copy_mesh:
- CustomData_free will free data from original mesh because layers in new mesh
  are pointing to the same memory just after copy. So it's needed only to
  set some pointers to NULL.
- It was incorrect filling fdata with zeroes because of incorrect structure size used.
2012-03-06 16:22:41 +00:00
Campbell Barton
5ba020da4f bmesh: speedup for deselecting all, (avoid topology loops since all get deselected anyway).
& some ascii art to explain BM_face_other_vert_loop() behavior.
2012-03-06 16:17:55 +00:00
Brecht Van Lommel
0deeab95be Fix sculpt partial redraw in viewport not working, my mistake, found by Nicholas. 2012-03-06 14:48:11 +00:00
Sergey Sharybin
7edb514945 Actual fix for mango files crashes on load
Was caused by recent code cleanup.
2012-03-06 14:46:45 +00:00
Sergey Sharybin
c6f7c97daa Fix for crash when loading some mango files
Seems that issue is caused by several threads accessing to movie clip and one
of the threads (compositor node) was editing ImBuf which isn't nice anyway.
2012-03-06 13:57:28 +00:00
Campbell Barton
3882f7cde7 quiet some warnings and fix build error with strict casting rules. 2012-03-06 12:51:17 +00:00
Sergey Sharybin
91c2aa7b95 Camera tracking: wall scene orientation operator
Made Set Floor a bit more general and name it Set Plane which defines
orientation from 3 selected tracks and makes them belong to specified
plane (wall or floor).
2012-03-06 12:27:42 +00:00
Howard Trickey
bb21641e1c Fix to knifetool when intermediate point in space.
Before, if you cut the same edge multiple times
with an intermediate point in space, it wouldn't
get all of the edges.
2012-03-06 12:16:55 +00:00
Howard Trickey
d87f08cbaa Add BM_face_split_n which splits a face with intermediate points with given coordinates.
This will be used in soon-to-be-commited knife tool rewrite.
Interpolates using the original face.
Also fixed or improved a couple of comments.
2012-03-06 12:09:35 +00:00
Lukas Toenne
92322b57d4 Fix for 30439, Cycles node group conversion wasn't checking node->id pointer (group node without internal node tree). This is a somewhat unusual case (UI buttons don't allow unlinking group tree), but not entirely forbidden.
Also fixed similar issue in node_templates.c where the group tree is used to generate a button name.
2012-03-06 11:34:57 +00:00
Sergey Sharybin
2b9551a4e4 Fixed typo in tracking-related tweaks for depsgraph resulting with crash
in special cases (like setting camera's constraint clip if scene's clip is not set)
2012-03-06 11:24:23 +00:00
Nicholas Bishop
cc850522bc Fix incorrect null parameter in PBVH drawing 2012-03-06 09:19:13 +00:00
Nicholas Bishop
919a0d99fb Code cleanup: remove some PBVH material code that isn't needed anymore. 2012-03-06 03:34:27 +00:00
Nicholas Bishop
c7ffe7f621 Draw individual face's material and shading correctly in the PBVH.
Previously, the shading and material was set once per PBVHNode when
drawing. This is still the case, but PBVHNodes are now built to
contain only one material and shading mode.

This is done with an extra partitioning step; once the number of
primitives in the node falls below the PBVH leaf limit, it's
primitives are checked for matching materials. If more than one
material or shading mode is present in the node, it is split and
partitioned (partitioned by material rather than 3D location.)

Given a sufficiently 'annoying' input, like a dense mesh with
thousands of materials randomly scattered across it, this could
greatly increase PBVH build time (since nodes might end up containing
a single primitive), but in general this shouldn't come up.

In order to support materials for grids, the CCGDM is building another
grid array (of DMFaceMat structs). This could be used to replace
CCGDM.faceFlag for some small memory savings (TODO).
2012-03-06 02:40:08 +00:00
Nicholas Bishop
9c7e8e837d Code cleanup: remove unused parameter from some ccgSubSurf accessors.
Remove 'CCGSubSurf *ss' parameter from ccgSubSurf_getFaceFaceHandle,
ccgSubSurf_getFaceVert, and ccgSubSurf_getFaceEdge.
2012-03-06 01:01:42 +00:00
Nicholas Bishop
c729d6a87b Bugfix and code cleanup: use better types for faceFlags in CCGDM.
Previously this was just a character array that stored face/poly flags
and mat_nr. Since mat_nr should be a short, this would have truncated
for higher values.

Replaced with a new DMFaceFlags struct.
2012-03-06 00:17:03 +00:00
Bastien Montagne
0114d78c33 Code cleanup in rna files (huge, higly automated with py script).
Addresses:
* C++ comments.
* Spaces after if/for/while/switch statements.
* Spaces around assignment operators.
2012-03-05 23:30:41 +00:00
Nicholas Bishop
1eb893a114 Code cleanup: factor out some common code from PBVH build_sub/build_leaf. 2012-03-05 22:24:49 +00:00
Nicholas Bishop
190c233293 Code cleanup: add comments for build_sub() and remove debug function.
Remove the function (and call to) check_partitioning(), this was just
a debug function.
2012-03-05 22:12:50 +00:00
Nicholas Bishop
10d1079226 Code cleanup: split PBVH build_sub() into two functions.
Removes also a confusing else{} block that didn't make much sense.
2012-03-05 21:55:53 +00:00
Sergey Sharybin
3f04564724 Disable interpolation of customdata layers on edge slide
This option might be useful in some cases like keeping UV coordinated in kind of
"correct" state so sliding edge loop will also slide edges in UV. But for other
layers like shapekeys and vertex colors it's arguable it's actually needed.

The way it's currently done isn't actually acceptable because it doesn't take
flags like UVCALC_TRANSFORM_CORRECT into account and also makes extra unwanted
things like interpolating shapekeys which leads to propagating changes into
basis keys and also results with slide applied twice for relative keys because
offset is also applying on loading edit mesh.

Also discussed with Brecht who agreed with marking this things as TODO and
disabling for now.

This should fix issue reported in #30387: Edge Slide propogates to Basis Shape Key
2012-03-05 21:42:17 +00:00
Nicholas Bishop
e2003f9a6c Code cleanup: remove unused drawFacesColored from DerivedMesh.
This function pointer isn't called anymore, so removing it and the
cddm/ccgdm/gpu code associated with it.
2012-03-05 21:27:28 +00:00
Campbell Barton
bd83487dab fix [#30459] BMesh Edge Split Hangs.
edge split result is still not correct in this case but at least avoid eternal loop.

also - dont tag sharp edges with <2 faces for splitting.
2012-03-05 21:17:24 +00:00
Sergey Sharybin
1ae27144f6 Fix for OpenEXR half float save function resulting in dark images saved
Float buffers of ImBuf are always supposed to be linear space a,d ImBuf's
profile means how byte array was constructed from float buffer.
2012-03-05 18:54:57 +00:00
Campbell Barton
a5eadf14e0 copying a mesh was generating tessfaces which isnt needed 2012-03-05 18:05:06 +00:00
Sergey Sharybin
03ebd2091b Add stub needed for blenderplayer compilation. 2012-03-05 17:23:52 +00:00
Campbell Barton
529b2a01eb added check for DNA C syntax we cant parse:
void*somepointer;

.. this is valid C but breaks makesdna.c
2012-03-05 16:21:13 +00:00
Bastien Montagne
1e41b19ec1 tesselat -> tessellat in UI messages, + style edits. 2012-03-05 16:19:16 +00:00
Sergey Sharybin
aa0eb72c18 Fix for missed faces in mesh after switching active shape key in edit mode. 2012-03-05 14:25:52 +00:00
Luca Bonavita
0fe519f14a == Python API docs ==
Adding two new command line options (-f = full rebuild, -t = testing) so that we don't have to edit the file each time
2012-03-05 14:12:38 +00:00
Campbell Barton
4f447921d2 RegionView3D.update call, to address issue in report:
[#30454] perspective_matrix not update in real time with bpy.ops.view3d.zoom

This is so you can modifify the view settings and get the view matrix after without waiting for a redraw.
2012-03-05 13:02:45 +00:00
Campbell Barton
f6ddb79e20 fix [#30457] Smooth normals wrongly exported to wavefront
mesh.calc_normals() wasnt calculating vertex normals (only face normals),

now only calculate vertex normals.

added a define incase we want to have poly normals back again.
2012-03-05 11:49:24 +00:00
Campbell Barton
4b940364a1 edge rotate now keeps edge properties (like seam, crease, bevel weight.. etc) 2012-03-05 01:53:30 +00:00
Campbell Barton
4d84e869a0 Improvements to bmesh edge rotate
On a user level, edge rotate now works better with multiple edges selected, it wont make zero area faces or rotate edges into existing ones.

With a single edge selected - rotate is less strict and will allow ugly resulting faces but still checks on duplicate edges.

API:
* BM_edge_rotate now takes a flag, to optionally...
** check for existing edge
** splice edge (rotate and merge)
** check for degenerate resulting faces (overlapping geometry, zero area)
** beauty - only rotate to a better fit.
... this allows it to still be used as a low level API function since all checks can be skipped.

* BM_edge_rotate() now works a bit different, it find the new edge rotation before joining the faces - exposed by BM_edge_rotate_calc().

* Added api call bmesh_radial_faceloop_find_vert() - Radial Find a Vertex Loop in Face
2012-03-05 00:50:18 +00:00
Sergey Sharybin
5f509134ec Added option to fit frame to the whole clip editor viewport instead of zooming
to a power-of-two factor. Shortcut is F.
2012-03-04 21:02:58 +00:00
Sergey Sharybin
c395c862e9 Track cleanup operators are now moved to the global clip editor shortcuts
which makes it possible to cleanup tracks from curve view.
2012-03-04 20:44:09 +00:00