Commit Graph

55 Commits

Author SHA1 Message Date
Joshua Leung
cd289f6ea5 UI Tweak: Bring Graph Editor's mode selector left of the menus, as is now done for Dopesheet 2018-04-23 12:01:59 +02:00
Sybren A. Stüvel
c38ebf93e3 Added "Delete Invalid Drivers" operator
This operator is available in the graph editor in the Drivers mode, and
allows quick cleanup of drivers marked as 'invalid'.
2018-01-17 12:12:37 +01:00
Campbell Barton
ebb29200d3 Cleanup: use relative imports in bl_ui 2017-10-21 12:41:42 +11: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
Joshua Leung
351eb4fad1 More tweaks to Normalisation options in Graph Editor
* Added a new dedicated icon for normalize
* Only use an icon for "Auto"
2017-02-09 18:59:51 +13:00
Joshua Leung
316d23f2ba Graph Editor: Replace Normalise/Auto checkboxes with toggle buttons
These take less space, fit in better with rest of the UI, and make their relationship clearer
2017-02-09 17:10:49 +13:00
Joshua Leung
58acc184c4 Code Cleanup - Circle/Lasso select in the Graph Editor 2016-06-24 03:18:34 +12: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
Bastien Montagne
0426f74ca6 Missed this in previous commit... 2015-10-13 13:58:43 +02:00
Bastien Montagne
af9002dc3f Fix T46467: Clean Keyframes removes the channels. 2015-10-13 12:58:04 +02:00
Antony Riakiotakis
ce1bc1838b Clean channels tool for Hwoozeberry.
Basically it's a clean keyframes tool, but also removes a channel if the
only remaining keyframe has the default value only and is not used by
drivers or generative modifiers.

It's was used to help with performance of keyframe-heavy scenes in
gooseberry.

Note, as always the curve left after the clean tool is used is not the
same as the original, so this tool is better used before doing custom
editing of fcurves and after initial keyframe insertion, to get rid
of any unwanted keyframes inserted while doing mass keyframe insertion
(by selecting all bones and pressing I for instance)
2015-07-29 14:45:50 +02:00
Campbell Barton
e6ceecdf97 Cleanup: pep8, spelling 2015-04-22 16:26:54 +10:00
Antony Riakiotakis
364b6b29ff New operator for action and graph editor that centers around current
scene frame, bound to numberpad zero.
2015-04-13 14:30:24 +02:00
Antony Riakiotakis
253d15ea16 Move clean operator from action/ipo editors to the delete menu, now that
O key is bound to proportional editing.
2015-04-10 11:56:18 +02:00
Campbell Barton
40334b4920 missed last commit 2015-04-10 13:44:26 +10:00
Campbell Barton
31d354dfa3 rename _ipo -> _fcurve 2015-04-10 13:41:57 +10:00
Antony Riakiotakis
851ea206d0 Separate proportional editing options for graph and action editor. 2015-04-09 18:30:14 +02:00
Antony Riakiotakis
66a028a576 Proportional editing for IPO editor - version ready for feedback by artists.
This works by using the distance in the x axis only (usually artists want to influence nearby
keyframes based on timing, not value). Tweaking handles is the same as tweaking
the central handle. It's a bit ambiguous if proportional editing is really meaningful
for handles but will leave that for artists to decide.
2015-03-31 16:45:30 +02:00
Julian Eisel
0ff56ca2aa Revert/Remove "Auto View" Feature
Turned out that I misinterpreted the feature request, plus there are some
minor issues with the commit that would need to be corrected.
After all, I decided to just remove it again as it seems to not be really
useful for the users.
2015-02-15 04:29:11 +01:00
Campbell Barton
8ab1188e39 rename SIPO_AUTOVIEW -> SIPO_AUTO_VIEW_SELECTED
The term auto-view on its own isn't very meaningful
2015-02-07 03:47:06 +11:00
julianeisel
dffdde4cdc Graph Editor: Auto View
Auto View automatically adjusts the view based on selection, so that the view is
always focused on the current selection.
A checkbox in the header is used to access it and it works for the following
selection methods: Toggle All, Border, Circle, Lasso, Left, Right, More, Less,
Linked, Column (so all except of single selection, in which this can be a bit
annoying)

Reviewed by @Aligorith (thanks for that :) )
2015-02-06 15:53:13 +01:00
Bastien Montagne
43fab448f3 Followup for previous commit: fix mismatches between menu entry and shortcut properties.
For now, did most of the changes in menu entries (i.e. py space UI scripts).

Note we do not get 100% same results as previously, but current situation is
globally better than previous one, though the whole system to retrieve shortcuts
remains a bit weak...
2015-01-29 17:34:05 +01:00
Antony Riakiotakis
2f16098d20 Gooseberry animation request: Paste flipped pose in action
and graph editor.

This was a tricky commit that was not so straightforward to make work.
The information for bones is not easy to come by in the animation curves,
however we do have some string manipulation tricks to make it happen.

Testing in gooseberry worked for the rigs there, commiting to master now
2015-01-09 12:16:58 +01:00
Joshua Leung
cd54f07a3c Fix: Shift-H now works in main graph editor area too
In the process, I've removed the old operator (ANIM_OT_channels_visibility_set)
and folded that option in with the hide operator, to make this consistent
with how this is done in the 3D view and other parts of Blender.
2014-11-20 03:07:09 +13:00
Campbell Barton
2ad61438d8 Cleanup: name hide/reveal, like rest of operators 2014-11-19 14:35:00 +01:00
Joshua Leung
fbd4dfb2c6 Graph Editor: H/Shift-H now hide and unhide selected curves (Gooseberry Request)
Revised the tools for managing which FCurves are visible in the Graph Editor
curves area. Now, there are the following tools in place:
* V (channels region only) = Hide all curves except those in selected channels  [OLD]

* H       = Hide all selected curves  [NEW]
* Shift-H = Show all previously hidden curves [NEW]

I've removed the old operator to toggle visibility status of selected curves,
as it doesn't seem that useful anymore.
2014-11-20 02:24:42 +13: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
Campbell Barton
5473c5fcc3 FCurve: use submenus rather then popups from menus 2014-05-14 14:01:36 +10: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
daccaa713b Patch T22084: Robert Penner Easing Equations for FCurves
This commit introduces support for a number of new interpolation types
which are useful for motion-graphics work. These define a number of
"easing equations" (basically, equations which define some preset
ways that one keyframe transitions to another) which reduce the amount
of manual work (inserting and tweaking keyframes) to achieve certain
common effects. For example, snappy movements, and fake-physics such
as bouncing/springing effects.

The additional interpolation types introduced in this commit can be found
in many packages and toolkits (notably Qt and all modern web browsers).
For more info and a few live demos, see [1] and [2].


Credits:
* Dan Eicher (dna)              - Original patch
* Thomas Beck (plasmasolutions) - Porting/updating patch to 2.70 codebase
* Joshua Leung (aligorith)      - Code review and a few polishing tweaks

Additional Resources:
[1] http://easings.net
[2] http://www.robertpenner.com/easing/
2014-03-22 03:00:27 +13:00
Campbell Barton
6e479b18ef Code cleanup: remove (now) redundant empty text with icon_only 2014-01-30 16:31:57 +11: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
Sergey Sharybin
16d13e0db9 Project Pampa request: FCurves normalized display
Added two options to a header of FCurve editor:

- Normalize which makes it so every individual
  curve is fit into -1..1 space.

- Auto-normalize, which probably is to be called
  "Lock" which "locks" curve normalization scale.
  This is useful to prevent curves from jumping
  around when tweaking it.

It's debatable whether it need to be a button to
normalize curves n purpose only, and it's fully
depends on animator's workflow.

Here during Project Pampa we've got Francesco
who get used to auto-renormalization and Hjalti
who prefers locked behavior.

Docs are to be ready soon by Francesco.
Thanks Brecht for the review!
2013-10-29 18:10:52 +00:00
Joshua Leung
0215911a9b Animation Editors: Operators to Group/Ungroup Selected F-Curves
This commit introduces operators to customise the grouping of F-Curves. As
groups are only available in Actions, these grouping operators only work in the
Dopesheet, Action Editor, and Graph Editor (Animation) modes.

To Use:
* Ctrl-G = Group selected F-Curves
* Alt-G  = Ungroup selected F-Curves
* or find these tools from the Channels menu

Notes:
* When invoking the grouping operator from the Channels menu, the name popup
won't show up. Instead, the group(s) created will be created with the default
name. To fix, you can either use the F6 operator properties edit OR manually
edit the names (Ctrl-LMB on the relevant channel)
2013-02-22 01:49:51 +00:00
Joshua Leung
609528737a Bugfix [#33154] Toggle/Enable/Disable channel settings operators in
DopeSheet/Action Editor Channel menus were not working properly

They were not allowing users to choose which setting they affected, which
resulted in "protect" (i.e. the same setting as the editability toggle handles)
always being used.

Also, set hidden flags on a few internally used properties here...
2012-11-20 02:03:20 +00:00
Joshua Leung
c483a54207 Making "Jump to Keyframes" operator (for Action/Graph Editors) more obvious
This operator used to be called "Jump to Frame". It basically takes the midpoint
(frame number and/or value) of selected keyframes, and positions the current
frame (or2d-cursor in Graph Editor) at this point.

The hotkey for this is now Ctrl-G (i.e. as it's similar to a "Goto Frame"
feature). It is also now in the Key menu instead of in the relatively obscure
View menu, even though it doesn't actually result in any keyframe edits taking
place.

(Also, fixed a typo/grammer issue with one of Remove Bone Group operator)
2012-10-15 03:52:27 +00:00
Joshua Leung
8e97203f7d Restoring Group Colours for Animation Channels - Part 1
This commit restores the group colours support for F-Curves and F-Curve Groups
in the DopeSheet and Graph Editors. Currently the relevant settings for groups
are only exposed via RNA, but a followup commit will add support for
automatically setting these colours. By default, DopeSheet and Graph Editors are
set to display these colours if/when they are available.

This functionality used to be in 2.48, and is a useful mechanism for visually
distinguishing between channels for different controls when animating (if group
colours are used on the rigs too).
2012-05-24 01:25:31 +00:00
Campbell Barton
c93c8bda3d replace relative imports with absolute imports so scritps can be executed directly (live editing). 2012-04-04 14:39:52 +00:00
Campbell Barton
6e72a7c113 replace operator to toggle handles with generic wm operator 2012-01-14 16:26:08 +00:00
Campbell Barton
635fba3a66 replace ANIM_OT_time_toggle operator with generic WM_OT_context_toggle operator 2012-01-14 14:17:12 +00:00
Campbell Barton
93cf1531d0 fix own bug [#29875] Due to operators now reusing there last-used settings, some UI options are more or less broken (esp. in shortcuts and menu entries)
also prefer *.select_all rather then *.select_inverse operators, since this is an option for select_all.
2012-01-14 06:30:27 +00:00
Campbell Barton
11947f1a67 pep/style edits & quiet some warnings 2011-11-11 03:28:46 +00:00
Campbell Barton
0e51c9014c patch [#27917] MARKER MENUS: Unification and adding "Duplicate Marker to Scene..."
from Troy Sobotka (sobotka), with edits

- remove Markers from Ctrl+L menu (was out of place here and was broken from recent changes to marker operators)
- further de-duplicte scripts by having all menus call the same function: marker_menu_generic().

this fixes bug [#29083] too.
2011-11-03 12:47:39 +00:00
Campbell Barton
f4c56a879d remove use of gettext: _("...") style translation now its handled by rna. 2011-09-21 15:18:38 +00:00
Sergey Sharybin
0eda51f2ea Fixing issues with i18n stuff:
- Make gettext stuff draw-time. so switching between languages
  can happens without restart now.
- Added option to translate visible interface (menus, buttons, labels)
  and tooltips. Now it's possible to have english UI and localized tooltips.
- Clean-up sources, do not use gettext stuff for things which can be
  collected with RNA.
- Fix issues with windows 64bit and ru_RU locale on my desktop
  (it was codepage issue).
- Added operator "Get Messages" which generates new text block with
  with all strings collected from RNA.
- Changed script for updating blender.pot so now it appends
  messages collected from rna to automatically gathered messages.
  To update .pot you have to re-generate messages.txt using "Get Messages"
  operator and then run update_pot script.
- Clean up old translation stuff which wasn't used and most probably
  wouldn't be used.
- Return back "International Fonts" option, so if it's disabled, no
  gettext lookups happens on draw.
- Merged read_homefile function back. No need in splitting it.

TODO:
- Custom fonts and font size.
  Current font isn't nice at least for russian locale, it's
  difficult to read it.
- Put references to messages.txt so gettext can merge translation when
  name/description of some property changes.
2011-09-15 13:20:18 +00:00
Xiao Xiangquan
981f7fcd0d merge with trunk r39834 2011-09-01 15:08:32 +00:00
Joerg Mueller
23807d1fb4 Merging trunk up to r39447. 2011-08-16 14:11:58 +00:00
Thomas Dinges
65d9d2e3e0 2.6 UI Files:
* Code cleanup in the space_*.py files.
* Removed layout.column() statement in _MT_ panels, they are useless.
* Only define variables at the beginning of a function!
2011-08-13 17:52:13 +00:00
Campbell Barton
b374ab919a import common classes from bpy.types, saves ~1000 python getattrs on startup. 2011-08-12 06:57:00 +00:00