Sybren A. Stüvel
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
Dalai Felinto
2d1cce8331
Cleanup: make format after SortedIncludes change
2020-03-19 09:33:58 +01:00
Campbell Barton
2a6df7dfe5
Cleanup: use named unsigned types in the Python API
2020-02-20 15:40:05 +11:00
Campbell Barton
9a9f39e466
Cleanup: remove redundant 'char *' casts
2019-12-20 10:42:57 +11:00
Campbell Barton
36b6fb5cd6
Cleanup: warnings building with Python 3.8
2019-10-16 14:44:36 +11:00
Campbell Barton
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
Campbell Barton
dbc058301b
Cleanup: trailing commas
2019-04-16 16:40:47 +02:00
Campbell Barton
25ec4b437f
Cleanup: style, use braces for the Python API
2019-03-30 07:14:28 +11:00
Campbell Barton
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
Campbell Barton
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
Campbell Barton
744f633986
Cleanup: trailing commas
...
Needed for clan-format not to wrap onto one line.
2019-02-03 14:59:11 +11:00
Campbell Barton
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
Campbell Barton
8a61ea7296
Cleanup: add trailing commas
...
Prevents clang-format merging into a single line.
2019-01-19 13:58:35 +11:00
Campbell Barton
bb3ec3ebaf
BLI_utildefines: rename pointer conversion macros
...
Terms get/set don't make much sense when casting values.
Name macros so the conversion is obvious,
use common prefix for easier completion.
- GET_INT_FROM_POINTER -> POINTER_AS_INT
- SET_INT_IN_POINTER -> POINTER_FROM_INT
- GET_UINT_FROM_POINTER -> POINTER_AS_UINT
- SET_UINT_IN_POINTER -> POINTER_FROM_UINT
2018-09-19 12:12:21 +10:00
Brecht Van Lommel
4da2acae3a
Spelling fixes in comments and descriptions, patch by luzpaz.
...
Differential Revision: https://developer.blender.org/D3668
2018-09-03 16:55:01 +02:00
Campbell Barton
a69f985f40
PyAPI: move deep-copy args check to py_capi_utils
2018-06-26 09:31:57 +02:00
Campbell Barton
f48895f74a
Correct accidental changes by C Logging addition
...
Error in 891c1cfc9a
2018-04-01 10:23:28 +02:00
Campbell Barton
891c1cfc9a
C Logging: use instead of printf for messages
...
- See `--log` help message for usage.
- Supports enabling categories.
- Color severity.
- Optionally logs to a file.
- Currently use to replace printf calls in wm module.
See D3120 for details.
2018-03-30 18:57:41 +02:00
Aaron Carlisle
0f6d52cd29
PyDocs: Adde link to Wikipedia page for mathutils.Euler class
...
This update adds a link to the Wikipedia article "Euler angles" to the description of the mathutils.Euler class.
I initially was not sure what a "Euler" represented in Blender API, but found the Wikipedia article helpful. I believe others will find the link helpful too if it appears in the class documentation.
This is similar to the Wikipedia links that appear in the mathutils.Matrix class, e.g: https://docs.blender.org/api/blender_python_api_current/mathutils.html?highlight=euler#mathutils.Matrix.adjugate
Author: @justasb
Reviewers: campbellbarton, trumanblending, Blendify
Reviewed By: Blendify
Subscribers: Blendify
Tags: #bf_blender
Differential Revision: https://developer.blender.org/D3077
2018-03-29 14:25:13 -04:00
Campbell Barton
81e584ed17
CMake: Use GCC7's -Wimplicit-fallthrough=5
...
Use to avoid accidental missing break statements,
use ATTR_FALLTHROUGH to suppress.
2017-05-20 14:01:03 +10:00
Campbell Barton
c439d14a9a
missed this second last commit
2015-02-15 14:11:05 +11:00
Campbell Barton
fa2f7c69ac
mathutils: Implement __hash__() functions
...
- all mathutils types
- only works on frozen data (so vectors can be used in sets/dict keys)
- uses same method as CPython, (matches hashing a tuple)
D1104 by @juicyfruit with own modifications
2015-02-15 14:02:08 +11:00
Campbell Barton
a9d979c8ef
mathutils: add freeze() method, is_frozen attr
...
This allows you to make any mathutils object immutable.
2015-02-15 14:01:59 +11:00
Campbell Barton
24f9ed0b34
Fix crash setting Euler.order to a non-string
2015-02-15 13:46:47 +11:00
Sybren A. Stüvel
baa8b63111
Documentation: updated mathutils documentation
...
Added descriptions of the constructors, and improved the module-level
documentation.
2015-02-01 18:16:12 +01:00
Campbell Barton
9fd569a654
PyAPI: add utilities PyTuple_SET_ITEMS, Py_INCREF_RET
...
Setting all values of a tuple is such a common operation that it deserves its own macro.
Also added Py_INCREF_RET to avoid confusing use of comma operator.
2015-01-06 19:09:11 +11:00
Campbell Barton
8106a6b75d
mathutils: refactor instantiation
...
remove 'type' argument, very few mathutils objects are wrapped,
add new function for creating wrapped objects.
also fixes unlikely memory leak if the data-array can't be allocated.
2015-01-04 17:43:57 +11:00
Tamito Kajiyama
27b58f0eb2
Fix mathutils docstring typos.
2014-12-19 00:43:41 +09: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
Campbell Barton
00b29156e0
Defines: replace ELEM3-16 with ELEM(...), that can take varargs
2014-07-20 01:33:40 +10:00
Campbell Barton
bd697dd4d7
Fix T38402: invalid message for bad type assignments (Quat, Vector)
2014-01-30 16:45:20 +11:00
Campbell Barton
b6db417ee4
code cleanup: use const's for vector args.
2013-10-12 02:19:37 +00:00
Campbell Barton
7db1d6556d
code cleanup: add break statements in switch ()'s, (even at the last case).
2013-07-21 08:16:37 +00:00
Campbell Barton
418011907c
remove nan copyrights from code added since blender become opensource (copy paste errors), also remove BKE_script.h
2013-07-02 10:14:59 +00:00
Campbell Barton
adf7bfa8bb
ifdef out dynstr so mathutils can be compiled as an external module again.
2012-12-08 01:16:59 +00:00
Campbell Barton
004f8d78ed
default to Python3.3 on Linux for SCons and CMake, warn when building with python 3.2x or older.
...
also remove casts to keep Python3.2 warning quiet.
2012-11-05 13:48:42 +00:00
Campbell Barton
c56a911cd9
style cleanup: comments
2012-10-20 20:20:02 +00:00
Campbell Barton
71d1b09708
minor code cleanup
2012-08-25 12:55:14 +00:00
Campbell Barton
112162e09e
code cleanup: header cleanup
2012-04-30 14:24:11 +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
Campbell Barton
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
Campbell Barton
11d12d945e
style cleanup: python api
2012-03-26 06:55:09 +00:00
Campbell Barton
05612c0419
code cleanup: not all mathutils callback creation functions tool unsigned char for type & subtype args.
2012-03-17 22:31:57 +00:00
Campbell Barton
70d3d1aca6
style cleanup: py/capi
2012-03-16 21:39:56 +00:00
Campbell Barton
3590076193
style cleanup - comment formatting
2012-03-03 20:36:09 +00:00
Campbell Barton
f48fb385ea
formatting edits & minor corrections
2011-12-26 00:42:35 +00:00
Campbell Barton
67effc8aef
use docstrings for mathutils getset's, also some formatting edits, no functional changes.
2011-12-25 11:36:26 +00:00
Campbell Barton
f3ac865cc0
picky formatting of mathutils
2011-12-24 13:26:30 +00:00
Campbell Barton
b42497b460
mathutils get/set function rename + minor changes to matrix functions (no functional changes)
2011-12-24 04:58:01 +00:00
Campbell Barton
a8ed803b66
rename internal matrix struct member vars to avoid confusion
...
Matrix.contigPtr --> matrix
Matrix.row_size --> num_col
Matrix.col_size --> num_row
2011-12-20 04:11:23 +00:00