Commit Graph

8726 Commits

Author SHA1 Message Date
Campbell Barton
e7a2a175df getting the armature twice would cause a weakref error and crash after 2-4 runs..
data = arm_ob.data
bones = arm_ob.data.bones.values()

Fixed by returning existing armatures if they exist in the weakref list. tested with FBX and BVH support.
2007-08-25 19:05:18 +00:00
Stephen Swaney
45262987fc correct tooltip: startingspeed => starting speed
Noticed by mjordan.
2007-08-24 18:12:07 +00:00
Joshua Leung
6ab498defc Several Minor Fixes:
* Grouped Up/Down buttons in constraint panel headers, and fixed their tooltips
* Removed unused variable from action editor code
* Minor formatting in constraint.c
2007-08-23 09:42:21 +00:00
Joshua Leung
866218eb15 Fix for a compiler warning caused by one of my commits yesterday. 2007-08-23 09:37:58 +00:00
Joshua Leung
6cd036ed44 Bugfix #7091: "blender crashes when i put a constraint between two armatures"
This crash only occurred when the RigidBody constraint was used, and the toObject field was set to an armature, as the RigidBody constraint doesn't use subtargets.
2007-08-23 06:25:45 +00:00
Kent Mein
3e7fc6145f Added a couple of missing stubs to clean up some warnings...
Kent
2007-08-22 18:34:47 +00:00
Joshua Leung
f237a466c1 Minor Code Cleanup (ShapeKeys):
Added a new API method for ShapeKeys, which is useful for finding a certain KeyBlock from a Key.
2007-08-22 10:07:42 +00:00
Joshua Leung
59016f9f5d Bugfix #7083:
The menu entries for changing Interpolation and Extrapolation modes in the Action Editor weren't working properly (at all).
2007-08-22 08:52:57 +00:00
Juho Vepsalainen
941ee4139e Autocompletion to Geometry input node:
This commit adds autocompletion and "red alert" feature to text input
fields (UV and VCol) of the Geometry material input node. The functionality
is similar to one found in UV part of the "Map Input" panel found in Material
buttons context of the Buttons Window.
2007-08-22 06:26:37 +00:00
Campbell Barton
567e634253 obj export had the overwrite confirmation commented out from testing, UIBlock needed to clear the events so tooltips show. 2007-08-21 19:37:03 +00:00
Matt Ebb
63a801c21d * Curve tilt interpolation types
Just a quickie feature I needed here at work- the previous linear 
interpolation of tilt in curves can give nasty pinching problems 
when trying to do flowing curves like a ribbon. This commit lets 
you choose the interpolation type, between Linear, Cardinal, and 
BSpline. The code was already set up for it pretty easily, mainly 
needed to make the choice visible to the user.

Example:
http://mke3.net/blender/devel/etc/tilt_interp_types.png

Works on selected curve 'lines', menu in 'curve tools' panel in
edit mode.
2007-08-21 01:57:15 +00:00
Brecht Van Lommel
8a46c006d6 Add "View Selected" in the IPO editor
- Numpad dot is shortcut key, same as in other windows.

(Peach feature request)
2007-08-20 17:50:04 +00:00
Juho Vepsalainen
b697f19cf8 Added missing node file:
This commit adds the file missing in previous one.
2007-08-20 11:24:05 +00:00
Juho Vepsalainen
c3b1877b4f "Combine RGB" and "Separate RGB" material nodes:
These nodes allow the user to separate and combine RGB color channels
as in the composite node editor. However they don't contain Alpha
channel as it is treated separately in case of material nodes.
"Combine RGB" allows the user to use values beyond standard float range 
([0.0, 1.0]) if value input node is used to feed the value to it.
2007-08-20 11:05:14 +00:00
Campbell Barton
e8c39a5864 added face sorting to mesh so you can do mesh.faces.sort(...)
uses list sorting internally so is exactly the same as list sorting.
2007-08-20 10:08:59 +00:00
Campbell Barton
196a3e4104 VRML and DXF were saving all meshes that had at least one user - so all meshes in other scenes, and meshes without object users like textmesh.
used the flag LIB_DOIT to tag meshes used in the current scene and only write those.
2007-08-20 08:40:14 +00:00
Matt Ebb
bb10ba9449 * Updated the max particle amount to 1 million. I've been using it
here for a while and it's been fine - I'm pretty sure it's safe, as
long as you've got enough RAM :)
2007-08-20 03:03:34 +00:00
Matt Ebb
e6838ec5b0 * Change to the working of the left mouse select preference
Previously, the implementation of this was quite awkward, with
the preference swapping mouse buttons globally, rather than just 
selection, as is advertised on the pref. This had the effect of 
changing the painting in sculpt/texture paint/weight paint/etc to 
the left mouse button. This was totally silly, since when using a 
tablet, left mouse select is the sane way to go, but it meant 
that every time you wanted to sculpt or paint, you had to switch 
the mouse buttons around so you could actually use the tablet as 
normal.

This commit fixes that, and makes the preference do just what it 
says, use left mouse for selection (i.e. in object/edit mode) and 
only that.
2007-08-20 01:32:15 +00:00
Matt Ebb
21c567854a Patch #6770 by James C (sheep)
Tooltip getStringSize and getBoundingBox correction

Not really any user-visible changes here, but a nice clean-up of 
internal font drawing functions, in this case used in tooltips.

Thanks!
2007-08-20 01:02:12 +00:00
Matt Ebb
6dda54c92d patch #6795 by James C (sheep):
This converts the Ipo editor and Timeline windows to use the BIF_ 
API for drawing international/antialiased text, following the user 
preference or being drawn in Bitmap/Pixmap/Texture mode.

Thanks James!
2007-08-19 23:47:14 +00:00
Campbell Barton
2866dde90a aparently mingw was still having problems, fixed this properly by using PyType_Ready, this needed some changes to the PyType to work. 2007-08-19 19:06:42 +00:00
Joilnen Leite
33ff540952 fix the mute ipo icon 2007-08-19 16:20:16 +00:00
Andrea Weikert
b1c47f4159 - fix for missing include dir in MSVC 7 project files
- small warning fix for unreferenced variable.
2007-08-19 11:15:33 +00:00
Joshua Leung
dbef15f99e Bugfix #7051: Stars' preview doesn't update in real time.
Added a new event code (B_WORLDPRV2) that forces an update of the world buttons-window preview AND the 3d-view, instead of having only one of the two getting updated (with REDRAWVIEW3D or REDRAWBUTSSHADING)
2007-08-19 06:13:19 +00:00
Joshua Leung
242413fa57 == Action Editor - Borderselect ==
This commit restores a few useful borderselect tools:
* When borderselect is activated while the mouse cursor is in the horizontal scrollbar, all the keyframes in that occur in the range of frames encompassed by the border get selected.
* When borderselect is activated while the mouse cursor is in the vertical scrollbar, all the keyframes, that occur in the channels that are within the border get selected.
2007-08-19 04:41:22 +00:00
Joshua Leung
be831dab1b Action Editor Bugfixes:
* Insert Key (IKEY) menu was inserting keyframes on all channels when menu was dismissed, instead of not doing anything
* Clean IPO and Insert Key now only work on selected channels (when asked to). Was a missing line of code.
2007-08-19 03:29:51 +00:00
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