Commit Graph

4430 Commits

Author SHA1 Message Date
Campbell Barton
3346ab0348 Fix/workaround T37073: Crash updating custom props visible in the UI 2014-11-10 17:10:58 +01:00
Campbell Barton
db5493ec7a Fix T42233: Python property ignores 'PROPORTIONAL' 2014-11-03 20:59:14 +01:00
Campbell Barton
133f79e449 Cleanup: warnings, typos 2014-10-29 14:15:21 +01:00
Campbell Barton
cb7afe5e41 WM: unneeded alloc the operator-type iterator 2014-10-28 15:41:05 +01:00
Campbell Barton
785b90d7ef BMesh Py API: Fast index lookups for vert/edge/faces
This changes the Py API to use array lookup table.
Previously this could be very slow since it would loop over all elements.

Now the python script is responsible for creating the internal lookup table (as with C code).

This will break some scripts.
2014-10-28 10:03:54 +01:00
Campbell Barton
cf38b933f3 Fix T42005: Reset py-handlers could crash
Wasn't acquiring the GIL.
2014-10-13 17:45:40 +02:00
Campbell Barton
a550d913bc Fix Python ray-cast failing to check hit direction 2014-10-08 09:47:41 +02:00
Jason Wilkins
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
Campbell Barton
497d06d64d Fix T41971: BMesh mapping slot arg error 2014-10-01 22:36:09 +10:00
Campbell Barton
cbe68f70a8 Cleanup: spelling 2014-09-29 15:51:47 +10:00
Bastien Montagne
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
Sergey Sharybin
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
Campbell Barton
3a40aed3d5 Cleanup: use float versions of functions when in/output are floats 2014-09-24 14:55:02 +10:00
Campbell Barton
0e0e528ea4 Cleanup: pep8 2014-09-17 18:36:17 +10:00
Campbell Barton
26e476b7e1 Fix T41788: bmesh.utils.loop_separate, face_vert_separate() always return None 2014-09-12 10:16:50 +10:00
Campbell Barton
e18906bda2 remove invalid comments 2014-09-09 12:21:28 +10:00
Campbell Barton
4e732b9860 Fix building as Python module (manpage-generation) 2014-09-08 11:22:40 +10:00
Bastien Montagne
e44c49d89d Py Mathutils: add invert_safe() and inverted_safe() to Matrix.
Those two mimic our BLI invert_m4_m4_safe - they add a small offset to diagonal values,
in case org matrix is degenerated, and if still non-invertible, return identity matrix.

Org patch by me, final enhanced version by ideasman42, many thanks!
2014-09-06 14:58:38 +02:00
Campbell Barton
671f75a12a Math Lib: Add copy_m2_m2, unit_m2, zero_m2 2014-09-06 11:29:27 +10:00
Campbell Barton
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
Sergey Sharybin
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
Antony Riakiotakis
85945a8b86 Add debug information for maximum opengl limits in system info
generation.
2014-08-28 12:19:59 +02:00
Campbell Barton
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
Campbell Barton
ff42afb6c5 Math Lib: rename barycentric_transform -> transform_point_by_tri_v3
also add transform_point_by_seg_v3
2014-08-13 14:55:45 +10:00
Campbell Barton
3529913629 Math Lib: name signed versions of dist_to_plane_v3 explicitly
also add unsigned versions
2014-08-13 14:34:58 +10:00
Campbell Barton
dfd9bfd3a8 Spelling 2014-08-13 08:38:16 +10:00
Sergey Sharybin
3e41c8ad6f Fix compilation error with debug scons
The issue is that we've got hell with DEBUG and _DEBUG,
theu're defined really inconsistent acros CMake and SCons.

Used more reliable NDEBUG definition for IDP_spit.
2014-08-11 20:58:42 +06:00
Campbell Barton
d4599ff001 Fix T40766: Startup fails with UnicodeDecodeError on Windows 2014-08-11 17:53:42 +10:00
Campbell Barton
a108532eb9 Fix for mathutils.Euler on big endian systems
D719 from jrestemeier with edits
2014-08-08 02:11:54 +10:00
Tamito Kajiyama
8d3bfef538 Extended mathutils.Vector.orthogonal() to accept a 2D vector.
Reviewer: Campbell Barton

Differential revision: https://developer.blender.org/D668
2014-07-23 23:10:03 +09:00
Campbell Barton
a7d8f602a6 Py/API: Improve intersect_line_line with parallel lines
Now comparing the distance between line-intersection points
to see how close lines are - doesn't fail in the parallel case.
2014-07-21 23:22:10 +10:00
Campbell Barton
ce47231cdb Math Lib: Add isect_point_tri_v3
Add to Python via mathutils.geometry
2014-07-21 16:58:17 +10:00
Campbell Barton
cbde56572f bmesh py api: face_split_edgenet missed NULL check 2014-07-21 12:42:00 +10:00
Campbell Barton
00b29156e0 Defines: replace ELEM3-16 with ELEM(...), that can take varargs 2014-07-20 01:33:40 +10:00
Campbell Barton
49a5115497 bmesh py api: add bmesh.utils.vert_splice(...) 2014-07-17 12:25:40 +10:00
Campbell Barton
7f4735ab3b bmesh py api: BPY_BM_CHECK_SOURCE_* macro now accepts multiple args 2014-07-17 11:56:08 +10:00
Campbell Barton
de379c05de bmesh py api: add BMesh.calc_tessface() 2014-07-16 11:57:28 +10:00
Campbell Barton
28940d79b1 bmesh py api: add typed tuple-from-array functions 2014-07-16 11:50:34 +10:00
Campbell Barton
8a04bed724 Error in last commit 2014-07-14 21:34:51 +10:00
Campbell Barton
a8e338cee5 Py/API: add bmesh.utils.face_split_edgenet 2014-07-14 21:32:37 +10:00
Lukas Tönne
b6e0dc2237 Added missing G_DEBUG_DEPSGRAPH flag entry in the bpy.app.debug getters/setters list. 2014-07-02 09:31:14 +02:00
Campbell Barton
9f05588b68 Python: remove redundant casts 2014-07-01 14:10:59 +10:00
Campbell Barton
c3deb16c16 BMesh: add ability not to delete vertex when collapsing 2014-06-27 20:28:02 +10:00
Bastien Montagne
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
Bastien Montagne
87930eb7c2 Hopefully fix compilation with old MSVC2008/WIN32... 2014-06-18 10:32:25 +02:00
Bastien Montagne
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
Campbell Barton
f2a0062042 Use ARRAY_SIZE to replace (sizeof(a) / sizeof(*a)) 2014-06-17 02:47:57 +10:00
Tamito Kajiyama
f325ddb0d7 Fix Python fails to execute text-blocks including non-mbcs chars (T35176, D595) 2014-06-16 15:29:25 +10:00
Campbell Barton
b460674d64 Code cleanup: replace macro with function to reduce binary size 2014-06-03 19:25:07 +10:00
Campbell Barton
92a380d0b2 Minor changes for standalone mathutils 2014-05-17 12:06:29 +10:00