Commit Graph

410 Commits

Author SHA1 Message Date
73e73ed1e0 change default name of Texture face layer to UVMap, while we fake UV's and texface as being the same. 2012-02-24 12:10:41 +00:00
53fece44cf style cleanup for blenkernel, no functional changes. 2012-02-23 02:17:50 +00:00
92c47145fd bmesh python api change in internal behavior.
* Only have 1 python object per bmesh, vertex, edge, loop, face.
* Store pointers back to the python data in a custom data layer so as not to use more memory for normal editing operations (when pythons not running).
* Currently this data is created and freed along with the BMesh PyObject.
* Incidentally - this fixes comparisons for bmesh elements which wasnt working before.
2012-02-22 16:08:30 +00:00
9064978d0b Remove unused code left from old multires interpolation stuff
- Removed validate() callback for MDisps layer. It wouldn't actually work
  correct from CustomData layer and all needed data might be validated from
  BMesh interpolation level. Also this callback was never actually used in
  BMesh, so can't see why we'll want to have it in structures.
- Removed layrInterp_mdisps callback. Interpolation now happens from
  another level (bmesh_interp) and this callback isn't needed anymore.
- Removed all function from multires.c which were used by old interpolation
  stuff and seems to be useless for other usages.
- multires_topology_changed is still marked as a TODO, Probably it's not
  needed anymore, buy better to keep for now until it'll be 100% clear this
  function isn't needed and all needed re-allocations happens in bmesh_interp.
  Otherwise, it'll be needed to be ported to new system.
2012-02-21 17:24:21 +00:00
b2fd08c754 Flip displacement direction after interpolation in bmesh_loop_interp_mdisps
This is needed because displacement might been interpolated from a grid
with different orientation and in this case X and Y components of displacement
are need to be flipped in needed order.

Order of flipping is determining by projecting source grids axis orientation
on target grid axis. This probably will give some unwanted artifacts when
interpolating non-planar face but currently can't think about better way
to determine how to flip displacement.

This commit makes operators like Subdivide works much more unpredictable
for sculpting data, but this stuff should be rethinked much more global
because current approach is not acceptable.
2012-02-21 17:23:03 +00:00
a368e6771a - remove some unused editmesh functions.
- copy & rename EditMesh stricts for use with scanfill (remove unused members)
2012-02-19 22:17:30 +00:00
9b57b2d9dc Code cleanup: remove duplicate OR'ing of CD_MASK_MDISPS. 2012-02-08 05:52:52 +00:00
543fb27fd0 support for 'origspace' data layer - used for hair on subsurf mesh.
currently only works for 3/4 sided faces.
2012-02-05 11:30:26 +00:00
c7e8af13d4 remove cellalloc, from my tests jemalloc beats cellalloc, so we better just use a better malloc replacement.
See Details:

http://wiki.blender.org/index.php/User:Ideasman42/BMeshBranchReview#Update_43694
2012-01-25 20:18:12 +00:00
a7b0a11811 svn merge ^/trunk/blender -r43278:43294 2012-01-11 15:04:54 +00:00
51bada696f Longer names support for all ID and other object names
This commit extends limit of ID and objects to 64 (it means 63 meaning
characters and 1 for zero-terminator). CustomData layers names are also
extended.
Changed DNA structures and all places where length constants were hardcoded.

All names which are "generating" from ID block should be limited by MAX_ID_NAME-2,
all non-id names now has got own define called MAX_NAME which should be used all
over for non-id names to make further name migration stuff easier.

All name fields in DNA now have comment with constant which corresponds to
hardcoded numeric value which should make it easier to further update this
limits or even switch to non-hardcoded values in DNA.

Special thanks to Campbell who helped figuring out some issues and helped a lot
in finding all cases where hardcoded valued were still used in code.

Both of forwards and backwards compatibility is stored with blender versions newer
than January 5, 2011. Older versions had issue with placing null-terminator to
DNA strings on file load which will lead to some unpredictable behavior or even
crashes.
2012-01-11 08:51:06 +00:00
a95407752a svn merge ^/trunk/blender -r42967:42973 2011-12-29 12:17:45 +00:00
e63cb930ae use math functions for customdata interpolation funcs 2011-12-29 11:18:12 +00:00
974c161b50 minor edits 2011-12-28 13:24:49 +00:00
1f02209957 enable USE_BMESH_FORWARD_COMPAT and merge in some customdata functions 2011-12-28 13:23:59 +00:00
312b080397 initial merge of bmesh customdata layer code into trunk, ifdef'd out for now with USE_BMESH_FORWARD_COMPAT. 2011-12-28 13:15:17 +00:00
df9aafa8bc sync customdata layers up with trunk. existing bmesh files will crash on load but this is unavoidable. 2011-12-28 13:11:46 +00:00
ff2eb8d72f svn merge ^/trunk/blender -r42914:42918 2011-12-28 10:27:25 +00:00
2e92b14bc6 copy BLI_edgehash changes from bmesh branch, main change is use of mempool. 2011-12-28 10:20:37 +00:00
5d46acd59f minor edits and correcton to assert 2011-12-28 09:14:09 +00:00
337d397d09 merge in customdata changes from BMesh - biggest change is caching the layer index values in a typemap. 2011-12-28 09:11:11 +00:00
8de51d3736 reduce size of typemap, and minor changes to sync with trunk 2011-12-28 08:33:19 +00:00
2cd5436a81 svn merge ^/trunk/blender -r42839:42871 2011-12-25 21:31:19 +00:00
ddcf56366d change customdata mask from an 'unsigned int' to an 'u_int64_t', since BMesh branch has run out of bits 2011-12-23 20:30:23 +00:00
2457d4f5ab svn merge ^/trunk/blender -r42680:42722 2011-12-19 10:40:48 +00:00
90ef435145 Fix a bug in CustomData_duplicate_referenced_layer(_named) functions: MEM_dupallocN does not work with complex layers like CD_MDEFORMVERT ones, so rather use copy func when available. 2011-12-19 08:26:53 +00:00
ad96dacbc5 style edit only - move parenthesis onto second line of function definition (in keeping with most of blenders code)
also split some long lines in own code.
2011-12-17 00:52:36 +00:00
cead1e1977 added mesh_calc_normals_ex() which is mesh_calc_normals() with an option to skip recalculating the vertex normals (only calculate poly/face normals instead).
also removed unneeded allocation of face normals.

otherwise no functional change.
2011-12-06 22:55:41 +00:00
56da69fd03 Fix for [#29467] Selection of active vertex color layer doesn't work
Need to push active layer indices from loops & polys to faces again after tesselations
2011-12-01 09:49:27 +00:00
f28fd56f8f svn merge ^/trunk/blender -r42095:42116 2011-11-24 05:33:22 +00:00
2345efc6c5 Patch #29336: renaming UV (Texture) Layer to UV Map in the user interface,
by Gaia Clary.

Rationale: the name was confusing and not always used consistently, and this
map itself is not something that can be layered, rather the map can be used
as texture coordinates in some layered setup.

The original intent was to indicate this contained more than just UV's, but
the game engine settings have already been moved out, and apparently users
didn't really get this from the name anyway.
2011-11-23 17:25:25 +00:00
f850e76e04 remove assert & make warning print more helpful 2011-11-23 16:39:07 +00:00
8c03c3a630 Improve checking for getting layer "n" of a layer type and skip zero-length allocations for Bmesh layers 2011-11-20 16:19:56 +00:00
3ed866d2fc svn merge -r41926:41932 ^/trunk/blender 2011-11-16 19:57:20 +00:00
3dcc9aef96 merge mempool changes from bmesh (adds mempool iterator). 2011-11-16 19:31:42 +00:00
e59ab6486f svn merge -r41751:41779 ^/trunk/blender 2011-11-15 02:05:32 +00:00
2266c7fc1c Add CD_POLYINDEX layer to reduce need for retesselations 2011-11-13 15:13:59 +00:00
e84c0980a3 correct indentation and some whitespace edits (no functional changes) 2011-11-11 13:09:14 +00:00
92d35b74e7 svn merge -r41722:41723 ^/trunk/blender 2011-11-11 06:25:45 +00:00
b0a21add8a replace bmesh specific macros with math functions, also some pedantic formatting edits. 2011-11-07 09:02:10 +00:00
83cef039af Fix a minor bug with incorrect ordering of arguments to customdata api 2011-10-31 00:10:51 +00:00
46ae692710 Merge with trunk r41342 2011-10-28 17:00:53 +00:00
dbe1c4277a Fix "[#29036] Crash on solidify" and a few misc subsurf and derived mesh bugs that were blocking correct functionality of "apply modifier to editcage" when you have a subsurf + solidify modifier on the stack 2011-10-27 12:17:02 +00:00
cfb435e8a5 Fix 28960: if BM_free_data_layer[_n] removed the last layer, we didn't clear data->pool and instead kept it pointing to the pool that gets freed at the end of update_data_blocks 2011-10-26 13:24:58 +00:00
15e6d6cd75 svn merge ^/trunk/blender -r41226:41227 . 2011-10-24 12:43:08 +00:00
ad1d3dd30f svn merge ^/trunk/blender -r41175:41200 --- will need to apply fix after 2011-10-24 07:56:42 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
d4541fd891 Merge with trunk r41197 2011-10-22 16:43:23 +00:00
74017cb020 header cleanup and typo's 2011-10-22 01:53:35 +00:00
4e118bb22f svn merge ^/trunk/blender -r40890:40950 2011-10-14 01:35:20 +00:00