Commit Graph

876 Commits

Author SHA1 Message Date
b73748bdd0 Just added some comments about face material incides and the material list. 2005-12-29 11:08:55 +00:00
69746f3b83 Added some details to the Object documentation, some parts were a big vague.. 2005-12-29 10:33:00 +00:00
Yann Vernier
a61871360f Fix crash in EXPP_(int|obj)Error. These functions are redundant;
they only differ by return type, so it's easier to just call
PyErr_Format and return appropriately.
2005-12-27 15:28:09 +00:00
Alexander Ewering
6f10660f0c Fixing a bit of horrible code in Armature.c (BonesDict_repr).
There is a lot of very dangerous (and slow) string manipulation code in
there. I do not want to appear arrogant, but a bit of basic code QA in this
module certainly can't hurt.

Please see the diff for further explanation ;-)
2005-12-23 22:16:33 +00:00
Ken Hughes
ea16c447c3 Fix typo in epydocs for Mesh example 2005-12-21 18:12:28 +00:00
73fa63751f Added missing mode rayShadow and updated docs, "NoSpecular" was also missing from the docs too. 2005-12-20 06:50:13 +00:00
72d805f17d Orange: monday merger with bf-blender (loadsa bugfixes).
ALso: a bit tidying up in editaction.c and python Object.c
2005-12-19 18:56:08 +00:00
87d9ca4b99 orange: py2.3 compat 2005-12-18 21:20:11 +00:00
01d05142b1 orange: bpy Pose type 2005-12-18 21:03:57 +00:00
fae20e494e orange: animation baking code. also a patch to autokey, to only key the keys made. 2005-12-18 20:14:22 +00:00
e14ff3de3d Orange:
- Sunday merger with bf-blender

- Foundations for new Node editor in Blender, generic framework that can
  be used for Material/Texture, Compositing, Logic or maybe even Sequencer.
  Note: this doesn't do anything yet, nor save! Is just to get this nice
  in CVS now. :)
2005-12-18 13:46:01 +00:00
2b7919a9f2 fixed returning true/false, thanks Willian. as well as removed the image space spesific image changed call. 2005-12-18 08:47:55 +00:00
e47f918e5e Added get/set/attr for area lamp settings - needed to exporting arealamps to povray.
areaSizeX, areaSizeY
raySamplesX, raySamplesY
epydocs updated also,
2005-12-18 07:45:45 +00:00
510403277b Saturday merger of bf-blender in orange branch. 2005-12-17 20:25:41 +00:00
Ken Hughes
f73f226ed7 -- Bugfix #3617; addBezier() was not initializing all the attributes for
a the beztriple, so things like the hidden and handle select states were
   set to random values.  Added a beztriple.hide attribute so that the
   hide attribute can be set/cleared from the BPy API.
2005-12-17 04:57:48 +00:00
e76e78e78a typo, thanks letterrip. 2005-12-16 22:40:20 +00:00
Ken Hughes
826591d778 -- Added BPy support for new Material modes. Recent additions of new mode
bits broke input-checking in the API, so added a bitmask #define in
   DNA_material_types.h which contains all valid mode bits.
2005-12-15 21:54:00 +00:00
Ken Hughes
6e7e6d2357 -- removed redundant initialization for Mesh_Type (thanks LetterRip) 2005-12-15 19:12:31 +00:00
4a8087db76 Fixed some warnings from GetCurrent, remaining warnings seem to have no obvious solution
attr = Py_True; // Image.c:1107: warning: dereferencing type-punned pointer will break strict-aliasing rules
2005-12-15 02:06:37 +00:00
5ebf9cc1f4 Another merger of Orange branch with bf-blender, it has important fixes. 2005-12-14 20:38:14 +00:00
8304b73a08 BPython:
- malformed nmeshes could crash Blender with a sigsegv. Related to old
behavior that accepted "faces" with one or two verts.
- removing unused var (store_edges) + doc update.
2005-12-14 18:01:42 +00:00
7998a07386 orange: added Object.insertPoseKey to continue with the attempt to make nla/path walkcycle baking to actions 2005-12-14 17:44:08 +00:00
2fd72143f6 Wednesday merger of Orange branch and bf-blender 2005-12-14 14:24:23 +00:00
d527b0e585 Added
Image.New(name, w,h,depth)
Image.start- for animtex
Image.end - for animtex
Image.speed - for animtex
Image.packed - read only bool

See the pydocs for details.
2005-12-14 03:27:35 +00:00
4f235db6e6 Tuesday merger of Orange branch with bf-blender 2005-12-13 20:32:39 +00:00
Ken Hughes
d3338620b7 -- More of Bugfix #3580: Mesh_getFromObject() was not updating key->from
when it duplicated mesh data.

   I'm not thrilled with how I implemented this code, but currently don't
   know a better way.  If someone more familiar with how blender duplicates
   objects and converts things to meshes wants to have a look, it would be
   appreciated.
2005-12-13 18:39:50 +00:00
Ken Hughes
4085cc06a6 -- Calling mesh.verts.extend() on a mesh with vertex groups was not updating
mesh->dvert, eventuallu causing a crash.
2005-12-13 15:36:32 +00:00
7bba26d24b *warnings fixes 2005-12-13 14:29:56 +00:00
fadaa2fbe9 From kh_pylon:
You have to put Py_RETURN_NONE; inside { }; it's a two-line macro
Aparently breaks MacOS.
2005-12-13 00:27:10 +00:00
d73e312f88 Added Image.GetCurrent()
Previously the only way to get the current image was flaky and relyd on the image being assigned to a mesh.

try:
  me = Scene.GetCurrent().getAttiveObject().getData(mesh=1)
  image = me.faces[me.activeFace].image
except:
  image = None

...Can new be replaced by the following, and works even when there is no mesh.
image = Image.GetCurrent()

epydocs:
  Get the currently displayed Image from Blenders UV/Image window.
  When multiple images are displayed, the last active UV/Image windows image is used.
2005-12-13 00:00:11 +00:00
540e5bb77d *Armature api documentation 2005-12-12 20:12:50 +00:00
9ae9527c51 - Armature/Bone API for python
* this resolves a number of outstanding issues with the armature api and gets this ready for release
- add/remove bones possible
- rolls work correctly now!
- ik'ing to parent should work
- flags for tip/root/bone selection
- etc.
2005-12-12 18:46:26 +00:00
c452e8672c Rewrote TimeLine_getFramesMarked func with better coding
.
2005-12-12 11:57:58 +00:00
7daa8d0bca Sunday merger of orange branch with bf-blender 2005-12-11 23:04:27 +00:00
e0d20e00ce Added some details in the Mathutils documentation. 2005-12-11 04:20:37 +00:00
Ken Hughes
76e7905736 -- Bugfix #3573: Deleting a scriptlink when some other scriptlinks were no
longer linked to a script would cause a crash.  We now delete all
   scriptlinks which are not linked.
2005-12-10 19:36:05 +00:00
Ken Hughes
080eb9b3fa -- Bugfix #3564: Texture.getImage() always returned None for Env maps, even if
an image was assigned.
2005-12-09 23:19:00 +00:00
7b2f1d4776 change return of getMarked method for dict {framnum:['nameframe']}
.
2005-12-09 15:00:54 +00:00
Ken Hughes
e67360cb97 Made Mesh verts/edges/faces hashable (as they were in NMesh); this will
make it easier for some scripts to be converted.
2005-12-07 21:12:33 +00:00
5b71510ecf A patch from Ken Hughes per request of Bassam here at Orange: Python access to armature visibility layers. 2005-12-07 19:36:01 +00:00
1123be1bcc Orange request; Bones in Armature now have own layer settings.
Works like for Object layers, but local within Armature itself. Each Bone
can be in (16 now) any layer, and the Armature layer defines what is
visible or not. Also note that hiding will still work too.

Since the Blender code is *stuffed* with Bone options now, this commit
requires a good test if all tools we got now comply to layers...
(I counted 130 cases for checking for selected Bones in code!)

In PoseMode; hotkey M will show 'movetolayer' menu. Not in editmode...
then its the mirror menu.

Todo: make action/nla drawing comply to Armature layer settings.
2005-12-07 12:36:26 +00:00
Ken Hughes
b02ff5f2a2 -- Bugfix #3551: fix memory corruption problem if Text3d.setText() called
while selected text is in edit mode.

(Future note: now that there is Unicode support in Blender, we need to add
support for it in the BPy Text3d API.)
2005-12-07 05:44:29 +00:00
Ken Hughes
39ca3e3fa4 -- Bugfix #3548: material.setMode() was doing incorrect range check on
inputs, returned error setting RAYMIRROR or RAYTRANSP modes.
2005-12-06 17:08:09 +00:00
Ken Hughes
1aebee2f9e More corrections and additions to Ipo and IpoCurve documentation. 2005-12-06 06:16:10 +00:00
Ken Hughes
569f9de63c Added some extra parameter checking in Ipo driver code. 2005-12-06 05:42:23 +00:00
Ken Hughes
1a2ac4e64d -- Bugfix #3072: As discussed on IRC, matrix.invert() should throw a
ValueError exception if matrix is singular.
2005-12-05 19:57:23 +00:00
Ken Hughes
e209676d3d -- Bugfix 3453: coercion operations were doing an extra incref on coerced
objects.  Also found extra increfs on some newly-created quat and matrix
   objects, from calls to Matrix_Identity() and Quaternion_Identity().
2005-12-05 19:02:30 +00:00
Ken Hughes
bf05bbef86 Fix unchecked parameter in M_Ipo_Recalc, and some documentation fixes. 2005-12-05 05:23:35 +00:00
Ken Hughes
00ce7c629f -- remove unused variable "dict" which was giving compiler warnings. 2005-12-05 01:07:24 +00:00
Ken Hughes
beb80aa609 -- Fix segfault when callign Blender.Armature.Get() with no parameters 2005-12-04 20:39:56 +00:00