blender.git
2 years agoRemove any reference to scene->base from the old viewport code render-layers
Dalai Felinto [Mon, 6 Feb 2017 17:06:21 +0000 (18:06 +0100)]
Remove any reference to scene->base from the old viewport code

This allows non-clay engine to see the objects as well, even if their code will be dropped later

2 years agoBase refactor 4/4
Dalai Felinto [Mon, 6 Feb 2017 16:40:11 +0000 (17:40 +0100)]
Base refactor 4/4

Rebase ObjectBase > Base

2 years agoBase refactor 3/4
Dalai Felinto [Mon, 6 Feb 2017 15:21:48 +0000 (16:21 +0100)]
Base refactor 3/4

Rename Base > BaseLegacy

Note manual changes on:
* deg_builder_nodes.h
* rna_object.c
* KX_Light.cpp

Rna is still using Base directly for the ObjectBaseLegacy rna object.
Depsgraph change will be removed later.

2 years agoBase refactor 2/4
Dalai Felinto [Mon, 6 Feb 2017 14:33:30 +0000 (15:33 +0100)]
Base refactor 2/4

Include extra legacy values in ObjectBase struct

2 years agoBase refactor 1/4
Dalai Felinto [Mon, 6 Feb 2017 13:49:26 +0000 (14:49 +0100)]
Base refactor 1/4

Rename Base.flag > Base.flag_legacy

2 years agoMissing Base to be ObjectBase convertion for mesh join operator
Dalai Felinto [Mon, 6 Feb 2017 15:08:41 +0000 (16:08 +0100)]
Missing Base to be ObjectBase convertion for mesh join operator

2 years agoMerge branch 'blender2.8' into render-layers
Julian Eisel [Mon, 6 Feb 2017 15:35:42 +0000 (16:35 +0100)]
Merge branch 'blender2.8' into render-layers

2 years agoOpenGL immediate mode: interface_draw.c (cont)
Clément Foucault [Mon, 6 Feb 2017 14:19:45 +0000 (15:19 +0100)]
OpenGL immediate mode: interface_draw.c (cont)

Replaced GL_POLYGON in various places.
Ported UI_draw_roundbox_unfilled

2 years agoOpenGL immediate mode: interface_draw.c
Clément Foucault [Mon, 6 Feb 2017 13:06:13 +0000 (14:06 +0100)]
OpenGL immediate mode: interface_draw.c

2 years agoImmediate mode: edit_curve_paint 1/2
Dalai Felinto [Mon, 6 Feb 2017 11:40:02 +0000 (12:40 +0100)]
Immediate mode: edit_curve_paint 1/2

Part of T49043

2 years agoMerge remote-tracking branch 'origin/blender2.8' into render-layers
Clément Foucault [Mon, 6 Feb 2017 10:35:49 +0000 (11:35 +0100)]
Merge remote-tracking branch 'origin/blender2.8' into render-layers

2 years agoBLF: simplify API for default font
Mike Erwin [Sun, 5 Feb 2017 06:01:41 +0000 (01:01 -0500)]
BLF: simplify API for default font

We had two versions of several BLF functions -- one for a specific font ID & another for the default font.

New BLF_default function lets us simplify this API & delete the redundant code.

2 years agofix most UI text color
Mike Erwin [Sun, 5 Feb 2017 05:54:21 +0000 (00:54 -0500)]
fix most UI text color

There are still many places to fix. I'll miss the bright yellow!

This commit also uses the new BLF_default function where possible.

Part of T49043 since we call glColor less often.

2 years agoadd BLF_default function
Mike Erwin [Sun, 5 Feb 2017 04:12:53 +0000 (23:12 -0500)]
add BLF_default function

So we don't need two versions of all other BLF functions -- one for specific font ID & another for the default font.

2 years agoOpenGL: use GL4 on Linux when available
Mike Erwin [Sun, 5 Feb 2017 00:35:54 +0000 (19:35 -0500)]
OpenGL: use GL4 on Linux when available

Minimum target is still 3.3

On AMD pro driver, asking for a 3.3 context gives us *exactly* 3.3, not 3.3+ as desired.

Have not tested proprietary NV or Intel drivers, but this fix should work on all vendors.

2 years agoMerge remote-tracking branch 'origin/clay-engine' into render-layers
Dalai Felinto [Fri, 3 Feb 2017 17:18:58 +0000 (18:18 +0100)]
Merge remote-tracking branch 'origin/clay-engine' into render-layers

2 years agoBuild Clay engine by default
Clément Foucault [Fri, 3 Feb 2017 16:51:04 +0000 (17:51 +0100)]
Build Clay engine by default

2 years agoAnother fixup for rB6cdb3845 (Added collection props getter/setter)
Dalai Felinto [Fri, 3 Feb 2017 16:39:54 +0000 (17:39 +0100)]
Another fixup for rB6cdb3845 (Added collection props getter/setter)

Values were getting clamped

2 years agoMerge remote-tracking branch 'origin/clay-engine' into render-layers
Dalai Felinto [Fri, 3 Feb 2017 16:22:51 +0000 (17:22 +0100)]
Merge remote-tracking branch 'origin/clay-engine' into render-layers

2 years agoUI: use the "USE" flag for collection settings
Dalai Felinto [Fri, 3 Feb 2017 15:15:49 +0000 (16:15 +0100)]
UI: use the "USE" flag for collection settings

Note, this should be a proper uiTemplate, but a pure python approach seems to work fine for now

2 years agoRNA: macros to wrap collection settings use
Dalai Felinto [Fri, 3 Feb 2017 15:15:10 +0000 (16:15 +0100)]
RNA: macros to wrap collection settings use

2 years agolayer: getter/setter for USE flag
Dalai Felinto [Fri, 3 Feb 2017 15:14:23 +0000 (16:14 +0100)]
layer: getter/setter for USE flag

2 years agoUpdate collection engine setings when updating collection values
Dalai Felinto [Fri, 3 Feb 2017 14:17:09 +0000 (15:17 +0100)]
Update collection engine setings when updating collection values

2 years agoPlaceholder for depsgraph evaluation of collection engine settings
Dalai Felinto [Fri, 3 Feb 2017 14:19:01 +0000 (15:19 +0100)]
Placeholder for depsgraph evaluation of collection engine settings

2 years agoModifications to GPU_texture:
Clément Foucault [Fri, 3 Feb 2017 15:01:32 +0000 (16:01 +0100)]
Modifications to GPU_texture:

-Remove NPOT check as it should be supported by default with OGL 3.3
-All custom texture creation follow the same path now
-Now explicit texture format is required when creating a custom texture (Non RGBA8)
-Support for arrays of textures

Reviewers: dfelinto, merwin

Differential Revision: https://developer.blender.org/D2452

2 years agoFix bplayer (c)
Bastien Montagne [Fri, 3 Feb 2017 14:18:13 +0000 (15:18 +0100)]
Fix bplayer (c)

2 years agoRNA: use new getter/setter functions for LayerEngineSettings
Dalai Felinto [Fri, 3 Feb 2017 14:06:11 +0000 (15:06 +0100)]
RNA: use new getter/setter functions for LayerEngineSettings

2 years agoFixup for rB6cdb3845 (Added collection props getter/setter)
Dalai Felinto [Fri, 3 Feb 2017 13:44:08 +0000 (14:44 +0100)]
Fixup for rB6cdb3845 (Added collection props getter/setter)

2 years agoFix warnings
Clément Foucault [Fri, 3 Feb 2017 13:52:33 +0000 (14:52 +0100)]
Fix warnings

2 years agoNew CMake flag for Clay Engine
Clément Foucault [Fri, 3 Feb 2017 13:38:11 +0000 (14:38 +0100)]
New CMake flag for Clay Engine

2 years agoFix hang infinite loop
Clément Foucault [Fri, 3 Feb 2017 13:37:50 +0000 (14:37 +0100)]
Fix hang infinite loop

2 years agoGet rid of runtime data struct.
Clément Foucault [Fri, 3 Feb 2017 12:00:15 +0000 (13:00 +0100)]
Get rid of runtime data struct.

2 years agoAdded collection settings getter/setter
Clément Foucault [Fri, 3 Feb 2017 11:51:22 +0000 (12:51 +0100)]
Added collection settings getter/setter

2 years agoChange settings order
Clément Foucault [Fri, 3 Feb 2017 11:47:45 +0000 (12:47 +0100)]
Change settings order

2 years agoFix new objects are invisible
Dalai Felinto [Fri, 3 Feb 2017 11:46:47 +0000 (12:46 +0100)]
Fix new objects are invisible

2 years agoSet COLLECTION_PROP_USE when setting a layer_engine_settings property
Dalai Felinto [Fri, 3 Feb 2017 11:07:55 +0000 (12:07 +0100)]
Set COLLECTION_PROP_USE when setting a layer_engine_settings property

We still need depsgraph to evaluate those changes

2 years agoUtil function to create CollectionEngineSettings
Dalai Felinto [Fri, 3 Feb 2017 11:06:46 +0000 (12:06 +0100)]
Util function to create CollectionEngineSettings

This may be run by Depsgraph, as well as internal layercollection create routines

2 years agoUtil function to free CollectionEngineSettings
Dalai Felinto [Fri, 3 Feb 2017 10:56:59 +0000 (11:56 +0100)]
Util function to free CollectionEngineSettings

This may be run by Depsgraph, as well as internal layercollection free routines

2 years agoFix storage of CollectionSettings in DNA_object_types.h
Dalai Felinto [Fri, 3 Feb 2017 10:49:18 +0000 (11:49 +0100)]
Fix storage of CollectionSettings in DNA_object_types.h

2 years agoRemove unused enum values (COLLECTION_PROP_TYPE_POINTER/BOOL)
Dalai Felinto [Thu, 2 Feb 2017 16:42:32 +0000 (17:42 +0100)]
Remove unused enum values (COLLECTION_PROP_TYPE_POINTER/BOOL)

2 years agoFix return in BKE_scene_layer_find_from_collection
Dalai Felinto [Fri, 3 Feb 2017 09:51:13 +0000 (10:51 +0100)]
Fix return in BKE_scene_layer_find_from_collection

2 years agoFix shaders in some immBindBuiltinProgram calls
Luca Rood [Fri, 3 Feb 2017 01:17:22 +0000 (23:17 -0200)]
Fix shaders in some immBindBuiltinProgram calls

Had mistakenly used 3D shaders for some 2D drawings...
Replaced those now.

Part of T49043

2 years agoMore lamp work
Clément Foucault [Thu, 2 Feb 2017 21:19:23 +0000 (22:19 +0100)]
More lamp work

2 years agoMerge branch 'master' into blender2.8
Bastien Montagne [Thu, 2 Feb 2017 20:50:12 +0000 (21:50 +0100)]
Merge branch 'master' into blender2.8

2 years agoUse vec2 for screen space stuff
Clément Foucault [Thu, 2 Feb 2017 20:44:14 +0000 (21:44 +0100)]
Use vec2 for screen space stuff

2 years agoFix T50084: Adding torus re-orders UV layers.
Bastien Montagne [Thu, 2 Feb 2017 20:37:53 +0000 (21:37 +0100)]
Fix T50084: Adding torus re-orders UV layers.

Issue was indeed in join operation, mesh in which we join all others
could be re-added to final data after others, leading to undesired
re-ordering of CD layers, and existing vertices etc. being shifted away
from their original indices, etc.

All kind of more or less bad and undesired changes, fixed by always
re-inserting destination mesh first.

Also cleaned up a bit that code, it was doing some rather
non-recommanded things (like allocating zero-sized mem, doing own
coocking to remove a data-block from main, etc.).

2 years agoLamp sunrays and shadow circles
Clément Foucault [Thu, 2 Feb 2017 20:39:58 +0000 (21:39 +0100)]
Lamp sunrays and shadow circles

2 years agoBring back the select button for the UI
Dalai Felinto [Thu, 2 Feb 2017 17:06:24 +0000 (18:06 +0100)]
Bring back the select button for the UI

2 years agoinstall_deps.sh: don't use backticks
Sybren A. Stüvel [Thu, 2 Feb 2017 15:04:49 +0000 (16:04 +0100)]
install_deps.sh: don't use backticks

The script complained that it could not find the executable "--build-all".

2 years agoOpenGL immediate mode: transform_snap.c and part of drawnode.c
Luca Rood [Thu, 2 Feb 2017 05:14:52 +0000 (03:14 -0200)]
OpenGL immediate mode: transform_snap.c and part of drawnode.c

Also converted ED_node_draw_snap from drawnode.c
Committing these together, as they are inter-dependent.

Part of T49043

2 years agoMake imm_drawcircball public
Luca Rood [Thu, 2 Feb 2017 05:13:41 +0000 (03:13 -0200)]
Make imm_drawcircball public

(Approved by merwin in IRC)

Required by part of T49043

2 years agoOpenGL immediate mode: space_graph.c
Luca Rood [Thu, 2 Feb 2017 01:00:39 +0000 (23:00 -0200)]
OpenGL immediate mode: space_graph.c

Part of T49043

2 years agoFix unfreed memory
Clément Foucault [Thu, 2 Feb 2017 16:15:26 +0000 (17:15 +0100)]
Fix unfreed memory

2 years agoFix T50524: Basis shapekey editing while rendering bug.
Bastien Montagne [Thu, 2 Feb 2017 16:00:52 +0000 (17:00 +0100)]
Fix T50524: Basis shapekey editing while rendering bug.

Root of the issue was BM_mesh_bm_to_me() breaking application of basis
offset to 'child' shapekeys, when called more than once from same BMesh.

2 years agoFix warnings
Clément Foucault [Thu, 2 Feb 2017 16:03:21 +0000 (17:03 +0100)]
Fix warnings

2 years agoFix depth not cleared
Clément Foucault [Thu, 2 Feb 2017 15:54:34 +0000 (16:54 +0100)]
Fix depth not cleared

2 years agoBypass wires.
Clément Foucault [Thu, 2 Feb 2017 15:54:15 +0000 (16:54 +0100)]
Bypass wires.

2 years agoFix ogl warnings.
Clément Foucault [Thu, 2 Feb 2017 15:28:16 +0000 (16:28 +0100)]
Fix ogl warnings.

2 years agoFix assert
Clément Foucault [Thu, 2 Feb 2017 15:23:21 +0000 (16:23 +0100)]
Fix assert

2 years agoinstall_deps.sh: don't use backticks
Sybren A. Stüvel [Thu, 2 Feb 2017 15:04:49 +0000 (16:04 +0100)]
install_deps.sh: don't use backticks

The script complained that it could not find the executable "--build-all".

2 years agoFix T50497: prop_search not correctly drew in UI (D2473)
raa [Thu, 2 Feb 2017 14:30:50 +0000 (17:30 +0300)]
Fix T50497: prop_search not correctly drew in UI (D2473)

2 years agoFix T50535: Cycles render segfault when Explode modifier before hair particle modifie...
Sergey Sharybin [Thu, 2 Feb 2017 13:32:05 +0000 (14:32 +0100)]
Fix T50535: Cycles render segfault when Explode modifier before hair particle modifier + UV material

Tricky issue caused by CDDM_copy() coying MFACE array but not MTFACE which
confused logic later on.

Now we don't copy ANY tessellation unless it is requested to.

Thanks Bastien for help and review!

2 years agoAdded Lamp screen space visual
Clément Foucault [Thu, 2 Feb 2017 13:17:29 +0000 (14:17 +0100)]
Added Lamp screen space visual

2 years agoStart of Lamp drawing
Clément Foucault [Wed, 1 Feb 2017 23:41:54 +0000 (00:41 +0100)]
Start of Lamp drawing

2 years agoGroundline/GroundPoint shader for lights
Clément Foucault [Wed, 1 Feb 2017 23:41:14 +0000 (00:41 +0100)]
Groundline/GroundPoint shader for lights

2 years agoClay Engine per-collection settings
Dalai Felinto [Thu, 2 Feb 2017 10:08:21 +0000 (11:08 +0100)]
Clay Engine per-collection settings

Note: this is still not used by rendering

2 years agoIntroduce Per-Collection Render settings
Dalai Felinto [Thu, 2 Feb 2017 10:04:01 +0000 (11:04 +0100)]
Introduce Per-Collection Render settings

Pending:

* UI template for those settings (showing USE)
* Depsgraph evaluation of them (to flush into objects)
* RNA to see if a settings is being used

2 years agoRevert the change of a default in a recent commit
Aaron Carlisle [Thu, 2 Feb 2017 04:46:53 +0000 (23:46 -0500)]
Revert the change of a default in a recent commit

This was my own mistake

2 years agoFix incorrect spot lamp blend in python GPU uniform export.
Michael Stahre [Thu, 2 Feb 2017 02:59:11 +0000 (03:59 +0100)]
Fix incorrect spot lamp blend in python GPU uniform export.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2378

2 years agoFix missing uniform type for python GPU uniform export.
Michael Stahre [Thu, 2 Feb 2017 02:59:21 +0000 (03:59 +0100)]
Fix missing uniform type for python GPU uniform export.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D2379

2 years agoOpenGL immediate mode: view3d_ruler.c
Luca Rood [Fri, 27 Jan 2017 04:36:29 +0000 (02:36 -0200)]
OpenGL immediate mode: view3d_ruler.c

Differential Revision: https://developer.blender.org/D2485

Part of T49043

2 years agofix build: BLF Theme color
Mike Erwin [Thu, 2 Feb 2017 00:00:30 +0000 (19:00 -0500)]
fix build: BLF Theme color

blenderplayer uses BLF but not Editor UI, so we got a link error for the missing UI_GetThemeColor function.

Moved the new function from BLF to UI.

@Blendify reported problem in IRC

2 years agoOpenGL immediate mode: drawanimviz.c
Luca Rood [Wed, 1 Feb 2017 22:46:33 +0000 (20:46 -0200)]
OpenGL immediate mode: drawanimviz.c

Differential Revision: https://developer.blender.org/D2484

Part of T49043

2 years agoAdd GetThemeColorBlendShade3ubv function
Luca Rood [Wed, 1 Feb 2017 22:40:49 +0000 (20:40 -0200)]
Add GetThemeColorBlendShade3ubv function

Differential Revision: https://developer.blender.org/D2484

Used by part of T49043

2 years agoBLF can use Theme colors
Mike Erwin [Wed, 1 Feb 2017 21:44:00 +0000 (16:44 -0500)]
BLF can use Theme colors

For anything fancier than regular Theme colors (shading, alpha, etc.) do this:

unsigned char color[4]
UI_GetThemeColor[Fancy]4ubv(... color)
BLF_color4ubv(fontid, color)

That way the BLF color API stays simple.

2 years agoset default color for BLF fonts
Mike Erwin [Wed, 1 Feb 2017 21:20:40 +0000 (16:20 -0500)]
set default color for BLF fonts

Set to an annoying bright color so we can see where to add BLF_color calls.

2 years agoadd BLF_color functions
Mike Erwin [Wed, 1 Feb 2017 21:01:25 +0000 (16:01 -0500)]
add BLF_color functions

Needed a way to pass main font color to BLF without using obsolete glColor. Could not use immUniform since BLF binds its shader internally.

2 years agoOpenGL immediate mode: editmesh_knife.c
Luca Rood [Thu, 26 Jan 2017 00:14:13 +0000 (22:14 -0200)]
OpenGL immediate mode: editmesh_knife.c

Differential Revision: https://developer.blender.org/D2481

Part of T49043

2 years agoUI: Add missing colon
Aaron [Wed, 1 Feb 2017 19:56:11 +0000 (14:56 -0500)]
UI: Add missing colon

2 years agoOpenGL immediate mode: transform_constraints.c
Luca Rood [Thu, 26 Jan 2017 14:39:36 +0000 (12:39 -0200)]
OpenGL immediate mode: transform_constraints.c

Differential Revision: https://developer.blender.org/D2483

Part of T49043

2 years agoOpenGL immediate mode: transform_generics.c
Luca Rood [Thu, 26 Jan 2017 14:13:50 +0000 (12:13 -0200)]
OpenGL immediate mode: transform_generics.c

Differential Revision: https://developer.blender.org/D2482

Part of T49043

2 years agoFixing Memory Leak
Clément Foucault [Wed, 1 Feb 2017 13:32:48 +0000 (14:32 +0100)]
Fixing Memory Leak

2 years agoImplemented All Empties type drawing
Clément Foucault [Wed, 1 Feb 2017 12:58:10 +0000 (13:58 +0100)]
Implemented All Empties type drawing

2 years agoFix T50570: pressing pgup or pgdn in any scrollable area irreversably alters scrollin...
Bastien Montagne [Wed, 1 Feb 2017 11:52:26 +0000 (12:52 +0100)]
Fix T50570: pressing pgup or pgdn in any scrollable area irreversably alters scrolling speed.

'page' prop of scroll up/down operators would get stuck once set once by
pageup/down keys... Now only take this prop into account if explicitely
set, not when its value is inherited from previous run.

2 years agoSilence more warnings
Dalai Felinto [Wed, 1 Feb 2017 10:59:54 +0000 (11:59 +0100)]
Silence more warnings

This should silence the current warnings, and gives us real warnings if
the bContext data is tampered with.

2 years agoSilence warning
Dalai Felinto [Wed, 1 Feb 2017 10:46:55 +0000 (11:46 +0100)]
Silence warning

There is still a warning because of `DST.context = C;` which discards
'const' qualifier. I find this a legit problem, I suspect we are not
suppose to store bContext at all.

2 years agoCycles tests: Allow python auto-exec
Sergey Sharybin [Wed, 1 Feb 2017 09:13:40 +0000 (10:13 +0100)]
Cycles tests: Allow python auto-exec

2 years agoCycles: Fix rng_state initialization when using resumable rendering
Lukas Stockner [Wed, 1 Feb 2017 04:43:17 +0000 (05:43 +0100)]
Cycles: Fix rng_state initialization when using resumable rendering

2 years agoSnap System: BVH: Ignore calculations, in parent nodes, used only in perspective...
Germano Cavalcante [Wed, 1 Feb 2017 00:43:44 +0000 (21:43 -0300)]
Snap System: BVH: Ignore calculations, in parent nodes, used only in perspective view

Strangely this change does not affect the performance very much.
Suzanne subdividide 6x (ortho view):
Before:0.00013983
After :0.00013920

But it makes it easier to read the code

2 years agoGiving Overlay Edges a try
Clément Foucault [Tue, 31 Jan 2017 23:28:16 +0000 (00:28 +0100)]
Giving Overlay Edges a try

2 years agoOpenGL: use new matrix API for Loop Cut
Mike Erwin [Tue, 31 Jan 2017 22:06:36 +0000 (17:06 -0500)]
OpenGL: use new matrix API for Loop Cut

Follow-up to rB85174329d9f5
Part of T49450

2 years agoOpenGL: fix MultMatrix order
Mike Erwin [Tue, 31 Jan 2017 22:03:07 +0000 (17:03 -0500)]
OpenGL: fix MultMatrix order

Partial revert of rB06d4aca87956

Problem found while converting old GL matrix calls to new API (T49450)

2 years agoSnap System: Invert the test order of the elements to snap (useful for ruler)
Germano Cavalcante [Tue, 31 Jan 2017 20:10:34 +0000 (17:10 -0300)]
Snap System: Invert the test order of the elements to snap (useful for ruler)

When the function that tests snap on multiple elements starts from the face and ends at the vertex, the transition between elements becomes much smoother.

2 years agoCode cleanup
Clément Foucault [Tue, 31 Jan 2017 16:27:19 +0000 (17:27 +0100)]
Code cleanup

2 years agoAdded wire outlines
Clément Foucault [Tue, 31 Jan 2017 16:27:05 +0000 (17:27 +0100)]
Added wire outlines

2 years agoCode Cleanup
Clément Foucault [Tue, 31 Jan 2017 15:15:06 +0000 (16:15 +0100)]
Code Cleanup

2 years agoUse new temporary depsgraph
Dalai Felinto [Tue, 31 Jan 2017 14:21:40 +0000 (15:21 +0100)]
Use new temporary depsgraph

The idea is to use only Object, never Base

2 years agoRemove unused function (silence warning)
Dalai Felinto [Tue, 31 Jan 2017 14:20:40 +0000 (15:20 +0100)]
Remove unused function (silence warning)

2 years agoMerge branch 'render-layers' into clay-engine
Dalai Felinto [Tue, 31 Jan 2017 14:06:51 +0000 (15:06 +0100)]
Merge branch 'render-layers' into clay-engine

2 years agoDepsgraph hack: DEG_OBJECT_ITER and base_flag
Dalai Felinto [Tue, 31 Jan 2017 13:52:46 +0000 (14:52 +0100)]
Depsgraph hack: DEG_OBJECT_ITER and base_flag

This is a temporary iterator that flushes the base flag to the object