Commit Graph

287 Commits

Author SHA1 Message Date
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
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
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
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
8a11629602 matrix to scale fixes from stable 2007-09-07 07:55:36 +00:00
32fddfbe06 my commit 11122 broke scriptlinks. was returning before re-enabling scriptlinks.
Bug [#6978] Scene script link doesn't work for Redraw event

made a script to automate building a range of revisions.
http://wiki.blender.org/index.php/User:Ideasman42#SVN_TimeWarp_Script
2007-08-31 21:54:56 +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
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
f8a1397b67 removing 2 getset duplicates 2007-07-20 02:23:55 +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
39e4dc6202 replace PyInt_CheckExact with PyInt_Check, same for floats and strings so subclass and C/subtypes work.
was reported as a bug a while ago.
2007-07-01 05:41:23 +00:00
e192e7e024 remove unneeded checks from the python API 2007-06-29 08:59:26 +00:00
62ac9cba9c (Python Object API)
setting object layers didnt break once the base of an object was found.
DAG update and countall ran even when the object wasnt in the scene.
2007-06-22 13:38:15 +00:00
39a526a963 Python PyMethodDef supports single argument methods (METH_O) but was using METH_VARARGS everywhere and getting the single args from the tuple.
Use METH_O where applicable.
2007-06-16 12:24:41 +00:00
91ea74c339 adding object.matrixParentInverse 2007-05-28 03:09:46 +00:00
30dd4fafd1 More memory leaks fixed - in IDProp, Bone.head, tail, matrix, ob.DupObjects (my fault) and in Effect module as well as a few others.
Also stopped using Py_BuildValue for strings, ints and floats.
2007-05-26 04:39:31 +00:00
f231bd0d57 Many long standing memory leaks fixed in the BPY api.
Data from Armature.c and logic.c still leaks.

Mostly todo with PyList_Append adding a refcount and the bpython api not decrefing.

Also added some features needed to fix a bug in mesh_clean.py (ob.pinShape and ob.activeShape)
2007-05-25 16:43:25 +00:00
05dcd05520 Python bugfix reported by reD_Fox1
ob1.shareFrom(ob2) - didnt work with the new type/realtype method of making sure all new objects were emptys until they were linked to data and the realtype is used.
2007-05-16 12:26:17 +00:00
66ffd1d207 more epy doc updates
added a constant dict "Blender.Object.IpoKeyTypes" to pass to ob.insertIpoKey(keytype), previously these constants were not documented well and added to Blender.Object directly
2007-05-05 06:09:03 +00:00
0c7e145dce Object.c - made object action writable
gen_library - fixed bug, wasnt adjusting user counts properly.
bpy_data.c - added default new names for new data
2007-04-25 00:37:19 +00:00
94ad8c810c Changed TESTBASE and TESTBASE_LIB to check the hidden flag
Checked every instance of testbase to see this dosnt break anything, also changed TESTBASE and TESTBASELIB, both were used incorrectly in places.

added error_libdata() for library error messages that are everywhere.
added object_data_is_libdata to test if the object and its data's are from a library.
fixed 2 crashs in adding Curve points to a library object (remember to check, verify_ipocurve returns NULL!)
made duplicating and making dupli's real for lib objects possible, disabled joining into lib armatures and meshes.
2007-04-22 22:08:19 +00:00
c97be098f7 Python API
made all libdata hashable - use the object type,name and lib for the hash.
added .tag to libdata so we can test if data's been processed without using dictionaries
added libdataseq.tag (write only) setting the tag flag (which can always be dirty)
2007-03-26 02:10:24 +00:00
Ken Hughes
b00f592992 Python API
----------
Bug reported on IRC:  Object.setEuler(0,0,0) threw an exception.  Change so
it will accept (0,0,0), ((0,0,0), ([0,0,0]), or an euler.
2007-03-17 03:19:41 +00:00
ee5dc4d0bf removed duplicate functionality, macro's and functions existed to check a PyObjects type, now only use macro's 2007-03-15 01:09:14 +00:00
5c5a80f644 made all python types that can do .__copy__(), also do .copy()
added copy function to lamp, texture and ipo types
2007-03-14 03:01:24 +00:00
d3ae4b9944 disabled Object.Duplicate() in background mode bacause it needs the 3d view, added a note in the docs. 2007-03-14 02:11:42 +00:00
e0c77c0f14 made all data adding functions accept a name such as add_mesh or add_curve, previously only some datatypes adding functions accepted a name.
also updated the Bpy.py epydocs
2007-03-11 16:25:17 +00:00
1135434ed1 moved python functions that deal with blender libdata into gen_library.c from gen_utils and BPY_interface
small cleanup, removed unused functions and explicetly cast pointers..
2007-03-11 04:05:45 +00:00
a8695b1c6e removed python oops access, (was unreliable and nobody used it)
oops data access need to be done differently.

Blender.sys fix for win32 path bug 6193
2007-03-10 11:47:24 +00:00
5eaf9f90c1 BPython API
added a function - GenericLib_assignData for assigning blender data, to assign an ipo to a camera or world to a scene for instance.
Using this function removed ~300 lines of code.
also fixes user count error in some places that didnt check.

also made it possible to clear the colorband by setting it to []
2007-03-08 14:37:34 +00:00
Ken Hughes
69dc499ee7 Python API
----------
Add some missing Py_DECREF() calls.
2007-03-07 00:56:09 +00:00
585edac6d2 various warnings fixes - mostly casting and initialization issues 2007-03-01 21:30:48 +00:00
436e1697fd made attributes (name, property, users, fakeUser, lib) into functions all python types can use.
removed a lot of code duplication when moving to this.
Also removed unused functions GetMaterialByName(), same for Mesh, Object, World etc.
2007-02-25 07:36:50 +00:00
75147698e2 Scene
* Moved to getsetattrs
* added scene.users (get)
* added scene.fakeUser (get/set)
* added scene.world (get/set)
* added scene.timeline (get)
* added scene.render (get)
* added scene.radiosity (get)
* added scene.objects.camera (get/set)

Group
* added properties

gen_utils
* made getScriptLinks work as documented, return an empty list rather then None.

header files, noted libdata after PyObject as a requirement.

Others,
* Deprecate prints for older functionality

EpyDocs still need updating.
2007-02-25 01:07:28 +00:00
086d51c822 BPython API
* Added data.lib attributes to almost all data types, (except for Text3d and NLA)
  This is None or the path of the library as a string.
* Main was giving a warning, Include Curve.h rather then CurNurb.h
* Added Library.LinkedLibs(), returns a list of externaly linked libs.
2007-02-23 14:51:20 +00:00
a2ce2600d9 renamed posebone.ik to hasIK, removed unused code, made the function name of Armatue's py object from Blender object consistant with others. 2007-02-21 23:14:01 +00:00
64231d19bf Object parentType could never match Object.ParentTypes.LATTICE, Id incorrectly assigned the lattice constant. Armature and Lattice parent types are the same. documented this. 2007-02-20 09:23:13 +00:00
Ken Hughes
4aa33f5633 Python API
----------
Bugfix for problem reported with ac3d importer; Object_getData() wasn't
setting the real object type before calling EXPP_add_obdata().
2007-02-14 17:40:31 +00:00
Ken Hughes
148a74988e Python API
----------
Replacing locally-declared function prototype with included one.
2007-01-25 19:31:39 +00:00
4d44475543 Bugfix #5732
Python scripts: when setting a layer for an object, the function assumed
the object had to be in the current scene, thus ignoring layers for other
objects.

Now the object->lay value is set always.
2007-01-17 21:07:10 +00:00
048bb84f82 Cleanup of pose insert methods for Armature objects, as planned in the post to bf-python.
Two sensible methods left in: armatureobject.insertPoseKey and .insertCurrentPoseKey,
but still left unofficial i.e. not published in the api doc yet, because of additional
error checking is still needed and more testing too. But at least is now in better shape to
work on to be published in a later release.
2007-01-15 16:00:36 +00:00
Ken Hughes
1a4e64cd02 Python API
----------
Bugfix: Object.setEuler() didn't accept an Euler object.
2007-01-12 22:15:33 +00:00
8ea2b66810 Made it possible to copy modifiers from the python API
ob1.modifiers = ob2.modifiers
2006-12-28 06:47:56 +00:00
Ken Hughes
a5c188b4a6 Python API
----------
Bugfix. Refactor from a few months ago broke ob.loc; it only accepted a tuple
of 3 floats instead of a list.  Make it accept both types now.
2006-12-27 18:39:39 +00:00
9afe662c12 renameing datablocks was imposing a name limit on the python side.
This isnt needed because the limit is alredy being set by rename_id()
some other minor changed- use None returning maro
2006-12-27 05:04:20 +00:00
Ken Hughes
e6381a04d6 Python API
----------
Bugfix: fix my own over-optimization in insertIpoKey(), allow IPOKEY_LOCROT
and IPOKEY_LOCROTSIZE to again set rotation and size Ipo curves.
2006-12-26 19:47:34 +00:00
46924d32f4 Camera.c refactor, moved to getsetattrs. deprecated get/set functions. and added access to all camera settings.
cam.type now uses 'ortho' and 'persp' rather then 0 and 1

group.c and object.c, minor cleanup
2006-12-26 07:00:32 +00:00
470f91b506 object_cookie_cutter - use edge keys
widgetwizard - made a mistake in last commit, works and also dosnt creash with bug.
https://projects.blender.org/tracker/index.php?func=detail&aid=5289&group_id=9&atid=125
Can others test so we can close?

Object_join was messing up object usercounts
2006-12-26 01:45:58 +00:00