Commit Graph

449 Commits

Author SHA1 Message Date
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
6972e19fd5 code cleanup:
- replace (strcmp(vfont->name, FO_BUILTIN_NAME) == 0)  with  (BKE_vfont_is_builtin(vfont)).
- reduce some double promotions.
2012-08-03 22:12:57 +00:00
cfb7aee017 style cleanup 2012-07-07 22:51:57 +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
4e0492e3bc fix compiler error 2012-05-28 21:25:17 +00:00
3d98da9b0f Fix for bug [#31613] Cycles 3d viewport material display mode + skin modifier related crash
When in material display mode, mesh_calc_modifiers() calculates the
orco DerivedMesh, which uses a different CustomDataMask. In
particular, it does not necessarily include the current modifier's
requiredDataMask, so those layers might get set to NO_COPY. For the
skin modifier, this resulted in a crash when the modifier internally
copies the DerivedMesh and the output does not contain the expected
MVertSkin layer.

Fixed by adding the requiredDataMask to the orco DM's CustomDataMask.

Also added a debugging function to customdata.c:
customData_mask_layers__print(CustomDataMask mask);

This will print out the names of all the CD layer types in the mask.
2012-05-28 21:02:44 +00:00
dab1d8e487 style cleanup 2012-05-22 22:03:41 +00:00
45265b326a Add operator to extract armature and vertex groups from skin.
* The operator creates bones for each input edge (does not subdivide
  them like the skin operator does), adds a fake root bone for skin
  roots with multiple children.

* The operator adds vertex weight groups to the original mesh.

* Make copy_object_transform() public, used to match the armature
  object to the mesh object.

Skin modifier documentation:
http://wiki.blender.org/index.php/User:Nicholasbishop/SkinModifier
2012-05-22 15:29:57 +00:00
417ac69320 Draw skin vertex roots in edit mode.
Roots are drawn with a view-oriented dashed red circle around the
vertex location. The circle's radius is the average if the skin
vertex's X and Y radii.

Skin modifier documentation:
http://wiki.blender.org/index.php/User:Nicholasbishop/SkinModifier
2012-05-22 15:29:27 +00:00
396a3d31cc Add MVertSkin DNA/RNA and customdata (CD_MVERT_SKIN).
The MVertSkin currently just stores local skin radii and skin
flags (MVertSkinFlag).

Skin modifier documentation:
http://wiki.blender.org/index.php/User:Nicholasbishop/SkinModifier

Reviewed by Campbell Barton.
2012-05-22 15:18:43 +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
53ee7908d6 style cleanup: whitespace 2012-05-12 16:11:34 +00:00