Commit Graph

56172 Commits

Author SHA1 Message Date
mano-wii
238a270d8f Fix possible misuse of BLI_strncpy.
Same issue as rB39f7c8256d58.
2018-09-19 09:04:55 -03:00
Bastien Montagne
340527cd37 Fix unused var in case Alembic is not enabled, in own previous commit.
Sorry for the noise...
2018-09-19 11:11:39 +02:00
Bastien Montagne
71d18f59a3 Mesh Sequence Cash: do not *always* report as depending on time! 2018-09-19 11:09:12 +02:00
mano-wii
39f7c8256d Fix unreported: Undo of texts pasted in the Text Editor misses one character.
Caused by commit rB28c34ae7e2d6
Unlike `strncpy`, `BLI_strncpy` ensures the last character is '\0'.
2018-09-19 13:31:55 +10: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
Bastien Montagne
06fd94140c Fix T56833: "zoom to cursor" in Clip editor not handling aspect ratio.
Trivial fix, just using same code as in Image editor...
2018-09-18 14:31:05 +02:00
Sergey Sharybin
d04eb330e8 Close OpenEXR thread pool on exit
This partially solves ASAN report about unfreed memory. There is still
something in the report, need to have a closer look with debug version
of OpenEXE library.
2018-09-18 11:10:49 +02:00
a738586810 Fix object selection with eyerdropper not respecting property poll function. 2018-09-17 12:36:31 +02:00
Bastien Montagne
640fcc25a4 Fix T56811: Do not show cancel button for jobs when UI is locked.
Since that button is then totally useless and unusable...
2018-09-17 10:22:00 +02:00
Campbell Barton
1a4aca1b69 WM: move mousemove out of internal undo function
This causes a feedback loop in 2.8x,
where gizmo redo caused fake mousemove that executed gizmo again.

Move the mousemove into the undo/redo operator.
2018-09-13 23:28:02 +10:00
Campbell Barton
254067106e PyAPI: remove operator methods that leak memory 2018-09-13 20:10:56 +10:00
Bastien Montagne
2be1d8bbaf Tentative fix for T56770: Crash after set language to Simplified Chinese.
That bug probably did not affect 2.7x, only 2.8 with COW copying IDs in
threads... But root of the issue is that underlying boost i18n lib does
not support well multi-threaded access. So simply forbid any translation
from non-main thread. This *may* be an annoying limit at some point, but
doubt it will be any issue currently.
2018-09-13 11:20:49 +02:00
Campbell Barton
a6fc718029 PyAPI: add API call to get an operators type
Getting the instance leaks memory and was only meant to be used for
generating docs.
2018-09-13 18:16:06 +10:00
Campbell Barton
9900addf11 Cleanup: _bpy.ops utility to lookup an operator 2018-09-13 17:47:56 +10:00
Campbell Barton
44f719b632 Cleanup: use PyImport_GetModuleDict
Replace direct access using PyThreadState_GET
2018-09-13 17:06:07 +10:00
Campbell Barton
6873f47ede Cleanup: GCC ignored qualifier warning 2018-09-13 07:42:38 +10:00
Bastien Montagne
2ab1063616 Fix T56662: Autocomplete for texture slot Crash (in console).
That pointer can be NULL, RNA default string handling does not support
that. (that whole uv_layer prop is quite nasty actually, since it does
not own that string, always borrows it from some other data :((( ).
2018-09-12 18:31:14 +02:00
Sergey Sharybin
f088bbae6a Cleanup: More correct terminology work
Matches threading API.
2018-09-12 11:04:42 +02:00
Campbell Barton
a8c924423e Cleanup: remove alpha_check variable from DNA
Just pass as an argument.
2018-09-12 15:48:00 +10:00
a1651ddc98 Build: require OpenJPEG 2.x minimum, remove bundled version.
* WITH_SYSTEM_OPENJPEG is removed and is now always on, this was already
  the case for macOS and Windows.
* This should not break existing Linx builds. If there is no new enough
  OpenJPEG installed, CMake will no find libopenjp2 and WITH_IMAGE_OPENJPEG
  will be disabled.
* install_deps.sh was updated with new package names, since distributions
  put this version in a new package.

Differential Revision: https://developer.blender.org/D3663
2018-09-11 12:45:05 +02:00
Campbell Barton
6bf003bce0 Correct own error in recent transform orientation changes 2018-09-11 15:00:50 +10:00
Campbell Barton
5bb11cfde2 UI: split theme draw style into separate field
Was using UI_BLOCK_LOOP to control draw style,
this meant we couldn't use popup theme colors for cases
where it the interface has the same purpose as a popup but happens
not to use this flag.
2018-09-11 10:56:08 +10:00
Bastien Montagne
4594cc25ac Fix T56720: Lattice: crash on setting points_u/v/w from python.
One need to check that there is something to free, before trying to free it...
2018-09-08 15:29:39 +02:00
Campbell Barton
59eaa90300 Cleanup: move area API into own function 2018-09-08 05:59:28 +10:00
Campbell Barton
7be3378d16 Fix normal transform orientation calculation
When using the 'normal' orientation, the normal would be ignored
if the plane couldn't be calculated.

Now use only the normal if the plane is zero length,
this was already done, just not in all cases.
2018-09-07 11:25:54 +10:00
d1ab109619 Fix T56698: saving render result from compositing as EXR is empty. 2018-09-06 17:46:34 +02:00
Sergey Sharybin
b07d866cf6 Compositor: Always use AA on masks
In a real world it is very weird to disable AA on a mask,
it will give ugly looking result. For some fast preview
passes (like in the node preview) the system can decide
to disable AA without asking user to do anything.

One thing we can consider doing is to remove Feather
option as well. If real compo becomes measurably slower
in cases when mask has no real feather, we can disable
feather internally, without user input. Disabling
feather in the interface is like making things faster
but giving a wrong result, which doesn't sound that
helpful either.

Reviewers: brecht

Reviewed By: brecht

Subscribers: hype, sebastian_k

Differential Revision: https://developer.blender.org/D3677
2018-09-06 11:26:19 +02:00
Campbell Barton
f5daa58242 Fix ruler angle arc displaying past endpoints 2018-09-06 14:42:31 +10:00
Sergey Sharybin
94ec80d21c CCG: Remove number of layers from key
The issue there was that number of layers did not include normals,
while element size counts bytes used by normals. This sounds very
fragile and dangerous to work further. Also, one value can easily
be delivered from another, so it is redundancy going on here.

Possible difference now is that multires subdivision will copy
normals to a higher levels. Shouldn't be big of a problem, since
leaving old normals and updating coordinates is not correct either.
2018-09-05 15:56:50 +02:00
Campbell Barton
44d4a61ed0 Cleanup: replace doxy @ with backslash
The rest of Blender uses backslashes.
2018-09-05 14:56:29 +10:00
Campbell Barton
1be265afc0 Cleanup: style 2018-09-05 14:46:54 +10:00
Ray Molenkamp
c13b2a2504 Fix T54152: --env-system-scripts fails on win32 2018-09-05 14:32:19 +10:00
Campbell Barton
bb6a94fa7b Fix VSE cut both-sides option
Was ignoring the option, using the mouse in all cases.

D3671 by @ISS w/ edits.
2018-09-05 12:13:12 +10:00
Campbell Barton
8cd6e22ec0 Cleanup: use const arg for BLI_rect inside check 2018-09-04 17:33:12 +10:00
Campbell Barton
52f4531eeb UI: cleanup tooltip bounds clamping
Wasn't properly clamping on the window minimum.
2018-09-04 15:26:50 +10:00
Bastien Montagne
265ec400ab ClosthCollision: fully avoid computing BVHTree when we have no collision objects to test against.
Followup to rBc6bbe6c5aac29, much more elegant solution to the problem. ;)
2018-09-03 17:32:46 +02:00
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
Bastien Montagne
c6bbe6c5aa Fix (unreported) potentially giant memory leak in Cloth collision solver.
Not freeing its BVHTree in case there were no collision objects,
could quickly lead to hundreds of MB of memleak!
2018-09-03 15:30:33 +02:00
Campbell Barton
7ff1750218 PyAPI: add optional imports to expression eval API
Avoids having to use `__import__` to access modules.
2018-09-03 12:43:43 +10:00
Campbell Barton
4bb8dba340 Cleanup: move keymap helpers into own file 2018-09-02 19:37:09 +10:00
Campbell Barton
0ddf3e110e Cleanup: comment blocks 2018-09-02 18:51:31 +10:00
Monique Dewanchand
d9b9a46aa3 Python: Enable MASS unit in FloatProperty
MASS unit was already implemented for the C api. Only making sure it is
accessible in the python api. Also added 'CAMERA' to the documentation as a valid option.
2018-08-31 15:00:38 +02:00
Sergey Sharybin
df62deb0a7 Remove CCGDM from PBVH
The statement that PBVH needs to keep track of CCGDM is wrong, PBVH itself
does not care about CCGDM at all, and it's weird for it to carry on this
beast so others can access.

Even more, nobody will actually caring about CCGDM itself, all the usages
were checking whether there is CCGDM or not. This is as good as simply
checking PBVH type.

Tested with an original report T53551 and everything is still stable.
2018-08-31 14:06:26 +02:00
Campbell Barton
976f14fbcf PyAPI: replace checks for invalid input w/ assert
Was returning -1 as a bool argument,
in this case the caller needs to ensure non-null args.
2018-08-31 14:51:59 +10:00
Campbell Barton
98800aa4e0 C/Python API: Add PyC_RunString_AsIntPtr
Utility to get an int or pointer from a Python expression.
2018-08-31 14:21:32 +10:00
Campbell Barton
18d135d05c Cleanup: rename WM_keymap_find -> WM_keymap_ensure 2018-08-31 13:36:46 +10:00
22dc248f14 Fix T56610: crash saving images with python API. 2018-08-30 12:19:27 +02:00
Campbell Barton
39eb051616 Cleanup: indentation 2018-08-30 01:31:20 +10:00
Ray Molenkamp
5e8a030a08 cmake: adjustments required for lib-upgrade on windows. 2018-08-27 19:38:31 -06:00
a7b853a037 Cycles: change default emission color to 1 1 1. 2018-08-26 13:48:24 +02:00