Commit Graph

10273 Commits

Author SHA1 Message Date
Joshua Leung
3d0feeb471 Just a few little code cleanups for IPO cleaning code:
* Replaced magic numbers (3rd argument for memcpy functions) with sizeof(float)*2 just to be safe, in case some weirdo compiler out there doesn't like them.
* Made a few comments a bit more descriptive
2007-07-22 10:54:00 +00:00
Campbell Barton
89792eb7ee fixed some bugs in Draw.c
* incorrect args to Draw.Create() would crash blender because it wasnt deallocating the value properly.
* deallocation of an uninitialized button could also try and free uninitialized memory if the type happened to be a STRING.
* removed the unused tooltip pointer from teh Draw.h's Button struct.
2007-07-21 23:24:08 +00:00
Joshua Leung
74ca178199 == Transformation Constraint ==
This commit adds a new constraint to Blender: the Transformation Constraint. This constraint gives you more freedom to choose how transforms are copied from one object/bone to another object/bone. 

You can assign the Loc/Rot/Scale channels of a source to the Loc/Rot/Scale channels of a destination, specifying the range of motion (per axis) from the source to consider, and the range of motion (per axis) that will be applied to the destination. Also, for each destination axis, you can choose which of the source axes to copy from. 

A similar constraint was coded by Jason Blary (snark), as Patch #4991. This constraint is basically rewritten from scratch, although there are some elements of the original patch which may be borrowed in future.

Various notes:
* PyAPI access has been coded. 
* Space conversion is also enabled for this constraint.
* Also the useless get_constraint_col function has been removed
* Doing a rotation copy with a ratio that is not 1:1 doesn't always work correctly yet (like for the Copy Rotation constraint).
2007-07-21 07:26:15 +00:00
Campbell Barton
c924fc542b fix for Curve appendNurb 2007-07-21 03:54:20 +00:00
Campbell Barton
f8a1397b67 removing 2 getset duplicates 2007-07-20 02:23:55 +00:00
Campbell Barton
6e0d977977 Use texture constants in the interface and added some missing texture constants. 2007-07-19 22:02:22 +00:00
Campbell Barton
a114f8f17a was missing header 2007-07-19 14:28:57 +00:00
Campbell Barton
b903864aa5 removing duplicate constants 2007-07-19 12:29:28 +00:00
Joshua Leung
ecaafbb70c == SDNA - Code Comments ==
Added a few comments about various Animation-System Related structs. Hopefully, these will be helpful for people trying to get familiar with the code.
2007-07-19 11:46:37 +00:00
Campbell Barton
6789b8fd82 added commends to some DNA_*.h files - as well as some TODO's for removal.
header_view3d.c was doign an implicit declaration also.
2007-07-19 00:42:01 +00:00
Joseph Eagar
29c1727e88 =Shapekey Missing Undopush bugfix=
Added some missing undo pushes in editkey.c.  Now when you add/delete
shapekeys, you can do undo and actually have it undo adding/deleting the
shade keys.
2007-07-18 15:22:42 +00:00
Joshua Leung
ff6c3dd0ae == Constraints Work - PyAPI ==
A few tweaks to documentation and implementation of PyAPI access for constraints following Constraints recode. Just doing a little bit of cleanup.
2007-07-17 12:03:17 +00:00
Joshua Leung
1b0c72c3e5 Removed a variable that wasn't needed, but somehow ended up in the commit the other day. 2007-07-17 11:51:11 +00:00
Diego Borghetti
7fc4306cf2 Small fix: need set the color before call glRasterPos or don't work. 2007-07-16 19:04:42 +00:00
Joshua Leung
9fc66d5ce5 Bugfix #6831: Crash when combining duplivert and mirror
I've added checks which should prevent crashes in this case. Sometimes vertex_dupli__mapFunc is called with no_f being NULL, but no_s should not be NULL in those cases.
2007-07-16 12:20:57 +00:00
Jiri Hnidek
ee593409e3 updated scons build system, neccesary after erwin's commit 2007-07-16 09:09:01 +00:00
Erwin Coumans
3792ae1560 bugfixes for generic (experimental) Bullet rigidbody constraint: use cone-twist instead (needs a few more minor fixes)
Note: Visual Studio projectfiles and other buildsystems need to add extern/bullet2/src/BulletDynamics/ConstraintSolver/btConeTwistConstraint.cpp to the project!
2007-07-16 05:56:51 +00:00
Joshua Leung
044b354458 Bugfix #6945: Weight painting bug
Trying to Clear Rotation of a armature bone while in Weight Painting mode didn't work anymore due to Bugfix #6486. Now it checks if ob==active_object and also if weightpainting is on.
2007-07-16 05:49:04 +00:00
Campbell Barton
8f6c18dc17 was missing colorband from the flags in the epy docs 2007-07-15 19:31:45 +00:00
Andrea Weikert
f3c14b1306 == MSVC 7.1 project files ==
- updated bullet files with btConeTwistConstraint.h and btConeTwistConstraint.cpp
2007-07-15 16:28:25 +00:00
Andrea Weikert
e64e6ae3a3 == MSVC compilation ==
two small fixes in this commit:
- added new file for nodes 
- fixed compile error in readfile.c, as reported by Jean-Michel Soler here:
  http://lists.blender.org/pipermail/bf-committers/2007-July/018849.html
2007-07-15 14:55:09 +00:00
Joshua Leung
38c84ba938 A few minor changes:
* Removed obsolete comments from constraints code
* ChildOf constraint buttons: Set/Clear Inverse are now Set/Clear Offset. Hopefully that makes it a bit clearer for users.
2007-07-15 07:05:24 +00:00
Joshua Leung
bc9e6f9731 Bugfix #6915:
Passepartout function hides camera name (show name).
Now it uses the Text-Highlighted theme colour instead.
2007-07-15 04:35:56 +00:00
Joshua Leung
b34f1eeff6 == TrackTo Constraint ==
Now this constraint has the space-conversion buttons too (by special request of joeedh).
2007-07-15 04:31:47 +00:00
Joshua Leung
af55d208f4 == Constraints System ==
After just over a week of coding, I've finished doing a major refactor/cleanup of the constraints code. In the process, quite a few old kludges and ugly hacks have been removed. Also, some new features which will greatly benefit riggers have been implemented.

=== What's New ===
* The long-awaited ``ChildOf Constraint'':
This allows you to animate parent influences, and choose which transformation channels the parent affects the child on (i.e. no translation/rotation/scaling). It should be noted that disabling some combinations may not totally work as expected. Also, the 'Set Inverse' and 'Clear Inverse' buttons at the bottom of this constraint's panel set/clear the inverse correction for the parent's effects. Use these to make the owner not stick/be glued to the parent.
* Constraint/Target Evaluation Spaces:
In some constraints, there are now 1-2 combo boxes at the bottom of their panel, which allows you to pick which `co-ordinate space' they are evaluated in. This is much more flexible than the old 'local' options for bones only were.
* Action Constraint - Loc/Rot/Size Inputs
The Action Constraint can finally use the target's location/rotation/scaling transforms as input, to control the owner of the constraint. This should work much more reliably than it used to. The target evaluation should now also be more accurate due to the new space conversion stuff.
* Transform - No longer in Crazy Space (TM)
Transforming objects/bones with constraints applied should no longer occur in Crazy Space. They are now correctly inverse-corrected. This also applies to old-style object tracking.

=== General Code Changes ===
* solve_constraints is now in constraints.c. I've removed the old `blend consecutive constraints of same type' junk, which made the code more complex than it needed to be.
* evaluate_constraint is now only passed the constraint, and two matrices. A few unused variables have been removed from here.
* A tempolary struct, bConstraintOb, is now passed to solve_constraints instead of relying on an ugly, static workobject in some cases. This works much better.
* Made the formatting of constraint code consistent
* There's a version patch for older files so that constraint settings are correctly converted to the new system. This is currently done for MajorVersion <= 244, and SubVersion < 3. I've bumped up the subversion to 3 for this purpose. However, with the imminent 2.45 release, this may need to be adjusted accordingly.
* LocEulSizeToMat4 and LocQuatSizeToMat4 now work in the order Size, Rot, Location. I've also added a few other math functions.
* Mat4BlendMat4 is now in arithb. I've modified it's method slightly, to use other arithb functions, instead of its crazy blending scheme. 
* Moved some of the RigidBodyJoint constraint's code out of blenkernel, and into src. It shouldn't be setting its target in its data initialisation function based + accessing scene stuff where it was doing so.

=== Future Work ===
* Geometry to act as targets for constraints. A space has been reserved for this already. 
* Tidy up UI buttons of constraints
2007-07-15 03:35:37 +00:00
Ken Hughes
0f692d999a Python API
----------
Remove unused variable declaration which caused gcc warnings.
2007-07-13 14:38:44 +00:00
Campbell Barton
4f240c7982 Revision: 11257 from 2.44 stable 2007-07-12 20:49:36 +00:00
Ken Hughes
229e4674f8 Python API
----------

Fix uninitialized variable in MEdge_setSel.
2007-07-12 15:32:15 +00:00
Ken Hughes
178dc73084 Tools
-----
More improvements to boolean tools.  The main change (although very little in
code) is changing fuzzy comparisons of floating point values.  For testing, a
new define is added in intern/boolop/intern/BOP_MathUtils.h called
VAR_EPSILON, which enables better comparisons.  This is turned on by default;
undefining it will revert to using the previous comparisons.  The downside of
these new comparisons is a loss in speed, but the resulting meshes are more
likely to be manifold (although still not always).

The other changes include speed improvements based on profiling results and
fixes for the improper creation of triangular faces with only two vertices.
2007-07-12 15:24:08 +00:00
Kent Mein
e19519ec40 Added only's to the tooltips
Kent
2007-07-12 15:18:14 +00:00
Kent Mein
735fc305ff Removing the double negitives in the tooltips talked about last night.
Kent
2007-07-12 14:46:14 +00:00
Campbell Barton
bfb9603cb4 From stable
Revision: 11237
          http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=11237
Author:   campbellbarton
Date:     2007-07-12 13:05:31 +0200 (Thu, 12 Jul 2007)

Log Message:
-----------
PyObject_IsTrue was missing a check for an error return value in many cases.
2007-07-12 11:51:21 +00:00
Kent Mein
e7c15b97e2 Little typo found by Renato Perini
I hate the wording of these tooltips but can not think
of something better currently so I'm just fixing the spelling.

Kent
2007-07-11 21:18:37 +00:00
Kent Mein
8c96c15c92 Added a flush after fprintf
This is patch [#6921] Make error printing a bit more reliable
from GSR
http://projects.blender.org/tracker/index.php?func=detail&aid=6921&group_id=9&atid=127

Kent
2007-07-11 18:45:39 +00:00
Joshua Leung
fb9b3022d3 Bugfix #6931:
I-Key on Fields not working for Empty Object. Was wrongly only checking for Meshes.
2007-07-11 10:13:59 +00:00
Robert Holcomb
f628b9c442 One more time....I misunderstood the guidance about values as inputs for
the math node.  Now it functions with two values as inputs (no image 
neccissary).  Kinda back where it started ;)
2007-07-11 03:33:28 +00:00
Robert Holcomb
c313f6db86 After chatting with Broken about grs comments on the default behavior
of the nodes, I realized I had strayed from the path of enlightened blending 
by causing the math node to create an output the size of the larger of the 
two inputs.  

It has been corrected create the output the size of the 
first image, and in its abscense the second image.  In the event of 
nether input containing image data the node does not function.  I also 
added some early out checks at the beginning of the function to speed it 
up a tad in these cases and commented the code a bit more.
2007-07-11 03:00:39 +00:00
Robert Holcomb
5e8ed4f088 Updated Contributor line in GPL header to reflect original source. This
closes patch #6215-Normalize.
2007-07-11 01:03:39 +00:00
Kent Mein
9f3670ce9f Removed comments with non ascii chars...
I left the link that points to documentation on the web so not really needed 
anyway.

Kent
2007-07-10 19:34:41 +00:00
Kent Mein
9298357670 This is patch [#6929] Interpolation Methods
http://projects.blender.org/tracker/index.php?func=detail&aid=6929&group_id=9&atid=127
Its a subset of patch [#6766] Transform Sequencer effect

It adds 3 image functions for different types of interpolation.
For people that like pictures:
http://wiki.blender.org/index.php/User:Damiles#Interpolations_Algorithms

Patch provided by David Millán Escrivá (damiles)

Kent
2007-07-10 19:13:03 +00:00
Diego Borghetti
209407a7e1 Fix regression reported by Early Ehlinger on ML.
Original bug:
	https://projects.blender.org/tracker/?group_id=9&atid=127&func=detail&aid=3760

Code remove in revision 6654:
	http://projects.blender.org/plugins/scmsvn/viewcvs.php/trunk/blender/source/blender/src/renderwin.c?root=bf-blender&r1=6491&r2=6654

and return in revision 6839 (without the point checking):
	http://projects.blender.org/plugins/scmsvn/viewcvs.php/trunk/blender/source/blender/src/renderwin.c?root=bf-blender&r1=6835&r2=6839
2007-07-10 15:24:48 +00:00
Kent Mein
8198ea61be Update to the translation code. Patch provided by dripstone.
Basically move stuff out of filesel.c and into language.c and changes
when exactly it does the conversion.  It was doing it when not needed for
some machines.  It probably still needs work but its slowly getting better.

I also removed some commented out code.

Kent
2007-07-10 15:10:32 +00:00
Robert Holcomb
9a07d9cd98 Fixed typo. Ooops. 2007-07-10 02:33:00 +00:00
Robert Holcomb
b89ba8636c Added normalize compositing node. 2007-07-10 02:27:37 +00:00
Robert Holcomb
1d66563d95 Committed patch fixing bug #6900. Math node now has reflective
behavior.
2007-07-10 02:06:10 +00:00
Joseph Eagar
4f01085709 =ID Property update=
ID Properties weren't being duplicated (by shift-D or any of the other
duplication functions).  So now ID properties are duplicated in the 
main copy_libblock function, which (as far as I can check) covers all
ID-contained ID properties.

I also updated the constraint system to copy pyconstraint ID properties
on shift-D.

This would probably be a good thing to add to the stable branch, btw.
2007-07-09 20:42:14 +00:00
Campbell Barton
dfa6e0b8d6 bugfix's for 6917 and 6913 - Both were because I forgot to check all other selected meshes for faceUV's
Also made image_auto_layout.py use blenders internal boxpacking rather then the slower python one.
2007-07-09 17:33:38 +00:00
Kent Mein
052a15d4b4 Was a missing -DWITH_FFMPEG here so I added it.
Kent
2007-07-09 16:17:33 +00:00
Ken Hughes
1d1faacdff Bug #6924: Add WITH_FFMPEG compilation switch when WITH_BF_FFMPEG is true for
scons.  

Can someone verify that other build systems are also including this?
2007-07-09 16:03:26 +00:00
Ken Hughes
db2cc09913 Correct comments in example for Python Ipo module doc.
Remove redundant description of yafrayGIMethod in Python Render module doc.
2007-07-07 17:33:46 +00:00