Defaults: change default settings in a few editors

* Timeline has summary collapsed to show only one row of keyframes.
* Cavity default is screen space curvature (faster).
* Scripting workspace text editor uses syntax highlight and line numbers.
* Marker lines enabled by default in all animation editors.
* Movie clip editor pivot point default to median.

Ref T63986.
This commit is contained in:
Brecht Van Lommel 2019-05-08 18:08:35 +02:00
parent 275218b205
commit c358da6b21
Notes: blender-bot 2023-02-14 06:49:57 +01:00
Referenced by issue #64326, Screw modifier on curves crash Blender 2.80
Referenced by issue #64329, Crash when switching to UVEditing or Texture Paint
Referenced by issue #64330, Texture paint workspace crash.
Referenced by issue #63986, Startup blend & default Workspaces tweaks
6 changed files with 39 additions and 9 deletions

View File

@ -859,6 +859,7 @@ void BKE_screen_view3d_shading_init(View3DShading *shading)
shading->xray_alpha_wire = 0.5f;
shading->cavity_valley_factor = 1.0f;
shading->cavity_ridge_factor = 1.0f;
shading->cavity_type = V3D_SHADING_CAVITY_CURVATURE;
shading->curvature_ridge_factor = 1.0f;
shading->curvature_valley_factor = 1.0f;
copy_v3_fl(shading->single_color, 0.8f);

View File

@ -281,17 +281,45 @@ void BLO_update_defaults_startup_blend(Main *bmain, const char *app_template)
}
for (bScreen *screen = bmain->screens.first; screen; screen = screen->id.next) {
/* Hide channels in timelines. */
for (ScrArea *sa = screen->areabase.first; sa; sa = sa->next) {
SpaceAction *saction = (sa->spacetype == SPACE_ACTION) ? sa->spacedata.first : NULL;
if (sa->spacetype == SPACE_ACTION) {
/* Show marker lines, hide channels and collapse summary in timelines. */
SpaceAction *saction = sa->spacedata.first;
saction->flag |= SACTION_SHOW_MARKER_LINES;
if (saction && saction->mode == SACTCONT_TIMELINE) {
for (ARegion *ar = sa->regionbase.first; ar; ar = ar->next) {
if (ar->regiontype == RGN_TYPE_CHANNELS) {
ar->flag |= RGN_FLAG_HIDDEN;
if (saction->mode == SACTCONT_TIMELINE) {
saction->ads.flag |= ADS_FLAG_SUMMARY_COLLAPSED;
for (ARegion *ar = sa->regionbase.first; ar; ar = ar->next) {
if (ar->regiontype == RGN_TYPE_CHANNELS) {
ar->flag |= RGN_FLAG_HIDDEN;
}
}
}
}
else if (sa->spacetype == SPACE_GRAPH) {
SpaceGraph *sipo = sa->spacedata.first;
sipo->flag |= SIPO_MARKER_LINES;
}
else if (sa->spacetype == SPACE_NLA) {
SpaceNla *snla = sa->spacedata.first;
snla->flag |= SNLA_SHOW_MARKER_LINES;
}
else if (sa->spacetype == SPACE_TEXT) {
/* Show syntax and line numbers in Script workspace text editor. */
SpaceText *stext = sa->spacedata.first;
stext->showsyntax = true;
stext->showlinenrs = true;
}
else if (sa->spacetype == SPACE_VIEW3D) {
/* Screen space cavity by default for faster performance. */
View3D *v3d = sa->spacedata.first;
v3d->shading.cavity_type = V3D_SHADING_CAVITY_CURVATURE;
}
else if (sa->spacetype == SPACE_CLIP) {
SpaceClip *sclip = sa->spacedata.first;
sclip->around = V3D_AROUND_CENTER_MEDIAN;
}
}
}

View File

@ -71,7 +71,7 @@ static SpaceLink *action_new(const ScrArea *sa, const Scene *scene)
saction->autosnap = SACTSNAP_FRAME;
saction->mode = SACTCONT_DOPESHEET;
saction->mode_prev = SACTCONT_DOPESHEET;
saction->flag = SACTION_SHOW_INTERPOLATION;
saction->flag = SACTION_SHOW_INTERPOLATION | SACTION_SHOW_MARKER_LINES;
saction->ads.filterflag |= ADS_FILTER_SUMMARY;

View File

@ -250,7 +250,7 @@ static SpaceLink *clip_new(const ScrArea *sa, const Scene *scene)
sc->zoom = 1.0f;
sc->path_length = 20;
sc->scopes.track_preview_height = 120;
sc->around = V3D_AROUND_LOCAL_ORIGINS;
sc->around = V3D_AROUND_CENTER_MEDIAN;
/* header */
ar = MEM_callocN(sizeof(ARegion), "header for clip");

View File

@ -81,7 +81,7 @@ static SpaceLink *graph_new(const ScrArea *UNUSED(sa), const Scene *scene)
/* settings for making it easier by default to just see what you're interested in tweaking */
sipo->ads->filterflag |= ADS_FILTER_ONLYSEL;
sipo->flag |= SIPO_SELVHANDLESONLY;
sipo->flag |= SIPO_SELVHANDLESONLY | SIPO_MARKER_LINES;
/* header */
ar = MEM_callocN(sizeof(ARegion), "header for graphedit");

View File

@ -70,6 +70,7 @@ static SpaceLink *nla_new(const ScrArea *sa, const Scene *scene)
/* set auto-snapping settings */
snla->autosnap = SACTSNAP_FRAME;
snla->flag = SNLA_SHOW_MARKER_LINES;
/* header */
ar = MEM_callocN(sizeof(ARegion), "header for nla");