Commit Graph

1107 Commits

Author SHA1 Message Date
Campbell Barton e2eea6c38d fix/workaround [#31555] Username with special chars in Windows 7
Theres a bug where python/windows ignores PYTHONIOENCODING, workaround this by manually overriding the stdout/stderr.
2012-09-05 09:33:15 +00:00
Campbell Barton 71d1b09708 minor code cleanup 2012-08-25 12:55:14 +00:00
Campbell Barton 1939baa47d style cleanup 2012-08-22 16:44:32 +00:00
Campbell Barton 4a6395cc21 fix for own error in bpy.utils.blend_paths() arg parsing. 2012-08-20 10:14:11 +00:00
Campbell Barton 0b5a995cfd code cleanup: rename G.rt to G.debug_value 2012-08-08 18:21:54 +00:00
Campbell Barton e9d73dbba5 use -FLT_MAX where FLT_MIN was misused 2012-08-07 19:49:38 +00:00
Campbell Barton 719aedaf60 mask - draw both sides of the curve when filled option is disabled. 2012-08-07 13:37:16 +00:00
Campbell Barton b218d90176 fix a crash when python is registering enum properties and the items argument is a generator (some sequence type besides a list/typle), in this case it could free the strings before blender duplicates them.
this fixes [#32192] Import Images as Planes script is broken
2012-08-07 10:03:14 +00:00
Campbell Barton 0a35e050f3 code cleanup: remove redundant calls to CTX_data_main() 2012-08-05 14:11:51 +00:00
Lukas Toenne dee1d86e65 Fix for RNA struct registration: the bpy_class_validate function would only check the immediate functions/properties of the pointer struct type, but not potential base structs. Now it first validates the base struct recursively before the actual properties of the registered class.
Does not have any effect for current registerable types (Operator, Menu, Panel, etc.), since none of those actually have a base struct, but will be required for future types with an actual hierarchy (custom nodes).
2012-07-24 12:00:02 +00:00
Campbell Barton 32cf7fcdb1 code cleanup: spelling 2012-07-16 23:23:33 +00:00
Campbell Barton b91bc4f037 use gcc attrubutes to warn on unused return values and arguments which shouldnt be NULL.
also remove IDP_AppendArray's return value which wasnt the new item in the array (which is odd/misleading), but wasnt used anywhere either.
2012-07-08 06:00:27 +00:00
Campbell Barton cfb7aee017 style cleanup 2012-07-07 22:51:57 +00:00
Campbell Barton 84bf3e48c0 style cleanup: use c style comments in C code 2012-07-06 23:56:59 +00:00
Campbell Barton 314a275850 fix (actually nasty workaround), for groups incorrectly drawing in the object panel when the blend file has naming collisions with library data.
also minor style cleanup in bpy_rna.c
2012-07-03 10:32:10 +00:00
Campbell Barton a09feb7386 option so operators can be executed with undo enabled (and redo). 2012-06-27 21:41:17 +00:00
Campbell Barton 15cb064e1b style cleanup 2012-06-25 07:24:48 +00:00
Campbell Barton f6e21881f5 change RNA_struct_find_function to accept a type rather then a PointerRNA, add a check duplicate functions are not defined. 2012-06-10 13:34:59 +00:00
Campbell Barton 2f60d9b0b9 fix for un-handled exception when entering in multiple values to a button, floats were not correctly checked for. 2012-06-09 16:45:42 +00:00
Campbell Barton ed7dbbdfe9 fix for buffer overrun on windows by kjym3 on IRC. 2012-06-07 09:05:51 +00:00
Campbell Barton 1931aac1f7 style cleanup: (indentation) 2012-06-06 14:48:39 +00:00
Campbell Barton 5189356d58 style cleanup 2012-06-04 20:11:09 +00:00
Campbell Barton 46f1671c07 missing from previous commit 2012-05-27 21:56:19 +00:00
Campbell Barton 032d83ecc4 style cleanup: defines with braces 2012-05-27 20:13:59 +00:00
Gaia Clary 352cd241a3 fix [#31597] Operator Preset: Python Warning whenever a preset is executed (seen on Windows) 2012-05-25 14:08:50 +00:00
Campbell Barton dab1d8e487 style cleanup 2012-05-22 22:03:41 +00:00
Campbell Barton 3896ad4cbb code cleanup: spelling 2012-05-20 21:23:26 +00:00
Campbell Barton 2d2d36fe3b code cleanup:
- style - multi-line ifs move braces onto new lines.
- iterators - convert some to macros, other split up and move brace.
2012-05-20 19:49:27 +00:00
Dan Eicher dd7229aee0 Added 'LIBRARY_EDITABLE' flag to bpy.props.*
Rationale: custom props on linked objects are editable through ops and the console but the UI code calls RNA_property_editable() which returns false if (id->lib && !(prop->flag & PROP_LIB_EXCEPTION))

Setting the 'LIBRARY_EDITABLE' flag allows UI templates to change these props (but the changes aren't saved!) for things like indices into CollectionProperties which live on the linked object
2012-05-19 21:22:01 +00:00
Campbell Barton af3e348430 code cleanup: use TRUE/FALSE rather then 1/0 for better readability, also replace do prefix with do_ for bool vars. 2012-05-19 13:28:19 +00:00
Campbell Barton 181f3670c9 patch [#31507] site not automatically imported when using external python package
made some modificatons to normal python startup also.
2012-05-18 10:19:49 +00:00
Campbell Barton c0bd076bfd style cleanup: and add missing files to cmake 2012-05-17 23:12:15 +00:00
Nicholas Bishop ed33320e3f Code cleanup: simplify standard GHash creation.
Added four new functions as shortcuts to creating GHashes that use the
standard ptr/str/int/pair hash and compare functions.

GHash *BLI_ghash_ptr_new(const char *info);
GHash *BLI_ghash_str_new(const char *info);
GHash *BLI_ghash_int_new(const char *info);
GHash *BLI_ghash_pair_new(const char *info);

Replaced almost all occurrences of BLI_ghash_new() with one of the
above functions.
2012-05-16 00:51:36 +00:00
Sergey Sharybin 7b31c3c198 Fix cosmetic typos
Patch provided by Matteo F. Vescovi, thanks!
2012-05-15 16:11:04 +00:00
Campbell Barton b667f29a84 no need to clamp python values twice when assigning. 2012-05-11 10:25:12 +00:00
Brecht Van Lommel d9ce1cda94 Python/context: python could get invalid bpy.data in scene update handler after
undo.

The way this got updated from the context is a bit unreliable, and for handlers
the update couldn't happen because there is no context passed in. Now it's
updated from setup_app_data, which is where the change actually happens. I left
in the other updates to be sure but they should not be needed anymore.
2012-05-08 22:07:06 +00:00
Campbell Barton 4c5502bfd6 code cleanup: function naming for BLI functions. 2012-05-05 00:23:55 +00:00
Joshua Leung 133bdac1d0 Patch [#31279] clarifiy a python error-string (when incorrectly specifying enum
items from python)

Thanks Philipp Oeser (lichtwerk)
2012-05-04 14:34:10 +00:00
Campbell Barton 9fe1fe0aa8 bmesh py api:
add mtexpoly image access
2012-05-01 06:50:43 +00:00
Campbell Barton a5af5e8f50 style cleanup: re - http://wiki.blender.org/index.php/Dev:Doc/CodeStyle#Braces_with_Macros 2012-04-30 16:22:40 +00:00
Campbell Barton ef054e165c style cleanup: format 'for' loop macros the same as for loops, some renaming to BLI_array macros. 2012-04-28 15:14:16 +00:00
Campbell Barton 5c89138684 style cleanup: comments 2012-04-22 11:54:53 +00:00
Campbell Barton 6701933f5c style cleanup 2012-04-21 12:51:47 +00:00
Campbell Barton 6520aa97a9 add 'idprop' module so we can document idprop.types.*, currently doc generator has no access to ID Property types. 2012-04-15 14:54:15 +00:00
Brecht Van Lommel 440f449265 Fix #30858: UI losing buttons at some random moment after using Blender for a
while. This may not fix all cases but should at least solve the issue when
rendering with cycles.

The cause was a race condition on C->data.recursion, with multiple threads
accessing context at the same time. Cycles itself does not access context
from the render thread, but the bpy api would do a context update for any
callback in case e.g. a new file got loaded. Disabled that now in non-main
threads.

The ideal solution would be to not allow any context access at all from threads
but that's not so simple to implement, especially not this close to release.
2012-04-13 16:03:52 +00:00
Campbell Barton 1add07821b fix [#30925] successful import of keyconfig dependant on current object context?
revert r34885,

The hack was to fix poselib UI but is REALLY BAD - don't modify properties when accessing them.

This bug must be fixed some other way.
2012-04-13 09:25:50 +00:00
Campbell Barton 9e663017d8 py rna/api: fix for error running RNA_property_collection_type_get on non collection property types. 2012-04-11 10:35:09 +00:00
Brecht Van Lommel 63e2763842 Fix #30698: python console nodetree paths were not accurate, now show ... like
in some other cases to at least show these are not accurate.
2012-04-10 16:37:05 +00:00
Campbell Barton 8fa17c5362 code cleanup: no functional changes
- memset(..., -1) is used incorrectly even though it worked: MOD_solidify.c - thanks Halley from IRC for noticing this. use fill_vn_i() instead.
- quiet warnings in editmesh_slide.c
- cleanup comments in bmesh and some other minor comment additions.
2012-04-07 12:37:15 +00:00
Campbell Barton c563eb71b7 wrap RNA's RNA_property_collection_clear from python. 2012-04-02 11:28:26 +00:00