Blender Git Loki

Git Commits -> Revision caafc81

Revision caafc81 by Sergey Sharybin (master)
April 16, 2012, 13:53 (GMT)
Fix #30720: Creating Navmesh crashes blender

In fact there were several issues fixed (all of them regressions since bmesh merge):

- Creating navmesh crashed because creating new faces for mesh was trying to set
default values for all customdata layers in this face. This requires memory
pool created for this datablock.
Usually this pool is creating on creating datablock if there're some elements
to be stored in this block. In cases of regular primitive creating it wasn't
an issue because they doesn't create customdata layers, they only creates
geometry.
Navigation mesh creates geometry and customdata layers (CD_RECAST layer)
which used to confuse a bit custom data functions. Solved by ensuring there's
memory pool created for polygons datablock after adding new custom data layer.
Most probably it's better to be resolved on CD level (like smarter track on
changed amount of stored data and so) but prefer not to make such global changes
so close to the release.
- Toggling edit mode lead to loosing recast datalayer. Solved by adding recast
layer to bmesh mask so it'll be copied to/from edit mesh.
- Some part of code assumed raycast layer is in face datablock, some that it's in
polygon datablock. Made it to be in polygons datablock.
Kind of temporary solution to make navmesh working, probably it'll fail if one
will want to edit navmesh by hand after it was generated.
Proper way would be to ensure the whole navmesh things are using ngons.

Commit Details:

Full Hash: caafc8184bb63f38eeac13f9acf7f7410cddc440
SVN Revision: 45697
Parent Commit: f4498e6
Lines Changed: +22, -20

5 Modified Paths:

/source/blender/blenkernel/intern/customdata.c (+1, -1) (Diff)
/source/blender/blenkernel/intern/DerivedMesh.c (+17, -17) (Diff)
/source/blender/blenkernel/intern/navmesh_conversion.c (+1, -1) (Diff)
/source/blender/editors/mesh/mesh_navmesh.c (+1, -0) (Diff)
/source/gameengine/Ketsji/KX_NavMeshObject.cpp (+2, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021