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
2015-05-05Math Lib: rename fill_*, to copy_*Campbell Barton
matching convention for fixed length api, eg: copy_v3_fl
2015-04-19Cleanup: warningsCampbell 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-03-12CustomData: don't calloc when duplicating layersCampbell Barton
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: replace calloc -> mallocCampbell Barton
stack array is uninitialized, relying on calloc here would just hide bugs.
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-02-05Add Custom Loop Normals.Bastien Montagne
This is the core code for it, tools (datatransfer and modifier) will come in next commits). RNA api is already there, though. See the code for details, but basically, we define, for each 'smooth fan' (which is a set of adjacent loops around a same vertex that are smooth, i.e. have a single same normal), a 'loop normal space' (or lnor space), using auto-computed normal and relevant edges, and store custom normal as two angular factors inside that space. This allows to have custom normals 'following' deformations of the geometry, and to only save two shorts per loop in new clnor CDLayer. Normal manipulation (editing, mixing, interpolating, etc.) shall always happen with plain 3D vectors normals, and be converted back into storage format at the end. Clnor computation has also been threaded (at least for Mesh case, not for BMesh), since the process can be rather heavy with high poly meshes. Also, bumping subversion, and fix mess in 2.70 versioning code.
2015-01-26Cleanup: strcmp/strncmp -> STREQ/STREQLEN (in boolean usage).Bastien Montagne
Makes usage of those funcs much more clear, we even had mixed '!strcmp(foo, bar)' and 'strcmp(foo, bar) == 0' in several places...
2015-01-10cleanup: style & warningsCampbell Barton
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-12-01Cleanup: more int->bool.Bastien Montagne
2014-11-04Cleanup for previous own commit (sorry...)Bastien Montagne
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-05-01Add BLI_compiler_compat.h to help with portabilityCampbell Barton
2014-05-01Include removal gave problems with windows, ifdef some back in for windows onlyCampbell Barton
2014-05-01Revert "Fix msvc 2013 compiler errors after the ingenious cleanup in ↵Campbell Barton
4ca67869cc7a." This reverts commit a47a4ef82f37428d391cc14a30fa611d6714e71d.
2014-05-01Fix msvc 2013 compiler errors after the ingenious cleanup in 4ca67869cc7a.Thomas Dinges
2014-04-30Code cleanup: remove unused includesCampbell Barton
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-04-26Code cleanup: use 'const' for arrays (blenkernel)Campbell Barton
2014-04-17Refactor to Dyntopo node customdata commit.Antony Riakiotakis
Don't use a dedicated node layer but use temporary int layer instead. Works like a charm as long as we are careful resetting the layer when needed (after pbvh clearing and always after bmesh has been filled in undo) Tip by Campbell, thanks!
2014-04-16Fix related to new split normals draw code.Bastien Montagne
Tessellated split normals CDlayer had no swap func, hence ugly little test_index_face() could not rotate its values correctly when rotating tessellated faces... Extra-reported in T39735.
2014-04-16Dyntopo:Antony Riakiotakis
Store PBVH node ID in CustomData. This avoids a number of hash deletions and checks/insertions on big hashes.
2014-04-13Split Normals I (1/5): basis for split normals (nearly nothing user-visible ↵Bastien Montagne
here): * Add a new calcLoopNormals function to DerivedMesh struct, and implement it for CDDM and CCGDM (subsurf). EditDerivedBMesh (edit mode DM) only gets a dummy one in this commit. * Add a tessellated version of CD_LOOPNORMAL layer (CD_TESSLOOPNORMAL), with relevant code to handle it (tessellation, rna access, etc.). * Change auto_smooth options of Mesh (angle now in radian internaly, and toggle is now used to enable/disable split normals in DM creation process). Note BI render code is not touched here, hence its behavior regarding this option is now incoherent, will be addressed in a separate commit. Reviewers: campbellbarton CC: brecht Differential Revision: https://developer.blender.org/D365
2014-04-05Mempool: remove BLI_MEMPOOL_SYSMALLOC, MEM_* allocs are more efficient nowCampbell Barton
2014-02-25Assert for invalid customdata allocsCampbell Barton
2014-02-14Code cleanup: duplicate headersCampbell Barton
2014-02-05Code cleanup: use bool for static methodsCampbell Barton
2014-02-04Fix T37577: Joining two objects with different UVs destroys UVs of one ↵Bastien Montagne
object in some specific, reproducable, cases MLOOPUV CDlayers had "UV Coord" default name, instead of "UVMap", when it is mandatory matching MTEXPOLY and MLOOPUV to have the same name!
2014-01-31Code cleanup: be less vague checking invalid index valuesCampbell Barton
2014-01-23Fix T38284: Crash with several shrinkwrap constraint using same targetSergey Sharybin
Issue is caused by the race condition between getting custom data layers from target's derived mesh (for vertices and faces) and releasing this derived mesh from other threads. When one releases the derived mesh it'll free temporary data from it, and it'll also update data layers mapping. General rule for threading is that no one is ever allowed to modify data he doesn't own. This means that no temp layers are to be allocated in derived mesh and making it so `CustomData_free_temporary()` doesn't update mapping if nothing was freed will solve the race condition. It is still possible to do other improvements, namely detect which additional data/layers are to be present in derived mesh and create it as a part of `object_handle_update()`, but this is to be solved separately.
2014-01-12Style Cleanup: whitespaceCampbell Barton
2014-01-11Add tangent space computation/access from RNA (i.e. python).Bastien Montagne
This simply mimics code used for loopnormals, to enable py scripts to generate and access (temporary) a tangent 3D vector and bitangent sign for each loop. Together with the split normals, this allow to recreate a complete tangent space for normal mapping (bitangent = bitangent_sign * cross(normal, tangent)). Expects all faces to be tri or quads. Reviewed By: Brecht, campbellbarton Differential Revision: https://developer.blender.org/D185
2013-11-29Fix T37407: removing cd-layer didn't set the active layer correctlyCampbell Barton
2013-11-26Fix T37541: multires not reading external displacement file after entering ↵Brecht Van Lommel
edit mode.
2013-11-25Code Cleanup: rename vars for detecting change to be more consistentCampbell Barton
rename change/is_change/is_changed/modified -> changed also use bools over int/short/char and once accidental float.
2013-10-05Fix for my last customdata fix, accidentally left in comments.Brecht Van Lommel
2013-10-05Fix for unnecessary customdata warning with empty meshes.Brecht Van Lommel
2013-10-01Fix issues reported by coverity scan in recent changes to customdata code.Brecht Van Lommel
2013-09-24fix [#36781] triangulation modifer creasesCampbell Barton
new geometry was initializing its original index to 0 (so all edges displayed with the first edges crease value). now initialize to NONE.
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-15use stack memory for deform weight interpolation.Campbell Barton
2013-09-10Update to writefile: do not save TEMPORARY or NO_COPY CD layers!Bastien Montagne
Neede for next commit (split normals API).
2013-07-22optimization:Campbell Barton
- halve the number of allocs in layerInterp_mdeformvert list creation. - use direct loop access in emDM_copyLoopArray
2013-07-21code cleanup: add break statements in switch ()'s, (even at the last case).Campbell Barton