Logo   Home Table of Contents    News  Dev Blogs  Gallery  Timeline  Legend  Tags 
Join us on... 
Banner

Current: Month Day, Year

9.3 Target Category JSON file

target_cat.json defines the hierarchical structure of target categories displayed in the modeling UI. It organizes targets into groups and subgroups, making them easy to browse and discover. Together with modelling.json, these files control how targets appear in the user interface and how they behave when applied to the character model.

File Locations and loading order

Per mesh there might be 3 different target folders, they are scanned in the following order:
User constant targets <UserDataDir>/contarget/<basename>/target_cat.json This method is used to replace the read-only system-targets, this is used in case of a complete new base in the user folders (the system-targets are read-only. Especially when a mesh is downloaded as a packet. target_cat.json must be manually created.
Append user targets <SystemDir>/target/<basename>/target_cat.json Additional user target categories, which are added to either system-targets or constant targets. target_cat.json is auto-generated in this case it always starts with group "user". Don't add this manually; the auto-generation will overwrite it anyway.
System targets <SystemDir>/target/<basename>/target_cat.json System target categories are supplied from MakeHuman team by installation. target_cat.json is part of the installation.

<basename> is the base mesh identifier (e.g., hm08, mh2bot)

To conclude: If contarget/<basename>/target_cat.json exists, the system file is ignored. Otherwise, system file is scanned. The user entries are always added in the end.

File Format

{ "CategoryName": { "group": "group-identifier", "items": [ {"title": "Display Name", "cat": "internal-category-name"} ] } }

Example

{ "Main": { "group": "main", "items": [ {"title": "Macro", "cat": "macro"} ] }, "Face": { "group": "face", "items": [ {"title": "Head shape", "cat": "head shape"}, {"title": "Nose size", "cat": "nose size"}, {"title": "Nose features", "cat": "nose features"} ] }, "Torso": { "group": "torso", "items": [ {"title": "Shape", "cat": "shape"}, {"title": "Hip", "cat": "hip"}, {"title": "Stomach", "cat": "stomach"} ] } }

Property Reference

Basic Properties:

group

string

Top-Level Category. Internal group identifier used to link targets to this category.
items

array of subcategory objects

Top-Level Category. Each item represents a subcategory that can be selected to show related targets.
title

string

Display name shown in the UI
cat

string

Internal category identifier that matches the group field in modelling.json

Auto-Generated User Category Structure

When user targets are added to <UserDataDir>/target/, the system automatically:
  1. Scans the target folder for .target files
  2. Detects them by subfolder structure
  3. Generates target_cat.json and modelling.json in the user target folder
  4. Appends a "User" category to the system categories at run-time.
{ "User": { "group": "user", "items": [ {"title": "Subfolder1", "cat": "subfolder1"}, {"title": "Subfolder2", "cat": "subfolder2"}, {"title": "Unsorted", "cat": "unsorted"} ] } } Targets in subfolders are grouped by folder name; targets in the root target directory go into "Unsorted".

Summary

The target_cat.json and modelling.json files work together to create a complete target system: For most users, the automatic generation system handles everything - just add your .target files to the user directory and the system creates appropriate JSON entries. For advanced users creating custom base meshes, manual creation of these files in the `contarget` directory provides complete control over the target system.

Integration with other files

Modelling JSON modelling.json entries are referencing categories defined in target_cat.json. group field must match a category identifier
Format: "category|subcategory"
See: modelling.json for modelling definition