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
2018-06-04Cleanup: strip trailing space in bmesh moduleCampbell Barton
2018-05-25Applied soc-2017-normal-toolsRohan Rathi
2018-04-16Multi-Object EditingCampbell Barton
This adds initial multi-object editing support. - Selected objects are used when entering edit & pose modes. - Selection & tools work on all objects however many tools need porting See: T54641 for remaining tasks. Indentation will be done separately. See patch: D3101
2018-04-05Remove workspace object mode, reverts changes w/ 2.8Campbell Barton
This caused too many problems syncing object modes with multiple objects/windows/workspaces, see: D3130 for details.
2018-03-13Merge branch 'master' into blender2.8Campbell Barton
2018-03-13Cleanup: doxygen commentsCampbell Barton
2018-03-02Merge branch 'master' into blender2.8Campbell Barton
2018-03-01Refactor: Merge non-functional-change part of 'edit normals' 2017 GSoC.Bastien Montagne
This merges changes in internals, runtime-only of existing custom normals code, which make sense as of themselves, and will make diff of soc branch easier/lighter to review. In the details, it mostly changes two things: * Now, smooth fans (aka MLoopNorSpaceArray) can store either loop indices, or pointers to BMLoop themselves. This makes sense since in BMesh, it's relatively easy to get index from a BMElement, but nearly impracticable to go the other way around. * First change enforces another, now we cannot rely anymore on `loops` being NULL in MLoopNorSpace to detect single-loop fans, so we instead store that info in a new flag. Again, these are expected to be totally non-functional changes.
2018-02-22Merge branch 'master' into blender2.8Bastien Montagne
Conflicts: source/blender/bmesh/intern/bmesh_mesh.c
2018-02-22Fix (unreported) meshes changing shading when creating empty clnors data.Bastien Montagne
When you were using autosmooth to generate some custom normals, and created empty custom loop normal data, you would go back to an 'all smooth' shading, cancelling some sharp edges generated by the mesh's smooth threshold. Now we will first tag such edges as sharp, such that shading remains the same. This is not crucial in current master, but it is for clnors editing gsoc branch!
2018-02-22Cleanup: clnor code: more 'do not use same varname for two different things'.Bastien Montagne
2018-02-08Object Mode: move to workspace structCampbell Barton
- Read-only access can often use EvaluationContext.object_mode - Write access to go to WorkSpace.object_mode. - Some TODO's remain (marked as "TODO/OBMODE") - Add-ons will need updating (context.active_object.mode -> context.workspace.object_mode) - There will be small/medium issues that still need resolving this does work on a basic level though. See D3037
2017-11-26Removing OMP: nuke last usages in bmesh_mesh.cBastien Montagne
Those three ones were actually giving no significant benefits, in fact even slowing things down in one case compared to no parallelization at all (in `BM_mesh_elem_table_ensure()`). Point being, once more, parallelizing *very* small tasks (like index or flag setting, etc.) is nearly never worth it. Also note that we could not easlily use per-item parallel looping in those three cases, since they are heavily relying on valid loop-generated index (or are doing non-threadable things like allocation from a mempool)...
2017-11-26Fix for Fix (c): broken atomic lock in own bmesh code.Bastien Montagne
That was a nasty one, Debug build would never have any issue (even tried with 64 threads!), but Release build would deadlock nearly immediately, even with only 2 threads! What happened here (I think) is that gcc optimizer would generate a specific path endlessly looping when initial value of virtual_lock was FLT_MAX, by-passing re-assignment from v_no[0] and the atomic cas completely. Which would have been correct, should v_no[0] not have been shared (and modified) by multiple threads. ;) Idea of that (broken) for loop was to avoid completely calling the atomic cas as long as v_no[0] was locked by some other thread, but... Guess the avoided/missing memory barrier was the root of the issue here. Lesson of the evening: Remember kids, do not trust your compiler to understand all possible threading-related side effects, and be explicit rather than elegant when using atomic ops! Side-effect lesson: do check both release and debug builds when messing with said atomic ops...
2017-11-25Fix broken atomic_cas lock in own recent commit in bmesh.Bastien Montagne
Using atomic cas correctly is really hairy... ;) In this case, the returned value from cas needs to validate *two* conditions, it must not be FLT_MAX (which is our 'locked' value and would mean another thread has already locked it), but it also must be equal to previously stored value... This means we need two steps per loop here, hence using a 'for' loop instead of a 'while' one now. Note that collisions are (as expected) very rare, less than 1 for 10k typically, so did not catch the issue initially (also because I was mostly working with release build to check on performances...).
2017-11-24Cleanup leftover timing debug prints from own recent commits.Bastien Montagne
Sorry about that...
2017-11-23Getting rid of OMP: first usage of new parallel BMesh items iteration instead.Bastien Montagne
`BM_mesh_normals_update` was converted from OMP to new parallel iterator code, basic test with heavily subdivided cube (24.5k faces) gives: - old OMP code: average 10ms per run. - new BLI_task code: average 6ms per run. So new code seems to be easily 40% quicker, in addition to getting rid of OMP. ;) Reviewers: sergey, campbellbarton Differential Revision: https://developer.blender.org/D2930
2017-10-06Cleanup: Math lib naming (use v3 suffix)Campbell Barton
2017-05-15Cleanup: warnings, styleCampbell Barton
2017-05-06bmesh: use 'uint' instead of 'unsigned int'Campbell Barton
no functional changes.
2017-03-31Fix T51072: The reference of a pyobject may be being overwritten in ↵Germano Cavalcante
`bm_mesh_remap_cd_update` In this case the Pyobject gets lost from pybm, and bm.free() does not invalidate the PyElem. This will cause the destructor of python to read invalid memory and crash. The solution is to make a copy of the pyobjects pointers before overwriting.
2017-03-14Fix T50876: Cycles Crash - Cycles crashes before sampling when certain ↵Bastien Montagne
meshes have autosmooth enabled. The root of the issue was in custom normal code, so far it assumed that we could only have one cyclic smooth fan around each vertex, which is... blatantly wrong (again, the two cones sharing same vertex tip e.g.). This required a rather deep change in how smooth fans/clnor spaces are processed, took me some time to find a 'good' solution. Note that new code is slightly slower than previous one (maybe about 5%), not much to be done here, am afraid. Tested against all older report files I could find, seems OK.
2016-07-07Cleanup: spelling, styleCampbell Barton
2016-07-02BMesh: utility function to resize bmesh elementsCampbell Barton
This can be used to re-allocate bmesh data with/without tool flags. Needed for Symmetrize since it uses bmesh operators from dyntopo.
2016-07-01BMesh: make toolflags optionalCampbell Barton
Saves 8 bytes per vert/edge/face. Gives overall ~20-25% memory saving for dyntopo sculpting and modifiers that use BMesh.
2015-12-22BMesh: store stackdepth as an indexCampbell Barton
Avoids -1 all over.
2015-10-07BMesh: maintain select-history when sortingCampbell Barton
2015-09-01Fix T45939: Crash w/ BMesh.*.sort()Campbell Barton
2015-09-01BMesh: add asserts for BMesh sort ghash lookupsCampbell Barton
2015-09-01Cleanup: redundant castCampbell Barton
2015-05-11GHash: avoid redundant castsCampbell Barton
2015-04-25Cleanup: use 8 space indent for multi-line argsCampbell Barton
2015-04-20Editmesh select nearest fixesCampbell Barton
- distance from edge check wasn't clamping 0-1 - vertex bias wasn't taking pixelsize into account. - index & pass counter were floats Also some improvements - use BMesh lookup tables when available. - use structs to avoid issues getting out of sync.
2015-02-06Fix T43579: FBX Export shading issue (Broken normals?)Bastien Montagne
Error in custom split normals work, non-autosmooth normals != vertex normals! Loops from flat faces shall take normal of their face, not their vertex. Tsst...
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-19Make use/computation of lnors consistant.Bastien Montagne
Issue was, when requesting (building) lnors for a mesh that has autosmooth disabled, one would expect to simply get vnors as lnors. Until now, it wasn't the case, which was bad e.g. for normal projections of loops in recent remap code (projecting along split loop normals when you would expect projection along vertex normals...). Also, removed the 'angle' parameter from RNA's `mesh.calc_normals_split`. This should *always* use mesh settings (both autosmooth and smoothresh), otherwise once again we'd get inconsistencies in some cases. Will update fbx and obj addons too.
2014-08-25BMesh: New operator flag not to clear historyCampbell Barton
2014-08-07BMesh: use existing lookup tables when remappingCampbell Barton
2014-07-19Defines: replace ELEM3-16 with ELEM(...), that can take varargsCampbell Barton
2014-07-12Replace BLI_SMALLSTACK_FREE with fake user (quiet warnings in msvc)Campbell Barton
2014-07-11Fix potential bug in loop normals code.Bastien Montagne
Even if we cannot use computed lnor, we still have to empty the fan stack of lnors!
2014-06-05Avoid openmp sections in BM_mesh_elem_index_ensureCampbell Barton
2014-06-05Code cleanup: mixup hflag/htypeCampbell Barton
2014-06-05BMesh: avoid using OpenMP when nothing to doCampbell Barton
Gave slowdown drawing on high poly meshes
2014-05-28Fix T40405: Blender crashes on FBX export instantly.Bastien Montagne
Better fix than rBbef5cb3aa2e5a: consider edges between faces with opposed normals as sharp. In fact, previous code was broken more deeply in this case (inconsistent normals across a 'smooth fan') - some loop normals would even never be computed! Fixing this is possible (even wrote it, actually), but this adds more complexity to a piece of code that is already awfully complicated, *and* normals in that kind of smooth fan do not make much sense anyway. So simpler and nicer results with assuming sharp edges between such 'opposed' faces! Note that there is some face (loop) ordering black magic at work here, added more comments to try to explain how and why all this works. As a bonus, we do not need to check for already computed loop normals anymore, since we know each 'smooth fan' will be walked once, and only once.
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).