Commit Graph

59529 Commits

Author SHA1 Message Date
Campbell Barton
4df2179f19 Cleanup: rename 'screen_changed_update'
Match 'workspace_change_update'.
2018-03-02 13:25:21 +11:00
Campbell Barton
a7355c3221 WorksSpace: sync object-modes when changing scene
Note that this code will likely be generalized,
currently each new case is a little different though
so it's too early to move them into general functions.
2018-03-02 13:19:52 +11:00
Campbell Barton
bc23381a26 Cleanup: remove print 2018-03-02 10:22:10 +11:00
Dalai Felinto
b941d808c1 Remove legacy code used for sequencer preview image
This (now removed code) calls gl_Vertex deprecated draws. It was doing
background drawing (color gradient, flat background) which is not used
by any engine.
2018-03-01 18:22:31 -03:00
Dalai Felinto
8f7e3600d1 More clean of macros with an _END and no _BEGIN
Follow up on 7aed2de798.
2018-03-01 12:23:25 -03:00
Campbell Barton
f242f3e75b Fix assert on exit edit-mode 2018-03-01 22:46:25 +11:00
Campbell Barton
865fdd61df 3D View: minor selection tweaks
- don't initialize the GL context when cache is used.
- don't run second pass when the first one has no hits.
2018-03-01 22:05:09 +11:00
Campbell Barton
bcafdc82d8 WorkSpace: fix mode exiting w/ multi-window
Activating an object exited modes for all other objects in the layer.
Now check these objects aren't active in other windows first.
2018-03-01 21:33:06 +11:00
Campbell Barton
7aed2de798 Cleanup: macro's w/ an _END need a matching _BEGIN
Convention from 2.7x, since some looping macros don't need an '_END',
it avoids confusion to keep this.
2018-03-01 19:01:53 +11:00
Campbell Barton
1fc5eb305a Missing assignment in object mode sync
Own error in recent change (1aeb9294f4)
2018-03-01 18:37:49 +11:00
Campbell Barton
eeae50fc1c DRW: add ability to lock states from changing
Selection code relies on being able to set the depth functions
however passes have their own depth settings.

Add DRW_state_lock to ignore passes settings for particular flags.

This fixes occlusion queries cycling through objects under the cursor.
2018-03-01 17:14:35 +11:00
Campbell Barton
b5cc55c822 Merge branch 'master' into blender2.8 2018-03-01 16:48:13 +11:00
Campbell Barton
172614fb7d GPU_select: remove unused finalize function
Changed 2.8x code so this is no longer needed.
2018-03-01 16:43:45 +11:00
Campbell Barton
a459ef2827 Fix T54190: Occlusion query select failed
By default select wasn't picking the nearest object,
this could have been fixed by not clearing the depth buffer,
but calling GPU_select_(begin/end) without the binded frame-buffer
caused issues for depth-picking. So move GPU_select begin/end to a
callback.

This also has the advantage that only needs to populate the engines once
to draw two passes.

Note that cycling through objects fails with occlusion queries still,
will fix shortly.
2018-03-01 16:37:39 +11:00
Clément Foucault
68015f9d39 DRW: Initial implementation of Frustum culling.
This is very efficient and add a pretty low overhead (0.1ms of drawing time for 10K objects passing through all tests, on my i3-4100M).
The like the rest of the DRWCallState, test is "cached" until the view matrices changes.
2018-03-01 03:53:25 +01:00
Clément Foucault
dee2efb968 Clay: Make use of optimized DRW_shgroup_call_object_add. 2018-03-01 03:53:25 +01:00
Clément Foucault
5d0665d435 DRW: DRWCallState: Fix matflag being overwritten by other engines. 2018-03-01 03:53:25 +01:00
Clément Foucault
725112cce7 DRW: Codestyle: Remove DRWCallHeader and DRWCallGenerate 2018-03-01 03:53:25 +01:00
Clément Foucault
64e35f6fd2 DRW: Reuse DRWCallState for the same object.
This enables caching the matrices and reducing redraw time of the same object which is particulary important for eevee.
2018-03-01 03:53:25 +01:00
Clément Foucault
1ba96857d1 DRW: Merge calls_generate pool with calls pool & add DRWCallState pool. 2018-03-01 03:53:25 +01:00
Clément Foucault
d1da7dba47 DRW: Fix warnings in Release Build. 2018-03-01 03:53:25 +01:00
Brecht Van Lommel
33b6f944c6 Merge branch 'master' into blender2.8 2018-02-28 21:34:09 +01:00
Brecht Van Lommel
03d1070378 Cycles: change principled BSDF default distribution and SSS.
* Use a subsurface color equal to the base color, and give the subsurface
  radius skin like values by default. This is how the parameter should
  typically be used.
* Use GGX by default, multiscatter GGX is still quite noisy and has some
  fireflies so let's keep it optional for now.
2018-02-28 21:31:28 +01:00
Dalai Felinto
382218beb2 Point cache: Pass EvaluationContext for all the related functions
Now the only missing bit seems to be in Cycles to pass depsgraph to
builtin_image_float_pixels().

Ideally we could get evaluation context instead of using depsgraph + settings.
But for the other rna EvaluationContext functions this is how we are doing.

Reviewers: sergey, brecht

Differential Revision: https://developer.blender.org/D3087
2018-02-28 13:55:56 -03:00
Gaia Clary
4a892adac5 merge from master (needed to fix collada headerfiles which have been modified in master and in blender2.8 slightly different) 2018-02-28 17:29:56 +01:00
Bastien Montagne
4762c099d7 Fix T52685, part II: Add option to strip numbers from flipped bone names again.
While doing so with Bone_R.001, Bone_R.003, Bone_R.003 etc. is doomed to
issues, doing that on duplicates of actually correctly named bones can
be handy, and safe.

So adding back as an option (was removed in rB702bc5ba26d5).
2018-02-28 17:13:31 +01:00
Gaia Clary
e73fe77ac0 collada: EvaluationContext is now feeded into the class instances of AnimationExporter and DocumentExporter on creation. Also skipped the const qualifier for now because BKE_scene_graph_update_for_newframe() needs it to be not const 2018-02-28 17:10:57 +01:00
Bastien Montagne
cee66b8cc0 Fix T52685: Flip names for bones its not working.
Flip names operator changed in rB702bc5ba26d5, to some sensible
behavior. But this breaks common workflow of 'duplicate part of the
bones, scale-mirror new ones, and flip their names'.

So now, instead of doing this in two steps, trying to guesstimate which
bones should get which name, just add option to flip names to duplicate
operator itself. Simpler, safer, and much, much more consitent behavior
and predictable results.
2018-02-28 16:59:32 +01:00
Sergey Sharybin
56ea42efa1 Radial control: Skip operator properties from being saved
This solves issue with tweaking brush size when interleaving particle edit
and texture paint modes. The issue was caused by texture paing setting more
operator properties then it's done for particle edit mode, which made window
manager to use saved proeprties for the "missing" ones.

Don't see any reason why we would want to save any of those properties.

This is a regression since rB83b60dac57a1.
2018-02-28 16:14:35 +01:00
Gaia Clary
a363324f7f Collada: Make EvaluationContext const as its only used for reading here 2018-02-28 16:05:29 +01:00
Gaia Clary
91c3cfbb6f collada: call from operator to Collada exporter/importer now uses structures instead of passing many parameters 2018-02-28 16:05:29 +01:00
Gaia Clary
01f732d97b Collada: Moved structure definitions for export settings to the exportSettings.h Also make typedefs for import/export structures. 2018-02-28 16:05:28 +01:00
Campbell Barton
d937d06c02 WorkSpace: UI filtering for add-ons
Allows for each workspace to have it's own add-ons on display.

Filtering for: Panels, Menus, Keymaps & Manipulators.
Automatically applies to add-ons at the moment.

Access from workspace, toggled off by default
once enabled, add-ons can be white-listed.

See D3076
2018-03-01 01:31:07 +11:00
Sergey Sharybin
80d1d9629e Depsgraph: Update tool settings when updating CoW scene 2018-02-28 14:57:49 +01:00
Sergey Sharybin
4e8bd537c3 Merge branch 'master' into blender2.8 2018-02-28 14:54:51 +01:00
Sergey Sharybin
8b8e16dc2c De-duplicate tool settings copy and make tool settings freeing reusable 2018-02-28 14:52:17 +01:00
Campbell Barton
bd25e73c54 Null pointer check exiting sculpt mode
Needed for 2.8x, harmless here.
2018-03-01 00:39:42 +11:00
Campbell Barton
e7aca5bd3c Null pointer check exiting sculpt mode
Needed for 2.8x, harmless here.
2018-02-28 23:23:48 +11:00
Campbell Barton
1aeb9294f4 WorkSpace: use existing objects mode on select
When selecting an object which is already visible in another window
use the mode from that workspace without performing any mode switching.
2018-02-28 23:09:33 +11:00
Campbell Barton
9e9cb9fce9 Workspace: sync object-modes to other workspaces
When changing the mode of an object, apply this to all other
workspaces that share the same active object.

Also use copy the object-mode when duplicating workspaces.
2018-02-28 20:04:21 +11:00
Brecht Van Lommel
c0d6627dc5 Merge branch 'master' into blender2.8 2018-02-28 03:11:17 +01:00
Brecht Van Lommel
c9a2927930 Code cleanup: fix a few harmless warnings. 2018-02-28 03:10:38 +01:00
Brecht Van Lommel
2329cc09e6 Code cleanup: make viewport free simpler and consistent with GPU module. 2018-02-28 03:04:15 +01:00
Brecht Van Lommel
7990105407 Code cleanup: fix a few compiler warnings. 2018-02-28 03:03:07 +01:00
Clément Foucault
be5e437bb5 DRW: Fix broken particle drawing.
Was caused by GPU_SELECT_LOAD_IF_PICKSEL_LIST not iterating at all if shgroup->instance_count == 0.
2018-02-28 02:24:21 +01:00
Clément Foucault
376e74f2aa Object Mode: Fix incorrect lightprobe wire color when in edit mode. 2018-02-28 02:10:38 +01:00
Campbell Barton
6bd53cb541 Cleanup: comment for depth picking code, const args
Note that setting `glDepthFunc` isn't important,
since 2.8 branch changes this value it might seem like an error
however it's harmless in this case - so better make note of this.
2018-02-28 11:47:54 +11:00
Clément Foucault
4d382e2564 DRW: Disable depth test when drawing statistics 2018-02-28 01:39:12 +01:00
Campbell Barton
6addaf7393 Cleanup: use 'uint' for GPU_select 2018-02-28 11:37:39 +11:00
Clément Foucault
74a22c8a8a DRW: Fix negative scale object drawing. 2018-02-28 01:29:26 +01:00