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
2021-08-27Sculpt dyntopo: support sharp edge flagsJoseph Eagar
* Sharp edge flags are now supported and are treated much the same as face set boundaries: + Dyntopo preserves them + Interior smoothing treats them as boundaries + Corners are detected and pinned in smoothing + TODO: add a brush flag to ignore sharp boundaries for smoothing. * Seams are also preserved, but don't affect smoothing. * BMLog now saves edges. * The new edge split function is enabled. * Dyntopo now pushes new combined BMLog entries in its top-level function, to avoid scary id reuse edge cases. * SCULPT_vertex_is_boundary/corner now take a bitmask of which types of boundaries you wish to query instead of check_face_sets.
2021-08-24* Implemented bounday/face set corner handling.Joseph Eagar
* New function SCULPT_vertex_is_corner, similar to SCULPT_vertex_is_boundary it takes argument to check face sets. PBVH_FACES/GRIDS version is incomplete. It returns a bitmask of whether the vert is a boundary corner and/or a face set one. * PBVH_BMESH uses a somewhat more expensive calculation to detect corners of face set islands by edge angle. This is currently not done for boundary corners. Corner pinning now happens in: * The internal smoother dyntopo uses for stability reasons. * SCULPT_vertex_neighbor_average_interior. * Topology rake. * Dyntopo collapse. Note that DynTopo always pins face set corners but everything else only does so if preserve face sets is on.
2021-08-24Sculpt dyntopo: Smooth improvements and bug fixesJoseph Eagar
* Added an option to weight smooth by face areas * Dyntopo now caches face areas in a CD_PROP_FLOAT layer * Dyntopo also caches number of edges around verts inside of MDynTopoVert. To avoid increasing the struct size flag was made a short. * Cleanup mode (dissolves 3/4-valence verts) now piggybacks on subdivide code to build list of verts; this is much faster.
2021-08-16Sculpt dyntopo: improve boundary brush for irregular topologyJoseph Eagar
(still a wip) The boundary brush now builds a geodesic distance field (from the boundary) from which it derives a tangent field: * These now define the rotation plane for bend mode. * Rotation origins snap to these planes. There is also typedef'd code for visualization tangents in a temporary object (note the sculpt object), to enable define VISBM in sculpt_boundary.c. This will be removed lated. Additional changes: * Added a function to get the number of edges around verts, SCULPT_vertex_valence_get. * Added an API to calculate cotangent weights for vert fans, SCULPT_cotangents_begin (call in main thread first) and SCULPT_get_cotangents. * Sculpt neighbors for PBVH_FACES now uses ss->vemap if it exists. * The Mesh topology mapping code now takes extra parameters for sorting vert/edge cycles geometrically. * Similarly, there is now a function to sort BMesh edge cycles, BM_sort_disk_cycle. * MDynTopoVert->flag now has a bitflag for when the disk cycle sorting needs to be redone, DYNVERT_NEED_DISK_SORT. * The sculpt geodesic code now supports passing in custom vertex coordinates. * The geodesic API can also build an optional map of which vertex in the initial vertex list is closest to any other vertex.
2021-07-21Sculpt dyntopo: Removed triangle limit for PBVH_BMESHJoseph Eagar
* PBVH_BMESH now supports faces other then triangles; * Dyntopo triangulates faces as it finds them. - I looked into methods of preserving quads and failed to find anything that worked well in practice; it actually worked better to use topology rake to align triangles into quads and then mark diagonal edges for later dissolving then to try to preserve quads explicitly (I've not implementated that here, that was research code). - To avoid excessive cache-destroying loops over vertex-faces, DynTopo flags which verts have non-triangle faces. * PBVHTriBuf now builds edge buffers so we can avoid drawing tesselation phantom edges. * BMLog also now supports arbitrary faces. It still does not support edges though. TODO: * Fix vcol cell shading mode * Make sure indexed drawing works
2021-07-20Sculpt dyntopo: Face set boundaries are now presered with dyntopoJoseph Eagar
* Face set boundaries are now preserved on dyntopo remeshing. * MDynTopoVert->flag now has a DYNVERT_FSET_BOUNDARY flag in addition to DYNVERT_BOUNDARY. * Instrumented uiBut with ASAN poison regions to hopefully find the super evil memory corruption bug that's been driving me insane. It's frustratingly intermittent. There are five poison regions.
2021-07-11Merge branch 'master' into temp_bmesh_multiresJoseph Eagar
2021-07-05Cleanup: spelling in commentsCampbell Barton
2021-06-26Merge branch 'master' into temp_bmesh_multiresJoseph Eagar
2021-06-22Cleanup: Spelling MistakesLeon Zandman
This patch fixes many minor spelling mistakes, all in comments or console output. Mostly contractions like can't, won't, don't, its/it's, etc. Differential Revision: https://developer.blender.org/D11663 Reviewed by Harley Acheson
2021-05-19* Fix bug with symmetrize creating non-manifold geometry.Joseph Eagar
* Fix bug in pbvh face create
2021-04-08* Fixed an annoying number of undo bugsJoseph Eagar
* Original data for bmesh pbvh is no longer handled by the undo code. This should eliminate a whole class of subtle and hard to track down bugs.
2021-04-07* Layer brush now supports dyntopo.Joseph Eagar
- To do this I made a little API to make scratch customdata layers: SCULPT_dyntopo_[ensure/get]_templayer. Takes a customdata type and a layer name (e.g. '__dyntopo_bleh") and returns a customdata offset. - Note that I also did this for the persistent base code. * Added a macro to check if a tool supports splitting the PBVH during a stroke, DYNTOPO_HAS_DYNAMIC_SPLIT. It is in sculpt_intern.h (for now) to avoid the enormous amount of recompiling that is triggered if DNA_brush_enum.h is modified. * TODO: Right now the undo code resets original vertex coordinates for bmesh PBVH. This means tools that rely on original data (sharp and layer) can't split the pbvh during the stroke, since that will allocate new undo nodes and reset original coords. The solution is to move the original data API entirely out of the undo code.
2021-04-01Finished curvature rake.Joseph Eagar
2021-03-22* Added a new CustomData type for dyntopo vertex data: MDynTopoVert.Joseph Eagar
It stores: - Original coordiates, colors and mask (which were previously four seperate layers). - A bitmask with (currently) one bitflag, whether or not a vertex is on a boundary. I needed to cache calculating vertex boundary state (which involves iterating over the edges surrounding a vertex) and got fed up with having so many CD layers for dyntopo. This struct consolidates them and saves having yet another layer just to store a flag.
2021-02-11Attributes: support bool attribute in rnaJacques Lucke
Differential Revision: https://developer.blender.org/D10387
2021-02-10Cleanup: Remove unecessary padding from small DNA structsHans Goudey
After {rBa0867f05a48e2017a}, it is no longer necessary to pad structs with 1 and 2 byte sizes. Most of these are geometry node structs, where we've been avoiding using `node.custom1`. I only found two others, the freestyle flags in custom data DNA. Differential Revision: https://developer.blender.org/D10335
2020-12-03Cleanup: view-port --> 2D/3D ViewportAaron Carlisle
2020-11-19Build-system: Force C linkage for all DNA type headersJulian Eisel
Some DNA headers already did this, most did not. Even though many of them would be included in C++ files and thus compiled as C++. This would be confusing and developers may think they have to add `extern "C"` too a whole lot of (indirect) includes to be able to use a C header in C++. However, this is a misconception. `extern "C"` does not cause code to be compiled with C rather than C++! It only causes the linker to not use C++ function name mangling. See https://stackoverflow.com/a/1041880. Because extern DNA headers don't have function declarations, using `extern "C"` actually should not have any effect. On the other hand, adding it causes no harm and avoids confusion. So let's just have it consistently in C header files. Differential Revision: https://developer.blender.org/D9578 Reviewed by: Bastien Montagne, Sybren Stüvel
2020-10-22Multires: Remove legacy compatibility codeSergey Sharybin
It was rather a huge chunk of code, which started to become more harder to maintain with the transition to OpenSubdiv based implementation. Because of this transition, the compatibility was also rather on a poor side. Remove compatibility support for pre-2.50.9 multires. Ref T77107 Reviewed By: brecht, mont29 Differential Revision: https://developer.blender.org/D9238
2020-10-19Spelling: It's Versus ItsHarley Acheson
Corrects incorrect usage of contraction for 'it is', when possessive 'its' was required. Differential Revision: https://developer.blender.org/D9250 Reviewed by Campbell Barton
2020-08-07Code Style: use "#pragma once" in source directoryJacques Lucke
This replaces header include guards with `#pragma once`. A couple of include guards are not removed yet (e.g. `__RNA_TYPES_H__`), because they are used in other places. This patch has been generated by P1561 followed by `make format`. Differential Revision: https://developer.blender.org/D8466
2020-07-10Revert "Fix T78296: Performance - Use Binary Search for MDeformWeight"Brecht Van Lommel
This reverts commit 39b525e0f07fa25dcda54226ade789959b642dec and 3121015dceb1d269d79690c8f15c8e1406c9b09f as tests are failing.
2020-07-10Fix T78296: Performance - Use Binary Search for MDeformWeightJeroen Bakker
Use binary search for querying deform weights. Spring 02_020_A.anim.blend on Ryzen 1700X goes from 12.4 to 12.7fps. During profiling it was detected that adding new items to the head was faster than adding to the tail. Reviewed By: Campbell Barton Differential Revision: https://developer.blender.org/D8127
2020-06-23Sculpt Vertex Colors: Initial implementationPablo Dobarro
Sculpt Vertex Colors is a painting system that runs inside sculpt mode, reusing all its tools and optimizations. This provides much better performance, easier to maintain code and more advanced features (new brush engine, filters, symmetry options, masks and face sets compatibility...). This is also the initial step for future features like vertex painting in Multires and brushes that can sculpt and paint at the same time. This commit includes: - SCULPT_UNDO_COLOR for undo support in sculpt mode - SCULPT_UPDATE_COLOR and PBVH flags and rendering - Sculpt Color API functions - Sculpt capability for sculpt tools (only enabled in the Paint Brush for now) - Rendering support in workbench (default to Sculpt Vertex Colors except in Vertex Paint) - Conversion operator between MPropCol (Sculpt Vertex Colors) and MLoopCol (Vertex Paint) - Remesher reprojection in the Voxel Remehser - Paint Brush and Smear Brush with color smoothing in alt-smooth mode - Parameters for the new brush engine (density, opacity, flow, wet paint mixing, tip scale) implemented in Sculpt Vertex Colors - Color Filter - Color picker (uses S shortcut, replaces smooth) - Color selector in the top bar Reviewed By: brecht Maniphest Tasks: T72866 Differential Revision: https://developer.blender.org/D5975
2020-05-27CD_PROP_COL datalayerPablo Dobarro
This implements a generic color datalayer and its functions. Based on D5975. Reviewed By: brecht Differential Revision: https://developer.blender.org/D7838
2020-03-06Cleanup: remove MLOOPUV_EDGESELPhilipp Oeser
This was not set anywhere, code relies on MLOOPUV_VERTSEL everywhere. BMLoopUV.select_edge was never returning True and wasnt updating uv select state when set manually. Afaict, there were no official Addons using this from python. Resolves T65836 Maniphest Tasks: T65836 Differential Revision: https://developer.blender.org/D6772
2020-02-11Fix T56108: Crash editing corrupted vertex groupsCampbell Barton
While the file in this report had corrupted values, this is avoidable without adding any extra overhead. Use unsigned vertex group indices since we don't need negative values, this is an alternative to checking they aren't negative in many places. Vertex group values over INT_MAX is still considered invalid, so any accidental unsigned wrapping won't be silently ignored.
2020-01-08DNA: mark OrigSpace structs as run-timeCampbell Barton
2020-01-08Cleanup: mesh data headerCampbell Barton
This file had become disorganized, it wasn't clear which structs/flags were deprecated. - Add comments explaining what each struct is for. - Use doxy sections. - Remove outdated notes, unused flags. - Group custom-data. - Group deprecated structs in their own section. T
2019-11-24Cleanup: doxygen commentsCampbell Barton
Also correct some outdated symbol references, add missing 'name' commands.
2019-08-25Cleanup: redundant struct declarationsCampbell Barton
2019-08-16Cleanup: spellingCampbell Barton
2019-07-08Fix T62941 Subdivision Modifier Showing all face dotsClément Foucault
Previously in 2.79 we were using a specialized drawing using derivedMesh. Now the subsurf modifier tag each center vertex as facedot and let the DRWManager pick it up. Some modifiers (deforming ones) do not clear the tag so we can use this technique even if there is deforming modifiers after subsurf modifiers.
2019-05-01ClangFormat: run with ReflowComments on source/Campbell Barton
Prepare for enabling ReflowComments.
2019-04-21Cleanup: comments (long lines) in makesdnaCampbell Barton
2019-04-17ClangFormat: apply to source, most of internCampbell Barton
Apply clang format as proposed in T53211. For details on usage and instructions for migrating branches without conflicts, see: https://wiki.blender.org/wiki/Tools/ClangFormat
2019-03-19Cleanup: comment blocksCampbell Barton
2019-02-27Cleanup: use '_pad' convention for padding in all DNA structsCampbell Barton
Avoids mixing these in with regular variables in code-completion. Use char for pad members except for 'void *', to make size clearer. Removed/shrink a few redundant padding vars which were >= 8 bytes.
2019-02-18doxygen: add newline after \fileCampbell Barton
While \file doesn't need an argument, it can't have another doxy command after it.
2019-02-06Cleanup: remove redundant doxygen \file argumentCampbell Barton
Move \ingroup onto same line to be more compact and make it clear the file is in the group.
2019-02-01Cleanup: remove redundant, invalid info from headersCampbell Barton
BF-admins agree to remove header information that isn't useful, to reduce noise. - BEGIN/END license blocks Developers should add non license comments as separate comment blocks. No need for separator text. - Contributors This is often invalid, outdated or misleading especially when splitting files. It's more useful to git-blame to find out who has developed the code. See P901 for script to perform these edits.
2019-01-15Cleanup: comment line length (DNA)Campbell Barton
Prevents clang-format wrapping text before comments.
2019-01-07Cleanup: move DNA comments before struct membersCampbell Barton
Needed for clang-format in some cases, see: T53211
2018-11-06BKE_mesh: add a utility to get edge indices from looptri.Alexander Gavrilov
Not all three sides of a tesselated mesh triangle are guaranteed to be original mesh edges, so a somewhat complicated check is required to detect which ones are real. It seems that until now there was no utility function for that, only some example code.
2018-10-10Python API: add loop triangles access, remove tessfaces.Brecht Van Lommel
Loop triangles are tessellated triangles create from polygons, for renderers or exporters that need to match Blender's polygon tesselation exactly. These are a read-only runtime cache. Tessfaces are a legacy data structure from before Blender supported n-gons, and were already mostly removed from the C code. Details on porting code to loop triangles is in the release notes. Differential Revision: https://developer.blender.org/D3539
2018-09-27Cleanup: remove unused DerivedMesh code.Sebastian Parborg
Differential Revision: https://developer.blender.org/D3736
2018-07-16Merge branch 'master' into blender2.8Sergey Sharybin
2018-07-16Cleanup: Remove obscure flag which was only used for read in subsurf codeSergey Sharybin
Some sort of rudiment from many years ago, is never set by 2.5x code.
2018-06-17Merge branch 'master' into blender2.8Campbell Barton