Commit Graph

30 Commits

Author SHA1 Message Date
8ec207efcb fix from stable - was missing a NULL check 2007-08-31 18:21:12 +00:00
84749aa3ff Python API, more METH_VARARGS to METH_O 2007-06-16 13:17:41 +00:00
d76778f0e4 2 new python functions for the NLA.
action.getChannelNames() and action.renameChannel(from, to)

editaction.c - maximum new name length was too short
2007-04-20 23:33:56 +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
52e43441d1 removed unneeded dealloc functions 2007-03-15 01:47:53 +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
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
585edac6d2 various warnings fixes - mostly casting and initialization issues 2007-03-01 21:30:48 +00:00
a05f95f347 Image.c
* moved to getseters (use new generic ID funcs)
* added 'reflect' attribute

Text.c
* moved to getseters (new generic ID funcs too)

NLA.c
* moved to getseters (ditto)

Ipo.c
* bugfix, allow nested loops on an IPO's curves.

Blender.c
* removed undocumented function RemoveFakeuser, since actions now have the fakeUser attribute.
2007-02-25 12:41:50 +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
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
dda63a9dde added comparison function to many python types so you can do == and =! 2006-10-06 16:48:28 +00:00
82b40b1fc4 Adds groupTarget get/setters to the NLA API. Takes an object and returns an
object. groupTarget tells the animation system which object within a
dupligroup should be used for NLA. Equivalent to filling in the "target"
field in the NLA N-key panel.

Set groupTarget to None to remove the target.

Also, cleaned up some bad copy and pastes in existing NLA docs.

Also, cleaned up some bad copy and pastes in existing NLA docs.
2006-08-31 16:30:14 +00:00
Ken Hughes
b4717d93a4 ===Python API===
Fix uninitialized pointer bug in ActionStrips.remove(), caused by too zealous
code optimization and insufficnet gcc warning flags.  Thanks to Roland for
catching it.
2006-08-30 21:45:27 +00:00
bd8cd6a38c noticed my BVH test import blender was 30meg+ turns out to be
python new action function (M_NLA_NewAction) was making actions with 2 users, so that acrions would never de-allocated,

alloc_libblock alredy assigns a user, so just dont assign another from M_NLA_NewAction.
2006-07-22 14:22:03 +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
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
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
Ken Hughes
b22ebe667a Bugfix #3889: action.setActive() was not adjusting id.us count correctly when
a new action was set to active.
2006-04-20 02:42:53 +00:00
Chris Want
c8b48e70e6 Final merge of HEAD (bf-blender) into the orange branch.
Here are my notes on things to look out for as potential problem
spots:

source/blender/blenkernel/intern/displist.c:
+ is initfastshade(void) supposed to be empty? I had
to make it empty to get the merged tree to compile.

source/blender/python/api2_2x/Armature.c:
+ went with the version that had Armature_getLayers()

source/blender/python/api2_2x/Object.c
+ went with the version of Object_getPose() from bf-blender.
(#ifdef 0-ed the other version)

source/blender/python/api2_2x/Pose.[ch]
+ had problems linking due to no Pose_Init() ... copied these
two files straight from bf-blender.

source/blender/src/drawview.c:
+ view3d_panel_properties() had things shifted a few things shifted
a few pixels, otherwise, things were painless

source/blender/src/splash.jpg.c:
+ went with bf-blender version (orange is dead)

source/gameengine:
+ went with bf-blender version -- does not compile due to IMB_rect* stuff,
Ton should look into this.
2006-01-28 16:35:18 +00:00
5f0232f68f *pose code for python
- adds object.getPose
- ability to manipulate poses /posebones
- fixes a overflow bug in matrix sequence accessor
- adds code to get vec/roll from mat3
- few internal fixes to NLA
- ability to set bone matrices
2006-01-11 19:40:06 +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
4bd9775936 Stupid me! Committed in wrong console with wrong dir... here's the rest of
all files for the Ipo/Action/NLA makeover...
2005-10-10 18:05:30 +00:00
e60291d39c Header file clean up and warning fixes
- Mostly this cleans up the #includes and header files in the python project.
- Warning fixes are mostly casting issues and misc fixes. General warning clean up.
- #include Python.h MUST come as the first include to avoid the POSIX redefine warning in the unix makefiles
- fno-strict-aliasing flag added to makefile to fix a unavoidable type punning warning in types.c
2005-07-18 03:50:37 +00:00
Stephen Swaney
0fdc0ce297 Another step in the Big Bpy Cleanup.
- move static declarations and data definitions out of headers.
  the BGL module still need cleaning.

- move declarations out of modules.h and into appropriate .h files.
  modules.h still exists as a container for the few modules that
  need to #include almost everything.

- all files now have a $Id tag and have been formatted by indent

there are no changes to executable code.

pre-commit versions are tagged with bpy-cleanup-pre-20041007
for the sake of paranoia.
2004-10-07 19:25:40 +00:00
Stephen Swaney
a509b8adc9 Another round in the Great BPy Cleanup:
Run everything thru indent to cleanup spaces vs tabs.
Clean up some of the comments by hand.
BGL.c was not touched due to all that macro wackyness.

There are no functional changes to the code.
Pre-indent versions of source are tagged with
tag bpy-cleanup-20040925 , just in case.
2004-09-25 20:30:40 +00:00
Stephen Swaney
a2ea84903e One small part of the Great Bpy Code Cleanup.
Add cvs $Id tag to files
2004-09-18 18:47:03 +00:00
Stephen Swaney
a703837179 Replace deprecated methods from old api:
PythonReturnErrorObject
  PythonIncRef

Fix some compiler warnings about missing initializers
in method tables.
2004-06-06 22:42:51 +00:00
a6a32cf504 -NLA module added
-ability to set poses for the armatures - allows for keyframing armatures
-adds support for actions/actionchannels
-additional checking for addBone and clear parenting
-moved getActionIpos from object module to NLA module
2004-04-19 06:57:41 +00:00