Commit Graph

69946 Commits

Author SHA1 Message Date
Sergey Sharybin
a5bb918392 Memory allocator: Clarify consistency check function
Also make it to return truth when everything is good and
false otherwise.
2018-03-20 16:51:33 +01:00
Ray Molenkamp
4f97f58513 MSVC: Fix lite build.
MSVC still defines __cplusplus as 199711L until it's in full conformance with the newer c++ standards, however the things we need from the standard are fully supported, hence a check for the msvc version was needed.
2018-03-20 08:26:11 -06:00
Sybren A. Stüvel
09c88fed1f Fixed: cache clearing when using multiple Alembic files. 2018-03-20 12:54:48 +01:00
Campbell Barton
1782abf6e2 Fix BLI_assert for MSVC
Also use `_BLI_ASSERT` prefix for internal defines.
2018-03-20 11:56:11 +01:00
Bastien Montagne
60ff803998 Fix missing ID pointer handling in materials in ID remapping code. 2018-03-20 11:32:16 +01:00
Sergey Sharybin
46a391b668 Fix missing array duplication when copying material
Texture paint slots were copied as a pointer, causing double-free.
2018-03-20 11:22:47 +01:00
Joshua Leung
8e5c407fc4 Fix compile error with MSVC2013 - Can't use __func__ (from BLI_assert) in inlined functions
ERROR: blenlib/intern/math_base_inline.c:371 - '__func__' : undeclared identifier (C:\blenderdev\master2\blender\source\blender\editors\lattice\editlattice_tools.c)  [C2065]
2018-03-20 16:03:43 +13:00
Bogdan Nagirniak
b65933e7b3 Fix T54019: copying and linking bugs with custom ID pointer properties. 2018-03-19 22:14:02 +01:00
Matthias Ellerbeck
8ecf35d850 Fix T54240: automatic node link moving should take into account type.
Without this a "Clearcoat" link could be moved to "Clearcoat Normal"
for example, which doesn't make much sense.

Differential Revision: https://developer.blender.org/D3105
2018-03-19 21:52:49 +01:00
148b0fef09 Fix T54317: overlapping volume render bug after recent changes.
Increasing the samplig dimensions like this is not optimal, I'm looking
into some deeper changes to reuse the random number and change the RR
probabilities, but this should fix the bug for now.
2018-03-19 21:22:15 +01:00
fddb4dee8a Fix T54356: volume rendering bug using just color attribute. 2018-03-19 21:22:15 +01:00
Campbell Barton
b8eca8e07d Cleanup: use utility header for particle looping 2018-03-19 18:18:04 +01:00
Campbell Barton
a3486e735f Cleanup: move particle undo into own file
Also avoid extern declarations which can get out of sync.
2018-03-19 17:46:49 +01:00
Campbell Barton
a5fc0ae150 Cleanup: move armature undo into own file 2018-03-19 17:45:20 +01:00
Campbell Barton
566f4e06ba Cleanup: move metaball undo into own file 2018-03-19 16:59:34 +01:00
Campbell Barton
e7ca9d3477 Cleanup: move curve undo into own file 2018-03-19 16:30:53 +01:00
Campbell Barton
c78ebf9f26 Cleanup: split lattice into own library
Was mixed with object functionality.
2018-03-19 15:45:50 +01:00
Campbell Barton
342a18287f Cleanup: type conversion warning 2018-03-19 09:12:48 +01:00
Jeroen Bakker
7729966af1 Fixed typo Python API
`mathutils.geometry.barycentric_transform` used `tri_a[1-3]` for the
target triangle, but in fact they are `tri_b[1-3]`
2018-03-19 08:19:48 +01:00
Bastien Montagne
0301df40e5 Fix ugly recursive pattern in RNA PointCache data layout.
PointCache was having a collection of items of PointCache type, having a
collection of items of PointCache type, having...

Nuff said.

For now, chose the 'ugly' way to fix it, that is, the one that changes
nothing to API and scripts using it: we define another 'PointCacheItem'
RNA type for items of our point cache collection, which has exact same
interface as PointCache except for the collection.

This is doomed to be rewritten at some point anyway, not worth spending
time trying to define a really correct data layout for now.
2018-03-18 15:37:23 +01:00
Campbell Barton
368c581df1 CMake: disable boost for lite builds 2018-03-18 05:10:02 +01:00
Campbell Barton
2a9f000806 Cleanup: kdopbvh, only set parent nodes once 2018-03-18 05:08:12 +01:00
Campbell Barton
a51fdd89fd Cleanup: use MEM_SAFE_FREE 2018-03-18 05:08:12 +01:00
Campbell Barton
2aa0bde3dc mathutils: replace interp w/ blend when standalone 2018-03-18 05:08:12 +01:00
Ray Molenkamp
07c90f3a73 build_environment: remove msvc compiler warning from boost.
Even the boost people have given up trying to keep up with the rapid release
of new msvc versions, and have removed the warn for now see: 5ad0730630 (diff-eac863c1d46c77471e54e8818aab7534)
2018-03-17 12:47:17 -06:00
Ray Molenkamp
7427e3e501 MSVC: ignore warning c4828 The file contains a character that is illegal.
The only place this warning is coming from is from comments in headers of 3rd party libs. we can safely repress this warning for now.
2018-03-17 12:45:27 -06:00
Gaia Clary
64fbd50e4c Refactor: Collada: remove param, changed order of params in Function call
* In the Collada Module parameters are typically ordered
  in a similar way. I changed this to:

    extern std::string get_joint_id(Object *ob, Bone *bone);

* The Object parameter was not used in get_joint_sid().
  I changed this to:

	extern std::string get_joint_sid(Bone *bone);
2018-03-17 14:16:19 +01:00
Bastien Montagne
5389964eea Add an assert to BKE_icon_changed() that we are actually dealing with ID icon.
Otherwise, ID->obj is an opaque pointer, wrong usage here could lead to
a vast amount of bad things.
2018-03-16 17:17:19 +01:00
Bastien Montagne
1a71d5ae85 Fix T54310: Assert when enable Brush custom icon.
We had a mix of two issues here actually:
* First, Brush are currently using their own sauce for custom previews,
this is not great, but moving them to use common ImagePreview system of
IDs is a low-priority TODO. For now, they should totally ignore their
own ImagePreview.
* Second, BKE_icon_changed() would systematically create a PreviewImage
for ID types supporting it, which does not really makes sense, this
function is merely here to 'tag' previews as outdated. Actual creation
of previews is deferred to later, when we actually need them.
2018-03-16 17:06:43 +01:00
Bastien Montagne
67e2806dcb Cleanup: naming and const parameter. 2018-03-16 16:44:23 +01:00
Sergey Sharybin
da4efaeb87 Depsgraph: Support colored addresses in debug prints
Enabled with --debug-depsgraph-pretty, only works with ANSI terminals.

Thanks Bastien for review!
2018-03-16 12:24:51 +01:00
Sergey Sharybin
295d8510af Add Truecolor ANSI console constants
They are used to start and end colored output in console.
Use with care, it is up to you to check that console actually
supports Truecolor ANSII.

In thew future we can extend this to other consoles and platforms.
2018-03-16 12:16:29 +01:00
Sergey Sharybin
f0596bf660 Hash: Add utility function to convert address to rgb values
Some magic hashing, will become handy to make debug messages
easier to follow.
2018-03-16 12:11:55 +01:00
Sergey Sharybin
3baf31e73a Depsgraph: Move evaluation debug prints to depsgraph
This way we can easily control format and keep it consistent.

And also possibly do other trickery, like coloring addresses!
2018-03-16 11:14:38 +01:00
Campbell Barton
5de9c8f6f0 Cleanup: move mesh mirror functions to own file 2018-03-17 00:55:11 +11:00
Campbell Barton
ee0697e50b Cleanup: doxy sections for editmesh files. 2018-03-17 00:55:11 +11:00
Kévin Dietrich
e5327afcb7 Fix T54326: Import Alembic stuck in edit mode
Switch to object mode before doing the import.
2018-03-16 04:06:34 +01:00
Cheryl Chen
07b07e53ea Fix T53971: single layer render showing the wrong render layer in image editor.
Original patch Cheryl Chen, extra fixes by Brecht.

Differential Revision: https://developer.blender.org/D3098
2018-03-16 00:58:10 +01:00
Guillaume Chereau
e56fd59f22 Code refactor: move OIIO image buffer writing outside session, into callback.
Original patch by Guillaume, modifications by Brecht.

Differential Revision: https://developer.blender.org/D3102
2018-03-15 23:05:16 +01:00
Lukas Stockner
41149ca134 GHOST: Support Unity taskbar progress API
Unity itself is deprecated, but the API is also supported by KDE and the GNOME Dock extension,
which means that it will be useful for a wide variety of distributions.

To get a progress bar, the system must have a blender.desktop file and libunity installed.

The need for libunity is annoying, but the only alternative would be to integrate a DBus library...

Reviewers: campbellbarton, brecht

Differential Revision: https://developer.blender.org/D3106
2018-03-15 22:49:56 +01:00
Campbell Barton
995ccf8168 BLI_assert: extract from BLI_utildefines
BLI_utildefines is quite large, defining many unrelated things.
Add BLI_assert to include in inline headers, so math defines don't
pull in too much.
2018-03-16 06:03:29 +11:00
Campbell Barton
71139cedcb Missed last commit 2018-03-15 11:16:32 +11:00
Campbell Barton
e55c29b4ec BLI_math: don't use asserts in inline API
Requires BLI_utildefines.h to be included first,
(already noted in other inline code).

Possible alternative could be to move BLI_assert into own header.
2018-03-15 11:12:10 +11:00
Bastien Montagne
b0823962e9 Style cleanup. 2018-03-14 18:05:09 +01:00
Bastien Montagne
d34b1b35bf Fix (unreported) broken IDarray case in IDP_EqualsProperties_ex.
For IDProps IDarray, IDP_EqualsProperties was called for each item,
instead of IDP_EqualsProperties_ex, discarding value of `is_strict`
option.

Probably not an issue with current code, though.
2018-03-14 17:53:29 +01:00
Sergey Sharybin
d0055155e8 Fix T54319: Crash after double-clicking baked F-curve 2018-03-14 16:02:46 +01:00
Campbell Barton
342593f124 Cleanup: rename BLI_array_count -> len
Match naming convention used everywhere else.
Count should only be used when this isn't directly accessible.
2018-03-15 01:53:20 +11:00
Sybren A. Stüvel
c22c2ff060 Updated bpy.props getter/setter example
- The common name in computer science are 'getters' and 'setters', so by
  adding these names to the documentation (while 'get' and 'set are still
  also mentioned) we improve findability. Having 'Getters/Setters' as a
  title also makes it clearer that this example is not just about
  getting or setting the property value.
- Added a little prefix to each printed value, so that print statement,
  expected output, and real output can be matched easier.
2018-03-14 11:42:36 +01:00
Sybren A. Stüvel
b76471c1f9 Fix T54286: bpy.props operator example misses property access
The old example had two downsides:

- It promoted a blocking UI design, where the user is shown a popup
  before actually executing the operator.
- It didn't show how to actually use the property values.

The new code avoids these mistakes. The properties are also shown in the
redo panel in the 3D view.

Note that I also changed the bl_idname, as this is an example about
properties, not about dialogue boxes, and changed the class name to use
the standard operator naming convention.

I also extended the example to include a panel that sets multiple
properties of the operator, since I see questions about this relatively
frequently.
2018-03-14 11:31:14 +01:00
Campbell Barton
8803c5ca5d Cleanup: use sections for editmesh tools/select 2018-03-14 17:54:45 +11:00