Commit Graph

147 Commits

Author SHA1 Message Date
Joshua Leung
018dc3aeda Action Editor: Experimental tweak to ordering of buttons
This commit is an experiment exploring the relationship between the action
management buttons (i.e. action selector + pushdown/stash, and soon a few others)
and the filtering stuff (i.e. summary, only selected, etc.)

The old ordering meant that the filtering stuff was consistently in the same
place beside the mode selector, meaning that the order was "common stuff, then
editor specific stuff", this was not that great on smaller windows, where there
important stuff was often out of view.

This new order places greater emphasis on the parts which are likely to be more
important. It also allows us to have a better hierarchy/flow; this is especially
because we'll soon introduce a way to specify which datablock "level" the
action comes from, so going from "level -> action -> filters within action" will
make more sense.
2015-04-03 02:17:45 +13:00
Joshua Leung
ea84b0e4ac Action Editor: "New Action" operator now stashes old actions, and is used by default again
This commit modifies the "New Action" operator to always stash the old action
before it creates a new one. As a result, the old active action will now have
a proper user of sorts after the new one is created, preventing previously
created actions from being lost.

Now that the New operator does this, it can be used for the Action Editor header AND
NLA Editor (Animation Data Panel -> Active Action) again. The "stash and create"
operator is somewhat redundant at this point as a result.
2015-03-01 02:34:52 +13:00
Joshua Leung
741a66e472 Action Editor WIP: Adding new actions in Action Editor now uses the "stash and create new" operator
In constrast to the old "new" operator, this operator will stash the existing action
in the stack to prevent it from being lost. This situation isn't totally ideal yet,
since the NLA Editor still calls the old method.
2015-03-01 02:34:51 +13:00
Joshua Leung
9c82a0478f UI Tweak: Display labels for Push Down and Stash
I'm still not sure which version is better, but I suspect that with the labels,
this might help users figure this out more than if they were just unlabelled
icon buttons...
2015-03-01 02:34:46 +13:00
Joshua Leung
ac30378e3e Action Editor: Stash Action Operator
This operator (the snowflake icon, beside the pushdown button on the Action Editor
header) adds the currently active action to the NLA stack in a muted track, then
creates + loads a new action ready to be populated with new keyframes.
Since the NLA is being used to hang on to all the actions here, no actions are
getting lost.

Usage Notes (there will be some additional tweaks to make this nicer):
* To preview different actions that have been "stashed", simply click the "Solo"
  toggle for the track containing the action in question. Playing back the NLA will
  now show the stashed track
* To edit a previously stashed action - simply enter tweakmode on it in the NLA
  while the "Solo" toggle is enabled.

Todo:
* Add some more operators here to polish up the Action <-> NLA bridge to make the
  layered and stash workflows smoother. Examples include some tools to easily
  switch between the different actions layers in the stack, as well as making it
  easier to get out of tweakmode (and sync up the action lengths)

* Review and cleanup the behaviour of the "new" operator here to avoid the old
  problems that users were running into

* After the next release - Implement the full Action Libraries functionality, with
  ways to bridge the stashed strips over to a full-blown library.
2015-03-01 02:34:44 +13:00
Joshua Leung
b28a24091f Action Editor: Added "Push Down" operator to send the current action on to the NLA Stack
This commit exposes the "Push Down" button/functionality found in the NLA Editor
to the Action Editor, so that actions can be added NLA Stack from here too. The
main point of this for now is to make the whole layered-animation workflow nicer
more efficient, but not requiring the second editor be visible in common cases.
It also conveniently sets things up for the next few changes (already hinted at
here)...
2015-03-01 02:34:41 +13: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
Campbell Barton
7095f47665 cleanup: pep8
also remove empty class parenthesis
2015-01-29 15:35:06 +11: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
14b951747f Grease Pencil - Storyboarding Features (merge from GPencil_EditStrokes branch)
This merge-commit brings in a number of new features and workflow/UI improvements for
working with Grease Pencil. While these were originally targetted at improving
the workflow for creating 3D storyboards in Blender using the Grease Pencil,
many of these changes should also prove useful in other workflows too.

The main highlights here are:
1) It is now possible to edit Grease Pencil strokes
   - Use D Tab, or toggle the "Enable Editing" toggles in the Toolbar/Properties regions
     to enter "Stroke Edit Mode". In this mode, many common editing tools will
     operate on Grease Pencil stroke points instead.
   - Tools implemented include Select, Select All/Border/Circle/Linked/More/Less,
     Grab, Rotate, Scale, Bend, Shear, To Sphere, Mirror, Duplicate, Delete.
   - Proportional Editing works when using the transform tools

2) Grease Pencil stroke settings can now be animated
   NOTE: Currently drivers don't work, but if time allows, this may still be
         added before the release.

3) Strokes can be drawn with "filled" interiors, using a separate set of
   colour/opacity settings to the ones used for the lines themselves.

   This makes use of OpenGL filled polys, which has the limitation of only
   being able to fill convex shapes. Some artifacts may be visible on concave
   shapes (e.g. pacman's mouth will be overdrawn)

4) "Volumetric Strokes" - An alternative drawing technique for stroke drawing
   has been added which draws strokes as a series of screen-aligned discs.

   While this was originally a partial experimental technique at getting better
   quality 3D lines, the effects possible using this technique were interesting
   enough to warrant making this a dedicated feature. Best results when partial
   opacity and large stroke widths are used.

5) Improved Onion Skinning Support
   - Different colours can be selected for the before/after ghosts. To do so,
     enable the "colour wheel" toggle beside the Onion Skinning toggle, and set
     the colours accordingly.
   - Different numbers of ghosts can be shown before/after the current frame

6) Grease Pencil datablocks are now attached to the scene by default instead of
   the active object.
   - For a long time, the object-attachment has proved to be quite problematic
     for users to keep track of. Now that this is done at scene level, it is
     easier for most users to use.
   - An exception for old files (and for any addons which may benefit from object
     attachment instead), is that if the active object has a Grease Pencil datablock,
     that will be used instead.
   - It is not currently possible to choose object-attachment from the UI, but
     it is simple to do this from the console instead, by doing:
     context.active_object.grease_pencil = bpy.data.grease_pencil["blah"]

7) Various UI Cleanups
   - The layers UI has been cleaned up to use a list instead of the nested-panels
     design. Apart from saving space, this is also much nicer to look at now.

   - The UI code is now all defined in Python. To support this, it has been necessary
     to add some new context properties to make it easier to access these settings.
     e.g. "gpencil_data" for the datablock
          "active_gpencil_layer" and "active_gpencil_frame" for active data,
          "editable_gpencil_strokes" for the strokes that can be edited

   - The "stroke placement/alignment" settings (previously "Drawing Settings" at the
     bottom of the Grease Pencil panel in the Properties Region) is now located in
     the toolbar. These were more toolsettings than properties for how GPencil got drawn.

   - "Use Sketching Sessions" has been renamed "Continuous Drawing", as per a
     suggestion for an earlier discussion on developer.blender.org

   - By default, the painting operator will wait for a mouse button to be pressed
     before it starts creating the stroke. This is to make it easier to include
     this operator in various toolbars/menus/etc.   To get it immediately starting
     (as when you hold down DKEy to draw), set "wait_for_input" to False.

   - GPencil Layers can be rearranged in the "Grease Pencil" mode of the Action Editor

   - Toolbar panels have been added to all the other editors which support these.

8) Pie menus for quick-access to tools
   A set of experimental pie menus has been included for quick access to many
   tools and settings. It is not necessary to use these to get things done,
   but they have been designed to help make certain common tasks easier.

   - Ctrl-D = The main pie menu. Reveals tools in a context sensitive and
              spatially stable manner.
   - D Q    = "Quick Settings" pie. This allows quick access to the active
              layer's settings. Notably, colours, thickness, and turning
              onion skinning on/off.
2014-12-01 01:52:06 +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
b245d3577a View2d: bring back 2.4x option to lock time for 2d views 2014-05-01 14:49:47 +10: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
Tamito Kajiyama
e9182c1176 Fix for missing filter button to visualize/hide animation data related to line styles. 2013-09-03 22:50:58 +00:00
Joshua Leung
6f2e36f4ee Bugfix [#35643] Animated textures are invisible in Graph Editor if it is not
linked via material

Textures linked to modifiers are now shown in the AnimEditor channel hierarchy
under object level now (i.e. on same level as ob-data, shapekeys, and object's
action). This makes it possible to edit such animation data without having to
ensure that these textures are also linked to the object's material so that they
will appear.

As a side-effect of how this is implemented, if playback is slower on scenes
following this commit, disable the "modifier" filter under the filtering
settings in the relevant animation editor header. In particular, it may be
beneficial to disable this when you've got scenes with meshes that have many
modifiers (but none of these have any linked data with settings which can be
animated), as Blender will still try to go through all those modifiers checking
for anything to show.
2013-06-10 04:39:05 +00:00
Campbell Barton
34f3dc43e7 code cleanup: pep8 & minor changes 2013-03-11 02:19:58 +00:00
Joshua Leung
11dbadb442 Feature Request: "Show Errors" Filter for Anim Editors now works for
F-Curves/Animation as well as Drivers

This is useful for tracking down invalid F-Curves which might need to have their
paths fixed, or perhaps to remove F-Curves for controls which no longer exist in
a new rig.
2013-03-06 00:56:58 +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
Campbell Barton
97d62f0183 style cleanup 2013-01-15 23:15:32 +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
cc8c0d89e3 Graph Editor: Added a filtering option for Drivers mode to only show F-Curves
with errors

This filtering option is useful when rigging and you want to figure out if any
of your drivers are not functioning, and/or which one(s) are not, so that you
can go through fixing them. It saves you from having to check on each one
individually, or going into the console to try to infer which ones are not
working.
2012-10-10 08:46:07 +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
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
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
Campbell Barton
b20c9b0ba3 minor edits, pep8 - also correct float -> double promotion for blf. 2011-08-30 10:49:58 +00:00
Joerg Mueller
f0d5abfcb2 Merging trunk up to r39637. 2011-08-22 20:31:46 +00:00
Campbell Barton
1324173e99 pep8 edits and change '!= None' to 'is not None' 2011-08-22 09:01:49 +00:00
Joshua Leung
a594196dc0 Bugfix: "Filters" toggle was being shown in Action Editor too, where
it was irrelevant
2011-08-22 02:30:43 +00:00
Joshua Leung
06ae5e4825 Reshuffling DopeSheet filter icons so that they appear more obviously
related to each other
2011-08-22 02:14:39 +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
Joerg Mueller
3e85ec432e 3D Audio GSoC:
Adds new speaker object type.

Notes:
* Needs some nice icons
* Quickily review by Joshua Leung (5 mins)
* Properties UI updated (with help of Thomans Dinges)
* Speakers have their own theme color
* No real audio functionality yet.
* Minor bug regarding lamps/lattices fixed in interface_templates.c

I personality tested:
* Creation, Deletion, Duplication
* Saving, Loading
* Library linking (incl. make local)
* Tracking
* Dope Sheet, Outliner
* Animation
* Drawing (incl. Theme)
2011-08-01 11:44:20 +00:00
Xiao Xiangquan
470a5017fb complete space outliner, space node, space nla, etc. 2011-07-13 14:41:12 +00:00
Joshua Leung
fa78d3271f Bugfix: DopeSheet + Graph Editors were referring to wrong operator for
their "Duplicate Keys" menu entry
2011-07-13 12:02:39 +00:00
Joshua Leung
8d4ea1b155 Tweak to the toggle to show/hide datablock filtering items in
animedit headers
2011-06-30 01:13:15 +00:00
Joshua Leung
2710c567b9 Animation Editors - Small Visual Tweaks for Usability
== Datablock filters in the headers are now hidden by default ==
This has been done because users were generally not frequently
toggling these, so quick access vs screen-estate cost wasn't really
worth it to have these always showing and taking up space on the
header.

Usage notes:
- To show these again, click on the "Filter more..." toggle.
- The "Filter more..." button DOES NOT affect whether those filters
apply.

Design notes:
- I tried many other button/icon combinations, but those were either
too space-hogging, vague, or had wrong button order.
- I also tried putting a box around these, but there was too much
padding.
- The ordering of the filters has also been modified a bit so that the
group/fcurve-name filters occur earlier in the list, given that
they're used more frequently

== Graph Editor - Use Fancy Drawing ==
Renamed this option to "Use High Quality Drawing" as suggested by
Matt. "Fancy" isn't really descriptive enough.

== Icons for Mode Dropdowns ==
The mode dropdowns in the DopeSheet and Graph Editors now have icons.
- These were important enough (compared to the auto-snap mode) that
some visual decoration was perhaps warranted.
- It makes it easier to see at a glance what mode the view is in

Icon choices:
- In some cases, the icons seem like quite a natural fit IMO (i.e.
outliner<->dopesheet, key<->shapekey editor, grease pencil, fcurve
editor)
- Action Editor uses an "object" icon to indicate that this is object-
level only for now (though I hope to find a way to address this
soon/later). This will be kept like this until then.
- There isn't any icon for drivers, so after trying a few
alternatives, I settled on area-link icon, since it ties together two
entities using some link.
2011-06-29 13:00:19 +00:00
Campbell Barton
162d02bf50 quiet warning & minor pep8 edits. 2011-04-04 22:42:43 +00:00
Campbell Barton
265cdf29fb fix [#26754] Live Edit and Editing UI scripts don't work 2011-04-04 10:13:04 +00:00
Joshua Leung
2bd22ec559 Animation Editors: Name-based filtering
I'm finally yielding to months of feature requesting, and adding
support for filtering F-Curves by name, where the "name" here is the
text which is displayed for each F-Curve in the Animation Editor
channel lists.

To use, just enable the magnifying-glass toggle on the DopeSheet
filtering settings, and enter a snippet of text to find within the
names of channels you wish to filter. This is case insensitive, and
currently doesn't support any wildcard/regrex fanciness.

Some examples:
loc  <--- location curves only
x loc <--- x location curves only
x eul <--- x rotation curves only
rot <--- rotation curves only
etc.
2011-04-01 12:21:41 +00:00
Campbell Barton
2e6a02438e move script directories for internal blender scripts.
ui/ --> startup/bl_ui
op/ --> startup/bl_operators

scripts/startup/ is now the only auto-loading script dir which gives some speedup for blender loading too.

~/.blender/2.56/scripts/startup works for auto-loading scripts too.
2011-03-21 12:35:49 +00:00