Commit Graph

6933 Commits

Author SHA1 Message Date
Nathan Letwory a8d1f30807 create_verse_node was given wrong parameter (VSession), corrected to be VerseSession. 2006-11-07 11:10:37 +00:00
Ben Batt de7b03aca7 Fix for bug #5176: Crash when using display mode "Draw Sharp"
This was a sculpt mode merge problem: the G_DRAWSHARP and G_SCULPTMODE flags
had the same value, so Blender thought it was in sculpt mode when "Draw Sharp"
was turned on, leading to segfaults.

I have moved the G_SCULPTMODE flag to an unused value.
2006-11-07 05:32:39 +00:00
Geoffrey Bantle e144a05114 ->Commit of patch #5132: Separate by material
This patch adds a new option to the separate menu in editmode, 'By Material'.
It simply loops through all materials in the mesh selects the faces associated
with them and calls separate().

Thanks to Andrea Weikert for the patch!
2006-11-07 00:34:48 +00:00
Brecht Van Lommel 2ef6c48a65 Added two new blend modes to image painting brushes, erase alpha and
add alpha, for painting transparency in images. When using the eraser
tool of a tablet pen, the erase alpha blend mode is activated.
2006-11-07 00:10:37 +00:00
Brecht Van Lommel b48c514db8 Added an option in the IK constraint to disable stretching, useful
in rigs with layered IK constraints. Also removed the tolerance
setting, this value wasn't used in the solver anymore.
2006-11-06 23:51:37 +00:00
Ton Roosendaal c2e72a9a9b Patch #4955, Joshua Leung (aligorith)
Four more selection options in Curve editing;
- select more/less (ctrl+numpadplus/minus)
- select first/last point

All nice in menus and toolbox even!

Patch note: had to fix bugs in using 'continue' inside of while() loops.
Turned all oldstyle while() in for() for going over lists.
2006-11-06 18:20:56 +00:00
Kent Mein ba63fdeb41 Fix for makefiles so it can find wintab headers in the libdir.
Kent
2006-11-06 16:58:28 +00:00
Ton Roosendaal 71d7409fda Patch #4940, by Wybren van Keulen
The 2-point perspecitve Architecture Camera!
http://www.funnyfarm.tv/patch_lens_shift/patch_lens_shift.mov

Full log:
https://projects.blender.org/tracker/index.php?func=detail&aid=4940&group_id=9&atid=127
2006-11-06 15:42:38 +00:00
Nathan Letwory 232bfbbf8d * compiler command-line fix for scons/win32-mingw 2006-11-06 08:21:53 +00:00
Nicholas Bishop 8e97a2955b Merged Google Summer of Code sculptmode/multires/retopo tools.
From the tracker:
https://projects.blender.org/tracker/index.php?func=detail&aid=5018&group_id=9&atid=127
2006-11-06 01:08:26 +00:00
Ton Roosendaal 2d0c6040da Patch #4870, by Roland Hess
NLA window now follows visibility for scene layers, cleaning up complex
files quite some. Only note we could make is if this could be optional,
sometimes it's also nice to see the entire scene.

Note for Roland: this is a recoded version, with about 10% of code :)
2006-11-05 20:09:19 +00:00
Nils Thuerey 0d64b4a9f5 - removed debug ouput for particle loading 2006-11-05 19:44:00 +00:00
Geoffrey Bantle ab5862960f -> Fix for Bug #5056
hide_mesh() in editmesh_mods.c wasn't checking for fgon edges properly, causing fgon faces
dissapear when hiding unrelated verts/edges. Fixed.
2006-11-05 18:48:31 +00:00
Nils Thuerey 3bea663ffa - bugfixes
#4742 exported normals are now correct
  #4821 & 4956 for complex movements in/outflows can now also
  use the animated mesh option
- new features
  * isosurface subdivision: directly
    creates a finer surface mesh from the simulation data.
    this increases simulation time and harddisk usage, though, so
    be careful - usually values of 2-4 should be enough.
  * fluidsim particles: extended model for particle
    simulation and generation. When isosurface subdivision is enabled,
    the particles are now included in the surface generation,
    giving a better impression of a single connected surface.
    Note - the particles are only included in the final surface
    mesh, so the preview surface shows none of the particle
    effects.
  * particle loading: different types of particles can now be selected for
    display: drops, floats and tracers. This is a bit obsolete
    due to the extensions mentioned above, but might still be useful.
    Floats are just particles floating on the fluid surface, could
    be used for e.g. foam.
  * moving objects impact factor: this is another tweaking option,
    as the handling of moving objects is still not conserving
    mass. setting this to zero simply deletes the fluid, 1 is
    the default, while larger values cause a stronger
    impact. For tweaking the simulation: if fluid disappears, try
    increasing this value, and if too much is appearing reduce it.
    You can even use negative values for some strange results :)
- more code cleanup, e.g. removed config file writing in fluidsim.c,
  added additional safety checks for particles & fluidsim domains (these
  currently dont work together). I also removed the "build particles"
  debug message in effects.c (seemed to be unnecessary?).

Some more info on the new features:
Here are two test animations showing the difference between
using the particle generation with isosurface subdivision.
This is how it would look with the old solver version:
http://www10.informatik.uni-erlangen.de/~sinithue/blender/fluid6_fl6manc4_1noparts.mpg
and this with the new one:
http://www10.informatik.uni-erlangen.de/~sinithue/blender/fluid6_fl6manc4_2wparts.mpg
Both simulations use a resolution of 64, however, the version with particles
takes significantly longer (almost twice as long).
The .blend file for a similar setup can be found here:
http://www10.informatik.uni-erlangen.de/~sinithue/blender/fluid6_testmanc4.blend
(Minor Tips for this file: dont enable subdivions of characters until rendering,
thus leave off for simulation, as it uses the rendering settings! For making
nice pictures switch on subdivion, and OSA.)

And here's a picture of old vs. new (for webpage or so):
http://www10.informatik.uni-erlangen.de/~sinithue/blender/fluid6_manc4compare.png
2006-11-05 16:30:29 +00:00
Ton Roosendaal 64b9cda68e Patch 4122, Campbell's multi-collum 'clever numbuts'.
For time being ok, but note that this isn't as clever a system as the name
implies, really should be avoided!
2006-11-05 12:32:00 +00:00
Jens Ole Wund 587d24bb42 stupid typo spoiling adaptive step sizes in heun solver 2006-11-04 15:53:47 +00:00
Ton Roosendaal b802b3dc75 Bugfx #5033
Displace Modifier cannot displace Curve objects. Disabled it for menus,
and made sure it doesn't get curve objects fed.
2006-11-04 14:22:58 +00:00
Ton Roosendaal d471d2633c Bugfix #5159
SHIFT+K clear vertexpaint didn't work for faceselect+paint mode. Calls
to depsgraph were confused, now nicely centralized.
2006-11-04 12:36:37 +00:00
Ton Roosendaal 8e862a22ea Bugfix #5154
Mesh->mselect (the selection storage) didn't get zero'ed on duplicate,
potentially causing crashes. Bad!
2006-11-04 12:26:35 +00:00
Ton Roosendaal 916ea9b6d3 Bugfix #5153
VertexPaint mode didn't show interpolated (smooth) colors in faces.
Error caused by Modifier & DerivedMesh commit of august 22. Rules for
drawing smooth changed a bit...
2006-11-04 11:59:37 +00:00
Ton Roosendaal 1b125eba38 Bugfix #5146
Copy modifiers menu should be available for Lattice and Surface objects.

Note it does not support copying between different object types, that
is being indicated with a notice popup now.

I rather not code copying to other object types for now, this is something
which fits better in the modifiers API first. Right now the buttons code
handles this.
2006-11-04 11:22:22 +00:00
Ton Roosendaal 1ab71b2233 Bugfix #5144
Nkey panel for creases median didn't work properly. Now it does as follows:
- if set to 0 or 1 it applies that value to all creases
- else it adds the diffference of median crease value and the button value

Bugfix #5122

Paths drawing option for Poses now uses entire startframe-endframe range.
Before it skipped the last frame for drawing.
2006-11-04 10:09:05 +00:00
Ton Roosendaal f2053b41a2 Bugfix #5100
The camera view shift didn't allow to view the entire image when zoomed in.
Added a correction for zoomfactor.
2006-11-03 16:37:27 +00:00
Ton Roosendaal 7b53199ef4 Bugfix #5083
Deleting all points in a Curve object created empty DispList blocks. The
drawing code didn't like that.
Secured it by both fixing drawing as skipping adding empty DispLists.

Special thanks to Fernando Bastos for the extensive stack tracing.
2006-11-03 15:55:43 +00:00
Ton Roosendaal 787ba4ea08 Bugfix #5085
An Ipo optimize commit of 2 months ago broke the Ipo "Linear" type for
extending.
2006-11-03 14:23:19 +00:00
Ton Roosendaal 070027ce18 Bugfix #5068
Added redraw event to button that choses FFMPG codec type.
2006-11-03 13:23:40 +00:00
Ton Roosendaal 4841a875a8 Bugfix #5057
Added undo push after "create UV grid image".
Note that it won't help much, since the Imbuf is freed on undo... that's
for another project, to have a fixed Image cache to use in Blender.
2006-11-03 13:12:05 +00:00
Ton Roosendaal 51d3793192 Bugfix #5008
With the addition of vertexgroup support for Lattices, the option
'create vertex groups from closest bone' crashed due to reading NULL.

Fix provided & tested by Joshua.
2006-11-03 12:46:48 +00:00
Ton Roosendaal b29c28c43b Bugfix #5053
Dupli-group doesn't work yet for metaballs. Code entered an eternal loop,
because the group-duplication code calls again the metaball creation code.

Disabled this. MakeDisplist needs review!
2006-11-03 12:38:21 +00:00
Ton Roosendaal 2055818c99 Bugfix #5027
- Removing Shape Keys didn't free drivers
- The sample file had Shapekeys in a weird order (should be sorted on shape
  index number). How this could have happened is unknown, probably a script.
  For the time being added a version patch to check on this after reading
  a file. If wrong ordered, it gives warning prints.
2006-11-03 12:23:04 +00:00
Ton Roosendaal 0b314ac657 Bugfix, plumiferos report;
Using the Library Append "at cursor" option went wrong;
- it moved all selected objects to cursor position
- it didn't even check what was imported...

Both issues are fixed now.
2006-11-03 10:14:27 +00:00
Nathan Letwory b2cd81ca0f * shortened formatstring to cope with removal of R_IRIZ (would crash on Windows machines, but Linux didn't complain at all, tsk tsk) - this may fix odd crashes for
those that try to open up .blends with scene buttons visible
* added a define around yafray panel
2006-11-03 10:09:35 +00:00
Ton Roosendaal 4e71f06542 Fix for new Action Modifier: when a Action strip exactly ends where another
strip begins, the deformation was applied twice.

Strip blending for modifiers has to be implemented still...
2006-11-03 08:40:18 +00:00
Nathan Letwory 10fbfdad10 whitespace commit 2006-11-03 06:42:08 +00:00
Nathan Letwory c33550bd55 fix bug #5133
* when an object had wire draw in Draw Extra enabled and
  it was selected and set as a scene, it would draw
  as selected. Changed so it draws the wires in a grey
  shade, to communicate it is not in the active scene
2006-11-03 06:39:58 +00:00
Campbell Barton 4545da3510 ack- need to get the hang of usercounts better- it seems they need to be initialized as 1 for groups, just like images. 2006-11-02 23:05:10 +00:00
Ton Roosendaal 3276981571 Bugfix #5017
Deleting Shape keys could give a crash, if no Ipo was assigned to the
Shapes.
Fix located & provided by Joilnen, thanks!
2006-11-02 10:39:00 +00:00
Ton Roosendaal cd097a0e3c Bugfix #5147
Compositor: added a fixed (frame # based) seed in random, to ensure the
Texture node will give different results per frame.
2006-11-02 10:30:35 +00:00
Ton Roosendaal 402287940a Bugfix #5022
If you rename a Constraint, the used Constraint Channels (Ipo curves) were
not renamed as well, making animations not work anymore.

Now renaming works up to this level:
- own object constraints
- own object Action constraints

This is identical to Bone renaming. Note that other actions (like in NLA)
are not corrected for renaming. Have to look at ways to provide that once.
2006-11-02 10:13:01 +00:00
Ton Roosendaal b693662ba6 Removed a initialize check for NodeTrees.
Apparently being so scroogish for cpu cycles makes crashes in Linux. I'll
add it on todo for later checks, but I need a windows or linux coder for
it!

For users: it might fix crashes when you have NodeTrees in Libraries.
2006-11-01 20:41:39 +00:00
Joilnen Leite a0ee7bf7a9 Updatting vertices number info after remove doubles
.
2006-11-01 16:10:47 +00:00
Ton Roosendaal 6dd4f6020e Patch #4848, Joshua Leung
NLA Strip "Mute" option, to temporally disable a strip. Option only in
Properties panel still, should be in menus and hotkey.
2006-11-01 15:33:45 +00:00
Ton Roosendaal f5fc880a41 Plumiferos request: Added button in Armature options panel to set custom
bone drawing on/off. Is default on.
2006-11-01 14:29:06 +00:00
Ton Roosendaal b96179d689 Patch #5099 by Joshua Leung (aligorith)
This allows to select parent bones in PoseMode and EditMode. Hotkey: P.
2006-11-01 13:50:41 +00:00
Ton Roosendaal 56cd48a5ea Bugfix #5155
Option "Add UV image" didn't set tilesXY to 1. Caused crash or bad opengl
behaviour when tiles option used.
2006-11-01 12:54:29 +00:00
Ton Roosendaal 0977d92d73 Bugfix #5030
- Removed obsolete IRIZ image support from menus.
  This was a Blender-only version of SGI Iris images, used internally in
  the nineties because it was the only format supporting Z easily
  A much better Z exporting - and industry compliant - is via OpenEXR

- Scene strips in Sequencer now get Z buffers as well. This is only in
  float format, containing actual distances from the camera.
2006-11-01 12:44:04 +00:00
Ton Roosendaal 358a6e6e88 Oops! A debug return in code disabled many constraints to work even :) 2006-11-01 11:54:46 +00:00
Ton Roosendaal cad4d9e5db - Improved cyclic error prints for Armatures
- Improved bone parent error print
2006-11-01 11:41:29 +00:00
Ton Roosendaal 2145c35e12 Bugfix #5038
The "Copy Size" constraint was calling a where_is_object(), this caused
the depsgraph to mess up in very weird ways and rare occasions. In the
sample file it showed strange lags in bones for using the "Stride bone"
option.

While trying to locate the bug I've revisited the Pose depsgraph in detail,
trying to figure out how it can print possible cycle errors in dependency.
That has been added now too (in console). Unfortunately the bugreport
example had no cycle errors. :)
2006-11-01 11:26:16 +00:00
Ton Roosendaal cfe1756571 Bugfix #5037
Clear transform (ALT+G/R/S) in Pose sometimes didnt work, for example when
armature is being controlled by other armature. Caused by double depsgraph
flushing.
2006-10-31 20:48:10 +00:00
Ton Roosendaal da8e2749bc Small fix in calculating correct cycle offset for cycling ActionStrips.
This float precision is usually headaches :)
2006-10-31 18:24:27 +00:00
Ton Roosendaal 35d6c6e695 Two wonderful new NLA & Armature editing features!
- FORWARD CYCLING & MATCHING

Up to no now, adding multiple actions in NLA with walkcycles required to
animate them standing still, as if walking on a conveyor belt. The stride
option then makes the object itself move forward, trying to keep the foot
stuck on the floor (with poor results!).
This option now allows to make walk cycles moving forward. By
indicating a reference Offset Bone, the NLA system will use that bone to
detect the correct offset for the Armature Pose to make it seamlessly going
forward.

Best of all, this option works as for cyclic Action Strips as well as for
individual Action Strips. Note that for individual strips, you have to set
the strip on "Hold". (Might become automatic detected later).

Here's an example edit image for NLA:
http://www.blender.org/bf/nla_match-cycle.jpg
And the animation for it:
http://download.blender.org/demo/test/2.43/0001_0150_match.avi
Blender file:
http://download.blender.org/demo/test/2.43/mancandy_matching.blend

Using this kind of cycling works pretty straightforward, and is a lot
easier to setup than Stride Bones.

To be further tested:
- Blending cycles
- matching rotation for the bones as well.

- ACTION MODIFIERS (motion deformors)

The above option was actually required for this feature. Typically walk
cycles are constructed with certain Bones to be the handles, controlling
for example the torso or feet.
An Action Modifier allows you to use a Curve Path to deform the motion of
these controlling bones. This uses the existing Curve Deformation option.
Modifiers can be added per Action Strip, each controlling a channel (bone)
by choice, and even allows to layer multiple modifiers on top of each other
(several paths deforming motion). This option is using the dependency graph,
so editing the Curve will give realtime changes in the Armature.

The previous walkcycle, controlled by two curves:
http://download.blender.org/demo/test/2.43/0001_0150_deform.avi
Blender file:
http://download.blender.org/demo/test/2.43/mancandy_actiondeform.blend

Action Modifiers can be added in the NLA Properties Panel. Per Modifier you
have to indicate the channel and a Curve Object. You can copy modifiers from
one strip to another using CTRL+C (only copies to active Object strips).

Setting up a correct Curve Path has to be carefully done:
- Use SHIFT+A "Curve Path" in top view, or ensure the path is not rotated.
- make sure the center point of the Curve Object is at the center of the
  Armature (or above)
- move the first point of the curve to the center point as well.
- check if the path starts from this first point, you can change it using
  (in Curve EditMode) the option Wkey -> "Switch Direction"
- Make sure alignment uses the correct axis; if the Armature walks into
  the negative Y direction, you have to set in Object Buttons, "Anim settings"
  Panel, the correct Track option. (Note; option will probably move to the
  Modifier later).

This is a good reason to make such paths automatic (on a command). Is on the
todo list.

Also note this:
- the Curve Path extends in beginning and ending, that's (for now) the default,
  and allows to use multiple paths. Make sure paths begin and end horizontal.
- Moving the Curve in Object Mode will change the "mapping" (as if the landscape
  a character walks over moves). Moving the Curve in Edit Mode will change the
  actual position of the deformation.
- Speed (Ipos) on paths is not supported yet, will be done.
- The Curve "Stretch" deform option doesn't work.
- Modifiers are executed *after* all actions in NLA are evaluated, there's no
  support yet for blending multiple strips with Modifiers.
- This doesn't work yet for time-mapping...

This commit is mostly for review by character animators... some details or
working methods might change.
This feature can also be used for other modifiers, such as noise (Perlin) or
the mythical "Oomph" (frequency control) and of course Python.

Special thanks to Bassam & Matt for research & design help. Have fun!
2006-10-31 15:51:57 +00:00
Jens Ole Wund 52c20fecba softbody update -> self collision search takes 1/3 of the time here
this one should work nice -->
http://www.wund.homepage.t-online.de/hidden/sb_col_must_3_0.blend
2006-10-30 22:47:41 +00:00
Peter Schlaile e8a58eb0f9 == Sequencer ==
Bugfixes: Fixed partially bug #5030
Added patch: #4992 Basic Transforms
 This adds basic transform capabilities (rotate, scale, shift) to the
 sequencer.
2006-10-30 22:28:06 +00:00
Jiri Hnidek e944ed2f4a - bug fix #5141, blender doesn't crash, when you try to unsubscribe twice
from verse node in outliner
2006-10-30 14:59:30 +00:00
Jiri Hnidek b17ce5e24a - bug fix: brecht's fixing of warning caused one bug, ... one "break;"
was missing in code ... blender crashed, when it was connected to
   verse server with bitmap node
2006-10-30 12:24:22 +00:00
Tom Musgrove a991d0d6f2 =rename append=
renamed the file menu item append  to append/link for clarity, thanks to Juho Vepsäläinen (bebraw)
2006-10-29 16:51:50 +00:00
Tom Musgrove d1e1851722 =render window zoom with mousewheel and pgup pgdwn=
adds additional shortcuts to zoom on the render window, patch by Onur Yalazi (onuryalazi)
2006-10-29 16:31:36 +00:00
Matt Ebb ddbfb04642 * Changed the Curve Modifier to have it's own X/Y/Z axis deform direction
settings, rather than using the object's TrackX/Y/Z/etc buttons.

 This is good for two reasons: a) having the settings over in the object buttons
 before was terribly unintuitive and hidden, now it's more visible how to
 control the deformation, and b) now if you have more than one curve modifier,
 they can have their own settings, instead of being forced to use the object
 level data.
2006-10-28 16:48:56 +00:00
Matt Ebb 3e0c45440d * Simple patch 5058 from gsrb3d to use constants instead of magic numbers for
theme drawtypes
2006-10-28 13:21:02 +00:00
Ton Roosendaal 129cab4137 New Curves Widget option: curves can get extrapolated extension.
Especially for Compositing it was annoying that colors always got clipped
in the 0.0-1.0 range. For this reason, extrapolated Curves now is the
default. Old saved files still have horizontal extrapolation.

Set the option with 'Tools' menu (wrench icon). This is a setting per
curve, so you might need to set all 4 curves for an RGBA curves widget.
2006-10-27 20:27:13 +00:00
Ton Roosendaal a7d3a58ba9 Serious bugfix for compositing; using Groups could crash if one of the
input nodes was 'passing on' the buffer (because it didn't operate on the
image). That's for example for Blur with size 0 or for Translate node.
This passed-on buffer then got freed inside the group...

Solution now is just a malloc. Better system should be devised, with
reference counting or so. Thanks Ivan Hoffmann for the sample file!
2006-10-27 19:52:41 +00:00
Kent Mein 76ff13de42 more bugs found thanks to klockwork
all of these are just check a var to make sure it points to something before
using them.

Kent
2006-10-27 18:24:10 +00:00
Brecht Van Lommel 43dc73ce79 Fix for bug #5128:
Missing texture preview update for MinX/MaxX/MinY/MaxY settings
of an image texture.
2006-10-27 17:05:22 +00:00
Nathan Letwory 45c1f23f19 Apply patch #5127 by Joseph Eagar (joeedh)
* This addresses the long command-line problem when building with SCons/MingW on windows through a dosbox (cmd.exe).

My test buildpath was: C:\Documents and Settings\nathan\My Documents\blender\build\win32-mingw
Should be rather long enough, don't you think?

/Nathan
2006-10-27 09:01:42 +00:00
Nathan Letwory a782b2179b fix for #5135
* potentially a NULL-pointer could be referenced, causing a segfault.
2006-10-27 08:12:18 +00:00
Brecht Van Lommel dd3d85c77d UV editor:
- When in 2D image paint mode or mesh editmode, draw a shadow mesh
  to more clearly indicate the UV's are not editable.
- While in editmode the UV's displayed are now updated as the mesh is
  edited, whereas before it would draw the UV's of the mesh before
  entering editmode.
2006-10-27 00:43:18 +00:00
Brecht Van Lommel 40d4d86055 Bugfix: alpha values written in image paint were wrong. 2006-10-26 23:42:04 +00:00
Brecht Van Lommel 5376df2689 Fixed all gcc 4 warnings in blenkernel. Found 2 potentially harmful
unintialized variables in the verse code, verse_session.c:451 and
verse_object_node.c:339, those are properly initialized now.
2006-10-26 23:34:44 +00:00
Brecht Van Lommel 47f579f514 Add a stub to make blenderplayer compile with verse enabled. 2006-10-26 22:36:29 +00:00
Kent Mein 7fdf2a2303 more bugs found thanks to klockwork
I basically added some checks to see if we have a buffer before trying to
actually use them.

Kent
2006-10-26 18:58:07 +00:00
Ton Roosendaal 9f77785d7c Coding work while on the trip to london (based on Plumiferos wishlist);
- Icon previews for Images were created always for old files, which made
  browsing (menus) incredible slow. Added a minor change in the flow, so
  icons only get created when the user invokes loading images.
  Andrea; you might check this, probably not al cases are covered yet?

- Compositor: the 'File Output' node now has a min/max frame for which it
  writes files

- Compositor: fixed a very bad bug (even in 2.42a release) that made the
  depsgraph for nodes not work... while editing, only the nodes that change
  should be recalculated, but accidentally all of them were done each time.
2006-10-26 10:13:16 +00:00
Martin Poirier f0dcd2db75 == Transform ==
Embryon functionnality for snapping.

- Only snaps to grid on translations (grab)
- Transform constraints are supported but header display is wrong.
- Can be turned on/off in the Object/Mesh header menu under Transform Properties (tentative spot, will have to integrate better and in other object type menus too)
- Can be turned on/off during transform with ` (Back Quote, also tentative)

This is, of course, very much Work in Progress.

This implements part of the structural ideas for the transform cleanup I've been juggling around with.
2006-10-25 23:57:00 +00:00
Martin Poirier 2556254e92 == 3D View ==
Customizable Grid Subdivisions

This commit adds a numbut to the View Properties panel that lets you specify how the grid is subdivided.

This affects snapping in translations, obviously.

Default: 10 (behavior doesn't change)

That means people still stuck in feet and inches (shudders) can set it to 12 and have 1 unit = 1 foot.

That also means you can work in "heads" when doing body proportions or whatnot (don't think of it as being limite to "CAD" uses).
2006-10-25 23:34:24 +00:00
Martin Poirier 07ce603299 Cleanup.
Missing include for ListBase. Wasn't a problem until someone try to include this without including ListBase (manually or through something else). Safe now.
2006-10-25 23:19:40 +00:00
Martin Poirier a3cff50ef6 LocEulSizeToMat4 arith function.
Creates a 4x4 matrix from location, size and euler angles components.

Coded by Joshua Leung (aligorith) for one of his patches. Integrating right now because it's useful in and of itself.
2006-10-25 23:15:09 +00:00
Campbell Barton 80ffbee6f7 was missing a return of len, so scn.objects.context was always returning 0 2006-10-25 13:33:08 +00:00
Ton Roosendaal 9d67a597bc Irregular shadow fix: the MemArena module didn't give callocs, only malloc.
Made nice crashes that way... but not in !@%@$ OSX because it seems to
clear memory unwanted. Solve dit with adding API call in MemArena to default
to callocs.

Also removed malloc() from MemArena, replaced with MEM_mallocN().
2006-10-24 15:17:14 +00:00
Ton Roosendaal da12c9571b Bug provided by Plumiferos team on conference:
In some cases faces were skipped from rendering, when using multiple
RenderLayers. Was caused by a "don't render" flag hanging. Error was
introduced with the "All Z" RenderLayer option.
2006-10-24 14:14:20 +00:00
Hans Lambermont b5fbb186df - add -lXi to prevent "undefined reference to `XGetExtensionVersion'..."
- remove obsoleted<=4.0 freebsd compatibility
2006-10-24 13:34:15 +00:00
Ton Roosendaal f3615cf228 Bugfix: commit of Campbell june 20, for fly mode, didn't check for the
G.vd->camera pointer. If not set, a view change can crash.

Reported & shown by Ivan!
2006-10-23 16:15:23 +00:00
Campbell Barton e459764b4b I was impossible to set a render window back to being a non render window without changing the TexFace image.
now the cross will unset the render window and use the texface if its there, cross again removes the image as useual.
2006-10-22 12:46:54 +00:00
Campbell Barton 0e569035c7 made mesh getFromObject also copy the meshes flag 2006-10-22 02:43:04 +00:00
Jens Ole Wund 88455e8d5c bug fix
in softbody aerodynamics
(should zero a vector which is only added to in function call)
thanks michael
2006-10-20 23:02:47 +00:00
Jiri Hnidek 137d9e5f29 - bug fix: get rid of "verse client name len: 16 ..." memory of client
name have to be deallocated after calling verse_client_name() function
2006-10-20 10:24:14 +00:00
Campbell Barton 6fcae7b5d4 added TwoSide to texface specials menu
added a menu for texface copy - Ctrl+C in Face Mode
2006-10-19 23:21:54 +00:00
Jens Ole Wund 57f01fdb46 more softbody goodies:
SB collision targets may be picked up from modifier stack
works fine with static targets having subsurf and/or array mofifiers
see-->
http://www.wund.homepage.t-online.de/hidden/Mstack.blend
http://www.wund.homepage.t-online.de/hidden/Mstack_II.blend

however when calulating the SB object dynamics the vertices of the
'deform only' m-stack result are used

so SB <-> SB may look strange
subsuf modifier is applied to SB object after doing SB dynamics
(that is: colliding mesh is subsurfed, SB is not )
subsurfed SB cubes colliding
link --> http://www.wund.homepage.t-online.de/hidden/ColSelfMod.blend

or may give unwanted results
subsuf and array modifier is applied to SB object after doing SB dynamics
link --> http://www.wund.homepage.t-online.de/hidden/ColSelfMod_nobug.blend

last, modifiers that change vertex locations in time (like waves)
suffer from not beeing seen at needed time resolution
(SBs see colliders static in a frame)
well but that's beyond the limits of the current dep-graph use
and needs to be resolved on design level

anyhoo have fun
BM
2006-10-19 22:01:06 +00:00
Nathan Letwory ba4f678b5c * Verse username for blender avatar can be set in userprefs (System&OpenGL). The name defaults to the old form. 2006-10-19 05:06:41 +00:00
Geoffrey Bantle e259923340 -> Triangle to Quad bugfix
Last minute bugfixing for last commit introduced a brand new bug causing
Crashes, whoops! Fixed now.
2006-10-18 06:06:15 +00:00
Nathan Letwory 88446eeca4 Patch 5105 by Joshua Leung (Aligorith), slightly modified by me
* Add WITH_BF_YAFRAY, which per default is 'true', so no visible changes for developers (and users).

Set WITH_BF_YAFRAY to 'false', and you'll save some major compile time :) Also handy if you're strapped for memory and compilation fails on yafray compilation due
 to this.

- this commit also has a few whitespace changes and
- made BF_NO_ELBEEM a proper BoolOption. This will be renamed to WITH_BF_ELBEEM in the near future...
2006-10-18 05:45:47 +00:00
Geoffrey Bantle 134e562219 -> Improved Triangle to Quad conversion
Alt-J behavior has been replaced by a port of the Tri2Quad python script
currently in CVS. This method has many advantages over the old behavior.
A simple illustration of how the new method is superior to the old can be
made by triangulating a suzzane and converting it back to quads.

	http://www.umsl.edu/~gcbq44/t2q2a.jpg
	http://www.umsl.edu/~gcbq44/t2q2b.jpg

The algorithm works by considering all possible triangle pairings and then
weighting them according to how appropriate it would be to join. These pairs
are then quick-sorted and those with the highest weighting factor are combined.
The function is quite fast even for dense meshes and usually involves no
noticeable wait-time for completion. For instance the following imported
model took less than 2 seconds to convert on my 1.3ghz PPC powerbook:

	http://www.umsl.edu/~gcbq44/mimitri.jpg
	http://www.umsl.edu/~gcbq44/mimiquad.jpg

It should be noted by the user that this method also discards face pairs
where the two triangles:

-do not share the same material
-do not share the same UV image (texface)
-do not share a compatible set of UV coordinates
-do not share a compatible set of vertex colors
-will form a concave quad or create a non-planar face

Additionally if the edge shared by the pair is marked 'sharp' the pair
will be discarded from the quicksort. In this way the user can gain great
control over the conversion process if they desire as this imported VRML
model of a sneaker illustrates:

	http://www.umsl.edu/~gcbq44/t2qa.jpg
	http://www.umsl.edu/~gcbq44/t2qb.jpg

For the future it would be nice if some of the options for the conversion
process, such as angle tolerance, could be made configurable in the UI.
However it is unclear at this time which options should be made configurable
and where to put them. Feedback on this is appreciated.

Special Thanks goes to Joe Eager for the two macros he contributed to this code
and to Campbell Barton for writing the script this was based on!
2006-10-18 05:18:51 +00:00
Jens Ole Wund f0fbffcd59 made a nice new softbody II panel on UI to keep things usable (logic wise)
- failed on final alinignment issues may be matt can give a helping hand ? :)
2006-10-17 22:03:32 +00:00
Nathan Letwory 282b0d528d * fix totblock error when quiting blender with sessions open
* add "Disconnect"-menu when RMB on verse server that is connected in
outliner
2006-10-16 15:28:57 +00:00
Jiri Hnidek 6468b1705b - I forgot one ifdef in last commit, I'm sorry 2006-10-16 14:14:49 +00:00
Ton Roosendaal 239b08b8b2 Bugfix #5090
Duplicating a Library-linked Mesh with Library-linked texture Images forgot
to set the texture Image link flag to LIB_EXTERN (LIB_INDIRECT means the ID
is not saved in file).

Error was that a the duplicated Mesh lost texture.
2006-10-16 11:31:09 +00:00
Campbell Barton 045e143189 a Malifico request, Blender.Library now supports loading relative libraries.
Blender.Library.Open('//someblend.blend')

the // at teh start of the path mean that the file will be loaded relaive to the existing blend files path.
2006-10-15 14:00:23 +00:00
Ton Roosendaal 9fa438b4e9 Another shadowbuffer goodie: the "Halfway trick"
http://www.blender3d.org/cms/Shadow_buffer__Halfway.786.0.html

Simply said: by using the average of the nearest and 2nd nearest Z value
in Shadowbuffers you can reduce bias errors very well.
For backwards compatibility it is a new buffer type though.
2006-10-15 11:50:46 +00:00
Campbell Barton 3b0adf0bf4 added shadAlpha access to materials in python 2006-10-15 08:43:59 +00:00
Tom Musgrove 05ee7d9053 =translate hoek to angle=
renamed the dutch variable hoek to angle globally arithb.c changes done by Matt Plough
2006-10-14 23:27:18 +00:00
Jens Ole Wund 03be45c8c0 softbodies again
unnesting aerodynamics from edge collision
cleaning up softbody.c
that is:
removing old todos in comments
adding some new :)
2006-10-14 19:03:06 +00:00
Ton Roosendaal bc10cf38b9 Irregular shadow bug: mixing up zmin and zmax in optimize caused larger
faces to miss casting shadow.
2006-10-14 15:26:15 +00:00
Ton Roosendaal 11b4d14ab6 Missing initialization of 'shadow alpha' in new materials. Caused by not
copying this file from my laptop I used to code it... :)
2006-10-14 13:50:11 +00:00
Ton Roosendaal e868f223dc New shadow feature: Irregular Shadow Buffers
Full log:
http://www.blender3d.org/cms/Irregular_Shadow_Buffe.785.0.html

In short: this is a shadow buffer approach that always results in crispy
shadows, independent of lamp buffer size or zoom level. This shadow buffer
system also supports transparent shadow.

This is part of work on refreshing Shadow Buffers in Blender. You now can
choose of two types (Classical, Irregular). More types will follow. Also
quality issues for Classical shadow buffers are going to be reviewed,
especially to solve the lousy Biasing.

For the CVS log record; it is based on articles:
Gregory Johnson et al, University of Texas, Austin. (Regular grid method).
Timo Aila and Samuli Laine, Helsinki University of Technology. (BSP method).
2006-10-14 10:21:19 +00:00
Jens Ole Wund babb95c3e0 softbody update
nicer kinematics in self collision -> blending to complete inelastic impact
now does something close to real physics

first steps towards aerodynamics
anisotropic friction
springs 'see' their movement in media
--> see surrrounding  media does not move and/or reacts on wind
(*for now  needs to have a pseudo collider araound  -> that is: add a cube in the same layer
and make it a deflector  *)
2006-10-13 21:27:43 +00:00
Jiri Hnidek 1c95192e74 - added dark-green circle behind subscribed verse node
- added green circle behind object node shared at verse server
 - it is easier to figure out, what is shared and what isn't shared

 - color is hard coded now, but Matt can improve it ;-)
2006-10-13 13:44:13 +00:00
Campbell Barton c8b06bba9c mesh/animation exporters didnt work when there were no 3d views open, because the Blender.Set('curframe', i) called a update command that resulted in no viewable layers updating.
Made Blender.Set('curframe', i) do a
  scene_update_for_newframe(G.scene, (1<<20) - 1);

  removed 2 unused constants from Scene.c
2006-10-13 11:56:08 +00:00
Nathan Letwory bbf3c93b96 add some #ifdefs around verse-related code 2006-10-13 09:16:28 +00:00
Nathan Letwory 7e34fbe47f Master Server list
* print (# servers) instead of icon row when there are servers in the list
* dark-green circle behind server icon in server list when connected
* orange when connecting
2006-10-13 09:11:56 +00:00
Ken Hughes 42ac396734 Move variable declaration to top of function. 2006-10-13 00:27:49 +00:00
Campbell Barton b62232b5be fix for [ #4868 ] script window "save as" uses blend path instead of script path.
2 line fix, if text->name is not NULL its used for the path (text->name IS the path) otherwise the ID name is used.
2006-10-12 17:35:59 +00:00
Campbell Barton 15a7f590a7 seperate objects unset the objects OB_FROMGROUP flag 2006-10-12 15:27:32 +00:00
Campbell Barton 62aebec3c4 added some tooltips and hotkeys to tooltips that were missing them. 2006-10-12 14:26:14 +00:00
Campbell Barton ce0f9a3cac On Matt's suggestion moved "Make Link->Groups" to the add groups menu as "Add to Active Objects Groups"
removed "Make Link -> DupliGroup" because Copy->Duplis does the same thing.

Python's Group.c had an unneeded scene/base lookup.
2006-10-12 13:13:45 +00:00
Nathan Letwory b2a8417fce Add Verse master-server functionality
* added two files from verse-master
* server list is available in outliner (new mode "Verse Servers")
* verse sessions are now also in new mode "Verse Sessions" in outliner
* fixed drawing of verse sessions and their nodes
* in user preferences System & OpenGL master-server ip setting (default master.uni-verse.org)
* in File>Verse entry "Get Servers" to get server list or
* RMB on "Available Verse Servers" in outliner to "Refresh" server list

Enjoy :)
2006-10-12 11:53:50 +00:00
Ton Roosendaal 86e192ea40 Bugfix #4843
Third fix for this bug! In august I've added the function
Mat3ToCompatibleEul(), which ensures a proper euler value being derived
from a matrix, while inserting Ipo keys after a transform().
That also had to be done for camera fly mode.
2006-10-12 09:32:47 +00:00
Matt Ebb 1be92c8b19 * Added a new empty draw type - single arrow. This can be useful in situations
where you just need a direction, like a wind or vortex force field for example.
2006-10-12 07:54:32 +00:00
Campbell Barton 14a9460755 renamed
Make Links -> Group to DupliGroup
added "Make Linkes -> Groups" so you can add other selected objects to the groups of the active object.
2006-10-12 06:36:17 +00:00
Matt Ebb 4a10a1a6be * Clicking on a constraint in the outliner now shows object buttons 2006-10-12 03:43:44 +00:00
Matt Ebb ff6ea2148c * A new bfont.ttf.c, used for the default international interface font.
This is a modified version of DeJaVu Sans, which is the same as the previous
Vera Sans, but with additional characters for languages (such as Czech) that
were missing from Vera. This version I'm committing has modifications to reduce
file size, cutting out useless stuff like ancient Greek characters.
2006-10-12 02:58:32 +00:00
Jens Ole Wund 80aa6fe5fb softbodies
-seld collision adding fine control to UI
-cleaning up code
volatile test file again
http://www.wund.homepage.t-online.de/hidden/sb_col_must_2_0.blend
2006-10-11 22:53:22 +00:00
Campbell Barton de3c54569d BPyRender sets renderlayers right now
Object groups were get/set without user counts changeing.
2006-10-11 10:33:34 +00:00
Campbell Barton 892607e250 Added global delete, triggered with Shift+Del, this removes the object from all scenes (saves searching manually) 2006-10-11 06:51:26 +00:00
Campbell Barton 0ed327f162 Setting new objects scenes layers is & (1<<21)-1
the scenes active object is only unset when unlinking - if the active object is being removed.
2006-10-11 03:02:35 +00:00
Matt Ebb ee831a3411 * Allow Shift O proportional hotkey to cycle to random mode in 3D view,
looks like I only got the image editor in previous commit.
2006-10-11 01:19:14 +00:00
Jens Ole Wund b6b5cdefa9 some tiny changes to the softbody system
- UI for self collision ball size definition
- edge collision mode added (almost a bug fix)
volatile test file -->
http://www.wund.homepage.t-online.de/hidden/sb_col_must_1_2.blend
2006-10-10 21:49:02 +00:00
Jiri Hnidek bba546e5fb - blender should work corretly with new verse gimp plugin now
- it uses "color_r", "color_g", "color_b" and "transparency" for naming
   color channels
2006-10-10 15:30:57 +00:00
Campbell Barton e4c38c5740 changed python scn.Layers get/set to mask off bits other then (1<<20)-1 2006-10-10 04:54:02 +00:00
Campbell Barton 6e61448123 Mistake in recent schange to scn.objects.new() crashed Blender. fixed and also stopped Mesh_FromPyObject() clearning a meshes object if not called with an object. 2006-10-10 02:18:08 +00:00
Campbell Barton 475bc908be changed select grouped hooks functionality- just select the hooks that use the active object.
also speed up for select group, only find group status for unselected objects.

Updated the select group menu in 3 places, the space bar menu was out missing some other group options also.
2006-10-09 18:56:02 +00:00
Campbell Barton 18e3386ac5 malefico's request when working with many hook objects-
Select Grouped -> Hook Siblings (Deform Same Data)
2006-10-09 17:56:00 +00:00
Campbell Barton 0933418617 Lattice.c was looping through all lattice data to check that it wasnt removed.
No other BPyModules do this and zero user lattices are kept so this check is not needed.

removed lattice.applyDeform(), this called object_apply_deform, which only gave a message to use modifiers.

changed the example in epydocs to apply the lattice using modifiers.
2006-10-09 06:19:27 +00:00
Campbell Barton 27dc45ba24 BPyRender.imageFromObjectsOrtho's now sets all layers visible,
an error in Scene.c - scn.Layers disallowd all layer bits to be set.

made image_billboard.py rotate all images to be verticle for more efficient packing, added the option not to pack resulting images into 1.
2006-10-09 04:29:24 +00:00
Campbell Barton 29daa64095 removed unusued vars from Geometry.c
uv_archimap still had python based line intersect

added plane2matrix function to BPyMathutils
added an optional arg to imageFromObjectsOrtho - camera_matrix
camera_matrix can be used to define a plane in 3d space where X and Y scale is used to set the width and height of the area to render.
2006-10-08 10:51:38 +00:00
Campbell Barton b3a48fe82e removed some unused vars from Curve and matrix
scn.objects.new(None) - adds a new empty
 - new objects are selected by default now

further stripped down the vector struct, the wrapped state was being stored and 2 places.
2006-10-07 11:49:53 +00:00
Campbell Barton 30d207e650 Added python func Blender.Geometry.LineIntersect2D(v1,v2,v3,v4)
updated archimap and cookie cutter to use it, removed python version from BPyMathutils
archimap island merging is noticibly faster
2006-10-07 04:56:36 +00:00
Campbell Barton dda63a9dde added comparison function to many python types so you can do == and =! 2006-10-06 16:48:28 +00:00
Jens Ole Wund aaaae78527 removing self collision for curves
just did a few tests, with the 'surprising' result that balls are not curves ..
and i don't want to be swamped by bug reports tellling me
'it does not collide as i whised it would'
2006-10-05 21:30:55 +00:00
Jens Ole Wund f2d27eb4cb bug fix
only alow self collision for suited objects

feature request from hairdressers
self collision for curves
works amazingly well if you keep in mind there balls around vertices colliding
2006-10-05 17:46:01 +00:00
Campbell Barton 4811ba51ed Python API
added list like access to mesh face colors so you can say col[0] = 255 instead of col.r= 255
more importantly 'for ch in col' and 'tuple(col)'
2006-10-05 15:56:11 +00:00
Campbell Barton 3bd71e9ad5 added the option to Blender.Library to 'link' data for malefico 2006-10-05 15:24:15 +00:00
Jens Ole Wund 21d6b199ab softbody self collision
ironing out a few glitches related to goal pinning
volatile test blend ->
http://www.wund.homepage.t-online.de/hidden/sb_col_must.blend
+ adding a few alternative collision ball calculation algos
since i did not want to blow up (waste)  DNA space without need,
coded as -1.0 -0.1 -1.1 values in 'ball size' (look at tooltip popup)
2006-10-04 21:36:55 +00:00
Campbell Barton 0c6bb8c079 mesh.transform() was applying the inverted 4x4 matrix to the normals, without removing the translation part.
iter with a char value did not allow for -1, my bad, using short now.
2006-10-04 17:06:29 +00:00
Campbell Barton 5dcf97c892 moved vector objects to getseters,
added in place operations.
  Vector_iadd   vec1+=vec2
  Vector_isub   vec1-=vec2
  Vector_imul   vec1*=float or vec1*=mat
  Vector_idiv   vec1/=float

length is now writable vec.length= float
2006-10-03 16:07:48 +00:00
Jens Ole Wund c903e2c07b -bug fix
sometimes goal pinned vertices were omitted by self collision
2006-10-03 12:12:24 +00:00
Campbell Barton 6b7c4e09e8 Mathutils.Vector speedup
removed the need for casting python objects to Vectors pyobjects when performing vec/float arithmatic.
a PyObject for coercing has also been removed from the vector struct so a little less memory will be used also.


Benchmarked before and after this change
___________________________________
import Blender
v= Blender.Mathutils.Vector
m= Blender.Mathutils.Matrix

a= v(1,2,3)
b= v(3,2,1)
c= m()
t= Blender.sys.time()
for i in xrange(20000000):
        a*b
        a*10
        a/10
        a+b
        b-a
        a*c

print Blender.sys.time()-t
_______________________________________

Before 63.5sec
after 49.5

about 3 sec of that is looping
2006-10-03 05:11:33 +00:00
Matt Ebb 815f115338 * Previous backwards compat commit to reset curve radius values to 1.0 on old
file was also happening on files made with current CVS (until next release).
Added a simple check to make it only happen on old files where there was no
radius before.
2006-10-03 00:16:22 +00:00
Jens Ole Wund 1ace6ec0ef softbody panel cosmetics
and a forgotten debug print .. tsk
2006-10-02 17:05:56 +00:00
Andrea Weikert ecfdda30cd - fix for relative path: BLI_strncpy needs to be passed len+1 !
(introduced by my last patch - ouch)
2006-10-02 16:11:57 +00:00
Jens Ole Wund ab92fca306 softbodies
mostly reshuffeling UI to have things where i'd expect them to be
2006-10-01 21:49:10 +00:00
Martin Poirier 1ea97e5552 Patch: [ #5036 ] IPO Curve Mirroring by Joshua Leung (aligorith)
This patch adds the feature of IPO curve mirroring. It mirrors the selected keyframes in the active ipo curves over a user-nominated mirror-line.

Options are:
- Mirror over current frame
- Mirror over vertical axis (X = 0)
- Mirror over horizontal axis (Y = 0)

Functionality can be accessed from:
- Hotkey M in IPO editor
- Submenu in header of IPO editor
2006-10-01 19:45:37 +00:00
Martin Poirier e5ba49349f Patch: [ #5046 ] IPO Editor -> Axis Locking for Transform by Joshua Leung (aligorith)
** This is a heavily modified version of the patch, but the idea is the same. **

This adds X and Y as hotkey for constraining IPO transforms (grab only) and also fixes the display to only show relevant information when constraining (grab and scale).
2006-10-01 19:29:46 +00:00
Martin Poirier ed2560488b As discussed during meeting, Changed curve length/tilt markers to indicate direction.
That is, a 3D curve now displays as ->->->-> instead of -|-|-|-|.

Comparing the two, I didn't find the arrow display any more confusing then the straight lines when dealing with loops and tilt variations. Sharp turns are more likely to display crossed lines though.

Others should feel free to disagree and make it better.
2006-10-01 18:28:46 +00:00
Tom Musgrove a88807b6dd ==Mat4ToEul==
a utility function to convert 4x4 matrices to a euler rotation, contributed by Joshua Lueng (aligorith)
2006-10-01 16:49:41 +00:00
Tom Musgrove 7e469efd43 ==kkey action column select update==
added constraint key column selection to column selection code, patch by Joshua Leung (aligorith)
2006-10-01 15:55:09 +00:00
Simon Clitherow 4d1a7ef042 Added missing check for 'WITH_BF_INTERNATIONAL'. This fixes loading truetype fonts for text objects. 2006-10-01 12:39:31 +00:00
Brecht Van Lommel dfa01a56ba Fix for bug #5044: random crashes when rendering.
This one is of my own making, removed too many locks. Thanks Malefico for reporting.
2006-09-30 21:29:47 +00:00
Campbell Barton 32b1e2383b 3rd attempt to commit, metaball fixes and small vector optimization 2006-09-30 14:14:49 +00:00
Jens Ole Wund 8e7b403924 new softbody feature:
simple (naive) self collision
estimates a collision ball
using the spring lenght to attached neighbours
(idea stolen from old cloth modifier files, but i'm sure ZAZ and genscher won't mind)
-- usefull for untangeling static cloth like objects
-- may be used for cloth simulation with known limitations
like 'tunnel effect' if objects are moving too fast ...

demo -- volatile files
http://www.wund.homepage.t-online.de/hidden/sb_without_selfcol.avi
http://www.wund.homepage.t-online.de/hidden/sb_with_selfcoll.avi

have fun
BM
2006-09-28 20:27:46 +00:00
Geoffrey Bantle bd6e5d20c7 -> Sanity Check for Selection History
Some operations like edge loop deselect would cause selection history
to become invalid. Added a sanity check to countall() to try and catch
these when they happen.
2006-09-28 02:37:35 +00:00
Geoffrey Bantle b4e97c01ff -> Enter/Exit editmode wait cursor flags
The wait cursor was being called during editmode enter and exit for meshes.
This was a problem for several reasons. First of all, python modules like
Mesh now make use of editmode features. These methods that wrap editmode
tools may be called many times during the execution of a script
and lead to the wait cursor rapidly flickering on and off.

The other problem was that the wait cursor wasn't being called for editmode
enter and exit of all data types. This is unified now.

-New Arguments

enter_editmode() should be passed a nonzero integer or simply EM_WAITCURSOR
if the wait cursor is desired. Currently only the python API passes a '0'
to enter_editmode()

exit_editmode() has several options and they are passed in as the bitflags
EM_FREEDATA, EM_FREEUNDO and EM_WAITCURSOR. These flags are defined in
BDR_editobject.h.
2006-09-28 01:55:44 +00:00
Geoffrey Bantle d86af04e9a -> Add/Delete Scene fix
countall() wasn't being called when scenes were being added/deleted.
This caused the info header to temporarily display incorrect information
about scene statistics.
2006-09-27 23:39:19 +00:00
Brecht Van Lommel 9dce6081c0 Bugfix for a recent commit: live unwrapping behaved badly because
pinned uv charts were being auto rotated, they should just stay fixed.
2006-09-27 19:45:38 +00:00
Campbell Barton 0cd7ee76a4 made fgon edges not draw lengths with length draw option 2006-09-27 18:08:54 +00:00
Campbell Barton ad51edd3bf Adding MDD import and export from patch 4969 with modifications, (import and export rvks, MDD is from lightwave AFAIK)
Added Mesh .key .removeAllKeys() and .insertKey() for MDD support (was using NMesh just for keys before)
Since this is aparently an experemental feature in NMesh we may want to change this.
2006-09-27 16:33:02 +00:00
Jens Ole Wund 2d11fbe192 fix for homegrown bug in softbody rigidity
springs inserted twice caused unreal stiffness in ODEs
-> bad performance killers
2006-09-27 06:59:27 +00:00
Geoffrey Bantle a39ca26700 -> Misspelled tooltip for 'Enable Script Links'
Fixed a minor mispelling in the tooltip, 'and' was written as 'amd'.
2006-09-27 06:40:10 +00:00
Jens Ole Wund d0899c2642 Rigidity only for meshes 2006-09-26 17:16:23 +00:00
Jens Ole Wund d8874df09c New softbody option: adjustable rigidity.
Gives local structure stability for though fabrics, thin steelplates ..
even suzanne gets pretty crash resistant that way.
If non zero it not only adds diagonals but all other "2edge-wide" springs
so it somehow replaces stiff quads for meshes too.
2006-09-26 12:53:57 +00:00
Campbell Barton e6251f6ae7 removed .parent by mistake in Object.c
made some of the importers raise a nice error if a file disnt exist rather then a python error. will eventually apply to all.
2006-09-26 04:39:46 +00:00
Brecht Van Lommel 6587c3c6ba Some UV/Image window changes:
- A new Save image function, next to the existing Save As.
- Shortcut keys Alt+S, Alt+R, Alt+O and Alt+N for Save, Reload, Open
  and New image respectively, consistent with the text editor window.
- Hide Select and UVs menus when UV editing isn't active.
- Removed duplicate and unused code, also moved some functions.
2006-09-25 22:00:52 +00:00
Campbell Barton 65895ba6bd corrected image doc mistake - image.makeCurrent()
BPyRender.imageFromObjectsOrtho() returns an image

Made all image bake scripts ask before overwriting a file. as well as displaying the newly created image once its rendered.
2006-09-25 19:35:43 +00:00
Brecht Van Lommel 7e4f1425b7 Fix for bug #4828: random rotations of uv charts after unwrapping.
This never worked that well, so now after unwrapping, uv charts are
rotated to fit in their smallest enclosing rectangle. This should give
the expected behavior in the most common cases.
2006-09-25 15:40:26 +00:00
Brecht Van Lommel 99c7e3cb9e Last commit broke the smear brush, thanks Jens for spotting this. 2006-09-25 12:30:12 +00:00
Matt Ebb 01e7f02dcd * This should have come along with the proportional edit commit. tsk tsk. 2006-09-25 11:33:53 +00:00
Ton Roosendaal 2662c7ae79 Bugfix #5034
When using new Shadowbuffer option "Auto clip", the clipping planes could
become so narrow that sampling code - using ints - could result in
overflows (sign flip). This especially for small shadow buffers with high
bias values.

This fix adds an extra check in shadow sampling for such overflows.
2006-09-25 09:35:04 +00:00
Matt Ebb aec9f8969c * tweak to outliner line colour 2006-09-25 07:59:50 +00:00
Matt Ebb 6b775741c0 * Gave curve transforms Tilt and Shrink/Fatten a home in the v3d menu 2006-09-25 06:11:16 +00:00
Matt Ebb 2e7aa1dbf5 * Proportional edit mode 'random' falloff
This is another proportional edit falloff that slightly randomises the
influence. It's not strictly random, it's blended with linear falloff so that
it's a bit smoother. The nice thing is that it works with all transforms, axis
locking etc, including the special ones like to sphere, shrink/fatten/etc. It
can be used for all sorts of things like roughening surfaces. I most recently
used it to add a bit of randomness to the folds of some cloth. I
made a short demo video here: http://mke3.net/blender/etc/prop_random-h264.mov

Also included nicer icons for the falloff types.
2006-09-25 05:15:19 +00:00
Alfredo de Greef db7c3d3271 A possible problem was noted by Cyril Brulebois regarding copyright issues
with regards to the noise functions in yafray based on Ken Musgrave's
original code.
I had left the 'Copyright' notice in the comments, and according to
Cyril Brulebois this is a problem. In fact, from what I understand this
makes it even impossible to use or modify the code in other software.
But since it is not a verbatim copy of the code but rather based on Musgrave's
work, he suggested I change it to explicitely state that it is in fact
based on the code from the 'Texturing & Modeling' book.
And since the yafray code is in turn based on the blender code, I better
adapt the blender code too.

This reminded me that I also have forgotten to include the copyright notice
in the mersenne twister rng code I used for the Python Noise module.
This does clearly state to include the original notice with any resdistributed
code, in modified form or not. So I added that too.

I hope that solves the problems.
2006-09-25 04:54:45 +00:00
Matt Ebb 71284959d5 * Added backwards compat check for curve radius value, so old files act properly. 2006-09-25 03:22:54 +00:00
Matt Ebb 7639f0890a * Updated the auto-generated UV test image (Image Editor -> Image -> New). The
previous one was ok as a quick fix during orange and showed distortion obviously
but it was kind of extreme, and I'd rather not be blamed for causing blindness
or brain tumours because of it. This pattern is nicer, and still shows
distortion and its location on the map well.
2006-09-25 03:15:58 +00:00
Brecht Van Lommel ef7200741b Basic pressure sensitivity support in imagepaint, for opacity, size,
falloff and spacing. Click the button labeled "P" next to the sliders.
Works best for opacity, other options can give poor quality strokes in
some cases. Also performance needs to be improved.

Remember, works only on X11 and Mac, no Windows support for tablets yet.
2006-09-24 19:29:25 +00:00
Campbell Barton 7f7f35d1ca fixed mistakes and warnings in previous commit. 2006-09-24 09:21:18 +00:00
Ton Roosendaal f6a6ad5688 New render feature:
If you define multiple RenderLayers with different view-layers, these
view-layers are rendered entirely, not looking at the faces that are
invisible. This allows layered composite, but only when geometry does
not intersect or overlap partially.

This new Renderlayer option "All Z values" will fill in the Z of not
visible faces (in the Scene view-layers) as well, which then allows
masking out as if these faces were set to Material option "Env".

Here's an example composite to show the effect:

Two cubes, in view-layers 1 and 2, and rendered in 2 RenderLayers:
http://www.blender.org/bf/all_z0.jpg

Same scene, but with both RenderLayers set to "All Z values":
http://www.blender.org/bf/all_z.jpg
2006-09-24 09:21:04 +00:00
Campbell Barton e8495d1fdd Extra generic errors for Scene, Groups and Metaballs to raise errors when trying to do anything with a python objects thats had its data removed in Blender.
Added to existing scn.objects
scn.objects.active    (get/set the active object for the scene)

scn.objects.selected    - an iterator that only uses selected objects
scn.objects.context    - an iterator on objects in the user context (visible in the current 3d views layer and selected)
These are the same type as scn.objects but .add() .remove() .new() .active etc raise errors. so scn.objects.selected.add() will raise an error.

Made nested loops possible with scn.objects, metaball.elements and ob.modifiers, by initializing the iter value as NULL and creating copys of the pyobject when _getIter() is called if ->iter is not NULL.
This is how pythons xrange() works.
2006-09-24 08:30:38 +00:00
Geoffrey Bantle e136fe0acb -> Adjustable Tolerance for Knife Vertex Cutting
Previously had Vertex snapping in knife tool adjustable by the 'threshold'
value in the 'Mesh Tools' panel. This was actually a misunderstanding on
my part of a user request (oops). What was really needed was to make the
sensitivity of intersection code for vertex cutting adjustable. Vertex Snap
is now set at same tolerance as vertex selection.
2006-09-24 05:14:29 +00:00
Campbell Barton d728cd1a52 new read only object property to be used for the collada exporter
ob.parentType and a constant dict Blender.Object.ParentTypes
2006-09-23 15:07:03 +00:00
Roland Hess 3c8fe64910 This commit adds backwards compatability for the new floor constraint
feature. Old files that had "sticky" set would not show "sticky" under
the new system. Not that anyone ever actually used "sticky".

Also, these commits only add support for rotated external target objects,
not target bones inside the same armature.
2006-09-22 16:42:39 +00:00
Roland Hess 4725ca6c02 This commit adds local target rotation support to the floor constraint,
making it much more useful. Requested and taunted for frequently by
Plumiferos folks. Click on "Use Rot" to take target object rotations
into account.

Good for using rotated empties, etc., as a sloped floor.
2006-09-22 15:57:58 +00:00
Campbell Barton 3d3b64768d Mesh iterators (me.faces, me.edges, me.verts, face and edge iterator) store the iterator progress in the python object.
This made nested loops with the same python object mess up.
eg-
faces= me.faces
for f1 in faces:
  for f2 in faces:
    print f1.index,f2.index

This didnt work, fixed by initializing the iter value at -1, so any greater value will create a new BPyObject with its own iter value.
once iteration is finished, its set back to -1.

Also made face and edges iter value a char instead of an int to save some memory.
2006-09-22 10:08:41 +00:00
Campbell Barton d82f1f5f91 from looking at patch 4934 made all user preference paths settable with Blender.Set('val', data), also added exception errors which were on the todo.
image.filename was being limited to FILE_MAXDIR rather then FILE_MAXDIR + FILE_MAXFILE when setting.
2006-09-21 18:25:40 +00:00
Campbell Barton 95c185c4c5 Setting the image name was raising an error. 2006-09-21 17:03:24 +00:00
Campbell Barton 3a77b352a4 one liner,
editmode select grouped, face area and perimeter comparing didnt work sometimes, simpler comparison that still scales well
2006-09-21 13:53:32 +00:00
Campbell Barton 78e1426835 removed warning in EXPP_setVec3Clamped 2006-09-20 17:30:47 +00:00
Campbell Barton 27848c8f08 order of case statement was messed up with previous commit. 2006-09-19 10:52:56 +00:00
Geoffrey Bantle e7874b3ff0 ->Knife Midpoint and Vertex Cutting
Cutting through vertices and vertex snap was only supported in
'knife exact' mode. Now works for 'Knife Midpoint' as well.
(Multicut and vertex cutting would require N-Gons)
2006-09-19 00:08:09 +00:00
Ton Roosendaal ab2c57a29d Maximum amount of keys in a ColorBand now is 32.
This is static array stuff... could be dynamic once.
2006-09-18 15:32:11 +00:00
Ton Roosendaal 8e7e7e209a Bugfix #4999 part 2
Sky texture mapping option "Sphere" or "Tube" map now correctly maps to
world space as well, so a camera orientation or mirroring works fine.
2006-09-18 12:53:52 +00:00
Geoffrey Bantle a36377abd9 -> Extrude Vertex Groups
Small fix, extrude did not copy vertex weights.
2006-09-18 05:48:10 +00:00
Campbell Barton 66bc9589a5 Type in docs and element.quat was checking for a vector type. 2006-09-18 02:33:00 +00:00