Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_scene.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 2,562 Lines • ▼ Show 20 Lines | const EnumPropertyItem *rna_UnitSettings_time_unit_itemf(bContext *UNUSED(C), | ||||
| PointerRNA *ptr, | PointerRNA *ptr, | ||||
| PropertyRNA *UNUSED(prop), | PropertyRNA *UNUSED(prop), | ||||
| bool *r_free) | bool *r_free) | ||||
| { | { | ||||
| UnitSettings *units = ptr->data; | UnitSettings *units = ptr->data; | ||||
| return rna_UnitSettings_itemf_wrapper(units->system, B_UNIT_TIME, r_free); | return rna_UnitSettings_itemf_wrapper(units->system, B_UNIT_TIME, r_free); | ||||
| } | } | ||||
| const EnumPropertyItem *rna_UnitSettings_temperature_unit_itemf(bContext *UNUSED(C), | |||||
| PointerRNA *ptr, | |||||
| PropertyRNA *UNUSED(prop), | |||||
| bool *r_free) | |||||
| { | |||||
| UnitSettings *units = ptr->data; | |||||
| return rna_UnitSettings_itemf_wrapper(units->system, B_UNIT_TEMPERATURE, r_free); | |||||
| } | |||||
| static void rna_UnitSettings_system_update(Main *UNUSED(bmain), | static void rna_UnitSettings_system_update(Main *UNUSED(bmain), | ||||
| Scene *scene, | Scene *scene, | ||||
| PointerRNA *UNUSED(ptr)) | PointerRNA *UNUSED(ptr)) | ||||
| { | { | ||||
| UnitSettings *unit = &scene->unit; | UnitSettings *unit = &scene->unit; | ||||
| if (unit->system == USER_UNIT_NONE) { | if (unit->system == USER_UNIT_NONE) { | ||||
| unit->length_unit = USER_UNIT_ADAPTIVE; | unit->length_unit = USER_UNIT_ADAPTIVE; | ||||
| unit->mass_unit = USER_UNIT_ADAPTIVE; | unit->mass_unit = USER_UNIT_ADAPTIVE; | ||||
| ▲ Show 20 Lines • Show All 1,316 Lines • ▼ Show 20 Lines | static void rna_def_unit_settings(BlenderRNA *brna) | ||||
| RNA_def_property_ui_text(prop, "Mass Unit", "Unit that will be used to display mass values"); | RNA_def_property_ui_text(prop, "Mass Unit", "Unit that will be used to display mass values"); | ||||
| RNA_def_property_update(prop, NC_WINDOW, NULL); | RNA_def_property_update(prop, NC_WINDOW, NULL); | ||||
| prop = RNA_def_property(srna, "time_unit", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "time_unit", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_items(prop, DummyRNA_DEFAULT_items); | RNA_def_property_enum_items(prop, DummyRNA_DEFAULT_items); | ||||
| RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_UnitSettings_time_unit_itemf"); | RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_UnitSettings_time_unit_itemf"); | ||||
| RNA_def_property_ui_text(prop, "Time Unit", "Unit that will be used to display time values"); | RNA_def_property_ui_text(prop, "Time Unit", "Unit that will be used to display time values"); | ||||
| RNA_def_property_update(prop, NC_WINDOW, NULL); | RNA_def_property_update(prop, NC_WINDOW, NULL); | ||||
| prop = RNA_def_property(srna, "temperature_unit", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_items(prop, DummyRNA_DEFAULT_items); | |||||
| RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_UnitSettings_temperature_unit_itemf"); | |||||
| RNA_def_property_ui_text( | |||||
| prop, "Temperature Unit", "Unit that will be used to display temperature values"); | |||||
| RNA_def_property_update(prop, NC_WINDOW, NULL); | |||||
| prop = RNA_def_property(srna, "temperature_test", PROP_FLOAT, PROP_TEMPERATURE); | |||||
| } | } | ||||
| static void rna_def_view_layer_eevee(BlenderRNA *brna) | static void rna_def_view_layer_eevee(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| srna = RNA_def_struct(brna, "ViewLayerEEVEE", NULL); | srna = RNA_def_struct(brna, "ViewLayerEEVEE", NULL); | ||||
| RNA_def_struct_ui_text(srna, "EEVEE Settings", "View layer settings for EEVEE"); | RNA_def_struct_ui_text(srna, "EEVEE Settings", "View layer settings for EEVEE"); | ||||
| ▲ Show 20 Lines • Show All 3,889 Lines • Show Last 20 Lines | |||||