Commit Graph

1514 Commits

Author SHA1 Message Date
cf38b933f3 Fix T42005: Reset py-handlers could crash
Wasn't acquiring the GIL.
2014-10-13 17:45:40 +02:00
8d084e8c8f Ghost Context Refactor
https://developer.blender.org/D643
Separates graphics context creation from window code in Ghost so that they can vary separately.
2014-10-07 15:47:32 -05:00
cbe68f70a8 Cleanup: spelling 2014-09-29 15:51:47 +10:00
a2386b3e20 Fix previous commit rB34abb614f1344a6, which broke addons translations.
Ghash comp callbacks must return false in case a & b are equal!

Also slightly cleaned up gash code using those comp func,
since those return booleans now, let's compare tham against booleans!
2014-09-25 14:33:19 +02:00
34abb614f1 Fix ghash comparator used by translation
It now need to return bool whether element matched or not.
2014-09-25 17:04:56 +06:00
e18906bda2 remove invalid comments 2014-09-09 12:21:28 +10:00
55cacb2e63 Add callback for starting a render-job
We had complete/cancel, but no matching init for rendering,
render_pre/post callbacks aren't always usable.
2014-08-29 16:17:31 +10:00
21a7433faa Fix T41473: Cycles volume rendering is too dark
The issue was caused by the changed defaults from the Cycles side.
Because of those properties being saved as an IDProp and not being
saved to the file, every change to the defaults would ruin someone's
day updating the values.

Added a bpy.app.handler.version_update which is run after the regular
do_versions() are done and could be sued by the scripts to apply
versioning code on their settings.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D761
2014-08-28 18:59:24 +06:00
3ba28a2609 Python API: support thick wrapped int arrays
add bpy.data.version, needed for Python versioning code.
2014-08-25 23:57:03 +10:00
dfd9bfd3a8 Spelling 2014-08-13 08:38:16 +10:00
d4599ff001 Fix T40766: Startup fails with UnicodeDecodeError on Windows 2014-08-11 17:53:42 +10:00
00b29156e0 Defines: replace ELEM3-16 with ELEM(...), that can take varargs 2014-07-20 01:33:40 +10:00
b6e0dc2237 Added missing G_DEBUG_DEPSGRAPH flag entry in the bpy.app.debug getters/setters list. 2014-07-02 09:31:14 +02:00
9f05588b68 Python: remove redundant casts 2014-07-01 14:10:59 +10:00
414c70435d T39690: Modifications to Blender's 'temp dir' system.
Current temporary data of Blender suffers one major issue - default 'temp' dir on Windows is never
automatically cleaned up, and can end being quite big when used by Blender, especially when we have
to store per-process data (using getpid() in file names).

To address this, this patch:
* Divides tempdir paths in two, one for 'base' temp dir (the same as previous unique tempdir path),
  the other is a mkdtemp-generated sub-dir, specific to each Blender instance.
* Only uses base tempdir when we need some shallow persistance accross Blender sessions - and we always
  reuse the same filename (quit.blend...) or generate small file (crash reports...).
* Uses temp sub-dir for heavy files like pointcache or renderEXRs (Save Buffer option).
* Erases temp sub-dir on quit or crash.

To get this working it also adds a working 'recursive delete' to BLI_delete() under Windows.

Note that, as in current code, the 'recover render result' hack-feature that was possible
with SaveBuffer option is still removed. A real renderresult cache feature will be added
soon, though.

Reviewers: campbellbarton, brecht, sergey

Reviewed By: campbellbarton, sergey

CC: sergey

Differential Revision: https://developer.blender.org/D531
2014-06-23 13:42:54 +02:00
f94b87bbb8 New python API for units handling.
Exposes all supported unit systems & types, and to_value()/to_string() functions.

Reviewed and enhanced by CampbellBarton, many thanks!

Differential Revision: https://developer.blender.org/D416
2014-06-17 16:03:40 +02:00
f2a0062042 Use ARRAY_SIZE to replace (sizeof(a) / sizeof(*a)) 2014-06-17 02:47:57 +10:00
6b2689c3f2 Fix T40191: Misleading TypeError message when registering CollectionProperty wtihout kwarg "type".
Turned up to be a cleanup of doc in that whole module...
2014-05-14 17:50:32 +02:00
c88e65da61 Code cleanup: comment typos 2014-05-11 16:22:05 +10:00
5e3509e2d2 Remove redundant NULL check 2014-05-07 14:14:27 +10:00
b75b0a11e0 Update parse_syntax_error() to Python 3.4x version 2014-05-02 06:24:29 +10:00
35ca209152 Code cleanup: remove unused kludge for Py/Win encoding 2014-05-02 00:56:24 +10:00
bb5b608deb Fix T31555: Username with special chars in Windows 7
At last! Could not check seriously on windows (though it was done during py patch
process).
2014-05-01 16:25:39 +02:00
af86b008b2 Include removal gave problems with windows, ifdef some back in for windows only 2014-05-01 07:21:08 +10:00
cb48c0ceea Revert "Fix msvc 2013 compiler errors after the ingenious cleanup in 4ca67869cc7a."
This reverts commit a47a4ef82f.
2014-05-01 07:20:46 +10:00
a47a4ef82f Fix msvc 2013 compiler errors after the ingenious cleanup in 4ca67869cc. 2014-04-30 23:16:12 +02:00
4ca67869cc Code cleanup: remove unused includes
Opted to keep includes if they are used indirectly (even if removing is possible).
2014-05-01 04:47:51 +10:00
4d1a109dde Fix T35176: Python fails with blend files from non-ASCII paths
Thanks to Tamito for updating the patch to support Freestyle!
2014-04-30 23:43:01 +10:00
b96d531bc9 Python: move to version 3.4x on all platforms 2014-04-30 23:19:16 +10:00
a91c4ac99f Ignore user-preferences when inserting keys from Python 2014-04-29 07:35:04 +10:00
e73d0f57a3 Code cleanup: use 'const' for arrays (python) 2014-04-27 00:25:15 +10:00
a15b3c4d11 Code cleanup: use bool 2014-04-11 11:33:29 +10:00
a91247c2b4 Code cleanup: unreachable break/return 2014-03-19 12:47:09 +11:00
a8dc5b274b Alternative fix for T38753, use existing __file__ in namespace 2014-03-06 03:31:00 +11:00
433b20b7ea PyAPI: correct warning with dynamic enums 2014-02-28 21:26:19 +11:00
18f6bb04fa Fix for custom property editor when property id's contained quotes
Adds bpy.utils.escape_identifier()
2014-02-25 16:19:57 +11:00
99edd29835 Fix T38753: Python script paths weren't escaped (Win only) 2014-02-22 17:54:50 +11:00
5621e63d36 Code cleanup: duplicate headers 2014-02-14 10:55:38 +11:00
a397009181 Fix T38541: sys.exit fails when blender is built as a py-module 2014-02-13 06:58:06 +11:00
a8a567d28e RNA: add flag to be used for changing numbers proportionally 2014-02-09 06:30:48 +11:00
06e0e3fb8a Py Docs: move bpy.props options and subtype flags into generic defines
added some missing flags into docs too.
2014-02-09 06:26:55 +11:00
d900f5be55 Code cleanup: use bools where possible 2014-02-03 19:35:44 +11:00
2011156eec Fix for crash linking node groups through bpy.data.library
Defer creating the Python objects until after appending is finished
because NodeTree's types are not initialized until then.
2014-01-31 00:56:19 +11:00
299180f3c6 Fix T36955: API docs referred to sys.maxint which does not exist in Python 3. 2014-01-29 16:49:12 +01:00
a5c35fb27f Code cleanup: use booleans where appropriate 2014-01-28 04:00:04 +11:00
85a3d51078 Fix for own refcount error in recent commit 2014-01-21 14:23:39 +11:00
e9efde2a05 Fix T38297: missing StringProperty subtype 'PASSWORD' in API docs. 2014-01-20 22:01:11 +01:00
2e01f38885 Python API: fix for help() failing on bpy instances
Caused by missing __name__ from bpy.types (alternate method to patch D232)
2014-01-20 18:13:15 +11:00
a696a0ff1e Python API: create args for meta-classes directly (a little faster).
Also add some new interned strings.
2014-01-20 18:09:00 +11:00
348cf17448 Code Cleanup: no need to pass empty strings as default values 2014-01-16 22:00:29 +11:00