Commit Graph

579 Commits

Author SHA1 Message Date
31c375b97a Mesh Drawing:
Option to draw mesh vertex-weights in editmode, available from the 'Mesh Display' panel.

TODO: get this to work when modifiers are applied in solid mode (texface-solidmode is working).
2013-04-13 20:20:21 +00:00
47fffc86bc Fix #34625: duplivert/face rendering with modifier could crash accessing UV and
generated coordinates on the original mesh, after the change that made duplis
take modifiers into account.
2013-04-03 20:10:08 +00:00
64d161de87 style cleanup:
also rename mesh_getVertexCos() --> BKE_mesh_vertexCos_get() to match curve function.
2013-03-26 07:29:01 +00:00
3dababa7ec code cleanup: name mesh functions more consistently, also use bools for mesh args. 2013-03-17 19:55:10 +00:00
7ec47aa864 code cleanup: shadowing 2013-03-16 14:33:32 +00:00
0c93ef3ba9 Fix: Vertex weight color calculation tried to use NULL pointer when called through DM_update_weight_mcol(). (Introduced in r55062.) 2013-03-10 19:10:20 +00:00
785c26a0c3 code cleanup: quiet warnings for recent weight paint theme addition. 2013-03-06 02:57:31 +00:00
f840ac9801 Weight Painting: Added userpref for zero_weight color. 2013-03-05 20:30:38 +00:00
8033834573 fix own regression since 2.65 [#34438] Solidify crease bug 2013-02-26 14:32:53 +00:00
375c0144c8 fix [#34378] GLSL materials using multiple UV layers fail in editmode
regression since BMesh merge.
2013-02-23 06:56:10 +00:00
b00c3b801b new weight paint draw option to display unweighted vertices with the option to check on the active group or all groups.
notes:
- vertices with zero weights are considered the same as vertices outside of a group.
- currently these show black but this can be made a theme color.
- multi-paint overrides this option (noted in description)
2013-02-22 04:09:04 +00:00
29a15f287f fix [#34098] Crash after using Decimate or Remesh modifiers
converting a derived mesh to a mesh didnt clear its selection history, which could be invalid after applying a modifier.
2013-02-04 11:28:31 +00:00
5006a39c27 replace calloc with malloc for arrays that are filled in right after. 2013-01-19 02:37:04 +00:00
ee0eb394c9 use openmp sections for felling origindex arrays 2013-01-18 06:26:06 +00:00
ce4116c35c don't call BKE_mesh_tessface_ensure() from DM_to_mesh(), caller must do this instead. 2013-01-10 05:50:21 +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
bbaeac3bf8 Update DerivedMesh for dynamic-topology sculpt mode
* Build bmesh PBVH in CDDM when dyntopo is enabled

* Disable all modifiers when dyntopo is enabled
2012-12-30 18:29:41 +00:00
45681464e7 use foreachMappedVert for ED_mesh_pick_vert() 2012-12-23 02:32:03 +00:00
99433a3466 minor bmesh improvements
- use 2 omp sections for vert -> (edge, face) selection flushing.
- dont use face-loop iterator for cddm_from_bmesh_ex conversion to give some speedup (some modifiers use this).
- use float(*)[3] for functions that return coords.
2012-12-21 07:28:14 +00:00
c26746ccec use struct type for VPaintData.vertexcosnos rather then float*. 2012-12-15 16:13:27 +00:00
a6bee579e9 move pbvh into BKE, it used many BKE bad level includes.
now blenlib/BLI doesn't depend on any blenkern/BKE functions,
there are still some bad level includes but these are only to access G.background and the blender version define.
2012-12-15 15:59:25 +00:00
11ffc7f5c2 remove modifiers_indexInObject(), just call BLI_findindex directly. 2012-12-15 05:46:41 +00:00
8274848fa1 fix [#31084] Dynamic Paint Blender File Crashes Blender.
was incorrect assert which didnt consider having no faces.
2012-12-06 08:10:24 +00:00
e33f9795fe Cleaning commented code in DM_update_weight_mcol (inactive since two releases at least...). 2012-12-03 14:12:40 +00:00
f43e75c4d6 py api: BMesh.from_object() was using the derivedFinal, which isn't always available - or may not have UV data if in the wireframe view.
update the function to calculate the derived mesh with bmesh data-mask each time.

resolves bug [#33205] Bmesh "from_object" gives "no usable mesh data".

also found 'mesh_build_data' could run with non mesh objects and fail silently - add an assert.
2012-11-21 00:31:47 +00:00
2bb174cfa4 style cleanup: indentation 2012-11-09 09:33:28 +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
ec67334e25 A few more BMesh errors messages translated, and "automated" translation for modifers too! 2012-10-27 11:12:09 +00:00
0e494b74c4 style cleanup 2012-10-26 04:14:10 +00:00
9804515cf0 bmesh todo: dont calculate normals in editmesh with modifiers applied, its assumed modifiers output correct normals at the moment. 2012-10-25 04:58:27 +00:00
2de2acc681 add CDDM_from_bmesh(), avoids using BMEditMesh in modifiers. 2012-10-24 07:24:11 +00:00
e038a1c613 reduce float comparisons for keying operation and despill. 2012-10-23 16:32:39 +00:00
b131359834 Fix #32867: normal map baking issue with flat shaded faces since bmesh. Also
removed the old unused normal map tangent computation code.
2012-10-23 14:57:49 +00:00
1767b65846 style cleanup: also rename bmesh_decimate.c --> bmesh_decimate_collapse.c 2012-10-23 03:38:26 +00:00
f3ece5a108 style cleanup: trailing tabs & expand some non prefix tabs into spaces. 2012-10-21 05:46:41 +00:00
Lukas Toenne
d3eb9dddd6 Better fix for #32846. Instead of using time change or object recalc condition, set an explicit object flag to disable particle system modifier update during dupli list creation. This is more transparent and should prevent issues with hair path generation being skipped. 2012-10-18 15:54:24 +00:00
3563904050 revert r50969, gives problems with weight paint + modifiers, need to investigate further after release. 2012-10-01 14:23:57 +00:00
a9efe26ab8 DM_set_only_copy() wasn't setting only-copy flags for loops and polygons. (should have been added during bmesh merge) 2012-10-01 04:59:21 +00:00
0d5d2146eb code cleanup: make shape key api names consistent with our new convention. 2012-09-19 10:12:07 +00:00
19863a7268 fix for 3 obvious mistakes/bugs. 2012-09-15 06:30:40 +00:00
7a71f58af3 fixes for NULL checks, remove some redundant checks and add some in that have been removed by accident as code has been updated. 2012-09-14 06:17:14 +00:00
a512cac545 code cleanup: move get_selected_defgroups into object_deform.c and make it behave like similar functions, also when drawing vertex weight colors, only call this function when multi-paint is enabled. 2012-09-05 03:45:32 +00:00
56534ecdcb style cleanup: also add debugging print function for derived mesh DM_debug_print_cdlayers() 2012-09-03 02:41:12 +00:00
ed0489bb6e style cleanup: also spelling 2012-08-24 23:22:34 +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
84bf3e48c0 style cleanup: use c style comments in C code 2012-07-06 23:56:59 +00:00
1aa27e240c code cleanup: replace some non utf8 chars 2012-06-03 11:16:13 +00:00
9547b76c2e This fixes a precision issue in multi-paint so that near zero values do not cause flickering as you paint.
It also changes multi-paint's "zero weight color" to black again--it was unintentionally changed to red some time late last year when an aspect of the colors were changed.
2012-05-31 17:22:52 +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