Commit Graph

881 Commits

Author SHA1 Message Date
Brecht Van Lommel e1dff01e29 Depsgraph: add some missing depsgraph tags when relations change. 2018-06-20 18:12:48 +02:00
Campbell Barton 56173e512c Merge branch 'master' into blender2.8 2018-06-17 16:18:15 +02:00
Campbell Barton a0a1fc8938 Cleanup: BLI path extension API
Use BLI_path_extension_* prefix.
2018-06-17 16:13:24 +02:00
Bastien Montagne 59bb5d3a89 Cleanup: some remaining G.main's in COllada in 2.8... 2018-06-14 16:43:11 +02:00
Bastien Montagne 87b2444270 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/collada/AnimationExporter.cpp
	source/blender/collada/AnimationExporter.h
	source/blender/collada/ArmatureImporter.cpp
	source/blender/collada/ArmatureImporter.h
	source/blender/collada/ControllerExporter.cpp
	source/blender/collada/ControllerExporter.h
	source/blender/collada/DocumentExporter.cpp
	source/blender/collada/DocumentImporter.cpp
	source/blender/collada/GeometryExporter.cpp
	source/blender/collada/GeometryExporter.h
	source/blender/collada/MeshImporter.cpp
	source/blender/collada/MeshImporter.h
	source/blender/collada/SkinInfo.cpp
	source/blender/collada/SkinInfo.h
	source/blender/collada/collada_utils.cpp
	source/blender/collada/collada_utils.h
2018-06-14 15:55:51 +02:00
Bastien Montagne fd19069999 Cleanup: remove last G.main's from Collada code. 2018-06-14 15:15:51 +02:00
Bastien Montagne 4943739b89 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenloader/intern/readfile.c
	source/blender/editors/mesh/editmesh_utils.c
	source/blenderplayer/bad_level_call_stubs/stubs.c
2018-06-13 16:42:56 +02:00
Bastien Montagne f61c30f804 Cleanup: get rid of last G.main in BMesh code. 2018-06-13 16:29:12 +02:00
Bastien Montagne 43eebdfebd Merge branch 'master' into blender2.8
Conflicts:
	source/blender/collada/DocumentImporter.cpp
	source/blender/editors/include/ED_object.h
	source/blender/editors/object/object_modifier.c
2018-06-12 12:58:31 +02:00
Bastien Montagne be57cf9b2a Cleanup: remove moar G.main from BKE area. 2018-06-12 12:53:27 +02:00
Bastien Montagne 204c167c72 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/BKE_mesh.h
	source/blender/blenkernel/intern/mesh_convert.c
	source/blender/editors/interface/interface_eyedropper_color.c
	source/blender/editors/object/object_add.c
	source/blender/editors/space_image/image_ops.c
	source/blender/makesrna/intern/rna_image.c
	source/blender/windowmanager/intern/wm_draw.c
2018-06-11 16:02:46 +02:00
Bastien Montagne 78a8d3685b Cleanup: remove moar ugly G.main usages...
BKE_image was an ugly nest, could fix all but the ones from compositor,
so moved ugly G.main there, at least we know where the Evil is that way ;)
2018-06-11 15:40:37 +02:00
Campbell Barton 908b6960c0 Merge branch 'master' into blender2.8 2018-06-08 08:10:35 +02:00
Campbell Barton a25c11fd8d Cleanup: trailing space
Remove from blender/nodes, collada, blenfont & render.
2018-06-08 08:07:48 +02:00
Bastien Montagne 508e34d0bf Merge branch 'master' into blender2.8
Conflicts:
	source/blender/editors/animation/anim_deps.c
	source/blender/editors/animation/keyframing.c
	source/blender/editors/animation/keyingsets.c
	source/blender/editors/armature/pose_edit.c
	source/blender/editors/armature/pose_transform.c
	source/blender/editors/gpencil/gpencil_convert.c
	source/blender/editors/include/ED_anim_api.h
	source/blender/editors/include/ED_keyframing.h
	source/blender/editors/interface/interface_anim.c
	source/blender/editors/space_action/action_edit.c
	source/blender/editors/space_graph/graph_edit.c
	source/blender/editors/space_outliner/outliner_draw.c
	source/blender/editors/transform/transform_conversions.c
	source/blender/makesrna/intern/rna_armature.c
	source/blender/makesrna/intern/rna_pose.c
	source/blender/python/intern/bpy_rna_anim.c
	source/blenderplayer/bad_level_call_stubs/stubs.c
	source/gameengine/Converter/KX_BlenderSceneConverter.cpp
2018-06-07 13:04:16 +02:00
Bastien Montagne b3a7a75a26 Cleanup: remove moar G.main usages.
Notes:
* Really need to address RNA setters case, end up adding way too much
G.main here these days... :/
* Added Main pointer into bAnimContext, helps a lot in anim code ;)
2018-06-07 12:48:29 +02:00
Bastien Montagne df0253be33 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/collada/ArmatureExporter.cpp
	source/blender/collada/ArmatureExporter.h
	source/blender/collada/DocumentExporter.cpp
	source/blender/collada/DocumentExporter.h
	source/blender/collada/SceneExporter.cpp
	source/blender/collada/SceneExporter.h
	source/blender/collada/collada.cpp
	source/blender/collada/collada.h
	source/blender/editors/armature/armature_edit.c
	source/blender/editors/armature/pose_transform.c
	source/blender/editors/include/ED_armature.h
	source/blender/editors/include/ED_object.h
	source/blender/editors/include/ED_screen.h
	source/blender/editors/io/io_collada.c
	source/blender/editors/object/object_transform.c
	source/blender/editors/screen/screen_edit.c
	source/blender/editors/screen/screen_ops.c
	source/blender/windowmanager/intern/wm.c
	source/blender/windowmanager/intern/wm_files.c
	source/blender/windowmanager/intern/wm_window.c
	source/blenderplayer/bad_level_call_stubs/stubs.c
2018-06-07 11:23:26 +02:00
Bastien Montagne 54f9cd5283 Cleanup: Nuke moar G.main usages... 2018-06-07 11:11:46 +02:00
Bastien Montagne bb7202495a Merge branch 'master' into blender2.8
Conflicts:
	source/blender/collada/ArmatureExporter.cpp
	source/blender/collada/ArmatureExporter.h
	source/blender/collada/DocumentExporter.cpp
	source/blender/collada/DocumentExporter.h
	source/blender/collada/SceneExporter.cpp
	source/blender/collada/SceneExporter.h
	source/blender/collada/collada.cpp
	source/blender/collada/collada.h
	source/blender/editors/armature/armature_edit.c
	source/blender/editors/armature/editarmature_retarget.c
	source/blender/editors/armature/pose_transform.c
	source/blender/editors/include/ED_armature.h
	source/blender/editors/include/ED_object.h
	source/blender/editors/include/ED_screen.h
	source/blender/editors/io/io_collada.c
	source/blender/editors/object/object_transform.c
	source/blender/editors/screen/screen_edit.c
	source/blender/editors/screen/screen_ops.c
	source/blender/windowmanager/intern/wm.c
	source/blender/windowmanager/intern/wm_files.c
	source/blender/windowmanager/intern/wm_window.c
	source/blenderplayer/bad_level_call_stubs/stubs.c
2018-06-06 16:25:28 +02:00
Bastien Montagne 48e871ab1d Cleanup: Nuke moar G.main usages... 2018-06-06 15:50:24 +02:00
Bastien Montagne f0d9dbae0d Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/intern/blendfile.c
	source/blender/blenloader/intern/readfile.h
	source/blender/blenloader/intern/versioning_250.c
	source/blender/blenloader/intern/versioning_260.c
	source/blender/blenloader/intern/versioning_270.c
	source/blender/blenloader/intern/versioning_legacy.c
	source/blender/editors/render/render_shading.c
	source/blender/makesrna/intern/rna_movieclip.c
	source/blender/render/intern/source/pipeline.c
	source/blender/render/intern/source/voxeldata.c
2018-06-05 17:02:50 +02:00
Bastien Montagne 481cdb08ed Cleanup: use new accessors to blendfile path (Main.name). 2018-06-05 16:33:46 +02:00
Campbell Barton bfe1d0e0dc Merge branch 'master' into blender2.8 2018-06-01 18:26:42 +02:00
Campbell Barton 75fc1c3507 Cleanup: trailing whitespace (comment blocks)
Strip unindented comment blocks - mainly headers to avoid conflicts.
2018-06-01 18:19:39 +02:00
Jeroen Bakker c450966e95 Workbench: Material specific settings for the specular
- Uses the roughness setting of the basic eevee material
- renamed gloss_mir to roughness
- set default of roughness to 0.25
- renamed ray_mirror to metallic
- cleaned up material rna (BI mirror struct)
- use BLINN phong model
- normalize incoming/outgoing specular light
- when using camera oriented studiolight, the SolidLight will be used
for specular highlights
- EXPERIMENT: when in world oriented studiolight only the shadow direction will be used.
- change the settings of the internal light to make scenes more
readable
2018-06-01 11:01:55 +02:00
Bastien Montagne 2feed9bdef Fix Collada building... 2018-05-31 18:37:33 +02:00
Bastien Montagne 8f670dd855 Merge branch 'master' into blender2.8
Conflicts:
	source/blender/blenkernel/BKE_material.h
	source/blender/blenkernel/BKE_mesh.h
	source/blender/blenkernel/intern/library_remap.c
	source/blender/blenkernel/intern/material.c
	source/blender/editors/object/object_relations.c
	source/blender/editors/render/render_preview.c
	source/blender/makesrna/intern/rna_object.c
2018-05-29 16:02:53 +02:00
Bastien Montagne f7af08b5fe Cleanup: Get rid of G.main in BKE_material.
Note that in some cases, this only moves the G.main case to somne other
places - in particular, RNA getters/setters are becoming annoying here...
2018-05-29 15:49:21 +02:00
Brecht Van Lommel 17bd5c9d4b Collections and groups unification
OVERVIEW

* In 2.7 terminology, all layers and groups are now collection datablocks.
* These collections are nestable, linkable, instanceable, overrideable, ..
  which opens up new ways to set up scenes and link + override data.
* Viewport/render visibility and selectability are now a part of the collection
  and shared across all view layers and linkable.
* View layers define which subset of the scene collection hierarchy is excluded
  for each. For many workflows one view layer can be used, these are more of an
  advanced feature now.

OUTLINER

* The outliner now has a "View Layer" display mode instead of "Collections",
  which can display the collections and/or objects in the view layer.
* In this display mode, collections can be excluded with the right click menu.
  These will then be greyed out and their objects will be excluded.
* To view collections not linked to any scene, the "Blender File" display mode
  can be used, with the new filtering option to just see Colleciton datablocks.
* The outliner right click menus for collections and objects were reorganized.
* Drag and drop still needs to be improved. Like before, dragging the icon or
  text gives different results, we'll unify this later.

LINKING AND OVERRIDES

* Collections can now be linked into the scene without creating an instance,
  with the link/append operator or from the collections view in the outliner.
* Collections can get static overrides with the right click menu in the outliner,
  but this is rather unreliable and not clearly communicated at the moment.
* We still need to improve the make override operator to turn collection instances
  into collections with overrides directly in the scene.

PERFORMANCE

* We tried to make performance not worse than before and improve it in some
  cases. The main thing that's still a bit slower is multiple scenes, we have to
  change the layer syncing to only updated affected scenes.
* Collections keep a list of their parent collections for faster incremental
  updates in syncing and caching.
* View layer bases are now in a object -> base hash to avoid quadratic time
  lookups internally and in API functions like visible_get().

VERSIONING

* Compatibility with 2.7 files should be improved due to the new visibility
  controls. Of course users may not want to set up their scenes differently
  now to avoid having separate layers and groups.
* Compatibility with 2.8 is mostly there, and was tested on Eevee demo and Hero
  files. There's a few things which are know to be not quite compatible, like
  nested layer collections inside groups.
* The versioning code for 2.8 files is quite complicated, and isolated behind
  #ifdef so it can be removed at the end of the release cycle.

KNOWN ISSUES

* The G-key group operators in the 3D viewport were left mostly as is, they
  need to be modified still to fit better.
* Same for the groups panel in the object properties. This needs to be updated
  still, or perhaps replaced by something better.
* Collections must all have a unique name. Less restrictive namespacing is to
  be done later, we'll have to see how important this is as all objects within
  the collections must also have a unique name anyway.
* Full scene copy and delete scene are exactly doing the right thing yet.

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

https://code.blender.org/2018/05/collections-and-groups/
2018-05-18 13:34:24 +02:00
Campbell Barton b49184b608 Merge branch 'master' into blender2.8 2018-05-07 18:02:48 +02:00
Campbell Barton f74d85ffc8 Cleanup: rename char/float conversion functions
- FTOCHAR       -> unit_float_to_uchar_clamp
- F3TOCHAR3     -> unit_float_to_uchar_clamp_v3 (swap args)
- F4TOCHAR4     -> unit_float_to_uchar_clamp_v4 (swap args)
- FTOUSHORT     -> unit_float_to_ushort_clamp
- USHORTTOUCHAR -> unit_ushort_to_uchar
2018-05-07 17:51:40 +02:00
Brecht Van Lommel 54aa834b7d Cleanup: fix compiler warnings on macOS / clang. 2018-04-28 16:28:19 +02:00
Gaia Clary 792eab8190 Merge remote-tracking branch 'origin/master' into blender2.8 2018-04-20 15:05:22 +02:00
Gaia Clary ff839fb6c1 Fix: D3160 Propose to use proper typedefs to avoid confusion
Differential Revision: https://developer.blender.org/D3160
2018-04-20 15:02:11 +02:00
Ton Roosendaal 51b796ff15 Remove Blender Internal and legacy viewport from Blender 2.8.
Brecht authored this commit, but he gave me the honours to actually
do it. Here it goes; Blender Internal. Bye bye, you did great!

* Point density, voxel data, ocean, environment map textures were removed,
  as these only worked within BI rendering. Note that the ocean modifier
  and the Cycles point density shader node continue to work.
* Dynamic paint using material shading was removed, as this only worked
  with BI. If we ever wanted to support this again probably it should go
  through the baking API.
* GPU shader export through the Python API was removed. This only worked
  for the old BI GLSL shaders, which no longer exists. Doing something
  similar for Eevee would be significantly more complicated because it
  uses a lot of multiplass rendering and logic outside the shader, it's
  probably impractical.
* Collada material import / export code is mostly gone, as it only worked
  for BI materials. We need to add Cycles / Eevee material support at some
  point.
* The mesh noise operator was removed since it only worked with BI
  material texture slots. A displacement modifier can be used instead.
* The delete texture paint slot operator was removed since it only worked
  for BI material texture slots. Could be added back with node support.

* Not all legacy viewport features are supported in the new viewport, but
  their code was removed. If we need to bring anything back we can look at
  older git revisions.
* There is some legacy viewport code that I could not remove yet, and some
  that I probably missed.
* Shader node execution code was left mostly intact, even though it is not
  used anywhere now. We may eventually use this to replace the texture
  nodes with Cycles / Eevee shader nodes.

* The Cycles Bake panel now includes settings for baking multires normal
  and displacement maps. The underlying code needs to be merged properly,
  and we plan to add back support for multires AO baking and add support
  to Cycles baking for features like vertex color, displacement, and other
  missing baking features.

* This commit removes DNA and the Python API for BI material, lamp, world
  and scene settings. This breaks a lot of addons.
* There is more DNA that can be removed or renamed, where Cycles or Eevee
  are reusing some old BI properties but the names are not really correct
  anymore.
* Texture slots for materials, lamps and world were removed. They remain
  for brushes, particles and freestyle linestyles.
* 'BLENDER_RENDER' remains in the COMPAT_ENGINES of UI panels. Cycles and
  other renderers use this to find all panels to show, minus a few panels
  that they have their own replacement for.
2018-04-19 17:35:25 +02:00
Brecht Van Lommel ad797ed39a Fix blenderplayer and collada build. 2018-04-17 11:01:52 +02:00
Brecht Van Lommel 34ab90f546 Depsgraph: remove EvaluationContext, pass Depsgraph instead.
The depsgraph was always created within a fixed evaluation context. Passing
both risks the depsgraph and evaluation context not matching, and it
complicates the Python API where we'd have to expose both which is not so
easy to understand.

This also removes the global evaluation context in main, which assumed there
to be a single active scene and view layer.

Differential Revision: https://developer.blender.org/D3152
2018-04-16 19:55:33 +02:00
Campbell Barton 49ee1a97d2 Merge branch 'master' into blender2.8 2018-04-16 18:22:43 +02:00
Campbell Barton eb6fe5fa94 Cleanup: indentation 2018-04-16 18:13:48 +02:00
Campbell Barton 9a11aeb300 Merge branch 'master' into blender2.8 2018-04-16 17:24:20 +02:00
Campbell Barton 85de548e03 Cleanup: indentation 2018-04-16 17:08:27 +02:00
Campbell Barton a3c80615d5 Fix stubs 2018-04-16 14:57:23 +02:00
Campbell Barton 9e2ea6c500 Merge branch 'master' into blender2.8 2018-04-15 12:03:09 +02:00
Campbell Barton 0f2efce6c5 Cleanup: remove bad casts 2018-04-15 11:57:49 +02:00
Campbell Barton c12d976020 Cleanup: ED_armature naming
- Wasn't clear which functions handle edit-bones.
- Mixed both ebone and edit_bone in names.
- Didn't use ED_armature_* prefix for public API.

See P655 to apply to branches.
2018-04-15 11:50:53 +02:00
Sybren A. Stüvel a981206fd1 Merge branch 'master' into blender2.8 2018-04-08 14:07:34 +02:00
Gaia Clary d2e1a14a57 Fix Collada: nullptr is a c++11 keyword. Changed to NULL 2018-04-06 13:06:46 +02:00
Gaia Clary fe73c12990 Fix Collada: Import of animations for objects with multiple materials
When importing multiple materials for one object,
the imported material animation curves have all been
assigned to the first material in the object.

This fix also improves the console logging whenever the importer
finds a consistency problem with the imported animation data.
2018-04-06 12:42:38 +02:00
Campbell Barton 1c24c04e60 Remove workspace object mode, reverts changes w/ 2.8
This caused too many problems syncing object modes
with multiple objects/windows/workspaces, see: D3130 for details.
2018-04-05 18:21:14 +02:00
Dalai Felinto 11130970c6 Merge commit 'origin/master^' into blender2.8 2018-03-29 10:36:01 -03:00