Fix T58771: Wrong path to Unit Settings
authorJacques Lucke <mail@jlucke.com>
Wed, 5 Dec 2018 10:25:39 +0000 (11:25 +0100)
committerJacques Lucke <mail@jlucke.com>
Wed, 5 Dec 2018 10:26:01 +0000 (11:26 +0100)
Reviewers: brecht

Differential Revision: https://developer.blender.org/D4034

source/blender/makesrna/intern/rna_scene.c

index 3e3e08459caea4bc5be01fe6eb75df48739ec24f..9d6419ae3bee299b657a4446f81c95e0780bd4ef 100644 (file)
@@ -2088,6 +2088,11 @@ static void rna_unit_system_update(Main *UNUSED(bmain), Scene *scene, PointerRNA
        }
 }
 
+static char *rna_UnitSettings_path(PointerRNA *UNUSED(ptr))
+{
+       return BLI_sprintfN("unit_settings");
+}
+
 #else
 
 /* Grease Pencil Interpolation tool settings */
@@ -3015,6 +3020,8 @@ static void rna_def_unit_settings(BlenderRNA *brna)
 
        srna = RNA_def_struct(brna, "UnitSettings", NULL);
        RNA_def_struct_ui_text(srna, "Unit Settings", "");
+       RNA_def_struct_nested(brna, srna, "Scene");
+       RNA_def_struct_path_func(srna, "rna_UnitSettings_path");
 
        /* Units */
        prop = RNA_def_property(srna, "system", PROP_ENUM, PROP_NONE);