Commit Graph

1681 Commits

Author SHA1 Message Date
9807586192 == Multires ==
Fixed bad level calls within multires usage.
2007-12-26 10:43:51 +00:00
88e71a5b79 == Multires ==
Cleaned up bad level calls for multires; moved most of multires functions to blenkern, where they should have been in the first place. Functionality of the tool is unchanged.
2007-12-26 09:39:15 +00:00
8a07e665c2 patch from Vladimir Espinosa for keying object layers from python 2007-12-24 11:43:09 +00:00
df46987ba3 old bug in python api, Blender.Scene.Unlink() did not check if screens were using this scene or if it was used as a set elsewhere.
In both cases this resulted in invalid pointers and crashes.
Also was not freeing nodes or sequence data.
2007-12-24 10:25:35 +00:00
5dfef1ae35 Reverting to 2_2x BPY
I was careful in selectively rolling back revisions, but if you've committed changes unrelated to BPY mixed with BPY changes, I might have reverted those too, so please double check.
2007-12-17 20:21:06 +00:00
f15956356c misc warning fixes and one fix for a big in curve allocation 2007-12-13 15:06:02 +00:00
78b885b9fc own error, sequencer set images - didnt clear error when finished 2007-12-13 08:49:09 +00:00
bf5cc424a8 Patch from ILdar AKHmetgaleev (akhil) - [#7864] correct scale in sequencer's glow
Added py-api write access to sequencer images.
2007-12-12 14:20:12 +00:00
6dc52c893f for button popups, dont close unless you click or press escape, this would often close when dragging a button value (or when using a tablet I am told) 2007-12-11 23:05:10 +00:00
Ken Hughes
910ef6ca75 Python API
----------
Bugfix #7898: added access to DISPLACE modifiers, add ARRAY constant to
modifier documentation.
2007-12-11 01:58:22 +00:00
9723e3ef39 miscellaneous edits from python development branch merged back into trunk 2007-12-07 09:51:02 +00:00
Ken Hughes
3bbf0736b2 Python API
----------

Bugfix #7877: fix for lamp.setMode() and lamp.setType(): need to build
tuples instead of just int or float objects.
2007-12-06 20:15:03 +00:00
26b8892c9c Bugfix for mysteriously disappearing left eyeball. Bounding boxes
used for clipping were being stored in the mesh, but modifiers
can result in two objects with the same mesh having a different
bounding box. Solution is to store bounding box in the object.
2007-12-05 21:50:23 +00:00
ccc82beb64 import all math funcs (sin/cos/tan/e... etc) by default into buttons and drivers 2007-12-03 16:43:58 +00:00
1e32ec2000 minor update, "Draw Handles" wasnt working when disabled everywhere and replaced some magic numbers 2007-12-01 23:25:00 +00:00
6b88141fda dupliFaceScale wasnt being initialized for new objects, added Python api access 2007-11-30 14:10:36 +00:00
4cdaa3ada2 Previous commit (for ipos) missed python code fixes. Apparently makefiles
for python are broken...
2007-11-28 12:42:36 +00:00
bb77ea8df5 Patch [#7829] "compressfile" parameter for Blender.Set() from JMS 2007-11-27 23:15:51 +00:00
13e73af13e ==Python API==
Added a keyword argument for mesh.pointInside(point, selected_only=True)
This means only selected faces are tested when doing the inside/outside test, disabled by default.
2007-11-24 18:29:33 +00:00
b21df550d3 ==Python API==
made it possible to remove curves from python with "del curve[i]"
mesh_edges2curves.py - remove unused function.
2007-11-22 22:07:41 +00:00
a038363124 mesh_wire.py - gave an error with no faces,
wizard_curve2tree.py - didnt work with no bevel object
Curve.py - ext1, ext2 didnt reference the interface names.
2007-11-22 16:30:14 +00:00
e64a44266c SetPivot, patch from malefico, #7785 also added GetPivot 2007-11-22 10:10:57 +00:00
307ad085fc wizard_curve2tree.py - always use active object (local view was messing up the context)
Mesh.c - mesh.faces.extend([..., smooth=True]) - smooth keyword argument, in a number of places was looping through all faces just to smooth them.
mesh_skin.py - smooth by default
2007-11-21 11:53:30 +00:00
a92173d479 ==Python API==
removing vertex groups was broken, the function being called was for editmode, this would remove the vertex group but apply the weights from the removed group to the next vertex group.
2007-11-19 19:00:28 +00:00
0b0542c785 typo in Text3d, weightpaint_invert wasnt working properly 2007-11-19 10:49:12 +00:00
dc6ac56d31 General cleanup in sequencer:
- Seperated StripData into
  StripData
  TStripData
  where StripData holds only image-filenames and TStripData holds
  the working information needed for ImBuf caching.
  => Large drop in memory usage, if you used a lot of movie and meta strips.
  => Fixed bugs in "duplicate" on the way (imbufs where copied around without
     taking reference counting seriously...)
  => Code is much cleaner now
- Added defines for TStripData->ok
  Finally figured out, what the magic values ment and named them properly :)
- Got rid of Sequence->curelem.
  Reason: very bad idea(tm) for multi threading with more than one render
  thread. Still not there, but this was a real show stopper on the way.
2007-11-18 17:39:30 +00:00
ad700ba24f * wizard_curve2tree.py - Automatic alpha blended, textured image joins using material textures and UV layers. Also added some detail options and made it easier to get low poly results.
* Mesh.c bugfix, "mesh.verts = None" didn't set the mesh->mselect pointer to NULL, wizard_curve2tree so would crash when in editmode.
* Texture.py - MTex.uvlayer doc was missing
* buttons_shading.c - Stencil tooltip was stupid.
2007-11-16 14:47:31 +00:00
d376b0630b ==Python API==
mesh.pointInside(vec)  wasnt working in all cases. (own mistake)
2007-11-13 15:32:27 +00:00
3a90b35db8 Undoing 'undo' fix 12365, it didn't work the same on mac's, Ton would like to fix the bug himself.
Tree From Curve,
- report error when nurbs or poly curves are used.
- don't throw errors when >4 branch's per segment are used. also try deal with this better. though no nice solution exists.
- default speed is 10x slower then before.
2007-11-11 15:18:53 +00:00
f02a746f56 ==Python API==
added .smooth setting to CurNurb's

so you can do....
for curNurb in Curve.Get('foo'): curNurb.smooth = True
2007-11-10 11:05:44 +00:00
6b1158c146 mistake in last commit 2007-11-09 16:05:04 +00:00
d1dbf41f6c PyTuple_Pack dosnt work with python 2.3 - removed 2007-11-09 15:56:41 +00:00
ddf2336084 curve2tree - animation settings - speed and magnitude
Python api - texture.evaluate can now accept tuples of numbers as well as vectors
2007-11-09 10:29:19 +00:00
0100ebe230 Bugfix #7682: Constraint.InsertKey works odd for PoseBones
Constraint.InsertKey was inserting keyframes for the wrong action-channel. It was doing so for the active bone, not the owner of the constraint.
2007-11-08 09:49:49 +00:00
b4ec6efb41 =Python API bugfix=
Scene.update(full=1) was pretty useless as it didn't actually evaluate the
depsgraph DAG.  This meant, for example, that re-evaluating the parenting
tree for an armature pose could only be done by redrawing the view (which
evaluates the depsgraph). scene_update_for_newframe() is now called when Scene.update is in "full" mode; to prevent firing off newframe scriptlink events, scriptlinks are
temporarily disabled while scene_update_for_newframe() is being called.
2007-11-07 18:52:23 +00:00
2ad21e2286 ==Python API==
Blender.Geometry.ClosestPointOnLine(pt, vec1, vec2) -> (pt, lambda)
This wraps lambda_cp_line_ex

Needed for experemental tree generator
2007-11-06 18:53:46 +00:00
6142ae3785 ==Python API==
Bugfix, Space Handlers could crash blender when used with armatures.
also fixed some possible bugs in other areas.
2007-11-06 13:44:26 +00:00
0e94605a90 ==Python API==
layerMask access for pose bones, even though this is a Bone property, its much more convenient to add access from the poseBone, it also matches how the 
user interface works.
2007-10-26 22:38:15 +00:00
Ken Hughes
135b16662d Python API
----------
Document Peter's fps_base attribute for scene rendering objects; also remove
framesPerSecBase() method (preference is to add only attributes, and he did
add fps_base attribute).
2007-10-26 19:53:55 +00:00
ef85f6ea21 ==Python API==
layerMask access for bone and armatures
Window.PoseMode() similar to Window.EditMode()
2007-10-26 08:19:40 +00:00
5b0a79c7c7 bug fix, when opening blender with a file (by double clicking or from the command line) - the initial undo state would be set to the default scene.
So holding Ctrl+Z would go back to the default .B.blend rather then the file that the user opened.
2007-10-23 21:31:59 +00:00
cf8032f315 == PyConstraints - Now working again ==
I've finally traced down the causes of several of the bugs which caused PyConstraints to work incorrectly (or not at all).

* Freeing is now done using BLI_freelistN inside the pycon_free function, instead of looping through the targets ourselves. This fixes all of those Memblock free: pointer not in list errors.
* BPY_pyconstraint_update now correctly creates/frees the constraint's targets as needed. Previously, it was creating/removing the wrong number of targets. Also, pyconstraints no longer get disabled when using armatures (not bones)
* The panel drawing was also not working right, as there were still some offset issues.
2007-10-23 08:23:57 +00:00
6422a740c2 == Constraints System - Recode 2 ==
Once again, I've recoded the constraints system. This time, the goals were:
* To make it more future-proof by 'modernising' the coding style. The long functions filled with switch statements, have given way to function-pointers with smaller functions for specific purposes.
* To make it support constraints which use multiple targets more readily that it did. In the past, it was assumed that constraints could only have at most one target.

As a result, a lot of code has been shuffled around, and modified. Also, the subversion number has been bumped up.

Known issues:
* PyConstraints, which were the main motivation for supporting multiple-targets, are currently broken. There are some bimport() error that keeps causing problems. I've also temporarily removed the doDriver support, although it may return in another form soon. 
* Constraints BPy-API is currently has a few features which currently don't work yet
* Outliner currently only displays the names of the constraints instead of the fancy subtarget/target/constraint-name display it used to do. What gets displayed here needs further investigation, as the old way was certainly not that great (and is not compatible with the new system too)
2007-10-21 23:00:29 +00:00
8bcfafa3d9 changed default nan_definitions.mk to use python 2.5 for linux (ai64 default was py 2.2 which probably wont even compile anymore)
pose.c - left a print here
export obj would ask about file overwriting twice.
2007-10-21 17:38:17 +00:00
373a1b05be own error, was returning the wrong python error type 2007-10-21 16:48:12 +00:00
Stephen Swaney
2ecc688e76 warning cleanup:
unused var
 return makes integer from pointer without cast
2007-10-21 16:43:21 +00:00
a0390e5cc3 == Core ==
This adds fractional FPS support to blender and should finally
make NTSC work correctly.

NTSC has an FPS of 30.0/1.001 which is approximately 29.97 FPS.
Therefore, it is not enough to simply make frs_sec a float, since
you can't represent this accurately enough. 
I added a seperate variable frs_sec_base and FPS is now 
frs_sec / frs_sec_base.

I changed all the places, where frs_sec was used to my best knowledge.

For convenience sake, I added several macros, that should make life
easier in the future:

FRA2TIME(a) : convert frame number to a double precision time in seconds
TIME2FRA(a) : the same in the opposite direction
FPS         : return current FPS as a double precision number 
              (last resort)

This closes bug #6715 
Standard framerates not supported / breaks sync -- 23.967 29.967 etc.

https://projects.blender.org/tracker/?func=detail&aid=6715&group_id=9&atid=125

Please give this heavy testing with NTSC files, quicktime in/export
and the python interface.
Errors are most probably only spotted on longer timelines, so that is
also important.

The patch was tested by Troy Sobotka and me, so it most probably should
work out of the box, but wider testing is important, since errors are
very subtle.

Enjoy!
2007-10-21 15:42:08 +00:00
3a04520686 python api, slicing works differently on the 64bit ubuntu gutsy system, compared to the 32bit
install.
face.uv[:] was returning a blank list. and making smart UV projection script fail.

On one system Python is giving the slice function positive values, whereas on the 64bit system its 
passing negative which are then clamped to zero.
made mathutils types accept negative values for slicing. This is very odd because both systems are 
running ubuntu gutsy with python 2.5
2007-10-20 20:24:09 +00:00
a4c8783153 made setting the pose_bone.poseMatrix possible, this does not set the matrix directly, only the pose
bones loc/size/rot, when dealing with an armature without constraints this works as expected. it uses 
the same code as Copy Visual Loc/Size/Rot.
2007-10-20 11:28:58 +00:00
5ea45a1385 Mesh edit option 'AutoMerge' - access from the mesh menu, basically runs remove doubles after transform. but only merges
unselected verts into selected verts, so it wont merge verts your not editing.
2007-10-18 21:47:55 +00:00