Age | Commit message (Collapse) | Author |
|
Regression in 700c40e2
Also avoid unnecessary flushes with material changes with hidden faces.
|
|
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.
|
|
|
|
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
|
|
|
|
Differential Revision: https://developer.blender.org/D1645
|
|
|
|
|
|
We had too many warnings lately... was awaiting that someone would kill them - didn't happen -> goes to my commit ratio! :P
|
|
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.
|
|
Add BKE_bmbvh_overlap, remove BKE_bmbvh_find_face_segment
|
|
|
|
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!
|
|
Part of moving away from MFace.
|
|
- place return args last position
- move crazyspace function out of DerivedMesh header
- use bool for args
- flow control on own lines to ease debugging
|
|
Really bad code here, index of fetched data was basically totally off
and unrelated to what it should be.
|
|
Check for changes in material (as other drawing code already does)
|
|
matching convention for fixed length api, eg: copy_v3_fl
|
|
|
|
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.
|
|
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.
|
|
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.
|
|
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
|
|
|
|
Caused by own fix for another display case.
Shoud be safe for 2.73 final.
|
|
commits.
|
|
Basically, our drawing code assumed we always use the edit mesh
materials, which can be different from the derived mesh
materials in modifiers doing overrides. We usually we want to use the
derived mesh when it is available instead.
There are two fixes here for both solid and textured mode. Unfortunately
the fixes do not help to make the display code less labyrinthian but I
expect this "should work" (tm and famous last words)
Solid mode fix is 95% from Bastien, thanks!
|
|
swapping the colors is no longer needed.
|
|
https://developer.blender.org/D643
Separates graphics context creation from window code in Ghost so that they can vary separately.
|
|
Yep, at last it's here!
There are a few minor issues remaining but development can go on in
master after discussion at blender institute.
For full list of features see:
http://wiki.blender.org/index.php/Dev:Ref/Release_Notes/2.72/Painting
Thanks to Sergey and Campbell for the extensive review and to the
countless artists that have given their input and reported issues during
development.
|
|
- BLI_BITMAP_SET -> BLI_BITMAP_ENABLE
- BLI_BITMAP_CLEAR -> BLI_BITMAP_DISABLE
- BLI_BITMAP_GET -> BLI_BITMAP_TEST
- BLI_BITMAP_MODIFY -> BLI_BITMAP_SET
|
|
Opted to keep includes if they are used indirectly (even if removing is possible).
|
|
|
|
too when in "vertex per face" display
So, turned out after all we need a foreachmapped helper for loops as well... :/
CDDM and EBDM were reasonably simple, but I fought hours with CCGDM (subsurf) to find only a
bad working solution (see D478). So I fallback to a code similar to CDDM one.
Probably not nice for performances, but loops and subsurf are not matching well...
Reviewers: campbellbarton
CC: brecht
Differential Revision: https://developer.blender.org/D478
|
|
some deform modifiers.
|
|
|
|
Mostly monkey coding in gpu ("modern" VBO drawing) and DM variants ("legacy" drawing) code...
Reviewers: brecht
Reviewed By: brecht
CC: campbellbarton
Differential Revision: https://developer.blender.org/D367
|
|
* Merely a re-implementation of core split algorithm for BMesh, taking advantage of topological data available.
* This code needs valid loop indices, so added BM_LOOP support to BM_mesh_elem_index_ensure() & co.
Reviewers: campbellbarton
Reviewed By: campbellbarton
CC: brecht
Differential Revision: https://developer.blender.org/D366
|
|
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
|
|
|
|
|
|
|
|
This code was using a //const// char array for fallback colors and then
writing to it (hidden to the compiler by explicit casting). Bad!
|
|
|
|
|
|
Those derived meshes (used in Edit mode) were using simple sum of neighbor poly normals to get vertex normals,
while everywhere else in Blender we use weighted sum of such poly normals.
Patch: D311
Reviewed and enhanced by Campbell, thanks!
|
|
|
|
This adds BM_bmesh_calc_tessellation() so we can get triangles from a
bmesh without having to have an editmesh available.
|
|
|
|
since enough bmesh operations can also take advantage of direct index lookups on verts/edges/faces.
developers note:
- EDBM_index_arrays_init/ensure/free -> BM_mesh_elem_table_ensure/init/free
- EDBM_vert/edge/face_at_index -> BM_vert/edge/face_at_index
- EDBM_uv_element_map_create/free -> BM_uv_element_map_create/free
- ED_uv_element_get -> BM_uv_element_get
|