Commit Graph

6044 Commits

Author SHA1 Message Date
a0547fb6a0 - bug fix: vertex and polygon layers needn't to exist in some situations 2006-09-05 09:28:46 +00:00
cf76410cab Alignment of button "Auto tex space" broke with commit for vertex groups. 2006-09-05 08:38:30 +00:00
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
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
7a3f95f31d Bug #4958
Ipo Window, Shape keys, the colored 'select buttons' were off 1.
2006-09-04 13:05:20 +00:00
46f384a263 Bug #4959
Ipo Window: hotkey for "Join" should be Cltr+J, no J.
2006-09-04 12:48:25 +00:00
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
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
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
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
e2e6bce283 added .sel to pose bones as well as read only .parent property 2006-08-31 09:26:49 +00:00
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
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
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
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
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
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
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
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
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
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
31c341a161 Critical typo identified by a co-worker of Klowner (reported on IRC) 2006-08-29 22:16:34 +00:00
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
4745d01c16 Disabled some unused debugging functions that were causing unnecessary
compile warnings.
2006-08-29 12:49:49 +00:00
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
d0cabce889 added sharp edge to python edge flags 2006-08-29 10:04:10 +00:00
24a2e90f82 Improved tri to quad converting.
added include to poseobject.c
2006-08-29 09:43:38 +00:00
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
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
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
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
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
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
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
b880bffd32 fixed a crash in selecting edges based on face angle with some hidden edges. 2006-08-28 03:14:54 +00:00
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
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
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
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
db88e4c94a Bugfix #4935
July 10 commit accidentally included a testing line for a selection debug
session in IRC... that line saved a /tmp/rt.png file on each border select
in EditMode with 'visible selection' on.
2006-08-27 12:27:21 +00:00
5387532526 Bugfix #4923
Particle distribution error when using Vertex Weights.
In the unlucky case the last face in a Mesh has no weight (zero), the code
that tries to distribute particles evenly accidentally could assign it
still a particle, because of the 'remainder' calculus.

Also only happens in cases where the remainder has a value.
So a workaround is also to increase/decrease amount of particles.
2006-08-27 11:55:32 +00:00
683d0c579d errorin mathutils docs, rowSize not rowsize same with colSize 2006-08-26 16:01:25 +00:00
66bc55e8a6 Added a new iterator type to the scene - scene.objects should eventualy be used in place of scene.getChildren() and linking objects to the scene. 2006-08-26 09:53:26 +00:00
ee302f8693 Metaball wasnt checking the length of any of the input arg lists which resulted in errors in unrelated parts of the script.
Updated the doc too and added a longer example (converting an envalope armature into a meta object)
2006-08-26 07:26:04 +00:00
f479235f8e added tipRadius and headRadius bone properties 2006-08-26 05:40:58 +00:00
b56047a65a Added missing settings to Modifiers (could not set on Render/Cage/Editmode :/)
added GPL header to Group.c
2006-08-26 03:18:55 +00:00
Ken Hughes
69836ce9bc ===Python API===
More additions for Mesh.faces.extend(); allow faces with 2 verts or duplicate
verts to remain in the input list (although they are still not added to the
mesh) so that indexList option can return None for them.  The goal is for all
faces which are discarded to still be ignored but return None.
2006-08-25 16:01:16 +00:00
Ken Hughes
2ee94cbbac ===Python API===
New keyword parameters for Mesh.faces.extend() method:
  * ignoreDups: turns off checks for duplicate faces in the input list and
    existing mesh faces.  Intended for constructing new meshes where the
    faces are known to be unique.
  * indexList: makes the method return a list of new faces indices, which
    can be used to index new faces to add other attributes like color.  If
    duplicate faces are removed, None is placed in their list slot.
2006-08-24 20:02:22 +00:00
Ken Hughes
de762ae555 ===Python API===
Bugfix: Mesh.faces.extend() would incorrectly add duplicate faces in some
circumstances.
2006-08-24 19:28:36 +00:00
Ken Hughes
7fdf88c0fe Bugfix: structure declaration in the middle of code was breaking compilation. 2006-08-23 00:42:48 +00:00