Commit Graph

51164 Commits

Author SHA1 Message Date
Campbell Barton
3f602fff3c Cleanup: de-duplicate curve menu 2016-02-25 11:54:30 +11:00
Campbell Barton
837c4c5d47 Cleanup: const args for curve handle calculation 2016-02-25 11:02:46 +11:00
Campbell Barton
20b4477cff Cleanup: use defines for handles
Copied from original function.
2016-02-25 10:44:34 +11:00
Campbell Barton
a21c6b5f59 Correct comments 2016-02-25 10:37:22 +11:00
Campbell Barton
60acb8bc57 UI: Use zoom in/out icons for curves
Was confusing since zoom icons were used for add/remove elsewhere (color-ramp & presets).
2016-02-25 06:25:47 +11:00
Sergey Sharybin
43d4d72e05 Fix race condition in point density texture min/max code 2016-02-24 14:28:35 +01:00
Kévin Dietrich
48d399a321 Fix memory leak in panel category update 2016-02-24 05:50:18 +11:00
Bastien Montagne
935e241fa6 Fix (unreported) crash when opening a file from splash screen when 'load UI' option is disabled.
Took me some time to figure out what was going on here... Was again that delayed button
callback stuff (`ui_apply_but_funcs_after()`), first calling button op, and then
its callback func.

Issue was that 'open file' op (through call to `WM_file_read()`) would clear
the splash screen (as more or less the entire 'dynamic' UI), but callback func of that splash
(`wm_block_splash_refreshmenu()`) would still try to access that freed menu's region.

So, root of the issue seems to be that setting context's wm/win/etc. would not clear
context's menu pointer (while clearing all other 'sub' pointers). I could not find
nor imagine any case where this behavior could be desired, so simply added nullification
of that pointer when setting context's wm/win/etc.

Note that crash was due to read-after-free, infuriating debug builds with asan,
but seems like release builds never actually crashed on it.
2016-02-23 16:38:47 +01:00
Sergey Sharybin
125d5d2be5 Fix T47444: Texture node in compositing nodes does not update 2016-02-23 15:26:34 +01:00
Bastien Montagne
62b3fdb57c bplayer compile fix (c) 2016-02-23 14:48:27 +01:00
Campbell Barton
e8c24ee0d9 Fix memory leak running project-paint from Python 2016-02-24 00:32:52 +11:00
Sergey Sharybin
7a62fe316b Point density: Removed wrong line in previous commit
Thanks Bastien for finding this out!
2016-02-23 14:33:15 +01:00
Sergey Sharybin
509953a9db Remove unused "Free Unused" option from compositor
It was basically doing nothing, for ages.
2016-02-23 14:32:57 +01:00
Campbell Barton
6ac0d357d6 Fix T47534: Crash w/ project-paint from Python 2016-02-24 00:00:23 +11:00
Sergey Sharybin
56da420112 Make point density sampling threaded
It should be all fine to sample same point density from multiple threads,
this is something what Blender Internal is doing actually.
2016-02-23 12:30:27 +01:00
Sergey Sharybin
48ed9fcb78 Fix memory leak in point density
The issue was happening when having unconnected point density which
will cache data but will not free it because there's no actual call
to the actual sampling.

Now the idea is to make sure cache is zeroed on file load and undo
and then caching via RNA will free the data if any exists. This could
leave us with a single copy of cache in the node if it's not used,
but it's quite small amount of memory and it's not leaking.
2016-02-23 12:01:16 +01:00
Campbell Barton
9c68ffc3b4 UI: disable undo for cycling render slot
This wasn't working and used extra undo steps.
2016-02-23 20:59:51 +11:00
Sergey Sharybin
d3fa1bd4d5 Fix warnings reported by MSVC
Mainly it's related on a bad practice in SDL to force-define __SSE__
and __SSE2__ flags which generates quite some warnings and causes too
much noise.

There are some other warnings fixed. Should be no functional changes.

NeXyon, please check the changes in audaspace :)
2016-02-23 09:44:54 +01:00
Campbell Barton
073ce98231 Fix white balance sequencer modifier
- division often visibly clipped channels.
- division by zero caused NAN pixel values.
2016-02-23 14:54:42 +11:00
Brecht Van Lommel
f5872d2747 Fix T47531: crash with particle roughness curve mapping, after fix for T46382. 2016-02-23 04:22:13 +01:00
Campbell Barton
e4e21480d6 Fix button display clamping values
Displaying a button would clamp the value if the button was outside the range.
This could be OK in some cases,
however it's problematic with object dimensions which would re-scale objects on showing the panel.

Add `ui_but_update_edited` when its OK to modify the value.
2016-02-23 10:15:36 +11:00
Campbell Barton
adab35ba02 Fix T47529: Selecting paths makes them relative
When selecting file-paths from the interface, initialize the 'Relative' setting from existing paths.
2016-02-23 06:39:34 +11:00
Campbell Barton
2a3bd4621b Sculpt: use Ctrl to set grab/sculpt normal-weight
Having to change this with the slider each time isn't so convenient
and invert in this case does nothing.
2016-02-23 06:21:14 +11:00
Campbell Barton
f8ee24b1a8 Sculpt: apply grab normal-weight to snake-hook 2016-02-23 06:04:23 +11:00
Campbell Barton
1e98435c85 Sculpt: Enable original-normal for grab brush
Without this, grabbing with normal weight will continually select new normals
based on where you move the cursor,
causing the normal location to flicker in a way which isn't controllable in any useful way.
2016-02-23 05:27:13 +11:00
Campbell Barton
36e732c89f Sculpt brush can now grab inwards w/ normal weight
Previously the grab brush could only move ourwards when normal aligned.
2016-02-23 05:04:32 +11:00
Campbell Barton
37915e0b79 Don't draw object center when outside the view 2016-02-23 03:24:30 +11:00
Campbell Barton
27f5a01056 Fix line-width (drawing hair at wrong width) 2016-02-23 02:53:22 +11:00
Campbell Barton
e3f997d47f Fix T47517: "Show Weights" edit-mode fails
Don't use materials when showing weight colors.
2016-02-23 01:24:42 +11:00
Campbell Barton
7a74738914 Fix memory leak in DM_to_mesh 2016-02-22 23:22:15 +11:00
Bastien Montagne
20104beea7 Fix T47482: take II, restore 2.76 behavior regarding groups when deleting an object.
Also re-reported through IRC by Thomas Beck (@plasmasolutions), thanks.

Though it's not ideal in theory, we have quite poor handling of object datablock currently
from user PoV - before this commit, it was not easily possible to get fully rid of an object
anymore if you did not removed it from all its groups before deleting it.

So for now, restore 2.76 behavior (namely, unlink an object from avaerything in Blender
once it is no more used by any scene).

Better handling of all this is TODO for later (also related to much more heavy changes
done in id-remap branch regarding sanitizing our ID deletion process).
2016-02-22 12:16:29 +01:00
Kévin Dietrich
9cfc203749 Compositor: fix memory leak in filter node operation.
Avoid allocating the (tiny) array on the heap in the first place.

Reviewers: sergey, lukastoenne

Differential Revision: https://developer.blender.org/D1815
2016-02-22 10:58:49 +01:00
Brecht Van Lommel
a447421dec Bake API: add assert to verify we have valid UVs. 2016-02-21 14:38:50 +01:00
Brecht Van Lommel
a0e1e0047b Fix crash baking selected to active after recent fix for uninitialized variables. 2016-02-21 14:38:49 +01:00
Sergey Sharybin
ae086225da Fix compositor using edge repeat policy when it shouldn't
Was easy to notice when alpha-overing smaller image with blur on
the bigger frame.
2016-02-21 13:16:56 +01:00
Campbell Barton
f6c11062bc Fix uninitialized var use initializing bake data 2016-02-21 16:20:36 +11:00
Julian Eisel
a66bc6c0f0 Correct incomplete doxgen file paths in WM 2016-02-21 02:10:29 +01:00
Gaia Clary
d2c5959834 fix T47484: Added fallback solution (copy exported file when rename is not supported) 2016-02-20 23:26:33 +01:00
Gaia Clary
4e95807db3 fix T47484: Added proper error reporting for Collada Exporter 2016-02-20 21:42:12 +01:00
Gaia Clary
edf9e8d4dc fix T47484: Added final status of exported file to Blender console 2016-02-20 20:33:42 +01:00
Brecht Van Lommel
e608f2e7ec Fix crash enabling Use Multiview on images with an empty filepath. 2016-02-20 17:56:56 +01:00
Brecht Van Lommel
95180a46ed Fix memory leak when saving OpenEXR half file fails. 2016-02-20 17:56:56 +01:00
Bastien Montagne
4dd406c7b7 Fix T47482: Own mistake in new handling of 'userone' ID usages when decrementing usercount.
Ended up not handling at all 'userone' case, now it increments usercount correctly when needed.
2016-02-20 16:49:44 +01:00
Sergey Sharybin
c0d43871e0 Make Blender ready for C++11
Did a full compile of debug build with C++11 enabled, it all passed compilation
apart from some deprecated type used in GE's Video Texture. Solved it inside of
ifdef block now.

In the future we should uncomment the MSVC part of it, it should all be safe and
correct (MSVC2013 does not define new C++ version but supports C++11). The reason
it is commented is to have absolutely no effect on the upcoming release.
2016-02-20 16:45:53 +01:00
Bastien Montagne
fe9b21a44a Add GHash/GSet pop() feature.
Behavior is similar to python's set.pop(), it removes and returns a 'random' entry from the hash.

Notes:
* Popping will return items in same order as ghash/gset iterators (i.e. increasing
  order in internal buckets-based storage), unless ghash/gset is modified in between.
* We are keeping a track of the latest bucket we popped out (through a 'state' parameter),
  this allows for similar performances to iterators when iteratively popping a whole hash
  (without it, we are roughly O(n!), with it we are roughly O(n)...).

Reviewers: campbellbarton

Differential Revision: https://developer.blender.org/D1808
2016-02-20 15:28:25 +01:00
Campbell Barton
90e77c871b Userpreferences Panel (for the 3DView)
This is an attempt to improve the User preferences panel for the 3DView. I made 2 changes:

- I reordered the sequence of properties by grouping them into more logical groups as it made sense to me. Please indicate where to rearrange the order if necessary.

- Then i added some changes in the code to get the groups better arranged visually. I am pretty sure that this can be done much better, more clever, more generic, whatever. This is just what i could figure out on my own so far.

Reviewers: aligorith, sergey, gaiaclary

Subscribers: sergey

Projects: #user_interface

Maniphest Tasks: T47295

Differential Revision: https://developer.blender.org/D1757
2016-02-20 14:07:20 +01:00
Sergey Sharybin
f1088bd9e1 CMake: Ignore paranoid MSVC linker warnings 2016-02-20 14:06:09 +05:00
Sergey Sharybin
ac5e989d4a Fix for NULL used instead of false 2016-02-20 14:06:08 +05:00
Sergey Sharybin
55aaa27018 Cleanup, avoid passing const pointer to MEM_freeN()
This generates warnings with MSVC. Similar typecast was
already done in other cases, so think it's all fine.
2016-02-20 14:06:07 +05:00
Sergey Sharybin
637f97b316 ImBuf: Cleanup, don't use using namespace, it's a bad practice 2016-02-20 14:06:07 +05:00