Commit Graph

55816 Commits

Author SHA1 Message Date
Campbell Barton
56254a42e0 UI: replace BLI_strncpy w/ memcpy
Size is already checked.
2018-05-27 12:50:03 +02:00
Campbell Barton
bc3727a943 Recently added IES conflicts w/ EEVEE 2018-05-27 11:01:46 +02:00
Campbell Barton
06cb460cd7 3D View: minor change to NDOF view orbit
This change is needed for 2.8, where the NULL check isn't a reliable way
of testing if dynamic offset is needed.
2018-05-27 10:34:01 +02:00
Campbell Barton
12a9e9ae33 Fix restrict error in BLI_str_format_byte_unit
Don't use sprintf to append a string to it's self.

Also correct BLI_str_rstrip_float_zero's return value.
2018-05-27 10:28:04 +02:00
Lukas Stockner
48155c210a Cycles: Add Support for IES files as textures for light strength
This patch adds support for IES files, a file format that is commonly used to store the directional intensity distribution of light sources.
The new IES node is supposed to be plugged into the Strength input of the Emission node of the lamp.

Since people generating IES files do not really seem to care about the standard, the parser is flexible enough to accept all test files I have tried.
Some common weirdnesses are distributing values over multiple lines that should go into one line, using commas instead of spaces as delimiters and adding various useless stuff at the end of the file.

The user interface of the node is similar to the script node, the user can either select an internal Text or load a file.
Internally, IES files are handled similar to Image textures: They are stored in slots by the LightManager and each unique IES is assigned to one slot.

The local coordinate system of the lamp is used, so that the direction of the light can be changed. For UI reasons, it's usually best to add an area light,
rotate it and then change its type, since especially the point light does not immediately show its local coordinate system in the viewport.

Reviewers: #cycles, dingto, sergey, brecht

Reviewed By: #cycles, dingto, brecht

Subscribers: OgDEV, crazyrobinhood, secundar, cardboard, pisuke, intrah, swerner, micah_denn, harvester, gottfried, disnel, campbellbarton, duarteframos, Lapineige, brecht, juicyfruit, dingto, marek, rickyblender, bliblubli, lockal, sergey

Differential Revision: https://developer.blender.org/D1543
2018-05-27 01:24:57 +02:00
ef502854fe Threads: add spinlock hit for hyperthreading processors on Windows.
Suggested by Percy Ross Tiglao.
2018-05-26 22:35:30 +02:00
Diego Gangl
4dee702332 Add number and memory size formatting throughout the UI
This commit adds number formatting (thousands separator) to the baking panel. It also adds a new function to format memory sizes (KB/GB/etc) and applies it to the baking panel and scene stats. The new function is unit tested.

Reviewers: Severin
Tags: #user_interface
Differential Revision: https://developer.blender.org/D1248
2018-05-25 22:41:49 +02:00
Campbell Barton
9812943931 WM: check modal handlers for keymap lookups
Keep in sync with 2.8x
2018-05-25 10:51:05 +02:00
Campbell Barton
e31b8303ed UI: fix assert
Replace hard-coded button size check with UI_UNIT_X.

Caused icon-only buttons to have strings assigned based on UI-scale.
2018-05-25 10:45:48 +02:00
Campbell Barton
d02335a195 3D View: add pixelsize function w/o UI scale 2018-05-25 10:00:51 +02:00
Lukas Stockner
6862762685 Cycles/Compositor: Add arctan2 operation to the Math node
The Math node currently has the normal atan() function, but for
actual angles this is fairly useless without additional nodes to handle the signs.

Since the node has two inputs anyways, it only makes sense to add an arctan2 option.

Reviewers: sergey, brecht

Differential Revision: https://developer.blender.org/D3430
2018-05-24 16:46:02 +02:00
Campbell Barton
8d9faf840b 3D View: remove poll 3D view for copy/paste
These operators only need selected objects.
2018-05-24 16:40:33 +02:00
Philipp Oeser
1318660b04 Fix T55034: Setting duplication group for multiple selected items only
affects one item

UI editing multiple selected items missed the case of PROP_POINTER
properties

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D3373
2018-05-24 09:02:17 +02:00
Philipp Oeser
3e9b592b08 Fix Extend property of Lasso select tool in Mask editor not working
Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D3361
2018-05-24 08:41:13 +02:00
Philipp Oeser
54f2e58452 Fix T54336: Extend property of Lasso select tool in Node editor does not
work

Reviewed By: campbellbarton

Differential Revision: https://developer.blender.org/D3360
2018-05-24 08:34:31 +02:00
Lukas Stockner
176e18436c Fix T55137: Compilation failing on non-x86-64 architectures
Some conversion helper functions were (most likely by accident) contained
inside an ifdef for SSE2 support, so on e.g. ARM they would be undefined
and therefore cause compilation to fail.
2018-05-24 01:41:18 +02:00
Campbell Barton
d886e32270 Cleanup: strip trailing space from interface files 2018-05-23 10:48:50 +02:00
Campbell Barton
3ada840e65 blenderplayer: add stubs 2018-05-22 17:56:56 +02:00
Campbell Barton
76ece90d4a Fix T55093: Bisect + fill crash 2018-05-22 17:23:25 +02:00
Campbell Barton
9f66d00287 CMake: only include licences for enabled libs 2018-05-21 18:41:59 +02:00
Campbell Barton
605e184167 Cleanup: use const for transform internal API 2018-05-21 17:24:14 +02:00
Campbell Barton
882daeffc5 RNA: support for PARM_OUTPUT & PARM_RNAPTR 2018-05-21 12:34:11 +02:00
9f2ae547c0 Fix/workaround RNA build error in C++ API.
It seems output parameter needs to be the last one.
2018-05-21 11:13:56 +02:00
Campbell Barton
4198c18f15 Cleanup: correct variable names 2018-05-21 10:53:50 +02:00
Campbell Barton
12a60265cd WM: utility to find a keymap item from an operator
Also RNA access to WM_keyconfig_update,
needed when generating dynamic keymaps used in menus immediately after.
2018-05-21 10:35:44 +02:00
Philipp Oeser
5e7a21a5f5 Fix T55115: crash when iterating SmokeDomainSettings color_grid property
through python
2018-05-18 14:34:27 +02:00
Campbell Barton
1cc4ab481e Fix crash drawing polygon curves 2018-05-18 14:23:53 +02:00
Campbell Barton
cb50c288d4 Add missing header 2018-05-18 13:43:41 +02:00
Campbell Barton
278e3f7d5f Logging: add --show-log-backtrace
Useful in debug builds to see a functions callers.
2018-05-18 11:00:47 +02:00
Aaron Carlisle
96fba1e101 Color: Assume Rec 709 in remaining comp nodes
Part of T54798
2018-05-17 17:20:32 -04:00
Campbell Barton
0e0d99161a RNA: move enums to rna_rna.c
Needed for use in rna non runtime code.
2018-05-17 19:10:45 +02:00
Campbell Barton
b290048257 makesrna: error check from 2.8 2018-05-17 19:05:46 +02:00
Campbell Barton
4461be1b72 Fix T55032: Redo w/ file saved in edit-mode failed
It's important edit-mode has a step stored for redo to work,
file load now ensures this in a generic way.
2018-05-15 19:37:06 +02:00
Campbell Barton
91504ed26e Fix assert using '//' on an unsaved file
Annoying for debug builds.
2018-05-15 17:27:36 +02:00
Campbell Barton
3eb9cc69f2 Cleanup: last spacetype enum name 2018-05-15 11:12:49 +02:00
Campbell Barton
9636cab009 Undo System: remove nested edit-mode undo calls
Regression in recent undo system changes,
This caused T55048.

When each mode had its own undo stack it was important
to initialize it when entering edit-mode.
2018-05-15 10:10:48 +02:00
Campbell Barton
ae8225ba6d Fix BMesh bisect not flagging dirty indices 2018-05-15 09:04:12 +02:00
Campbell Barton
43ee4d5d7c Cleanup: quiet GCC -Wtype-limits
While the warning can normally be disabled, we don't have have as much
control of warnings when macros are used.
2018-05-14 09:00:42 +02:00
Campbell Barton
c1d737eb95 BLI_utildefines: re-ordering array delete macro 2018-05-14 08:38:53 +02:00
Campbell Barton
b99d064e91 Cleanup: trailing space 2018-05-13 06:44:03 +02:00
Campbell Barton
c84b8d4801 Cleanup: modifier arg wrapping 2018-05-12 08:04:56 +02:00
Campbell Barton
925e775818 EditMesh: remove duplicate rip macro
Change the fill setting in the keymap,
this allows tool access the macro with either setting.
2018-05-11 20:02:12 +02:00
Campbell Barton
73a7885ab3 WM: initialize last used macro properties 2018-05-11 20:01:51 +02:00
Bastien Montagne
d5c1c0b10d Fix (unreported) broken freeing code for Sequencer.
Freeing sequencer would always do usercount, which is now forbidden when
called from main ID freeing code.

Annoying in 2.7x, much more critical issue in 2.8!

Also, moved RNA sequencer API functions to proper rna_scene_api.c file.
2018-05-11 11:23:11 +02:00
Bastien Montagne
13beeb5892 Fix (unreported) load image code calling icin/preview update from non-Main thread.
Icin/preview only works in main thread, while image loading can be done
from others too... This could have generated random crashes and such.
2018-05-11 10:48:04 +02:00
Bastien Montagne
0385b33f0b Fix broken 'check/validate libs' code with indirect libs.
Readcode always set relative paths of indirectly linked libs relative to
*current* .blend file, not to the library using it.

But BKE_library_filepath_set was then setting them relative to their
parent library, breaking checking code (and saved files even :((( ).
2018-05-09 15:52:29 +02:00
Philipp Oeser
69f2305415 Fix T54992: Lattice modifier on another Lattice object does not take the
Influence vertexgroup into account
2018-05-09 14:41:25 +02:00
Philipp Oeser
34c474e695 Fix T54997: simple typo in property description 2018-05-09 14:26:47 +02:00
Bastien Montagne
f3efa9e15f Fix (unreported) bug in BVHTree 'free tessfaces' flag setting.
Could lead to atempt to free NULL pointer, and/or memory leak.
2018-05-09 12:33:21 +02:00
Campbell Barton
b59b812400 MSVC: resolve near/far issue take2
Previous fix failed w/ compositor,
tested on MSVC2015, full build.
2018-05-09 11:23:32 +02:00