Commit Graph

65523 Commits

Author SHA1 Message Date
Mai Lavelle
b06a70323c Cycles: don't crash if OSLRenderServices::osl_ts is unset 2016-08-30 20:50:22 -04:00
Aaron Carlisle
23e3b9f35b Correct render pass identifier usage in toolitps 2016-08-30 22:08:09 +02:00
Bastien Montagne
c5a66b7872 Fix stupid mistake in previous commit 'cleanup' part.
Thanks to sergey for spotting it.
2016-08-30 21:09:33 +02:00
Bastien Montagne
a0cdebde11 Fix bad usercount handling of materials in BKE_mesh_new_from_object().
Curves and meshes (when no modifier application required) would increase their material usercount twice.

Not sure how/why it worked in previous code, but with new, stricter ID handling we need more
careful check of ID 'ownership' handling.

Reported by Sergey over IRC, thanks.
2016-08-30 20:38:53 +02:00
Mai Lavelle
7aedd0e6b0 Cycles: Fix calculation of normals for subdivision meshes
Not sure what happened here. Will have only effected Cycles standalone with
linear subdivision in use.
2016-08-30 12:24:57 -04:00
Alexander Romanov
959b06b3c8 Fix type mismatch causing the buffer overflow in D810 2016-08-30 17:15:26 +03:00
Sergey Sharybin
43dcfcb27a Fix T49201: Mesh with OpenSubdiv subsurf and a texture disappears in Material viewport mode 2016-08-30 12:12:46 +02:00
Alexander Gavrilov
c376878e54 Fix T49187: inconsistent Normal Map node output for backfacing polygons.
There basically are two issues here: in smooth mode (and all non-tangent
normal map types) it doesn't invert the normal for backfacing polys;
on the other hand for flat shaded tangent type it is inverted too soon.

This fix does a brute force correction by checking the backfacing flag.

Reviewers: #cycles, brecht

Reviewed By: #cycles, brecht

Differential Revision: https://developer.blender.org/D2181
2016-08-30 12:48:59 +03:00
Alexander Gavrilov
3a0c0c1b54 Fix node editor to display node group names in the bottom left corner.
Currently it pointlessly repeats the material name there, separated by
slashes. That obviously should display the nested group path instead.
2016-08-30 12:32:31 +03:00
Bastien Montagne
47b87e1f3b Usual i18n/UI messages fixes... 2016-08-30 10:43:37 +02:00
Bastien Montagne
de64f66a2f Fix T49158: Take II, some more untranslated UI messages... 2016-08-30 10:43:37 +02:00
Sergey Sharybin
062cf99fd1 Cleanup: Indentation 2016-08-30 10:29:53 +02:00
Antonioya
5f14bc1b47 GPencil: Fix segment fault when undo
When undo in UV/Image editor and press ESC key, there was segment fault
in Toolsettings because the reference was missing. Now the toolsetting
is loaded from context and not from local operator data.
2016-08-29 22:17:57 +02:00
Antonioya
fa092da377 GPencil: Replace strcpy by BLI_strncpy 2016-08-29 21:57:08 +02:00
lazydodo
5c04b4fdfb Fix T49196 2016-08-29 13:33:30 -06:00
Bastien Montagne
2090ed164f Cleanup/refactor spacefile's 'check dir' code.
Was kinda split in two different places (one allowed to modify given path to always get a valid one,
the other only checking for validity of given path), not nice - and broken in asset branch case.

So rather extended a bit FileList->checkdirf to handle both cases (modifying and non-modifying path).
2016-08-29 16:42:49 +02:00
Howard Trickey
8f215d9b52 Fix for Bevel segments bug T49183; but doesn't fix whole report yet. 2016-08-29 08:51:04 -04:00
Sergey Sharybin
09dc8a7954 Fix T49181: Movie clip animation lost when invoking action which reloads the clip
Was a bug since the very beginning of movie clip animation support
which was done on Feb 2012.
2016-08-29 13:09:03 +02:00
Sergey Sharybin
a9f8e384f1 Movie clip: Add missing animation data RNA declaration
Was missing since the beginning of the days.
2016-08-29 13:04:24 +02:00
Jörg Müller
cc2faa409f Fix T49172: mixdown sound op not exporting full length
Thanks Flavio Perez for the fix.
2016-08-29 10:55:17 +02:00
Sergey Sharybin
5af58faf79 Fix compilation error caused by wrong array initialization
We usually don't silence migh-be-uninitialized warning (which is the only
thing which could explain setting matrix to all zeroes) so we can catch
such errors when using tools like Valgrind.

I don't get warning here and the initializer was wrong, so removing it.

If it-s _REALLY_ needed please do a proper initialization.
2016-08-29 09:40:15 +02:00
Joshua Leung
936a2c6459 GPencil UI: Move the "quick toggles" for colors into their own row below the list
Previously, they were in a column alongside the list, but because the lists were
rarely that long, there would always be a large gap left below the list.
2016-08-29 17:10:53 +12:00
Joshua Leung
195c7797e6 Fix: Some settings (e.g. "volumetric strokes") from old files were not getting correctly ported to GPv2 2016-08-29 17:00:18 +12:00
Joshua Leung
f5ddcd4ce9 Code Cleanup: Fixes for some issues noticed during previous fix 2016-08-29 16:39:27 +12:00
Joshua Leung
cea8f024ec Fix: GPencil Paste couldn't be used to paste strokes from one datablock to another
This was because the poll callback was checking for the presence of an active layer.
If you just create an empty datablock and try to paste, nothing would happen.

However, this check was kindof redundant anyway, as the operator would add a layer for
you if it didn't find one.
2016-08-29 16:27:23 +12:00
Joshua Leung
44524f7519 Small optimisation: Only calculate the inverse_diff_mat once per stroke instead of for every point
(Later this calculation should be moved into the iteration macro instead, since
it only needs to be applied once per layer along with the diff_mat calculation)
2016-08-29 14:51:31 +12:00
Joshua Leung
299bb019b5 GPencil: "Reproject Strokes" operator
A common problem encountered by artists was that they would accidentally move
the 3D cursor while drawing, causing their strokes to end up in weird places in
3D space when viewing the drawing again from other perspectives.

This operator helps fix up this mess by taking the selected strokes, projecting them
to screenspace, and then back to 3D space again. As a result, it should be as if
you had directly drawn the whole thing again, but from the current viewpoint instead.
Unfortunately, if there was originally some depth information present (i.e. you already
started reshaping the sketch in 3D), then that will get lost during this process.
But so far, my tests indicate that this seems to work well enough.
2016-08-29 14:51:30 +12:00
Joshua Leung
dec7145032 GPencil: Include basic brush settings in "Grease Pencil Settings" panel for 2D Editors
After the GP v2 changes, it wasn't possible to easily set the thickness of strokes
if you didn't know about the pie menus already. This just exposes the same set of
settings.
2016-08-29 14:51:29 +12:00
Joshua Leung
71eaa28d0e Code Cleanup: Just some fixes for whitespace/typos that I noticed while working on other stuff 2016-08-29 14:51:29 +12:00
Joshua Leung
20c708d471 GPencil UI: Make "Tint" settings take full width of panel in 2D editors
Parenting options are not visible there (i.e. they're only for the 3D view),
so reserving space that isn't going to be used in those editors doesn't really
make much sense. Furthermore, those property regions are often quite narrow
too, so it doesn't help too much to keep these settings so narrow there.
2016-08-29 14:51:28 +12:00
8a02c5fc62 Fix T49163: let Cycles only hide particles with missing motion data, not regular objects. 2016-08-28 21:26:03 +02:00
Kévin Dietrich
116bab702e Fix T47639: OpenGL render with smoke and fire incorrect when using
transparency.

The issue is that we are rendering to a 0..1 clamped sRGB buffer with
unpremultiplied alpha, where the correct thing to do would be to render
to an unclamped linear premultiplied alpha buffer. Then we would just
make fire purely emissive without affecting the alpha channel at all,
but that doesn't work here.

So for now, draw fire and smoke separately using different shaders and
blend modes, like it used to before the smoke programs were rewritten
(see rB0372b642).
2016-08-28 16:50:59 +02:00
Mai Lavelle
a5261e06a3 Fix T49167: Normals in wrong coordinate space when adaptive subdivision is used
Meshes with Cycles subdivision were being transformed to world space leading to
normals to sometimes be calculated in that space, while they should be in
object space. Also caused dicing to happen at the wrong rate for scaled meshes.
2016-08-27 18:07:04 -04:00
Julian Eisel
4ebfb700ba Fix missing viewport update changing BI lamp shadow method 2016-08-27 23:23:17 +02:00
Joshua Leung
0a8344e843 GPencil: Added entry for the "Select Strokes Using Active COlor" operator to the Colors panel dropdown
It was already present in a few of the Pie Menus, but it was hard to find it,
so I've included it here too for good measure.
2016-08-28 00:09:16 +12:00
Joshua Leung
7bc9353957 Code Cleanup (Non-functional tweaks)
General reshuffling of defines and spacing/brace usage for consistency.
In particular:
* When defining types, don't mix pointers and non-pointer types on same line
  to avoid confusion
* As much as possible, have all defines at the top of each block instead of
  scattered haphazardly throughout the code
2016-08-27 22:58:09 +12:00
Antonioya
2a6362255d GPencil: Cleanup change color operator
It is faster to assign the color to the pointer instead to force the new
lookup in drawing function.
2016-08-27 12:52:30 +02:00
Bastien Montagne
fef0cd8191 Fix T49151: ParticleSettings' usercount not decremented when removing a psys from an object. 2016-08-26 20:29:40 +02:00
Mai Lavelle
5849651a46 Cycles: Make UI for subdivision more clear
Users have been getting a bit confused by the way things are worded/arranged in
the UI. This patch makes a few changes to the UI to make it more clear how to
use subdivision:

- make Subdivide UVs option inactive when adaptive subdivision is enabled as UV
  subdivision is currently unsupported
- add "px" to dicing rates in the Geometry Panel
- display the final dicing rate in the modifier
- reworded "Dicing Rate" in the modifier to "Dicing Scale" to make more clear
  that this is a multiplier for the scene dicing rate and added a note the the
  tooltip pointing the user to that setting in the Geometry Panel

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2174
2016-08-26 12:14:07 -04:00
Bastien Montagne
e9c5359f43 Usual i18n/UI messages fixes... 2016-08-26 16:14:56 +02:00
Bastien Montagne
1a1bcad43a Fix T49158: Untranslatable elements in UI.
We cannot skip 'collections clesse' when generating i18n messages from RNA, some of them
are visible and UI...
2016-08-26 15:46:56 +02:00
Kévin Dietrich
fcffb14d7b Fix linking issue with OpenEXR and Zlib.
Link Zlib after OpenEXR.

Differential Revision: https://developer.blender.org/D2176
2016-08-26 14:28:51 +02:00
Kévin Dietrich
62b1cdd66e Fix over creation of cache files handles (leading to memory leaks).
Multiple threads could create multiple handles for the same cache file,
so protect handle creation with a mutex, to make sure only one is
created.
2016-08-26 14:28:50 +02:00
Kévin Dietrich
8870c454a1 Fix cache constraint not reference counting cache files. 2016-08-26 14:28:50 +02:00
Kévin Dietrich
f2f107572c Fix T49168: crash when evaluating a cache constraint with a NULL cache
file.
2016-08-26 14:28:50 +02:00
Sergey Sharybin
1ada3231ec Depsgraph: Report number of objects to which update as flished
This is an easiest way in the new depsgraph to get an idea how much objects
were handled on update.
2016-08-26 14:05:24 +02:00
Sergey Sharybin
72b24d9c6c Cleanup: Remove unused variable 2016-08-26 14:01:03 +02:00
Sergey Sharybin
5f1b580edc Depsgraph: Report overall number of updates objects 2016-08-26 14:00:15 +02:00
Sergey Sharybin
86e0485b2e Cleanup: Use more meaningful names and move calculation into am if statement 2016-08-26 13:58:17 +02:00
Bastien Montagne
a80977cd21 Fix T49139: Memory leak in UV image editor related to Undo (and possibly Waveform and Vectorscope).
Assigning NULL to scopes' data pointer in 'non-UI readfile' context was terribly wrong for sure,
if we'd really want to reset them here we should freed them first.

But we can rather just ignore them here, those are purely runtime data managed by image editor,
no need to touch them here.
2016-08-26 12:54:49 +02:00