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
2019-04-27Cleanup: comments (long lines) in blenkernelCampbell Barton
2019-04-18Cleanup: comment blocksCampbell 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-07Refactor CDData masks, to have one mask per mesh elem type.Bastien Montagne
We already have different storages for cddata of verts, edges etc., 'simply' do the same for the mask flags we use all around Blender code to request some data, or limit some operation to some layers, etc. Reason we need this is that some cddata types (like Normals) are actually shared between verts/polys/loops, and we don’t want to generate clnors everytime we request vnors! As a side note, this also does final fix to T59338, which was the trigger for this patch (need to request computed loop normals for another mesh than evaluated one). Reviewers: brecht, campbellbarton, sergey Differential Revision: https://developer.blender.org/D4407
2019-02-28CustomData: add function to clear layers' flags.Bastien Montagne
We only had one to set those flags, up til now...
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-02Cleanup: remove author/date info from doxy headersCampbell Barton
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: sort forward declarations of enum & structCampbell Barton
Done using: source/tools/utils_maintenance/c_sort_blocks.py
2018-12-03Fix T57858: Add validation callback to CustomData layers.Bastien Montagne
Our mesh validation was only checking cd layout so far, not their actual data. While this might only be needed for a few types, this is a required addition for things like imported UVs, else we have no way to avoid nasty things like NANs & co. Note that more layer types may need that callback, time will say. For now added it to some obvious missing cases...
2018-09-25CustomData: Allow copying content of a single layerSergey Sharybin
2018-09-25Cleanup: indentationSergey Sharybin
2018-09-24Merge branch 'master' into blender2.8Brecht Van Lommel
2018-09-24Spelling fixes in comments and descriptions, patch by luzpaz.Brecht Van Lommel
Differential Revision: https://developer.blender.org/D3719
2018-06-29Merge branch 'master' into blender2.8Campbell Barton
2018-06-29Cleanup: trailing newlinesCampbell Barton
2018-06-17Merge branch 'master' into blender2.8Campbell Barton
2018-06-17Cleanup: trailing space for blenkernelCampbell Barton
2018-05-30Cleanup: use 'e' prefix for enum typesCampbell Barton
2018-05-30Cleanup: Use typed allocation type enum in custom data APISergey Sharybin
2018-05-30Use enum for custom data allocation typeSergey Sharybin
Allows to easily see human readable value in debugger.
2017-05-25TexFace removal part 3Campbell Barton
- MTexPoly structure & layer type. - The 'Mesh.uv_textures' layers. - DerivedMesh TexFace drawing. - Scripts & UI.
2016-05-16Cleanup: use const argsCampbell Barton
2016-02-28BKE_mesh: add polygon flipping tools.Bastien Montagne
Those new functions invert the winding of polygons, effectively inverting their normals. A helper was also added to allow swapping two items in customdata layers. Being able to invert normals outside of BMesh area is very important in several places, like IO scripts or customnormals modifiers... Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D1814
2016-02-28Cleanup: rename `CustomData_swap` to `CustomData_swap_corners`.Bastien Montagne
More in line with our other func names handling sub-item data (mainly, tessfaces' UVs and VCol...).
2015-10-16Fix T46508: data_transfer of normals fails in case objects are transformed.Bastien Montagne
The final stage of the process (copying/interpolating new dst cddata from src cddata) was simply broken in normal case, where we need to convert from source to destination object space. This patch is a bit verbose, but I cannot see how to avoid it really. To think this code is in master since over 6 months and it only gets reported now... :/
2015-09-09Assert CustomData_from_bmeshpoly is used correctlyCampbell Barton
Follow up to last commit, since bugs here aren't so obvious.
2015-08-25Fix T45729: Cycles Bake break when building a special meshSergey Sharybin
The issue was caused by CD_SHAPEKEY_INDEX layer being added to edge data, now we make sure all the layers are nicely re-allocated.
2015-07-21Fix T45471: Blend file: Bad old_addr handling in mesh's customdata writing.Bastien Montagne
Issue is rather well explained in T45471: our current customdata writing code easily generates several different blocks in blend file with same 'old' address. This is bad, because those addresses are used as 'uid' during reading process (it kind of work in Blender's own reading process, by mere luck mostly, but breaks the file specs). Solution (suggested by Campbell, thanks) implemented by this patch is to avoid duplicating everything, and instead just overwrite what we needs to skip some cdlayers on write: * the CustomData's `totlayer` number; * the CustomData's `layers` array of CustomDataLayer (keeping its original address using the `writestruct_at_address` helper). New design allows us to get completely rid of the no_free flag stuff in `write_customdata()`. Note that this implies written data is **not** directly valid from Blend PoV, since its written typemap does not match written layers (this is not an issue because typemap is rebuilt on read anyway - and it's easy to fix this if really needed). Also, the backward compatibility saving of mface data remains an issue here, see comment in code. Reviewers: sergey, campbellbarton Projects: #bf_blender Maniphest Tasks: T45471 Differential Revision: https://developer.blender.org/D1425
2015-03-28Cleanup: redundant struct declarationsCampbell Barton
2015-03-13Add argument to DM_to_mesh() function to take ownership over the DMSergey Sharybin
The idea is pretty simple: instead of making temporary copy of all the related custom data layers just pass the ownership from the DM to the mesh. This is really handy in cases when you've got DM which you need to convert to Mesh datablock and wouldn't need that DM after conversion anyway. Foe example, render database conversion, exporters and even Modifier Apply will benefit from this option. Reviewers: campbellbarton Differential Revision: https://developer.blender.org/D1127
2015-02-23CustomData: const correctnessCampbell Barton
2015-02-23Fix error in recent vert/edge-slide commitsCampbell Barton
`CustomData_bmesh_interp_n` was expecting the 'dest' arg not to have its offset applied. This was a bit confusing since the source args have it applied, and in some cases we only have the destination with the offset.
2015-02-23CustomData: const correctness for interp()Campbell Barton
2015-02-05Add Custom Loop Normals to Data Transfer.Bastien Montagne
Titles says everything, just two notes: * We have to actually transfer plain *normals*, not 'compressed' clnors, so had to add pre/post process to transfer to make the conversions. * Also added interpolation and advanced copy/mixing to CD_NORMAL, for same reasons.
2015-01-12Avoid type re-definition for as long C11 is explicitly enabled in compilersSergey Sharybin
2015-01-09Transfer Data: add main core code and operators.Bastien Montagne
This add code needed to map a CD data layout from source mesh towards destination one, and code needed to actually transfer data, using BKE's mesh remap generated data. This allows to transfer most CD layers (vgroups, vcols, uvs...) as well as fake, boolean ones (like smooth/sharp edges/faces, etc.). Some types are not yet transferable, mainly shape keys, this is known TODO. Data transfer can also use some advanced mixing in some cases (mostly, vgroups and vcols). Notes: * New transfer operators transfer data from active object towards selected ones. * Modifier will be committed separately. * Old weight transfer code (for vgroups) is kept for now, mostly because it is the only usable one in weightpaint mode (it transfers from selected object to active one, this is not sensible in Object mode, but needed in WeightPaint one). This will be addressed soon. Again, heavily reviewed and enhanced by Campbell, thanks!
2014-11-04Add missing `CustomData_duplicate_referenced_layer_n` and deduplicate code.Bastien Montagne
CustomData_duplicate_referenced_layer_n not used in master currently, but need it in mesh tranfer branch.
2014-10-21Fix T42260: By repeatedly joining meshes, you could end up with thousands of ↵Bastien Montagne
UVLayers This is only an indirect fix, in fact: this commit adds a public API to check the maximum number of a given layer type (`CustomData_layertype_layers_max()`), and uses it to forbid too much layer creation in `CustomData_merge()`. This only affects UVs/VCol data though, but merge behavior in itself is not a bug actually, how user managed to get thousands of different UV layer names remain rather mysterious...
2014-09-24Custom Data API: redundant pointer-to-pointer argCampbell Barton
2014-09-09Cleanup: const correctness, no change to generated code.Campbell Barton
2014-01-31Code cleanup: comments and warningsCampbell Barton
2013-11-19Code Cleanup: style, spelling and pep8 editsCampbell Barton
2013-09-21bugfix: [#36786] customdata layers are not merging taken the names into ↵Dalai Felinto
consideration (which is also "[#36749] Joining objects with more than one uv map depends on list order") Thanks Bastien Montagne and Brecht van Lommel for reviewing and some advice.
2013-09-10Update to writefile: do not save TEMPORARY or NO_COPY CD layers!Bastien Montagne
Neede for next commit (split normals API).
2013-05-30remove redundant includes from cmake and scons.Campbell Barton
2013-05-28move BLO_sys_types.h -> BLI_sys_types.h (it had nothing todo with loading)Campbell Barton
remove MEM_sys_types.h which was a duplicate.
2013-05-09bmesh speedup: skip free-realloc while running CustomData_bmesh_merge() when ↵Campbell Barton
nothing is changed (happens quite often that there is nothing to do).
2013-05-08minor speedup for bmesh - add CustomData_bmesh_free_block_data(), useCampbell Barton
when the block would be immediately allocated again.