Commit Graph

640 Commits

Author SHA1 Message Date
91587ed302 svn merge ^/trunk/blender -r40381:40382 2011-09-23 06:35:49 +00:00
13dfd82997 changes for materials to treat them as shorts not int/chars (since they are stored as shorts intermally)
- converting nurbs to mesh was casting the material to unsigned char.
- subsurf was casting to char, then int -> short in a loop.
- have material functions take & return shorts.
2011-09-20 06:25:15 +00:00
8c43e785d9 revert own commit r40051, mesh and object pointers are needed for undo, this commit caused bug [#28625] Separate crash bug.
also added a safety check for the crash, even though reverting fixes.
bmesh_to_mesh_exec() could set me->mface array to NULL but leave me->totface when notellelation=1, which is likely to give trouble elsewhere.
2011-09-12 02:23:30 +00:00
3f91c0ab5d correct edit some comments 2011-09-09 14:51:30 +00:00
0727893231 remove mesh and object arguments from bmesh operators, these are stored within the BMesh its self. 2011-09-09 02:21:57 +00:00
21bb71eaa9 fix for bug converting text/surface/curve displists to mesh only getting the first face, also wasnt copying smooth flag. 2011-08-17 05:42:23 +00:00
59e95fa0ff =bmesh: bridge edge loop tool=
rough version of a new bridge tool.

ctrl-e -> bridge (two) edge loops
2011-08-15 23:38:51 +00:00
aaa72c575a revert unneeded eekadoodle fix 2011-08-10 10:32:23 +00:00
cbb2e58b68 fix mirror when have dup faces; prevent eekadoodle on tess recalculation 2011-08-08 17:30:19 +00:00
Dalai Felinto
432bd158fb bugfix [#28111] material.pop breaks mt->mat_nr
create a new parameter for materials.pop() to not remove material slot.
this way the mat_nr is still the old one.

for the default behaviour we now have material remapping (i.e. data_delete_material_index_id(id, index)).
This new function is brought from the material_slot remove function.
2011-07-31 11:12:38 +00:00
142d87f154 =bmesh= committing not-quite-functional edge split modifier code before replacing it with a bmesh version, taking too much time to debug right now. 2011-06-01 19:30:19 +00:00
068c627013 remove unused vars 2011-05-13 13:17:30 +00:00
cd55aeaf6d set many vars & functions as static,
also commented invalid pin theme alpha assignment so bmesh branch builds with -Werror
2011-05-11 02:14:43 +00:00
5ba0c2c049 tag unused arguments, quiet some warnings 2011-05-09 14:32:55 +00:00
b93594bf30 quiet more compiler warnings, also found a bug using printf rather then fprintf. 2011-05-09 05:09:07 +00:00
5a2a3d7d82 more syncing with trunk, also cleared many warnings with gcc4.6 2011-05-09 04:06:48 +00:00
6ef77cf95a =bmesh= merge from trunk at r36529 2011-05-08 23:43:18 +00:00
e0c83f2de9 =bmesh= made connected PET work better 2011-04-29 17:32:42 +00:00
e4cc1c3f2c fix [#27178] Material links lost when making mesh data local
- making local object data - Curve/Mesh/MBall lost references to linked materials.
- joining a linked mesh object into a local one lost the link.

As well as these reported bugs, checked all local functions for consistency/correctness and found other cases which would also fail.
- making local metaball didn't ensure unique ID name.
- make_local_armature() was missing check for object users - main body of code would never run.
- local particles didn't set the dupli-group or textures to extern.

checked all local functions for consistency/correctness.
2011-04-26 07:17:21 +00:00
b85935cbbc =bmesh= fixed material deletion 2011-04-24 08:11:44 +00:00
84afe5f3c9 =bmesh= fixed a tesselation bug, and smooth shaded operator in object mode 2011-04-24 08:06:26 +00:00
210ee1ade4 whitespace only, no functional change mixed tabs/spaces --> tabs. 2011-04-21 13:11:51 +00:00
62a02764ab fix [#27096] Segmentation Fault trying to export DirectX with specific model
copying a mesh in editmode didnt NULL the edit_mesh pointer.
2011-04-21 09:03:04 +00:00
2a24370bab =bmesh= fixed a shapekey issue with undo 2011-04-17 05:08:03 +00:00
489eaaa46d =bmesh= build modifier works now, also made scanfill thread-safe 2011-04-16 23:58:49 +00:00
798e0b02c0 =bmesh= modifiers can now be applied with shapekeys 2011-04-15 05:20:18 +00:00
c785b06cc4 fixed a bug with normals 2011-04-15 02:18:24 +00:00
c98148a963 =bmesh= merge from trunk at r36153 2011-04-15 01:19:13 +00:00
d3e4c2243d correct typo 2011-04-14 22:15:43 +00:00
53a85a8edf =bmesh=
Made the new "superknife" tool much stabler
then it was, though a few minor quirks remain.
Rather then the shortest-distance-in-graph method
I was using to rebuild the mesh post-knife I
reworked it to build a triangulation instead,
then merge the triangles into the right correct
faces.
2011-04-11 01:38:20 +00:00
709e4b309e Revert mesh recalculation change that gives different vertex normals based
on smooth/flat flag on faces. This does give better results for low poly
game models, but there's just too much functionality that depends on this
(modifiers, displacey, editmode tools, extrude, ...), that there's not
enough time to fix these before the release.
2011-04-04 13:02:12 +00:00
d40b0dfb75 Comments for mesh normals calculation from Mortem Mikkelsen (aka sparky).
We hope it'll help for further workers in this area!
2011-04-01 18:35:49 +00:00
7d43a48993 =bmesh=
Multires interpolation is considerably better
now, though it still has a problem with occasionally
producing little random tangent spikes.  Still, it's
far better then it was.

Also fixed a bug in dissolve faces.
2011-03-29 05:48:18 +00:00
dd56ebe607 blenkernel: floats were being implicitly promoted to doubles, adjust to use floats. 2011-03-28 04:22:50 +00:00
ac1cb5ee05 - quiet new warnings with gcc 4.6
- use BLI math funcs for normal float/short conversion.
- correct some un-intentional float/double promotions.
2011-03-28 02:34:55 +00:00
121075ec15 One more fix for recent normals re-calculation change 2011-03-26 17:43:07 +00:00
5aec085da0 Fixed memory access in mesh_calc_normals(). Now it uses much less memory. 2011-03-26 09:48:03 +00:00
63e40dbe0e Fix #26582, #26586, #26613: recent normal calculation changes didn't take
into account that some tools use normals for things other than display. Now
we properly initialize vertex normals at flat faces too.

Also fixed a normal refresh issue, and deduplicated CDDM/mesh normal
calculation code.
2011-03-26 08:28:24 +00:00
d88bb9115f =bmesh=
Coded a new modifier, "Precision UV Interpolation", 
that triangulates, subdivides, then uses brecht's mean
value interpolation to interpolate face data.

Textures on ngon faces get interpolated a bit nicer, in 
other words (though concave cases, e.g. 'N', don't work very well).
2011-03-25 00:32:38 +00:00
549b5e1222 Fix/change in normal computation, now the viewport uses the same angle
weighted normals as the render engine, and the render engine will copy
normals from the mesh rather than always recalculating them.

Subsurf/multires still use regular vertex normals, but they are expected
to be sufficiently high resolution to not need this.

This means that normal maps displayed in the viewport actually match the
render engine exactly and don't have artifacts due to this discrepancy.
It of course also avoids unexpected surprises where your render normals
look different than your viewport normals.

Subversion bumped to 4 for version patch to recalculate normals.

Patch by Morten Mikkelsen, with some small changes.
2011-03-20 13:35:35 +00:00
Nathan Letwory
0ff06e21cd doxygen: blender/blenkernel tagged. 2011-02-27 20:40:57 +00:00
f01261d040 merge with/from trunk at r35190 2011-02-27 06:19:40 +00:00
1c0cf60377 =bmesh=
Fixed join meshes, and an annoying modifier bug (making modifiers
not work in editmode).  Also fixed a tesselation bug.

Also got edge slide to work right, yay!  Dunno why I couldn't get
it working right before; took me twenty minutes to fix.
2011-02-23 00:01:50 +00:00
0955c664aa fix for warnings from Sparse static source code checker, mostly BKE/BLI and python functions.
- use NULL rather then 0 where possible (makes code & function calls more readable IMHO).
- set static variables and functions (exposed some unused vars/funcs).
- use func(void) rather then func() for definitions.
2011-02-13 10:52:18 +00:00
7f5dbb7de0 Fix #26040: Crash converting curve to mesh
Really stupid mistake :)
2011-02-11 17:43:56 +00:00
264c8c2162 mesh.validate() now returns True if any corrections were made.
tested that correcting invalid meshes works by generating random meshes and checking that only the first call to mesh.validate() makes changes.

found 2 bugs in mesh validation.
- face sorting array wasn't assigned correct indices.
- removing invalid edges used wrong comparison.
2011-02-10 09:29:31 +00:00
97c57abfa3 fix [#25994] Meshes with no vertices gets NaN location on setting origin to geometry 2011-02-09 15:32:39 +00:00
5aa72b8726 BKE_mesh_validate() now corrects invalid meshes (optionally), added access for python so it can correct for bad imported geometry - mesh.validate(). 2011-02-09 15:13:20 +00:00
0884147698 fix [#25968] Crash on changing merge distance in array modifier with edgesplit modifier in chain 2011-02-09 04:45:53 +00:00
f6733d90e5 bugfix [#25523] Face extrude will crash Blender if array and subsurf modifier are added to mesh object
test_index_face() failed to fix indices like (6,0,0,6), making it (0,6,6,0).
2011-02-09 03:49:59 +00:00