Animation: Move Graph Editor settings to User Preferences #104532

Merged
Christoph Lendenfeld merged 14 commits from ChrisLend/blender:user_pref_only_selected_keys into main 2023-03-09 14:15:36 +07:00

Move two settings that were previously in the "View" menu of the Graph Editor into User Preferences.

It has been mentioned in the meeting by Luciano Muñoz Sessarego that it would be good to move that to the preferences so you can set it once and then forget about it.

The Settings moved are:

Only Selected Curve Keyframes
Use High Quality Display

before
before

after
image


archived phabricator patch

https://archive.blender.org/developer/D17126

Move two settings that were previously in the "View" menu of the Graph Editor into User Preferences. It has been mentioned in the meeting by Luciano Muñoz Sessarego that it would be good to move that to the preferences so you can set it once and then forget about it. The Settings moved are: Only Selected Curve Keyframes Use High Quality Display before ![before](https://projects.blender.org/attachments/7e6837b9-c1fd-4529-aa1a-014c852402de) after ![image](/attachments/ce1f6a1f-496a-44a8-9d07-59b7a3e8040a) ----- archived phabricator patch https://archive.blender.org/developer/D17126
Christoph Lendenfeld added the
Module
Animation & Rigging
label 2023-02-09 17:58:14 +07:00
Christoph Lendenfeld requested review from Sybren A. Stüvel 2023-02-09 18:01:19 +07:00
Christoph Lendenfeld requested review from Luciano Muñoz Sessarego 2023-02-10 12:07:03 +07:00
Brecht Van Lommel added this to the Animation & Rigging project 2023-02-13 09:13:10 +07:00
Sybren A. Stüvel approved these changes 2023-02-14 15:12:29 +07:00
Sybren A. Stüvel left a comment
Collaborator

The code LGTM. I'll defer the final verdict to @LucianoMunoz (or some other animator if they want to step in).

The code LGTM. I'll defer the final verdict to @LucianoMunoz (or some other animator if they want to step in).

Hey thanks for trying to address this issue,

The thing is you only need to move the "only selected curve keyframes" to the preferences and keep "only selected keyframe handles" in the original menu.
Here is why the first one is a permanent option that users either like or not on a forever basis, as in way of working, while the latter is more of a sporadic option that users will want to turn on and off depending on what their doing in the moment just like turning on and off a particular curve.

On the other hand "use high quality display" is an other good candidate to move to preferences as per the same reasons.

Hope that makes sense.

Hey thanks for trying to address this issue, The thing is you only need to move the "only selected curve keyframes" to the preferences and keep "only selected keyframe handles" in the original menu. Here is why the first one is a permanent option that users either like or not on a forever basis, as in way of working, while the latter is more of a sporadic option that users will want to turn on and off depending on what their doing in the moment just like turning on and off a particular curve. On the other hand "use high quality display" is an other good candidate to move to preferences as per the same reasons. Hope that makes sense.

The Settings moved are:

Only Selected Curve Keyframes

There's a bit of leftover plural in the title & description. Those can be left as-is, when we follow @Looch 's suggestion to also move "use high quality display" to the preferences.

> The Settings moved are: > > Only Selected Curve Keyframes There's a bit of leftover plural in the title & description. Those can be left as-is, when we follow @Looch 's suggestion to also move "use high quality display" to the preferences.
Poster
Collaborator

@dr.sybren I also moved high quality drawing into user prefs in this PR

It should be enabled by default, but I am unsure if that is working. I can reset it to default which enables it. But starting my Blender it is always disabled.
I am not sure if that is just because i've been developing and it is now saved as off, or if new user properties are always off

@dr.sybren I also moved high quality drawing into user prefs in this PR It should be enabled by default, but I am unsure if that is working. I can reset it to default which enables it. But starting my Blender it is always disabled. I am not sure if that is just because i've been developing and it is now saved as off, or if new user properties are always off
Christoph Lendenfeld requested review from Sybren A. Stüvel 2023-02-24 16:16:08 +07:00
Sybren A. Stüvel requested changes 2023-02-27 17:41:17 +07:00
Sybren A. Stüvel left a comment
Collaborator

You're almost there. The last step is to add versioning code for the user preferences. The thing is that new properties apparently don't get set to the default value automatically. This needs a bit of code in blo_do_versions_userdef(), in versioning_userdef.c.

The defaults are used when you start Blender with --factory-startup, though, so they need to be set anyway.

You're almost there. The last step is to add versioning code for the user preferences. The thing is that new properties apparently don't get set to the default value automatically. This needs a bit of code in `blo_do_versions_userdef()`, in `versioning_userdef.c`. The defaults are used when you start Blender with `--factory-startup`, though, so they need to be set anyway.
Christoph Lendenfeld requested review from Sybren A. Stüvel 2023-03-02 13:28:12 +07:00
Poster
Collaborator

I've added the versioning code, assuming it goes into the curly braces at the bottom

I've added the versioning code, assuming it goes into the curly braces at the bottom
Sybren A. Stüvel approved these changes 2023-03-03 15:19:37 +07:00
Sybren A. Stüvel left a comment
Collaborator

I've added the versioning code, assuming it goes into the curly braces at the bottom

Yup, that's where it goes until there is a sub-version bump. In this case we have to do that bump, since there is no other way. Sometimes you can use DNA_struct_elem_find() to see if the struct already a specific field when it was saved or not. Since this doesn't add any new fields, that's not something we can do, so the only way is to bump. Before you land the PR:

  • increase BLENDER_FILE_SUBVERSION by one, and
  • wrap userdef->animation_flag |= USER_ANIM_HIGH_QUALITY_DRAWING; with an if (!USER_VERSION_ATLEAST(306, 2)) { and move it above that "new stuff goes here" block.
> I've added the versioning code, assuming it goes into the curly braces at the bottom Yup, that's where it goes until there is a sub-version bump. In this case we have to do that bump, since there is no other way. Sometimes you can use `DNA_struct_elem_find()` to see if the struct already a specific field when it was saved or not. Since this doesn't add any new fields, that's not something we can do, so the only way is to bump. Before you land the PR: - increase `BLENDER_FILE_SUBVERSION` by one, and - wrap `userdef->animation_flag |= USER_ANIM_HIGH_QUALITY_DRAWING;` with an `if (!USER_VERSION_ATLEAST(306, 2)) {` and move it above that "new stuff goes here" block.
Pablo Vazquez reviewed 2023-03-03 15:28:49 +07:00
@ -5173,0 +5183,4 @@
prop = RNA_def_property(srna, "fcurve_high_quality_drawing", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "animation_flag", USER_ANIM_HIGH_QUALITY_DRAWING);
RNA_def_property_ui_text(prop,
"FCurve High Quality Display",

FCurve is missing a hyphen, it's F-Curve.

`FCurve` is missing a hyphen, it's `F-Curve`.
Poster
Collaborator

fixed it, thanks :)

fixed it, thanks :)
pablovazquez marked this conversation as resolved
Christoph Lendenfeld requested review from Pablo Vazquez 2023-03-03 17:07:10 +07:00
Pablo Vazquez approved these changes 2023-03-07 15:42:44 +07:00
Poster
Collaborator

@dr.sybren can you have a quick look over the versioning code to check if I did the changes correctly

@dr.sybren can you have a quick look over the versioning code to check if I did the changes correctly

Yeah that looks good!

Yeah that looks good!
Christoph Lendenfeld merged commit 3b900048f1 into main 2023-03-09 14:15:36 +07:00
Christoph Lendenfeld deleted branch user_pref_only_selected_keys 2023-03-09 14:15:37 +07:00
Sybren A. Stüvel removed this from the Animation & Rigging project 2023-03-14 10:51:09 +07:00

Reviewers

Luciano Muñoz Sessarego was requested for review 2023-02-10 12:07:03 +07:00
Sybren A. Stüvel approved these changes 2023-03-03 15:19:37 +07:00
Pablo Vazquez approved these changes 2023-03-07 15:42:44 +07:00
The pull request has been merged as 3b900048f1.
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
Eevee & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest/Import
Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest: Wayland
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
Eevee & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
4 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#104532
There is no content yet.