Page MenuHome

Cleanup: split templates into multiple files
Needs ReviewPublic

Authored by Campbell Barton (campbellbarton) on May 4 2020, 5:49 AM.
This revision needs review, but there are no reviewers specified.

Details

Reviewers
None
Summary

This splits up interface_templates.c (currently 8463 lines) into multiple files.

  • interface_template_color_picker.c
  • interface_template_color_ramp.c
  • interface_template_curve.c
  • interface_template_id.c
  • interface_template_layers.c
  • interface_template_list.c
  • interface_template_jobs.c
  • interface_template_operator_props.c
  • interface_template_preview.c
  • interface_template_search_common.c
  • interface_template_search_menu.c
  • interface_template_search_operator.c

interface_templates.c has been kept for smaller templates,
also kept modifiers since there is work on a branch that changes this area.


Main down side of this patch is that it splits logic across interface_template_id.c and interface_template_search_common.c which makes me not so keen to commit this.

  • ui_template_common_search_menu
  • ui_template_common_search_menu_add_button
  • UI_rna_update_cb
  • ui_search_has_word_prefix

These functions have been added to interface_intern.h.


Alternative approaches could be:

  • Keep interface_template_id.c & interface_template_search_common.c in interface_templates.c.
  • Move every template function into it's own file (even small functions), add a shared interface_templates_intern.h header - possibly in their own directory.

Diff Detail

Repository
rB Blender
Branch
TEMP-INTERFACE-TEMPLATES-SPLIT (branched from master)
Build Status
Buildable 7873
Build 7873: arc lint + arc unit