Commit Graph

3626 Commits

Author SHA1 Message Date
77be09dd2d - possible fix #2 for editmode face's draw black 2005-08-20 18:38:33 +00:00
6c001485fa - bug fix for stooooopid crash in mirror modifier 2005-08-20 18:25:11 +00:00
3da7c4c5c9 - possible fix for editmesh solid drawing black, I can't reproduce
so working a bit blind here
2005-08-20 18:14:04 +00:00
f00b5c78d4 In edgeslide if Draw Edge Length is on, the rail edges will be temporarily selected so that actual new edge length can be seen. 2005-08-20 16:38:05 +00:00
bdd3477c10 - tweak virtual modifier display, now label "parent deform" and
don't display with edit buttons
2005-08-20 11:01:17 +00:00
29429d73f2 A couple of smaller fixes;
- 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!
2005-08-20 09:55:11 +00:00
74be13ba8b - agh! missed it again! for real this time, fix for proper updating
in image window
2005-08-20 09:17:20 +00:00
752dbf1e9a - made make_edge mark edges with LOOSEEDGE appropriately
- 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
2005-08-20 09:16:09 +00:00
1ac10f50f4 - bug fix, apply modifier removed modifier even on certain
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
2005-08-20 07:42:25 +00:00
a30740c196 - convert all DerivedMesh map functions to use index based
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).
2005-08-20 03:08:23 +00:00
d81a5abf32 Moving functions and calls to have a cleaner situation for futre work (implicit solver .. n stuff) 2005-08-19 22:55:05 +00:00
6d60b0acfe More armature stuff;
- 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 :)
2005-08-19 21:37:29 +00:00
91e39a0ec3 CTRL+click now also allows Root-point extrude of Bones. 2005-08-19 16:15:51 +00:00
c8a5887daa Forgot hidden flag update in this file... 2005-08-19 12:39:43 +00:00
9e05d6efb5 Armature "Envelope" editing.
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.
2005-08-19 12:35:15 +00:00
da930194f9 - added code to draw loose edges in textured and fastshade views 2005-08-18 11:49:33 +00:00
8c41c00ff7 - added DerivedMesh.drawUVEdges function & implementations
- 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.
2005-08-18 11:31:20 +00:00
b774712d80 - bug fix, convert modifiers function used a shared displistmesh which
could lead to crash
 - bug fix, exit_editmode was warning too often about free'ng baked
   softbody data.
2005-08-18 11:14:28 +00:00
ec5fa2f4f9 - remove redundant calculation of spring length 2005-08-18 11:04:22 +00:00
829cb52ac6 Got rid of a couple other warnings, of the form:
struct blah was declared in param list this is probably not what you want...

Kent
2005-08-17 17:56:54 +00:00
72d60d7b63 added the "mouse over any", makes the sensor more useful 2005-08-17 14:29:58 +00:00
8b060dd5ad - update to constant.c
- give it the key/items interface
  - creates some factory functions for const generation
- genutils methods
  - method for getting module constants
  - method for throwing errors with a print string
- updates to function names
- clean up interpreter launch a bit
2005-08-17 14:26:00 +00:00
2872263377 - New feature: shift+ctrl+t in Mesh editmode splits quads in exact opposite
way. Requested for low-poly modeling.

- fix: on exit editmode, the code always created a mesh->dvert block...
  silly, this made other code confused which decided whether to use
  dverts (vertex groups) or not.

- removed obsolete call from armature.c. Also fixed name of function there,
  preparation work for nicer support in Blender for "deform envelopes"
2005-08-17 13:26:42 +00:00
55b5abe2c9 - bug fix, free bake didn't work
- bug fix, force free of bake data on exit editmode, can't
   give user a choice
2005-08-16 22:58:31 +00:00
Chris Want
c6abd2d106 For lukep:
In face select mode, select faces by triangle/quad/other.
Available through header menu, toolbox, or hot keys.

Hot keys are:

ctrl-shift-alt-3: Select all triangles
ctrl-shift-alt-4: Select all quads
ctrl-shift-alt-5: Select all non-triangles/quads
(maybe a bit sore for the wrist)

And also available through the menu/toolbox.

I've never used f-gons so I don't know if the 'select other'
function works there (or works at all, for that matter).
2005-08-16 22:11:40 +00:00
235733d220 Turning off tweak mode until there's a better UI. 2005-08-16 21:58:26 +00:00
2862e25147 - bug fix, draw wire extra should use cage with vpaint/wpaint/tpaint 2005-08-16 20:42:52 +00:00
d408dcdaad Added prototypes for some stubs to shut gcc up ;)
(In doing so found a stub that had wrong # of args)

Kent
2005-08-16 20:21:43 +00:00
4fed035618 Weight Paint & Vertex Paint goodies;
- New: "Spray" is an option now. This used to be the only available vertex
  painting method, while holding the mousebutton and move mouse, it keeps
  applying (adding, blending) the color.
  Disabling "Spray" will give more a 'paint' effect, only applying the
  maximum what you indicated to be painting.

- Weight Paint now offers all options Vertex Paint has. This includes "Add",
  "Mult", "Sub", and "Filter". And of course the "Spray", which is default
  off btw.
  Since Weight Paint might need totally different settings, they are stored
  separate from Vertex Paint options.

- Renamed the weird "Area" and "Soft" options into something that tells what
  it actually does (Even tooltips were wrong).
  Area -> "All Faces", option to have all Faces inside the brush being
     painted on. Disabling this only paints on the face under the cursor.
  Soft -> "Vertex Dist", option that uses distances from cursor to vertex
     to calculate the effect. Disable it to only paint per-face.
  If someone knows better names... go ahead! :)

- New WeightPaint option in the Panel: "Clear", which removes reference
  to this deform group from all vertices.

- Removed code that deleted 'deform vertices' from Mesh on exit editmode,
  when vertexgroups were empty. This just worked against you... you could
  not paint on empty groups.

- Made Weight Paint painting much nicer. The way it applied values was very
  harsh without good transitions. Mainly because it didn't use the
  "Vertex Dist" option, but also because it applied colors 3 or 4 times per
  vertex (tria/quad).

- Weight Paint undo now restores on a 2nd Undo.

- Vertex Paint Panel button "Clear" didn't work even.
2005-08-16 19:37:36 +00:00
392e4b89f5 Tweak mode
RMB click drag to select and transform (grab). Release to confirm. (Cancel with esc)

The difference with before is that it is a single motion, you don't have to click at the end of transform, you can just release the mouse button.

(Some float constant warning too)
2005-08-16 18:23:28 +00:00
cf8e820140 Ooops, one slipped on porting 2005-08-16 17:54:59 +00:00
43e329edb7 softbody <--> softbody collision
make softbodies collide with objects patented to armatures (bones), lattices .. )

Softbody deflectors always use the new modifier stack. (thanks ZR)

Softbody deflector code checks for identity of colliding objects so,
there is no need to prohibit softbodies to be a deflector.

So now you can put some soft balls in a box and see them bounce.

see : http://wund.privat.t-online.de/bt/sb_sb_coll.blend

A deflector cube parented to SB lattice:
http://wund.privat.t-online.de/bt/sb_lattice.blend

BM
2005-08-16 17:48:47 +00:00
7c539f8ebc ToSphere changes.
- Scale goes from 0 (original) to 1 (full sphere) instead of the contrary
- Mouse control is done by moving pointer left / right on screen. Full right is 1, left is 0. There's a 10% width padding on each border.
- Works correctly with Shift modifier now.
2005-08-16 17:37:42 +00:00
b45ecb43ef New! When weight-painting a Mesh, and select a Bone, you can use transform
options on the Bone (G, R, S). The manipulator doesn't show btw.
Is usful to get immediate feedback on how painted weights behave with Bones.

Martin; I had to change the T_POSE behaviour in code a bit... it now
stores in TransInfo the actual posed armature being transformed. Maybe,
some day, we'll get mixed posechannel/object transform? Not much required
at the moment though. :)
2005-08-16 10:17:02 +00:00
f1609dde11 Added new button type: ROUNDBOX
This replaces drawing with uiRoundBox() or glRect() in button Panels,
which just fails for dynamic constructed button views where Panels are
sometimes invisible. Also eliminates hack with PanelPop().
Error was visible with new Modifier panel, entering/exiting EditMode.

Done Modifier and Constraints.

Syntax:

The last 4 free variables in the uiDefBut() call are:
- float, corner-rounding (0.0-pixels),
- not used,
- short: roundbox type (bits, 1 2 4 8 for clockwise corners starting left/top)
- short: color shade offset (color range 0-255)
2005-08-15 19:46:09 +00:00
6bc3f4746b A nice character modeling time-saver:
In WeightPaint mode, pose-mode armatures now allow selecting Bones, but
without making the Armature object active.
Selecting a Bone then results in selecting the associated vertexgroup. :)

Little quirk; all armatures with posemode then draw selectable...
2005-08-15 16:12:50 +00:00
3778c08136 Using NKey panel in 3d window on editmode armature now applies the
new 'mirror edit' as well. Including the 'roll'.

PLease note that roll values can differ a lot when you have modeled
without 'mirror' mode. You can enforce the roll to match by first
moving the Bone a little bit, so the other one aligns perfectly.
2005-08-15 14:44:51 +00:00
1dcec68ab4 EditMode armature: mirrored editing feature.
- Option is in EditButtons, Armature panel.
- Currently only local X-axis mirror (seems to be default anyway)
- Transform then applies changes to the mirrored-name bone as well.
- Extrude: also does the counterpart Bone
- New: SHIFT+E extrude: extrudes 2 mirrored Bones out of a normal Bone.
  (creating names by appening _L and _R)

Or in short: you can now model a full rig without any manual naming!
Of course the names are not too nice... a couple of ideas to explore;
- rename a mirrored bone renames counterpart too
- allow in weightpaint mode to select Bones
- and of course mirrored edit in PoseMode (if that's useful...)

Important note: I tweaked the naming convention a bit; names like
Bone_L.005 and Bone_R.005 are considered counterparts. However, if
you use the "Flip names" option, the number extension is still
truncated.

BTW: Commits in Zr's code are fixes for gcc warnings. :)
2005-08-15 14:02:03 +00:00
2abd79b491 - readded DL_VERTS type to store lattice deformed verts
- new feature, twiddled with lattice resizing to try to maintain
   existing vertex changes... much nicer than just resetting the
   lattice if you decide you need more detail in the lattice.
 - modifiers work with lattices now. yes, that does mean you
   can make a chain of lattices effecting each other 8 miles
   long.
 - some cleanup of softbody code, was rather splintered and call
   path was twisted and confusing. reworked main object step
   routine to do things in a more obvious and consistent manner
   and without duplicate code
 - added ob->softflag OB_SB_RESET instead of sbObjectReset
   call
 - modifier changes reset softbody now
 - moved curve_getVertexCos/curve_applyVertexCos into curve.c
 - update curve modifier eval to work with virtual modifiers
 - update modifier apply to work with curves/surfs
 - update make parent to also recalc object data

NOTE: Although you can turn SB on for curve/font objects at the
moment it doesn't really work because they call deform in
multiple steps and this confuses SB. Not sure how to deal with
atm.
2005-08-15 10:30:53 +00:00
91cd2d8138 Crash bug! Reading older files with follow-path constraints failed... 2005-08-15 09:45:48 +00:00
0c7f65d152 - added view3d_get_object_project_mat function, returns mat to project
object cos into screenspace without mucking with gl matrices.
 - added view3d_project_ functions, take arguments instead of using
   globals
 - removed View3D.{mx,my,mxo,myo}
 - switch drawobject foreachScreenVert functions to use new projection
   functions
 - switch edge slide to use new projection functions, fixes erratic
   behavior (project was using wrong mat I believe)
 - bug fix in edgeslide, nearest edge to start was one-off
2005-08-15 04:10:02 +00:00
74623f33aa - get rid of unused object_deform_curve
- some tweaks to modifier UI thanks to Bart (aligning buttons)
2005-08-15 00:53:51 +00:00
bb377c72cd Lamp-halo & Ortho didn't render correct. Thanks Desoto! :) 2005-08-14 20:50:02 +00:00
15da1d13c7 - bug fix #2935, DAG update was not called on new boolean object 2005-08-14 19:44:43 +00:00
6784198d23 Bugfix #2943
Render bug.
Alpha low or zero, Ztransp, didnt render with lamp halos over...
Note it still doesnt work for ray-transp!
2005-08-14 19:26:58 +00:00
e0e6e2fe4a do_versions() for 2.37 was reading a library data pointer that wasn't set
yet. Crashed in windows...
Thanks Desoto for finding it!
2005-08-14 16:03:22 +00:00
8e70766a82 - forgot to remove a function prototype from header on static'ng 2005-08-14 12:54:57 +00:00
6880801aad - enable modifiers for curve/font/surf types... a little hacked in
but should work ok. Means new features! Wave effect for curve/font/surf
   and armature deform as well.
 - added undo_push calls for some modifier ops.
2005-08-14 12:17:34 +00:00
65576fe663 Patch provided by Adam (ajk48n). It reverses the turntable rotation when
you have the view 'upside down', resulting in correct feedback.
2005-08-14 11:15:36 +00:00
f47f8d9418 Patch provided by Campbell Barton; this makes the editmode Mesh CTRL+T
"convert to triangles" check for shortest diagonal to decide how the
triangles will be made.

Fun todo for another occasion; check on facenormals too...
2005-08-14 10:58:17 +00:00