Commit Graph

1601 Commits

Author SHA1 Message Date
8ec207efcb fix from stable - was missing a NULL check 2007-08-31 18:21:12 +00:00
6cd6bf7d80 Updated the Makefiles removing some of the gcc specific stuff...
Basically I moved  -funsigned-char -fno-strict-aliasing
from individual Makefiles to nan_compile.mk defines for CFLAGS and CCFLAGS

Kent
2007-08-31 16:16:33 +00:00
1e3b8dc5d7 hash update from stable 2007-08-29 03:09:22 +00:00
4e2143f639 This commit fixes up a bunch of svn properties to hopefully make things a little nicer for everyone.
Patch provied by gsrb3d

bug tracker #7061

Kent
2007-08-28 10:07:08 +00:00
7b0098bd04 getting the mesh for all curves/surfs/text raised an error every time because it was checking the wrong object was converted to a mesh. might be own fault. 2007-08-27 20:05:05 +00:00
ca843fd2f8 armature weakref evilness again, using editmode in python is not the best.
replacing PyWeakref_NewProxy with PyWeakref_NewRef fixes this problem.

list(bpy.data.armatures) # would mess up weakrefs
[arm for arm in bpy.data.armatures] # didnt.
2007-08-27 16:09:02 +00:00
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
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
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
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
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
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
Stephen Swaney
7f3b967c30 fix warning: initialization makes integer from pointer without a cast 2007-08-17 13:53:09 +00:00
4d884c0fbf this broke on some compilers 2007-08-17 07:14:36 +00:00
5a9d5a8ce7 material leak fix from stable tree 2007-08-16 12:55:40 +00:00
61f4d6ae4d added bone comparison for the python api 2007-08-14 06:38:44 +00:00
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
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
2807d82e90 getVertsFromGroup was vaguely documented 2007-08-07 13:20:46 +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
Ken Hughes
d638f54c08 Python API
----------
Fix documentation for Blender.CountPackedFiles(), incorrectly referred to
Blender.Blender_CountPackedFiles() instead.
2007-08-05 16:48:55 +00:00
c4114780d4 Little code cleanup.
bsystem_time was being called with an extra variable, which was useless. Most of the places that called it, were passing NULL for that variable anyway.

I've also cleaned up that function a bit, but the underlying problems with that part of the code still exist (EVIL GLOBALS that are exported for frame_to_float), for mblur and fields rendering features. That remains for another time.
2007-08-05 09:21:29 +00:00
c6785e3292 fixes from 2.4x 2007-08-03 16:33:08 +00:00
f707382e1e misc changes from stable 2007-08-01 18:04:44 +00:00
b38e987932 armature weakref fix from stable, Curve.c removed unneeded cruft 2007-08-01 12:57:59 +00:00
ecd42c4342 nested comment 2007-07-30 15:19:42 +00:00
655fb548aa Removing some useless code, and fixed a few compiler warnings. 2007-07-30 11:10:30 +00:00
48b07b7f15 Draw.py - typo
sceneSequence.h - bad type check, dosnt matter really since that define isnt used yet.
SurfNurb.c - was using lib hashing function and surfNurbs not a lib! (own mistake)
buttons_editing.c - Curves PathLen button was MAXFRAMEF and pathlen is a short so the button wrapped around.
2007-07-28 09:26:53 +00:00
a164d91d42 missing include and added a warning to UIBlock 2007-07-27 09:30:54 +00:00
3031f1f2bd =Draw Module Fixed=
This commit fixes the Draw module.  All buttons/widgets created via the Draw
module in a SpaceScript area are now inserted into a global list attached to
the SpaceScript data.  This list is cleared before each draw, when freeing
the space, and when the area is switched to another space.c

This is necessary to prevent Blender's internal UI code from getting invalid
pointers to python data.  In addition, it allows storing widget tooltips
inside the python Button objects, which solves that little bit of stupidity.

Note that this reverts the previous weaklist solution.  In fact, I had to go
over each previous commit by Campbell after this code originally branched
before the weaklist commit and re-add each commit.  So if anything is
missing, just tell me, or feel free to re-add it.
2007-07-27 06:14:25 +00:00
670cf8c5a9 fix from 2.44 for adding new curves. 2007-07-26 14:32:32 +00:00
534ba14d2b == PyAPI - Constraints Space Conversion Access ==
Now, for the constraints that support Constraint Space Conversion, those settings can now be set from the PyAPI too.
2007-07-26 12:15:55 +00:00
29660ac778 PyAPI Simple Bugfix:
This fixes a bug reported in IRC. getParentBoneName() was returning a string (most likely from an old bone-parent that got removed), even when the parent wasn't an Armature.
2007-07-26 06:11:58 +00:00
17533e534f removing unneeded checks 2007-07-25 04:45:20 +00:00
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
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
c924fc542b fix for Curve appendNurb 2007-07-21 03:54:20 +00:00
f8a1397b67 removing 2 getset duplicates 2007-07-20 02:23:55 +00:00
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
8f6c18dc17 was missing colorband from the flags in the epy docs 2007-07-15 19:31:45 +00:00
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
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
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
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
cff039bc58 Ipo doc correction thanks to kempoller 2007-07-05 11:28:11 +00:00
727216f9e1 was missing a decref and leaking ram when building the static particle list 2007-07-03 16:04:41 +00:00