Commit Graph

34 Commits

Author SHA1 Message Date
84d8b0cafe Added select group meny to mesh editmode.
Currently only works for faces.
Try Shift+G in face/editmode.
2006-03-25 04:37:40 +00:00
b9861d2a80 Array modifier patch by Ben Batt! (#3788)
This modifier allows to make arrays of meshes, with multiple offset types:
- constant offset
- offset relative to object width
- offset with scale and rotation based on another object

The number of duplicates can be computed based on a fixed count, fixed length
or length of a curve. Duplicate vertices can be automatically merged.

Nice docs and example files available in the wiki:
http://mediawiki.blender.org/index.php/BlenderDev/ArrayModifier
2006-03-01 15:30:10 +00:00
41c5328dd4 Two half working commits!
- Python Drivers
  In Ipo Window "transform properties" Panel, added the buttons, and the
  initial handling (now only printing text). Willian makes it work!

- Better Matrix to Eul, code submitted by Brecht. No time yet to do it
  really nice (like a Mat3ToEulCompat(mat, eul, eulc))
2005-10-30 20:56:19 +00:00
Alexander Ewering
784a99b9b0 Beware, coded between 10 phone calls and 20 sudden surprises, but I still
hope it's somehow usable :-)

Colourpicker update:
-------------------

1) Converted numbuts to sliders and made the colourpicker wider. Sliders
   are more useful for something like RGB and HSV because they're fixed
   range values

2) Added a hex button for entering HTML-like color (#RRGGBB, can be
   entered both with and without the hash sign).

   This should completely replace the former strange NKEY functionality
   in buttonswindows, and even add hex support for buttons which didn't
   have it before.

Please test thoroughly, I never coded something in a hurry like this.

There are small rounding errors still... Maybe someone finds the
reason? :)
2005-10-04 21:23:19 +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
9c8c51cbe3 - added VecLerpf to blenlib
- 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)
2005-08-08 18:50:47 +00:00
948f27c0d8 Killed silly modal PoseMode mode! :)
- PoseMode now is a state Armature Objects can be in. So, while in PoseMode
  for an Armature, you can just select another Object or Armature.
- The old PoseMode options (transform, insert keys etc) are accessible
  with making the Armature Object 'active' (and have object in PoseMode).
- At this moment no multiple Poses can be transformed/edited at the same
  time.
- The old hotkey CTRL+TAB, and view3d header menu, still work to set an
  Object's PoseMode

It was quite a lot recode, so tests & reports are welcome.

Oh, as a bonus I added Lasso Select for Bones in PoseMode! It selects using
only the line between root and tip of the Bone.
2005-07-23 18:52:31 +00:00
44ed77b888 Added some missing quaternions fonctions:
QuatMulVecf	Multiplies vector (3-float) by quaternion (rotation). Assumes it recieves a unit quaternion
QuatConj	Quaternion conjugate
QuatInv		Quaternion inverse (does not assume a unit quat)
QuatMulf	Quaternion multiplication with scalar
QuatDot		Quaternion dot product
printquat	debug print function
2005-07-05 00:30:40 +00:00
6a00fcd90c Add "View Selected" (numpad .-key) for faceselect mode and the uv editor.
Also includes some 2d vector operations (subtract, dot, normalise).
2005-04-22 20:16:02 +00:00
b7796f5481 Yuck, forgot to uncommit the ugly version of Mat3ToSize(). Caused scaling
to do very weird things on rotated objects.
2005-04-04 14:21:09 +00:00
eeb3e173a6 - perhaps I should commit a version that compiles 2005-03-31 13:56:50 +00:00
ac35fb34b8 - committed VecLength function for theeth 2005-03-31 13:44:23 +00:00
b8d59ccb69 Transform goodies;
- Added icons for the Widgets to blenderbuttons pic
- Added in header - if widget in use - three buttons to choose widget type
  (hold shift for combo widgets)
- Hotkey CTRL+space now switches widgets on/off

I also noticed negative scaling doesn't work satisfying yet;
- for scale widget, using center didn't work correct anymore (fixed)
- negative scaling didn't even get applied! (fixed)
- but; scaling somethig negative now flips back to positive... ????

Last one i need Martin P for! Note that I had to change Mat3ToSize....
2005-03-27 18:17:48 +00:00
8e92ee8684 - remove all obsolete inclusions of BLI_winstuff.h (due to recent changes)
NOTE: BLI_winstuff.h was meant to be a wrapper around windows.h to handle
undefining various crap that windows.h defines. Platform specific headers
should only have to be included in a few places. This reduces the number
of inclusions of BLI_winstuff.h to 16 which is a much more reasonable
number (than the 144 or whatever it used to be)
2005-03-19 21:08:13 +00:00
c78e44cdc5 big warning hunt commit
lot of casts, added prototypes, missing includes and some true errors
2005-03-09 19:45:59 +00:00
cfd5439bc6 Fixed Constraint projection code in perspective mode. When using a planar constraints, it follows the movement of the mouse exactly instead of just casting on the plane.
In user terms: the motion on screen of the selection follows the motion of the mouse pointer.

Gives some errors when the constraint plane is nearly perpendicular to the view port though.

Added a debug print function for 4D vectors to arithb.c

Optimised the 3D -> view projection functions in view.c (a bit).
2005-02-27 19:14:21 +00:00
996374bb5a Fixed old annoyance; enabling true Ortho render in Blender.
It used to be a simple hack, scaling lens with 100, and moving the camera
to the back with an equivalent amount.
Because of the hack, making it 100% compatible with older files I could not
achieve (yet?). To help reminding users, I've added a print when reading
old files with Ortho cameras.

Full description of how it works can be found here;
http://www.blender3d.com/cms/Render_changes.515.0.html
2005-01-30 11:25:27 +00:00
3806b050d6 Mixup of vectors in VecAngle3 (caused by me switching order of args!)
Resulted in wrong angle display, especially in trias
2005-01-09 14:28:18 +00:00
3c921cc8e8 The "teac" (measurement info) patch from Campbell Barton
Cleaned code somewhat (half the size!) and applied some changes:
- made it compatible with selection flags for new mesh editing (edge/face)
- renamed 'face angles' to 'edge angles' and made it display angles for
  2 selected edges too
- removed the confusing convention that always drawed the info if one
  of the vertices of edge/face/angle was selected. now it only displays on
  minimum of 1 full edge or face selected.
- made it react to "zbuf occluded selection" option (for zbuffered text)
- made it also colorize text for white theme color (TH_TEXT)

On larger meshes this info still draws very confusing. The idea of displaying
the info on 1 vertex selected was probably to show values while grabbing,
although that didnt really work for angles. One idea could be, for transform,
that it draws all lenghts/angles/areas that get changed during transform

All in all, still useful addition tho!
2005-01-08 21:16:24 +00:00
610cec55c7 Biiig commit! Thanks to 2-3 weeks of cvs freeze...
Render:
- New; support for dual CPU render (SDL thread)
  Currently only works with alternating scanlines, but gives excellent
  performance. For both normal render as unified implemented.
  Note the "mutex" locks on z-transp buffer render and imbuf loads.
- This has been made possible by major cleanups in render code, especially
  getting rid of globals (example Tin Tr Tg Tb Ta for textures) or struct
  OSA or using Materials or Texture data to write to.
- Made normal render fully 4x32 floats too, and removed all old optimizes
  with chars or shorts.
- Made normal render and unified render use same code for sky and halo
  render, giving equal (and better) results for halo render. Old render
  now also uses PostProcess options (brightness, mul, gamma)
- Added option ("FBuf") in F10 Output Panel, this keeps a 4x32 bits buffer
  after render. Using PostProcess menu you will note an immediate re-
  display of image too (32 bits RGBA)
- Added "Hue" and "Saturation" sliders to PostProcess options

- Render module is still not having a "nice" API, but amount of dependencies
  went down a lot. Next todo: remove abusive "previewrender" code.
  The last main global in Render (struct Render) now can be re-used for fully
  controlling a render, to allow multiple "instances" of render to open.

- Renderwindow now displays a smal bar on top with the stats, and keeps the
  stats after render too. Including "spare" page support.
  Not only easier visible that way, but also to remove the awkward code that
  was drawing stats in the Info header (extreme slow on some ATIs too)

- Cleaned up blendef.h and BKE_utildefines.h, these two had overlapping
  defines.

- I might have forgotten stuff... and will write a nice doc on the architecture!
2004-12-27 19:28:52 +00:00
c8c149281c Added winstuff.h for M_PI_2 define! 2004-11-11 13:47:06 +00:00
2e4a10253b Fix for bug #1756
This was caused by a very primitive method of interpolating quaternions.
It was converting quats to mat and back to quat, and then just doing
a linear interpolation. That whilst quaternions are renowned for having
good interpolation possible.

I've experimented with 2 quaternion interpolation methods, and can only
get one to work correctly... the "official" version from Watt brothers
I can't get working, both are in arithb.c now.

Will arrange *close* review with experienced NLAers for it! But testing
here gives fully predictable results.

Also changed;
- added pointer check in drawaction
- changed puldown menu for correct hotkeys for move NLA strips up/down
2004-11-11 13:17:32 +00:00
691302f28d Two fixes;
- The function "convex()" in editmesh_lib() actually did not deliver
a proper test for convex at all. It was checking only if a quad could
be subdivided into 2 trias. Code for adding face (FKEY) used this
call in total confusing manner. That code was there in 1.40 already,
cannot find any clue what it was supposed todo... :)
Recoded convex() to deliver a proper test. FKEY will give warning on
attempt to make convex faces now.

- Added undo-free for editmode undo on file load
2004-11-03 11:25:27 +00:00
e077328122 Added LSCM UV Unwrapping:
http://www.loria.fr/~levy/Galleries/LSCM/index.html
http://www.loria.fr/~levy/Papers/2002/s2002_lscm.pdf

Implementation Least Squares Conformal Maps parameterization, based on
chapter 2 of:
Bruno Levy, Sylvain Petitjean, Nicolas Ray, Jerome Maillot. Least Squares
Conformal Maps for Automatic Texture Atlas Generation. In Siggraph 2002,
July 2002.

Seams: Stored as a flag (ME_SEAM) in the new MEdge struct, these seams define
where a mesh will be cut when executing LSCM unwrapping. Seams can be marked
and cleared in Edit Mode. Ctrl+EKEY will pop up a menu allowing to Clear or Mark
the selected edges as seams.

Select Linked in Face Select Mode now only selects linked faces if no seams
separate them. So if seams are defined, this will now select the 'face group'
defined by the seams. Hotkey is still LKEY.

LSCM Unwrap: unwrap UV's by calculating a conformal mapping (preserving local
angles). Based on seams, the selected faces will be 'cut'. If multiple
'face groups' are selected, they will be unwrapped separately and packed in
the image rectangle in the UV Editor. Packing uses a simple and fast
algorithm, only designed to avoid having overlapping faces.

LSCM can be found in the Unwrap menu (UKEY), and the UV Calculation panel.

Pinning: UV's can be pinned in the UV Editor. When LSCM Unwrap is then
executed, these UV's will stay in place, allowing to tweak the solution.
PKEY and ALT+PKEY will respectively pin and unpin selected UV's.

Face Select Mode Drawing Changes:
- Draw Seams option to enable disable drawing of seams
- Draw Faces option to enable drawing of selected faces in transparent purple
- Draw Hidden Edges option to enable drawing of edges of hidden faces
- Draw Edges option to enable drawing of edges of visible faces

The colors for these seams, faces and edges are themeable.
2004-07-13 11:48:52 +00:00
cd47cfd3d1 New: color picker!
With a click on the 'COL' buttons (the ones showing RGB) a menu pops up
with three colorpicking fields and a palette.
The fields are the three planar intersections of a HSV cube, each allowing
choosing in the field without the field changing.

The palette is 'modal' unfortunately (couldn't find a simple working other
method) where the button "paste to color" denotes the state that click in
palette copies to edited color, and "copy to palette" means the active
color is copied into the palette...

Todo:
- saving of palette in file
- decide whether ESC leaves without changes...
2004-07-05 08:48:17 +00:00
4f457fa277 Limit for Normalise() call was 0.000000001 or so. This is still far too
big, since a float can go to 10^-37. And, this value is still squared, so
a square root will not frustrate it.

Limit now is 10^-35, fixing disappearing faces in extreme small object
thats extreme close to a camera. (thanks OOPz!)
2004-05-31 12:08:50 +00:00
64fd636f0c Mirror in object mode. Works like Mirror in edit mode but only works on local axis (doing it differently would require a much more clever algorithm).
Mirror Object is assigned to Ctrl-M and I've add Ctrl-M to call Mirror Edit (on top of M alone) for practical reason. We should consider switching both to Ctrl-M for pratical reasons but I kept M for backward compatibility
Also added the menu and toolbox counterparts.

Minor addition to arithb.c: A function to print vectors to the console. Easier for debuging.
2004-04-24 21:09:06 +00:00
9ed4436058 Updated the Sun ifdef's basically I standardized them so they
were all the same and make sure all platforms see them.

Kent
2004-03-06 19:32:33 +00:00
b3911687ee - only cosmetic stuff; result of going over the output of mipspro cc
compile round. Wrong prototypes, unused variables, zealot const usage,
  and in action.c fixed insane & unreadable function call syntax.
2003-12-24 11:44:57 +00:00
4efdabfbbc Constraint stuff from tuhopuu including (but probably not limited too):
Axis options for TrackTo
LockTrack
FollowPath

Auto creation of TrackTo constraint from Ctrl-T (old track still an option)

Auto creation of FollowPath when parenting to path (Normal parent still an option)

Backward compatibility stuff to convert the per object axis settings to per constraint when a Track constraint is present.

Function to convert old track to constraint (commented out)

Revamped the constraints interface with Matt's work from tuhopuu and the stuff we were discussing earlier.

--------------------
For coders:

unique_constraint_name and *new_constraint_data  moved to the kernel (constraint.c)

new Projf function in arithb gives the projection of a vector on another vector

add_new_constraint now takes a constraint type (int) parameter

add_constraint_to_object(bConstraint *con, Object *ob) to link a constraint to an object

add_constraint_to_client(bConstraint *con) to link constraint to current client (object or bone)

add_influence_key_to_constraint (bConstraint *con) to (eventually) add a keyframe to the influence IPO of a constraint
2003-10-21 13:22:07 +00:00
d8cc44417f - removed the 'const' from arithb function declarations. it caused
the myriad of warnings people complained about so long.

  after careful consulting & reading I could not find a good reason
  for this const stuff, apart from a sort-of comment to indicate
  this array (matrix) pointer cannot be changed. Well, doh! you
  should not do that with a float mat[][3] anyway!
2003-07-02 13:37:03 +00:00
695c968825 - translations for comments in blender lib files 2003-04-26 16:02:26 +00:00
d0e346d544 updated .c files to include:
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif

Just need to finish cpp files now :)

Kent
--
mein@cs.umn.edu
2002-11-25 12:02:15 +00:00
Hans Lambermont
12315f4d0e Initial revision 2002-10-12 11:37:38 +00:00