Commit Graph

63734 Commits

Author SHA1 Message Date
Martijn Berger
4ec95d621a CMAKE / msvc openmp, delay loading of openmp dll so we can set environment
variable before it is loaded
2016-03-31 13:46:14 +02:00
Sergey Sharybin
e2059380de Cycles: Add easy to use spin lock primitive
Currently unused, but will be handy for an upcoming changes.

It'll also be nice to be able to do scoped_lock() for both
Mutex and Spin, but currently it's not really easy to do,
need some changes in typedefs and such, will happen as a
separate commit.
2016-03-31 10:22:11 +02:00
Sergey Sharybin
7fd71338f9 Cycles: Expose array's capacity via getter function
This way it's possible to query capacity of an array, which then
could be used for some smart re-allocation and reserve policies.
2016-03-31 10:06:21 +02:00
Sergey Sharybin
63d017be90 Cycles: Avoid per-split memory allocation for the new references list 2016-03-31 10:06:21 +02:00
Sergey Sharybin
e69a0ab5fc Cycles: Pass BVH builder by const reference to spatial splitters 2016-03-31 10:06:21 +02:00
Sergey Sharybin
d9b729e342 Cycles: Only sort indices when finding a best dimension to split
This reduces amount of data being moved back and forth, which should
have positive effect on the performance.
2016-03-31 10:06:21 +02:00
Sergey Sharybin
bbbbe68473 Cycles: Wrap spatial split storage into own structure
This has following advantages:

- Localizes all the run-time storage into a single structure,
  which could easily be extended further.

- Storage could be created per-thread, so once builder is
  threaded we wouldn't have any conflicts between threads.

- Global nature of the storage avoids memory re-allocation
  on the runtime, keeping builder as fast as possible.

Currently it's just API changes, which don't affect user at all.
2016-03-31 10:06:21 +02:00
Sergey Sharybin
9c420e5e48 Cycles: Use stack storage for temporary data on leaf creation
Uses new StackAllocator from util_stack_allocator. Some tweaks to the stack
storage size are possible, read notes in the code about this.

At this point we might want to rename allocator files to util_allocator_foo.c,
so the stay nicely grouped in the folder.
2016-03-31 10:06:21 +02:00
Sergey Sharybin
ffe59c54cb Cycles: Add STL allocator which uses stack memory
At this point we might want to rename allocator files to
util_allocator_foo.c so the stay nicely grouped in the folder.
2016-03-31 10:06:21 +02:00
Sergey Sharybin
65b375e798 Cycles: Move non-vectorized bitscan() to util
This way we can use bitscan() from both vectorized and non-vectorized
code, which applies to both kernel and host code.
2016-03-31 10:06:21 +02:00
Sergey Sharybin
0b6b094a8c Cycles: Aligned vector was not covered by guarded stat
This was making stats printed by the logging being wrong: they did not
include such memory as BVH storage.
2016-03-31 10:06:21 +02:00
Martijn Berger
bd68a25505 cmake fix full debug builds on msvc 2016-03-31 08:12:53 +02:00
Campbell Barton
ec28fe2e6b Fix T47985: VSE GL-render scene strip hangs
Regression in d5f1b9c22,
threading deadlock rendering a scene from the OpenGL preview.
2016-03-31 15:49:24 +11:00
Bastien Montagne
01ce8d80d0 Usual ui messages fixes/tweaks. 2016-03-30 23:39:54 +02:00
Bastien Montagne
f7fc55867a libquery foreach looper: in recursive case, do not bother with NULL id pointers! 2016-03-30 21:36:09 +02:00
Bastien Montagne
cb19948053 Fix T47983: Particles - Emit from Verts emits double on one vert.
When non-random, particle distribution used a small start offset (to avoid
zero-weight faces), which is fine with "continuous" entities like faces, but not
for discrete ones like vertices - in that case it was generating some undesired
"jump" over a few verts in case step was small enough
(i.e. total number of verts/particles was big enough).
2016-03-30 21:04:54 +02:00
Campbell Barton
756ab5ee2c Use Ctrl-Shift-RMB for to enable 'Fill Region' 2016-03-31 04:30:33 +11:00
Campbell Barton
a55477d32a Shortest Path Select: option to select all paths between 2 elements
This option selects all paths between source/destination which are no longer than the path found.

Handy for selecting meshes with a grid-topology.
2016-03-31 04:25:19 +11:00
Bastien Montagne
26132eaf1f Partly fix (unreported) particles not updating correctly when changing settings.
Point-cached particles (those using simulations) would not update at all outside of
first frame, due to PSYS_RECALC_RESET flag being ingnored in `system_step()`...

For some mysterious reasons, udate is still non-fully functional outside of startframe
(e.g. changing face distribution between random and jittered), but at least when choosing
'Vertices' you get particles from verts and not faces!
2016-03-30 17:10:54 +02:00
Bastien Montagne
53e85a159a Particles: Fix broken grid distribution in some case from own recent rB201d3938622. 2016-03-30 16:56:32 +02:00
Sergey Sharybin
f8b9f4e9bb Cycles: Resumable render implementation for Cycles
This feature is also known by the name Samples Offset, which allows
artists to render animation with given amount of samples N, but then
render more samples, starting from N and ending with M (where M > N)
and merge renders together as if they rendered exactly M samples.

Surely such effect could be achieved by changing Seed variable, but
that has possible issues with correlation artifacts and requiring to
manually deal with per render layer samples and such.

While we can't support all possible renderfarm-related features in
Cycles it's nice to support really commonly used stuff.

Here's a command how to run Blender with the new feature enabled:

  blender -- --cycles-resumable-num-chunks 24 --cycles-resumable-current-chunk 2

This command will divide samples range in 24 parts and render
range #2 (chunk number is 1-based).

This feature might be changed a bit after we'll do some tests here
in the studio with it.
2016-03-30 16:02:27 +02:00
Campbell Barton
ee364b6358 Fix T47940: Custom bone shapes, select error w/ Open NVidia drivers
Latest nouveau drivers have a bug here, use occlusion queries.
2016-03-31 00:59:04 +11:00
Martijn Berger
74d3f3746c CMake cleanup target_link_libraries_decoupled 2016-03-30 15:15:17 +02:00
Campbell Barton
119ce13a41 Fix T46623: OSX bpy.app.binary_path_python incorrect
CMake's PYTHON_EXECUTABLE wasn't set.
2016-03-30 22:50:29 +11:00
Campbell Barton
722d586257 Fix T47993: noise_vector ignores random seed
Replace hard coded values with offsets derived from the random seed.
2016-03-30 20:43:43 +11:00
Campbell Barton
93f107729c Fix T48000: Eyedropper sample-merged ignored at first 2016-03-30 17:28:01 +11:00
Campbell Barton
29bb10ee96 Fix transform center2d for 2d views
While this didn't show up as a bug, the center2d was being calculated with a zero aspect,
causing TransInfo.center2d to be NAN.
2016-03-30 07:15:33 +11:00
Campbell Barton
37e1e2695c Fix T47814: VSE Scene 'Use Sequence' fails
Conflict with flags between depsgraph and sequencer caused error.
Now pass state of sequencer parents to avoid recursion.
2016-03-30 06:59:36 +11:00
Campbell Barton
e5e8d67028 Fix T47961: Wipe effects should have 2 inputs 2016-03-30 06:33:35 +11:00
Campbell Barton
c3ed6010af Fix T47967: Select next active fails in some cases
For cases when there are multiple matches,
find the closest match (with increasingly fuzzy tests) instead of failing.
2016-03-30 05:01:57 +11:00
Sergey Sharybin
3a24e6320f Buildbot: Attempt to work-around unsupported clang on OSX machine
Ideally this would need to be fixed by nvcc itself. but they didn't
do that for a long time.
2016-03-29 19:46:10 +02:00
Campbell Barton
de81607efc Fix error in ghash/gset_ensure_p_ex
The key is needed in the case the ghash resizes.
Caused regression T47984.
2016-03-30 03:04:47 +11:00
Bastien Montagne
201d393862 Fix T47902: Particle grid not using modifier stack, Take II.
Now only fix correct handling of use_modifier_stack for grid distribution,
fixing it globally breaks all existing edited hair systems. :/
2016-03-29 17:45:56 +02:00
Bastien Montagne
a959771626 Revert "Fix T47902: Particle grid not using modifier stack."
This reverts commit 2bd3acf7cd27c0c3ee77b10d56b91c3b03226d39.

Commit is valid in theory - but in practice, it means nearly all edited hair systems
would need to be re-created from scratch... Not nice, so better revert and note in code
that particle distribution is ugly and does not respect 'use modifier stack' option in most cases.
2016-03-29 17:33:08 +02:00
Joshua Leung
24d931ea58 GPencil New Stroke Smoothing: Don't perform smoothing on pressure values
As noted by Antonio and Daniel, performing smoothing on the pressure values
for new strokes doesn't work that great. From an artist POV, it is apparently
"very strange that line thickness shrink suddenly after drawing it".
2016-03-30 03:21:59 +13:00
Joshua Leung
3bdd7ba34f Driver Mapping Types: Added temporary icons to break up the two types of mapping behaviours (modal vs manual) 2016-03-30 03:21:58 +13:00
Joshua Leung
d29b32ae36 RMB Menu: Add icons for delineating each cluster of options in this menu
From T33052 by Harley Acheson (harley)
2016-03-30 03:21:58 +13:00
Joshua Leung
deffd4352b Drivers Setup: Expose all mapping types for creating drivers
* This includes the "manually create" modes, which correspond to the previous behaviour
  for setting up drivers. This is necessary when the current screen layout is not
  well suited to having multiple property editors open (e.g. small screen or heavily
  subdivided screen).

* Only the modes relevant for the current property type (i.e. array vs single)
  will be shown

* The "Add Driver" entries in the RMB context menu have now been replaced by a
  submenu which will list all the available mapping types.

* NOTE: The code for the ANIM_OT_button_driver_add() operator is perhaps a bit hairy.
  However, it currently allows us to have the desired behaviour. It can always get
  cleaned up later though.
2016-03-30 03:21:57 +13:00
Sergey Sharybin
3237ae2855 Add license text for OCIO configuration 2016-03-29 12:54:29 +02:00
Sergey Sharybin
003f908f0d Fix T47987: Blender Cycles standalone does not properly read UV coordinates from XML 2016-03-29 10:02:17 +02:00
Campbell Barton
2fae1719f8 Fix T47986: OBJ Import fails w/ imagepath encoding 2016-03-29 18:30:08 +11:00
Bastien Montagne
b1f918bcc5 Fix T47958: Crash in Walk or Fly Navigation in Camera mode when invoking from non-3DView region 2016-03-28 18:19:43 +02:00
Julian Eisel
37b7b3a935 T47532: Pop-ups drop fast mouse clicks
Caused by rBc24be7ec6e5.

Before rBc24be7ec6e5,  wm_handlers_do always called handlers a second time with event value KM_PRESS in case of a double click. After it, this was only the case for non-LEFTMOUSE events.
Since ui_popup_handler (almost) always returned WM_UI_HANDLER_BREAK, the second handler iteration with KM_PRESS wouldn't run. This fix just makes sure we return WM_UI_HANDLER_CONTINUE for double click events instead (causing second iteration to run).
2016-03-28 16:45:12 +02:00
Campbell Barton
28ca3ebc5f Fix T47969: Select Random always uses same seed
Increment the seed on each use,
otherwise calling again selects the same order, unless you manually adjust the seed.
2016-03-29 01:24:57 +11:00
Bastien Montagne
d336bb0765 Fix T47972: Blender crash showing particle system.
Do same as with faces - if no orcodata is available, fill orco with current location...
2016-03-28 15:52:59 +02:00
Campbell Barton
240adb90a5 Fix T47973: Render stamp ignores font alpha 2016-03-29 00:26:55 +11:00
Campbell Barton
6a099b0c45 BLF: alpha support for drawing to buffer 2016-03-29 00:26:55 +11:00
Sergey Sharybin
e2e72a20ec Fix T47931: Missed world shader update when having object dependency 2016-03-28 10:45:29 +02:00
Sergey Sharybin
8a9dd6f6fb Fix T47898: Error adding mask node with "Add Mask Node" operator
This operator is intended to be used by drag-n-drop, no user invocation
is expected to happen here. Use Add->Search to quickly add nodes instead.
2016-03-28 10:09:11 +02:00
Sergey Sharybin
b7dfef325d Cleanup: Unused variable 2016-03-28 09:36:41 +02:00