forked from bartvdbraak/blender
Quick Mango request: Adjustable contrast/intensity for unselected F-Curves in
Graph Editor Under User Preferences -> Editing, there's a new setting "F-Curve Visibility" which controls the how much F-Curves blend in with the background colour. Increasing this value makes F-Curves stand out more, at the expense of making it less obvious which F-Curve is active.
This commit is contained in:
parent
db37011930
commit
5cf739c2da
@ -304,6 +304,11 @@ class USERPREF_PT_edit(Panel):
|
||||
col.separator()
|
||||
col.label(text="Playback:")
|
||||
col.prop(edit, "use_negative_frames")
|
||||
col.separator()
|
||||
col.separator()
|
||||
col.separator()
|
||||
col.label(text="Animation Editors:")
|
||||
col.prop(edit, "fcurve_unselected_alpha", text="F-Curve Visibility")
|
||||
|
||||
row.separator()
|
||||
row.separator()
|
||||
|
@ -1203,6 +1203,10 @@ void init_userdef_do_versions(void)
|
||||
}
|
||||
if(U.pad_rot_angle==0)
|
||||
U.pad_rot_angle= 15;
|
||||
/* graph editor - unselected F-Curve visibility */
|
||||
if (U.fcu_inactive_alpha == 0) {
|
||||
U.fcu_inactive_alpha = 0.25f;
|
||||
}
|
||||
|
||||
/* signal for derivedmesh to use colorband */
|
||||
/* run in case this was on and is now off in the user prefs [#28096] */
|
||||
|
@ -48,6 +48,7 @@
|
||||
#include "DNA_screen_types.h"
|
||||
#include "DNA_space_types.h"
|
||||
#include "DNA_windowmanager_types.h"
|
||||
#include "DNA_userdef_types.h"
|
||||
|
||||
#include "BKE_context.h"
|
||||
#include "BKE_curve.h"
|
||||
@ -72,7 +73,7 @@
|
||||
* drawing components for some F-Curve (fcu)
|
||||
* - selected F-Curves should be more visible than partially visible ones
|
||||
*/
|
||||
#define drawFCurveFade(fcu) ( ((fcu)->flag & FCURVE_SELECTED)? 1.0f : 0.25f )
|
||||
#define drawFCurveFade(fcu) ( ((fcu)->flag & FCURVE_SELECTED)? 1.0f : U.fcu_inactive_alpha )
|
||||
|
||||
/* set the color for some point from some value given packed into an int
|
||||
* - intV: integer value containing color info packed into an int
|
||||
|
@ -422,6 +422,9 @@ typedef struct UserDef {
|
||||
|
||||
int compute_device_type;
|
||||
int compute_device_id;
|
||||
|
||||
float fcu_inactive_alpha; /* opacity of inactive F-Curves in F-Curve Editor */
|
||||
float pad;
|
||||
} UserDef;
|
||||
|
||||
extern UserDef U; /* from blenkernel blender.c */
|
||||
|
@ -2645,6 +2645,14 @@ static void rna_def_userdef_edit(BlenderRNA *brna)
|
||||
RNA_def_property_ui_text(prop, "Allow Negative Frames",
|
||||
"Current frame number can be manually set to a negative value");
|
||||
|
||||
/* fcurve opacity */
|
||||
prop = RNA_def_property(srna, "fcurve_unselected_alpha", PROP_FLOAT, PROP_FACTOR);
|
||||
RNA_def_property_float_sdna(prop, NULL, "fcu_inactive_alpha");
|
||||
RNA_def_property_range(prop, 0.001f, 1.0f);
|
||||
RNA_def_property_ui_text(prop, "Unselected F-Curve Visibility",
|
||||
"Amount that unselected F-Curves stand out from the background (Graph Editor)");
|
||||
RNA_def_property_update(prop, NC_SPACE|ND_SPACE_GRAPH, NULL);
|
||||
|
||||
/* grease pencil */
|
||||
prop = RNA_def_property(srna, "grease_pencil_manhattan_distance", PROP_INT, PROP_NONE);
|
||||
RNA_def_property_int_sdna(prop, NULL, "gp_manhattendist");
|
||||
|
Loading…
Reference in New Issue
Block a user