Commit Graph

8700 Commits

Author SHA1 Message Date
Joshua Leung
909eefd46e This might fix some of the problems encountered compiling with blenderplayer or so. 2007-08-19 01:56:31 +00:00
Ken Hughes
b5b39e177a Undefined reference to subtarget in last PyConstraint commit:
https://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11653

I think this commit make it do what it was intended to, but Joshua should
recheck this ASAP.
2007-08-19 00:12:34 +00:00
Joshua Leung
982d45162b == PyConstraints ==
I've added the ability for PyConstraints to define a function (doDriver) that is able to directly modify values of the owner/target, so that certain setups can be created reliably. Users should take note that this is against the basic concept of what a constraint does, and that under no circumstances may they set the values of any variables controlling the transforms. For more details, check out the information in the PyConstraint template script.

I've also updated PyConstraints to be aware of geometry targets. The script template has been updated with this information.
2007-08-18 06:17:50 +00:00
Joshua Leung
373ac35c71 == Constraints - Geometry Targets Improvements ==
This commit features fixes/improvements for problems I didn't manage to fix in time for the commit yesterday.

* Now for Meshes, the normals of the vertices in the VertexGroup are averaged and used to find the 'rotation' that needs to be applied. Unfortunately, this does not work with Lattices as they do not have normals.
* Depsgraph should now play nicely with geometry targets. Before, the constrained object's location wasn't being updated after the target's geometry was modified.
2007-08-18 04:03:03 +00:00
Stephen Swaney
7e7c2fd31b New command line switch --
Add a new command line switch "--" for passing arguments to scripts.
Any arguments after -- are not processed and passed unchanged via
the usual argv mechanism.

Custom arguments can be accessed from a bpy script in python's 
sys.argv.  Example:

import sys

# slice argv after '--'
i = sys.argv.index('--')
my_args = sys.argv[i+1:]
2007-08-18 00:02:50 +00:00
Stephen Swaney
7f3b967c30 fix warning: initialization makes integer from pointer without a cast 2007-08-17 13:53:09 +00:00
Joshua Leung
400d77bbe2 == Constraints - Geometry Targets ==
It is now possible to use the geometry of Meshes and/or Lattices as the target of a constraint. All you need to do, is to create a new Vertex-Group and assign all the points that you wish to use as the target, then type that name into the VG: field for the relevant constraints.

One of the cases where this is beneficial is when you need to copy the location of a vertex. Now you don't need to make extra vertex-parents for that.

Additional Notes:
* The code takes the average of the locations of the nominated vertices, and puts that in world-space for constraint solving (and regular space-conversion stuff).
* Currently, rotation and scaling of points is not taken into account. The rotation/scaling used is from the object's matrix. Hopefully, this will only be a temporary problem (will be fixed soon)
2007-08-17 11:23:48 +00:00
Campbell Barton
4d884c0fbf this broke on some compilers 2007-08-17 07:14:36 +00:00
Campbell Barton
5a9d5a8ce7 material leak fix from stable tree 2007-08-16 12:55:40 +00:00
Joshua Leung
c78e6d987b Fix for 'undefined function' compiler warning in poseobject.c, introduced by Brecht's cool heat-skinning stuff. 2007-08-15 10:38:46 +00:00
Joshua Leung
0cc2de1b37 == Action Editor Bugfixes (BugReport #7049) ==
This commit fixes several issues related to using the Action Editor with Shapekeys. I've known about most of them for a while, so now's the time to fix that.

1) When the shapekey anim data for an object comes from an Action (key's IPO block is linked to the "Shape" action-channel), the names of the individual shapekeys is now shown. They will only do so if the Action Editor is not pinned though.

2) Slider limits for the case described above should now be sane again

3) "Add New" option from the popup menu in the Action Editor header will now convert shapekey animation data from IPO to Action if the action editor is displaying Shapekey data at the time. Many users have often found the old way of having to toggle the "running man" in the IPO-editor header, too clumsy and confusing.
2007-08-15 10:04:45 +00:00
Joshua Leung
0b562ae340 == Child-Of Constraint ==
Now 'Set Inverse' works correctly for PoseChannels in all cases. Previously, it was still using a temporary hack that failed when 'parent' bone had any transforms.
2007-08-15 04:59:46 +00:00
Joshua Leung
6ab51ef2d7 Removed useless check from outliner searching code...
This fixes the following compiler warning - 
source/blender/src/outliner.c:2242: warning: the address of 'name' will always evaluate as 'true'
2007-08-14 12:17:46 +00:00
Joshua Leung
7d93e1ec2f constraint_mat_convertspace is now no longer static/private to constraint.c 2007-08-14 11:19:35 +00:00
Joshua Leung
35bc7079e3 Whitespace commit in constraints code. 2007-08-14 11:16:11 +00:00
Joshua Leung
27806f37d5 Bugfix - Transform Properties (ParBone):
Editing the value of the ParBone field in the Transform Properties panel was not stable. The problem seems to have been buffer-overflow type problems caused by maximum character limit that was set too high.

I've also added auto-complete functionality for this field while I was tinkering around there.
2007-08-14 11:14:00 +00:00
Campbell Barton
61f4d6ae4d added bone comparison for the python api 2007-08-14 06:38:44 +00:00
Campbell Barton
03d4cd1240 superficial changes, button alignment and minor tooltip changes. sculpt mode moved the ParBone button when it didnt need to. 2007-08-14 05:01:39 +00:00
Matt Ebb
5c1335a4a5 Fix for bug #7406 'Compositor Crash'
Previously when deleting a scene, no checks were made to see if 
any render layer nodes in other scenes were referencing them,
leaving them pointing to bad memory. Now, this checks all other
scenes' nodetrees and sets pointers to the to-be-deleted scene to
NULL, which gets taken care of elsewhere.
2007-08-14 04:38:31 +00:00
Matt Ebb
149d4ab4de Added selection by similar edge seams and sharpness to the "Select
Similar" menu (Shift G). Also did some tweaking in there to make 
the menu a bit more sensible.
2007-08-13 23:25:15 +00:00
Nicholas Bishop
d098c61bd2 == Multires ==
Partial fix for bug #7013, adding multires removes all vertex color layers

* Added a warning when adding multires levels to a mesh with more than one vcol layer. The user can choose to allow multires to delete the non-active layer(s), or cancel.

Note that this is a temporary fix; a better solution will be to make multiple vcol layers work with multires.
2007-08-13 21:08:52 +00:00
Campbell Barton
cb79780abe added a 2 error messages when the user tries to join objects that dont support joining and when there is no active object 2007-08-13 14:52:17 +00:00
Nicholas Bishop
bbb1f26b9c == Sculpt Mode ==
Fixed bug reported here:
http://blenderartists.org/forum/showthread.php?t=102975

* Removed an opengl texture attribute change used while drawing the propset sculpt brush; was causing model shading to disappear on textured models.
2007-08-13 01:01:32 +00:00
Campbell Barton
bbe4f83de2 only draw the xor line when the mouse moves (border moving).
This is the only thing that made software GL unuseable, and would even hang blender when using some debugging tools.
The lag was noticibel on some cheap graphics cards also.

There is a problem with blenders events that means the mouse movement events are sent while the mouse button release event isnt for some time. This could make resizing a border take a fairly long time... 4-10sec.
even though this is a workaround, only redrawing when the mouse is moved is logical.
2007-08-12 08:10:26 +00:00
Joshua Leung
33e4972cdb Action Editor - Code Cleanups:
* I've replaced the long lists of #defines in header_action.c with enums, which should make that easier to maintain/add new items as needed.
* Added a few comments also
2007-08-12 07:30:11 +00:00
Campbell Barton
fb985daf01 move mesh_vgroup_average to the weightpaint menu and rename. also added an option to add the active weight group or all groups.
- fix from 2.44 so makeDisplayList updates 3d text
2007-08-12 06:14:33 +00:00
Diego Borghetti
c8332ccff1 Fix compiler warning.
bb and mselect are different struct, gcc warning about assignment
incompatible pointer.
2007-08-11 20:45:27 +00:00
Campbell Barton
bd5e0a9246 when applying size/rotation the envelope and bone radius wasnt being scaled. 2007-08-11 12:58:35 +00:00
Joshua Leung
bd1db95452 Restoring a part of BeBraw's patch that I removed before committing as it didn't seem to be working at the time. 2007-08-11 12:09:09 +00:00
Joshua Leung
4294de8610 Patch #7035 by Juho Vepsalainen (bebraw):
Multiple selected bones are now able to be parented to the active bone in EditMode. Previously, only one selected bone could be parented to another at a time.
2007-08-11 11:50:31 +00:00
Joshua Leung
e8668988a3 == Action Editor - Time Stuff for Tools ==
Part 2 of work from yesterday. Now tools in Action Editor are aware of (work well) with time display in seconds as well.
2007-08-11 09:20:56 +00:00
Joshua Leung
0f3af56e26 Changed a few comments for Action Editor flags. 2007-08-10 12:12:00 +00:00
Joshua Leung
246e675b60 == Action Editor - Time Display ==
The Action Editor can now display timing in seconds too. By default, it still displays timing in frames, but it is possible to switch the time display to seconds.

The hotkey to toggle this is  Ctrl T.

Notes:
- Many of the Action Editor's tools have yet to be made aware of this. Therefore, they will still work as though frames are used. Only Transform, Snap, and Mirror should really be affected. This will be fixed when I wake up.
- Nothing *should* be broken, but I might have missed something.
2007-08-10 12:10:03 +00:00
Campbell Barton
9776f489e6 Mesh.c - getVertFromGroup ~25% speedup.
export_fbx.py - initial support for bones applied to weighted meshes.
2007-08-09 13:34:44 +00:00
Joshua Leung
c66acd3c9a Bugfix:
Made inserting new keyframes use a coarser threshold for determining when to replace existing keyframes with new ones. Now, it shouldn't create so many keyframes stacked on top of each other, but yet still keep some bizzare cases working.
2007-08-09 09:09:25 +00:00
Martin Poirier
9e32291a75 Small Transform code cleanup and addins for future features.
- Removing evil InitTransModeFlags (I would always forget to update that when adding new stuff). It's properly done in the per transform init now.
- Add toggleable mode for Shear (with MMB) for horizontal or vertical shear. Toggle shear mode also changes the input mode from vertical to horizontal and vice versa (it's intuitiver that way). (This was suggested in a really old patch but never implemented because I disliked adding transform specific handling in the main event switch).
- Add custom event handlers per transform (currently only used for Shear)
- Add custom data pointer and freeing flag (only (a)bused by Shear).

NOTE to Levi Schooley: Some stuff in there might be useful for you.
2007-08-09 01:07:27 +00:00
Joshua Leung
5f5b35889b Added comments documenting a few variables in the DNA_curve_types.h structs 2007-08-08 07:14:27 +00:00
Joshua Leung
4d6eb37676 == Snap Cursor to Selected -> EditMode Bones ==
After complaints from wavez, Snap Cursor to Selected for Bones in EditMode now results in the cursor being snapped to the midpoint of the selected joint(s) like it did before my no zero-length bones commit.
2007-08-08 07:00:20 +00:00
Joshua Leung
17ff9acac9 Bugfix #7019: Mirror Function for IPO curves gives strange results
This problem was resulted from the handles on keyframes not being mirrored as well. I thought that the handle resetting function would solve that, but obviously it didn't.
2007-08-08 06:36:23 +00:00
Kent Mein
38ec778cb7 This should fix up saving a blender runtime.
If you look at the log, the last change to this file I was trying to fix
game engine bug #6667.  In so doing I added a print usage if you do not
pass any arguments to the gameplayer.

Things should work better now.

Kent
2007-08-07 16:34:45 +00:00
Campbell Barton
2807d82e90 getVertsFromGroup was vaguely documented 2007-08-07 13:20:46 +00:00
Joshua Leung
44e0306562 == IPO Cleaning - Refactor ==
I've finally come to the conclusion that the old code used to clean up IPO-curves was utterly unsafe/unstable. It used to have a lot of memory-related bugs early on, which I had resolved, but still I found a file where this broke quite badly (thanks Cessen).

Now the code should be saner, as it does away with that evil memory copying that seems to be at fault. It would be advisable to have this properly tested for a few days before considering it for inclusion in 2.45 (stable) branch.
2007-08-07 11:26:39 +00:00
Kent Mein
2e6fd021b8 Added include path ../include
reported by Melchior FRANZ.

Kent
2007-08-06 15:32:21 +00:00
Brecht Van Lommel
fbb6a133df Bugfix:
Crazyspace correction for quaternion deform interpolation was broken.
2007-08-06 14:32:10 +00:00
Ken Hughes
6af121b407 Fix minor typo in error messages for Mathutils.DotVecs(), reported on python ML. 2007-08-06 14:27:08 +00:00
Joshua Leung
e3fd45abe1 == Preview Range Bugfix ==
Preview Range could get set with frame numbers less than 1. This caused problems with playback in a few cases, and also gave gibblish in the counter-cursor thing.
2007-08-06 07:13:34 +00:00
Brecht Van Lommel
b3655aeac6 Fix for bug #6977:
Drawing float images with the tiles option crashed.
2007-08-06 00:51:17 +00:00
Brecht Van Lommel
2b9f61a8da Fix for bug #6604:
Texture painting location was not accurate in perspective mode.
2007-08-06 00:38:29 +00:00
Peter Schlaile
cb7e393307 == Sequencer ==
This fixes [#6996] Sequence Nesting and enables sequence nesting for the
first time :)

The old hack done by Ton prevented eternal loops by preventing Sequence
tracks being added to Sequence scenes.

We now disable "Do sequence" temporarily for the _current_ scene, which
has the same effect but leaves the possibility of sequence nesting 
untouched.

Also fixes a warning in editseq (uninitialized variable).
2007-08-05 19:13:34 +00:00
Peter Schlaile
ad4e54c20c == Sequencer ==
This fixes [#6876] snapping to current frame crashes when one end of strip selected.

Some null checks were missing, that made generator strips fail...
2007-08-05 18:53:41 +00:00