Commit Graph

405 Commits

Author SHA1 Message Date
Campbell Barton b02696f855 CMake: add missing files 2018-11-29 09:01:03 +11:00
Sergey Sharybin 9abcf56fa8 Enable OpenSubdiv modifier by default
This commit makes it so that subsurf/multires modifiers will respect
the WITH_OPENSUBDIV option. The WITH_OPENSUBDIV_MODIFIER option is
now gone.

For artists it mean that subsurf modifier will behave same as it is
planned for 2.80. Multires will now support sculpting, but it has some
known limitations. Those will be worked on before the final release.

If OpenSubdiv is disabled, no subsurf/multires functionality will
present.

For the details see:

  https://wiki.blender.org/wiki/Reference/Release_Notes/2.80/Modeling#Subsurf.2FMultires
2018-11-26 15:41:37 +01:00
Campbell Barton f54b239269 Keymap: add support for key-config preferences
This is needed for keymaps to define their own options,
which can include left/right mouse select.

This can also help to us to provide popular keymap tweaks as options,
so users can easily fit blender to their workflow with well supported
adjustments which don't give the overhead of having to maintain
your own keymap, which become out-dated when operators change.
2018-11-16 14:54:41 +11:00
Bastien Montagne 1ff8be24ef Cleanup/Refactor: move Main stuff into BKE's new main.c file (and header).
We already had a BKE_main.h header, no reason not to put there
Main-specific functions, BKE_library has already more than enough to
handle with IDs and library management!
2018-11-07 20:58:53 +01:00
Sergey Sharybin f2873b3ce5 Multires: Prevent crash when joining two multires objects
This only works thing around, just so we can unlock production here.
Joining objects of a different scale will not yet work correctly.

Proper fix is coming later (the code needs to be ported to new
Subdiv API).
2018-11-02 11:00:51 +01:00
Campbell Barton ac8d787327 Tool System: brushes are now categorized by tool
The toolbar now shows brush types, the brush selector now
only shows brushes matching the current tool type.

Details:

- Add's Paint.tool_slots (used by the toolbar).
- Removed custom grease pencil brush tool code.
- Bumped subversion.

See T57526 for details.
2018-11-02 19:40:39 +11:00
Campbell Barton 0f147bf6d6 Remove image based bitmap font support
Was used in the game engine and is no longer used.
2018-10-11 09:27:29 +11:00
Campbell Barton df82d35ceb Cleanup: extract cache calculation from derived-mesh 2018-10-08 12:04:23 +11:00
Sergey Sharybin b32832a7e8 Subdiv: CCG, initialize grid mask from paint mask 2018-09-21 15:31:43 +02:00
Campbell Barton 1450a37555 CMake: add missing headers 2018-09-06 21:23:25 +10:00
Sergey Sharybin 79e8805a9e Subdiv: Some ground work for CCG support
Nothing really interesting, just starting laying down API which
seems to be a decent substitute to CCGDM, without requiring too
much work be done in sculpting area.
2018-09-06 11:32:21 +02:00
Sergey Sharybin c9707a408f Subdiv: Move mesh creation functionality to own header 2018-09-04 15:34:52 +02:00
Sergey Sharybin 916edab639 Subdiv: Move evaluation functionality to own header 2018-09-04 15:34:52 +02:00
Sergey Sharybin f1508cc8d5 Subdiv: Move FOREACH functionality to own header 2018-09-04 15:34:52 +02:00
Sergey Sharybin 9e11b8e249 Multires: implement reshape operation
The one which is used by applying deformation modifiers on the multires.
2018-08-22 10:21:45 +02:00
Sergey Sharybin 6b6c27694e Subsurf: Implement foreach traversal for subdivsion topology
This makes it more generic process to perform actions which
depend on ptex face + (u, v) and on subdivided vertex index.

Currently it is still just a subdivision calculation process,
but same foreach callbacks can easily be used to propagate
displacement from known vertex locations back to displacement
grids.
2018-08-22 10:21:45 +02:00
Sergey Sharybin 913b8396d9 Multires: Initial groundwork to hook up displacement to new Subdiv object
Adds a displacement support for OpenSubdiov based subsurf object implemented
as a callback which gives vector displacement in object space. Currently is
implemented to calculate displacement based on myltires displacement grids,
but we can support things in the future if needed.

Submitting to review to see if there is something obviously wrong in the
direction (old multires code was sharing same displacement code to both
calculate final displaced mesh and reshape an existing one, which is rather
confusing and probably can be done more cleanly?).

Reviewers: brecht

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D3604
2018-08-15 15:40:08 +02:00
Sergey Sharybin f8a499b596 OpenSubdiv: Add stub implementation of C-API
C-API is way smaller than the rest of the code which uses it.
So better to conditionally compile stub implementation than
to keep adding ifdef everywhere.
2018-08-13 12:37:18 +02:00
Antonioya 66da2f537a New Grease Pencil object for 2D animation
This commit merge the full development done in greasepencil-object branch and include mainly the following features.

- New grease pencil object.
- New drawing engine.
- New grease pencil modes Draw/Sculpt/Edit and Weight Paint.
- New brushes for grease pencil.
- New modifiers for grease pencil.
- New shaders FX.
- New material system (replace old palettes and colors).
- Split of annotations (old grease pencil) and new grease pencil object.
- UI adapted to blender 2.8.

You can get more info here:

https://code.blender.org/2017/12/drawing-2d-animation-in-blender-2-8/
https://code.blender.org/2018/07/grease-pencil-status-update/

This is the result of nearly two years of development and I want thanks firstly the other members of the grease pencil team: Daniel M. Lara, Matias Mendiola and Joshua Leung for their support, ideas and to keep working in the project all the time, without them this project had been impossible.

Also, I want thanks other Blender developers for their help, advices and to be there always to help me, and specially to Clément Foucault, Dalai Felinto, Pablo Vázquez and Campbell Barton.
2018-07-31 10:50:43 +02:00
Sergey Sharybin 8a42b3909f Subsurf: Add basic statistics to help benchmarking 2018-07-20 09:28:02 +02:00
Sergey Sharybin 5fd677c83c Subsurf: Add subdivision code which uses new module
The code is ifdef-ed for now, since there is more work needed
to be done before we can officially switch to it.

Uses new subdiv module.
2018-07-18 15:42:49 +02:00
Sergey Sharybin b575c50753 CMake: Add missing header file to list of sources 2018-07-04 12:10:02 +02:00
Bastien Montagne 65128cde51 Cleanup: remove BKE's modifiers_bmesh.c, other DM removal/cleanup in BMesh code. 2018-06-27 10:59:52 +02:00
Campbell Barton a5b7f1ef53 UI: internal changes to user-menu storage
- Use per context menu lists to support menu editing.
- Support for different kinds of menu items since this may be needed
  in the future. Only use operator types for now.
2018-06-24 20:06:30 +02:00
Sergey Sharybin f4d6e66b25 Merge branch 'master' into blender2.8 2018-06-22 14:42:25 +02:00
Sergey Sharybin 6cd0484de8 CMake: Make language explicit for per-file strict flags removal 2018-06-22 14:40:00 +02:00
Sybren A. Stüvel 8b9712faeb Fix T55540 Add foreachMappedXXX equivalent API for evaluated meshes 2018-06-20 10:03:50 +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
Jeroen Bakker d3c4248946 Workbench: StudioLight HDRI's
The Studio lights are now loaded from disk. The location is
`datafiles/studiolights` they need to be JPG for now. JPG cannot store
HDRI color range but they are clamped inside the Workbench
engine for speed reason. I didn't select JP2K as it might not be
enabled.

Users can add upto 20 HDRI files. This limitation is inside the
RNA_space.c Currently the icons are calculated when you first open the
selection box for the HDRI's. We could add them to a background
rendering later.

I added 2 test files a sky texture rendered in Cycles and an HDRI from
cloud.blender.org.
2018-05-11 17:02:13 +02:00
Campbell Barton aab5ac25f2 Remove Frame Server
This feature is limited (only byte PPM output, no multi-view),
only works with specific configurations.

This also causes some maintenance overhead
when testing changes to the render pipeline.
2018-05-09 12:50:26 +02:00
Campbell Barton 6e88075618 Merge branch 'master' into blender2.8 2018-05-08 19:15:58 +02:00
Campbell Barton 0012082c10 Cleanup: move mesh conversion into own function 2018-05-08 17:54:25 +02:00
Sybren A. Stüvel abb58eec53 looptri + bvhtree support for Mesh 2018-05-08 11:36:48 +02:00
Campbell Barton 29aa531e51 Merge branch 'master' into blender2.8 2018-05-05 14:42:15 +02:00
Campbell Barton d3b3df0371 IDProp API: add native C repr function
Was using Python which wasn't very efficient (even for logging).
2018-05-05 14:41:25 +02:00
Sybren A. Stüvel 4211d02ab5 Modifiers: Mirror DerivedMesh → Mesh 2018-05-01 18:02:17 +02:00
Campbell Barton 25a529f440 UI: add own icon rasterizer
Use software drawing, cache to an image at the requested pixel size.
2018-04-21 21:10:09 +02:00
Campbell Barton 36773e35f6 Remove Armature Sketching & Retarget
While the feature is interesting, it's not much from what we can tell.

Retargeting is an important feature but needs
to fit in better with typical animation work-flows.

See: T52809
2018-04-20 10:34:48 +02:00
Campbell Barton ee11c85c06 CMake: make recent bad level include explicit
This isn't something we should do,
each instance should be noted and removed.
2018-04-18 08:21:24 +02:00
Dalai Felinto 159806140f Removing Blender Game Engine from Blender 2.8
Folders removed entirely:
* //extern/recastnavigation
* //intern/decklink
* //intern/moto
* //source/blender/editors/space_logic
* //source/blenderplayer
* //source/gameengine

This includes DNA data and any reference to the BGE code in Blender itself.
We are bumping the subversion.

Pending tasks:
* Tile/clamp code in image editor draw code.
* Viewport drawing code (so much of this will go away because of BI removal
  that we can wait until then to remove this.
2018-04-17 17:51:28 +02:00
Mai Lavelle be3392e0f9 Make particle edit mode work again
This is just to have hair rendering and editing mostly working as in
master. A better fix is probably needed, there seems to be some
missing depsgraph relations for particle edit settings, and particle
edit code doesn't rebuild caches after applying edits. But at least
you can see and interact with hair now until those things can be
sorted out.
2018-04-17 03:41:04 -04:00
Campbell Barton bfc9d426bb Multi-Object Editing
This adds initial multi-object editing support.

- Selected objects are used when entering edit & pose modes.
- Selection & tools work on all objects however many tools need porting
  See: T54641 for remaining tasks.

Indentation will be done separately.

See patch: D3101
2018-04-16 17:56:50 +02:00
Campbell Barton b65ea517eb Merge branch 'master' into blender2.8
- Undo that changes modes currently asserts,
  since undo is now screen data.

  Most likely we will change how object mode and workspaces work
  since it's not practical/maintainable at the moment.

- Removed view_layer from particle settings
  (wasn't needed and complicated undo).
2018-04-01 11:03:25 +02:00
Campbell Barton 651b8fb14e Undo: unified undo system w/ linear history
- Use a single undo history for all operations.
- UndoType's are registered and poll the context to check if they
  should be used when performing an undo push.
- Mode switching is used to ensure the state is correct before
  undo data is restored.
- Some undo types accumulate changes (image & text editing)
  others store the state multiple times (with de-duplication).
  This is supported by checking UndoStack.mode `ACCUMULATE` / `STORE`.
- Each undo step stores ID datablocks they use with utilities to help
  manage restoring correct ID's.
  Needed since global undo is now mixed with other modes undo.
- Currently performs each undo step when going up/down history
  Previously this wasn't done, making history fail in some cases.
  This can be optimized to skip some combinations of undo steps.

grease-pencil is an exception which has not been updated
since it integrates undo into the draw-session.

See D3113
2018-03-31 20:40:37 +02:00
Campbell Barton 891c1cfc9a C Logging: use instead of printf for messages
- See `--log` help message for usage.
- Supports enabling categories.
- Color severity.
- Optionally logs to a file.
- Currently use to replace printf calls in wm module.

See D3120 for details.
2018-03-30 18:57:41 +02:00
Campbell Barton 5e81d993af Merge branch 'master' into blender2.8 2018-03-19 18:14:05 +01:00
Campbell Barton c78ebf9f26 Cleanup: split lattice into own library
Was mixed with object functionality.
2018-03-19 15:45:50 +01:00
Brecht Van Lommel 3102bf2889 Merge branch 'master' into blender2.8 2018-02-14 15:16:50 +01:00
Sergey Sharybin c8e661706f Particles: Avoid multiple function declarations in multiple places
This makes it really hard to spot errors when function signature changes.
2018-02-14 11:52:58 +01:00
Campbell Barton 1c7cfa025c Merge branch 'master' into blender2.8 2017-12-07 23:53:03 +11:00