Commit Graph

131 Commits

Author SHA1 Message Date
Campbell Barton
fd2e143eaf Cleanup: --help doc string formatting
STRINGIFY macro was being split across lines
causing problems extracting the strings for the references manual.
2019-06-12 17:01:15 +10:00
Campbell Barton
aba4e6810f Cleanup: style, use braces in source/ (include disabled blocks) 2019-05-31 23:22:52 +10:00
c83f13d451 Preference: don't autosave preferences when running with --factory-startup
This case is likely intended to be temporary, for manual or automated tests.
2019-05-16 20:15:55 +02:00
Sergey Sharybin
1bcec52991 Cleanup: More clear naming for rendering functions 2019-05-07 11:12:40 +02:00
Campbell Barton
e17e119a31 Cleanup: comment line length (tests) 2019-04-20 10:08:59 +02:00
Campbell Barton
a54bdd76cb ClangFormat: format '#if 0' code
Previous cleanups didn't account for space after '#'.
2019-04-17 08:52:59 +02: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
7e6263095d Docs: group debug/disable args in --help output 2019-03-19 14:32:15 +11:00
Sybren A. Stüvel
834d3962b9 Use the same string for DNA enum and CLI argument for EXR image format setting
The `--render-format` CLI option takes `EXR` and `MULTILAYER`, whereas
the DNA image format render setting uses `OPEN_EXR` and
`OPEN_EXR_MULTILAYER`. This commit adds the DNA values to the CLI
argument, so that it is possible to take the selected value from DNA and
pass it as-is to the CLI. This is used in Flamenco, for example.

The `OPEN_EXR` and `OPEN_EXR_MULTILAYER` are now aliases, so both the
existing and the new options keep working.

Reviewers: campbellbarton, brecht

Reviewed By: brecht

Subscribers: fsiddi

Tags: #bf_blender_2.8

Differential Revision: https://developer.blender.org/D4502
2019-03-12 16:17:59 +01:00
Campbell Barton
8f817de0cb Cleanup: use plural names for Main lists
Convention was not to but after discussion on 918941483f7e 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
Campbell Barton
9d78b7edb9 Cleanup: use function instead of extern variable
Quiet undeclared variable warning.
2019-02-23 19:20:19 +11:00
Sergey Sharybin
ce79d86c08 Merge branch 'blender2.7' 2019-02-22 15:53:44 +01:00
Sergey Sharybin
3b86c99260 Fix previous commit
Somehow quote got missing the last moment.
2019-02-22 15:53:22 +01:00
Sergey Sharybin
86dd9bf53d Merge branch 'blender2.7' 2019-02-22 15:50:36 +01:00
Sergey Sharybin
427f3978e1 Always show version when running in background mode
The goal is to make it easy to know which exact blender version
and built was used for a job on a farm. This includes but not
exclusively render farms. But same is handy for simulation tasks
as well.
2019-02-22 15:47:54 +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
Campbell Barton
1daaa74b08 WM: command line args to start blender maximized
Part of D4323 by @DragMZ
2019-02-11 14:46:25 +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
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
8c68ed6df1 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 02:40:00 +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
f20dbc293f Cleanup: blank lines over doxy headers 2019-01-26 21:43:24 +11:00
Campbell Barton
c383d74228 Logging: add '--log-show-timestamp' option.
Part of D4214 by @sobakasu w/ edits.
2019-01-16 16:33:05 +11:00
Campbell Barton
0b17547b23 Cleanup: comment line length (creator)
Prevents clang-format wrapping text before comments.
2019-01-16 00:14:34 +11:00
Campbell Barton
30c3852ffd Cleanup: comment line length (creator)
Prevents clang-format wrapping text before comments.
2019-01-15 23:30:31 +11:00
Sybren A. Stüvel
e11bb77f31 Properly clean up Python when exiting due to --python-exit-code
When BPY_python_end() is not called, there can be buffered data still in
`sys.stdout` or `sys.stderr`. This generally isn't an issue when those are
connected to a terminal, but when they are read by another process (in the case
of rendering with Flamenco, for example) we could miss the actual error message
that's causing the exit in the first place.

The following script demonstrates the issue; before this commit neither the
writes to STDERR and STDOUT nor the traceback of the NameError were shown.

    #!/bin/bash

    cat > file-with-errors.py <<EOT
    import sys
    print('THIS IS STDERR', file=sys.stderr)
    print('THIS IS STDOUT', file=sys.stdout)
    nonexisting.monkey = 3
    EOT

    blender --enable-autoexec -noaudio --background \
	any-existing-blendfile.blend \
	--python-exit-code 42 \
	--python file-with-errors.py 2>&1 | cat

Reviewers: campbellbarton, mont29

Reviewed By: campbellbarton, mont29

Subscribers: fsiddi

Differential Revision: https://developer.blender.org/D4168
2019-01-08 12:00:18 +01:00
Clément Foucault
1fa527bfa3 BKE: Add "--debug-gpu-force-workarounds" to force gpu workarounds
This is nice to test workarounds on other configs that may benefits from
the existing workarounds.
2018-12-05 03:05:39 +01:00
Campbell Barton
0121258770 Merge branch 'master' into blender2.8 2018-11-10 10:57:35 +11:00
Campbell Barton
7efac2b0b0 PyAPI: add imports arg to BPY_execute_string
Allows for avoiding `__import__` in expressions,
was already supported for BPY_execute_string_as_* API calls.
2018-11-10 10:55:04 +11:00
Bastien Montagne
64ec05b64d Cleanup: remove some useless BKE_library and BKE_main includes.
Makes it simpler to make some changes...

Also fix order of some includes (use alphabetical please).
2018-11-07 20:58:54 +01:00
Bastien Montagne
fbf4c11960 Make Static Override optional/hidden by default.
That feature will not be ready (or at least, not tested enough) to be
officially part of 2.80 beta. So we disable it by default, hidding it
behind a startup option (`--enable-static-override`), and a python
app var (`bpy.app.use_static_override`).

That way, people who really want to play with it can do it easily, while
not exposing/enabling non-production-ready feature by default.

Note that underlying override code remains active, i.e. files we do have
overridden data-blocks will be loaded correctly according to static override.
2018-10-19 18:38:19 +02:00
Philipp Oeser
345175082b Fix T57247: Render animation does not respect render single view layer
Reviewers: brecht

Maniphest Tasks: T57247

Differential Revision: https://developer.blender.org/D3800
2018-10-16 13:00:45 +02:00
Sergey Sharybin
4de1e673a4 Merge branch 'master' into blender2.8 2018-09-27 14:51:33 +02:00
2a63e062b0 Tests: add --no-window-focus to open window without focus.
This is useful to run OpenGL tests while continuing to do other tasks
without windows constantly popping up in the foreground.
2018-09-27 12:21:48 +02: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
Campbell Barton
f35e9f047a Merge branch 'master' into blender2.8 2018-09-19 12:14:36 +10:00
fc115e1ab2 Cleanup: remove legacy layer and dupli code. 2018-09-04 16:11:27 +02:00
Campbell Barton
9f25b2f278 Merge branch 'master' into blender2.8 2018-08-18 19:18:55 +10:00
Campbell Barton
506d8448cc WM: app-template command line override
Without this, there was no simple way to have
launchers for different app-templates.

Also allows force-disabling the app-template stored in the preferences.
2018-08-18 14:10:07 +10:00
Campbell Barton
2032e4ec9e Merge branch 'master' into blender2.8 2018-07-27 17:09:38 +10:00
Campbell Barton
3e2dfc6db8 Fix T55991: Python ignores scene switch argument 2018-07-27 16:49:41 +10:00
Bastien Montagne
8a7f317666 Cleanup: Nuke most of G.main from GPU code. 2018-06-25 12:32:48 +02:00
Bastien Montagne
ecc57e7524 Merge branch 'master' into blender2.8 2018-06-15 17:43:18 +02:00
Bastien Montagne
49915e3241 Cleanup: validate G.main's in creator code.
Using G_MAIN here is valid!
2018-06-15 17:36:44 +02:00
Dalai Felinto
fec317de8d --debug-gpu-shader: Dump GLSL shaders to disk
This is really convenient for development. Either for profiling the
generated shaders or to check if the generated code is correct.

It writes the shaders to the temporary blender session folder.

(ported over from blender2.8)
2018-06-02 20:29:27 +02:00
Bastien Montagne
eb1feb9f4a Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/object/object_add.c
	source/blender/editors/object/object_select.c
	source/blender/editors/space_outliner/outliner_edit.c
2018-05-31 16:21:47 +02:00
Bastien Montagne
16100f8261 Cleanup: get rid of last G.main usages in BKE library code. 2018-05-31 16:04:04 +02:00
Joshua Leung
f56a9fbad5 Depsgraph: Remove the "disable-copy-on-write" option completely
After discussion with Sergey and Dalai, we have decided to remove
this option completely. We're getting to the point where it is almost
impossible to really use 2.8 without COW, and keeping the old option
running ends up diverting dev resources away towards tracking down
and fixing problems with a parallel system that will be going away.
2018-05-31 13:43:00 +02:00
Joshua Leung
7f714fdbb2 Depsgraph: Enable copy on write by default
As was decided at today's dev kickoff, we're now moving to having
Copy-on-Write enabled by default, as 2.8 is barely functional with
it off.

To run Blender *without* COW (e.g. for testing), use:
--disable-copy-on-write
2018-05-22 12:00:23 +02:00