Commit Graph

47 Commits

Author SHA1 Message Date
dae445d94a Fix T85573: Building with Python 3.10a5 fails
Replace deprecated _PyUnicode_AsString{AndSize} usage.

T83626 still needs to be resolved before 3.10 is usable.
2021-02-13 23:09:55 +11:00
d21f445469 PyAPI: remove Python 3.7x compatibility code
This removes Python version checks needed to build with 3.8+ and 3.7x.

Ref D10381
2021-02-12 08:08:15 +11:00
c4d8f6a4a8 Cleanup: clang-format 2020-11-11 09:11:43 +11:00
cd9acfed4f Cleanup: use preprocessor version check for PyTypeObject declaration
While `tp_print` was deprecated, Python 3.8+ uses this for
'tp_vectorcall_offset' which wasn't stated in the comment from
efd71aad4f.

Instead of suppressing clang-tidy, use preprocessor a check since
this properly represents the difference between Python versions.
2020-11-11 09:11:21 +11:00
c69df6728a Cleanup: use real-module for 'bmesh.ops'
Replace module-like object with Python module,
this simplifies checks for generating API docs and is more correct.
2020-10-09 12:11:00 +11:00
3d48d99647 Cleanup: Python, Clang-Tidy else-after-return fixes
This addresses warnings from Clang-Tidy's `readability-else-after-return`
rule in the `source/blender/python` module.

No functional changes.
2020-08-07 13:38:07 +02:00
2d1cce8331 Cleanup: make format after SortedIncludes change 2020-03-19 09:33:58 +01:00
2a6df7dfe5 Cleanup: use named unsigned types in the Python API 2020-02-20 15:40:05 +11:00
9a9f39e466 Cleanup: remove redundant 'char *' casts 2019-12-20 10:42:57 +11:00
36b6fb5cd6 Cleanup: warnings building with Python 3.8 2019-10-16 14:44:36 +11:00
e12c08e8d1 ClangFormat: apply to source, most of intern
Apply clang format as proposed in T53211.

For details on usage and instructions for migrating branches
without conflicts, see:

https://wiki.blender.org/wiki/Tools/ClangFormat
2019-04-17 06:21:24 +02:00
58233e980e Cleanup: avoid adjacent C-style comments
Causes clang-format to give different results on a second run.
2019-04-16 17:50:17 +02:00
25ec4b437f Cleanup: style, use braces for the Python API 2019-03-30 07:14:28 +11:00
de13d0a80c doxygen: add newline after \file
While \file doesn't need an argument, it can't have another doxy
command after it.
2019-02-18 08:22:12 +11:00
eef4077f18 Cleanup: remove redundant doxygen \file argument
Move \ingroup onto same line to be more compact and
make it clear the file is in the group.
2019-02-06 15:45:22 +11:00
744f633986 Cleanup: trailing commas
Needed for clan-format not to wrap onto one line.
2019-02-03 14:59:11 +11:00
65ec7ec524 Cleanup: remove redundant, invalid info from headers
BF-admins agree to remove header information that isn't useful,
to reduce noise.

- BEGIN/END license blocks

  Developers should add non license comments as separate comment blocks.
  No need for separator text.

- Contributors

  This is often invalid, outdated or misleading
  especially when splitting files.

  It's more useful to git-blame to find out who has developed the code.

See P901 for script to perform these edits.
2019-02-02 01:36:28 +11:00
8a61ea7296 Cleanup: add trailing commas
Prevents clang-format merging into a single line.
2019-01-19 13:58:35 +11:00
60b24f2415 Cleanup: indentation 2018-08-28 11:01:29 +10:00
1e6a5eb087 Implement BMesh Operator string enumerators and docs generation.
Partial implementation of T56496 for review.

Reviewers: campbellbarton

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D3635
2018-08-27 16:15:54 +02:00
0154096fd5 Cleanup: unused headers 2014-11-28 23:12:12 +01:00
915235c87a Cleanup: unused headers 2014-11-28 22:16:14 +01:00
4f29aeeff2 code cleanup: some structs were declaring data when only typedef's were intended, make local vars and functions static. 2013-08-07 03:44:05 +00:00
63d523336f freestyle lineset tag attribute was defined but not used, also some code cleanup. 2013-04-07 01:38:03 +00:00
716ed32d90 fix [#34870] bmesh.ops.* parameter lists and descriptions don't show in PyConsole on auto-complete
more a feature request then a bug but nice to have __doc__ on bmesh operators.
2013-04-05 19:58:18 +00:00
f9f7070336 add STREQ macro (commonly used macro like CLAMP, MAX2, STRINGIFY). Use for some areas of the python api, bmesh. 2013-03-10 06:18:03 +00:00
492af7cc6b move bmesh operator calling into its own file. 2012-11-27 13:54:34 +00:00
a9855c227e py/bmesh api - add support for single item buffers (odd feature but used quite a bit with bmesh operators).
also add utility functions BMO_slot_buffer_from_single(), BMO_slot_buffer_get_single()
2012-11-27 09:21:57 +00:00
f8bc346eff bmesh/py operator api:
add type checking for element buffers, there was nothing stopping python from passing any element type into an argument when in some cases only verts/edges/faces were expected.
now operator args define which types they support.
2012-11-27 00:50:59 +00:00
42c54bcd93 py/bmesh api - support for converting from/to BMO_OP_SLOT_MAPPING type. 2012-11-26 08:44:37 +00:00
3fe8134d6d add subtypes to bmesh operators (needed for python api to know how to convert return values). 2012-11-26 02:24:03 +00:00
3fd388fb06 py api cleanup, replace use...
- PyLong_FromSsize_t --> PyLong_FromLong
- PyLong_AsSsize_t --> PyLong_AsLong

In all places except for those where python api expects PySsize_t (index lookups mainly).

- use PyBool_FromLong in a few areas of the BGE.
- fix incorrect assumption in the BGE that PySequence_Check() means PySequence_Fast_ functions can be used.
2012-11-21 02:28:36 +00:00
2336bde2bf py api: add mapping support to bmesh operator return values. 2012-11-20 06:11:15 +00:00
f792e288ea py api: remove ".out" from the names of dict keys returned from bmesh operators. 2012-11-20 05:58:17 +00:00
e8667421ed bmesh operator api edits, add macros and NULL the buffer if BMO_slot_buffer_alloc()'s len is zero. 2012-11-20 03:29:12 +00:00
050e220a98 bmesh py api: add support for return values from bmesh operators. 2012-11-20 02:56:42 +00:00
48639af5f8 use input and output slots for bmesh operators, needed for the python api to get return values. 2012-11-19 14:58:31 +00:00
e75f5c8208 quiet -Wmissing-prototypes warnings, and enable this warning by default for C with gcc.
helps for finding unused functions and making functions static, also did some minor code cleanup.
2012-09-15 01:52:28 +00:00
ee96cde864 style cleanup: whitespace 2012-08-26 11:35:43 +00:00
b96c622015 style cleanup 2012-08-11 22:12:32 +00:00
90d215535e add option so operators can be called with a flag, currently the only flag is to respect hidden geometry.
this is useful for bmesh tools that operate in object mode or for modifiers which would previously use hidden faces in some cases.
2012-07-21 00:58:02 +00:00
2ed69a95f4 add bmesh/python operator support for vector and matrix args.
also rename BMO_OP_SLOT_PNT to BMO_OP_SLOT_PTR (matches RNA and sounds less like 'point')
2012-07-02 20:28:43 +00:00
39ca3146ff fix for some build warnings. 2012-06-30 16:56:23 +00:00
e6d55c97dd add support for passing lists of verts/edges/faces to bmesh operators 2012-06-30 12:58:04 +00:00
3e99ec8d3d all bmesh operators can now be accessed from bmesh.ops.* using a generic wrapper,
argument parsing still needs to have support added for vector, matrix and element types.
2012-06-30 11:14:10 +00:00
7518654a51 add access to dissolve_limit from python. 2012-06-27 14:01:58 +00:00
3e305c1018 bmesh.ops module for bmesh operator access, only remove_doubles and convex_hull at the moment. 2012-06-26 21:40:01 +00:00