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-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-07-16Add tessellation data to DerivedMesh (LoopTri)Campbell Barton
This stores loop indices into the loop array giving easier acess to data such as vertex-colors and UV's, removing the need to store an MFace duplicate of custom-data. This doesn't yet move all internal code from MFace to LoopTri just yet. Only applies to: - opengl drawing - sculpting (pbvh) - vertex/weight paint Thanks to @psy-fi for review, fixes and improvements to drawing!
2015-07-10CustomData: deprecate CD_ID_MCOLCampbell Barton
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-26Code cleanup: give anomymous enum used for CustomData.type a nameNicholas Bishop
Used this in GPU module to clarify what some "ints" really are. Reviewed By: campbellbarton Differential Revision: https://developer.blender.org/D1026
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-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-10Code cleanup: use struct type for mempool & style editsCampbell 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-09-13Change the enum for CustomDataMask bits back to #defines.Nathan Letwory
enum is an int, and values from CD_PREVIEW_MLOOPCOL (32) onwards will not give what apparently was expected. Found with help from Oscurart in #blendercoders while trying to figure out compile error with CMake/msvc9. Occasionally it is good to heed the warnings given by compilers!
2013-09-10Another DNA cleanup (enums instead of defines).Bastien Montagne
2013-05-01Fix #35171: crash rendering cube with two subsurf modifier in some ↵Brecht Van Lommel
circumstances. Problem was actually integer overflow in the requested data layers (1 << 31) does not fit in an integer, it only goes up to (1 << 31) - 1.
2013-03-13New implementation of Freestyle edge/face marksTamito Kajiyama
The previous implementation of Freestyle edge/face marks was refactored based on suggestions from the latest code review by Campbell. The new implementation relies on mesh CustomData to store edge/face marks, instead of introducing extra flags in the core Mesh and BMesh data structures. The CustomData-based implementation will allow further additions of new edge/face attributes because of the independence from Mesh/BMesh. This revision is work in progress, mainly intended to address the review comments and ask for further code review in view of the trunk merger in the upcoming 2.67 release.
2013-03-02code cleanup: clarify comment about virtial-modifiers, also add comments to ↵Campbell Barton
DNA headers when its not so obvious what their purpose is.
2012-12-16replace strcpy with BLI_strncpy or memcpy when the size is known.Campbell Barton
2012-10-30remove CD_POLYINDEX customdata layer:Campbell Barton
reported as [#29376] BMESH_TODO: remove tessface CD_ORIGINDEX layer for a single mesh there could be 3 origindex mappings stored, one on the polygons and 2 on the tessfaces. (CD_POLYINDEX and CD_ORIGINDEX). as Andrew suggests, now tessfaces (which are really a cache of polygons), using origindex to point to polygons on the same derived mesh, and polygons only store the original index values.
2012-10-04code cleanup: remove USE_BMESH_FORWARD_COMPAT - this was added to load bmesh ↵Campbell Barton
in pre-bmesh blender version, remove MODSTACK_DEBUG, was never used.
2012-09-21remove sticky coords from blender and the internal render engine.Campbell Barton
2012-05-22Add MVertSkin DNA/RNA and customdata (CD_MVERT_SKIN).Nicholas Bishop
The MVertSkin currently just stores local skin radii and skin flags (MVertSkinFlag). Skin modifier documentation: http://wiki.blender.org/index.php/User:Nicholasbishop/SkinModifier Reviewed by Campbell Barton.
2012-05-11Add DNA and customdata entries for paint masks.Nicholas Bishop
CD_PAINT_MASK is a layer of per-vertex floats for non-multires meshes. Multires meshes use CD_GRID_PAINT_MASK, which is a layer of per-loop GridPaintMask structures. GridPaintMask is similar to MDisp, but contains an array of scalar floats. Note: the GridPaintMask could be folded into MDisp, but this way should be easier to add mask layers in the future (if we do fold GridPaintMask into MDisp, the mask array should probably be an array of arrays with a 'totmask' field so that mask layers can be easily supported.) Includes blenload read/write support for CD_PAINT_MASK and CD_GRID_PAINT_MASK.
2012-03-22Renaming CD_WEIGHT_MCOL/MLOOPCOL and their masks from WEIGHT to PREVIEW, as ↵Bastien Montagne
this layer is now also used for various preview tasks in Object mode. “Cleanup” commit, no functional changes.
2012-03-08style cleanup - spelling.Campbell Barton
2012-02-22bmesh python api change in internal behavior.Campbell Barton
* Only have 1 python object per bmesh, vertex, edge, loop, face. * Store pointers back to the python data in a custom data layer so as not to use more memory for normal editing operations (when pythons not running). * Currently this data is created and freed along with the BMesh PyObject. * Incidentally - this fixes comparisons for bmesh elements which wasnt working before.
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-06Ported UvElementMap code to bmesh, still untested but at least compiling.Antony Riakiotakis
Next, uv sculpting will be ported. Also fixed "initializer element is not computable at load time" compile error caused due to bit-shifting a constant past its precision length (1L should be 1LL for 32 positions left shift).
2012-02-05support for 'origspace' data layer - used for hair on subsurf mesh.Campbell Barton
currently only works for 3/4 sided faces.
2012-01-22svn merge ^/trunk/blender -r43564:43609Campbell Barton
2012-01-21change filepath limit from 240 to 1024Campbell Barton
2012-01-11svn merge ^/trunk/blender -r43278:43294Campbell Barton
2012-01-11Longer names support for all ID and other object namesSergey Sharybin
This commit extends limit of ID and objects to 64 (it means 63 meaning characters and 1 for zero-terminator). CustomData layers names are also extended. Changed DNA structures and all places where length constants were hardcoded. All names which are "generating" from ID block should be limited by MAX_ID_NAME-2, all non-id names now has got own define called MAX_NAME which should be used all over for non-id names to make further name migration stuff easier. All name fields in DNA now have comment with constant which corresponds to hardcoded numeric value which should make it easier to further update this limits or even switch to non-hardcoded values in DNA. Special thanks to Campbell who helped figuring out some issues and helped a lot in finding all cases where hardcoded valued were still used in code. Both of forwards and backwards compatibility is stored with blender versions newer than January 5, 2011. Older versions had issue with placing null-terminator to DNA strings on file load which will lead to some unpredictable behavior or even crashes.
2011-12-30minor dna header cleanupCampbell Barton
2011-12-28svn merge ^/trunk/blender -r42920:42927Campbell Barton
2011-12-28initial merge of bmesh customdata layer code into trunk, ifdef'd out for now ↵Campbell Barton
with USE_BMESH_FORWARD_COMPAT.
2011-12-28sync customdata layers up with trunk. existing bmesh files will crash on ↵Campbell Barton
load but this is unavoidable.
2011-12-28merge in customdata changes from BMesh - biggest change is caching the layer ↵Campbell Barton
index values in a typemap.
2011-12-28reduce size of typemap, and minor changes to sync with trunkCampbell Barton
2011-12-28minor changes from bmesh into trunkCampbell Barton
2011-11-13Add CD_POLYINDEX layer to reduce need for retesselationsAndrew Wiggin
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-09-11svn merge -r40075:40104 https://svn.blender.org/svnroot/bf-blender/trunk/blenderCampbell Barton
2011-05-17synched with trunk at revision 36569Nick Samarin
2011-05-12manually copy more changes from trunk.Campbell Barton
2011-02-27merge with/from trunk at r35190Joseph Eagar
2011-02-17DNA header files are now grouped under the same module. No further ↵Nathan Letwory
documentation done.
2011-02-17Starting work on doxygen cleanup. Many things still to be done.Nathan Letwory
2011-02-16synched with trunk at revision 34793Nick Samarin
2010-10-05Reorganisation of COLLADA import code. Classes have been split into their ↵Nathan Letwory
own files. No functional changes. Where necessary extern "C" {} blocks have been added.