Commit Graph

3956 Commits

Author SHA1 Message Date
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
524d3493f7 - cleaned up edge drawing a tad, there were issues with mesh's
with "loose" edges (edges without a face) and drawing in
   solid mode. they would either not draw, or draw with a nasty
   selection outline. Added a ME_LOOSEEDGE flag to mark such
   edges in displists/mesh and editmode sets it.
 - changed DerivedMesh drawEdges to take an argument whether
   it should draw loose edges or not
2005-08-14 10:35:58 +00:00
e173de2462 Patch provided by Matt Ebb, cut sequence strips (patch tracker).
There were a couple of issues with the implementation:

- there was no proper test if selected strips would be cut or not
- cutting meta strips could go very wrong... for example when the cut
  of meta was in an internal gap. With meta's being recursive, and too
  complex, I've disabled Meta-cutting
- added an OK menu for hotkey K
- added warnings when no cut was done

This is the first time in 6 years I do work in sequencer... man, this has
grown into a messy bizz! Like sequence variables... using names like:
start, startdisp, startstill, startoffs... totally confusing here. Could
use giant cleanup! Implementation was weak from scratch though, Mea Culpa!
2005-08-14 10:31:14 +00:00
0721727887 - added hook "cursor center" feature (sets hook center to cursor position),
gives better control over falloff
 - added modifier UI access to hook "select" and "reassign" features
 - bug fix, unbroke path-tilt drawing
2005-08-14 07:02:51 +00:00
93aeb6b318 - added make_orco_curf, even does keys!
- removed {lattice,curve}_modifier functions
 - changed render code to use displist for curve rendering
   instead of making its own. required adding a bevelSplitFlag
   field to DispList. I also fixed the bevel face splitting
   which did not work correctly in many situations.
 - changed so all curve data creation happens in makeDispListCurveTypes,
   includes making bevel list and filling polys
 - changed render code to use displist for surface rendering
 - removed Curve.orco variable, built as needed now
 - removed stupid BLI_setScanFill* functions... why use a function
   argument when you can use a global and two functions! Why indeed.
   (this fixed crash when reloading a file with filled curves and
   toggling editmode)
 - bug fix, setting curve width!=1 disabled simple bevel for no
   apparent reason
 - cleaned up lots and lots of curve/displist code (fun example:
   "if(dl->type==DL_INDEX3 || dl->type==DL_INDEX3)"). Hmmm!
 - switched almost all lattice calls to go through lattice_deform_verts,
   only exception left is particles
 - added DBG_show_shared_render_faces function in render, just
   helps to visualize which verts are shared while testing (no
   user interface).
 - renamed some curve bevel buttons and rewrote tooltips to be
   more obvious
 - made CU_FAST work without dupfontbase hack

Also by the way I wrote down some notes on how curve code
works, nothing spiffy but it is at:

http://wiki.blender.org/bin/view.pl/Blenderdev/CurveNotes
2005-08-14 06:08:41 +00:00
Alexander Ewering
5f61dc89ba Add CTRL-Backspace to delete all text in textediting. 2005-08-13 20:44:57 +00:00
109950ada4 New; Wkey in Armature Editmode. Has option for flipping names too.
(And moved flip_name to armature kernel)
2005-08-13 19:41:45 +00:00
184e4fdaae Two armature fixes;
- PoseMode selection accidentally always selected first bone as well (on
  multiple clicks)
- Hinge Bone didn't have correct inverse matrix in transform, for local
  rotations.
2005-08-13 18:55:24 +00:00
e1584df90b Removed strcasestr() with version as found on web, opensolaris. It had a
bug though! :)
For people interested: both lines with tolower() had to be added...
2005-08-13 17:53:37 +00:00
Stephen Swaney
9e6ad3dffc bugfix #2931 crash if $HOME not set
unchecked pointer returned from BLI_gethome().
2005-08-13 17:20:46 +00:00
2fe1f9df2a - texcomesh used wrong texture space (should use the texcomesh object
space)
2005-08-13 16:39:22 +00:00
a473e6620d Bone naming fix.
- On duplicating bones in editmode, names with a dot in it (bone.L) lost
  the .L extension. Now it keeps it
- Recoded the 'flip name' routine from scratch, was a horrid construct!
  It works now as follows;

1) First it removes the number extension, if its there (like .001)
2) Then it checks for a separator (space, dot, minus, underscore) on either
the 2nd position (L_calfbone) or last-but-one (calfbone.R). If there's an
l, r, L or R it switches the letter.
3) If no switch done yet, it tries if a name starts or ends with "left" or
"right", case insensitive. It replaces this, disregarding separator.

Examples:

Lefthand    -> Righthand
L Hand.005  -> R Hand
hand.r      -> hand.l
right-l     -> right-r
pelvis LEFT -> pelvis RIGHT
2005-08-13 15:15:44 +00:00
74dc0e191d - more nurbs fixes... as it turns out, rendering of cyclic UV didn't
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
2005-08-13 05:05:18 +00:00
7b1dcf4c42 - readded Subsurf "optimal" edge drawing/rendering
- 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.
2005-08-12 21:55:50 +00:00
0d35e38938 Very small size of arealights (0.001) could cause weird overflows/bands.
There was still one float component hanging around... saacos(). Made a
double version of it.

Reported by Shul. thnx!
2005-08-12 20:27:18 +00:00
65aa88af11 Added the 4 new proportional editing modes also to the uv editor transform.
Eventually the uv editor should use the new transform code and get these
automatically, but until that's done this might fix bug #2920.
2005-08-12 15:33:06 +00:00
5afdfc6ac1 - remove some silly array copying code for nurb displist generation
- converted dl->flag to use consistent defines for cyclic U/V
2005-08-11 22:27:53 +00:00
841ddb4680 A couple of small fixes...
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
2005-08-11 16:39:51 +00:00
2cb9c4db0c Bugfix, the lock button in the uv editor didn't work, the 3d view would
always redraw even if it was disabled (only on non-apple).
2005-08-11 13:08:08 +00:00
65c5eb6e09 - bug fix, add hook didn't respect modifier ordering constraints 2005-08-11 07:52:41 +00:00
0fba0e6b4b - update displistmesh_to_mesh to free existing mesh data (including
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
2005-08-11 07:11:57 +00:00