Commit Graph

63123 Commits

Author SHA1 Message Date
3135ed376b Texture Paint: prevent normal angle masking duplicating backface culling.
If backface culling is off, the user obviously wants to paint on
back faces, so the normal angle cutoff designed to prevent painting
at glancing angles shouldn't do the culling as a side effect.
2018-11-25 18:51:36 +03:00
Dalai Felinto
4c3ed98ca2 Local View
Bring back per-viewport localview. This is based on Blender 2.79.
We have a limit of 16 different local view viewports.

We are using both the numpad /, as well as the regular /.

Missing features:
* Hack to make sure lights are always visible.
* Make rendered mode with external engines to support this as well
  (probably just need to support this in the RNA iterators).
* Support over 16 viewports by taking existing viewports out of local view.

The code can use a cleanup pass in the future to unify the test to see
if an object is visible (or we can use TESTBASE in more places).
2018-11-25 09:50:34 -02:00
e60c49ecf0 Use orig_pchan when searching for the original copy of a constraint. 2018-11-25 10:59:40 +03:00
7e9389b83d Fix box select of edges not working when box does not fully contain edge. 2018-11-25 02:12:48 +01:00
f48a089db8 Addons: enable GLTF 2.0 addon by default. 2018-11-24 23:59:25 +01:00
a2e209f20a Merge branch 'master' into blender2.8 2018-11-24 23:44:17 +01:00
487af39c99 Sequencer: remove unnecessary limit on transform rotation. 2018-11-24 23:43:03 +01:00
13fa509187 Merge branch 'master' into blender2.8 2018-11-25 08:06:22 +11:00
b348d1ac62 Cleanup: remove unused file 2018-11-25 08:05:42 +11:00
059c119719 Merge branch 'master' into blender2.8 2018-11-25 08:01:53 +11:00
fa0fcbe4d6 Fix T56374, T57066, T58037: crash on startup on macOS when using translation. 2018-11-24 20:04:53 +01:00
5166132708 Fix random color drawing having similar colors for similar names. 2018-11-24 20:04:53 +01:00
Julian Eisel
23d66c5d60 Fix T58022: Changing workspace may change layout of User Pref window
Logic to update child windows on workspace changes should simply ignore
temporary child windows. Users opened those for a specific purpose (i.e. edit
user preferences or show render result). Blender should not come in and
repurpose it.
2018-11-24 19:20:31 +01:00
0c8b0771f2 refactor: Collada reorganize class constructors
- Class constructors without body (only attribute initialisations)
  can safely be kept in the class header files

- Constructor variables should be initialized in the order of their
  definition in the header files

This change is also aimed to remove a couple of
build warnings from the linux builds.
2018-11-24 14:30:19 +01:00
1e820898ff Depsgraph: add a new operation node for computing B-Bone segments.
Computing the shape of a B-Bone is a quite expensive operation, and
there are multiple constraints that can access this information in
a variety of useful ways. This means computing the shape once per
bone and saving it is good for performance.

Since the shape may depend on the position of up to two other bones,
often in a "cyclic" manner, this computation has to be a separate
node with its own dependencies.

Reviewers: sergey

Differential Revision: https://developer.blender.org/D3975
2018-11-23 23:19:23 +03:00
e49c66efae fix: Collada: used wrong Enumeration type for comparison 2018-11-23 19:23:55 +01:00
bd25523aff fix: collada: must use case sensitive filename in include 2018-11-23 19:23:16 +01:00
397272e561 fix: Collada: use reference to BezTriple instead of copy 2018-11-23 19:21:29 +01:00
7eb9091e96 fix: compiler errors on mac_x86_64_10_9 2018-11-23 18:38:19 +01:00
b9b50c0e39 cleanup: Collada: remove unused variables 2018-11-23 18:38:19 +01:00
Dalai Felinto
9be5b2d23f Pass viewport to BASE_ related tests, for viewport view/select restrictions
Note: functions like select all are still not respecting that.
I will fix this as part of the local view commit though.
2018-11-23 15:13:14 -02:00
0d0c79e879 DRW: Make non Mesh object wire show in edit mode 2018-11-23 18:03:18 +01:00
ff6e61f09a DRW: Support Wireframe for metaball objects 2018-11-23 18:03:18 +01:00
be940fcd5f GP: Avoid crash when adding new layer 2018-11-23 17:34:53 +01:00
b05adc1f97 Icons: add Select tool icon. 2018-11-23 17:12:57 +01:00
322cf89a14 Partial rewrite of the Collada Module for Blender 2.8
Most important changes are in the Animation exporter and Animation Importer.
There is still some cleaning up to be done. But the Exporter/Importer basically
work within Blender 2.8

Some details:

User Interface:
The interface has been reorganized to look more like the FBX interface.

New options in user interface:

* keep_keyframes:
  When sampling the distance between 2 keyframes is defined by
  the sampling rate. Furthermore the keyframes defined in the
  FCurves are not exported. However when this option is enabled
  then also the defined keyframes will be added to the exported fcurves

* keep_smooth_curves:
  When sampling we do not use FCurves. So we also have no Curve handles
  for smooth exporting. However when this option is enabled, Blender
  does its best to recreate the handles for export. This is a very
  experimental feature and it is know to break when:

  - the exported animated objects have parent inverse matrices
    different from the unit matrix
  - The exported objects have negative scaling

  There may be many other situations when this feature breaks.
  This needs to be further tested. It may be removed later or replaced
  by something less wonky.

BlenderContext:
is a new class that contains the bridge to Blender. It contains
pointers to the current export/import context plus derived values
of Depsgraph, Scene, Main

Reporting:
I reorganized the output on the Blender Console to become more
informative and more readable

Preservation of Item names:
name attributes are now encoded with XML entities. This makes
sure that i can export/import names exactly defined in the tool.
This affects material names, bone names and object names.

Hierarchy export:
* Object and Bone Hierarchies are now exported correctly
  by taking the Blender parent/child hierarchy into account
* Export also not selected intermediate objects

  Problem:
  When we export an Object Hierarchy, then we must export
  all elements of the hierarchy to maintain the transforms. This
  is especially important when exporting animated objects, because the
  animation curves are exported as relative curves based on the
  parent-child hierarchy. If an intermediate animated object is missing
  then the exported animation breaks.

  Solution:
  If the "Selected" Optioon is enabled, then take care
  to also export all objects which are not selected and hidden,
  but which are parents of selected objects.

Node Based Material Importer (wip):
Added basic support for Materials with diffuse color and
diffuse textures. More properties (opacity, emission) need
changes in the used shader.
Note: Materials are all constructed by using the principled BSDF shader.

Animation Exporter:
* Massive optimization of the Animation Bake tool (Animation Sampler).
  Instead of sampling each fcurve separately, i now sample all
  exported fcurves simultaneously. So i avoid many (many!)
  scene updates during animation export.
* Add support for Continuous Acceleration (Fcurve handles)
  This allows us to create smoother FCurves during importing Collada
  Animation curves. Possibly this should become an option ionstead of
  a fixed import feature.
* Add support for sampling curves (to bake animations)
* The animation sampler now can be used for any animation curve.
  Before the sampler only looked at curves which are supported by
  Standard Collada 1.4. However the Collada exporter currently
  ignores all animation curves which are not covered by the 1.4.1
  Collada Standards. There is still some room for improvements
  here (work in progres)

  Known issues:

    * Some exports do currently not work reliably, among those
      are the camera animations, material animations and light animations
      those animations will be added back next (work in progres)

    * Exporting animation curves with keyframes (and tangents)
      sometimes results in odd curves (when parent inverse matrix is involved)
      This needs to be checked in more depth (probably it can not be solved).

    * Export of "all animations in scene" is disabled because the
      Collada Importer can not handle this reliably at the
      moment (work in progres).

* Support for Animation Clip export
  Added one extra level to the exported animations
  such that now all scene animations are enclosed:

  <Animation name="id_name(ob)_Action">
    <Animation>...</Animation>
    ...
  </Animation>

Animation Importer:
* 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.

Error handling (wip):
The Importer was a bit confused as it sometimes ignored fatal
parsing errors and continued to import. I did my best to
unconfuse it, but i believe that this needs to be tested more.

Refactoring:

update : move generation of effect id names into own function
update : adjust importer/exporter for no longer supported HEMI lights
cleanup: Removed no lopnger existing attribute from the exporter presets
cleanup: Removed not needed Context attribute from DocumentExporter
fix    : Avoid duplicate deletion of temporary items
cleanup: fixed indentation and white space issues
update : Make BCAnimation class more self contained
cleanup: Renamed classes, updated comments for better reading
cleanup: Moved static class functions to collada_utils
cleanup: Moved typedefs to more intuitive locations
cleanup: indentation and class method declarations
cleanup: Removed no longer needed methods
update : Moved Classes into separate files
cleanup: Added comments
cleanup: take care of name conventions
...    : many more small changes, not helpful to list them all
2018-11-23 17:08:14 +01:00
3bf7c846ee Fix T57996: Crash - delete node with a driven parameter 2018-11-23 17:03:14 +01:00
e5abce9220 Tag relations for update when clip's animation changes 2018-11-23 17:03:14 +01:00
d13a53e71d Return truth when animation fix changed animation
This can be used to inform higher level modules that animation
is changed and that dependency graph likely requires relations
update now.
2018-11-23 17:03:14 +01:00
1ec21ed41a DRW: Support Wireframe for cruve/surface/text objects 2018-11-23 16:44:53 +01:00
1cc7bcd8d8 Add missing COW updates when selection changes in paint modes. 2018-11-23 18:37:28 +03:00
859d5e5699 Use default movie cache size of 4GiB 2018-11-23 14:40:51 +01:00
29f75dd7b8 Python API: restore bpy.app.autoexec_fail variables, some scripts use it. 2018-11-23 12:11:41 +01:00
fc830ce78f Fix T57616: Deleting particle system instance object leads to crash
Explicitly tag copy-on-write form library remap. Previously, this
tag was used implicitly via geometry/transform tagging, which worked
ok for objects. For non-objects we do need to ensure all copies has
correct pointer and the only way to do so is to pass tag explicitly.

There is probably more places in the library remap where this is
needed, but not being familiar with the code makes it difficult to
spot where possible tags are missing.
2018-11-23 12:03:26 +01:00
4b06d0bf51 Python API: bpy.app.handlers.depsgraph_update_pre/post
Reviewers: brecht

Differential Revision: https://developer.blender.org/D3978
2018-11-23 11:52:09 +01:00
2ded8fca79 UI: initialize drag-lock x/y axis from region type
When dragging in a vertical or horizontal region,
there is no need to detect the drag axis.

Gives minor usability improvement for dragging over vertical tabs.
2018-11-23 19:12:34 +11:00
4ed7c10a32 Correct missing NULL check in recent changes 2018-11-23 18:12:28 +11:00
7a7c9ee71a Fix uv lasso/box multi-object select logic
Was de-selecting all UV's on each iteration.
2018-11-23 18:06:50 +11:00
a6eb9a3e21 Tool System: uv lasso/box select options
These tools now support (new, add, subtract),
(xor, and) could be supported but are complicated by UV's sticky
selection modes.
2018-11-23 17:52:52 +11:00
dcf359b15a Error in last commi 2018-11-23 16:28:50 +11:00
93c143ecf3 Fix wire-toggle restoring previous shading mode 2018-11-23 16:27:54 +11:00
cfffe615f4 Keymap: add Keymap.keymap_items.new_from_item
Needed to copy keymap items from other keymaps.
2018-11-23 15:16:13 +11:00
d56c0a0a6a Cleanup: rename bone-select to xray
This shows bones in font and uses the xray toggle binding.
Also 'bone select' isn't very meaningful on it's own.
2018-11-23 13:48:21 +11:00
1ffb2bf917 Pose: make pose-bone xray usable in wpaint mode
Update UI, draw-manager and operator to support with pose-bone-xray
when in weight paint mode.
2018-11-23 13:19:22 +11:00
5f2ac43b5f UI: allow inaccurate swipe motion to switch tabs
Removes the need to keep your cursor over tabs while dragging.
2018-11-23 12:11:18 +11:00
60865ccefd Fix for weight paint object occluding pose bones
This makes it so weight paint + pose mode can't switch to other
weight paint objects.
2018-11-23 10:38:15 +11:00
73547952a9 Pose: support wpaint+pose w/ object-lock enabled
Mode locking made it nearly impossible to enter wpaint + object mode.

Now enter pose mode when entering wpaint mode
when the pose object is selected.
2018-11-23 10:19:12 +11:00
7b4f545e28 Fix bone selection w/ mixed wpaint & pose mode 2018-11-23 10:03:04 +11:00
7c74f5006a Cleanup: newlines in error prints 2018-11-23 07:29:21 +11:00
3fb77591f4 UI: fix wrong icons after recent update.
This cleans up old icon .data files that were still hanging around,
but not in the SVG anymore.
2018-11-22 21:27:20 +01:00