Commit Graph

88 Commits

Author SHA1 Message Date
9c9099a805 formatting edits in py api, no functional changes 2011-12-18 08:50:06 +00:00
6ec3313e2d Fix: defining properties would fail with argument update=None instead of not
specifying the argument.
2011-11-29 22:57:35 +00:00
d52a811052 minor bpy api edits
- strict check for rna properties
- formatting edits (120 line width)
- use PyDoc_STRVAR macros for getset docstrings
2011-11-26 15:18:30 +00:00
d6c1009195 bytestring support for py/rna - this is so py can access data which
isn't meant to be accessed as unicode text.
2011-11-15 07:09:41 +00:00
0b1066af8e fix [#29251] Properties options={'SKIP_SAVE'} not working, patch attached
patch from Domino Marama (domino)
2011-11-14 15:05:41 +00:00
2b939904ab documentation - brief descriptions for bpy api files. 2011-11-05 08:21:12 +00:00
62f2218554 macro formatting & remve some unused code. 2011-11-05 05:44:52 +00:00
665f602f15 python string conversion
- use _PyUnicode_AsStringAndSize where possible
- use %R for PyErr_Format(...) rather then running repr on the object explicitly 
- use const char
2011-11-03 14:09:18 +00:00
4a04f72069 remove $Id: tags after discussion on the mailign list: http://markmail.org/message/fp7ozcywxum3ar7n 2011-10-23 17:52:20 +00:00
61389bba41 fix spelling mistakes in comments (and in some python error messages), nothing to effect translations. 2011-10-17 06:39:13 +00:00
276e5f7095 formatting edits & remove debug print. 2011-10-13 01:29:08 +00:00
c27926896f spaces -> tabs (whitespace only changes) 2011-10-06 22:04:01 +00:00
5e3110af05 add support for a 4th item for rna property enums in python so the numeric value can be passed, this is so you can animate the enum and keep the values even if you add items in the middle of the enum. - request from ZanQdo. 2011-09-28 09:18:20 +00:00
aaae90af33 fix [#28751] Item in Enum propertie is grayed out
was infact a very old bug where an empty title took the following word for the title, eg: "%t|First Item|Second Item"
the first item would be evaluated as a title.
2011-09-27 16:23:40 +00:00
943a026c60 py/rna string subtypes for strings which should be automatically translated:
layout.prop("blah", text="Translate Me!")
2011-09-21 13:53:35 +00:00
fa2ba5fbf5 - use static vars and functions where possible.
- use NULL rather than 0 when used as pointers.
2011-08-28 05:06:30 +00:00
de0db6c8da unit arg for FloatVectorProeprty 2011-08-02 10:56:09 +00:00
7cbc4c0dd7 IDProperty python module update
- add support for IDProp array slicing, but not resizing.
- rename array attribute type to typecode and use chars 'f', 'd', 'i' which match pythons array module. (was using int's which only have a meaning internally).
- rename function 'convert_to_pyobject' to 'to_dict' and 'to_list' for IDProp group and array types respectively.
- remove 'len' array attribute, calling len(array) is fine.
2011-06-17 05:45:46 +00:00
e44ae2c2a9 disable the readonly state while rna property callbacks run. 2011-06-07 16:08:49 +00:00
9c8cc9fe60 rna option not to save certain properties for redoing later, currently only used by operator presets. 2011-06-07 10:54:57 +00:00
617a08162f update ctest md5sums for import/export to match changes to the scripts, also some minor formatting change for bpy_props.c 2011-06-07 08:47:33 +00:00
8cee328546 Support for update callbacks in python defined RNA properties as discussed last meeting.
This means script authors can perform actions using these callbacks rather then on drawing which puts blender in a readonly state.

Simple example:

import bpy
def up_func(self, context):
    print("test")

bpy.types.Scene.testprop = bpy.props.FloatProperty(update=up_func)
bpy.context.scene.testprop = 11

# prints -> test
2011-06-06 17:50:20 +00:00
7ee9becfa3 disable python/string enum duplication from last commit because the array of duplicated strings can be freed and the pointers to the strings referenced still, the problem with python freeing strings that RNA references remains. 2011-06-03 04:39:18 +00:00
089d997cbc when making the C/RNA copy of the python enum, duplicate all strings since theres no guarantee python wont free them immediately after, though in practice this isn't so common. 2011-06-03 04:21:41 +00:00
5332c602c9 pre-allocate the array when converting py/rna enums, also fix for memory leak with bad values. 2011-06-03 03:19:22 +00:00
d46da5a09d mathutils support for color arithmetic, also some minor whitespace edits. 2011-06-02 08:29:16 +00:00
78d41d061b sphinx docstrng formatting (some lines were getting really long) 2011-05-26 19:13:01 +00:00
57c3c9e70f support for dynamic items in bpy.props.EnumProperty(), the items keyword argument can optionally be a function rather then a list. 2011-05-26 16:07:28 +00:00
15289c6048 use PyDoc_STRVAR macro, so its possible to build without docstrings. 2011-05-24 16:05:51 +00:00
f86565c90e whitespace edits for bpy api, split some really long lines. 2011-04-30 13:58:31 +00:00
f9f771cd01 converted more mixed tab/space indentations to tabs. only whitespace changes. 2011-04-21 15:53:30 +00:00
6bb626f253 minor changes
- remove some warnings
- fix typos
- cmake allow in-source build (when WITH_IN_SOURCE_BUILD is defined)
- cmake, use an explicit list of rna files (don't glob)
2011-04-21 05:49:47 +00:00
cadc1218c8 C, style changes (mostly white space edits), no functional change. 2011-03-19 11:12:48 +00:00
e2304a4dbb move anim functions out of bpy_rna.c, its getting too big. 2011-03-02 04:51:43 +00:00
Nathan Letwory
5a760e22fc doxygen: blender/python tagged. 2011-02-27 20:10:08 +00:00
Nathan Letwory
5b607701a7 doxygen: prevent GPL license block from being parsed as doxygen comment. 2011-02-23 10:52:22 +00:00
6524d27462 py api was raising SystemError exception incorrectly, this is intended for internal interpreter problems.
Replace most with RuntimeError.
2011-02-18 06:04:05 +00:00
4c35d8d5a8 rename IDPropertyGroup to PropertyGroup
also renamed IDProperty to PropertyGroupItem (these are not referenced for common usage and we already have 'Property' defined).
2011-02-16 02:51:56 +00:00
d5316768c3 corrention for bpy.props docstrings. 2011-02-15 11:43:35 +00:00
72bc3f22b7 python api renaming and added headers for some files which didnt have one, no functionality change. 2011-02-14 04:15:25 +00:00
0955c664aa fix for warnings from Sparse static source code checker, mostly BKE/BLI and python functions.
- use NULL rather then 0 where possible (makes code & function calls more readable IMHO).
- set static variables and functions (exposed some unused vars/funcs).
- use func(void) rather then func() for definitions.
2011-02-13 10:52:18 +00:00
d272b70ee0 rename ID.update() --> update_tag() since this function only tags for updating and scene.update() executes the update. 2011-02-07 08:13:28 +00:00
dc30caab61 fix for crash when assigning unsupported type to collection properties. 2011-01-26 12:44:09 +00:00
ba96f02d4a use fast sequence functions for python's bpy.props.EnumProperty() arg parsing. 2011-01-16 10:36:27 +00:00
4dd92a988a Defining bpy.props.EnumProperty(... , options={'ENUM_FLAG'}) wasnt working right with default values. 2011-01-16 10:08:20 +00:00
c9f353956c use PySequence_Size() rather then PySequence_Length(), this is only kept in python for backwards compatibility. 2011-01-09 14:53:18 +00:00
89c9aaaa25 remove references to BKE_utildefines where its not needed.
- move GS() define into DNA_ID.h
- add BLI_utildefines as an automatic include with makesrna generated files.
2011-01-07 19:18:31 +00:00
8f21a43535 split BKE_utildefines.h, now it only has blender specific defines like GS() MAKE_ID, FILE_MAXDIR, moved the generic defines to BLI_utildefines.h.
no functional changes.
2011-01-07 18:36:47 +00:00
a4b410af3d Expose access to PROP_ENUM_FLAG from bpy.props.EnumProperty(), this is exposed as a python set(). The default value is also a python set() so multiple booleans can be used in the 1 property.
Also added PROP_ENUM_FLAG support to operator printouts.
2010-12-13 09:10:16 +00:00
263830f000 Enabled GCC -Wwrite-strings warning for CMake and replaced many 'char's for 'const char's,.
Only one functional change where Transform orientations passed "" to BIF_createTransformOrientation() which could then have the value written into.
2010-12-03 17:05:21 +00:00