3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Fri, 18 May 2018 09:02:39 +0000 (11:02 +0200)]
Merge branch 'master' into blender2.8

3 years agoLogging: add --show-log-backtrace
Campbell Barton [Fri, 18 May 2018 09:00:47 +0000 (11:00 +0200)]
Logging: add --show-log-backtrace

Useful in debug builds to see a functions callers.

3 years agoTool System: store the active tool in ScrArea
Campbell Barton [Fri, 18 May 2018 07:35:10 +0000 (09:35 +0200)]
Tool System: store the active tool in ScrArea

Without this we need to have the context to get the
(space_type, mode) args for an active tool lookup.

For event handling & poll its more convenient to have direct access.

3 years agoCleanup: unused DNA
Campbell Barton [Fri, 18 May 2018 06:14:36 +0000 (08:14 +0200)]
Cleanup: unused DNA

3 years agoCleanup: use '_Runtime' suffix
Campbell Barton [Fri, 18 May 2018 06:02:32 +0000 (08:02 +0200)]
Cleanup: use '_Runtime' suffix

Allows for more easily finding runtime versions of any struct.

3 years agoTool System: add cursor (currently unused)
Campbell Barton [Fri, 18 May 2018 05:58:37 +0000 (07:58 +0200)]
Tool System: add cursor (currently unused)

3 years agoCleanup: remove tool definition access function
Campbell Barton [Fri, 18 May 2018 05:24:17 +0000 (07:24 +0200)]
Cleanup: remove tool definition access function

No longer needed since names not values are compared
when checking if a tool is active.

3 years agoColor: Assume Rec 709 in remaining comp nodes
Aaron Carlisle [Thu, 17 May 2018 21:20:32 +0000 (17:20 -0400)]
Color: Assume Rec 709 in remaining comp nodes

Part of T54798

3 years agoTool System: tools now initialize on startup
Campbell Barton [Thu, 17 May 2018 20:01:58 +0000 (22:01 +0200)]
Tool System: tools now initialize on startup

3 years agoRNA: quiet warning
Campbell Barton [Thu, 17 May 2018 18:35:46 +0000 (20:35 +0200)]
RNA: quiet warning

Harmless but annoying.

3 years agoTool System: use context mode
Campbell Barton [Thu, 17 May 2018 18:28:14 +0000 (20:28 +0200)]
Tool System: use context mode

Was using object mode in the workspace API which isn't
useful for accessing tools.

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Thu, 17 May 2018 17:55:27 +0000 (19:55 +0200)]
Merge branch 'master' into blender2.8

3 years agoRNA: move enums to rna_rna.c
Campbell Barton [Thu, 17 May 2018 17:10:45 +0000 (19:10 +0200)]
RNA: move enums to rna_rna.c

Needed for use in rna non runtime code.

3 years agoRNA: move enums to rna_rna.c
Campbell Barton [Thu, 17 May 2018 17:10:45 +0000 (19:10 +0200)]
RNA: move enums to rna_rna.c

Needed for use in rna non runtime code.

3 years agomakesrna: error check from 2.8
Campbell Barton [Thu, 17 May 2018 17:05:46 +0000 (19:05 +0200)]
makesrna: error check from 2.8

3 years agoFix UV shadow drawing
Campbell Barton [Thu, 17 May 2018 16:44:03 +0000 (18:44 +0200)]
Fix UV shadow drawing

3 years agoStatic Override/RNA diffing: Use a nasty macro to factorize a bit the code.
Bastien Montagne [Thu, 17 May 2018 15:06:08 +0000 (17:06 +0200)]
Static Override/RNA diffing: Use a nasty macro to factorize a bit the code.

This piece of code remains annoyingly verbose, but at least now we do
not have anymore twice the same logic duplicated between single array
element handling, and non-array properties.

3 years agoMulti-Object-Mode: EditCuve Select All
Campbell Barton [Thu, 17 May 2018 15:09:02 +0000 (17:09 +0200)]
Multi-Object-Mode: EditCuve Select All

D3381 by @dgriffin91

3 years agoModifiers: ported Surface DerivedMesh → Mesh
Sybren A. Stüvel [Thu, 17 May 2018 14:21:04 +0000 (16:21 +0200)]
Modifiers: ported Surface DerivedMesh → Mesh

3 years agoTool System: per space/mode tool support
Campbell Barton [Wed, 16 May 2018 16:41:11 +0000 (18:41 +0200)]
Tool System: per space/mode tool support

This patch adds support for:

- Per space-type tools (3D view and edit).
- Per mode tools (object, edit, weight-paint .. etc).

The top-bar shows the last activated tools options, this is a design
issue with using a global topbar to show per-space settings.

See D3395

3 years agoCleanup: warning
Campbell Barton [Thu, 17 May 2018 13:51:24 +0000 (15:51 +0200)]
Cleanup: warning

3 years agoTag scene & objects for COW update after physics settings changed via RNA
Sybren A. Stüvel [Thu, 17 May 2018 13:48:23 +0000 (15:48 +0200)]
Tag scene & objects for COW update after physics settings changed via RNA

3 years agoModifiers: ported Collision DerivedMesh → Mesh
Sybren A. Stüvel [Thu, 17 May 2018 13:26:59 +0000 (15:26 +0200)]
Modifiers: ported Collision DerivedMesh → Mesh

3 years agoCollision Modifier: get time from depsgraph instead of scene
Sybren A. Stüvel [Thu, 17 May 2018 13:28:18 +0000 (15:28 +0200)]
Collision Modifier: get time from depsgraph instead of scene

3 years agoEEVEE: Fix Motion Blur for copy-on-write
Dalai Felinto [Thu, 17 May 2018 13:20:41 +0000 (15:20 +0200)]
EEVEE: Fix Motion Blur for copy-on-write

Get current frame from depsgraph, not scene.

3 years agoOutliner: add ID type filter option for Blender File and Orphaned Data.
Brecht Van Lommel [Thu, 17 May 2018 11:40:59 +0000 (13:40 +0200)]
Outliner: add ID type filter option for Blender File and Orphaned Data.

3 years agoOutliner: move filter menu to the left in header.
Brecht Van Lommel [Thu, 17 May 2018 10:27:22 +0000 (12:27 +0200)]
Outliner: move filter menu to the left in header.

3 years agoOutliner: in Blender File, use upper case names and icons.
Brecht Van Lommel [Thu, 17 May 2018 10:20:40 +0000 (12:20 +0200)]
Outliner: in Blender File, use upper case names and icons.

3 years agoOutliner: rename Data-Blocks to Data API, to make clear it's low level stuff.
Brecht Van Lommel [Thu, 17 May 2018 10:20:10 +0000 (12:20 +0200)]
Outliner: rename Data-Blocks to Data API, to make clear it's low level stuff.

3 years agoModifiers: ported Particle Instance DerivedMesh → Mesh
Sybren A. Stüvel [Thu, 17 May 2018 11:45:47 +0000 (13:45 +0200)]
Modifiers: ported Particle Instance DerivedMesh → Mesh

3 years agoParticle System: fixed dupliobject drawing by getting time from depsgraph
Sybren A. Stüvel [Thu, 17 May 2018 09:42:13 +0000 (11:42 +0200)]
Particle System: fixed dupliobject drawing by getting time from depsgraph

3 years agoFix menu navigation and modal tools affecting the active region.
Brecht Van Lommel [Thu, 17 May 2018 08:56:36 +0000 (10:56 +0200)]
Fix menu navigation and modal tools affecting the active region.

We updated the active region during redraw to fix missing updates on
file load, restrict it more now to avoid unwanted updates.

3 years agoArmature: Fix non working Wireframe option on bones.
Clément Foucault [Thu, 17 May 2018 09:11:53 +0000 (11:11 +0200)]
Armature: Fix non working Wireframe option on bones.

3 years agoT55090: Proxy bones were not selectable
Jeroen Bakker [Thu, 17 May 2018 06:54:40 +0000 (08:54 +0200)]
T55090: Proxy bones were not selectable

 - Implemented custom selection in pose mode overriding the rest. This
selection mode is only done for bone selection right now

3 years agoCleanup: Use `ED_view3d_win_to_ray_ex` to get the ray and remove unused parameter.
Germano [Thu, 17 May 2018 02:04:28 +0000 (23:04 -0300)]
Cleanup: Use `ED_view3d_win_to_ray_ex` to get the ray and remove unused parameter.

3 years agoTransform: Use `isect_ray_seg_v3` instead `dist_squared_ray_to_seg_v3` in the functio...
Germano [Thu, 17 May 2018 01:04:41 +0000 (22:04 -0300)]
Transform: Use `isect_ray_seg_v3` instead `dist_squared_ray_to_seg_v3` in the function that tests the snap on edges.

3 years agoBLI_math_geom: Separate the `isect_ray_seg_v3` from `dist_squared_ray_to_seg_v3`.
Germano [Thu, 17 May 2018 00:36:41 +0000 (21:36 -0300)]
BLI_math_geom: Separate the `isect_ray_seg_v3` from `dist_squared_ray_to_seg_v3`.

3 years agoTransform: Fix bugs for the latest changes to the snap system.
Germano [Thu, 17 May 2018 00:32:52 +0000 (21:32 -0300)]
Transform: Fix bugs for the latest changes to the snap system.

3 years agoEEVEE Scene: Set all variable as overridable
Dalai Felinto [Wed, 16 May 2018 20:25:13 +0000 (22:25 +0200)]
EEVEE Scene: Set all variable as overridable

3 years agoRemove ViewLayer settings - cleanup 2/2
Dalai Felinto [Wed, 16 May 2018 20:03:25 +0000 (22:03 +0200)]
Remove ViewLayer settings - cleanup 2/2

3 years agoRemove ViewLayer settings - cleanup 1/2
Dalai Felinto [Wed, 16 May 2018 19:40:05 +0000 (21:40 +0200)]
Remove ViewLayer settings - cleanup 1/2

3 years agoMove Clay properties into scene
Dalai Felinto [Wed, 16 May 2018 19:28:05 +0000 (21:28 +0200)]
Move Clay properties into scene

Per collection overrides are gone now.

3 years agoMove EEVEE properties into scene
Dalai Felinto [Wed, 16 May 2018 17:34:24 +0000 (19:34 +0200)]
Move EEVEE properties into scene

We handle doversion for the scene properties, but not for the
view layer overrides.

Overrides will be implemented in a different way via dynamic overrides.
For now this data is completely lost.

3 years agoLayer unittest: Disable the override tests
Dalai Felinto [Wed, 16 May 2018 21:12:59 +0000 (23:12 +0200)]
Layer unittest: Disable the override tests

They are failing for some time now, and they will be obsolete soon anyways.

3 years agoCleanup: BKE_bvhuitls: Use a struct rather than re-create each member of it.
Germano [Wed, 16 May 2018 18:26:33 +0000 (15:26 -0300)]
Cleanup: BKE_bvhuitls: Use a struct rather than re-create each member of it.

3 years agoFix crash when duplicating an object type mesh with raycast operation enabled.
Germano [Wed, 16 May 2018 17:28:28 +0000 (14:28 -0300)]
Fix crash when duplicating an object type mesh with raycast operation enabled.

3 years agoTool System: pass space type when setting tool
Campbell Barton [Wed, 16 May 2018 16:59:43 +0000 (18:59 +0200)]
Tool System: pass space type when setting tool

Internal change only, needed because object mode is now in top-bar.

3 years agoCleanup: unused vars
Campbell Barton [Wed, 16 May 2018 17:04:07 +0000 (19:04 +0200)]
Cleanup: unused vars

3 years agoStatic overrides: reduce the amount of instantiated objects when overriding a group.
Bastien Montagne [Wed, 16 May 2018 16:57:24 +0000 (18:57 +0200)]
Static overrides: reduce the amount of instantiated objects when overriding a group.

For now, do not override/instantiate objects used as boneshapes.

Note that this is a rather poor/dirty hack, it seems Spring char groups
still have a lot of other (unused???) shape objects.

Ideally lib groups should be designed more cleanly for the new Static
Override system, putting only really usable objects into 'main' group,
and placing the others in sub-groups, helpers groups, or so...

3 years agoArmature: Fix T55068: Wireframe bones with custom shapes not working in object mode
Clément Foucault [Wed, 16 May 2018 16:40:25 +0000 (18:40 +0200)]
Armature: Fix T55068: Wireframe bones with custom shapes not working in object mode

3 years agoArmature: Cleanup: Remove unused function and use less silly wire drawing.
Clément Foucault [Wed, 16 May 2018 16:01:32 +0000 (18:01 +0200)]
Armature: Cleanup: Remove unused function and use less silly wire drawing.

3 years agoParticle edit: Use proper modifier to get evaluated derived mesh from
Sergey Sharybin [Wed, 16 May 2018 15:45:21 +0000 (17:45 +0200)]
Particle edit: Use proper modifier to get evaluated derived mesh from

3 years agoParticle edit: Fix disappearing child particles when toggling edit mode
Sergey Sharybin [Wed, 16 May 2018 15:14:53 +0000 (17:14 +0200)]
Particle edit: Fix disappearing child particles when toggling edit mode

Going to object edit mode and back to particle edit mode used to loose all
children from being displayed.

3 years agoFix memleak with meshes having IDProps in modifier stack evaluation.
Bastien Montagne [Wed, 16 May 2018 15:35:54 +0000 (17:35 +0200)]
Fix memleak with meshes having IDProps in modifier stack evaluation.

*Always* use BKE_library API to handle IDs allocation and freeing,
unless you have a very, very, very good reason not to do so - and
perfectly know what you are doing.

3 years agoFix again bloody locked proxy bones...
Bastien Montagne [Wed, 16 May 2018 15:23:52 +0000 (17:23 +0200)]
Fix again bloody locked proxy bones...

No idea why that was working this morning, now we do not get CoW tag
anymore (which kind of makes sense since it's set *after* copying
happens...), so just resorting to using the NO_MAIN flag instead.

3 years agoEevee: Fix missing Ambient Occlusion node in add node menu.
Clément Foucault [Wed, 16 May 2018 13:52:04 +0000 (15:52 +0200)]
Eevee: Fix missing Ambient Occlusion node in add node menu.

3 years agoArmature: Fix T55070: Bones relationship lines are offsetted
Clément Foucault [Wed, 16 May 2018 12:53:41 +0000 (14:53 +0200)]
Armature: Fix T55070: Bones relationship lines are offsetted

Was missing object matrix multiplication.

3 years agoGPUShader/DRW: Add Transform Feedback support.
Clément Foucault [Wed, 16 May 2018 10:47:15 +0000 (12:47 +0200)]
GPUShader/DRW: Add Transform Feedback support.

This is a usefull feature that can be used to do a lot of precomputation on
the GPU instead of the CPU.

Implementation is simple and only covers the most usefull case.

How to use:
- Create shader with transform feedback.
- Create a pass with DRW_STATE_TRANS_FEEDBACK.
- Create a target Gwn_VertBuf (make sure it's big enough).
- Create a shading group with DRW_shgroup_transform_feedback_create().
- Add your draw calls to the shading group.
- Render your pass normaly.

Current limitation:
- Only one output buffer.
- Cannot pause/resume tfb rendering to interleave with normal drawcalls.
- Cannot get the number of verts drawn.

3 years agoEevee: Add support for Ambient Occlusion node.
Clément Foucault [Tue, 15 May 2018 15:30:52 +0000 (17:30 +0200)]
Eevee: Add support for Ambient Occlusion node.

3 years agoEevee: Change normal buffer texture format for more precision.
Clément Foucault [Tue, 15 May 2018 10:44:11 +0000 (12:44 +0200)]
Eevee: Change normal buffer texture format for more precision.

This means more accurate SSR with less faceted artifacts.

3 years agoShader Node Editor: Add Closure to RGB convertion node.
Clément Foucault [Mon, 14 May 2018 11:34:54 +0000 (13:34 +0200)]
Shader Node Editor: Add Closure to RGB convertion node.

Patch D3205 by Kanzaki Wataru

Only implemented in Eevee for now. Collapse a closure to RGBA so we can
do NPR stuff on the resulting color.

Use an emission shader to convert the color back to a closure.

Doing this will break PBR and will kill any SSR and SSS effects the shader
the shader rely on. That said screen space refraction and ambient occlusion
are supported due to the way they are implemented.

3 years agoWorkbench: World based studio lighting
Jeroen Bakker [Wed, 16 May 2018 14:42:30 +0000 (16:42 +0200)]
Workbench: World based studio lighting

Disabled shadows for now as the calculation of the light direction is
still to bogus.

3 years agoParticle System: ported most DerivedMesh → Mesh
Sybren A. Stüvel [Tue, 15 May 2018 11:26:40 +0000 (13:26 +0200)]
Particle System: ported most DerivedMesh → Mesh

There are a few places where DerivedMesh is still used, most notably
when calling the (not yet ported) cloth simulation. There is also still
the use of Object.derivedDeform and Object.derivedFinal. Those places are
marked with a TODO.

Some functions in the editors module were copied to accept Mesh. Those
already had 'mesh' in the name; the copies are suffixed with '__real_mesh'
for easy renaming later when the DM-based functionality is removed.

3 years agoMesh: Set deformed_only=1 when copied mesh is from main library
Sybren A. Stüvel [Wed, 16 May 2018 12:33:14 +0000 (14:33 +0200)]
Mesh: Set deformed_only=1 when copied mesh is from main library

3 years agoParticle System: use DEG to get current time in psys_get_particle_state()
Sybren A. Stüvel [Wed, 16 May 2018 14:09:48 +0000 (16:09 +0200)]
Particle System: use DEG to get current time in psys_get_particle_state()

3 years agoParticle System: Pass correct particle index when drawing
Sybren A. Stüvel [Wed, 16 May 2018 14:09:27 +0000 (16:09 +0200)]
Particle System: Pass correct particle index when drawing

Passing the wrong index caused the particles to stop being shown when the
first particle dies.

3 years agofix build error in last commit.
Germano [Wed, 16 May 2018 14:02:54 +0000 (11:02 -0300)]
fix build error in last commit.

3 years agoFix T55076: Hack around to break correct behavior of 2.8 and get back broken-used...
Bastien Montagne [Wed, 16 May 2018 13:41:53 +0000 (15:41 +0200)]
Fix T55076: Hack around to break correct behavior of 2.8 and get back broken-used-as-feature one from 2.7.

Locked bones of proxies should not be editable, at all. But lack of
update from linked rest pose in 2.7 allows to pose and animate locked
bones (not to pose them without animation though, or you'd lose your
pose on next file save & reload).

this is used by artists to always lock all their bones in a rig, so that
proxies fully update when lib rig is modified...

For now, restore that broken behavior in 2.8 by not updating proxies
against lib armature in CoW context (makes sense anyway, we are
currently doing a lot of useless thing when copying data for depsgraph

3 years agoSnap system: Adds support to Clip Planes and uses a clip plane to simulate occlusion
Germano [Wed, 16 May 2018 13:31:27 +0000 (10:31 -0300)]
Snap system: Adds support to Clip Planes and uses a clip plane to simulate occlusion

This patch adds support for clip_planes (ie ignore what is behind a face)...

The idea is to first execute a raycast to get the polygon to which the mouse cursor points.
Then a snap test is done on the vertices or edges of the polygon.
Then with the normal and location obtained in raycast a new clip_plane is created and the snap over the whole scene is processed ignoring the elements behind the clip_plane.

Here 2 gif of how the previous patch would work on blender2.79:



Reviewers: mont29, campbellbarton

Reviewed By: campbellbarton

Subscribers: bliblubli

Tags: #bf_blender_2.8

Differential Revision:

3 years agoFix T55097: Mesh Deformation modifier is ignoring Vgroup option
Sybren A. Stüvel [Wed, 16 May 2018 13:18:49 +0000 (15:18 +0200)]
Fix T55097: Mesh Deformation modifier is ignoring Vgroup option

3 years agoFix T55082: Add Paint Slots for texture painting not working
Dalai Felinto [Wed, 16 May 2018 12:59:16 +0000 (14:59 +0200)]
Fix T55082: Add Paint Slots for texture painting not working

We changed how this work since the BI removal. But since this operator
was moved to the topbar its poll function was returning false.

3 years agoPopover for snapping settings
Pablo Vazquez [Wed, 16 May 2018 12:23:37 +0000 (14:23 +0200)]
Popover for snapping settings

See T55038

3 years agoMulti-Object-Mode: EditMesh Tool Bevel (MESH_OT_bevel)
milios [Wed, 16 May 2018 11:11:50 +0000 (13:11 +0200)]
Multi-Object-Mode: EditMesh Tool Bevel (MESH_OT_bevel)

Maniphest Tasks: T54643
Differential Revision:

3 years agoReverted copying mesh->runtime.deformed_only in CDDM_from_mesh_ex
Sybren A. Stüvel [Wed, 16 May 2018 11:06:54 +0000 (13:06 +0200)]
Reverted copying mesh->runtime.deformed_only in CDDM_from_mesh_ex

Doing that copy is the right thing, but only if the mesh has its own
deformed_only flag set correctly. This isn't generally the case, so
keeping dm->deformedOnly = 1 is better.

3 years agoMulti-Object-Editing: MESH_OT_faces_select_linked_flat
Luc Revardel [Wed, 16 May 2018 11:02:36 +0000 (13:02 +0200)]
Multi-Object-Editing: MESH_OT_faces_select_linked_flat

Reviewers: dfelinto

Maniphest Tasks: T54643

Differential Revision:

3 years agoSilence warning about functions having no prototype
Mai Lavelle [Wed, 16 May 2018 10:44:49 +0000 (06:44 -0400)]
Silence warning about functions having no prototype

3 years agoSave 'deform_only' flag in Mesh.runtime
Sybren A. Stüvel [Tue, 15 May 2018 11:26:24 +0000 (13:26 +0200)]
Save 'deform_only' flag in Mesh.runtime

This flag is copied when converting between DM and Mesh.

This flag is set to true in get_mesh(), to mimick the behaviour of
CDDM_from_mesh_ex. This is necessary for the particle system to work

3 years agoMulti-Object-Editing: intersect boolean (MESH_OT_intersect_boolean)
milios [Wed, 16 May 2018 10:28:32 +0000 (12:28 +0200)]
Multi-Object-Editing: intersect boolean (MESH_OT_intersect_boolean)

Reviewers: dfelinto (changed test from totvert to totfacesel before committing)

Maniphest Tasks: T54643
Differential Revision:

3 years agoFix check for MESH_OT_intersect
Dalai Felinto [Wed, 16 May 2018 10:26:26 +0000 (12:26 +0200)]
Fix check for MESH_OT_intersect

3 years agoMulti-Object-Editing: intersect (MESH_OT_intersect)
milios [Wed, 16 May 2018 09:57:36 +0000 (11:57 +0200)]
Multi-Object-Editing: intersect (MESH_OT_intersect)

Reviewers: dfelinto

Maniphest Tasks: T54643
Differential Revision:

3 years agoModifiers: Port mesh_calc_modifiers from DerivedMesh to Mesh
Mai Lavelle [Fri, 11 May 2018 07:53:52 +0000 (03:53 -0400)]
Modifiers: Port mesh_calc_modifiers from DerivedMesh to Mesh

This ports the main modifier eval loop.

A few things haven't been ported yet: tessface and shapekey related code. As
far as I can tell, shapekey code was never entered into.

3 years agoAdd modifier_deformVerts_ensure_normals, modifier_applyModifier_ensure_normals
Mai Lavelle [Tue, 24 Apr 2018 08:08:16 +0000 (04:08 -0400)]
Add modifier_deformVerts_ensure_normals, modifier_applyModifier_ensure_normals

Same as `modwrap_deformVerts` and `modwrap_applyModifier` but for `Mesh`.

3 years agoAdd BKE_mesh_is_valid
Mai Lavelle [Fri, 27 Apr 2018 04:39:53 +0000 (00:39 -0400)]
Add BKE_mesh_is_valid

Non modifying version of `BKE_mesh_validate`, mirrors `DM_is_valid` more
closely. Will be used in port of `mesh_calc_modifiers`
from `DerivedMesh` to `Mesh`.

3 years agoPopover for Pivot Point in top bar
Pablo Vazquez [Wed, 16 May 2018 10:03:22 +0000 (12:03 +0200)]
Popover for Pivot Point in top bar

From T55038

3 years agoMulti-Object-Editing: Weld Edges into Faces(MESH_OT_face_split_by_edges)
milios [Wed, 16 May 2018 09:48:34 +0000 (11:48 +0200)]
Multi-Object-Editing: Weld Edges into Faces(MESH_OT_face_split_by_edges)

Reviewers: dfelinto

Maniphest Tasks: T54643

Differential Revision:

3 years agoParticle system: get current time from depsgraph
Sybren A. Stüvel [Wed, 16 May 2018 08:50:49 +0000 (10:50 +0200)]
Particle system: get current time from depsgraph

This makes the particle animation work again!

3 years agoWorkbench: Read studiolights from USER + SYSTEM datafiles
Jeroen Bakker [Wed, 16 May 2018 07:13:48 +0000 (09:13 +0200)]
Workbench: Read studiolights from USER + SYSTEM datafiles

3 years agoFix navigate widget w/ region overlap
Campbell Barton [Wed, 16 May 2018 06:46:40 +0000 (08:46 +0200)]
Fix navigate widget w/ region overlap

3 years agoFix visible region overlap calculation
Campbell Barton [Wed, 16 May 2018 06:32:02 +0000 (08:32 +0200)]
Fix visible region overlap calculation

Existing code didn't account for top/bottom overlap.

3 years agoTransform: Snap: Make sure if bmesh arrays need to be recalculated.
Germano [Tue, 15 May 2018 19:15:14 +0000 (16:15 -0300)]
Transform: Snap: Make sure if bmesh arrays need to be recalculated.

3 years agoScene raycast: The return index should indicate the polygon instead of the looptri.
Germano [Tue, 15 May 2018 18:38:17 +0000 (15:38 -0300)]
Scene raycast: The return index should indicate the polygon instead of the looptri.

This was the default behavior and could break some addon since looptri is almost useless for the current python API.

3 years agoMerge branch 'master' into blender2.8
Campbell Barton [Tue, 15 May 2018 17:53:34 +0000 (19:53 +0200)]
Merge branch 'master' into blender2.8

3 years agoWorkbench: send right event after shadow_shift changes
Jeroen Bakker [Tue, 15 May 2018 17:47:29 +0000 (19:47 +0200)]
Workbench: send right event after shadow_shift changes

3 years agoRevert "BLI_kdopbvh: Reference clip_planes callback to find nearest projected."
Germano [Tue, 15 May 2018 17:37:45 +0000 (14:37 -0300)]
Revert "BLI_kdopbvh: Reference clip_planes callback to find nearest projected."

This reverts commit 717dd4cecd2ea8eaa7b3bbfb5a5c7ec65f0337c0.

It was causing problems in the protactor ruler.
I'll think of a better solution.

3 years agoFix T55032: Redo w/ file saved in edit-mode failed
Campbell Barton [Tue, 15 May 2018 17:30:59 +0000 (19:30 +0200)]
Fix T55032: Redo w/ file saved in edit-mode failed

It's important edit-mode has a step stored for redo to work,
file load now ensures this in a generic way.

3 years agoCleanup: pass the use_depth parameter to the `SnapObjectParams` struct in the ED_tran...
Germano [Tue, 15 May 2018 17:32:30 +0000 (14:32 -0300)]
Cleanup: pass the use_depth parameter to the `SnapObjectParams` struct in the ED_transform_snap_object_project_view3d_mixed.

3 years agoBLI_kdopbvh: Reference clip_planes callback to find nearest projected.
Germano [Tue, 15 May 2018 17:14:25 +0000 (14:14 -0300)]
BLI_kdopbvh: Reference clip_planes callback to find nearest projected.

Clip_planes are an important parameter to be used in callbacks.

3 years agoCOW Fix: VIEW3D_OT_select_lasso now works for Pose Bones. Other modes untested.
Joshua Leung [Tue, 15 May 2018 17:13:15 +0000 (19:13 +0200)]
COW Fix: VIEW3D_OT_select_lasso now works for Pose Bones. Other modes untested.

3 years agoBLI_math: Added isect_point_planes_v3_negated function.
Germano [Tue, 15 May 2018 17:10:41 +0000 (14:10 -0300)]
BLI_math: Added isect_point_planes_v3_negated function.

3 years agoFix POST_OT_hide/reveal
Joshua Leung [Tue, 15 May 2018 17:08:00 +0000 (19:08 +0200)]
Fix POST_OT_hide/reveal

Apparently they weren't actually working, despite seemingly working
when tested earlier. Argh!