Commit Graph

24582 Commits

Author SHA1 Message Date
Dalai Felinto
4521d3e707 Outliner: Do not gray out empty collections
We can still have a special icon for them, but graying out is not the way to go.
2018-11-28 02:33:04 -02:00
Dalai Felinto
fd16b35997 Remove eye column from the outliner
To control per-viewlayer, per-object visiblity users should either use
the menu or the H shortcuts (H, Alt+H, Shift+H).

Following next will be to have proper per-viewlayer collection
visibility. This will replace the functionality currently at the
viewport collections visibility menu.
2018-11-28 02:33:04 -02:00
b5ba5a0b94 Correct error clearing runtime tool in recent commit 2018-11-28 14:11:10 +11:00
b58d4e7fe4 WM: remove tool initialization code
Area initialization handles these cases now.
2018-11-28 13:58:53 +11:00
ba8c21989c WM: avoid re-initializing tools while resizing areas
Every update caused the gizmo to be recreated.
2018-11-28 13:50:15 +11:00
dcf0860dab Fix tool not being initialized switching windows 2018-11-28 13:41:36 +11:00
Dalai Felinto
37b882982a Local View: Objects to be selected once back to regular view
They were already selected, but we needed to bump depsgraph.
2018-11-27 22:17:59 -02:00
6491d50d02 Transform: default to user-defined orientation
Previously we tried this but reverted (see 64d40c82c3)
because there wasn't a predictable set of keys to use global-space.

Now the keys are swapped:

- 'GX' always transforms in the user defined orientation.
- 'GXX' always transforms in global space.

As before 'GXXX' cycles back to disabling constraints.

This does have a down side that GXX won't be used for local-space
when the user has global space set.
Also, when global is the user-orientation, pressing GX and GXX
does the same thing.

Note: examples here use GX but could be any transform-mode/axis.
2018-11-28 10:15:02 +11:00
c28fe9c304 transform_snap_object: Fix snap in edit mode.
Do not use the texture space of a mesh to pretest the snap.
(The texture space is only really updated when you exit edit mode).
2018-11-27 18:24:22 -02:00
bd957435ac Cleanup: tweak ED_region_is_overlap checks 2018-11-28 06:31:13 +11:00
Dalai Felinto
9c546c70d7 Fix localview duplicated objects not in localview
Following the behaviour present in Blender 2.7x, where if you duplicate
an object it will show in all the local views the original object was
visible.
2018-11-27 15:11:25 -02:00
86e88df03c Fix outliner click select with tablets, after recent changes. 2018-11-27 15:04:42 +01:00
a80ddb7f9a Fix file browser click to select not working on tablets, after recent changes.
The highlight on mousemove operator should not swallow events.
2018-11-27 14:21:04 +01:00
39dcf6a10a make node editor tool region background transparent
followup to rB1944bca49a22c18b059d84daf56908b6e15591ad

Differential Revision: https://developer.blender.org/D3999
2018-11-27 11:09:56 +01:00
00d438639d Fix T57929: missing UI updates when changing active object
was caused by NC_SCENE notifier being skipped with a non-scene reference
showed e.g. in timeline not updating keyframes/cachelines

Maniphest Tasks: T57929

Differential Revision: https://developer.blender.org/D4000
2018-11-27 11:07:44 +01:00
47bf0a33ef Fix T57070: Take Two of 2.8 Crash in sculpting mode with tilling and Dyntopo.
Accessing ob->bb directly is not a good idea anyway.

Still, would like to know why/where this bbox is freed, since it is
allocated at least once by depsgraph eval, as part of
`BKE_object_handle_data_update()` function...
2018-11-27 10:43:01 +01:00
1944bca49a Tool System: use tools for node editor 2018-11-27 18:43:08 +11:00
26b1aa9943 Fix T58062: Missing redo panel 2018-11-27 11:52:56 +11:00
621405ee0f Merge branch 'master' into blender2.8 2018-11-27 11:41:33 +11:00
9a5df92c1b Fix T56872: Edge slide gives invalid normals
Add the ability to skip overwriting normals.
2018-11-27 11:40:32 +11:00
fb262f942e Cleanup: style, includes 2018-11-27 08:01:54 +11:00
9d7b767dd7 transform_snap_object: fix ray_start_correction in snap to edit_mesh. 2018-11-26 07:32:03 -02:00
36429a5bc9 Fix T56167: Crash when extruding + snap to face.
This is a local fix.
The problem with duplicate looptris still remains.
That is, it can still be released in one place but not upgraded in the other.

(note: setting the looptris to NULL in the evaluated mesh and assert whether it is still NULL when the mesh is freed could indicate where those cases are).
2018-11-26 07:32:02 -02:00
945fddc4be UI: collapse redo panel by default
For some operators this fills a lot of vertical space,
users can expand it if they need.

Also remove workaround for T56752 (now fixed).
2018-11-26 17:44:33 +11:00
16c46aabad Correct last commit
Initial display was fixed, broke refreshing.
2018-11-26 17:43:23 +11:00
59e8d532d9 UI: fix glitch showing redo panel
There were still cases it would show for the first time w/o content.
2018-11-26 17:29:02 +11:00
aa2079bad3 Fix crash accessing mesh.point_normals default
This memory needs to be static,
in this case the argument isn't needed so remove it.
2018-11-26 16:28:00 +11:00
f968256b42 Fix T58027: Scene.ray_cast crash
Reintroduce BASE_VISIBLE_BGMODE

D3987 by @Soundwave
2018-11-26 15:52:10 +11:00
a46290aaa8 Fix object selection in edit-mode
Ctrl-RMB in edit-mode is needed for setting vertex parent.
2018-11-26 15:28:59 +11:00
2b07c31fcf Fix proportional edit-mode w/ multi-object editing
D3992 by @Al
2018-11-26 14:20:51 +11:00
7493848008 3D View: remove 3D cursor
Use 3D cursor from the scene (was previously used for local-view).
2018-11-26 14:02:09 +11:00
Julian Eisel
6c704b4632 UI: Disable font shadow in tooltip
When I added this a few years ago, it was meant to create a fake bold effect.
With the new text shadow drawing code, that doesn't work well though.
2018-11-25 19:51:15 +01:00
Julian Eisel
5e5db7db89 UI: Disable font shadow in tabs
This was used to fake a 3D look, however that doesn't work well with the new,
flat style. It just made text appear blurry.
2018-11-25 18:35:48 +01:00
Julian Eisel
b00963afc1 UI: Initial User-Preferences redesign
Implements the first changes for T54115:

* Rename "User Preferences" window to "Settings" in the UI.
  We'll likely put workspace settings in there, separate from the global
  user settings. System settings should become separate from user
  settings in future to allow settings for specific hardware.
* Add sidebar region for navigation (scrolls independently).
  Addresses space problems, so we can add more categories as needed now.
* Increase size of Settings window to compensate new navigation bar.
* Group sections into User Preferences and System.
  Icons for section groups by Andrzej Ambroz. Thanks!
* Bumps subversion for file compatibility.

Screenshot: https://developer.blender.org/F5715337

I also added categories for future work, but commented them out.
We may also want to redesign contents of each section now.

Reviewers: brecht, campbellbarton
Differential Revision: https://developer.blender.org/D3088
Design Task: https://developer.blender.org/T54115
2018-11-25 17:08:58 +01:00
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
7e9389b83d Fix box select of edges not working when box does not fully contain edge. 2018-11-25 02:12:48 +01:00
059c119719 Merge branch 'master' into blender2.8 2018-11-25 08:01:53 +11: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
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
1cc7bcd8d8 Add missing COW updates when selection changes in paint modes. 2018-11-23 18:37:28 +03: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