Commit Graph

4695 Commits

Author SHA1 Message Date
Ton Roosendaal
d3bb02013f Bugfix #3426
Object duplicators didn't draw when not selected. Was one 'else' to many in
the code!

Also noticed that duplicators couldn't be transformed when they have Ipos,
was an improper call to do_ipo in duplicator code... also made sure the
transformation info in the object is stored/restored before duplicating.
2005-11-21 11:30:53 +00:00
Ton Roosendaal
d34ab0755e Bugfix #3430
Using Proportional edit on a Lattice with option "Outside" crashed.
Was caused by not checking for the hide flag while counting amount
of transformed elements in Lattice.
2005-11-21 11:15:46 +00:00
Ton Roosendaal
ddba16a752 Bugfix #3422
When using 'protection flags' for XYZ rotations, inserting keys in
Poses resulted in wrong interpolations (doing -270 degrees instead of
+90 for example). This caused by converting quaternion to euler and
back...
Solved it by correcting the quaternion in the end for the rotation
sign of the original quaternion.

NOTE: Pose animators should be aware that inserting rotations keys of
180 degrees or larger will still make the key rotate along the shortest
path.
2005-11-21 10:45:58 +00:00
Ton Roosendaal
93338b894a New textbutton didn't accept buttons with Object names (or Mesh, etc), the
socalled ID-pointer buttons.
It appeared that the but->pos, for cursor, was calculated wrong. :)
2005-11-20 23:06:52 +00:00
Ton Roosendaal
5c7ec20421 Bugfix #3423
Extrude faces assigned arbitrary colors to the new faces when an edge
shared 2 faces with different colors. Now only assigns colors for the
selected faces.
2005-11-20 22:12:18 +00:00
Ton Roosendaal
449ac1b296 TAB cycling in number/text buttons. Was in tuhopuu too, but code needed
a good revision :)

This now cycles through all number/text buttons in a Panel. At the moment
it skips buttons with tab completion (object names, bones, constraints)
Press SHIFT+TAB to cycle backwards (any modifier will do btw).
2005-11-20 21:29:09 +00:00
Ken Hughes
e7d69ae297 -- change lastused in struct Image from long to int (caused problems with
SDNA on 64-bit platforms)
2005-11-20 20:19:48 +00:00
Matt Ebb
ef0f60b8f8 * Updated the lamp buttons to force redraw when changing the Spot Blur slider 2005-11-20 20:19:27 +00:00
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
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
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
Ken Hughes
6b407d488e -- fix bug in constant_repr() which printed the final key twice 2005-11-16 19:00:47 +00:00
Ton Roosendaal
b0995a2a84 Mirror modifier with "do clipping" set crashed in transform when no
td->loc was set (like for crease).
2005-11-16 18:40:12 +00:00
Ton Roosendaal
49b3e0928f Fix for #3409
Vertex-parenting a forcefield to a softbody caused eternal loop :)
It is partially because of the timing system (=weak) but actually also
because derivedmesh calls could also not build meshes all the time!
2005-11-16 18:26:56 +00:00
Ton Roosendaal
b50889532f Error in local constraint option; the rotation correction for it was
accumulating, so constraint worked on top of previous position, giving
jumping around in cases.
2005-11-16 17:10:28 +00:00
Matt Ebb
96a623e893 Added a slider to control camera passepartout darkness in camera edit buttons. 2005-11-16 16:03:01 +00:00
Ton Roosendaal
8c2c8bbfaa New Constraint option for Pose: "Local" Copy Location/Rotation.
The locality is restricted to action or user-transform only. Or as it goes
in the code now: by setting a constraint local, it executes the constraint
before it calculates the influence of Action or user transforms.

ALso note that this works in Evil Eulerians. Meaning that when you only
want to copy the X,Y or Z compenent of a euler, it can give unpredictable
results when the other euler values are set, this because euler axis
rotations work on top of each other.
2005-11-16 14:32:57 +00:00
Ton Roosendaal
b474f95c84 Revision of NLA stride option.
Previously, using the "Stride Bone" tried to get that Bone motionless on
the path by correcting the internal time of the Action. This however caused
too many problems, especially with irregular walks.

The new system also tries to keep the Stride Bone motionless, but this by
moving the entire armature, and not changing the timing of the Action.
Give much nicer results. :)

To make editing Strides easier, I've added a new option in the NLA
panel to disable the path. This way you can quickly switch to editing the
action itself (keying the stride bone) and viewing the result.
2005-11-15 22:39:20 +00:00
Joseph Gilbert
a8df218335 - point constructor
* added a constructor for the point class to mathutils
2005-11-15 21:45:05 +00:00
Joseph Gilbert
0f58b99d65 * update to python docs
- the softbodies documentation was put in object.properties instead of object.object. Hello!
2005-11-15 21:33:29 +00:00
Joseph Gilbert
4ea1c4dc60 * update to python docs
- update for the old mathutils rewrite
- update for some other methods ive added
- added explaination of wrapped data
- added a .css file for epydoc gives nice blender/python colors :?
2005-11-15 21:14:24 +00:00
Ken Hughes
a85ba68eb4 -- Added OB_RECALC_OB to Object_set* methods. 2005-11-15 16:34:25 +00:00
Ton Roosendaal
c3fc17f45c Grabbing a targetless IK bone, and ESC, accidentally didnt clear a flag,
causing targetless IK being executed on all bone moving (looked like as if
a bone couldn't be rotated/moved).
2005-11-15 15:54:57 +00:00
Ton Roosendaal
621d4a700d Small fixes;
- Bone Ghost drawing now skips axes and names
- "Snap to cursor" now works for parent-less bones in PoseMode
- Prevented assigning in buttons of negative zero (was confusing)
2005-11-14 22:21:56 +00:00
Ton Roosendaal
0916029683 Keeping CVS working isn't easy! :)
Optimize for hair caused transp triangles to be not rendered OK anymore.
2005-11-14 20:07:12 +00:00
Ton Roosendaal
46f2d85374 Two orange reports;
- Copy Location Constraint didn't update Object when it was copying from a
  Bone
- Deleting bone in editmode, and connecting bones crashed due to evaluation
  of deformation code (only allowed for pose).
2005-11-14 19:57:51 +00:00
Ton Roosendaal
c21eb9322f Another optimize step for huge quantities of hair renders; now per transp
part (64 scanline pixels) it first calculates clipping for faces.
Testfiles - 1 M faces with simple render - show 2 times speedup :)
2005-11-14 19:00:13 +00:00
Ton Roosendaal
cf1aa49211 Ztransp render has a built-in maximum for amount of faces it can render
on top of each other. Was 100, which gave noise like this in this image;
http://www.blender.org/bf/hairnew.jpg

Made it 200, which solves it for a million hair polygons;
http://www.blender.org/bf/hairnew1.jpg

Also note that hair renders go much faster and better if you insert a real
solid head in it, that will prevent hairs on the back to be inserted in the
buffers. ANd don't make the head Ztransp!
2005-11-14 18:14:03 +00:00
Ton Roosendaal
0751e7fb66 New zbuffer; added check for zero sized edges in filling in with new
span buffer. caused black stripes in render...
2005-11-14 16:27:48 +00:00
Ton Roosendaal
8355aa0cf0 Strand render/zbuffering optimize recode
I've been going over the zbuf.c code, which is indeed very ancient,
with a load of old optimizing and redundant code in use.

Added more 'modern' Span support, which fills per face two arrays
with the scanline information in it. That way you can zbuffer a quad in one
run as well. It was also exactly that code that's copied all over in zbuf.c

For now, to prevent issues for the release, the 'render a quad in 1 run' is
only in use for the strand render. Tests reveil a speedup of about 33%.

Will work on this recode later... which would also result in making zbuf.c
threadsafe.

And: bugfix #3398
When using the new 'render emitter' for particles, the orco array for
particles was accidentally used by mesh too.
2005-11-14 14:27:44 +00:00
Ton Roosendaal
9bf198bbca Finished hair strand render project (well, for release), also with a good
doc;

http://www.blender3d.org/cms/Hair_Strand_Rendering.722.0.html

- added width control for strands
- made tangent (anisotropic) render an option
  (so you can render strands more solid, like metal/wood)

Also:
- ALT+A anim playback with static particles made cursor flashing
2005-11-12 16:22:10 +00:00
Mika Saari
0c4172ffb5 Undo for editfont fixed. Paste functionality crashed the blender
in case the paste buffer+length of text was bigger than MAXTEXT ->
fixed this, also a error is shown to the user now. editfont.c needs
still some cleaning but will discuss about this with kaito and intrr.
2005-11-12 15:40:37 +00:00
Johnny Matthews
3770db2517 Removing an extra semi-colon that caused some grief 2005-11-12 14:39:14 +00:00
Ton Roosendaal
6f045c44d3 Bugfix: when editing a Curve Guide, and deleting all but one control point,
the path code crashed.
2005-11-12 11:58:37 +00:00
Ton Roosendaal
c7c7ccccae Hairdresser request;
"Additive" Guides. See also:
http://www.blender3d.org/cms/New_Particle_options_a.721.0.html

This Guide type uses the falloff distance to also define how much the
particle (or hair strand) goes over the path, allowing to create local
extremes, or only local particle generating or hairgrowth. Nice for
spiky haircuts!
2005-11-12 11:54:58 +00:00
Ton Roosendaal
18b8f66a68 Particles now are generated from subsurfed coordinates.
Note that the current default generates particles based on the original
amount of vertices and faces, this for vertex group support (which is not
subdivided with modifiers). That means that particles generated on
subsurfed faces still have minor approximation errors.

Note for DerivedMesh users; I've added a new API call:
	float *mesh_get_mapped_verts_nors(Object *ob);
Which returns an array of 2 * 3 * float size, containing the vertices and
normals, deformed and subsurfered, but only the original me->mvert amount.
Works in all non-editmode cases.

Is in use now for vertex/weight paint and particles.
2005-11-12 10:35:14 +00:00
Ton Roosendaal
0219819c40 Inserted a line just above a variable declaration, causing MSVC to
complain :)
2005-11-11 20:54:08 +00:00
Ton Roosendaal
b37540ef61 Three particle fixes;
- "Disp" option allows to go back to zero, effectively disabling the entire
  particle generating.
- When parenting guides to an emitter the depgraph sees a cyclic relation,
  which caused not updating the particles correct on loading it.
- Moved creating guide Cache completely outside of the particle loop,
  should make it faster to use with large amounts of particles and objects.
2005-11-11 19:41:58 +00:00
Ton Roosendaal
fe9bd18a84 Bugfix #3372
When using the pulldown menus for exiting weightpaint, it did not free
octree tables for weightpaint, giving an error message on re-entering
weightpaint.
2005-11-11 18:58:45 +00:00
Matt Ebb
66867140dd * Fixed an old, old, old problem where the top camera arrows
couldn't be seen in a side on view because they had no wireframe.
2005-11-11 17:26:08 +00:00
Ken Hughes
c6d22dd44e -- various fixes for Mesh.c:
* add some protection against accessing MVerts/MEdges/MFaces which have
   been deleted
   * correct cut-and-paste bug in faces.delete() method
   * correct some compiler warnings
2005-11-11 16:17:29 +00:00
Alexander Ewering
3d6564740a Fix "Copy Attributes -> Font Settings" to copy the new vars (wordspace,
underline stuff) as well.

Attempt at fixing editmode undo, but not successful. I'll create a bug-
report and assign it to Mika, because I only understand "train station"
(German saying :-) when looking at the code.
2005-11-11 15:19:15 +00:00
Ton Roosendaal
d7ed26e3c6 Deleting Effectors (deflectors or Fields) now update particle systems and
softbody. (report #3385)
2005-11-11 10:46:26 +00:00
Ton Roosendaal
6d42aebc78 Fix #3382
Alt+D on a Camera or Lattice did not create a linked copy. This was an
ancient convention from the dark ages (1995) still. :)
2005-11-11 10:23:59 +00:00
Ton Roosendaal
bdec277cc6 This is the famous proverbal example of someone trying to get a 4 legged
table stable... you keep correcting leg sizes until no table is left
anymore! :)

This commit restores the displacement direction from 2.37a code, which was
negated 5 months ago to fix a change in renderconverter.c, but somehow is
not needed anymore. The regression displacement file now renders OK again.
2005-11-11 10:14:27 +00:00
Ton Roosendaal
8c98fbb0a9 Bugfix #3379
Fixes in WeightPainting accidentally passed on weightpaint values for the
(color) Vertex Paint option. (Opacity for example used weightpaint setting)
2005-11-11 10:04:56 +00:00
Ton Roosendaal
eda55cea43 Bugfix #3370
Border select on a Meta strip in Sequencer didn't work. Seems to be a year
zero bug :)
2005-11-11 09:50:22 +00:00
Erwin Coumans
fbee75fef3 fixed raysensor, hooked up a few more bullet method: force, torque etc, + 'local'. cosmetic change in physics-engine menu. 2005-11-11 05:02:14 +00:00
Ton Roosendaal
07b826409a More hairdressing goodies; in the 'velocity' section of the Particle
buttons you now can add a vertexgroup to define speed (or strand length).

http://www.blender.org/bf/rt3.jpg
2005-11-10 21:23:08 +00:00
Matt Ebb
095eb2400a * Fixed a little problem when using both F* keys and header buttons
to change buttons tabs wouldn't switch quite right.
2005-11-10 20:07:17 +00:00
Ton Roosendaal
0dc288371f Bug in previous commit today; sound buttons crashed...
And: renamed "Num" to "Amount" for particle buttons.
2005-11-10 19:51:20 +00:00
Ton Roosendaal
d89a7d530b Fix: editing curves, which are used to guide particles, update particles
now.
2005-11-10 19:27:31 +00:00
Ton Roosendaal
bfddf7f4af - Static particles now draw shaded too!
http://www.blender.org/bf/rt3.jpg
  It uses Material color and specular, like for the solid faces.
- Depgraph Fix for changing object layers, should re-evaluate dependencies
- Fix for setting curves to 3D by default (on adding a Guide field)
2005-11-10 19:00:10 +00:00
Toni Alatalo
4c76b74b00 added changing the extending / extrapolation type of the IPO curves of selected actions in the action editor (to the menu - code to handle hotkey (to rise a popup) is there too but unused & untested now). 2005-11-10 18:12:53 +00:00
Ton Roosendaal
44ed7f25b7 Static particles; rotating the emittor caused an error, this due to a
missing speed vector rotation. :)
2005-11-10 16:55:24 +00:00
Ton Roosendaal
f8845d5d11 The long awaited Particle patch from Janne Karhu
http://www.blender3d.org/cms/New_Particle_options_a.721.0.html

There's no doubt this patch had a lot of good ideas for features, and I
want to compliment Janne again for getting it all to work even!
A more careful review of the features and code did show however quite some
flaws and bugs... partially because the current particle code was very much
polluted already, but also because of the implementation lacked quality.
However, the patch was too good to reject, so I've fixed and recoded the
parts that needed it most. :)

Here's a list of of most evident changes in the patch;

- Guides support recoded. It was implemented as a true 'force field',
  checking all Curve path points for each particle to find the closest. Was
  just far too slow, and didn't support looping or bends well.
  The new implementation is fast (real time) and treats the paths as actual
  trajectory for the particle.
- Guides didn't integrate in the physics/speed system either, was added as
  exception. Now it's integrated and can be combined with other velocities
  or forces
- Use of Fields was slow code in general, made it use a Cache instead.
- The "even" distribution didn't work for Jittered sample patterns.
- The "even" or "vertexgroup" code in the main loops were badly constructed,
  giving too much cpu for a simple task. Instead of going over all faces
  many times, it now only does it once.
  Same part of the code used a lot of temporal unneeded mallocs.
- Use of DerivedMesh or Mesh was confused, didn't work for Subsurfs in all
  cases
- Support for vertex groups was slow, evaluating vertexgroups too often
- When a vertexgroup failed to read, it was wrongly handled (set to zero).
  VertexGroup support now is with a name.
- Split up the too huge build_particle() call in some parts (moving new code)
- The "texture re-timing" option failed for moving Objects. The old code used
  the convention that particles were added with increasing time steps.
  Solved by creating a object Matrix Cache.
  Also: the texture coordinates had to be corrected to become "OrCo".
- The "Disp" option only was used to draw less particles. Changed it to
  actually calculate fewer particles for 3D viewing, but render all still.
  So now it can be used to keep editing realtime.

Removed;

The "speed threshold" and "Tight" features were not copied over. This
resembled too much to feature overkill. Needs re-evaluation.
Also the "Deform" option was not added, I prefer to first check if the
current particle system really works for the Modifier system.

And:

- Added integration for particle force fields in the dependency graph
- Added TAB completion for vertexgroup names!
- Made the 'wait cursor' only appear when particles take more than 0.5 sec
- The particle jitter table order now is randomized too, giving much
  nicer emitting of particles in large faces.
- Vortex field didn't correctly use speed/forces, so it didn't work for
  collisions.
- Triangle distribution was wrong
- Removed ancient bug that applied in a *very* weird way speed and forces.
  (location changes got the half force, speed the full...???)

So much... might have forgotten some notes! :)
2005-11-10 16:01:56 +00:00
Nils Thuerey
67d2dae4a9 - minor fix of snprintf defines for MSVC
- fix for 2d domains was part of the previous checking as well, btw. :)
2005-11-09 11:10:15 +00:00
Nils Thuerey
e3f681da67 - popup menu now aborts by default
- changed directory/prefix input (only 1 string instead of two, more similar to render output settings now)
- changed reading/writing of surface files
- slightly enhanced surface smoothness
2005-11-09 07:56:26 +00:00
Ken Hughes
564b629013 -- When storing a mesh, allow TFaces without defined UV coordinates to use
some default values instead of throwing an exception.  Also use only the
   first four UV coordinates supplied in the list.
2005-11-09 00:38:56 +00:00
Stephen Swaney
960a872431 Bugfix: #3377 Epy docs missing links
Link to sys was broken.  need to be  L{sys<Sys>} for name to match.
2005-11-08 22:11:19 +00:00
Ken Hughes
1ba15893bd -- changes and bugfixes from Cam:
-- calling mesh.getFromObject(obj) with mesh object now also
     copies material properties
  -- mesh.quadToTriangle() takes a parameter to duplicate both
     Ctrl-TKEY and Shift-Ctrl-TKEY actions
  -- assigning None to mesh.verts "clears" the memory allocated
     to the mesh (equivalent of Mesh.New(), but on an existing
     mesh)
  -- exception handler message for mesh.faces[i].uv = [..] more
     clear (uv attribute only accepts tuple, not list)
  -- fixed bug for meshs with deformed verts when deleting verts
     (deformed verts deleted and repacked correctly now, I think)
2005-11-08 21:50:30 +00:00
Ken Hughes
c217188a62 -- Previous commit using PyDict_Keys left new reference around. Change to use
PyDict_GetItem() instead, and clean up string manipulation.
2005-11-08 18:46:55 +00:00
Toni Alatalo
19b75ae86d uh next time i read properly before commit, and not only from the nice webcvs diff.. 2005-11-08 17:57:04 +00:00
Toni Alatalo
15beb7db42 a little tweak to make curve handles always copy the type from the previous handle 2005-11-08 17:47:57 +00:00
Willian Padovani Germano
33648819f7 BPython docs:
bug #3367 reported by Chris Want (thanks): ob.mat documentation was
wrong (was not updated); that attribute returns the world space matrix,
not the local one.
2005-11-08 17:23:20 +00:00
Joseph Gilbert
cd7ca03034 *work around for PyDict_Contains 2005-11-08 16:27:58 +00:00
Johnny Matthews
bcd723c0af Make preview line not draw over hidden areas for loopcut 2005-11-08 15:04:14 +00:00
Johnny Matthews
ea1d6d54d0 #3375
CutEdgeLoop now ignores hidden edges
2005-11-08 14:52:35 +00:00
Alexander Ewering
ece7963545 Just have been told fmodf is C99, so I replaced it with fmod and casts... 2005-11-08 12:56:32 +00:00
Alexander Ewering
bd6d3d1439 Replaced my noble-prize worthy "float modulo" implementation with fmodf(). 2005-11-08 12:53:36 +00:00
Alexander Ewering
5b81dcdfc1 Changed my mind and made the "Strobe" value a float - this way you can get
a strobe effect synced exactly to a beat, for example, by using non-integer
values.

Is it just me, or are there recently a lot of crashes in sequencer when
using audio strips?
2005-11-08 00:46:39 +00:00
Alexander Ewering
543f54aa1d New 'feature' for image/movie strips: Strobe
In the NKEY flying panel, you can set "Strobe" to something other than 1
for only displaying each nth picture of the strip. You know the effect
from movies :)

(I put this into the NKEY panel rather than as a effect because effects
only affect single frames (?) while this rather has to do with the
timing... like "Reverse")
2005-11-07 23:13:00 +00:00
Joseph Gilbert
f09a3611be *armature api for python
- don't get too excited
- allows you to get armatures from a scene
- makeEditable()/saveChanges() puts the armature into out of editmode (pythonically)
- Armature.bones is a dictionary that contains all the bones in the armature and can be iterated
- getters are available for:
name,
roll (dictionary) keys are BONESPACE, ARMATURESPACE
head (dictionary) keys are BONESPACE, ARMATURESPACE
tail (dictionary) keys are BONESPACE, ARMATURESPACE
matrix (dictionary) keys are BONESPACE, ARMATURESPACE
weight
deform_dist
subdivisions
options (list of constants)
parent
children

Setter work only in editmode. Some are not fully implemented.
Type class is embedded in the module. This means the construct is called as follows:
Blender.Armature.ArmatureType()

import Blender.Armature as Armature
arm = Armature.Get('myarm')
for name, bone in arm.bones.items():
...print name, bone, bone.matrix['ARMATURESPACE']

more documentation is forth coming. This is an alpha for this api.
2005-11-07 20:03:32 +00:00
Joseph Gilbert
a39559ea11 *change to the way constants are printed 2005-11-07 19:36:50 +00:00
Joseph Gilbert
cce655b5e7 - warning fixes
* various warnings the python api is putting out
2005-11-07 19:34:44 +00:00
Alexander Ewering
f7c955b18e First part of sequencer attack:
Sequencer image preview finally supports zooming out. Yay!
2005-11-07 13:22:23 +00:00
Ken Hughes
979c28bf06 -- Clean-up of Effect and Particle modules; since particle was the only
remaining effect type, it didn't make much sense to leave things
   implemented in two separate files.  Changes include:
   * two bug fixes (the getChild() and getMat() methods were using floats
   instead of shorts)
   * performing clamping on input values
   * implementing attributes using tp_getset
   * merging Effect and Particle functions: the Particle module exists in
   name only, with the Particle.New() and Particle.Get() functions
   remaining for backward compatibility (they are in fact identical to
   Effect.New() and Effect.Get() functions)
   * update of doc/Effect.py (including remove all old references to wave
   and build effects)
2005-11-07 00:22:05 +00:00
Ken Hughes
0089c0bc53 -- Added Object.effects, a read-only attribute which returns a list of the
particle effects belonging to an object (based on patch from jms)
2005-11-06 22:29:49 +00:00
Ton Roosendaal
25dc3355f4 Bugfix #3358
Deleting a shape key object could crash, when ipowindow open and showing an
active key.

Also: patch from tracker to increase limits of buttons for background image
offset.
2005-11-06 19:02:14 +00:00
Erwin Coumans
dfce9d7d9b minor cleanup. Todo: Does 'testhandles' need to be called after every single ipo_insert_vert ? 2005-11-06 16:50:22 +00:00
Andrea Weikert
d1be55f41c Small fix to allow relative filenames for textfiles. 2005-11-06 16:32:54 +00:00
Ton Roosendaal
58ef9fb366 Modifier fix; new Armature modifier added sets the deform flags on.
(Note; until 2.40 release, these flags are also still in the Armature
Panel, that will disappear then)
2005-11-05 21:51:12 +00:00
Ton Roosendaal
8b8daec576 Another typo in ALT+C convert modifiers; it was copying data from the
wrong object, which worked until a few days ago when I fixed a bug
in add_object(). :)
2005-11-05 21:40:35 +00:00
Ton Roosendaal
ebfd6de1dc Bugfix #3249
Error in BLI_array_randomize(), an unused call in Blender until the
Build Modifier was added. It did a weird modulus I don't really grasp...
somehow that caused the bug (create a corrupt mesh). But why? Dunno...
2005-11-05 21:17:55 +00:00
Ton Roosendaal
ffdde59cf1 Bugfix #3342
Target-less IK, with a hinge bone that has an offset to its parent, didn't
get applied correctly after transform.
2005-11-05 20:02:04 +00:00
Matt Ebb
9bba0e889e * 3D View menus updates. mainly just adding missing functionality
that only had hotkey access before and tweaking organisation of new stuff.
2005-11-05 18:40:07 +00:00
Ton Roosendaal
bb1471878d Bugfix #3237
Selecting Edges in "Cut Away View" (ALT+B) did not work yet for wire view.
Solved it by calculating the closest coordinate for mouse to edge, and
check for that position if it's visible or not.
2005-11-05 18:23:26 +00:00
Matt Ebb
28c487a77c I think I committed something I shouldn't have. Hopefully
this will fix compilation.
2005-11-05 17:19:20 +00:00
Ton Roosendaal
1d85275036 Fix #3256
DXF: when an error message occurs during read, the main call returned
without clearing the used global vars... causing crash on calling again.

ALso: added warning when trying to assign a taper or bevel using Object
itself. (report from opengl tracker :)
2005-11-05 17:14:55 +00:00
Matt Ebb
f12697395b * Buttons window tab cycling
Repeated presses of the F* key to go to a buttons context will
now cycle through the sub-tabs within. For example, when at
a different buttons window context, pressing F7 twice will cycle
through to the Physics buttons tab, pressing F10 three times
will cycle through to the Sound buttons tab, etc.
2005-11-05 16:35:32 +00:00
Ton Roosendaal
11e60da19e Fix #3343
Right after leaving Armature editmode, and entering posemode, the active
bone was not selected (when only the head or tip was selected). This caused
a confusing display of an active but not selected Bone... and not proper
behaviour of UI (buttons) and inserting keys.

Fix #3348

Mirror Modifier, button "Merge Limit" didn't react on left/right click.
2005-11-05 16:32:13 +00:00
Ton Roosendaal
f4d0767b36 fix #3357
- Armature editmode, x-axis mirror edit, didn't mirror alt+s scaling of
  B-Bones

ALso: found out that alpha drawing for Envelope Bones in editmode wasn't
set properly.
2005-11-05 15:52:32 +00:00
Ton Roosendaal
74791c9ed5 Bugfix #3355
calling "Apply deform" from toolbox, with no active object, crashed.
2005-11-05 15:45:26 +00:00
Andrea Weikert
629d954ef3 Fix for #3316: do not convert slashes in the relname in BLI_make_file_string
Also fixed signature to const char* to indicate which parameters can be changed
to make it a bit safer, because constant strings are passed into this function
and changing them caused a crash.
2005-11-05 13:09:43 +00:00
Jiri Hnidek
1d1fd7cd70 - small optimalisation of Matt's code, Markers are copied in one loop,
Matt, admire function BLI_addhead() ;-)
2005-11-04 21:45:44 +00:00
Ken Hughes
a602dcfe5f - JMS's patch which adds GetParticlesLoc() method. I've modified the code
so that it resides in the Effects module instead, with the intent of
  soon merging Effect.c and Particle.c into a single file (and somedat
  removing references to the Effects.Particle submodule)
2005-11-04 20:34:38 +00:00
Ton Roosendaal
4b598feab2 Combined bugreport, bugfix and patch from Vidar Madsen.
He noted that static particles don't work with force fields yet, and
added a fix for it. This however didn't work for the depgraph yet, and
didn't correct the static particle's local space to world coordinates for
the fields. Nevertheless, while reviewing this small patch I thought it
would be fun to add now.

So: static particles now update realtime on forcefield relations. Warning
for potential slowdowns! Also note that work on the real particle patch
still has to be done... something I really will do, but in time. To get
particles correctly integrated in the animation system, quite some new
development has to be done still.
2005-11-04 12:38:46 +00:00
Matt Ebb
1f2a7efd70 Small thing, just filling a gap that we really need here -
Added duplication of markers in the timeline with Shift D
(in the frame menu too)
2005-11-04 11:23:22 +00:00
Ton Roosendaal
8a0befc3fd Bug #3338
While using automatic IK, a pending redraw event could draw the buttons
window again, reveiling the temporal IK buttons. Using them, after grab,
caused a crash.

Also: noticed that the undo push for transform is called too early, so it
saves the state before 'special_after_trans' was called.
Also: in editmode armature, changed shift+A "Bones" in "Bone".
2005-11-03 21:13:20 +00:00
Ton Roosendaal
2439c1df7c Bug #3298
Unified render does not return a zbuffer, but when gauss render was used
in combination with motion-blur, a buffer was accidentally created, one
pixel to small even!
2005-11-03 20:35:49 +00:00
Joseph Gilbert
3f8f0f7aac Silly error string correction 2005-11-03 20:22:29 +00:00
Ton Roosendaal
93b2c85284 Bugfix #3288
If a Mesh was "Auto Smooth", it was drawing as smooth in editmode, and
not as smooth in Object mode. Should be consistant.
Better even would be draw autosmooth info, but that's derivedmesh magic now!
2005-11-03 18:58:35 +00:00
Ton Roosendaal
39453ccd90 Bugfix #3304
Actually nice feature too: when using Scene "Set" option, that scene draws
its transparent and x-ray stuff independent of the 'foreground' scene.
That means that x-ray in a set will be always over the set objects, but
stays behind the current scene.

For transparent it works the same though... meaning that solid objects from
the foreground scene will always draw over transparent from the "Set".

Note; this only is true for the 3d window, or the OpenGL render, not for
actual rendering of course.
2005-11-03 18:43:05 +00:00
Ton Roosendaal
1dc42b596c Fix #3330
Bone constraint to a path (follow) did not work yet...
2005-11-03 17:08:57 +00:00
Ton Roosendaal
ef19dfbbb2 Fixed two small glitches in Mesh ripping (Vkey):
- loose edges got accidentally removed
- when a rip results in loose vertices, they now get removed too.
2005-11-03 15:57:31 +00:00
Ton Roosendaal
6c9840f372 Sticks bones, in solid view mode, didn't draw selected not in posemode...
caused by code shuffling for new IK options and ghosting draw.
2005-11-03 14:51:23 +00:00
Jiri Hnidek
b5f212ae53 - arrow used for visualisation of joining of screen areas is drawn on the
other side now, I tried to fix bug submited by Nathan, can you test it?
2005-11-03 10:11:46 +00:00