Commit Graph

56452 Commits

Author SHA1 Message Date
Sergey Sharybin
c3f64ea009 Depsgraph: Fixes to make particle system behave more correct
Couple of main things here:

- Properly handle PSYS_UPDATE_* flags from DEG_id_tag_update.

  There are still some possible issues here related on the fact
  that we don't differentiate different PSYS_UPDATE_* flags here
  and handle the mall the same.

  Other possibility here is that object level particle settings
  evaluation might be forced when particle system evaluation is
  tagged for update. Didn't see actual issue here yet, but need
  a closer look.

- Don't tag non-object datablocks on visibility changes.

  Those don't depend on visibility anyway. This prevents particle
  settings IDs from flushing updates to all objects, causing all
  cached particles to be lsot.

- Only update translation and geometry components on visibility
  changes.

  Once again, this prevents particle cache from being invalidated.

  We might need to tag material components here still tho.
2017-07-19 15:20:06 +02:00
Sergey Sharybin
a31233f5d2 Depsgraph: Stop tagging all IDs for update on depsgraph rebuild
This code needs to be changed. For the time being CoW might become less stable,
but need to stop doing such tag for other work.
2017-07-19 15:20:06 +02:00
Sergey Sharybin
414cc821d8 Depsgraph: Initial implementation of more granular tagging
This commit makes it so that only ID components which correspond to the tag
flag are tagged for update (previously the whole ID would have been updated
in the most of cases).

This allows us to have more granular tag flags and prevent tagging of things
we don't want to be tagged.
2017-07-19 15:20:06 +02:00
Sergey Sharybin
50f5f0957c Depsgraph: Cleanup, de-duplicate couple of utility functions 2017-07-19 15:20:06 +02:00
Sergey Sharybin
5eddc183b0 Depsgraph: Cleanup, remove unused untested functions 2017-07-19 15:20:06 +02:00
Sergey Sharybin
5727e8706f Depsgraph: Use dependency graph flush routines to update particle settings
Previously tagging particle settings for update will iterate over all objects and
all their particle system to see whether something needs an update or not. Now we
put ParticleSettings as an ID to the dependency graph, so tagging it for update
will nicely flush updates to all dependent particle systems.

Current downside of this is that due to limitation of flush routines it will cause
some extra particle system re-evaluation when it technically not needed, and what's
more annoying currently it will discard point caches more often.

However, this is a good and simple demonstration case to improve tagging/flushing
system to accommodate for such cases (similar issues happens with CoW and shading
components). So let's try to find some generic solution to the problem!
2017-07-19 15:20:06 +02:00
Sergey Sharybin
2fe5cf4807 Depsgraph: Use explicit parameters eval operation code
This replaces usage of generic PLACEHOLDEWR with string lookup with more
explicit opcode. This should make it faster to build dependency graph by
avoiding string comparisons when it's not needed.

There should be no user measurable different.
2017-07-19 15:20:06 +02:00
Sergey Sharybin
917bff4f44 Depsgraph: Add generic parameters evaluation operation code
Currently unused, but the idea is to use this code instead of placeholder
operation code followed by string comparison.
2017-07-19 15:20:06 +02:00
Sergey Sharybin
9356119765 Depsgraph: Use more explicit naming for operation codes
This way it's better indication what group of operation codes things belongs to.
2017-07-19 15:20:06 +02:00
Sergey Sharybin
ec2bca26e8 Despgraph: cleanup, make separation of opcodes strings more clear 2017-07-19 15:20:06 +02:00
Sergey Sharybin
62de80166e Depsgraph: Use more explicit name for particle system evaluation opcode 2017-07-19 15:20:06 +02:00
Campbell Barton
abe0527e0f Manipulators: use nearest manipulator
Add utility function to get the nearest hit
2017-07-19 20:12:24 +10:00
Campbell Barton
dd64cedd0b Merge branch 'master' into blender2.8 2017-07-19 14:38:22 +10:00
Campbell Barton
3daa641d7f Fix T52092: Crash un-grouping nodes 2017-07-19 14:32:31 +10:00
Dalai Felinto
231d688219 Outliner: Use scene_layer from context 2017-07-18 17:14:43 +02:00
Bastien Montagne
3cfb248bb6 Fix T52109: Folder search won't work when selecting animation output folder.
Text search would not run in case there was no 'type' enabled in filter
buttons. Now instead consider that no types enabled == all types
enabled.
2017-07-18 16:01:28 +02:00
Dalai Felinto
c226488a27 Layer cleanup: get rid of one of the placeholder functions 2017-07-18 11:16:14 +02:00
Dalai Felinto
f3039c7e78 Context/Workspace: Get scene layer from workspace 2017-07-18 11:16:14 +02:00
Bastien Montagne
ecb5b55d7f Fix bad loss of precision when manually editing values in numbuttons.
While drawing nice 'rounded' values is OK also for 'low precision'
editing like dragging and such, it's quite an issue when you type in a
precise value, validate, edit again the value, and find a rounded
version of it instead of what you typed in!

So now, *only when entering textedit of num buttons*, we always get the highest
reasonable precision for floats (and use exponential notation when
values are too low or too high, to avoid tremendous amounts of zero's).
2017-07-18 10:41:00 +02:00
Campbell Barton
2174a2118b Cleanup: use WM_event prefix for modal_tweak_exit 2017-07-18 18:09:26 +10:00
Campbell Barton
7784cf30eb WM: move WM_event_is_last_mousemove to the WM API 2017-07-18 18:07:49 +10:00
Clément Foucault
3534c3e0df Eevee: Avoid crash when using dupli objects.
This is waiting a for a better solution.
2017-07-18 10:05:16 +02:00
Clément Foucault
fe8fc79cee Eevee: Fix transparency not drawing after volumetrics.
Fix T52089, Fix T52091
2017-07-18 10:05:16 +02:00
Clément Foucault
0926b896b6 Eevee: Fix crash with transparency. 2017-07-18 10:05:16 +02:00
Campbell Barton
876cc5b7c0 Merge branch 'master' into blender2.8 2017-07-18 18:10:19 +10:00
Campbell Barton
2475dbdc94 Merge branch 'master' into blender2.8 2017-07-18 13:09:36 +10:00
Campbell Barton
66383ea206 Cleanup: quiet picky warnings 2017-07-18 12:14:18 +10:00
Campbell Barton
16fc2ad28e Transform: avoid possible uninitialized var 2017-07-18 12:13:41 +10:00
Brecht Van Lommel
9bbb197d14 Work around small DPI resulting in blurry fonts, clamping auto DPI to minimum 96.
Since we added auto DPI on Linux, on some systems the UI draws smaller than before
due to the monitor reporting DPI values like 88. Blender font drawing gives quite
blurry results for such slightly smaller DPI, apparently because the builtin font
isn't really designed for such small font sizes. As a workaround this clamps the
auto DPI to minimum 96, since the main case we are interested in supporting is
high DPI displays anyway.

Differential Revision: https://developer.blender.org/D2740
2017-07-17 18:31:19 +02:00
Brecht Van Lommel
d268cad06a Fix T52090: clarify meaning of EnumProperty number when using ENUM_FLAG. 2017-07-17 18:31:19 +02:00
Brecht Van Lommel
f05f2f0336 Fix T51971: IK non-uniform scale regression.
This is a different fix for the issue from D2088, preserving backwards compatibility
for IK stretching. The main problem with this patch is that this new behavior has
been there for a year, so it may break rigs created since then which rely on the new
IK stretch behavior.

Test file for various cases:
https://developer.blender.org/diffusion/BL/browse/trunk/lib/tests/animation/IK.blend

Reviewers: campbellbarton

Subscribers: maverick, pkrime

Differential Revision: https://developer.blender.org/D2743
2017-07-17 18:31:19 +02:00
Gaia Clary
9feeb14e91 fix T52065: Joint ID was generated wrong for bone animation exports 2017-07-17 16:39:47 +02:00
Dalai Felinto
36977a962b Removing unused layer TODO placeholders 2017-07-17 14:40:12 +02:00
Dalai Felinto
8dadeab47f Fix shadow geometry shader 2017-07-17 14:28:17 +02:00
Bastien Montagne
06505c5264 Fix T39925: Set Origin to Geometry on a new text object moves the origin away from the object
No need to take into account font size here...
2017-07-17 12:56:12 +02:00
Clément Foucault
4c835b9168 Eevee: Fix double promotion. 2017-07-17 11:01:31 +02:00
Dalai Felinto
728d64c5dc Fix blenderplayer 2017-07-17 09:30:39 +02:00
Campbell Barton
f942511fd2 Manipulator: allow ID-writing for most callbacks 2017-07-17 17:20:54 +10:00
Campbell Barton
ab5be294ce Manipulator: split alpha out of color property
Gives more convenient access from Python: `mathutils.Color`

Also correct some copy-paste error w/ property subtypes.
2017-07-17 15:06:18 +10:00
Campbell Barton
02257ace22 Fix crash re-registering the same manipulator type
Wasn't unlinking from the group instance.
2017-07-17 14:36:20 +10:00
Campbell Barton
d221a999cb Manipulator: add snap flag 2017-07-17 14:16:23 +10:00
Campbell Barton
193d7d6333 Merge branch 'master' into blender2.8 2017-07-17 13:21:05 +10:00
Campbell Barton
3d1e5bca88 PyAPI: don't use deprecated PyModule_GetFilename
Allows compiling with newer Python versions.
Also add missing decref when compiling as a py-module.
2017-07-17 12:53:55 +10:00
Campbell Barton
a11808a248 Manipulator: allow py manipulators w/o properties
These could be used for manipulators that run operators.
2017-07-17 12:29:37 +10:00
Joshua Leung
7021aa245d Fix T52058: Jumping to keyframe causes Blender to freeze indefinitely
Revise the logic here to be more robust when keyframes with
similar-but-different frame numbers (e.g. 70.000000 vs 70.000008)
would cause the search to go into an infinite loop, as the same
keyframe was repeatedly found (and skipped).
2017-07-17 02:26:49 +12:00
Brecht Van Lommel
5c30bc285c Fix T52034: cell noise renders different.
Tweak the bias from the previous fix a bit to be more backwards compatible in
some scene. In the end which way we round is quite arbitrary, but keeping the
case where the texture coordinate is exactly zero the same seems better.
2017-07-16 01:27:55 +02:00
Campbell Barton
49c29dc82f Fix T52066: Grid Mesh UV's aren't correct 2017-07-16 00:03:52 +10:00
mano-wii
a3d9ef2ea5 Merge branch 'master' into blender2.8 2017-07-14 17:26:46 -03:00
mano-wii
8009564503 Snap System: Fixed index of objects used to make snap to volume
*note: make a complete test scene
2017-07-14 17:25:16 -03:00
mano-wii
37242f0a47 Merge branch 'master' into blender2.8
# Conflicts:
#	source/blender/editors/transform/transform_snap_object.c
2017-07-14 16:56:36 -03:00