Adding Ipos on a Constraint just was working totally insane. Here's how
it works now in the constraint Panel:
- Button "Show" will make the IpoWindow show the Constraint Ipo
(it didn't before, when IpoWindow was not set to correct mode)
- Button "Key" will insert a key point on current frame (and show it in
IpoWindow)
Note that both options will create an Action too, if not existed yet.
So, without opening an IpoWindow you can already animate Constraints.
(Todo: use the auto key option to always insert on changing slider)
And; selecting a Bone will update the Constraint IpoWindow too. Note
however, that when theres multiple Constraint Ipos on a Bone, it only
shows the first... will solve that later.
- Vpaint and Wpaint now use our own custom cursor, this was a very old
plan anyway. It uses the 'knife' now, we need a good brush icon for it!
- On scaling bones in editmode, the deform distance info gets scaled now
too when no "Envelope" draw mode was set.
- Disabled front buffer drawing of objects with CTRL+select in Edit Mode.
Uses a regular redraw now (like for select in Object Mode btw)
- default the m_edgecode to 65535, the wireframe was invisible. when is the edgecode available again ?
- added an extra condition, nearsensor is not yet working for bullet, but it crashed.
- Armature deform options "Envelope" and "Vertexgroup" didn't combine. One
Vertexgroup added disabled all Envelopes
- "Clear" option in WPaint Panel now sends refresh to deform
- Same for Undo in Wpaint
- revert to drawLooseEdges instead of general drawEdgesFlag
- ditched TFace edge flags, done dynamically now which also
means don't need to recalc surface on flag changes
- added BLI_edgehash, guess what it does
- Hotkey CTRL+TAB toggles weightpaint on/off
- If Mesh has no vertex groups yet, it still accepts Weight Paint mode.
Then, on a first painting stroke it creates a default group.
- When combining WeightPaint mode with Bone selecting, if you select a
Bone without vertex group it draws Mesh dark blue. On a first painting
stroke it then also creates a new group, with the Bone name.
Armature Panel
- "Vertex Groups"
- "Envelope"
Bones Panel
- "Mult"
The logic works as follows;
- Set "Vertex Groups" will enable vertex group based deform (default)
- Set "Envelope" will enable Bone Envelopes to deform
- Set both will apply Envelope deform on vertices without VertexGroups
- Set the per-Bone "Mult" option to have Envelopes work on top of a
VertexGroup
- The per-Bone "Deform" option (was called "Skinnable") will dis/enable
the Bone to deform for all situations.
The old convention was that, without any vertex groups, the Bones deformed
with bone-distances. I can't patch that... so you have to enable it by
hand in older files. Not too bad, since this option was unusable before
anyway. :)
- BPy_Material_methods[] "setFilter" calls Material_setFresnelMirrFac()
- Material_setSpecSmooth() should be setting param[3], not param[2]
Contributed by Ken Hughes. Thanks!
- corrections to constants
- parameter type checking
- correct use of METH_VARARGS vs METH_NOARGS
- return objects instead of strings in Scene.getChildren() as per doc.
- correct logical operators
Thanks, Ken!
This works pretty nice for better control over the curvature of any bone
deform. No need to give Bones (vgroups) large influence, just add a coupleof B-bone segments.
Two notes;
- The Bone property "Segments" defines if a deform happens as a 'B-bone'.
The drawtype B-bone is just for display in 3d window.
- A B-bone also deforms (bends) in Rest-position, if there's a joint that
creates a curved Bone. Therefore, best results you get by creating a
rest-position with straight joints. Or, if you prefer a slightly bended
restposition (for a spine or so), make sure the Mesh model is *not*
curved, the B-bone will do this for you.
Also added: proper events on changing buttons for Bones, like "Segm" or
"Dist" etc.
64 bits systems... weird bug. :)
It now only does a unit-of-4 check, for all systems. This will work fine,
since the malloc code will return aligned anyway, and the guarded alloc
system only stores ints in the headers. Also, the sizeof() call will
correctly do padding, so there's no risk of allocating too small blocks.
to get rid of faces with MFace.v3==0
- change all Mesh's to have ->medge now. This is forced by make_edges
on readfile, and in the various exotic important routines, and on
conversion back in python.
- make python NMesh structure always have medges now (needs testing)
- with above two changes it is guarenteed that mf->v3 is never ==0
in main blender code (i.e., all MFace's are actually triangles
or quads) and so I went through and removed all the historic tests
to deal with MFace.v3==0. Equals lots of deleting, I am in heaven!
- removed MEdge edcode flag, no longer needed
- added experimental replacement for edge flag system
Still are some inconsistencies in FACESELECT mode edge drawing to
be ironed out.
NOTE: This commit adds an experimental edge flag calc system, based
on 10-seconds-of-thought algorithm by yours truly. Would appreciate
feedback on how this system works, esp compared to old one and esp
on complex or interesting models.
To Use: New system is enabled by setting G.rt to a value between
1 and 1000 (Value of 0 uses old system). Value 1000 is reserved for
"auto" edge, which is more or less identical to old system but also
makes sure that at least 10% of edges are drawn (solves errors for
super subdivided meshes). Values between 1 and 999 act as percent
(out of 1000) of edges that should be drawn, starting with "most
interesting" edges first. Please try it and comment!
Press ALT+B in 3d window, draw a rect, and it becomes a clipping
volume of 4 planes. You then can rotate the view anyway you like.
Works for each 3d window individually.
Disable it with another ALT+B press.
Commit is huge because it had to change all selection code as well.
The user-clipping planes are in 'eye space', the other clipping
happens in projected 'viewport space'.
Nice to notice is that the 'x=3200' convention (to denote a coordinate
is clipped) now is a define. Define value is still a number though... but
we now can get up to screens of 12000 pixels without issues!
Known issue; here it refuses to draw the 'object centers' or Lamp icons
within the clipping region. Can't find any reason for it... however, we
might move to non-pixmaps for it anyway.
Testing might reveil numerous issues, will be standby for it.
Curious? Check this http://www.blender.org/bf/rt4.jpg
- Modifier Panel, name label for "Virtual" modifiers was too short
- On extrude Bones, "soft distance" now is always set based on length
of the bone (also on CTRL+click, also when Envelope drawmode is not set)
- Added undo-push for "Apply Bone Envelopees to VertexGroup" in WeightPaint.
- Menu-buttons in floating panels sometimes gave drawing error
- InfoWindow buttons were always allocated & drawn, even when window was
zero sized... waste of cpu, tsk!
- added user settable defaultEdgeData (for auto edge creation
in CCGSubSurf)
- bug fix, possible crash on meshes with loose edges but
in mface not in medge
- missed file in last commit, for proper updating in image
window
errors
- change drawimagespace to check and update object data if
it needs a recalc. this fixes errors with a recalc being
flushed but not actually being done before spaceimage
redraws. Updates typically actually happen in draw loop,
which is not a great design...
- make shared vertexcol didn't flush update
mapping (instead of Edit{Vert,Edge,Face} pointers)
- dropped convertToDispListMeshMapped (whew, glad of it too)
- added DerivedMesh drawMappedFaces function
- dropped EM suffix for DerivedMesh functions, it was neither
particularly correct nor descriptive
- converted test_index_mface to test_index_face that also corrects
MCol and TFace. Good thing we had three versions of this routine,
you never know when one might burn down.
- removed flipnorm_mesh, not used anymore (and was incorrect to
boot)
- Getting face select to work with modifiers turned out to be much
more complicated than expected. Reworked mapping architecture for
modifiers - basically elements in a DispListMesh are now required
to be stored in an order that corresponds exactly to original
ordering. MVert/MEdge/MFace all have a new flag ME_XXX_STEPINDEX
that is set on each element that is set on the first derived element
of each original element. I can't say the code to follow these
requirements for subsurf is particularly transparent, but on the
upside it is a reasonably consistent and simple system that is memory
efficient and allows keeping the DispListMesh structure.
- rewrote mirror modifier to be simpler/conform to new requirements
for mapped DispListMesh structure. This also means that mirror interacts
much better with incremental subsurf calculation (it used to recalc
one entire side on any topology change, now it generally avoids that).
- added EM_{init,free}_index_arrays and EM_get_{vert,edge,face}_for_index
functions to handle mapping indices back into appropriate EditMesh
structures.
- bug fix, make edges didn't recalc object data
- bug fix, initial image assignment to TFace's didn't recalc object data
- new feature, added circle select support for FACESELECT
- bug fix, creating new faces in editmode duplicated the TFACE active
flag - but there should only be one active tface
- bug fix, possible crash when deleting all faces in faceselect mode
on mesh with tfaces...
Still todo: TFace edge drawing is still not always correct in face
mode, in particular with a mirror modifier when mesh has edges (and
no preceeding subsurf). Have not yet decided how to deal with this.
Best solution is probably to do switch to meshes all having MEdge's,
in which case I can get rid of TFace edge flags (and need to recalc
modifiers on tface selection change).
- The "Skinnable" option for Bones now is taken into account for the
Envelope drawmode. If not Skinnable, it also doesn't draw the soft
deform area. Maybe bone should be hidden... dunno yet.
- Use CTRL+LMB in weightpaint mode to sample the weight in a mesh.
Note; it returns the weight of the closest visible vertex, not of a
Blended result.
- NKey Panel for Mesh edit now shows a menu with the VertexGroup name(s)
of a selected Vertex, plus the Weight.
Fix:
- while scaling Bone points in editmode (Envelope drawtype), the Bone
root scale was not copied from (or to) the parent tip. This was not
visible (is not drawn) but deform did use it... causing weird errors.
For those who saw this error today: just go into editmode, select all
Bones, press Skey, enter. That fixes it :)
For defining the deformation distances of Bones, three values are being
used now. The bone tip and root radius define the bone-shape itself and the
"dist" defines the soft area around it. A full (user) doc is in CMS here;
http://www.blender3d.org/cms/Armature_Envelopes.647.0.html
Note: todo still is allowing both Vertex Deform Groups and these Envelopes
together (and or per Bone).
Also part of this commit is:
- New: Hiding bones in EditMode. This is a separate 'hide flag', so you can
keep the PoseMode hidden Bones separate from EditMode.
(In the future we should do some kind of bone-grouping or so)
- While transform(), the hotkeys G,R,S only switch mode when the previous
mode was compatible. Caused conflicts with Crease/BoneDist/etc.
- Deleting the last VertexGroup now also deletes the entire Mesh 'dvert'
data. Sounds logical, but remember that VertexGroups are partial on a
Mesh, partial on Object. Weird design decision though...
Anyhoo, at this moment the only way to have Bone Envelopes deform, is
by deleting all VertexGroups!
- In PoseMode, the hotkey ALT+S now does both B-Bone size or Envelope,
depending draw type.
- In EditMode, Extrude now also works when only Root points were selected.
- Weight editing is also symmetrical btw, with the "X-axis Mirror" option
set.
- removed DerivedMesh.drawLooseEdges and replaced with much more
general drawEdgesFlag function that draws based edge flags.
- switch DerivedMesh.drawFacesTex to give user control over which
faces are drawn
- added object_uvs_changed and object_tface_flags_changed functions
to do object recalc flag flush/redraw queueing and added calls
in appropriate places
- added various edge flags to mark TFace information. This is used
by the drawEdgesFlag routine and was the best way I could come
up with to deal with drawing TFace information from modifier stack.
Unfortunate side effects are (1) uses a lot of MEdge flags (although
not needed in file so thats fine) and (2) requires recalculation
of modifier stack on UV selection changes. #2 is disappointing
but I could not find a better solution.
- update UV mesh shadow drawing to use modifier result. At the moment
just uses the final result but probably should be integrated with
the editmode cage option.
- convert draw_tfaces3D to use drawEdgesFlag routine which cleaned
up the code quite a bit.
- convert draw_tface_mesh to draw using result of modifier stack.
Same comment about which result actually gets draw in FACESELECT
mode as for UV editor shadow drawing applies.
There is a still a bug in that selection is using the wrong
mesh to draw.