Commit Graph

7800 Commits

Author SHA1 Message Date
Campbell Barton
f17e9a6cb9 resolved invalid bounding box from the object by freeing a new meshes bounding box.
added back bound box constraint to obj import (many OBJs have values outside the defulat clipping range)

BPyRender.py was missing a flag assignment.
2006-09-05 06:45:39 +00:00
Erwin Coumans
ed064df60b fixed bug in contact manifold generation, concave and compound objects require point with deepest penetration. 2006-09-05 04:16:35 +00:00
Tom Musgrove
289105bcd9 ==blender2cal3d update==
unneeded line in the script was keeping it from showing up in the menus
2006-09-04 21:33:02 +00:00
Ton Roosendaal
6f4f4366bc Bug #4949
RVK sliders only worked up to 64 shape keys, above that internal memory
screwed up because it used a static array.
Should really be coded nicer once, until then I've moved the max to 256
and secured code that it doesn't draw sliders beyond 256.
2006-09-04 14:43:31 +00:00
Ton Roosendaal
7a3f95f31d Bug #4958
Ipo Window, Shape keys, the colored 'select buttons' were off 1.
2006-09-04 13:05:20 +00:00
Ton Roosendaal
46f384a263 Bug #4959
Ipo Window: hotkey for "Join" should be Cltr+J, no J.
2006-09-04 12:48:25 +00:00
Campbell Barton
a2b0bca7f7 removing old obj importer 2006-09-04 04:25:24 +00:00
Campbell Barton
ebde667956 rewrite of the obj importer,
The original obj importer was ok but it gradually got slower
as it had to support quirks of rare files.

This importer supports these quirks without bad workarounds and ~250 less lines.

* Moved from NMesh to Mesh
* Import smooth groups as hard edges
* Import Lines from sketchup (Thanks Wavk)
* Uses less memory
* faster (On a 70meg poser test model, benchmarked from 130sec to 41.2sec)

Not yet supported from the old importer-
* Scaling down to a bounding area
* Importing multiple obj's at once
* Using existing materials in the .blend
* Importing as a group instance.
2006-09-04 04:23:55 +00:00
Ton Roosendaal
4603f452c2 Animation department feature request: support for vertex groups in Lattices
In a quick glance: (temp image)
http://www.blender.org/bf/rt.png

Main reason is that Lattices are useful a lot for Armature deformation.
Lattices just provide much more precise and interesting control. However,
with only bone envelopes it's very hard to use.

Working with Lattice vertex groups is nearly identical to Mesh:
- on CTRL+P 'make parent' you can choose the deform option now
- In editmode, the buttons to control vertex groups are available
- In outliner you can select vertexgroups too
- Deforming Lattices with Armatures has all options as for Mesh now.

Note:
- No WeightPaint has been added yet. To compensate, the editmode
  drawing for a Lattice with vertex group shows weight values for the active
  vertex group.
- Lattice editmode doesn't undo/redo weight editing yet.
- Softbody for Lattice still uses own vertex weights

Implementation notes:
- derivedmesh weight_to_rgb() is now exported to drawobject.c
- been doing cleanups in code (order of includes, var declarations, etc)
- weightpaint button handling now is generic

I've checked on Brecht's proposal for Custom Element data;
http://mediawiki.blender.org/index.php/BlenderDev/CustomElementData
It could have been used, but that would mean the existing code for
vertexgroup handling and armature deform couldn't be re-used. I guess this
is really a later todo.
2006-09-03 12:16:14 +00:00
Chris Want
7970da34ed 'Better' cleaning for bullet (trickier to clean than most, since it is two
libraries split among many subdirectories).
2006-09-01 22:00:29 +00:00
Nathan Letwory
5d40740671 * add debug flag so debug symbols are actually created when doing a 'scons BF_DEBUG=1' 2006-09-01 13:04:33 +00:00
Nathan Letwory
ff730aa486 * change Python version from 2.3 to 2.4, since it is a requirement for Blender anyway. Thanks to kalabalik for pointing out. 2006-09-01 07:06:55 +00:00
Brecht Van Lommel
d8b5ddb745 Another struct in struct declartion in SDNA, also causing crashes.
Bug found and solved by Jens, thanks.
2006-08-31 18:03:42 +00:00
Roland Hess
82b40b1fc4 Adds groupTarget get/setters to the NLA API. Takes an object and returns an
object. groupTarget tells the animation system which object within a
dupligroup should be used for NLA. Equivalent to filling in the "target"
field in the NLA N-key panel.

Set groupTarget to None to remove the target.

Also, cleaned up some bad copy and pastes in existing NLA docs.

Also, cleaned up some bad copy and pastes in existing NLA docs.
2006-08-31 16:30:14 +00:00
Ton Roosendaal
32c51f3338 Render feature request:
Auto-clip Lamp Buffer

Setting a good range for clipping start/end for Lamp buffers is important
for good quality shadow (depth details). That can be quite a hassle, when
many lamps or animated objects are involved.

This option allows to have the clipping range calculated based on the
visible vertices in the spotbundle. For clip start and clip end it can
be set individually. Typically the clip start defines quality most.

The shadow buffer 'bias' value is corrected for this automatic clipping
too, to ensure that ranges that differ give same biasing appearance.
(If this wasn't done, you would see lighted areas become darker or
lighter, or even artefacts, when the range changes suddenly

NOTE: since it only checks for vertices, be aware that large planes can
give errors.

Implementation note: zbuffer values are non-linear (1/z) because that
allows linear interpolation while filling scanlines. That's the main
reason for the precision to be highest close to the eye (or lamp).
It's even a useful feature, since you want details to be precise
when they're closeby.
Since these values are also in the -1 to 1 range, using floats here
wouldn't solve problems a lot. Maybe trying a 64 bits Z once might
be an interesting coding job.
2006-08-31 10:36:45 +00:00
Campbell Barton
e2e6bce283 added .sel to pose bones as well as read only .parent property 2006-08-31 09:26:49 +00:00
Campbell Barton
ab5cc740d6 added the option to draw sharp edges.
had to make some room in the "Mesh Tools 1" panel,
removed "Center" - its alredy in the "Mesh Tools" panel, and grouped the "Normal" draw buttons.
At the moment mixing modes dosnt work, we will need to review this to see if its worth attempting.
2006-08-31 06:03:24 +00:00
Erwin Coumans
5c24f4a989 updated aabb calculation 2006-08-30 22:35:03 +00:00
Ken Hughes
b4717d93a4 ===Python API===
Fix uninitialized pointer bug in ActionStrips.remove(), caused by too zealous
code optimization and insufficnet gcc warning flags.  Thanks to Roland for
catching it.
2006-08-30 21:45:27 +00:00
Roland Hess
20818be156 Adds toggle to Object API for enabling NLA animation versus active Action
animation. Object.enableNLAOverride=True sets to use NLA;
Object.enableNLAOverride=False sets to use active Action;
status=Object.enableNLAOverride shows current status
2006-08-30 15:22:19 +00:00
Ben Batt
090a010988 Fix for a bug where the Array modifier would freeze if it was set to "Fit To
Curve Length" or "Fixed Count" and the base mesh was scaled to 0 in edit mode
(could also happen while entering a numerical scale value like 0.25).

The problem was that the dist value could be almost 0, leading to a
ridiculously large duplicate count which would then cause memory allocation
to fail and the array modifier to get stuck in an almost infinite loop trying
to calculate the offset of the final copy. This commit fixes the problem
by checking that dist is greater than FLT_EPSILON before continuing.
2006-08-30 11:10:04 +00:00
Jiri Hnidek
cc6f92cb1a - bug fix: mesh object is created corectly after unsubscribing from
geometry node
 - merged patch from Ben Batt, subsurf modifier still doesn't work ...
    I will add list of edges to VGeomData structure
 - added some missing derivedmesh methods after merging of ben's gsoc
   projects
2006-08-30 10:55:46 +00:00
Ton Roosendaal
03bab43951 Fix for Brecht's commit to include the active Brush in ToolSettings, seems
to cause crashes on loading files.

Struct toolsettings was defined with a struct definition inside of a struct
definition... something I'm pretty sure our SNDA doesn't have support for.
2006-08-30 10:43:51 +00:00
Ben Batt
f5e6f59dba Fixed a bug where applying a modifier to a Curve or Surface object did not
remove the modifier.
2006-08-30 09:23:36 +00:00
Jens Ole Wund
653a35b267 msvc6 still builds :) 2006-08-30 07:43:54 +00:00
Ben Batt
74e2b9810b Fix for bug #4912: Interface freeze with scaling object with subsurf + array
modifier.

The bug was caused by an endless loop in the Array modifier's calc_mapping
function. The loop worked under the assumption that there could not be sets
of vertices such that (for example) vertex A merges with vertex B and vertex
B merges with vertex A. As it turns out, this situation is possible, so the
loop got stuck going from A to B to A to B ad infinitum.

This commit fixes the problem by limiting the number of loop iterations with
the copy number for which the mapping is being calculated. This should also
give more correct results in general.
2006-08-30 07:35:19 +00:00
Ben Batt
3a4e9d5946 My modifier stack commit broke weightpaint display for meshes with TFace
data, due to the temporary "Weight-coloured" TFace data being replaced by
the original before displaying. This commit fixes that by changing the type
of DerivedMesh calculated by mesh_calc_modifiers when no non-deforming
modifiers are applied from MeshDerivedMesh (which depends on the original
Mesh) to CDDerivedMesh (which doesn't depend on the original Mesh).
2006-08-30 03:05:30 +00:00
Erwin Coumans
bf49ff5050 Got a license from Intel for VTune, thanks! First performance analysis showed unexpected slowdown due to island management. Added path-compression to UnionFind, and iterate just over island-id's, rather then all objects, when filling islands. 2006-08-29 23:27:27 +00:00
Ken Hughes
069d8c45dc Possible bugfix: change on Aug 20th added this code to filesel.c:
if (!G.relbase_valid) {
    okee("You have to save the .blend file before using relative paths! Using absolute path instead.");
    sfile->flag & ~FILE_STRINGCODE;
  }

I assume the code should read:

    sfile->flag &= ~FILE_STRINGCODE;

Andrea: please double-check.
2006-08-29 23:24:57 +00:00
Campbell Barton
9eae6278fc Silly mistake, made adding edges raise an exception. 2006-08-29 23:05:13 +00:00
Chris Burt
31c341a161 Critical typo identified by a co-worker of Klowner (reported on IRC) 2006-08-29 22:16:34 +00:00
Ton Roosendaal
e0ec517d72 Patch #4199 (by David Millán, rewritte though)
Compositor: Rotate Node
It only delivers RGBA buffers for now. Also Image size is unaltered, so
parts get cropped away. Doesn't work with translation Node before this
node yet.
2006-08-29 14:32:06 +00:00
Ben Batt
4745d01c16 Disabled some unused debugging functions that were causing unnecessary
compile warnings.
2006-08-29 12:49:49 +00:00
Ton Roosendaal
7bec4dba41 Recoded version of patch #4273, submitted by Daniel Genrich
This provides a weight-paint option that only paints on vertices that have
already the weight-group assigned before. The default adds weights on all
vertices painted on.

Fixes in patch include:
- much less code
- also support for 'filter' mode
- proper code styling
2006-08-29 10:27:48 +00:00
Campbell Barton
d0cabce889 added sharp edge to python edge flags 2006-08-29 10:04:10 +00:00
Campbell Barton
24a2e90f82 Improved tri to quad converting.
added include to poseobject.c
2006-08-29 09:43:38 +00:00
Campbell Barton
0648d0d13a Commented out user incrementing while linking to a scene while testing that I forgot to remove.
also shut GCC // comments to /**/
2006-08-29 06:04:10 +00:00
Ben Batt
542ea1ca4c Changed the Displace modifier to calculate the intensity of a texture from
RGB values if they are returned by the texture function. This fixes an issue
reported by several people where Image textures gave no displacement unless
CalcAlpha was turned on.
2006-08-29 00:50:00 +00:00
Ben Batt
12a732fc20 Added a VGroup input to the Armature modifier. This allows the user to specify
a vertex group which will modulate the influence of all bones in the armature.

This commit also tidies up the height of the modifier panels; they should all
have the same size margin now.
2006-08-28 21:56:58 +00:00
Ben Batt
dd8c56e077 Added a BKE_bad_level_calls.h stub for NewBooleanDerivedMesh(). This fixes the
"undefined reference to NewBooleanDerivedMesh" error when building with make
(reported on IRC by Desoto, confirmed by Genscher2).
2006-08-28 16:22:55 +00:00
Campbell Barton
c435decb31 old patch for palifimos guys, extra options to selects which constraints to copy with the pose bones. 2006-08-28 13:53:45 +00:00
Ton Roosendaal
dba6769b2e bugfix #4812
Quicktime reading for Macs: code that converted ARGB to RGBA was endian
sensitive. Didn't work for Mac intel systems.
2006-08-28 09:30:33 +00:00
Nathan Letwory
9123507c2e Patch #4043 Bullet scons fix (Joseph Eagar, aka joeedh)
* This is a simplified SConscript for Bullet building. It should keep itself better
 up-to-date since it uses env.Glob(). Tested to work on Linux and Windows (both mingw and vc)

/Nathan
2006-08-28 08:52:39 +00:00
Erwin Coumans
6ce5d97c56 upgraded Bullet rigidbody physics to latest version 1.9 2006-08-28 06:44:29 +00:00
Ken Hughes
81d7cd967d ===Python API===
New API for accessing surface data (SurbNurb type).  Right now it's hooked in
through the Curve API, since Curve.Get() doesn't differentiate between curves
and surfaces.  If the curve object is 2D (pntsv > 1), the SurfNurb object is
created.

It is similar to the CurNurb type but not identical.  There are only
attributes and no methods yet, and the only methods which will be added are
the non-getStuff/setStuff kind.  Read the documentation to see how it works
(sorry, no examples yet).

This is a work in progress.  Don't be surprised if the API changes some more.
2006-08-28 04:44:16 +00:00
Campbell Barton
b880bffd32 fixed a crash in selecting edges based on face angle with some hidden edges. 2006-08-28 03:14:54 +00:00
Ben Batt
433f6c7043 Integration of the Google Summer of Code Modifier Stack Upgrade project. The
main features are:
* Modifiers can now be in any order in the modifier stack
* DerivedMesh now has a standard framework for custom element data to be passed
  through the stack with mesh data (being copied and interpolated as
  appropriate), so modifiers can access whatever data they need
* The modifier stack code has been refactored and a number of bugs have been
  removed
* The EdgeSplit modifier has been added:
  http://mediawiki.blender.org/index.php/BlenderDev/EdgeSplitModifier
* The DerivedMesh modifier has been added:
  http://mediawiki.blender.org/index.php/BlenderDev/DisplaceModifier
* The UVProject modifier has been added:
  http://mediawiki.blender.org/index.php/BlenderDev/UVProjectModifier

For more info, see:
http://mediawiki.blender.org/index.php/User:Artificer/ModifierStackUpgrade
(currently undergoing reorganisation)
2006-08-28 01:12:36 +00:00
Campbell Barton
5dbc4c5f8f Added scn.objects.new(obbdata) as a way of adding object data to a scene and createing the object data at once.
This functionality will probably be moved later on after discussion.
2006-08-27 16:27:34 +00:00
Brecht Van Lommel
b39f4b788d Texturepaint now supports all the imagepaint brush settings, with the
exception of the clone tool.

One level undo for image- and texturepaint, only storing those tiles
that changed.

Test to improve texturepaint performance using glTexSubImage2D, only
enabled with 2^n sized textures and mipmapping off. Painting a 2048x2048
texture is then pretty smooth here, as long as the geometry is not too
complex.
2006-08-27 13:29:00 +00:00
Brecht Van Lommel
84205fe0e0 Bugfix: selection in the sequencer with RMB emulation on Mac OS X
always worked as if shift was pressed.
2006-08-27 13:03:23 +00:00