Campbell Barton
3e07eac87b
Cleanup: use variable instead of define
2019-03-02 01:30:59 +11:00
Vaishnav S
afc5f82d8d
Fix typos related to units
2019-02-27 13:23:27 +01:00
Campbell Barton
6eb59c5778
Cleanup: GCC redundant declarations
...
Previous waning suppression was only tested with clang.
2019-02-23 22:18:34 +11:00
Campbell Barton
7a5854f4ce
Cleanup: quiet undeclared variable warning
...
Move bpy_context_module declaration to bpy_rna.h.
2019-02-23 19:20:20 +11:00
Bastien Montagne
aed631fa47
Fix (unreported) wrong handling of some parameters combination in bpy.data.user_map()
...
Would add undesired keys...
2019-02-18 17:16:33 +01:00
Bastien Montagne
1414c4496c
ID Management Py API: Fix (unreported) crash in some cases.
...
Would crash when passing some kind of invalid parameters, e.g.:
>>>D.user_map(key_types={'brush'})
2019-02-18 17:16:33 +01:00
Bastien Montagne
b8ec2c9559
ID management: use FOREACH_MAIN_ID in some places.
2019-02-18 17:16:33 +01: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
Brecht Van Lommel
ce5d079a49
Units: add support for light power units in Watt. Use for Eevee lights.
...
This affects point, spot and area lights. Sun light strength remains without
a unit. This change does not affect .blend file compatibility in any way, as
with the rest of the unit system it's purely a display and editing feature.
Not used for Cycles yet, that will be done after unifying the settings with
Eevee.
2019-02-17 16:23:00 +01:00
Campbell Barton
e0e6229176
Cleanup: rename Mesh.edit_btmesh -> edit_mesh
...
When bmesh was in a branch we had both edit_mesh and edit_btmesh,
now there is no reason to use this odd name.
2019-02-17 18:05:18 +11:00
Campbell Barton
2d1c14f036
Cleanup: rename SPACE_IPO -> SPACE_GRAPH
2019-02-16 16:42:11 +11:00
Campbell Barton
ec471a9b1c
DNA: rename SpaceButs -> SpaceProperties
2019-02-16 10:44:15 +11:00
Campbell Barton
ffd0fee97c
Cleanup: comment indentation & spelling
2019-02-11 10:51:25 +11:00
Jacques Lucke
7262ac6202
Fix T61332: Python3 syntax errors
2019-02-09 13:10:34 +11:00
Campbell Barton
9df4602035
PyAPI: message subscribe option arg now optional
2019-02-07 09:36:52 +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
40f2afcf1d
Cleanup: remove contributors for Python files
...
Following removal from C source code.
See: 8c68ed6df1
2019-02-05 09:17:00 +11:00
Campbell Barton
ab5e69e660
Cleanup: remove contributors for CMake files
...
Following removal from C source code.
See: 8c68ed6df1
2019-02-05 09:10:32 +11:00
Campbell Barton
ff2dd59d4a
PyAPI: use _PyObject_LookupAttr
...
Unlike PyObject_GetAttr, this avoids setting the attribute error
only to clear it - under some conditions.
2019-02-04 23:35:23 +11:00
Campbell Barton
7e358b6181
Python: bump minimum version to 3.7
...
All platforms use 3.7 now, supporting both increases chance some scripts
will fail on older versions.
2019-02-04 22:00:30 +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
141c6073ca
WM: Event simulation support for Python
...
This feature is intended only for testing,
to automate simulating user input.
- Enabled by '--enable-event-simulate'.
- Disables handling all real input events.
- Access by calling `Window.event_simulate(..)`
- Disabling `bpy.app.use_event_simulate`
to allow handling real events (can only disable).
Currently only mouse & keyboard events work well,
NDOF, IME... etc could be added as needed.
See D4286 for example usage.
2019-02-02 15:23:55 +11:00
Campbell Barton
afcbf7cf13
Cleanup: use G_FLAG_*/G_FILE_* for G.f/fileflags
...
Was confusing eg: G_AUTOPACK belonged to G.fileflags, G_PICKSEL to G.f.
2019-02-02 13:49:13 +11:00
Campbell Barton
6cbb4c576a
Cleanup: manually remove header text not handled by automation
2019-02-02 01:49:31 +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
68cab3aff6
Cleanup: replace attrib w/ attr
...
Also rename GPUVertexAttribs to GPUVertAttrLayers,
avoids confusion with GPUVertAttr which isn't closely related.
2019-01-29 08:32:25 +11:00
Campbell Barton
c0f88ed8a8
Cleanup: sort forward declarations of enum & struct
...
Done using:
source/tools/utils_maintenance/c_sort_blocks.py
2019-01-28 21:17:58 +11:00
Campbell Barton
f20dbc293f
Cleanup: blank lines over doxy headers
2019-01-26 21:43:24 +11:00
Campbell Barton
1e4aab36c2
Cleanup: remove redundant BKE/BLI/BIF headers
2019-01-26 21:20:25 +11:00
Campbell Barton
2218bf02dd
Cleanup: sort cmake file lists
2019-01-25 08:30:33 +11:00
Bastien Montagne
7a353a7037
Fix T60350: Removed objects that are still in the outliner will crash Blender.
...
We need to force UI to fully redraw, BKE_id_delete & co won't do that
for us.
2019-01-24 17:45:09 +01:00
Campbell Barton
2e4f1b592f
Cleanup: use eGPU prefix for GPU enum types
2019-01-23 14:16:03 +11:00
Campbell Barton
a93cbb70cd
Fix T60643: BMesh operator enum args fail when unset from Python
...
Error introduced with bmesh operator enum support: 1e6a5eb087
2019-01-22 14:28:17 +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
Clément Foucault
4c95899098
GPU: Rename GPU_shader_get_uniform to GPU_shader_get_uniform_ensure
...
This is in order to make the API more multithread friendly inside the
draw manager.
GPU_shader_get_uniform will only serve to query the shader interface and
not do any GL call, making it threadsafe.
For now it only print a warning if the uniform was not queried before.
2019-01-17 19:44:01 +01:00
Campbell Barton
dfb63653f4
PyAPI: minor change to bpy.app.debug_value exception handling
...
Use error from int conversion function.
2019-01-17 08:46:36 +11:00
Campbell Barton
9bfc9d799e
PyAPI: Avoid redundant prefix for PyC_Err_Format_Prefix
...
Only show the exception value type when it's not a string.
2019-01-17 08:43:57 +11:00
Campbell Barton
debb68024e
PyAPI: add PyC_Err_SetString_Prefix for internal use
2019-01-17 08:38:59 +11:00
Bastien Montagne
8102200006
Cleanup/sanitize usages of G.debug_value.
...
There was no documentation at all, some very bad practices (like using
G.debug_value > 0 as some sort of global debug print switch), and even
an overlapping use of '1' value...
Also, python setter did not check for valid range (since this is a
short, not an int).
2019-01-16 19:43:53 +01:00
Bastien Montagne
514e53bb80
Expose batch IDs deletion in python API.
...
Follow-up to previous commit.
2019-01-16 12:02:37 +01:00
Campbell Barton
6439ed844e
Cleanup: remove tabs after line start
...
Allows expanding tabs before running clang-format.
2019-01-11 10:53:21 +11:00
Campbell Barton
0373ff5e9c
Cleanup: end bgl macros w/ semicolon
...
Needed for clang-format.
2019-01-10 12:38:11 +11:00
Bastien Montagne
0215caeac2
Cleanup: fix typo.
2019-01-07 14:30:45 +01:00
Campbell Barton
6015a03255
Cleanup: naming for return args
2019-01-07 15:34:16 +11:00
Campbell Barton
07287ceda1
Fix T58964: drivers_remove fails w/ missing paths
2019-01-07 15:27:59 +11:00
Campbell Barton
b4a77a351e
Cleanup: add trailing commas to structs
2019-01-07 09:15:07 +11:00
Campbell Barton
9200dc0eb1
Cleanup: preprocessor indentation
2019-01-03 15:52:07 +11:00
Campbell Barton
72e2a0cfb6
Cleanup: py-gpu error checks
...
Move gpu initialization checks to the start of each function instead
of mixing with argument parsing.
2019-01-03 01:08:26 +11:00
Campbell Barton
d07bc44a96
Revert file rename from T59773 fix
...
Mixing file rename with other changes should be avoided.
Using 'module_py_api' convention here
is in keeping with imbuf, idprop, blf & bmesh.
No reason for gpu to have a different convention.
2019-01-03 00:55:07 +11:00
mano-wii
945007b32e
Fix T59773: Raise exception if the gpu module is used in backgound mode.
...
Instead of crashing, an error message is displayed if a function of the gpu module is called without a GPU context.
Reviewers: brecht, campbellbarton, JacquesLucke, mont29
Subscribers: abdelmatinboulbayam, amir.shehata
Differential Revision: https://developer.blender.org/D4143
2019-01-02 10:01:46 -02:00