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-12-14Cleanup: naming (mean -> median) see T47811Campbell Barton
2018-12-06Cleanup: no need to access final meshCampbell Barton
2018-09-19BLI_utildefines: rename pointer conversion macrosCampbell Barton
Terms get/set don't make much sense when casting values. Name macros so the conversion is obvious, use common prefix for easier completion. - GET_INT_FROM_POINTER -> POINTER_AS_INT - SET_INT_IN_POINTER -> POINTER_FROM_INT - GET_UINT_FROM_POINTER -> POINTER_AS_UINT - SET_UINT_IN_POINTER -> POINTER_FROM_UINT
2018-06-17Cleanup: trailing space for blenkernelCampbell Barton
2018-02-18Cleanup: add 2d suffix to BLI filesCampbell Barton
Some of these API's can have 3D versions, explicitly name them 2D.
2017-09-30Fix vertex paint w/ subsurf drawingCampbell Barton
Only use alpha blending when in vertex paint mode.
2017-09-25Add an 'atomic cas' wrapper for pointers.Bastien Montagne
Avoids having to repeat obfuscating castings everywhere...
2017-09-25Tweak to fix for thread concurency in looptri generation.Bastien Montagne
Even if pointer assignment may be atomic, it does not prevent reordering and other nifty compiler tricks, we need a memory barrier to ensure not only that transferring pointer from wip array to final one is atomic, but also that all previous writing to memory are “flushed” to (visible by) all CPUs... Thanks @sergey for finding the potential (though quite unlikely) issue.
2017-09-20Fix T52852: Assert in looptri calculation after recent changes.Bastien Montagne
Wrong condition in asserts...
2017-09-19Fix T52816: regression can't open file in 2.79 (crash).Bastien Montagne
Tentative fix, since I cannot reproduce thenissue for some reason here on linux. Core of the problem is pretty clear though, thanks to Germano Cavalcante (@mano-wii): another thread could try to use looptris data after worker one had allocated it, but before it had actually computed looptris. So now, we use a temp 'wip' pointer to store looptris being computed (since this is protected by a mutex, other threads will have to wait on it, no possibility for them to double-compute the looptris here). This should probably be backported to 2.79a if done.
2017-08-11Cleanup: deduplicate DM's getLoopTriArray() callback.Bastien Montagne
All three functions were doing exactly the same thing, simpler to only have one in that case!
2017-07-12BMesh: move safe loop-normal-calc to own functionCampbell Barton
This makes sense when we want to avoid float precision error for near co-linear edges. OTOH, this is an arbitrary decision, so keep functions separate.
2017-07-02Fix T51746: normal map tangents not working correctly when there are no UV maps.Alexander Romanov
Patch by Alexander, with some refactoring by Brecht. Reviewed By: brecht Differential Revision: https://developer.blender.org/D2709
2017-06-01Fix bad index use drawing deformed face centersCampbell Barton
2017-05-24Fix error accessing tessface color in edit-modeCampbell Barton
Was checking for loop-color in poly-layer.
2017-03-11Cleanup: code style & cmakeCampbell Barton
2016-12-01Fix (unreported) looptri array not being recalculated in ccgDM and emDMLuca Rood
In ccgDM and emDM, looptri array recalculation was being handled directly by `*DM_getLoopTriArray` (`getLoopTriArray` callback), while `*DM_recalcLoopTri` (`recalcLoopTri` callback) was doing nothing. This results in the array not being recalculated when other functions that depend on the array data called the recalc function. This moves all the recalculation code to `*DM_recalcLoopTri` and makes `*DM_getLoopTriArray` call that. This commit also makes a minor change to the `getNumLoopTri` function, so that it returns the correct number without having to recalculate the looptri array. Reviewed By: mont29 Differential Revision: https://developer.blender.org/D2375
2016-10-18[msvc] Minor cleanup in blenkernel.lazydodo
this patch resolves the following warnings; ``` Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 764 Warning C4098 'attach_stabilization_baseline_data': 'void' function returning a value blenkernel\intern\tracking_stabilize.c 139 Warning C4028 formal parameter 3 different from declaration blenkernel\intern\cachefile.c 148 Warning C4028 formal parameter 3 different from declaration blenkernel\intern\paint.c 413 Warning C4028 formal parameter 1 different from declaration blenkernel\intern\editderivedmesh.c 591 Warning C4028 formal parameter 3 different from declaration blenkernel\intern\library_remap.c 709 Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 754 Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 758 Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 759 Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 763 Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 764 Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 765 Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 769 Warning C4028 formal parameter 1 different from declaration blenkernel\intern\ocean.c 770 Warning C4028 formal parameter 1 different from declaration blenkernel\intern\DerivedMesh.c 3458 ``` It's mostly things where the signature in the .h and the actual implementation in the .c do not match. And a bunch functions who do not match the TaskRunFunction declaration cause they leave out the __restrict keyword. Reviewers: brecht, juicyfruit, sergey Reviewed By: sergey Subscribers: Blendify Differential Revision: https://developer.blender.org/D2268
2016-09-05Fix glUniform called from glBegin/glEnd blocksSergey Sharybin
Was causing some invalid operations in OpenGL. After more testing should be fine for 2.78.
2016-06-22EditMesh: Avoid creating deform-vert layer every redrawCampbell Barton
Getting a new edit-derived-bmesh was always creating a deform-vert array, even when it wasn't needed. Since this was called on redraw, in many cases it was doing it unnecessarily. Now pass in a custom-data mask and only fill in deform-verts when needed. Gives noticeable drawing speedup (~10-30% here).
2016-06-13Fix glShadeModel being left flat in edit-mode drawCampbell Barton
2016-06-09Flat shading for basic shaderAlexander Romanov
The purpose of the patch is to replace deprecated glShadeModel. To decrease glShadeModel calls I've set GL_SMOOTH by default Reviewers: merwin, brecht Reviewed By: brecht Subscribers: blueprintrandom, Evgeny_Rodygin, AlexKowel, yurikovelenov Differential Revision: https://developer.blender.org/D1958
2016-06-08Fix edit-mesh draw not disabling stippleCampbell Barton
Caused problem w/ basic-shader
2016-06-02Fix for GLSL uniform being update from inside glBegin/glEndSergey Sharybin
This seems to be illegal and not productive anyway. Do it ahead of a time now, which solves shading issues in edit mode and prevents assert from happening.
2016-06-01Fix wrong vertex colors in edit modeSergey Sharybin
2016-05-31Properly handle vertex color color space for Cycles GLSLSergey Sharybin
A bit tricky, need to pass additional information about what the attribute is and how to deal with it. BI path stays unchanged, just to make things simplier for now. Fixes T48555: Cycles GLSL- Incorrect Vertex Color results from Attribute node
2016-04-26Support multiple tangents for BI render & viewportAlexander Romanov
Normal Map node support for GLSL mode and the internal render (multiple tangents support). The Normal Map node is a useful node which is present in the Cycles render. It makes it possible to use normal mapping without additional material node in a node tree. This patch implements Normal Map node for GLSL mode and the internal render. Previously only the active UV layer was used to calculate tangents.
2016-02-03Fix T47249: Wrong edit-mesh material color w/ hidden facesCampbell Barton
Regression in 700c40e2 Also avoid unnecessary flushes with material changes with hidden faces.
2016-01-20Fix for tangent regression w/ looptri changesCampbell Barton
LoopTri changes in 2.76 calculated all tangents as triangles, this gave different results though in most cases it was hard to notice. Though no bugs were reported we should keep our tangents compatible with other users of mikktspace.
2016-01-20Cleanup: style, use constCampbell Barton
2015-12-27OpenGL: stipple support added to basic GLSL shaderAlexander Romanov
The is intended to replace the deprecated glPolygonStipple() calls with a shader based alternative, once we switch over to GLSL shaders. Reviewers: brecht Differential Revision: https://developer.blender.org/D1688
2015-12-08OpenGL: split off framebuffer, shader and texture code into separate files.Brecht Van Lommel
2015-12-06OpenGL: pass flag to indicate of drawMappedFaces needs to use normals.Brecht Van Lommel
Differential Revision: https://developer.blender.org/D1645
2015-11-24OpenGL: clean up use of old extensionsMike Erwin
2015-10-11Fix warnings and remove casts by adding copy_vx_vx_uchar() functions.Brecht Van Lommel
2015-09-04Quiet warningsJulian Eisel
We had too many warnings lately... was awaiting that someone would kill them - didn't happen -> goes to my commit ratio! :P
2015-08-24Fix editmesh GLSL tangent drawingCampbell Barton
The generic tangent calculation relied on CDDM arrays which aren't available in edit-mode. Add a tangent calculation callback, which has its own implementation for editmesh data.
2015-08-20Use BVH-overlap for mesh self-intersection displayCampbell Barton
Add BKE_bmbvh_overlap, remove BKE_bmbvh_find_face_segment
2015-07-17Cleanup: wsCampbell Barton
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-14Move from MTFace to MTexPoly w/ texture checksCampbell Barton
Part of moving away from MFace.
2015-07-02DerivedMesh: cleanup & minor edirsCampbell Barton
- place return args last position - move crazyspace function out of DerivedMesh header - use bool for args - flow control on own lines to ease debugging
2015-05-21Fix T44744, tangents incorrect in edit mode.Antony Riakiotakis
Really bad code here, index of fetched data was basically totally off and unrelated to what it should be.
2015-05-19BMesh: editmode drawing set every faces materialCampbell Barton
Check for changes in material (as other drawing code already does)
2015-05-05Math Lib: rename fill_*, to copy_*Campbell Barton
matching convention for fixed length api, eg: copy_v3_fl
2015-03-21Cleanup: constify scene/modifiersCampbell 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-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.
2015-01-11Fix T43208 material flickering in edit mode.Antony Riakiotakis
Happens because material setting now occurs in the derived mesh drawing routine as it should. However that means that it also happens during selection and that influenced the drawing state somehow. In 2.72 this did not occur because material setting happened during draw setting (skip or draw) instead of after the draw setting passed (so selection would skip it by use another draw setting function). Of course this violated design but worked. Made it now so backbuffer selection does not enable materials (it's redundant in those cases anyway). This could be ported to a possible 'a' release but as is classic with display code there may be some other places that it could backfire. Tested fix with texture/vertex painting and selection which use backbuffer for both subsurf and regular meshes and it seems to work OK.
2015-01-02Fix T43099: Modifiers in edit mode might mess up materialsSergey Sharybin
The issue was originall caused by 2e8ba17 by removing necessery call GPU_enable_material(). It was probably removed because in some cases material was enabled after calling setDrawOptions. That wasn't always a case for edit mode. This is absolutely to be included to 2.73