Commit Graph

5396 Commits

Author SHA1 Message Date
Ken Hughes
44c581644a -- fix indentation to make epydoc happy 2005-11-20 18:41:41 +00:00
Martin Poirier
9ef8c198b2 Transform:
As discussed during meeting, made double key press go for Local when Global was selected.

Two lines of code! ;)
2005-11-20 16:01:56 +00:00
Ton Roosendaal
874c7d7831 Added pointercheck to oops code that evaluates color. Thanks campbell! 2005-11-20 15:54:45 +00:00
Ken Hughes
d040d2012c -- removed GetParticlesLoc() function, which was replaced by
getParticlesLoc() method
2005-11-20 15:12:06 +00:00
Ton Roosendaal
c52170b4ed Patch provided by Alfredo de Greef
This adds Radiance HDR image file support. So now at least we can save
the 'fbuf' (4x32 bits float colors) in Blender.
It doesn't change anything for internal support in imbuf for floa colors,
so when reading .hdr files it still converts it to 32 bits RGBA.

As an extra I've added that saving images with F3 now also adds the
optional extension, when the F10 "Extensions" option is set.

One important note; I don't know the proper license for the code, it was
provided without... will await feedback from Alfredo about it. For now
I've added the standard Blender GPL header.
2005-11-20 14:32:07 +00:00
Ton Roosendaal
36a9ae9415 Fix in my commit of nov 3, found issue while testing regression stuff.
-> Scene set was not drawn in greyish wire anymore

Also made sure all colors as used for scene set and dupli's now use a
proper call to the ThemeColors, so it blends between choosen wire color
and background color.
2005-11-20 13:43:08 +00:00
Jiri Hnidek
691a155047 - Ctrl left/right arrow ... jumps between special characters (not only
between / and \. I hope, that list of special character is complete.
2005-11-20 13:17:28 +00:00
Ton Roosendaal
8927ed4e25 Patch provided by Campbell Barton
Oops drawing speedup:

* Doesent draw splines that are totaly out of the view (big speedup)
* Changes the spline resolution based on its size on the screen (smaller
  speedup)
* Draws highlighted lines ontop of unhighlighted lines, makes it easy to see
  where selected data links to.
* Text changes size with zoom.
* Text draws better at small sizes.
2005-11-20 12:47:13 +00:00
Ton Roosendaal
b310216a47 Patch provided by Stephan Kassemeyer.
This fixes an error in the striding system, which was by default correcting
path position backwards in time, which could give errors when a stride bone
moves in the beginning of a path faster than the path moves. (Can you
follow that? cool!)

The patch checks for this case, it corrects by default forwards in time,
unless we're at the end of a path. As bonus this fix will also ensure the
character stays on the path closer.
2005-11-20 12:41:00 +00:00
Ton Roosendaal
77332fa698 Patch by Matt Ebb: upgraded usablitiy of text button.
Textbuttons now allow a selection too (like any textbutton in other UIs).
By default, on activating a textbutton, the entire button text is selected
when you enter the button. A single arrowkey or LMB click reveils the
cursor then. Here's more user notes:

LMB click: If inside the button, places the text cursor at the clicked
position. If outside the button, confirms/finishes editing

LMB drag: Selects the text between the start and end point of the drag.

Backspace: Deletes selected text, or backspaces a character

Shift Backspace: Deletes all, as before.

Delete: Deletes selected text or forward deletes a character

Shift LeftArrow: Extends the selection left

Shift RightArrow: Extends the selection right

LeftArrow: If there's a selection, move the cursor to the left edge of the
selection, otherwise move the cursor left a character.

RightArrow: If there's a selection, move the cursor to the right edge of
the selection, otherwise move the cursor right a character.

UpArrow/Home: Move the cursor to the beginning of the line

DownArrow/End: Move the cursor to the end of the line

Ctrl Left arrow and Ctrl Right arrow to jump between directory separators
2005-11-20 10:04:45 +00:00
Ken Hughes
a86b0af575 -- added an optional "cage" parameter to mesh.getFromObject() to allow
getting cage vertices from geometry objects
2005-11-20 01:07:54 +00:00
Jens Ole Wund
b6c5b24f4f no code changes (i hope)
review of lyrics/epics to replace '//' comments by /*ones*/
+ adaptive step size in a nutshell  comment
2005-11-19 21:35:06 +00:00
Jens Ole Wund
54c032440f bug: scaled lattice softbodies ( and the new ones ) shrinked/blew up to original size under SB dynamics
had a shadow in memory there was an issue ..
yes, spring calculation should care for scaling in object matrix
so here it is

note: for meshes the bp array is abused for caching -->
only 1 matrix multiplication compared to 2 per spring
2005-11-19 20:02:30 +00:00
Ton Roosendaal
f439f3a517 Code cleanup: using defines in texture.c for whether a function returns
intensity, color and/or normal.
Patch provided by Guillermo, thanks!
2005-11-19 18:24:32 +00:00
Ton Roosendaal
dfb200d405 Made sure lattice and curve springs are calculated based on the original
(Non deformed) lenghts. Code for lattice (by Jens Ole) was already there
btw, was replaced accidentally by Daniel during his modifier craze :)

ALso added comments in code to clarify the softbody initialize flow, which
happens in 2 stages now. Goal weights and springs are read from the
original data, the vertex coordinates from the modifier data.
2005-11-19 18:19:41 +00:00
Matt Ebb
4cb9133143 * Corrected the lamp outer dotted circle drawing - the dotted outer circle
represents whether shadows are on for that lamp or not. Now, it properly
takes into consideration what type of lamp it is, and whether it can have
whatever type of shadow.

Things like this, and the inner spot circle representing the Spot Blur should
really be documented somewhere, I'll make a note.

* Decreased the size of the hemi lamp arcs.
2005-11-19 17:47:45 +00:00
Ton Roosendaal
ce175d7b57 Missing pointer array check caused 64 bits not reading pointers OK in
scriptlinks. Thanks Ken Hughes for finding issue!
2005-11-19 17:26:18 +00:00
Ken Hughes
58edf6b40d -- fix printing of constant dicts
-- remove "TF_" from constant names in M_Mesh_FaceTranspModesDict()
2005-11-19 15:44:43 +00:00
Ton Roosendaal
ca320003f4 Patch #3365, Toolbox from Tuhopuu
Patch prvovided by Guillermo, code was - afaik - from Rob Haarsma.

This changes the toolbox (space menu) to have the first level aligned
vertically. Works much easier that way, and since the items open either
left or right, it doesn't flip order of the contents for it either.

To allow people to test (and to compare) it's a user menu setting (in
View & Controls, "Plain menus"). I've turned this on by default though,
since I propose to not have it a user setting. User setting can be
removed later.

Fixed two bugs in patch:
- if saved in user settings, first time usage of this toolbox opened in
  wrong location
- Button for "plain menus" was writing a short in an int
  (causing this new menu not to work for big endian systems)

As a bonus I've added the long wanted hotkey support for opening and
closing sublevels of pulldowns with arrow keys!

I didn't add the commenting out of correcting pulldown menu order, which
is based on location of the originating button in the UI. This uncommenting
didn't solve anything, since button definitions itself can be flipped too.
(Example: the data brose menus in top bar need to be corrected).

I can imagine the order flipping is sometimes annoying, but it still has
reasons to be there;
- the most important / most used items are always closest to the mouse.
  (like opening properties panel, or "Add new" for material.
- it follows muscle memory and 'locus of attention' (mouse position).
- menus are configured to open to the top for bottom headers, and to the
  bottom for top headers. We can expect the UI is configured consistantly
  for headers, so in general the menus will appear consistant as well.

Where menu flipping fails is especially for alphabetic listings, like in
the menu button of fileselect. However, that one should be configured to
open by default to the bottom, so ordering is consistant as well.

If people like to check this themselves; uncomment the lines in the top
of the function uiBlockFlipOrder() in src/interface.c
2005-11-19 15:16:34 +00:00
Ken Hughes
555a3d02c7 -- fix bug which used unitialized pointer in M_Effect_New. 2005-11-19 15:06:20 +00:00
Alexander Ewering
8b50c50345 Removed static from shade_buttons_change_3d declaration and included
it in BIF_interface.h for general use in other files
2005-11-19 13:43:28 +00:00
Alexander Ewering
5c1951cd7b Add a call to buttons_change_shaded_view() or something in 'assign material
index'
2005-11-19 13:16:36 +00:00
Ton Roosendaal
e9787819a6 Removal of warning messages, unused variables, and casting errors. 2005-11-19 11:06:29 +00:00
Ton Roosendaal
ec2e8d5380 Finally switched to porting UI stuff from tuhopuu!
This commit is based on the patch & cool design work of Matt. It includes
the new Lamp drawing style, and replaces the Object center dots with a
similar styled OpenGL drawn dot.

Important side-note is that removing the old glDrawPixels() for centers or
lamps will not only make Blender faster, but also prevents crashing on a
couple of cheaper 3d cards (as reported for S3 and Intel on-board cards)

Notes:
- The new default only draws Object centers when selected or active. If
  you like to see them always, use the View Properties Panel. You can also
  save that in the .B.blend
- The size for centers (and lamps) is in the User settings "View & Controls"
- Unselected Lamps, and their offset lines from zero Z, are drawn in a new
  Theme color

Changes and additions in Matt's patch:
- Lamps and centers are drawn fixed size, in pixels. Also the 'sun' lamp
  draws screen aligned now.
- Center dots now also draw in blue to denote Library linkage or to show
  that an Object has been linked to other scenes.
- When objects are empty (no vertices) they will always draw a center dot.
  Otherwise these objects would never be selectable anymore!
- Added theme setting for center size, and initialization
- Removed the old redundant code for drawing centers
- Cleanup of drawing routines, made center dots faster
- Started removing calls to glBlendFunc(). Regular alpha drawing should
  become standard, and the (very) occasional exception should return this
  to default after usage.
2005-11-19 10:55:07 +00:00
Ken Hughes
97c13508ff -- added Object.protectFlags attribute; let user get/set transform lock bits 2005-11-18 19:44:44 +00:00
Ken Hughes
2de340199d -- fixed bug with returning NULL from Object_CreatePyObject() on MacOS/X.
The code prior to the last commit worked... but can't see the differene
2005-11-18 16:03:03 +00:00
Ton Roosendaal
621146238c Bugfix: in Sequencer, an active image/movie strip also allowed to add Ipos,
causing Blender to crash. (reported by Levon, thanks!)

Bugfix: InfoWindow, pulldown menu said "Dump 3D window", whilst this can be
any window type... renamed it to "Dump Subwindow" next to "Dump Screen".
2005-11-18 10:31:39 +00:00
Jiri Hnidek
81eb851796 - bug fix of bug #2923
bug was reported by ideasman, thanks! This bug fix also solve problem, when
   MetaBall is parented to some zero size object.
2005-11-17 23:26:45 +00:00
Ton Roosendaal
cab2b3e3d0 Bug #3395
Target-less or Auto-IK didn't insert keys for all bones when using
the Auto-key option.
2005-11-17 22:07:06 +00:00
Ton Roosendaal
5471aa1d48 Two errors in old style (not relative) Shape Keys;
- they didn't even execute!
- you could not grab them in IpoWindow
2005-11-17 21:31:49 +00:00
Ton Roosendaal
1688cd8f95 Fix: When inserting keys for Forcefields, used for particles systems, you
could not move the object anymore (since the ipo got executed).
Solved with copying original Object data in the Deflector Cache.
2005-11-17 21:10:16 +00:00
Ton Roosendaal
8cadf4290b New particle option "Unborn" and "Died" didn't work for shaded halos yet.
Thanks Chris Burt for the poke!
2005-11-17 20:55:32 +00:00
Jiri Hnidek
a2ac524c10 - bug fix #3380, patch provided by Ken Hughes, thanks 2005-11-17 20:35:03 +00:00
Ton Roosendaal
e700e0c4f9 Fix in Colorband: the "B-Spline" interpolation didn't extend well, when a
marker wasn't on the first or last possible position. Caused by clipping.
As bonus; added Cardinal interpolation option too, which is just that
little bit different! (Cardinal goes through the controlpoints, bspline not)
2005-11-17 20:31:18 +00:00
Ton Roosendaal
824ed2e041 A year-zero bug, and actually another issue with auto-handles for Ipo
curves. On sharp 'peaking' curves the handle was calculated
using both X and Y distance. This could result in overshooting.

New code only evaluates the X distance, resulting in much more moderate
sized handles.

Thanks Gabio for the demo file!
2005-11-17 19:34:32 +00:00
Ken Hughes
43ac5834b6 -- add support for new particle effects 2005-11-17 19:19:05 +00:00
Ken Hughes
9deec11e59 -- fix small problem with Ipocurve.recalc(); recomputed handles but did not
re-sort control points (also added reminder in BezTriple doc that script
   users need to call recalc themselves)
2005-11-17 19:10:40 +00:00
Ken Hughes
32c91c897b -- Fix for the "LIB ERROR: base removed" problem; BPy Object was decrementing
us.id when objects were destroyed but not always incrementing when
   created.  The intent of modifying us.id is to make Python a "user" of the
   data so it persists even when it is deleted from Blenders UI.  The original
   commit was unintentional but Ton thought the idea was OK.
2005-11-17 18:35:11 +00:00
Toni Alatalo
f3c9dce8e3 this one bothered Basse here at Orange: NLA snap strip to frame missed snapping the end part, was just a line missing. 2005-11-17 18:26:41 +00:00
Ton Roosendaal
502fc2da31 One visit to studio orange, and voila a todo list!
- bug: posemode, bones were drawing names and axes even when hidden
- bug: using softbody guides actually worked on themselves, causing
  an infinite loop
- feature: when a pose/bone is completely locked for transform, a grab
  will change into rotate by default.
2005-11-17 18:01:07 +00:00
Chris Want
b44ba190d2 Fix for bug #3414 provided by Lewis Saunders.
It appears that removing the 'int level' field from the
MemHead struct caused alignment issues for gcc builds of blender
on Irix (zr, who removed this field, commented that this problem
might occur, and sure enough it did happen). I've renamed the
field from 'level' to 'pad' to reflect that it has no meaning
beyond addressing alignment issues.
2005-11-17 14:48:11 +00:00
Ton Roosendaal
f0593ea8e8 Bug in SoftBody for Curve/Surface: in some cases the edge spring array was
not initialized, like when adding a SoftBody to Object in EditMode.
2005-11-17 12:24:29 +00:00
Ton Roosendaal
ec477f7a63 Another Orange sneak-in feature: SoftBody support for Curves & Surfaces.
Well, it already worked a bit, but without weight options or edge
stiffness. You now can set the weights using the "Properties" Panel in
the 3D Window (allows multiple selections too) or with Wkey in Edit Mode.
Bezier curves have this too.

NOTE: Lattice SoftBody Goal created yesterday won't work anymore!
I've had to recode weight support for Nurbs Points, using a new weight
variable... this because the existing W variable was in use for Nurbs
already. Also Lattices have this new Weight variable, so the code is nice
uniform. Sorry for the artists who already created complex Lattices... :)

NOTE2: Surface Objects don't support edge stiffness yet

NOTE3: I've removed ancient screen coordinates from the Bezier struct,
which makes - even with added weight and padding - the struct smaller!

Demo file:
http://download.blender.org/demo/test/2.40/softbody_curve_lattice.blend
2005-11-17 11:40:57 +00:00
Ken Hughes
96221a5331 -- fix documentation error (replace removeCurve() with delCurve()) 2005-11-17 02:25:32 +00:00
Brecht Van Lommel
6719d32f99 Bug reported by Bassam:
Influence for "Rot" option in IK constraint didn't work correct
in some cases.
2005-11-17 01:46:43 +00:00
Jens Ole Wund
40237b6e57 some more msvc6 magic 2005-11-16 23:39:49 +00:00
Jens Ole Wund
d776d387d9 adding some msvc6 magic to bullet part 2 2005-11-16 23:38:18 +00:00
Jens Ole Wund
66a0ebcbe0 adding some msvc6 magic to bullet part 1 2005-11-16 23:37:02 +00:00
Ton Roosendaal
befd6f3150 Special Orange request; support for SoftBody Goal weights for Lattices.
Animating detailed clothes with softbody becomes messy, so now we'll
try it this way. :)

It simply uses the W (weight) value, as already available in each Lattice
Point. Only had to make it editable;

- NKey panel
- or press W in editmode

Further there's a minimalistic W button in the softbody Panel!
2005-11-16 21:58:49 +00:00
Ton Roosendaal
7a60679c75 Added stepsize option for Pose ghosting draw. Patch provided by Roland
Hess.

In a comment on maillist I already mentioned a weird 0.5 in the code,
which I added to ensure correct rounding to integer frame numbers.
With a variable step size however, this won't work properly. You could
see it in the patch, because the ghost steps were animating.... they
should remain frozen, looks much nicer then. So I've added some fmod
voodoo here.
2005-11-16 21:03:16 +00:00