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-12-07Cleanup: move public doc-strings into headers for 'blenkernel'Campbell Barton
- Added space below non doc-string comments to make it clear these aren't comments for the symbols directly below them. - Use doxy sections for some headers. - Minor improvements to doc-strings. Ref T92709
2021-06-24Cleanup: comment blocks, trailing space in commentsCampbell 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-02Cleanup: Remove useless duplicated linesValentin
I spotted a duplicate struct declaration, so I had to check for other duplicated as well There might be some other but i am not confident enough for deleting them this regex search for duplicate ^(.*;)$\n(\1)$ Reviewed By: JacquesLucke Differential Revision: https://developer.blender.org/D8146
2020-05-18OpenSubdiv: Cleanup, Remove from legacy SubsurfCCG codeSergey Sharybin
The CPU side implementation is done on a new dedicate base ground. The GPU side must be redone anyway.
2020-03-02Cleanup: make remaining blenkernel headers work in C++Jacques Lucke
2020-01-02Cleanup: quiet const warningsCampbell 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-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-28Cleanup: unused struct declarationsCampbell Barton
2019-01-28Cleanup: sort forward declarations of enum & structCampbell Barton
Done using: source/tools/utils_maintenance/c_sort_blocks.py
2019-01-22Fix T60575: Multiresolution Crashes when appliing more subdivisionsSergey Sharybin
The issue was caused by intermediate DerivedMesh being created with scene's Simplify settings taken into account. This is what happens when one area makes implicit decisions based on whether passed Scene pointer is not NULL. Made it so ignoring simplification serttings is an explicit flag, which makes it easier to follow what's going on.
2019-01-15Cleanup: commas at the end of enumsCampbell Barton
Without this clang-format may wrap them onto a single line.
2018-06-22Subsurf: Move away from using scene from modifier dataSergey Sharybin
2018-01-11Subsurf: Use regular mutex instead of RW oneSergey Sharybin
Mutex is now local to particular CCGDM, and guarding edge hash which is only used by a single function only. There is no need to acquire read lock after edge hash was created.
2017-12-22Subsurf: Avoid global lock for loops and orig index layersSergey Sharybin
This is a bit annoying to have per-DM locking, but it's way better (as in, up to 4 times better) for playback speed when having lots of subsurf objects,
2017-11-19Fix T53347: Vertex paint crash on undo/exitCampbell Barton
2015-11-04OpenSubdiv: Use pool for delayed OpenGL buffers free when freeing from ↵Sergey Sharybin
non-main thread This is really similar to what GPU module was already doing. There are number of possible improvements still: - Re-use allocated VAOs when requesting new ones instead of going to the trouble of freeing VAO and then re-creating it again. - Move VAO handling to GPU module. Fixes T46589: OpenSubdiv crash with drivers
2015-08-05OpenSubdiv: Completely avoid possible access to non-existing CPU dataSergey Sharybin
Make it so CCGDM reports 0 number of geometry when it uses GPU backend for drawing. This screws up a bit statistics in info header and requires to have some special handle of CCGDM in the drawing code, but makes it so non of the areas will try to access non-existing geometry.
2015-07-20OpenSubdiv: Commit of OpenSubdiv integration into BlenderSergey Sharybin
This commit contains all the remained parts needed for initial integration of OpenSubdiv into Blender's subdivision surface code. Includes both GPU and CPU backends which works in the following way: - When SubSurf modifier is the last in the modifiers stack then GPU pipeline of OpenSubdiv is used, making viewport performance as fast as possible. This also requires graphscard with GLSL 1.5 support. If this requirement is not met, then no GPU pipeline is used at all. - If SubSurf is not a last modifier or if DerivesMesh is being evaluated for rendering then CPU limit evaluation API from OpenSubdiv is used. This only replaces the legacy evaluation code from CCGSubSurf_legacy, but keeps CCG structures exactly the same as they used to be for ages now. This integration is fully covered with ifdef and not enabled by default because there are several TODOs to be solved first: - Face varying data interpolation is not really cleanly implemented for GPU in OpenSubdiv 3.0. It is also not implemented for limit evaluation API. This basically means we'll have really hard time supporting UVs. - Limit evaluation only works with adaptivly subdivided meshes so far, which basically means all the points of CCG are pushed to the limit. This gives different result from old code. - There are some serious optimizations possible on the topology refiner creation, which would speed up initial OpenSubdiv mesh creation. - There are some hardcoded asumptions in the GPU and DerivedMesh areas which could be generalized. That's something where Antony and Campbell can help, making it so the code is structured in a way which is reusable by all planned viewport projects. - There are also some workarounds in the dependency graph to make sure OpenGL buffers are only freed from the main thread. Those who'll be wanting to make experiments with this code should grab dev branch (NOT master) from https://github.com/Nazg-Gul/OpenSubdiv/tree/dev There are some patches applied in there which we're working on on getting into upstream.
2015-05-27Fix T44745 non manifold edges of mesh do not work when smoothing inAntony Riakiotakis
multires. Code had special guards for such edges to stop this from happening. I don't see why this is needed though since code above assigns smoothed positions for all vertices in the grid. After removing the guards I saw that this in fact was the only place where grd adjacency was used, so I completely removed it.
2015-03-28Cleanup: redundant struct declarationsCampbell Barton
2014-03-15Code cleanup: use r_ prefix for return argsCampbell Barton
2013-10-01Mark some CCG funcrions as inlinedSergey Sharybin
This seems to be giving speedup up to 10% in own tests. -- svn merge -r60104:60105 ^/branches/soc-2013-depsgraph_mt
2012-11-03style cleanup: tabs & whitespaceCampbell Barton
2012-05-13code cleanup: header cleanup and remove some duplicate defines.Campbell Barton
2012-05-11style cleanup: mainly sculpt/whitespaceCampbell Barton
2012-05-11Copy GridPaintMask to vertex paint mask when applying multires.Nicholas Bishop
Adds new subsurf_copy_grid_paint_mask() function similar to subsurf_copy_grid_hidden().
2012-05-11Add mask support to CCGSubSurf and multires.Nicholas Bishop
* Add new CCG function ccgSubSurf_setAllocMask(). Similar to to ccgSubSurf_setCalcVertexNormals(), it sets whether the CCG elements have a mask layer and what that layer's offset is. Unlike normals however, it doesn't change any behavior during CCG calculation; it's there only to give CCGKey information on the mask. * Add a new flag to _getSubSurf(), CCG_ALLOC_MASK. If set, space for an extra layer is allocated, but the number of CCG layers is not set to include it. This is done because GridPaintMasks are absolute, rather than being relative to the subdivided output (as MDisp displacements are), so we skip subdividing paint masks here. * Add a new flag to subsurf_make_derived_from_derived(), SUBSURF_ALLOC_PAINT_MASK. This controls whether CCG_ALLOC_MASK is set for _getSubSurf(). Related, masks are never loaded in during ss_sync_from_derivedmesh(). After subdivision is finished, if the alloc mask flag is set, the number of CCG layers is increase to 4 with ccgSubSurf_setNumLayers(). * Add a new flag to multires_make_from_derived(), MULTIRES_ALLOC_PAINT_MASK. Not all multires functions need paint mask data (e.g. multiresModifier_base_apply.) This flag is always set in MOD_multires.c so that subdividing a mesh with a mask updates properly even when not in sculpt mode. * Update multiresModifier_disp_run() to apply, calculate, and add mask elements. It's almost the same as the existing operations with xyz coordinates, but treats masks as absolute rather than displacements relative to subdivided values. * Update multires_customdata_delete to free CD_GRID_PAINT_MASK in addition to CD_MDISPS. * Update multires_del_higher() to call the new function multires_grid_paint_mask_downsample(), which allocates a lower-resolution paint mask grid and copies values over from the high-resolution grid.
2012-05-11Replace hardcoded DMGridData structure with CCGElem/CCGKey.Nicholas Bishop
* Changes to DerivedMesh interface: DMGridData has been removed, getGridData() now returns an array of CCGElem pointers. Also added getGridKey() to initialize a CCGKey (implemented only by CCGDerivedMesh.) * PBVH: added BLI_pbvh_get_grid_key(). * A lot of code is affected, but mainly is just replacing DMGridData.co, DMGridData.no, and sizeof(DMGridData) with the CCG_*_elem functions, removing the reliance on grid elements of exactly six floats.
2012-05-11Code cleanup for parameters of subsurf_make_derived_from_derived.Nicholas Bishop
This is the first commit of the sculpt masking merge. Documentation: http://wiki.blender.org/index.php/User:Nicholasbishop/PaintMasks Thanks to Brecht for reviewing! Replaced four boolean parameters with a single flag and a new enum, SubsurfFlags.
2012-04-22style cleanup: commentsCampbell Barton
2012-03-17Reduce poly map memory usage (used by sculpt smooth brush.)Nicholas Bishop
Changed the create_vert_poly_map function to return a more compact structure. Memory saved will vary depending on the mesh, but typically it should be about one third of the old size.
2012-03-14Copy hidden flag to vertices when applying multires modifier.Nicholas Bishop
2012-03-14Skip hidden elements in PBVH iterator, raycast, and drawing.Nicholas Bishop
2012-03-14Add DerivedMesh.gridHidden and CCGDM implementation.Nicholas Bishop
2012-03-14Add new CCG accessor functions.Nicholas Bishop
ccg_gridsize() converts a level into gridsize, ccg_factor() is for converting coordinates between different multires levels.
2012-03-13Code cleanup: replace multires update function pointer with direct call.Nicholas Bishop
Renamed the multiresModifier_update() function to multires_modifier_update_mdisps() and made it visible to subsurf_ccg.c so it can be called directly. No functional change, just a bit simpler.
2012-03-06Draw individual face's material and shading correctly in the PBVH.Nicholas Bishop
Previously, the shading and material was set once per PBVHNode when drawing. This is still the case, but PBVHNodes are now built to contain only one material and shading mode. This is done with an extra partitioning step; once the number of primitives in the node falls below the PBVH leaf limit, it's primitives are checked for matching materials. If more than one material or shading mode is present in the node, it is split and partitioned (partitioned by material rather than 3D location.) Given a sufficiently 'annoying' input, like a dense mesh with thousands of materials randomly scattered across it, this could greatly increase PBVH build time (since nodes might end up containing a single primitive), but in general this shouldn't come up. In order to support materials for grids, the CCGDM is building another grid array (of DMFaceMat structs). This could be used to replace CCGDM.faceFlag for some small memory savings (TODO).
2012-03-06Bugfix and code cleanup: use better types for faceFlags in CCGDM.Nicholas Bishop
Previously this was just a character array that stored face/poly flags and mat_nr. Since mat_nr should be a short, this would have truncated for higher values. Replaced with a new DMFaceFlags struct.
2012-02-26Style cleanup: remove underscore prefix from CCG struct names.Nicholas Bishop
2012-02-20- remove some unused editmesh functions.Campbell Barton
- copy & rename EditMesh stricts for use with scanfill (remove unused members)
2012-02-18svn merge ^/trunk/blender -r44189:44204Campbell Barton
2012-02-17unify include guard defines, __$FILENAME__Campbell Barton
without the underscores these clogged up the namespace for autocompleation which was annoying.
2012-02-05add function for getting a polygon map: dm->getPolyMap(ob, dm).Campbell Barton
polygon version of dm->getFaceMap(ob, dm) sculpt uses this for checking connectivity.
2011-10-24svn merge ^/trunk/blender -r41226:41227 .Campbell Barton
2011-10-23remove $Id: tags after discussion on the mailign list: ↵Campbell Barton
http://markmail.org/message/fp7ozcywxum3ar7n
2011-10-14svn merge ^/trunk/blender -r40890:40950Campbell Barton