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
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.
2013-05-08speedup for freeing bmeshes, skip calling free on everyCampbell Barton
vert/edge/face/loop if there are no free functions for the customdata layers.
2013-05-08use bool for customdata functions.Campbell Barton
2013-03-22python api: add functionality to remove vertex color layers.Campbell Barton
note: that this intentionally removes check to exit vpaint mode when a vertex color layer is removed, since being in vertex-paint mode without a vertex color layer is supported. also minor change to drawing camera limits while picking from previous commit.
2013-01-11remove CustomData_get_active_offset(), use CustomData_get_offset to return ↵Campbell Barton
the active layer, matching CustomData_get()
2013-01-10editmesh texface drawing, reuse customdata offset rather then looking up ↵Campbell Barton
each UV and vertex color, gives overall ~9.5% drawing speedup in my tests. was also doing NULL checks on UV's which are never NULL in this case.
2013-01-10don't store bevel weights or edge crease customdata layers in editmode ↵Campbell Barton
unless they are needed. configurable in 'Geometry Data' panel, will be added when running crease edges transform for example.
2013-01-08fix [#33797] decimate modifier bug on uv-coordinates when mesh uses vertex colorCampbell Barton
if vertex colors had no seams - it would interpolate the UV's too, now interpolate per-layer.
2013-01-08fix [#33792] Accessing a bmesh object created by from_object crashes blenderCampbell Barton
Issue was customdata wasnt being initialized for layers in the destination BMesh but not in the source data.
2012-10-31make use customdata typeoffset more, add an assert to ensure its to date.Campbell Barton
2012-10-20bmesh-decimate now only does CustomData_has_math for loop layers, add ↵Campbell Barton
CustomData_has_interp() for vert & edges.
2012-10-20bmesh decimator support for loop & edge customdata. (most importantly UVs ↵Campbell Barton
and vertex colors).
2012-09-15quiet -Wmissing-prototypes warnings, and enable this warning by default for ↵Campbell Barton
C with gcc. helps for finding unused functions and making functions static, also did some minor code cleanup.
2012-09-06code cleanup: remove deprecated defines and some struct membersCampbell Barton
2012-08-04code cleanup:Campbell Barton
- replace (strcmp(vfont->name, FO_BUILTIN_NAME) == 0) with (BKE_vfont_is_builtin(vfont)). - reduce some double promotions.
2012-06-07Fix #31725: UV map order is ignored when opening in 2.6+ versionsSergey Sharybin
Issue was caused by do_versions being used pdata as reference for active/render/ stencil/clone layer indices instead of fdata. Added some utility functions used only by do_versions to be sure this indices are set from fdata for pre-bmesh files.
2012-05-17style cleanup: block commentsCampbell Barton
2012-05-13code cleanup: header cleanup and remove some duplicate defines.Campbell Barton
2012-04-30bmesh - python apiCampbell Barton
- bm.*.layers.*.verify() - bm.*.layers.*.is_singleton - bm.*.layers.*.copy_from(other) also added api functons - BM_data_layer_copy(...) - CustomData_layertype_is_singleton(type)
2012-04-09Fix bug [#30863] Array Modifier Start and End Cap cause crash when the Cap ↵Nicholas Bishop
Object has vertex group Another crash with array caps, was caused by not making a deep enough copy of CD field. Also fixed the type of the 'mask' parameter, was int where it should be 64-bit.
2012-03-27style/name cleanup: have EDBM_* functions match our style guide and also ↵Campbell Barton
match BM_ function naming conventions
2012-03-18spelling cleanupCampbell Barton
2012-03-09style cleanup: comment blocksCampbell Barton