really work at all. Fortunately no one actually *USES* nurbs so
no one noticed. This is bug from NaN days (strubi, I am looking at
you here) which I guess says a lot (or a little) about NURBS usage.
And as usual, the correct code is shorter.
- added do_version copy of ME_OPT_EDGES flag
- added ME_EDGERENDER flag, barely changes things atm except makes
sure plain meshes with FasterDraw/etc set still render all edges.
The edge drawing system needs a bit of a revamping - it is a cool
feature but could use several improvements:
(1) The algorithm could be better in choosing the best edges to
draw.
(2) The drawflags should interact well with modifiers. It is wierd
to have a large grid with a deformer that draws no edges because
flags are only calculated based on base mesh.
(3) Drawflags should not be destroyed by editmode. Better design
would be a "Draw % of edges" button.
Of course, could also be the feature is not worth it and we
should just drop. Feel free to comment if you have an opinion.
I removed config.h code from the files that had them.
effect.c had nested /* so cleaned that up...
added a newline to vector.c to shut gcc up ;)
buttons_editing.c had a possible unintalized var (height) so I gave
it a default value.
removed an unused var i in interface_draw.c
removed an unused var mti in outliner.c
in BL_SkinDeformer.cpp
commented out a call to bDeformGroup->data which no longer exists so it
compiles again.
Kent
sticky, dvert, and keys if number of verts don't match)
- changed modifier panel to not allow manual addition of hook or
softbody modifiers
- changed apply modifier to apply to existing mesh (fixes bug with
materials) and to warn about loss of tface/mcol/keys/dvert/sticky
for all modifier types
- changed modifier UI to not display disclosure triangle for virtual
modifiers
- changed softbody ui to allow enable/disable
wondered what these silly data pointers in MDeformVert were for.
Turns out they aren't even need! Just taking up extra memory and
space and confusing the armature deform algorithm. Naturally I
had to clean things up. Sorry Ton.
Deform weights are still stored in a pretty expensive and unnecessary
way, probably use about twice as much memory as needed, and do
way too many memory allocs.
- moved armature_deform_verts into armature.c
- some python code accessed the MDeformWeight data pointers, but
did so in a completely wrong way, I am positive this code could
never have worked (or maybe things changed during tons refactor),
regardless it wouldn't work now... will test later.
but including "virtual" modifiers (for example, an object skel-parented
to a lattice has a virtual first lattice modifier)
- removed mesh_modifier(), all functionality has been incorporated into
modifier stack (well, keys still don't exist as a modifier, but I am
not sure if they should).
- added interface option to convert a virtual modifier into a real modifier
- added option to parent to lattice object or lattice with deform
- bug fix, patch of hook indices patched all hooks (oops) not just ones
for edited mesh
NOTE: Files saved with 2.38 that include an object parented to a lattice
will not load correctly, because it will look like the object is parented
only to the object (i.e. without deform). Can be simply fixed by reparenting
or adding a lattice modifier. Older files are handled automatically.
variables, these are still in same place. enable button automatically
makes/enables modifier.
- changed hook to hook modifier conversion to happen on direct link,
required to make sure we don't forget to free any memory for files
saved with 2.38 that have hooks.
- update modifier interface to enforce modifiers with the require-original-
data flag to not move beyond deforming modifiers.
- enforce only one softbody modifier allowed
NOTE: Once again, no modifier stack for lattice yet means softbody for
lattice does not work atm.
indices that are out of range
- bug fix, hook indicies were not corrected on exit editmode (there
probably should be a general interface for this kind of patch)
can only follow deform (for example, they store mesh vertex
indices)
- added ModifierType.foreachObjectLink for iterating over Object
links inside modifier data (used for file load, relinking, etc)
- switched various modifiers_ functions to take object argument
instead of ListBase
- added user editable name field to modifiers
- bug fix, duplicate and make single user didn't relink object
pointers in modifier data
- added modifiers to outliner, needs icon
- added armature, hook, and softbody modifiers (softbody doesn't
do anything atm). added conversion of old hooks to modifiers.
NOTE-THE-FIRST: User name field is not initialized on loading 2.38 files
so if you have saved stuff with a cvs blender you will see blank names.
NOTE-THE-SECOND: Since modifiers aren't evaluated yet for non-Mesh
objects, hooks for lattices and curves are broken. Don't updated if
you actually, say, *use* Blender.
NOTE-THE-THIRD: Old hooks used a quirky weighting system during
deformation which can't be extended to modifiers. On the upside,
I doubt anyone relied on the old quirky system and the new system
makes much more sense. (Although the way falloff works is still
quite stupid I think).
- added several useful utility functions to editmesh,
these can simplify/clarify a lot of mesh code, check them
out
- cleaned up EdgeSlide a bit to be clearer/shorter
o bug fix, EdgeSlide did not always cancel correctly
o bug fix, EdgeSlide did not choose initial "control" edge
correctly after calc_meshverts_ext change
worked properly with modifiers. Needs more testing I am sure.
No, honestly, I wasn't just cleaning for the hell of it, it
was *necessary* (I would never do such a thing). Selection should
work completely with cage options of modifiers now.
- added DerivedMesh foreach functions to iterate over mapped
verts/edges/face centers. These replaced some of the drawing
functions and are more general anyway. Special edge drawing
functions remain for performance reasons.
- removed EditFace xs, ys fields
- added general functions to iterate over screen coordinates of
mesh/curve/lattice objects
- removed all calc_*verts* functions that were used for storing
screen coordinates in objects. they were recalc'd on the fly
for most situations anyway, so now we just always do that.
calc_*verts_ext was one of those calls that did dirty things
deep down in the callstack (changing curarea and poking at
matrices)
- rewrote all vertex level selection routines (circle, lasso, bbox)
and closest vertex routines (rightmouse select) to use the new
system. This cleaned up the selection code a lot and the structure
of selection is much easier to see now. This is good for future
work on allowing modifiers to completely override the selection
system. It also points out some discrepancies in the way selection
is handled that might be nice to resolve (mesh vertex selection has
fancy stuff to try to help with selecting overlapping, but it only
works w/o bbuf select, and curves/lattices don't have at all).
- had to remove ton's code to move Manipulator to cage location, this
is not reliable (can come up with a different method if requested)
- as it happens BezTriple.s and BPoint.s are basically available to
be removed, just need to rewrite editipo code that still does
background calc of screen coordinates
- MVert.{xs,ys} are still around because they are abused in some places
for other info (not sure if this is safe actually, since they are
short's and the mvert limit went up).
And did I mention this commit is comes out to -305 lines? Well it does.
- switch to using DerivedMesh.drawMappedFaceCentersEM to draw
face dots, still need to do some work so this works in all
selection modes (atm it does not work in no-zbuf mode)
SUBDIV_SELECT_ORIG - Retain selection to look like original selection
SUBDIV_SELECT_INNER - New selection is all the new inner edges
SUBDIV_SELECT_INNER_SEL - New selection is all the new inner edges except where only 1 edges was selected on a face
Loopcut now uses SUBDIV_SELECT_INNER_SEL for better interaction with edgeslide
- add new scene, "Full Copy", didn't copy radio settings
- switch scene didn't reset radiosity baking
(note that you can only do 1 radiosity scene in Blender, switch scene
will free the radiosity data)
Selecting in Mesh edit mode or in FaceSelect mode is tied, but setting
faces hidden was not tied. This caused hidden faces in edit mode to
become selected, with all associated disasters. :)
Now hiding faces in editmode and faceselect are tied too. Please note
that leaving faceselect mode will unhide always!
using bit in pd->flag to signal the use of deformed rather than wasting pd->pad
removing evil cast
replaced by using convertToDispListMesh() ZR: I hope that's OK that way
commented off the ( debug purpose ) recursion trap in SoftBodyDetectCollision()
replaced forbidden okee() with printf() in there
( not so nice, since it does not anounce crash on UI )
note: crashing example from previous commit
needs enabling 'UMS' on panel to crash again
UMS = uses modifier stack
drawMappedEdges
- added DerivedMesh.convertToDispListMeshMapped function which converts and
also returns mapping information for use in editmode
- updated DispListMesh derivedmesh to be able to function in editmode
- update mirror modifier to support use as a cage
- update mirror & subsurf modifiers to properly pass mapping information down
modifier stack
It is now possible to have a mesh with mirror/subsurf modifiers where you
can edit with both as cage. Selecting the mirror'd part works, but of course
transform is flipped so it is a bit weird. Not the cleanest code in the
world and I can't say I am really happy with the architecture but it works for
now and supports the existing feature set.
DLM to share data from DerivedMesh (reduces some copying/memory allocation)
- added displistmesh_copyShared function to copy a DLM but not duplicate any
internal data
- changed crease drawing to use DerivedMesh functions... this means varying
edge width style of creases had to go, I replaced by using varying color to
show crease weight instead. Don't think this is a big loss since the subsurf
result gives you a much better indication of the crease weight anyway.
- bug fix in mirror modifier, didn't copy edge creases from editmesh correctly
works nice & smooth unless we encounter logical circles
well, because of function pointers re-hooking i could not debug that in detail
may be DAG or modifier stack is .. dunno
anyway
did abuse pd->pad bit 1 ( i hope this was 'real' padding till now )
to get SoftBodyDetectCollision(..) use mesh_get_derived_XXX [in effect.c] ..[*sigh* (the linetriangle() func is there)
..]
and put that to the deflection panel (blush .. i would have decapted anyone in my team doing stuff like that)
to defend this commit:
it makes you aware of problems ahead
having code that works/doesn't (on some conditions) is is usefull to look at
i think code is OK , so the problem is either
a. me not understanding
b. real
for locical circles see files -->
http://wund.privat.t-online.de/bt/WorkFine1.blendhttp://wund.privat.t-online.de/bt/WorkFine2.blendhttp://wund.privat.t-online.de/bt/WorkCrash.blend
is in editmode. current bevahaior is to display the object that is
actually in editmode with its modifiers, and all other objects that
share the mesh using just the base editmesh data. this is not 100%
consistent but no architecture at the moment to display all objects
that have mesh in editmode with each individual modifier stack.