leaving in a DL_VERTS type displist (and modifying mesh)
- removed DL_VERTS displist type (woot woot)
- makeDispListMesh now puts deformed verts in object->derivedDeform
- switch over other system parts to new deformed vert storage,
still kinda hacky and maybe some inconsistencies... will be
sorted out soon enough.
- moved build_particle_system to makeDispListMesh... this may have
adverse side effects, needs to be sorted out with depgraph system
- added mesh_get_derived_deform function (always returns a DerivedMesh
corresponding to deformed (but not subdivided) mesh). used in places
where original mesh is to be displayed but with deformed coordinates
(vpaint for example).
- added DirectMesh.getVert{Co,No} implementations for MeshDerivedMesh
- updated vpaint to use mesh_get_derived_deform
- changed mesh_get_derived_render to always return a DerivedMesh (even if
no subsurf)
- changed init_render_mesh to always get the mesh data through a
DerivedMesh
situations where data can be shared easily.
- added convertDisplistToMesh function for regular mesh DerivedMesh
interface (how many times can *you* use mesh in one sentence?)
- do_puno was uninitialized in init_render_mesh
- added mesh_get_derived_final (temporary), difference from
mesh_get_derived is it always returns a derived mesh, even if
no subsurf.
- appropriate callers of makeDispList replaced with depgraph calls
- unappropriate places just killed... small chance this gives some
errors in corner cases if dep graph isn't notified (example, font
family displists) but these can be tracked down as they show up.
- still a large number of callers of makeDispListCurveTypes, but
makeDispListMesh has just a few.
((me->flag&ME_SUBSURF) && me->subdiv)
In build_mesh_data(). This because meshes with subdiv==0 were calling a
MakeDisplist() for each redraw otherwise, disabling for example the
posemode "delay deform" feature. (bug #2700)
Daniel; it would help if you would add comments in the code, for example
to understand the difference between;
mesh_get_base_derived()
mesh_get_derived()
and how it relates to
build_mesh_data()
I realize most of the mess is in displist code... and confusing use
of features while editing, posemode, & render. Nevertheless, it's not
clear at first sight which parts of derivedmesh is design, and which
part reflects the hacks to make it work. :)
- removed displistmesh_from_{mesh,editmesh}
- removed EditVert.ssco
- removed unused functions for DispListMesh DerivedMesh
Still need lots more testing for this stuff.
before it would follow subsurf code path by creating fake displistmesh,
etc... kinda fun for testing but just annoying now.
- change to creasing behavior, to make sure that with full creasing effect
is just simple subdivision.
- added G.editMesh->derived pointer... idea is to use this
for mesh derived from editmesh instead of Mesh->derived (as the
derived mesh tends to vary depending on what it came from).
This part could be cleaner, also there may problems with it not
being invalidated correctly.
- And most importantly: In case people were beginning to worry all
these edits were just crazy zr stuff, the big point comes about:
Incremental subsurf calculation is now enabled. This gives massive
speed improvements when editing a large mesh.
For the eye-candy happy: try setting G.rt==52 before entering editmode
and the edges and vertices (in optimal mode) will switch to displaying
visually the age since a region has last been calculated. Lots of
fun!
overrated. Turns out there was a bug in recalc code where
in editmode mesh was getting reevaluated all the time (because
ob->disp doesn't get built in editmode). This should fix.
- Fix some normal calculation/backwards face drawing
to determine if element should be drawn and to set draw options),
which meant some could be combined - eases implementation of new
DerivedMesh types and keeps more app specific logic out of DerivedMesh
implementations.
- removed DL_MESH displist type!!!! Now store a DerivedMesh directly.
- May still be some issues left having to do with releasing this
at the right time (old code just splashed free_displist all
over the place).
- switched drawmesh.c to use new functions
- WHEE! This is last such function that has to be written for the time
being, and also effectively marks the end of DL_MESH! DispListMesh still
hangs around as a kind of interchange format but should also die once
DerivedMesh provides more intimate mesh access.
DL_MESH (the displist type for DispListMesh) is still used to hold
the DispListMesh, but that will die as soon as new subsurf switches to
using a bonafide DerivedMesh implementation. There is also one silly
usage for the decimator that is easy to kill.
- Oh, and I also made potatoe mode draw mesh vertex colors - seemed to
be more uniform behavior.
- cancelled previous commit to add RE_findTFAce, instead just added
a MemArena to render struct... free'd at end of render, can be used
to store other data as well
- switch rendering to using DerivedMesh API... this is slightly more
inefficient now because it is doing some unnecessary copying. Can
be fixed by defining a DerivedMesh function to convert the object
into a render object (on todo list)
implementations (slightly redundant, could implement draw in terms
of first... can be cleaned later)
- switch to use of new APIs... all uses of EditVert->ssco are now
clean (read: ready to die as soon as a proper DerivedMesh implementation
is swapped in with ccgsubsurf)
implementations
- updated drawobject selection code to use DerivedMesh (last DispListMesh
usage in drawobject.c that needs to be replaced! Woot!)
- interface could still be a lot cleaner, mostly calculating indices for
the various things to pass to selection color routine is hacky.
this is to ease migration.
- updated particles and STL converter to use DerivedMesh interface. This
is a bit wasteful at the moment, but these are not key performance areas.
Can update once DerivedMesh has accessors for faces and face data.