Commit Graph

5307 Commits

Author SHA1 Message Date
47adab4f99 CMake: prepare for BLENDER_SORTED_LIBS removal
No functional change, this adds LIB definition and args to cmake files.
Without this it's difficult to migrate away from 'BLENDER_SORTED_LIBS'
since there are many platforms/configurations that could break when
changing linking order.

Manually add and enable WITHOUT_SORTED_LIBS to try building
without sorted libs (currently fails since all variables are empty).
This check will eventually be removed.

See T46725.
2019-04-14 15:37:24 +02:00
a358f6bb69 Cleanup: use STR_ELEM macro 2019-04-10 09:36:06 +02:00
25ec4b437f Cleanup: style, use braces for the Python API 2019-03-30 07:14:28 +11:00
18d06e8d21 Cleanup: style 2019-03-30 07:14:28 +11:00
4d71b655ec GPU: Fix color difference when rendering to gpu_py_offscreen
Now we do the color management inside the Draw manager and output CM byte
buffer.
2019-03-28 22:38:55 +01:00
c39d82daf4 Cleanup: remove unused derivedmesh code. 2019-03-28 20:02:59 +01:00
cd92f8ea46 Fix bpy.msgbus.subscribe_rna argument parsing
Also enforce all arguments are keywords and update docstring.
2019-03-28 11:40:17 +11:00
69a77a1b83 Fix class registration ignoring info/warnings
Only errors were displayed in the console.
2019-03-27 14:03:40 +11:00
9f2665b526 PyAPI: utility function to print reports 2019-03-27 14:03:40 +11:00
85915ae1aa Python API: allow passing None to some BGL functions instead of bgl.Buffer
Many OpenGL functions take NULL pointers, passing those was quite complicated
with some addons even using ctypes to manipulate internal bgl.Buffer pointers.
2019-03-26 19:56:43 +01:00
6618a19fa9 Fix T62946: missing warning when Python driver expression execution is disabled. 2019-03-26 04:11:34 +01:00
a38313c3bd Cleanup: style, array wrapping
Add trailing comma for clang-format.
2019-03-25 09:02:04 +11:00
fe7c7d2820 Fix T62736: Inconsistent behavior bpy.utils.user_resource()
If a subfolder was specified which didn't exist, logic would fallback
to get_path_user (instead of get_path_environment).

Now always use the from the environment variable if it's set and exists.
2019-03-20 15:38:23 +11:00
109cbdf2e1 Cleanup: use BLI_kdtree_3d prefix
Use prefix now there isn't only the 3d version.
2019-03-20 00:48:51 +11:00
e7fd6c8f30 Cleanup: comment blocks 2019-03-19 15:17:46 +11:00
d0e28721b0 Cleanup: Main id looping: add FOREACH_MAIN_LISTBASE macro.
We don't want to use flow control like `break` statement into the basic
`FOREACH_MAIN_ID` macro, as this is a nested loop.

When refined behavior is needed (like breaking whole iteration, or just
skipping to next ID type), FOREACH_MAIN_LISTBASE and
FOREACH_MAIN_LISTBASE_ID macros should be used instead.

Based on D4382 by @campbellbarton
(Other potential solution, using flow control macros: D4384).
2019-03-18 11:36:50 +01:00
6c0240e84a UI: clarify "Remap Relative" tooltip
Resolves T62612
2019-03-18 13:58:01 +11:00
35b78d9807 Cleanup: indentation, wrapping
Mostly functions wrapping args, not confirming to our style guide.
2019-03-15 09:54:30 +11:00
8f817de0cb Cleanup: use plural names for Main lists
Convention was not to but after discussion on 918941483f we agree its
best to change the convention.

Names now mostly follow RNA.

Some exceptions:

- Use 'nodetrees' instead of 'nodegroups'
  since the struct is called NodeTree.
- Use 'gpencils' instead of 'grease_pencil'
  since 'gpencil' is a common abbreviation in the C code.

Other exceptions:

- Leave 'wm' as it's a list of one.
- Leave 'ipo' as is for versioning.
2019-03-08 09:50:00 +11:00
ab0bc65c24 Refactor CDData masks, to have one mask per mesh elem type.
We already have different storages for cddata of verts, edges etc.,
'simply' do the same for the mask flags we use all around Blender code
to request some data, or limit some operation to some layers, etc.

Reason we need this is that some cddata types (like Normals) are
actually shared between verts/polys/loops, and we don’t want to generate
clnors everytime we request vnors!

As a side note, this also does final fix to T59338, which was the
trigger for this patch (need to request computed loop normals for
another mesh than evaluated one).

Reviewers: brecht, campbellbarton, sergey

Differential Revision: https://developer.blender.org/D4407
2019-03-07 11:29:50 +01:00
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
6eb59c5778 Cleanup: GCC redundant declarations
Previous waning suppression was only tested with clang.
2019-02-23 22:18:34 +11:00
7a5854f4ce Cleanup: quiet undeclared variable warning
Move bpy_context_module declaration to bpy_rna.h.
2019-02-23 19:20:20 +11:00
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
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
b8ec2c9559 ID management: use FOREACH_MAIN_ID in some places. 2019-02-18 17:16:33 +01: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
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
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
2d1c14f036 Cleanup: rename SPACE_IPO -> SPACE_GRAPH 2019-02-16 16:42:11 +11:00
ec471a9b1c DNA: rename SpaceButs -> SpaceProperties 2019-02-16 10:44:15 +11:00
ffd0fee97c Cleanup: comment indentation & spelling 2019-02-11 10:51:25 +11:00
7262ac6202 Fix T61332: Python3 syntax errors 2019-02-09 13:10:34 +11:00
9df4602035 PyAPI: message subscribe option arg now optional 2019-02-07 09:36:52 +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
40f2afcf1d Cleanup: remove contributors for Python files
Following removal from C source code.

See: 8c68ed6df1
2019-02-05 09:17:00 +11:00
ab5e69e660 Cleanup: remove contributors for CMake files
Following removal from C source code.

See: 8c68ed6df1
2019-02-05 09:10:32 +11:00
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
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
744f633986 Cleanup: trailing commas
Needed for clan-format not to wrap onto one line.
2019-02-03 14:59:11 +11:00
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
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
6cbb4c576a Cleanup: manually remove header text not handled by automation 2019-02-02 01:49:31 +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
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
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
f20dbc293f Cleanup: blank lines over doxy headers 2019-01-26 21:43:24 +11:00
1e4aab36c2 Cleanup: remove redundant BKE/BLI/BIF headers 2019-01-26 21:20:25 +11:00
2218bf02dd Cleanup: sort cmake file lists 2019-01-25 08:30:33 +11:00