Commit Graph

770 Commits

Author SHA1 Message Date
0a590aadf5 Add option to set object origin to the center of mass
This uses the weighted average of polygon centroids based on area
It work well in most cases but will be slightly wrong when polygons have 
many vertices.
2012-10-20 16:48:54 +00:00
67e2768570 quiet some -Wshadow warnings 2012-10-12 14:35:10 +00:00
563aa57db2 fix [#32829] Crash when making linked Mesh with UV Map local 2012-10-11 00:56:34 +00:00
9a8e82ae56 fix for crash loading durian file '08.5e_comp.blend' - external data pointer for face data was NULL. 2012-10-02 00:54:41 +00:00
aa49ca25d5 incorrect spelling in comments 2012-09-26 20:05:38 +00:00
9d0875828e small improvement to previous commit, use pre-calculated ngon normal to avoid calculating twice when dupli-scale is enabled. 2012-09-25 00:25:17 +00:00
b0bf816ece fix [#32646] Duplifaces can have wrong orientation with ngons
concave ngons could flip the dupliface, now use the faces normal when calculating the dupli-face.
2012-09-25 00:20:42 +00:00
f9467d28b9 remove sticky coordinates from blender, this was missing from the UI since 2.49.
TODO - drop support from the renderer still.
2012-09-21 11:19:16 +00:00
aff591c6e1 code cleanup: typos and set exceptional cases of zero length normals as UNLIKELY(). 2012-09-17 22:22:06 +00:00
699b23ecdb fix for type mismatch with SWAP() macro. 2012-08-25 19:43:15 +00:00
8995554105 Fix for some typos/spelling mistakes 2012-08-18 03:55:19 +00:00
e9caa21830 fix own error in recent smoothview cleanup, also correct some cross references in bmesh docs. 2012-08-17 14:43:20 +00:00
8f6197bd08 support for curve orco uv's as UV's in cycles.
ideally these would be used as generated coordinates, but this is tricly because cycles calculates its own orco's and doesnt know about curve settings.
2012-07-31 13:43:26 +00:00
46ac23d04e Fix: "void" function returning value. 2012-07-30 12:33:28 +00:00
8a9d1c0a79 Fix #31021: Render settings are not taken into account for curves
Refactored code a bit to make naming a bit more clear and added a
function to create mesh from given display list rather than from
object's displist.

Tested using plain curves (which doesn't imply using derived meshes)
and curves with constructive modifiers (which are using derived meshed).
2012-07-14 17:30:49 +00:00
4149ea5f50 Last spell checking (for now).
Only mysterious courant from bpy.types.ParticleSettings.courant_target reamins...
2012-07-04 15:52:07 +00:00
55027b8232 fix for memory leak in BKE_mesh_ensure_navmesh(), it would add 2 navmesh layers, once referencing the other. 2012-07-03 08:16:14 +00:00
f5f25b81e8 style cleanup:
also fix for building ghost test and fix double free in one of the tests
2012-06-17 09:58:26 +00:00
a99b9a5c3d Fix #31725: UV map order is ignored when opening in 2.6+ versions
Issue was caused by do_versions being used pdata as reference for active/render/
stencil/clone layer indices instead of fdata.

Added some utility functions used only by do_versions to be sure this indices
are set from fdata for pre-bmesh files.
2012-06-07 09:11:16 +00:00
1931aac1f7 style cleanup: (indentation) 2012-06-06 14:48:39 +00:00
4b4bf11469 Fix #31172: applying boolean removes uv maps
The issue was caused by CDDM_tessfaces_to_faces not dealing with CD layers.

There was already function BKE_mesh_convert_mfaces_to_mpolys which converted
mfaces to mpolys with converting all CD layers. Made it a bit more general so
it might work with given arrays of faces/polys and re-used it from CDDM module.

Checked with UV and sculpt data from Blender 2.61 and it loaded nice, so
hopefully there's no regressions in loading older files.
2012-06-04 12:10:38 +00:00
b33f0ef0e3 style cleanup 2012-05-27 19:40:36 +00:00
f7b116e0bd Add Mesh equivalent to BM_edge_other_vert().
/* Return the index of the edge vert that is not equal to 'v'. If
 * neither edge vertex is equal to 'v', returns -1. */
int BKE_mesh_edge_other_vert(const struct MEdge *e, int v);
2012-05-22 15:28:44 +00:00
be53fde9cd code cleanup:
- remove duplicate includes
- blender builds with -Werror in C++ for fluids/smoke
2012-05-21 06:33:45 +00:00
2d2d36fe3b code cleanup:
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.
2012-05-20 19:49:27 +00:00
599d213115 style cleanup: line length and ensure some macros error when not ending with ';' 2012-05-17 07:59:25 +00:00
37552ac167 Update create_vert_edge_map() to match create_vert_poly_map(). 2012-05-15 16:32:08 +00:00
c8ebfe1d12 code cleanup:
- use bmesh iterator macros in more places
- rename scanfill variables (were using same names as mesh faces/verts which was confusing)
2012-05-13 14:47:53 +00:00
305d341ec2 code cleanup: use vector math function minmax_v3v3_v3() and other minor vector function edits. 2012-05-13 11:05:52 +00:00
b224cbe6b6 fix for own bad logic with polygon normal calculation, was reading one past the loop array (reported as bug #31431). 2012-05-12 21:01:26 +00:00
c8cbe63947 Cycles: fix issues with texture coordinates and object scale. Auto texture
space size and location were outdated often, and already computed on demand
by blender internal, now do that through RNA as well.
2012-05-08 23:39:31 +00:00
6f20ef6d87 optimize ngon angle calculation in solidify modifier (was doing prev/next vector subtract and normalize for every vertex). now store the previous normalized vector for re-use.
also add BKE_mesh_poly_calc_angles() which is mostly a reference for now.
2012-05-08 14:58:38 +00:00
c93d7a193a style cleanup: BKE_*.c files which deal with library functions 2012-05-06 15:15:33 +00:00
c91cee2bb9 code cleanup: naming - BKE_mesh_* 2012-05-05 21:28:12 +00:00
1dccd4c98a code cleanup: naming - pose/armature/image
also use ..._find_name(..., name) rather then ..._find_named(..., name) --- both were used.
2012-05-05 16:03:57 +00:00
a731e13043 code cleanup: function naming, use BKE_*type* prefix. 2012-05-05 14:03:12 +00:00
4c5502bfd6 code cleanup: function naming for BLI functions. 2012-05-05 00:23:55 +00:00
8b1c1e9f61 code cleanup: use much simpler (and likely faster) polygon normal calculation in object mode. 2012-05-04 13:13:45 +00:00
5da2135eef code cleanup: double promotion & some style cleanup 2012-05-03 21:35:04 +00:00
959a717d91 Fix #31250, #31248: wrong vertex normals after transform apply, collada import,
sculpt shape key switch. All cases that called this function needed parameter
only_face_normals set to false, so changed it now.

Also fixed wrong user count for imported mesh from collada and simplified
previous fix for tesselated faces to polygons conversion.
2012-05-02 23:36:34 +00:00
f88cfd9168 Code and style cleanup in own modules in BKE and also mball module
- Make sure functions are named in way BKE_<object>_<action> (same way as RNA callbacks)
- Make functions which are used by mball.c only static and remove their prototypes
  from public header file.

Further cleanup is coming.
2012-04-28 16:49:00 +00:00
ef054e165c style cleanup: format 'for' loop macros the same as for loops, some renaming to BLI_array macros. 2012-04-28 15:14:16 +00:00
b340f930ec style cleanup: changes to brace placement / newlines - for/while/if/switch 2012-04-28 06:31:57 +00:00
ef0a4c0ba9 fix for bevel modifier creating invalid geometry - simply tell BM_face_split() to check for doubles. 2012-04-26 15:38:16 +00:00
6d2cd24010 fix memory leak in validating mesh and remove unneeded knife operator settings store. 2012-04-26 15:20:26 +00:00
ee6aaafd31 code cleanup: typos and set gcc attributes for string formatting. 2012-04-25 06:06:40 +00:00
e26ef899c3 clear the FGON edge flag when updating old meshes to polygons. (we may wan't to reuse the flag later) 2012-04-23 00:58:17 +00:00
5c89138684 style cleanup: comments 2012-04-22 11:54:53 +00:00
e57d258169 - fix memory leak in mesh_strip_loose_polysloops(), occurred during 3ds import.
- updating normals in py/api's mesh.transform() wasn't working and gave annoying print, disable this, script authors can call calc_normals explicitly if they need.
2012-04-22 00:27:38 +00:00
7e7d28e3ad fix [#31048] converting curve object to mesh makes object disapper from 3D view 2012-04-21 13:08:26 +00:00