Commit Graph

65272 Commits

Author SHA1 Message Date
Bastien Montagne
e4255a9535 Cleanup space/tabs, Grrr. 2016-07-29 18:49:50 +02:00
Bastien Montagne
8e00406261 Fix a bunch of missing expand calls in object/particle physics area, was breaking linking of those.
Initial report/patch by Alexander Gavrilov (@angavrilov), found more on the road.

Nice demo of why we should use libquery ID looper in read code too - but that's for another day
(also because read code needs to take care of some deprecated pointers sometimes)...
2016-07-29 18:47:43 +02:00
Sergey Sharybin
ceb03a4d32 Cycles: Fix wrong projection coordinates for points behind the camera
Points behind camera will be flipped on projection, but that did not
happen.

This solves second issue reported at T48848.
2016-07-29 17:30:24 +02:00
Sergey Sharybin
1d154fe271 Cycles: Fix wrong check for object is behind camera after recent fixes 2016-07-29 17:30:24 +02:00
Bastien Montagne
cdc7a24d7b Fix T48971: Append creates linked image textures if object has shape keys.
Hating all those not-so-real ID types... Here there were two causes for the issue:
1) Linked shapekey ID was made local twice (once from mesh's make local, once by itself).
   Solved by not explicitely making shapekeys (nor any other non-linkable datatype) local.
2) Key->from 'back pointer' to its owner was messing 'still in used' detection of linked data
   after localization. Fixed with a hack for now, thinking correct solution might actually
   be to not consider this pointer at all in libquery ID looper, since it's nothing like
   and actual usage of mesh/lattice/curve.

Again, shapekeys as ID is a joke, those should be mere struct, they have absolutely nothing to do in Main, period. :(

Point 2) still demonstrates the need for better handling of IDs dependencies though,
so far we only hit corner cases, but think there could also be valid cases generating those
'dependency cycles' between IDs (ID a using ID b which uses ID a), this will have to be addressed some day...
2016-07-29 17:00:29 +02:00
Bastien Montagne
821394937f Remove "debug build only" event printing.
This makes no sense since user usually only has release build... And those noisy printings are
behind debug flag anyway, so really no reason to only print them out in debug build.
2016-07-29 15:12:56 +02:00
Sergey Sharybin
c9134d86f0 Cycles: Fix strict compilation warning 2016-07-29 15:06:13 +02:00
Sergey Sharybin
899947c89e Fix T48679: Bone transform only alters between translation and rotation
There was some smart code in the transform which would alter between translation
and rotation based on whether bone is connected or not and whether translation is
locked or not.

It could be handy to also fallback to scale if both rotation and translation are
locked.
2016-07-29 14:47:23 +02:00
Mai Lavelle
992257cfa0 Cycles: remove narrowing conversion from recent commit 2016-07-29 04:00:37 -04:00
Mai Lavelle
66e2e2484c Cycles microdisplacement: move subdivision options to subsurf modifier
Subdivision options can now be found in the subsurf modifier. The modifier must
be the last in the stack or the options will be unavailable. Catmull-Clark
subdivision is still unavailable and will fallback to linear subdivision instead

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2109
2016-07-29 03:37:55 -04:00
Mai Lavelle
c96ae81160 Cycles microdisplacement: ngons and attributes for subdivision meshes
This adds support for ngons and attributes on subdivision meshes. Ngons are
needed for proper attribute interpolation as well as correct Catmull-Clark
subdivision. Several changes are made to achieve this:

- new primitive `SubdFace` added to `Mesh`
- 3 more textures are used to store info on patches from subd meshes
- Blender export uses loop interface instead of tessface for subd meshes
- `Attribute` class is updated with a simplified way to pass primitive counts
  around and to support ngons.
- extra points for ngons are generated for O(1) attribute interpolation
- curves are temporally disabled on subd meshes to avoid various bugs with
  implementation
- old unneeded code is removed from `subd/`
- various fixes and improvements

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2108
2016-07-29 03:36:30 -04:00
Campbell Barton
f74645578c Missing free for single-sided edge-slide failure 2016-07-29 14:24:03 +10:00
e0c7aaf5ad Fix Cycles OSL hair BSDF inconsistencies with SVM. 2016-07-29 03:29:05 +02:00
52fb441c13 Fix Cycles ctests not always deleting fail.png files on success. 2016-07-29 03:29:05 +02:00
e30f9b04fc Fix use of uninitialized variable in Cycles, mostly harmless. 2016-07-29 03:29:02 +02:00
Bastien Montagne
66552ca586 Make ID types typed enum, to easily spot missing ones in core switches of library.c
Note that all deprecated/non-real ID types are kept as defines.
2016-07-28 19:32:36 +02:00
Bastien Montagne
035b40337a Fix T48965: Cannot Append Palette As Local Datablock.
Palette and PaintCurve were totally missing from id_copy/id_make_local switch... :/
2016-07-28 19:32:36 +02:00
Sergey Sharybin
d834759423 Cycles: Fix difference in Ashikhmin Shirley shader between CPU and GPU
The issue was caused by some NaN appearing in calculations.

Visible with scifi_armor_concept.blend from the cloud.
2016-07-28 18:46:29 +02:00
Sergey Sharybin
85ccdf37c0 Cleanup: Indentation 2016-07-28 14:17:35 +02:00
Sergey Sharybin
f86aa6a879 Fix T48838: Tiling sculpt problem with custom brush 2016-07-28 14:01:15 +02:00
Campbell Barton
cba8e03672 Fix T48962: Edge-slide, random edge switch order 2016-07-28 21:50:41 +10:00
Sergey Sharybin
df00529648 Cycles: Fix missing mesh flags update when tweaking shaders
This is a bit weak, but better than tagging whole mesh manager for update.

Maybe we'll solve such dual-look up in the future.

This commit finally solves T48963: Noise when changing Diffuse node to Emission node
2016-07-28 12:37:44 +02:00
Sergey Sharybin
9f18e3acd6 Cycles: Fix wrong order of light manager update tag
Shader's has_surface_emission will only be known for sure after compilation.
2016-07-28 12:31:01 +02:00
Sergey Sharybin
d3d1313ca4 Cycles: De-duplicate more checks around light emisive meshes
Once again, should be no functional changes.
2016-07-28 12:28:31 +02:00
Sergey Sharybin
87717c6449 Cycles: De-duplicate check for MIS shaders in meshes
Should be no functional changes.
2016-07-28 12:27:05 +02:00
Sergey Sharybin
aaac4e965e Cycles: Add some extra logging for light debugging 2016-07-28 12:13:11 +02:00
Sergey Sharybin
402d4ea0b6 DupliObject: Remove unused and confusing index argument from the context 2016-07-28 10:49:31 +02:00
Campbell Barton
3673a5adba Curve Fitting: Use normalized projection function 2016-07-28 18:33:14 +10:00
Campbell Barton
5ecc6a824a Fix T48404: Translate fails w/ snap orientation option
Rotate the object around the snap-target so it meets the snap-point.
2016-07-28 18:16:31 +10:00
Campbell Barton
8df5f97c2c Cleanup: unused transform member 2016-07-28 18:16:31 +10:00
Bastien Montagne
d66a27de2e Fix T48961: Material slots become easily desynced over linked duplicates.
Own mistake in recent changes (split to test_object_materials()/test_all_objects_materials()).
2016-07-28 09:23:46 +02:00
Campbell Barton
d60acd0e94 Fix crash fitting single point curve 2016-07-28 14:37:55 +10:00
Mitchell Stokes
3a4c307652 Use COMPAT_ENGINES instead of RenderEngine.use_game_engine for panel poll methods
This mostly affects physics panels. Any engines relying on
RenderEngine.use_game_engine flag to show/hide panels will need to be
updated. The COMPAT_ENGINES technique is how we usually deal with this.
One issue with use_game_engine is that I cannot find a way to set it; it
appears only the BGE can set it. This means (without this commit)
external RenderEngines cannot get rid of the default physics panels.

The RE_GAME flag (the C flag behind use_game_engine) is pretty hacky
and we should look into removing its usage where possible.
2016-07-27 19:00:35 -07:00
Campbell Barton
a27acefd0c Fix T48951: Crash refreshing some popups
Fix for T48874 caused popups to be tagged to be refreshed, that didnt support it.

Tag popups that can't be refreshed.
2016-07-28 11:16:11 +10:00
Julian Eisel
8f16181e9c Add comments on behavior of spacedata and regionbase lists 2016-07-28 02:36:12 +02:00
Julian Eisel
c59b21feec Fix own mistake from c05363e8895
Didn't know slink->regionbase is removed when area is active. Don't see why this is done, but it's confusing :S
2016-07-28 02:27:39 +02:00
b645e7081d Fix T48790: Cycles render bug with zero strength lights. 2016-07-27 23:09:38 +02:00
Julian Eisel
c05363e889 Fix crash closing Blender while in rendered local view
Happens because it was always using regionbase of active/visible area, not the correct one of the (possibly inactive) 3D view. Was pretty hidden because you had to be in local view to trigger it.
Could also remove ScrArea * argument from SpaceType.id_remap now, but leaving in there to avoid bigger changes (might also be useful for some case).

Steps to reproduce:
* Default startup.blend
* Enter local view with default cube (/-key)
* Render (or open a different editor where the 3D View is)
* Close Blender - should invoke crash
2016-07-27 21:05:44 +02:00
Julian Eisel
4559229163 Fix memory leak when closing Blender with operator popup open
Steps to reproduce:
* Default startup.blend
* RMB-Click on "Cube" item in outliner
* Select Remap Users
* Close Blender using window 'x' button
2016-07-27 19:45:43 +02:00
Sergey Sharybin
e4646c52c0 Fix T48946: Blender+Tahiti+DRI3+Unity+Linux GUI corruption/not rendering
Enable triple buffer by default for AMD cards on opensource driver.

Should be safe now, since it was only old cards causing problems,
which we don't support now most likely anyway.
2016-07-27 16:06:18 +02:00
Lukas Stockner
25bd01f2f7 Avoid creating multiple outputs connected to the same socket when creating a node group
This patch fixes the annoyance that when creating a node group where one of its nodes is connected
to several other nodes, a separate output will be created for each link, even though they're all
connected to the same socket in the group.
Now, before adding an output for an outgoing link, the existing outputs are checked to find whether
any output is already connected to the same socket. If such an output is found, it is reused instead of
creating a new one.

Reviewers: Severin

Subscribers: Blendify

Differential Revision: https://developer.blender.org/D1836
2016-07-27 15:56:48 +02:00
Alexander Gavrilov
d7bd64df5d Fix T48061: Crash with adaptive domain and cases when there's no smoke 2016-07-27 15:40:32 +02:00
Sergey Sharybin
ae881ddf43 Fix T48760: Changing Renderlayer Compositor node Layer does not update enabled outputs until script is finished 2016-07-27 15:17:15 +02:00
Sergey Sharybin
2e38c07e48 Cycles: Style, placement of asteric in pointers
Seems we are using `void *` much much more often in Cycles.
2016-07-27 14:10:09 +02:00
Sergey Sharybin
183874841b Cycles: Some minor tweaks to emission sharder
- Nodification of shader nodes changed default strength from 10 to 1.
  If that was intentional, IMO should happen as a separate commit.

- Fixed indentation.
2016-07-27 14:05:22 +02:00
Sergey Sharybin
5f95ffe350 Fix T48829: Memory leak on Blender Exit
It was possible to have missing outlink but GPUNodes in material.
2016-07-27 10:59:09 +02:00
Sergey Sharybin
3d8c2e25a3 Fix T48950: Movie Clip mode segfaults
Missing linking code in blenloader.
2016-07-27 10:18:54 +02:00
Julian Eisel
24b8e781f6 Correct UI names of ID types
Also correct typo.
2016-07-26 20:25:55 +02:00
Julian Eisel
3c59a5068f More useful block name for report popup blocks
Report popups simply reuse popup menu code, so their blocks got "UI_popup_menu_begin" assigned as name, which was a bit misleading. Now uses "UI_popup_menu_reports".
Ideally they'd have their own popup code.
2016-07-26 20:25:55 +02:00
Alexander Gavrilov
c1fd97f15d Fix T45936: invalid cycles motion blur for particle rotation and children.
Commit rB709ca0ece changed how rotation was handled for particles so
that unless actual rotation physics is enabled, there is no rotation.
However it only updated ptcache_particle_read, forgetting to change
exactly the same code in ptcache_particle_interpolate.

This means that for subframes old code that computes a rotation from
velocity is used, resulting in completely different rotation than for
integer frames. This causes rotational motion blur by itself, and also
mangles motion blur paths of child particles.

Reviewers: sergey, lukastoenne

Maniphest Tasks: T45936

Differential Revision: https://developer.blender.org/D2124
2016-07-26 18:06:42 +02:00