Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2014-01-12Style Cleanup: whitespaceCampbell Barton
2014-01-05Fix T38024 crash when rebuilding sculpt mode buffers.Antony Riakiotakis
Main issue here is that glBuf* calls were invoked from threads different than main thread. This caused a crash (since those do not have a GL context active). Fix here is twofold: * add an ID buffer in buffer pool that handles pbvh buffers and is freed from main thread when gpu_buffer_pool_free_unused is called. * do not create glbuffers in derivedmesh creation routine, rather tag nodes for update and create those in the draw function (guaranteed to be called from main thread) Reviewed By: brecht Differential Revision: https://developer.blender.org/D169
2014-01-03Code clean-up change naming of gpu buffers used by pbvh to betterAntony Riakiotakis
reflect that. Previous name GPU_Buffers was very similar to GPU_Buffer, renamed to GPU_PBVH_Buffers
2013-12-22Style Cleanup: remove preprocessor indentation (updated wiki style guide too)Campbell Barton
2013-10-13fix for over-alloc in dyntopo, was allocating the vertex size, not pointer ↵Campbell Barton
size (~85% wasted space).
2013-10-10style cleanupCampbell Barton
2013-10-04Fix #36930: dynamic topology sculpting with masks gave bad results:Brecht Van Lommel
* The mask was not subdivided properly on splitting edges, which gave interesting but definitely wrong fractal-like borders around masks. * Edge splitting was only done where the mask was < 50%, with the reasoning that you can't do a 50% topology update. But this gives an ugly border in the mesh. The mask should already make the brush move the vertices only 50%, which means that topology updates will also happen less frequent, that should be enough.
2013-10-03Fix an own regression introduced in the dyntopo cleanup commits. Do notAntony Riakiotakis
remove a vertex from the pbvh if the only face it was part of was removed from the pbvh. This should work but no time to investigate now properly, and better have a solid release. The problem could be seen when sculpting to open meshes. Some vertices and faces on the boundaries would become stuck and unresponsive.
2013-09-12code cleanup: headers - doxy comments.Campbell Barton
2013-08-28avoid calling CustomData_bmesh_get to get CD_PAINT_MASK per vertex while ↵Campbell Barton
sculpting, store offset directly.
2013-08-26replace hashes with sets where possible.Campbell Barton
2013-08-24ghash: reserve size when its known or can be guessed close enough.Campbell Barton
also avoid allocs per node in pbvh_bmesh_node_limit_ensure()
2013-08-21rename recently added BLI_ghash_assign() -> BLI_ghash_reinsert()Campbell Barton
2013-08-21Scultping: Growing the pbvh node container should use malloc instead ofAntony Riakiotakis
calloc. Since we copy the first 1/1.3 part of the new array from the existing nodes, only the rest 0.3/1.3 should be initialized to zero. This should in theory cut down the times of occasional hangs with dyntopo, since my guess is that it is caused by dynamic reallocations. Maybe a linked list structure would help here? This is a bigger change though, leaving as is for now. Also, minor cleanup, delete duplicate ghash deletion and remove unneeded commented code.
2013-08-21bmesh api cleanup, face creation args now accept an example face (as with ↵Campbell Barton
vertex and edge), also replace BM_face_create_quad_tri_v with BM_face_create_verts
2013-08-21use BM_CREATE_NOP arg rather then zero, with pointer and bool args in either ↵Campbell Barton
side in some cases it gets a bit confusing. also correct edge-rotate where bool->flag conversion worked by accident.
2013-08-21style cleanup: also use ARRAY_HAS_ITEM macro for mempool checkCampbell Barton
2013-08-19Dyntopo:Antony Riakiotakis
* Actually check if normal recalculation flags exists and set it when splitting nodes in dyntopo. Right now, nodes that need GPU buffer update will always get in the list to get their normals generated, but to avoid a possible future breakage better do it right now. * Avoid keeping deleted/removed vertices in vertex-to-node and unique vertex hashes, since some checks rely on those and may go awry if these still exist. Also they pollute the hashes, and may hurt performance somewhat.
2013-08-19Dyntopo:Antony Riakiotakis
Turn off pbvh normal update flag after recalculation, saves recalculating normals every frame when not stroking the mesh. For this to work reliably with undo we need to support original normals in the bm_log (was marked as a TODO already in the code), so that undoing avoids having invalid normals in the mesh (since we don't update every frame anymore). This was added in this commit as well. Also added some (disabled) quite paranoid checks in the bmesh valication code for dyntopo hoping to catch the real normal update issue. No luck there yet.
2013-08-18Fix #34413 Dyntopo, smooth shading normals not getting uploaded to GPUAntony Riakiotakis
and undo buffers. When we have smooth shading we must not only update the unique vertex normals.
2013-08-18add hash function BLI_ghash_assign, BLI_edgehash_assignCampbell Barton
avoids remove,insert and only hashes the key once.
2013-08-17style cleanupCampbell Barton
2013-07-24dyn-topo: maintain materials for new faces.Campbell Barton
also minor optimization for BM_edge_in_face(), check edges radial loops rather then the faces edges since normally there are 0-2 faces attached to an edge compared to 3+ edges in a face.
2013-05-21remove return value from MEM_freeN, it wasn't used anywhere and was cast to ↵Campbell Barton
a different function signature. (which evidently works but error prone).
2013-05-19fix for mistake in r56903Campbell Barton
2013-05-18Optimizations for dyntopoCampbell Barton
- creating faces was unnecessarily checking if they already existed. - deleting a face did edge-lookups, when the edges are already available from the face-loops.
2013-03-18style cleanupCampbell Barton
2013-03-17code cleanup: incorrect sized array args, remove some redundant code.Campbell Barton
2013-03-16Stop dyntopo updates from happening in masked areasNicholas Bishop
Fixes [#34348] Collapse short edges affects masked geometry /projects.blender.org/tracker/?func=detail&aid=34348&group_id=9&atid=498 Fixed by disallowing topology updates on edges with a vertex masked at 50% or greater. This is a necessarily arbitrary choice; can't do halfway updates for topology like we can with displacement.
2013-03-10style cleanup: whitespaceCampbell Barton
2013-03-08style cleanupCampbell Barton
2013-03-04patch [#34103] use boolean in path functions and add comments.Campbell Barton
path_util_1.patch from Lawrence D'Oliveiro (ldo)
2013-03-01style cleanup: braces with multi-line statements, also add some comments.Campbell Barton
2013-02-25Fix for collapse-edges crash in dyntopoNicholas Bishop
Was incorrectly testing for a vertex in a set with BLI_ghash_lookup rather than BLI_ghash_haskey; the key in this case is always null so the test failed. This could leave the PBVH in an inconsistent state, since the top-level map of BMesh vertices to PBVH nodes would indicate the vertex was in a node, but that node wouldn't actually have any faces using the vertex. That inconsistent state would eventually lead to a crash in pbvh_bmesh_vert_remove(). Fixes http://projects.blender.org/tracker/?func=detail&atid=498&aid=34370&group_id=9
2013-02-02style cleanupCampbell Barton
2013-01-26Check for deletion before moving vert in dyntopo collapse edgeNicholas Bishop
Fixes [#33964] Dyntopo crash with edge collapse + undo projects.blender.org/tracker/?func=detail&aid=33964&group_id=9&atid=498
2013-01-20Delete loose edges left behind by sculpting with collapse-short-edgesNicholas Bishop
After deleting a face, check for unused edges and delete them. Fixes bug [#33891] projects.blender.org/tracker/?func=detail&aid=33891&group_id=9&atid=498
2013-01-19Skip hidden faces in PBVH BMesh ray intersection testNicholas Bishop
Moved the GPU function gpu_bmesh_face_visible() to BKE_paint and inverted the test to match equivalent tests for other mesh types: paint_is_bmesh_face_hidden(). Changed BKE_pbvh_bmesh_node_save_orig() to not save hidden faces into the triangle array. Modified the non-use-original branch of pbvh_bmesh_node_raycast() to skip hidden faces. Fixes bug #33914: projects.blender.org/tracker/index.php?func=detail&aid=33914&group_id=9&atid=498
2013-01-19dyntopo optimization - fast path for edges with 2 faces using it, was ↵Campbell Barton
counting the edge-faces then using an iterator, instead use BM_edge_loop_pair()
2013-01-17minor speedup for dyntopo edge queue - replace iterator with while loop.Campbell Barton
2013-01-17fix bug in dyntopo - check to remove pbvh vert was always false.Campbell Barton
2013-01-17code cleanup: rename BMVert *v[3]; --> 'v_tri', since 'v' is normally for ↵Campbell Barton
single verts.
2013-01-17speed-up dyn-topo by storing the edge-loops rather then edge-faces.Campbell Barton
- no need for bm_triangle_other_vert_find(), the other vert is known relative to the loop. - no need for bm_face_edge_backwards(), the verts are in order in the loop.
2013-01-17optimize bmesh operations that use triangle BMFace's (dyn-topo and mesh ↵Campbell Barton
conversion).
2013-01-14use booleans for bmesh api.Campbell Barton
2013-01-02extend BLI_bufferCampbell Barton
- add option to calloc or not, existing code wasnt consistent here, would calloc on first alloc but not on realloc, also - the static memory was never zero'd. use flag BLI_BUFFER_USE_CALLOC to ensure all new memory is zero'd (static/alloc/realloc's). - add BLI_buffer_declare_static / BLI_buffer_declare so its possible to have a buffer that never uses static memory.
2012-12-31add ".hh" as an extension for source scripts.Campbell Barton
2012-12-31rename BM_edge_calc_squared_length -> BM_edge_calc_length_squared, matching ↵Campbell Barton
len_v3, len_squared_v3
2012-12-31style cleanupCampbell Barton
2012-12-30Code cleanup: rename BLI_pbvh to BKE_pbvhNicholas Bishop