Commit Graph

983 Commits

Author SHA1 Message Date
Ken Hughes
d7a21ed220 ===Python API===
First pass at sceneRender.c / Scene.Render API clean-up.  Mainly implementing
attribute via tp_getset, but a few new features too.
2006-05-29 05:01:07 +00:00
Ken Hughes
7b1d6021a4 ===Python API===
Fix typo in Mesh.py epydoc.
2006-05-29 03:52:38 +00:00
c4abb5e7ca a little clean of no used line
.
2006-05-28 17:17:18 +00:00
Ken Hughes
8a8400ff28 ===Python API===
Added to Mesh API me.sel and me.hide, which set/clear the selection and
hidden values for all verts/edges/faces in a mesh.
2006-05-28 00:39:13 +00:00
Ken Hughes
6ebdfbfc85 ===Python API===
Fixed epydoc summaries for mesh.vert.index and mesh.vert.uvco so they say
something useful other than "(MVert Only)".
2006-05-27 23:31:13 +00:00
Ken Hughes
0fab573205 ===Python API===
Bugfix: epydocs for World API incorrectly described settings for getMode(),
setMode() methods.
2006-05-27 16:40:00 +00:00
dee16b9e3d * bug fix
[ #4228 ] Blender.Image.Load(filename) loads only on the first loading
- Image.Load() will now reload the image buffer when a image of the same name is loaded again
- small textual change in render code
2006-05-26 15:28:04 +00:00
2132bbb621 *python fix
- save_rendered_image_cb_real has a popup window embedded in it that prevents automation through python as a result python scripts would get a popup which is ignorned by the script
- modified so python scripts overwrite the image by default
2006-05-25 21:34:00 +00:00
2a6952f386 - bug fix
* C uses braces unlike python :/
2006-05-25 21:13:13 +00:00
1b577b7f0d *python documention & bug fix
- added documentation to Render - saveRenderedImage has an option to save the zbuffer along with the image
(off by default)
- fixed a really annoying runtime error of uninitialized data being passed to a method in pipeline.c during a render
2006-05-25 21:10:28 +00:00
af87c651a5 *python fix
- fixed Render.saveRenderedImage() so now it works once again
(it was broken since render refactor)
2006-05-25 20:47:17 +00:00
Ken Hughes
8fb3373a78 ===Python API===
Ok, now let's try making the Mesh Primitives documentation accessible.
2006-05-25 17:00:17 +00:00
Ken Hughes
48033e00c4 ===Python API===
Fulfilling a very old feature request: a new Mesh Primitives module is
introduced, which gives script writers access to the Blender mesh datablocks
created from the "Add->Mesh" menu.  You can now do this:

  from Blender import *

  me = Mesh.Primitives.UVsphere(10,20,3) # 10 segments, 20 rings, diameter 3
  ob = Object.New('Mesh','mySphere')
  ob.link(me)
  sc = Scene.GetCurrent()
  sc.link(ob)
2006-05-25 16:45:24 +00:00
Stephen Swaney
8aeaf82a67 set locale to POSIX so regex works on platforms that set funny
locales.  needed to make "ls [A-Z]*.py" work properly.
Setting LC_ALL=C may be a better choice than LC_ALL=POSIX.
We shall see.
2006-05-23 02:27:22 +00:00
Ken Hughes
677cf7f133 ===Python API===
Adding support for Action Strips to the API.  A new attribute "actionStrips"
has been added to the Object API to access them.
2006-05-22 14:19:52 +00:00
f849384fcd === Python API ===
Fixes for the bug introduced by my other commit the other day.

Blender.Draw.Create now does proper error checking.
2006-05-22 01:59:28 +00:00
58648f0ed2 python documentation update 2006-05-21 21:04:21 +00:00
023737daa4 *python additions
- added a method Action.getFrameNumbers()
returns the frames at which keyframes were inserted for this action

example usage:
import Blender

myobj = Blender.Object.Get('Armature')
myaction = myobj.getAction()
frames = myaction.getFrameNumbers()

for frame in frames:
	print 'bones at frame %d' % frame
	myobj.evaluatePose(frame)
	pose = myobj.getPose()
	for bone in pose.bones.values():
		print bone.head, bone.tail
2006-05-21 21:02:29 +00:00
Ken Hughes
f3ae4d0f4d ===Python API===
Something to try making import/export script writers happy; Mesh.New() will
not create a new Blender mesh datablock unless the mesh is linked to an
object.
2006-05-20 16:52:11 +00:00
befd007511 === Python API ===
Blender.Draw.ColorPicker

	Enables scripters to use a color picker in there scripts.

See this file for a trivial demo: http://blenderartists.org/~theeth/colorpicker.blend
2006-05-20 15:44:14 +00:00
2cd91acf37 *python addition
- modified the repr for beztriple to print less non-sensical output
- beztriple now prints its handles and control point only
2006-05-19 21:45:27 +00:00
1022107236 Image and Draw wernt converting the paths of an image properly.
Getting teh size of an image with a relative path "//foobar.png" would always fail.
2006-05-19 15:33:23 +00:00
Chris Want
a0fdbf1c18 Added Blender.Get('rt') so that the pythoner can access the value
of the rt button for setting debugging levels.
2006-05-17 16:42:04 +00:00
Ken Hughes
18b622ca6b ===Python API===
Change code for rigid body access to use attributes instead of methods; also
add documentation to epydoc.
2006-05-17 16:08:54 +00:00
Alexander Ewering
3417378a3a Fix a buffer overflow in Blender.sys.splitext. It was checking for bounds
(although it did this one char too 'friendly'), but still happily copying
the string even if it was too long.

Pythoneerz, please check if this is the correct fix :)
2006-05-17 10:09:20 +00:00
91c5d75c4d added 2 more Rigid Body Python access, should be enough to make a start for Collada 1.4 Physics Import/Export 2006-05-16 23:47:29 +00:00
a88675d0e4 Added first Rigid Body python access (mass). Basic others will follow. This helps Collada 1.4 Import/Export. 2006-05-16 23:17:56 +00:00
bb69543fa9 *added new Object method Object.evaluatePose(frame)
- the new methods will advance an object's pose correctly to any frame

Example:
myobj = Blender.Object.Get('obert')
for x in range(10):
  myobj.evaluatePose(x)
  pose = myobj.getPose()
  print 'Data at Frame %d' % x
  for bone in pose.bones.values():
    print bone.head, bone.tail
    print bone.head, bone.tail
2006-05-16 20:32:21 +00:00
16f4d0c0b6 *documentation update 2006-05-14 18:29:32 +00:00
d305965b3d *applying patch
[ #4143 ] Methods for reading bone movement limits
Submitted By:
Aron Cristian (criller)

Gives the ability to return/set the limitations on a posebone when that bone is part of an IK chain.
2006-05-14 18:24:11 +00:00
Ken Hughes
d9045c860b ===Python API===
Make me.faces.sel and me.edges.sel behave like EM_select_face() and
EM_select_edge() in source/blender/src/editmesh_lib.c.

Script users should note that if they change ANY of the selection states
(vertex, edge, face) and then call a mesh "tool" method (like me.remDoubles)
that the selection states of the mesh MAY change, since these tools use the
edit mode (which updates select states).
2006-05-14 14:12:45 +00:00
Ken Hughes
b69cde1eb7 ===Python API===
Fixing some nmesh typos in Mesh docfile (thanks, Hos).
2006-05-12 20:47:39 +00:00
Ken Hughes
24c08a722e ===Python API===
* use CONSTRAINT_LOCAL instead of SELECT in "Copy Rotate" constraint
* remove "LOCAL" key for now from "Copy Size" constraint; not supported
  right now in Blender UI
2006-05-12 13:10:55 +00:00
Ken Hughes
d6bad3e236 ===Python API===
Added NULL constraint (and fixed bug that didn't allow appending FLOOR
constraint), and added support for Constraint.Settings.LOCAL key support in
COPYLOC, COPYROT and COPYSIZE constraints when target object is an armature.
2006-05-12 04:34:02 +00:00
831a1fa91d Added MVert.hide property because hidden verts were hanging BPyMesh_Redux 2006-05-11 20:35:43 +00:00
a3783d32e0 Added some shortcuts to Mesh
MFace.area
 MFace.cent
 MEdge.length

Updated some scripts that used these.
2006-05-11 10:06:15 +00:00
8f84542c23 Modified mesh to allow writing to normals.
renamed meshPrettyNormals to meshCalcNormals, and it now writes to normals rather then returning a list of vecs.
updated vertexpaint_selfshadow_ao to be a bit more efficient and make use of the above changes.
2006-05-10 12:12:21 +00:00
f81206228c Fixed typo 2006-05-10 03:59:16 +00:00
41623cbdb9 made mesh's getFromObject pick the materials from object or obdata as set by the objects colbits.
its crufty that None of the exports currently export materials correctly, hopefully this will help.
2006-05-10 01:38:02 +00:00
Ken Hughes
4de7589720 Bugfix: mesh.removeVertsFromGroup() caused segfault due to NULL pointer. 2006-05-09 14:17:34 +00:00
Ken Hughes
4b310f2b8f ===Python API===
Correct error in Constraint example code.
2006-05-09 01:34:59 +00:00
Ken Hughes
5f6a5f1b17 ===Python API===
Bugfix: replaced calls to enter_editmode() and exit_editmode(), which would
cause segfaults on scripts run in background mode (discovered by NichG).
2006-05-08 05:37:00 +00:00
Ken Hughes
cd3af13a1b ===Python API===
New Constraint API.  Constraints are accessible through a "constraints"
attribute in poses and objects.  Would be REALLY NICE for armature users to
pound on this code.
2006-05-07 14:57:58 +00:00
bb52e70c8a Added "VertexPaint" slot for python menus 2006-05-07 13:09:29 +00:00
390380e97b Bugfixes for frame number boost:
- Found several places, where people explicitly casted the frame number
  to short.
- Fixed the crash in BPY_interface by adding an empty line (to make it
  recompile everywhere, make clean doesn't help...)

  For the build system maintainers:

  Problem was: The change in makesdna changed the position of the
  scriptlink structure. BPY_interface.c somehow didn't get recompiled
  (not even after a make clean!!!) which triggered crashes on adding
  scriptlinks.
2006-05-07 08:23:51 +00:00
53e777aae1 added optional 'worldspace' arg to getLocation/getSize/getEuler
getSize is never flipped, but added a note in the docs.
correction to getEuler, its not wrapped.

also removed all // comments to shut GCC up.
2006-05-07 08:12:18 +00:00
5f571e4ded ==Bugfix==
Made the frame boost from short to int (30000 -> 300000 frames) complete
by walking through the source and finally changing all frame-variables
to ints.

This should finally fix the framecounter warp around seen in some buttons.

If you step on any further problems that may arise starting from frame
32768 please just give me a hint and I'll fix it.

(Sorry about that, didn't know enough about Blender, when I did it the first
time...)
2006-05-06 15:26:53 +00:00
e9718958ee Applied pack unpack from Pablo Martin (caedes),
http://projects.blender.org/tracker/?func=detail&atid=127&aid=3246&group_id=9
adds

Blender.c:
Blender.UnpackModes (dict with the unpack modes)
Blender.UnpackAll(mode)
Blender.PackAll()
Blender.CountPackedFiles()

Image.c:
image.packed (this was working)
image.pack()
image.unpack()

Sound.c:
sound.packed
sound.pack()
sound.unpack()
2006-05-06 06:17:46 +00:00
9681a329c1 added a python menu slot for weight pain.
Also needed to seperate
  view3d_paintmenu
into
  view3d_vpaintmenu
  view3d_tpaintmenu
  view3d_wpaintmenu

The view3d_paintmenu and do_view3d_paintmenu were getting messy and had a lot of if's in it.
2006-05-05 06:57:33 +00:00
Ken Hughes
18a23ab8c9 ===Python API===
Bufgix #4171: Action_setName() didn't call rename_id(), messing up the
internal database.  Patch provided by Roland Hess (thanks).
2006-05-04 13:42:12 +00:00