Commit Graph

70 Commits

Author SHA1 Message Date
Pablo Vazquez
5b7f0d36f3 UI: Header consistency for animation editors 2018-07-02 14:54:20 +02:00
Campbell Barton
a61480c271 Merge branch 'master' into blender2.8 2018-06-26 22:56:39 +02:00
Campbell Barton
a753c6e11a UI: split left/right header buttons
- Added flexible separators to
  Clip, Graph, Dopesheet, Image, Node, Timeline, 3D View.
- Added graying out for Proportional Editing
  menus to avoid popping when right-aligned.
- Slightly re-arranged some controls,
  so they can be on correct side of the separators.

Patch by @billreynish
2018-06-11 17:01:10 +02:00
Dalai Felinto
d90fc119c2 UI: Separator spacer
This support layout.separator_spacer() to be used by headers as a way to
dynamically separate the ui buttons.

Right now no UI file is changed, though we can use this right away in the
timeline, and shortly after in the viewport header (moving settings from
the topbar to it).

Original design by William Reynish.

Review: Campbell Barton
D3468
2018-06-11 14:46:35 +02:00
Campbell Barton
7436fb2ef1 Merge branch 'master' into 28 2018-06-05 16:36:13 +02:00
Campbell Barton
5b64301834 Merge branch 'master' into blender2.8 2018-06-04 09:06:14 +02:00
Pablo Vazquez
1bf2a7709f Timeline: Move Keying settings from sidebar to header as popover
Having them on the sidebar means we have to expand the editor every time.
2018-05-25 17:02:56 +02:00
Campbell Barton
8ea4539542 UI: View menu area operators now in submenu 2018-05-24 18:35:19 +02:00
Joshua Leung
5df0fed47c Timeline Header Cleanup - Part 3: Consolidate options in a "Playback" popover
The "Playback" popover now combines options from several old menus
and scattered around in other places.
2018-05-10 19:28:37 +02:00
Joshua Leung
1ac0b4e2ba Timeline Header Cleanup - Part 2: Rearrange buttons (WIP)
NOTE: This is all still heavily WIP, and still requires some additional
layout engine magic to make it all nice.

* Moved current frame, and start/end frame buttons to the end
* Put playback controls in the center
* Remove other more obscure buttons (e.g. Frame menu, lock frame to frame range)

More to follow in next commit...
2018-05-10 19:28:36 +02:00
Joshua Leung
176cb0c3f8 Timeline Header Cleanup - Part 1: Move Keying Set + Autokeying Settings to Properties Region (NKEY)
Now all Keying Set and Auto Keyframing settings can be found the in NKEY
Properties Region (right-hand-side hidden tab/drawer).

This way, we have more room to display the full names of the settings,
without clogging up the timeline header.
2018-05-10 19:28:36 +02:00
Joshua Leung
20185a8681 Cleanup "Sync Mode" (i.e. Av Sync/Framedropping) stuff
* Remove the "sync_mode" dropdown from timeline header, and move it into
  the Playback menu instead.
* Remove the confusing "Frame Dropping" and "AV Sync" entries from the
  Playback menu. These were supposed to be mutually exclusive (or else,
  the "sync_mode" menu would break).
* Turn AV Sync on by default
* Commented out the Frame Dropping and Av Sync RNA Properties too.
  THere doesn't seem to be any valid reason for these to exist?
2018-05-03 18:50:53 +02:00
Joshua Leung
05cf7863c3 Fix: UI layout for "Pause" button on timeline header was broken (leaving a gap)
A recent change in the UI layout code probably broke how the scale_x
for layouts was getting handled. This was leaving a large gap
(and causing layouts to pop) when trying to scrub the timeline.

This commit fixes this with a manually-found value that largely seems
to get rid of the popping problem. There's still a little jumping (1-2 px)
but it's less distracting now.
2018-04-30 15:11:43 +02:00
Joshua Leung
ef08e77a46 Markers: Move "Bind Camera to Marker" from 'View' Menu to the Markers menu proper
It was always weird that this tool for markers was stored in a different
menu where it was hard to find.
2018-04-24 19:18:31 +02:00
Joshua Leung
3f21023f24 Fix: View All/Selected entries in new "timeline" not working
These entries were still referring to the old standalone timeline editor
2018-04-23 14:05:55 +02:00
Joshua Leung
5374865523 Dopesheet-Timeline: Removal of Timeline Editor!
This commit removes all references to the old timeline editor.

Unfortuantely, the removal of the Timeline spacetype defining
functions has ended up breaking the version patching code I'd
been working on earlier (as now, the editor gets marked as
"unknown/info" before we get a chance to patch it!)
2018-04-20 18:55:56 +02:00
Joshua Leung
0f77060ebc Move the set start/end frame operators from Timeline to Animation module
Eventually the idea is that they'll get remapped to some more global/generic hotkey
that can get used across all animation editors (see T54728). However, to facilitate
the removal of the timeline editor, it's better we do this now.
2018-04-20 18:54:41 +02:00
Joshua Leung
cc06e0fbe8 Dopesheet-Timeline: First steps towards making the Timeline a mode of the DopeSheet Editor
For many years, animators have been requesting the ability to edit keyframes in the
timeline. However, implementing such tools in the timeline quickly becomes a slippery
slope, where we'll eventually end up having to duplicate all the functionality from the
dopesheet editor.

Discussing with William and Pablo this morning, we realised that perhaps it might be possible
to just make the Timeline a mode of the Dopesheet Editor (and kill off the old standalone
Timeline), meaning that we essentially get all the Dopesheet Editor goodness for free!
Also, with some proposed UI updates (i.e. allowing "submodes" of editors to be part of the
the main editors selector), it might not even matter that there isn't an "actual" timeline
editor anymore.

This commit implements the following changes (which are actually sufficient for supporting
most basic workflows):
* Timeline mode in Dopesheet Editor
* Tweaks to UI code to make the Timeline header/menus show up in Dopesheet editor

TODO:
* Hide channels list when switching to timeline mode
* Port over cache-file indicators
* Add missing timeline-only settings that need a new home in the dopesheet
* Go through fixing all timeline editor operators (e.g. Bind to camera)
* Port over start/end frame shading (and adjust preview range rendering to make the
  distinction between these clear)
* Remove old timeline editor, and transfer over any leftover code
2018-04-20 18:54:40 +02:00
Campbell Barton
807663742b Error passing context arg to marker menu
own mistake in 6981861fcfd
2018-03-05 14:10:43 +11:00
Campbell Barton
6981861fcf Cleanup: Python context access
Avoid access from bpy when it's already declared.
2018-02-07 15:47:54 +11:00
Aaron Carlisle
f0bbb67e8a UI: Fix some small ui inconsistencies
- Use "..." to indicate non immediate action.
- First letter of words in labels should be capitalized.
2017-06-09 15:25:17 -04:00
Campbell Barton
19d493ee10 Moving classes to separate listing broke panel order
Although this wasn't so obvious since it
only showed up for factory settings and in the preferences window.

Panel display order depends on registration order,
Sorry for the noise. On the bright side we no longer need to move
classes around to re-arrange panels.
2017-03-20 02:37:55 +11:00
Campbell Barton
9bdda427e6 PyAPI: remove bpy.utils.register_module()
In preparation for it being removed, see: T47811
2017-03-18 20:03:24 +11:00
Sergey Sharybin
3e628eefa9 Motion blur investigation feature
This commit adds a way to debug Cycles motion blur issues which
are usually happening due to something crazy happening in between
of frames. Biggest trouble was that artists had no clue about
what's happening in subframes before they render. This is at
least inefficient workflow when dealing with motion blur shots
with complex animation.

Now there is an option in Time Line Editor which could be found
in View -> Show Subframe. This option will expose current frame
with it's subframe to the time line editor header and it'll allow
scrubbing with a subframe precision in time line editor.

Please note that none of the tools in Blender are aware of
subframe, so they'll likely be using current integer frame still.

This is something we don't consider a bug for now, the whole
purpose for now is to give a tool for investigation. Eventually
we'll likely tweak all tools to be aware of subframe.

Hopefully now we can finish the movie here in the studio..
2017-02-15 16:19:05 +01:00
Campbell Barton
6fbe6eb033 Fix T48703: Name inconsistency w/ area maximize/fullscreen
Name operator based on default behavior.
2016-06-22 07:47:30 +10:00
Joshua Leung
b973911fee Anim Editors: "View Frame" Operator - Code Cleanups/Reshuffling + NLA/Timeline Support
* Reshuffled code for existing "View Frame" implementations, and removed leftover
  comment from some of the the copy-and-paste used to build it.
* Added support for this operator in the NLA and Timeline
2016-04-17 03:44:10 +12:00
Joshua Leung
9779d1558a Default Keyframe Type: Some UI tweaks
* Don't show name of keyframe type in timeline header. It's getting a bit too crowded
  for that, so just show the keyframe icon. Hopefully that will be enough.

* Tweaked the tooltip and label to make it clearer what the setting is for
2016-03-14 01:04:39 +13:00
Joshua Leung
6bf9aa3f8e Fancy procedural icons for Keyframe Types
The new "default keyframe type" dropdown on the timeline header
(and also the "Keyframe Type" operator/properties in other places)
now has procedurally generated icons which reflect what that keyframe
type will look like when rendered in the Dope Sheet.

This was achieved using the ancient "VICON" (vector icon) stuff
that's lurking around in the dark parts of UI code. From memory,
the only other things that use (or used to use) this stuff included
some of the triangle icons for some dropdown buttons, or something
like that.

Notes:
* Theme colour changes are reflected immediately by these icons.
  This is possible because they are all drawn procedurally
* These icons scale with the DPI setting. I manually guessed the size of
  these icons. They can be adjusted further if needed.
* I've documented the steps for adding voodoo icons like this on the wiki
  (http://wiki.blender.org/index.php/Dev:2.7/Source/Checklists/Vector_Icon)
* It's true that the rendering of these keyframes doesn't quite fit the rest
  of the icons in the UI. However, since we're just leveraging the standard
  keyframe drawing methods (to avoid discreptancies between the two), we'll
  leave it as such for now. Maybe later we can consider blending in a bit of
  the glossy keyframe icons in the Icon Sheet?
2016-03-14 00:56:52 +13:00
Joshua Leung
570fbba3f3 Keyframing: Added ToolSetting for choosing default keyframe type
To make it easier for animators working in a multipass pose-to-pose workflow
when inserting breakdown keyframes and so forth, it is now possible to specify
the "type" of keyframe being created (i.e. the colour of the keyframe, when drawn
in the Dope Sheet).

Usage:
1) Choose the type of keyframe ("Keyframe", "Breakdown", "Extreme", etc.) from
   the new dropdown located between the AutoKeying and KeyingSet widgets on the
   timeline header.
2) Insert keyframes
3) Rejoyce that your newly created keyframes have now been coloured for you already
   in the DopeSheet.

Todo:
* Look into a way of using the actual keyframe colours (from the theme) for the icons
  of these types.
2016-03-13 18:28:30 +13:00
Campbell Barton
922d72355d Cleanup: pep8 2015-09-01 13:03:38 +10:00
Campbell Barton
b216f7abd6 RNA: use lock_ prefix for booleans 2015-04-15 14:51:17 +10:00
Antony Riakiotakis
ed40d5eaa7 Add flag that prevents editing of markers. Can be located in marker
menu.

When active, all editing operators for markers will not fire up.
2015-04-14 12:12:17 +02:00
Joshua Leung
1a5c5ac742 Fix T44068: "Layered" option for auto keyframing doesn't "Insert Available Only" is enabled
The "Layered" option for auto keyframing will create a new NLA strip if playback
reaches the end of the frame range and jumps back again. The idea is that instead
of overwriting the keyframes you've already made, it will make a new animation
layer. However, this does not work with the "Insert Available Only" option
(which can either be set in the User Prefs, or in the active keyingset), as that
option needs some existing FCurves to tell what it can insert keyframes into.

The "fix" here is to simply not show the offending button in situations where it
cannot be used!
2015-03-28 23:48:10 +13:00
Antony Riakiotakis
ced4c5fe22 Animation play: Follow feature. Enabled from playback menu in the
timeline.

When enabled, ipo, dopesheet, NLA, timeline, clip and sequence editors
will follow the current frame during animation. When the cursor reaches
the end of the screen, then the next range of frames of the same width
is displayed.
2015-02-05 22:14:38 +01:00
Dalai Felinto
7c25f16f1a Fullscreen Editor (new fullscreen mode for clean UI)
Organize Maximize/Fullscreen mess and add a new fullscreen mode with no UI

* Maximize Editor: (old Ctrl+Up)
* Full Screen Window: (old Alt + F11)
* Full Screen Editor: new operator (Alt + F10)
* Change Show/Hide Header: (Alt + F9)

When the mode is on moving the mouse near the top right corner of the
editor shows an icon to go back to the normal editor mode.

This was originally intended for the multiview branch, but this
functionality also benefits non-stereo workflows, thus it can be
reviewed and committed independently.

Development notes:
* This includes cleanups in the code to sanitize the naming of
  fullscreen/maximize across the window/editor code.

* Originally the idea was to make the window fullscreen as well, but
  this idea was dropped.

* You can see the clicking area when debug is 1

* Technically the user can be left with an unfaded icon in the corner
  (specially when using a tablet). If we think this is too bad we can
  increase the action zone to be the whole screen, or something similar.

Reviewers: campbellbarton [1], ton [2], fsiddi [2]

[1] actual code review
[2] design review

Differential Revision: https://developer.blender.org/D678
2014-10-14 15:11:41 -03:00
Antony Riakiotakis
43303625af Expose preview setting operators on menus for sequencer and timeline
(could not find them anywhere before)
2014-09-01 14:22:42 +02:00
Campbell Barton
b245d3577a View2d: bring back 2.4x option to lock time for 2d views 2014-05-01 14:49:47 +10:00
Joshua Leung
c26105278f Fix T34993: "Jump to Next Keyframe" shortcut not related to the timeline viewable keyframes
Made the timeline option to only show keyframes from selected channels/data be a
per-scene setting instead of the per-timeline option it was previously. This makes
it easier for animators working on rigs with multiple bones (especially during the
polishing phase), since now the timeline and jump to keyframe operators use the same
setting to decide which subset of keyframes they need to consider.

By default, this option is enabled by default.

TODO: Extend this to the keyframe status shading on the active object name in the 3D view?
2014-04-27 21:59:17 +12:00
Campbell Barton
a71f072f9c UI: Replace +/- menus with collapsible ones
Patch D160, by Scott Petrovic with  own modifications.
2014-01-27 18:42:11 +11:00
Campbell Barton
1ea47c9af9 Code Cleanup: style, spelling and pep8 edits 2013-11-20 03:40:10 +11:00
Brecht Van Lommel
efe2b1edf1 Jump to Next/Previous Marker operators in the timeline menu, shortcuts are
ctrl + shift + left/right arrow key.

Patch #37142 by Henrik Aarnio, thanks!
2013-10-21 15:00:22 +00:00
Sergey Sharybin
ee63ef7af1 Project Pampa request: option to lock frame selection to the range
This means when you've got "Lock Frame Selection" option (which is
in the timeline next to the preview range button) you're not able
to go to the frames which are out of current frame range with your
mouse.

TODO: Make it so current frame slider also respects this setting?
      Not so much important for tonight.
2013-10-13 20:46:02 +00:00
Bastien Montagne
5b83a89c81 Followup to r59434 : py UI scripts edits.
Notes:
* Made those edits by full checking of py files, so I should have spoted most needed edits, yet it remains quite probable I missed a few ones, we'll fix if/when someone notice it...
* Also made some cleanup "on the road"!
2013-08-23 20:41:21 +00:00
Campbell Barton
e8c272422a code cleanup: py ui 2013-04-04 17:01:51 +00:00
Sergej Reich
089cf12435 rigidbody: Add point cache support
Add read/write/interpolate functions.

In order to get rigid body point cache id from object it's now required to pass the
scene to BKE_ptcache_ids_from_object().

Rigid body cache is drawn in the orange color of the bullet logo.
2013-01-23 05:56:34 +00:00
Thomas Dinges
83b5d7d2cd Editors UI:
* Add "Toggle Full Screen" and "Duplicate Area into New Window" operators to the view menu, was missing in those 2 operators. Patch [#33076] by Harley Acheson, thanks.

* Also moved those two operators to the top in text editor, for consistency.
2012-11-04 18:26:30 +00:00
Thomas Dinges
ab38e1d379 User Interface Scripts:
* Code cleanup, removed unneeded code.
* Style cleanup, don't break lines to early 
(unless marked as pep8-80 or pep8-120 compliant) 
* Keep 1 line after layout declaration empty.
2012-07-29 10:03:46 +00:00
Campbell Barton
eb22b52482 style cleanup: pep8 2012-05-15 18:50:51 +00:00
Joshua Leung
d2d272711d Timeline Header: Only show the "use active keyingset only" toggle (beside the
autokey button) if autokeying is enabled. This was only useful when the latter
was actually enabled.
2012-05-06 06:57:02 +00:00
Campbell Barton
391a214303 pep8 edits, also remove unused vars 2012-01-17 17:57:20 +00:00