Age | Commit message (Collapse) | Author |
|
|
|
Factorized a bit the code here, think it's more readable now... No performance enhancement though.
Reviewed by: campbellbarton
Differential Revision: https://developer.blender.org/D259
|
|
to true/false in code using them).
|
|
also remove CDDM_Check, theres no need for it.
|
|
|
|
|
|
|
|
|
|
|
|
a wanring :S
|
|
My previous fix for uninitialized texture coordinates was not working well,
and in fact there was a bigger issue with GLSL drawing and missing attributes
with immediate draw mode. Now it will explicitly pass zero rather than having
it use whatever value was set last.
|
|
|
|
pass in the argument to reserve the size.
|
|
|
|
Now modifier stack wouldn't modify original curve's nurbs
and will operate on a copy of nurbs.
This makes it possible to process curve object update with
shared curve datablocks from multiple threads. There's no
big overhead for creating a copy of nurbs comparing to old
behavior which was allocating original vertex array and
apply coordinates on curve after all modifier are applied.
The only remained issue with curves is curve's bounding box
and texture space. It's not thread-safe, but it wouldn't
lead to crashes -- it just could lead to either memory
leak or wrong texture coordinates due to difference in
modifiers stacks of objects which shares the same curve.
--
svn merge -r57959:57961 ^/branches/soc-2013-depsgraph_mt
|
|
I know this is not so much nice to have this guys hanging
around in a general Object datablock and ideally they better
be wrapped around into a structure like DerivedMesh or
something like this. But this is pure runtime only stuff and
we could re-wrap them around later.
Main purpose of this is making curves more thread safe,
so no separate threads will ever start freeing the same path
or the same bevel list.
It also makes sense because path and bevel shall include
deformation coming from modifiers which are applying on
pre-tesselation point and different objects could have
different set of modifiers. This used to be really confusing
in the past and now data which depends on object is stored
in an object, making things clear for understanding even.
This doesn't make curve code fully thread-safe due to
pre-tesselation modifiers still modifies actual nurbs and
lock is still needed in makeDispListsCurveTypes, but this
change makes usage of paths safe for threading.
Once modifiers will stop modifying actual nurbs, curves
will be fully safe for threading.
Actually, this commit also contains wrapping runtime curve
members into own structure
This allows easier assignment on file loading, keeps curve-
specific runtime data grouped and saves couple of bytes in
Object for non-curve types.
--
svn merge -r57938:57939 ^/branches/soc-2013-depsgraph_mt
svn merge -r57957:57958^/branches/soc-2013-depsgraph_mt
|
|
|
|
|
|
foreachMappedVert/foreachMappedFaceCenter when needed,
this means in editmode with wire draw, face and vertex normals don't have to be calculated at all.
in most cases the normals are not used so add a flag that makes calculating them only for functions that need them.
also fix face normal calculation for CDDM, was using quad calculation for ngons too.
|
|
|
|
|
|
Also construct orco uv layer when converting curve to a mesh.
This makes it possible to preserve automatically generated coordinates
("use uv for mapping" option) when using constructive modifiers or
converting curve to the mesh.
With cycles nothing special is needed to preserve texture mapping
after such operations, in blender internal you'll need to change
texture mapping from Generated to UV.
This feature is useful on it's own and also would help in potential
switch 3d viewport to always use DM to draw objects, which would
help making drawing more thread-safe.
|
|
longer a convention.
|
|
but its not needed.
Now add asserts to make sure this layer is only added once the modifier stack has been calculated.
this saves normal layer being calculated whenver vertex normals need updating.
|
|
many modifiers were calculating normals, when those normals were ignored by the next modifier.
now flag normals as dirty and recalculate for modifiers that set use `dependsOnNormals()` callback.
Quick test on mesh with 12 modifiers (mostly build type), calculated normals 6 times, now it only runs once - so this will give some speedup too.
|
|
the mapping functionality.
replace ED_mesh_calc_normals with BKE_mesh_calc_normals().
|
|
arrays.
|
|
Textured dyntopo draw was leaving 2d textures enabled when it shouldn't.
Root of the issue was figured out by Campbell, actual place where
2D textures left enabled found by self.
Also, simplified fix is suggested by Campbell (mine was 2 lines longer! :)
|
|
modifier.
|
|
|
|
EditDerivedBMesh.tc -> em. ('tc' is odd name which isn't used elsewhere).
|
|
args.
|
|
sculpt.
|
|
Currently used special checks in DM draw code, perhaps better would be
simply to flush changes from PBVH to DM.
Anyway, now things seems to be working OK, will check on better solution
from code point of view later.
|
|
update)
also quiet warning.
|
|
also use malloc over calloc since the values are filled in right after.
|
|
render engines). Replaced generating orco_index by filling the UV loop data
directly which is easier and all that needed to be done anyway.
|
|
unless they are needed.
configurable in 'Geometry Data' panel, will be added when running crease edges transform for example.
|
|
This will only make object display with proper shape in textured
view, but all materials and textures will be replaced with default
gray color. There's currently no better way to deal with textured
display when dynamic topology enabled because of all UV/tfaces are
clearing when enabling dynamic topology sculpt.
Anyway, better to display gray object with proper lighting in this
case rather than not update object's shape during sculpt.
Proper solution will be possible once CD layer will be preserved
by BMesh log.
|
|
available.
|
|
|
|
|
|
This adds an override to the CDDM edge drawing function that switches
to GPU_Buffers drawing for PBVHes of type PBVH_BMESH.
Within the GPU_Buffers code, glPolygonMode() is used to draw lines
instead of faces.
|
|
* Build bmesh PBVH in CDDM when dyntopo is enabled
* Disable all modifiers when dyntopo is enabled
|
|
- use 2 omp sections for vert -> (edge, face) selection flushing.
- dont use face-loop iterator for cddm_from_bmesh_ex conversion to give some speedup (some modifiers use this).
- use float(*)[3] for functions that return coords.
|
|
now blenlib/BLI doesn't depend on any blenkern/BKE functions,
there are still some bad level includes but these are only to access G.background and the blender version define.
|
|
also added comments about texface drawing when theres no origindex.
|
|
Texured Solid draw option
|
|
with n-gon
caused by own change to how origindex is used, now if mpoly's CD_ORIGINDEX array is missing its assumes that its the original mpoly array.
|
|
selected linked in face mode was crashing. (needs bmesh operator flags)
also some style edits, remove unused includes and change triangulate modifiers use_beauty to a flag.
|