Commit Graph

3689 Commits

Author SHA1 Message Date
f88cfd9168 Code and style cleanup in own modules in BKE and also mball module
- Make sure functions are named in way BKE_<object>_<action> (same way as RNA callbacks)
- Make functions which are used by mball.c only static and remove their prototypes
  from public header file.

Further cleanup is coming.
2012-04-28 16:49:00 +00:00
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
d3c1ece201 fix [#31113] bmesh.types.BMLayerCollection getter calculate key indices wrong (own fault)
also add check so layer.name won't crash incase the layer becomes invalid.
2012-04-26 16:32:30 +00:00
4782522379 Add libMV and Scons support for MinGW-w64, patches by Caleb Joseph with slight modifications.
Thanks!
2012-04-24 12:57:58 +00:00
bfcdd45245 corrections from an article about using PVS-Studio static checker with blender - http://www.viva64.com/en/b/0145/ 2012-04-23 15:54:43 +00:00
4c873fec53 bmesh py api: functions to add/renmove customdata layers, eg.
bm.loops.layers.color.new("Testing")
2012-04-23 14:52:28 +00:00
16ff7e40e6 code cleanup: change C naming convention (so py and C api match), eg:
C: BM_face_calc_area(f), Py: BMFace.calc_area()
2012-04-23 01:19:50 +00:00
5c89138684 style cleanup: comments 2012-04-22 11:54:53 +00:00
49ff0eeec4 bmesh py api: expose BM_face_split_n() to the python api;
face_fill(..., coords=(v1, v2, ...))

This is the same function the knife tool uses. should be handy for dicing up geometry in py.
2012-04-22 10:19:24 +00:00
d5023f0e91 correction to py docs from mgschwan on IRC. 2012-04-22 08:36:39 +00:00
6701933f5c style cleanup 2012-04-21 12:51:47 +00:00
80ff1984f8 bmesh py api: remove bmesh.loops.index_update(), it wasn't working, as joe noticed. 2012-04-19 23:23:29 +00:00
417117e207 bmesh py api: expose BMVert.calc_shell_factor() 2012-04-19 19:13:57 +00:00
b40476455e code cleanup: remove unused BMesh args. 2012-04-19 14:38:09 +00:00
475ecbb0ce remove BM_ITER, BM_ITER_INDEX macros, use ELEM or MESH variants only (the maceros had unused args in both cases). 2012-04-19 13:47:58 +00:00
75b869e428 style cleanup: BM_ITER / BM_ITER_INDEX / BMO_ITER 2012-04-19 11:44:12 +00:00
db2edfcfde bmesh api function: BM_edge_face_tangent()
was used by inset but make into an api function since scripts can use this too.
2012-04-19 11:25:05 +00:00
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
db53faffa3 make ngon_perimeter into a public api function and expose to python. 2012-04-15 10:09:27 +00:00
455b8212b6 Scons:
* Compile fix for r45609, pthreads include was missing.
2012-04-13 19:34:15 +00:00
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
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
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
85908b498b fix [#30906] dict(prop) crashes if prop is a PropertyGroup with nested PropertyGroup
the ID of a python ID property can be NULL.
2012-04-11 08:37:48 +00:00
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
1b74ec9564 fix for too small MATHUTILS_TOT_CB when the game engine runs. 2012-04-10 12:35:15 +00:00
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
1635d8e873 add option not to delete edges/verts when joining faces, needed so we can loop over edges and join them without having to check if they have been removed. 2012-04-04 14:48:10 +00:00
b07f9446c7 Hopefully last change to matrix orthogonal check, touches Py API only
- is_orthogonal now checks matrix in the same way as it's defined
  by linear algebra, meaning that it'll use is_orhonormal C check
- Added is_orthogonal_axis_vectors to check if vectors which defines
  axises are orthogonal
2012-04-02 12:36:00 +00:00
c563eb71b7 wrap RNA's RNA_property_collection_clear from python. 2012-04-02 11:28:26 +00:00
26b0255049 Fix for is_orthogonal check which in fact was checking for orthonormal matrix.
Separated it into two functions so now it'll be clear if check happens for
orthonormal or just orthogonal.
2012-04-01 00:14:41 +00:00
21ac9ae461 code cleanup: use uppercase defines and change drawFCurveFade into static function. 2012-03-31 04:04:58 +00:00
5b88712ff9 move debug flag into its own global var (G.debug), split up debug options.
--debug
  --debug-ffmpeg
  --debug-python
  --debug-events
  --debug-wm

This makes debug output easier to read - event debug prints would flood output too much before.

For convenience:
  --debug-all turns all debug flags on (works as --debug did before).

also removed some redundant whitespace in debug prints and prefix some prints with __func__ to give some context.
2012-03-31 00:59:17 +00:00
89b83f0060 patch to add __deepcopy__ to mathutils types, this is no different to __copy__, except some py utilities expect __deepcopy__ to exist, so better have them. 2012-03-30 11:35:58 +00:00
79871ded0b fix for finding the python exception line number when running a script in the text editor.
- filename comparison was invalid
- was stopping on the first traceback, which would reference the caller but not the error line (when the error was in a function).
2012-03-30 05:26:08 +00:00
20e2330434 added Mesh.calc_tessface(), needed to update mesh tessface after bmesh edits.
also add py api BMDeformVert.clear()
2012-03-29 13:44:30 +00:00
c9e1ced4dd code cleanup: (dont include ';' in defines), last commit also missed changes to paint_image.c 2012-03-28 01:06:43 +00:00
7f1e9b8c41 bmesh py api:
added access to deform weights, access to weights acts like a python dict so you can do...

  print(group in dvert)
  dvert[group] = 0.5
  print(dvert[group])
  del dvert[group]
  print(dvert.items())
2012-03-27 10:30:10 +00:00
abf551b1a5 style cleanup: py api 2012-03-26 20:41:54 +00:00
11d12d945e style cleanup: python api 2012-03-26 06:55:09 +00:00
81d8f17843 style cleanup: pep8, indentation 2012-03-24 07:36:32 +00:00
5a90ea77bc style cleanup: follow style guide for formatting of if/for/while loops, and else if's 2012-03-24 06:24:53 +00:00
3c11379e26 code cleanup: move bmesh inline funcs to headers (avoids compiling the C files). 2012-03-24 01:24:58 +00:00
db37011930 bmesh py api:
added BMFace.material_index
2012-03-22 09:29:18 +00:00
7044d80639 code cleanup: remove BMesh * args from query functions which don't need it 2012-03-22 07:53:11 +00:00
b56d2f9766 fix [#30623] user-defined render presets bug
this report exposed multiple bugs in blender when using a non utf8 compatible home directory.

- bpy.utils.script_paths() would crash when homedir wasn't utf8 (reported bug)
- PyC_DefaultNameSpace() - would raise an error when running when __file__ was non utf8.
- preset filepath property was not set to accept non utf8.
- bpy.paths.display_name would raise an error on non utf8 paths, (used for preset draw)
2012-03-21 22:29:49 +00:00
d76c05cd36 style cleanup: bmesh 2012-03-21 09:10:08 +00:00
9773f87891 bmesh docs:
- add examples for custom-data access
- group BMesh types logically in docs
- added missing docstrings

needed to add grouping functionality to sphinx for this.
2012-03-21 05:33:37 +00:00
5935ff3aaa fix for Quaternion.to_axis_angle() returning a zero axis vector. 2012-03-20 23:37:54 +00:00
303cecf139 spelling cleanup: tesselate -> tessellate (last of these found) 2012-03-20 22:56:26 +00:00