Commit Graph

410 Commits

Author SHA1 Message Date
dc591a633e previous commit r58256, had error in editmode (somehow it worked in most tests still).
also don't decrement active indices below zero (also a problem in 2.67).
2013-07-15 09:03:28 +00:00
dc9beee3e2 fix for error (-1 index into array) when removing customdata layers with no data, delete_customdata_layer was using layer data pointer to check weather to adjust index values (but both pointers can be NULL). Remove this code and do in customdata.c 2013-07-15 06:29:09 +00:00
06be19c0ec add asserts for passing in bad index values to DM_get_***_data, CustomData_get() 2013-07-10 05:38:36 +00:00
d7f51f83f6 remove CD_MASK_NORMAL from CD_MASK_DERIVEDMESH, bmesh merge included this but its not needed.
Now add asserts to make sure this layer is only added once the modifier stack has been calculated.
this saves normal layer being calculated whenver vertex normals need updating.
2013-05-30 18:09:19 +00:00
13bde6645b code cleanup: remove callbacks only added to wrap MEM_freeN 2013-05-21 08:45:10 +00:00
8ef3c42f80 Fix #35347: constraints with vertex group targets were not using the vertex group
weights, it assumed all weights were 1. This gave very different results with the
new bevel modifier due to slightly different vertex group interpolation.
2013-05-14 16:22:53 +00:00
1e784c54cd bmesh speedup: skip free-realloc while running CustomData_bmesh_merge() when nothing is changed (happens quite often that there is nothing to do). 2013-05-09 10:41:05 +00:00
8ac2fee57a minor speedup for bmesh - add CustomData_bmesh_free_block_data(), use
when the block would be immediately allocated again.
2013-05-08 13:00:25 +00:00
f554c264da speedup for freeing bmeshes, skip calling free on every
vert/edge/face/loop if there are no free functions for the customdata
layers.
2013-05-08 12:59:56 +00:00
df664fa6d5 use bool for customdata functions. 2013-05-08 12:57:18 +00:00
b4bd232da0 Removed CD_MASK_FREESTYLE_EDGE and CD_MASK_FREESTYLE_FACE from CD_MASK_BAREMESH
and moved them to init_render_mesh() in convertblender.c where these CustomData
layers are specifically required.
2013-04-05 19:34:26 +00:00
765a10a8cd Fix for Freestyle edge/face marks not working with most modifiers (except for Subdivision Surface). 2013-03-27 02:06:36 +00:00
18d2dd7e3a Merging r55547 through r55594 from trunk into soc-2008-mxcurioni 2013-03-26 09:09:31 +00:00
6926596174 More new data names translation (most cases should be covered now).
Also done a few cleanup here and there...
2013-03-25 08:29:06 +00:00
385c72f5f2 Merged changes in the trunk up to revision 55546.
Conflicts resolved:
source/blenderplayer/bad_level_call_stubs/SConscript

Partly reverted changes to intern/cycles/blender/addon/ui.py in revision 52899
to make it easier to merge trunk changes.
2013-03-24 12:13:13 +00:00
fa1cd9ce9b python api: add functionality to remove vertex color layers.
note: that this intentionally removes check to exit vpaint mode when a vertex color layer is removed,
	  since being in vertex-paint mode without a vertex color layer is supported.

also minor change to drawing camera limits while picking from previous commit.
2013-03-21 20:15:39 +00:00
c1ceab1281 Merged changes in the trunk up to revision 55357.
Resolved conflicts:
release/datafiles/startup.blend
source/blender/editors/space_nla/nla_buttons.c

Also updated source/blender/blenkernel/intern/linestyle.c as a follow-up of
recent changes for the use of bool.
2013-03-18 00:48:59 +00:00
baf3bb37a9 - ghost-sdl builds again.
- without python builds without warnings.
- replace MAXFLOAT -> FLT_MAX in some areas, MAXFLOAT overflows (lager then float range).
- add cmake option WITH_GCC_MUDFLAP to enable libmudflap use.
2013-03-16 20:49:46 +00:00
894c240f9d New implementation of Freestyle edge/face marks
The previous implementation of Freestyle edge/face marks was refactored
based on suggestions from the latest code review by Campbell.  The new
implementation relies on mesh CustomData to store edge/face marks, instead
of introducing extra flags in the core Mesh and BMesh data structures.
The CustomData-based implementation will allow further additions of new
edge/face attributes because of the independence from Mesh/BMesh.

This revision is work in progress, mainly intended to address the review
comments and ask for further code review in view of the trunk merger in
the upcoming 2.67 release.
2013-03-13 06:44:43 +00:00
74a9c1510a Alternate fix for bug [#34369], where invalid polygon normals could be saved in the mesh data and in the file.
This was from initial BMesh merge, but should not have been added in since face normals are calculated and stored in the DerivedMesh.

Toggling editmode would remove poly-normals so its unlikely anything relies on this custom-data.
2013-03-06 03:58:38 +00:00
0d5b028d43 patch [#34103] use boolean in path functions and add comments.
path_util_1.patch from Lawrence D'Oliveiro (ldo)
2013-03-04 19:27:51 +00:00
9d713688ba code cleanup: warnings 2013-02-04 16:20:39 +00:00
4d7583b66f code cleanup: warnings, also add check in crash handler that a wmWindowManager is present. 2013-01-11 03:21:24 +00:00
0c3e570868 remove CustomData_get_active_offset(), use CustomData_get_offset to return the active layer, matching CustomData_get() 2013-01-11 01:41:27 +00:00
c3c3df3aec editmesh texface drawing, reuse customdata offset rather then looking up each UV and vertex color, gives overall ~9.5% drawing speedup in my tests.
was also doing NULL checks on UV's which are never NULL in this case.
2013-01-10 12:07:01 +00:00
ceb9701507 don't store bevel weights or edge crease customdata layers in editmode unless they are needed.
configurable in 'Geometry Data' panel, will be added when running crease edges transform for example.
2013-01-10 04:43:31 +00:00
b0c084c6cc fix [#33797] decimate modifier bug on uv-coordinates when mesh uses vertex color
if vertex colors had no seams - it would interpolate the UV's too, now interpolate per-layer.
2013-01-08 16:39:36 +00:00
e62bc29a9b fix [#33792] Accessing a bmesh object created by from_object crashes blender
Issue was customdata wasnt being initialized for layers in the destination BMesh but not in the source data.
2013-01-08 14:25:17 +00:00
12d921eb5b minor improvement to CustomData_bmesh_merge(), allocate the correct size pool rather then always 512. 2013-01-07 15:35:20 +00:00
9a469b62ca replace strcpy with BLI_strncpy or memcpy when the size is known. 2012-12-16 08:43:05 +00:00
e2fe7751d6 code cleanup: replace most DO_MINMAX2 -> minmax_v2v2_v2
also add UNPACK macros's. handy for printing vectors for eg.
2012-11-15 22:20:18 +00:00
db8b7fcabb style cleanup and correct own invalid comment. 2012-10-31 11:45:41 +00:00
12ed0c64bc make use customdata typeoffset more, add an assert to ensure its to date. 2012-10-31 09:50:24 +00:00
00acdb6292 remove CD_POLYINDEX customdata layer:
reported as [#29376] BMESH_TODO: remove tessface CD_ORIGINDEX layer

for a single mesh there could be 3 origindex mappings stored, one on the polygons and 2 on the tessfaces.
(CD_POLYINDEX and CD_ORIGINDEX).

as Andrew suggests, now tessfaces (which are really a cache of polygons), using origindex to point to polygons on
the same derived mesh, and polygons only store the original index values.
2012-10-30 19:20:17 +00:00
9e6d27bbf0 add BLI_STATIC_ASSERT macro. 2012-10-25 04:44:46 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
eee64aeccf bmesh-decimate now only does CustomData_has_math for loop layers, add CustomData_has_interp() for vert & edges. 2012-10-20 17:39:56 +00:00
8944dab58a bmesh decimator support for loop & edge customdata. (most importantly UVs and vertex colors). 2012-10-20 17:31:07 +00:00
57004cfb5a style cleanup:
also add helper makefile targets:
* tbz - makes a tar.bz2 of an svn export
* test_style_qtc - outputs style checks in qtc task format.
2012-10-10 23:44:07 +00:00
e8872a8ea2 style cleanup: if(); 2012-10-07 09:48:59 +00:00
1795bd600b Fixed memory leak in CustomData_interp in cases when sources count is more than
SOURCE_BUF_SIZE and there's no more destination layers in main cycle of this function.
2012-10-01 14:15:05 +00:00
3d1cdfbb38 remove sticky coords from blender and the internal render engine. 2012-09-21 11:37:51 +00:00
d88d41b265 remove default name from CD_SKIN_NODE LayerTypeInfo so its treated as a singleton. theres no need to have multiple skin layers. 2012-09-21 06:14:22 +00:00
aaafa0c2fe code cleanup: move file string defines into BLI_path_utils.h, BKE_utildefines is now unused but keep incase we want to add defines there later. 2012-09-03 22:04:14 +00:00
c3bc1da93c alternate fix for bug [#32395],
now customdata is interpolated into a temp variable and applied at the end of each layer interpolation function.

So this now works for CDDM customdata interpolation and avoids duplicating the customdata when the source and destination overlap.
2012-08-24 17:01:35 +00:00
93d89ec768 correct assert for customdata overlap, also quiet uninitialized warning in transform. 2012-08-24 08:17:53 +00:00
f6a6fa419e fix [#32395] BMesh data interpolation feedback loop 2012-08-23 17:16:11 +00:00
bbd8863956 code cleanup: use const weights for customdata interpolation functions 2012-08-23 09:54:15 +00:00
9e742ffc2b style cleanup: also correct some doxy comments 2012-08-18 13:07:48 +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