Brecht Van Lommel
c7882ec3bb
Fix for my last customdata fix, accidentally left in comments.
2013-10-05 19:56:32 +00:00
Brecht Van Lommel
7cb10c60af
Fix for unnecessary customdata warning with empty meshes.
2013-10-05 13:36:55 +00:00
Brecht Van Lommel
ffec71db84
Fix issues reported by coverity scan in recent changes to customdata code.
2013-10-01 12:48:41 +00:00
Campbell Barton
c037e766fa
fix [ #36781 ] triangulation modifer creases
...
new geometry was initializing its original index to 0 (so all edges displayed with the first edges crease value).
now initialize to NONE.
2013-09-24 03:58:19 +00:00
Dalai Felinto
1ce98989e5
bugfix: [ #36786 ] customdata layers are not merging taken the names into consideration
...
(which is also "[#36749 ] Joining objects with more than one uv map depends on list order")
Thanks Bastien Montagne and Brecht van Lommel for reviewing and some advice.
2013-09-21 05:42:34 +00:00
Campbell Barton
3403b7db8d
use stack memory for deform weight interpolation.
2013-09-15 05:17:19 +00:00
Bastien Montagne
44c7a87ada
Update to writefile: do not save TEMPORARY or NO_COPY CD layers!
...
Neede for next commit (split normals API).
2013-09-10 15:24:31 +00:00
Campbell Barton
e590abfb87
optimization:
...
- halve the number of allocs in layerInterp_mdeformvert list creation.
- use direct loop access in emDM_copyLoopArray
2013-07-22 18:01:27 +00:00
Campbell Barton
7db1d6556d
code cleanup: add break statements in switch ()'s, (even at the last case).
2013-07-21 08:16:37 +00:00
Campbell Barton
02468b290a
code cleanup: use MEM_mallocN rather then MEM_callocN when the array is
...
overwritten immediately after.
2013-07-19 10:41:16 +00:00
Campbell Barton
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
Campbell Barton
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
Campbell Barton
06be19c0ec
add asserts for passing in bad index values to DM_get_***_data, CustomData_get()
2013-07-10 05:38:36 +00:00
Campbell Barton
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
Campbell Barton
13bde6645b
code cleanup: remove callbacks only added to wrap MEM_freeN
2013-05-21 08:45:10 +00:00
Brecht Van Lommel
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
Campbell Barton
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
Campbell Barton
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
Campbell Barton
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
Campbell Barton
df664fa6d5
use bool for customdata functions.
2013-05-08 12:57:18 +00:00
Tamito Kajiyama
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
Tamito Kajiyama
765a10a8cd
Fix for Freestyle edge/face marks not working with most modifiers (except for Subdivision Surface).
2013-03-27 02:06:36 +00:00
Sergey Sharybin
18d2dd7e3a
Merging r55547 through r55594 from trunk into soc-2008-mxcurioni
2013-03-26 09:09:31 +00:00
Bastien Montagne
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
Tamito Kajiyama
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
Campbell Barton
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
Tamito Kajiyama
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
Campbell Barton
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
Tamito Kajiyama
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
Campbell Barton
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
Campbell Barton
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
Campbell Barton
9d713688ba
code cleanup: warnings
2013-02-04 16:20:39 +00:00
Campbell Barton
4d7583b66f
code cleanup: warnings, also add check in crash handler that a wmWindowManager is present.
2013-01-11 03:21:24 +00:00
Campbell Barton
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
Campbell Barton
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
Campbell Barton
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
Campbell Barton
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
Campbell Barton
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
Campbell Barton
12d921eb5b
minor improvement to CustomData_bmesh_merge(), allocate the correct size pool rather then always 512.
2013-01-07 15:35:20 +00:00
Campbell Barton
9a469b62ca
replace strcpy with BLI_strncpy or memcpy when the size is known.
2012-12-16 08:43:05 +00:00
Campbell Barton
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
Campbell Barton
db8b7fcabb
style cleanup and correct own invalid comment.
2012-10-31 11:45:41 +00:00
Campbell Barton
12ed0c64bc
make use customdata typeoffset more, add an assert to ensure its to date.
2012-10-31 09:50:24 +00:00
Campbell Barton
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
Campbell Barton
9e6d27bbf0
add BLI_STATIC_ASSERT macro.
2012-10-25 04:44:46 +00:00
Campbell Barton
f3ece5a108
style cleanup: trailing tabs & expand some non prefix tabs into spaces.
2012-10-21 05:46:41 +00:00
Campbell Barton
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
Campbell Barton
8944dab58a
bmesh decimator support for loop & edge customdata. (most importantly UVs and vertex colors).
2012-10-20 17:31:07 +00:00
Campbell Barton
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
Campbell Barton
e8872a8ea2
style cleanup: if();
2012-10-07 09:48:59 +00:00