Commit Graph

36 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
85bbc4c3e2 Mesh.c - added missing error checking for vert ranges and that verts are valid.
Mesh.c - removed unneeded checks for creating ints.
Text3d.c - own error - setting the 3d text didnt work, 1 liner fix.
2007-06-28 13:46:42 +00:00
84749aa3ff Python API, more METH_VARARGS to METH_O 2007-06-16 13:17:41 +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
9b88fb13f5 Adding Text3d.JUSTIFY, thanks "Oliver Schneider" <oliffm@web.de> 2007-05-28 17:06:03 +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
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
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
59ff076d03 Main
* Added bpy.*.new() - works for all except sound and font types
* Added bpy.*.load() - works for sound, font and image types

Text3d - removed unneeded check.
2007-03-10 09:43:43 +00:00
ffab782e4c Added functions to Text3d that allow modifying of text frames
* .addFrame()
* .removeFrame(index)

getseters
* .activeFrame
* .totalFrames
* .frameWidth
* .frameHeight
* .frameX
* .frameY
2007-03-03 14:05:36 +00:00
ebc042a808 World.c
* moved to getseters with id attribs
* added 2x missing checks for list size when parsing args.

Text3d.c
* use getseters with id attribs
* added a comparison function
2007-02-25 17:38:22 +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
Stephen Swaney
1eb2724983 bugfix for #4533 Text3d.Get() fails in retrieving Text3d objects
The objects were returned properly, however the repr() method was
printing "" making it look like the Get() failed."
2006-07-01 16:59:10 +00:00
c4abb5e7ca a little clean of no used line
.
2006-05-28 17:17:18 +00:00
87949e5c67 warnings cleanup for the python project on windows 2006-04-24 15:09:07 +00:00
Stephen Swaney
342bb99a19 a little spring cleaning to remove some compiler warnings for
implicit declarations, redundant redeclarations, missing initializers,
nested externs and other cruft.

Cleaned up includes and moved extern _Type decls from Types.h into
Types.c since that is the only place where they are needed now.

Did not touch Ipo.[ch] since work is on-going there.
2006-04-16 15:28:50 +00:00
4c966a3141 assignment typo: had == instead of =
Reported by jkw on the forums.
source/blender/python/api2_2x/Text3d.c

Kent
2006-02-13 01:25:03 +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
Mika Saari
a6bd07d10f Text3d.c NULL pointer check added to get rid of MEM_freeN warning. 2005-09-29 19:25:12 +00:00
Mika Saari
83b2d267b5 cu->strinfo reallocation added to Text3d.c, so when setText is executed
the strinfo is reallocated to include strlen(cu->str) amount of free memory
2005-09-29 19:03:53 +00:00
Alexander Ewering
76a57eb82f Fix Python API to correctly create Text3D objects. This is just a
temporary fix (duplicating code again), the *real* fix would be to once
make one central function to create and init a text object for all
places...

I also tried to introduce compatibility code to be able to load old files
with broken text objects (cu->tb == NULL due to missing init code).

Hope it works :)
2005-09-29 15:46:06 +00:00
8b060dd5ad - update to constant.c
- give it the key/items interface
  - creates some factory functions for const generation
- genutils methods
  - method for getting module constants
  - method for throwing errors with a print string
- updates to function names
- clean up interpreter launch a bit
2005-08-17 14:26:00 +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
23980dd6b0 - fix what appeared to be obvious bug, "if (fclose) fclose(file)" ->
"if (file) fclose(file)", Text3d.c owner should check.
2005-07-09 17:54:03 +00:00
3d4438dcd7 Scripts:
- Campbell Barton updated his Wavefront obj importer;
- Jean-Michel Soler updated his paths import (eps part).

BPython bug fixes:

- oldie found by Ken Hughes: reference count of two pyobjects not being decremented in slider callback (Draw.c):
http://projects.blender.org/tracker/index.php?func=detail&aid=2727&group_id=9&atid=127

- Gergely Erdelyi found that setText() in Text3d module was not updating str length var, leading to mem corruption and provided a patch:
http://projects.blender.org/tracker/?func=detail&aid=2713&group_id=9&atid=127

- doc updates (suggested by Campbell)

Thanks guys.
2005-06-12 05:54:15 +00:00
f38e0686d9 new round of warning fixes. we are now down to 24 with Xcode on blender
alone with the following flags :
-Wall -Wno-char-subscripts -Wno-missing-braces.

the only one still worrying me is in rand.c line 57 :

rand.c:57: integer constant is too large for "long" type

but i have no clue about how correct cross-compiler and 32/64 bits friendly

see also my mail to commiter list for signed/unsigned issues
2005-06-04 16:22:50 +00:00
22f65bce76 erased headers dirent.h and unistd.h
.
2005-05-05 05:55:29 +00:00
273ec4fb26 added load font support to Text3d submodule
.
2005-05-04 21:31:51 +00:00
Stephen Swaney
9465bf6881 Updated Bpy method Object.getData() now supports new Text3d type.
Contributed by Johnny Matthews.
2005-03-26 18:14:29 +00:00
cbbe236f92 - patch submitted by guitargeek
-includes:
*Text3d accessors - ablity to manipulate FONT objects through python
*update to Object.link - calls text_to_curve upon ob_font link for drawing
*update to constant.h - constant type checking define
*update to curve.c - clamp values on getters/setters
*clean up of Text3d module
2005-03-19 03:24:00 +00:00
c78e44cdc5 big warning hunt commit
lot of casts, added prototypes, missing includes and some true errors
2005-03-09 19:45:59 +00:00
Stephen Swaney
a1f97a01e4 fix warnings about implicit declarations.
overlooked by being in a hurry.
2005-03-07 03:31:14 +00:00
Stephen Swaney
454041cc4f New Bpy type Text3d for accessing Blender's Font objects.
Contributed by Joilnen Leite (pidhash).
2005-03-06 14:55:00 +00:00