Commit Graph

1662 Commits

Author SHA1 Message Date
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
1ca2823b54 made sequence handle calculation into a function, (lines were being copied around) 2007-10-17 23:24:09 +00:00
51ca77a114 patch, 7340 from frank richter add glPush/PopClientAttrib 2007-10-17 09:51:13 +00:00
e9c2aa691e updated pyconstraint template from nathan (cessen) which exposed some
bugs with pyconstraints, also added a missing decref from python (wasnt freeing the return value from the settings 
button).
2007-10-15 15:28:09 +00:00
15ad8e7e66 pyconstraints USE_TARGET wasnt being checked for true/false, was assumed True whenever it was assigned in the
script
2007-10-15 14:41:29 +00:00
Ken Hughes
6fd43fd68a Python API
----------
* changed a few hardcoded low frame limits in wave modifier to use MAXFRAMEF
2007-09-27 23:42:21 +00:00
7cf9c31272 == Clamp To Constraint ==
Now there's an option for the owner to follow the path of the target cyclically. Previously, if the owner moved past the extents of the side of the bounding-box used for the calculations, the object was placed on the curve at the nearest extent. 

This option is only really useful if the curve itself is cyclic, although you can still use it otherwise. To enable, just turn on the cyclic option.
2007-09-26 07:33:31 +00:00
2c0db4d707 made active vert/edge/face draw properly with modifiers applied and made their theme default white.
removed active face draw in Face/UV (which is now paint mask mode) mode.
2007-09-25 03:31:12 +00:00
0b24ca19ff bugfix - running scriptlinks did not initialize the armature weakref dict, thanks for finding caedes!
this bug is in 2.45 but can work around by setting it manually
---
import sys as pysys
try:
	pysys.modules['__main__'].__arm_weakrefs
except:
	pysys.modules['__main__'].__arm_weakrefs = {}
---

changed how draw modes work - when displaying textured meshes in editmode, only draw selected edges when "Edge Draw" is not enabled. this makes it easy to see the texture/mapping without edges getting in the way.
This means editmode can draw like UV/Face mode did when "Draw Edges" was disabled.

Also made the active vert/edge/face color themeable, still need to set the default to somthing other then pink.
2007-09-23 22:02:18 +00:00
aee06ac0d0 added an active face for the mesh editmode and normal mesh - this is needed because the TFace flag was not always easy to access from editmode.
using the last selected face was almost good enough however when selecting verts and edges the last selected face would become inactive and the space image would flicker about too much.
The active face is used for getting the space image at the moment and keeps scripts that use this flag working also.

This has 2 commands to get and set, so the variable is not accessed directly.

all "UV Calculate" scripts work now

last commit crashed when in solid draw mode, it seems subsurf modifier is ignoring the displayMask since MTFACE is available. just made it do a null check for now.

uvcalc_follow_active_coords.py - should be done inC and put in the snap menu.
2007-09-22 17:54:13 +00:00
Ken Hughes
2244d19bc2 Python API
----------

Bgfix #7386: added support for texture flags TEX_PRV_ALPHA, TEX_REPEAT_XMIR and
TEX_REPEAT_YMIR to tex.flags attribute.
2007-09-21 20:46:17 +00:00
9f17eae3f0 * Documented scene.objects.camera , used for getting the active camera
of a scene.
2007-09-19 06:07:54 +00:00
0a2b8b1308 A user submitted a BVH file that took a long time to import (I didnt end up finishing since it was so slow)
this is mainly because adding pose keyframes recalculates every handle so importing became increasingly slow.

added a 'fast' argument to insertkey that python api's insertPoseKey can make use of since it alredy accepts a 'fast' option.

The ~4450 frame, 31 bone BVH imports in ~108sec now

Seperated editmode switch statement in space.c's event handling,
if editmode is disabled, or the images is a render or composite, UV editing operations are ignored.
In previous releases it has given an annoying warning if selecting or scaling is attempted when out of UV/Face mode.
2007-09-18 06:41:29 +00:00
52f551678b == Action Editor - Copy and Paste Tools ==
Now it is possible to do Copy+Paste in the Action Editor, like in the IPO Editor. There are two new buttons in the Action Editor header for this, using the familiar icons.

* To copy...
Select the keyframes you wish to copy, and the channels that they occur in (except for ShapeKey mode, where it is not possible to select channels). Click copy button.
* To paste... 
Place the current frame where you want the first of the keyframes from the buffer is to be pasted. Select all channels you wish the keyframes to be pasted into. Click paste button. 

Currently, keyframes are only pasted into 'compatible' curves (i.e.  LocX keyframes can only go to LocX, and so on). This may change after user feedback, if this is found to be too restrictive.

== Code Changes ==
I've made a few changes which allow this code to be nicer. 
* renamed insert_vert_ipo to insert_vert_icu, as that represents its actual purpose better (and changed all occurrences I could find)
* created a new function, insert_bezt_icu, which does the actual inserting of provided BezTriple data to a given IpoCurve 
* recoded insert_vert_icu to use this new function, and also the IPO-Editor keyframe pasting (i.e.  pasting in Editmode)
2007-09-17 11:41:12 +00:00
672a66905b Patch/Bugfix #7334 by 'gsr b3d:
Some more compiler warning fixes. Some of these seem to be specific to GCC 4.1
2007-09-17 06:11:06 +00:00
976a0424e1 when importing sys failed blender could crash on startup. Blender will now exit with an error rather then crashing. 2007-09-17 04:46:58 +00:00
3a90f211d2 new view option, SolidTex, to draw textures in solid mode.
In the view panel as well as the shortcut Shift+T

this works in editmode as well as object mode

giving results like this
http://members.optusnet.com.au/cjbarton/temp1.jpg

where before you could only see textures in textured draw type like this
http://members.optusnet.com.au/cjbarton/temp2.jpg
2007-09-15 18:12:16 +00:00
19c09fe0da -> Fix for Mesh Properties Python API
When switching Mesh properties over to METH_O from METH_VARARGS certain method definitions
didn't get switched over correctly, causing calls to mesh property functions to fail.
2007-09-11 20:58:00 +00:00
0bd32f3ac6 Changes to "Face Select" mode
* Does not indicate that UV's exist, nor does it add UV's when used.
* Only accessible for texturepaint, vertexpaint and weightpaint from a button in the header (Paint Selection Mask)
* Not accessible from the mode menu, this is only an option that applies to paint modes.

This dosnt effect DNA, face select (G_FACESELECT) can be enabled at any time but is only used when paint modes are enabled.

Other changes
* UKey is uv unwrap in editmode, Ukey for undo was editmode only anyway.
* UVCalc in editmode adds a UV Layer if there is not one alredy.
* texture draw in editmode does not draw the face dots (they are get in the way of texturing)
* some missing updates were added.
* removed manipulator from when paint modes are enabled since the manipulator is not drawn in the 3d view.
2007-09-10 19:32:44 +00:00
d00894c45c =Epydoc Fix=
epydoc changes for last commit weren't entirely clear.  Reworked a paragraph
to be a bit clearer.
2007-09-08 00:57:34 +00:00