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,095 Lines • ▼ Show 20 Lines | static void rna_EditMesh_update(bContext *C, PointerRNA *UNUSED(ptr)) | ||||
| } | } | ||||
| } | } | ||||
| static char *rna_MeshStatVis_path(PointerRNA *UNUSED(ptr)) | static char *rna_MeshStatVis_path(PointerRNA *UNUSED(ptr)) | ||||
| { | { | ||||
| return BLI_strdup("tool_settings.statvis"); | return BLI_strdup("tool_settings.statvis"); | ||||
| } | } | ||||
| static char *rna_RetopologySettings_path(PointerRNA *UNUSED(ptr)) | |||||
| { | |||||
| return BLI_strdup("tool_settings.retopology"); | |||||
| } | |||||
| /* note: without this, when Multi-Paint is activated/deactivated, the colors | /* note: without this, when Multi-Paint is activated/deactivated, the colors | ||||
| * will not change right away when multiple bones are selected, this function | * will not change right away when multiple bones are selected, this function | ||||
| * is not for general use and only for the few cases where changing scene | * is not for general use and only for the few cases where changing scene | ||||
| * settings and NOT for general purpose updates, possibly this should be | * settings and NOT for general purpose updates, possibly this should be | ||||
| * given its own notifier. */ | * given its own notifier. */ | ||||
| static void rna_Scene_update_active_object_data(bContext *C, PointerRNA *UNUSED(ptr)) | static void rna_Scene_update_active_object_data(bContext *C, PointerRNA *UNUSED(ptr)) | ||||
| { | { | ||||
| ViewLayer *view_layer = CTX_data_view_layer(C); | ViewLayer *view_layer = CTX_data_view_layer(C); | ||||
| ▲ Show 20 Lines • Show All 1,210 Lines • ▼ Show 20 Lines | static void rna_def_tool_settings(BlenderRNA *brna) | ||||
| RNA_def_property_ui_text(prop, "Curve Paint Settings", NULL); | RNA_def_property_ui_text(prop, "Curve Paint Settings", NULL); | ||||
| /* Mesh Statistics */ | /* Mesh Statistics */ | ||||
| prop = RNA_def_property(srna, "statvis", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "statvis", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_flag(prop, PROP_NEVER_NULL); | RNA_def_property_flag(prop, PROP_NEVER_NULL); | ||||
| RNA_def_property_struct_type(prop, "MeshStatVis"); | RNA_def_property_struct_type(prop, "MeshStatVis"); | ||||
| RNA_def_property_ui_text(prop, "Mesh Statistics Visualization", NULL); | RNA_def_property_ui_text(prop, "Mesh Statistics Visualization", NULL); | ||||
| /* Retopology */ | |||||
| prop = RNA_def_property(srna, "retopology", PROP_POINTER, PROP_NONE); | |||||
| RNA_def_property_flag(prop, PROP_NEVER_NULL); | |||||
| RNA_def_property_struct_type(prop, "RetopologySettings"); | |||||
| RNA_def_property_ui_text(prop, "Retopology", NULL); | |||||
| /* CurveProfile */ | /* CurveProfile */ | ||||
| prop = RNA_def_property(srna, "custom_bevel_profile_preset", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "custom_bevel_profile_preset", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "custom_bevel_profile_preset"); | RNA_def_property_pointer_sdna(prop, NULL, "custom_bevel_profile_preset"); | ||||
| RNA_def_property_struct_type(prop, "CurveProfile"); | RNA_def_property_struct_type(prop, "CurveProfile"); | ||||
| RNA_def_property_ui_text(prop, "Curve Profile Widget", "Used for defining a profile's path"); | RNA_def_property_ui_text(prop, "Curve Profile Widget", "Used for defining a profile's path"); | ||||
| } | } | ||||
| static void rna_def_unified_paint_settings(BlenderRNA *brna) | static void rna_def_unified_paint_settings(BlenderRNA *brna) | ||||
| ▲ Show 20 Lines • Show All 317 Lines • ▼ Show 20 Lines | static void rna_def_statvis(BlenderRNA *brna) | ||||
| RNA_def_property_float_sdna(prop, NULL, "sharp_max"); | RNA_def_property_float_sdna(prop, NULL, "sharp_max"); | ||||
| RNA_def_property_range(prop, -DEG2RADF(180.0f), DEG2RADF(180.0f)); | RNA_def_property_range(prop, -DEG2RADF(180.0f), DEG2RADF(180.0f)); | ||||
| RNA_def_property_ui_range(prop, -DEG2RADF(180.0f), DEG2RADF(180.0f), 10, 3); | RNA_def_property_ui_range(prop, -DEG2RADF(180.0f), DEG2RADF(180.0f), 10, 3); | ||||
| RNA_def_property_ui_text(prop, "Distort Max", "Maximum angle to display"); | RNA_def_property_ui_text(prop, "Distort Max", "Maximum angle to display"); | ||||
| RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); | RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); | ||||
| RNA_def_property_update(prop, 0, "rna_EditMesh_update"); | RNA_def_property_update(prop, 0, "rna_EditMesh_update"); | ||||
| } | } | ||||
| static void rna_def_retopology_settings(BlenderRNA *brna) | |||||
| { | |||||
| StructRNA *srna; | |||||
| PropertyRNA *prop; | |||||
| srna = RNA_def_struct(brna, "RetopologySettings", NULL); | |||||
| RNA_def_struct_path_func(srna, "rna_RetopologySettings_path"); | |||||
| RNA_def_struct_ui_text(srna, "Retopology Settings", ""); | |||||
| prop = RNA_def_property(srna, "show_faces", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", RETOPOLOGY_OVERLAY_FILL_FACES); | |||||
| RNA_def_property_ui_text(prop, "Show Faces", "Display the faces"); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | |||||
| prop = RNA_def_property(srna, "depth_mix_factor", PROP_FLOAT, PROP_FACTOR); | |||||
| RNA_def_property_float_sdna(prop, NULL, "depth_mix_factor"); | |||||
| RNA_def_property_ui_text( | |||||
| prop, | |||||
| "Depth Mix Factor", | |||||
| "Factor for mixing the back end front depth. Use to remove drawing artifacts"); | |||||
jbakker: Use this to remove drawing artifacts | |||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | |||||
| } | |||||
| static void rna_def_unit_settings(BlenderRNA *brna) | static void rna_def_unit_settings(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| static const EnumPropertyItem unit_systems[] = { | static const EnumPropertyItem unit_systems[] = { | ||||
| {USER_UNIT_NONE, "NONE", 0, "None", ""}, | {USER_UNIT_NONE, "NONE", 0, "None", ""}, | ||||
| {USER_UNIT_METRIC, "METRIC", 0, "Metric", ""}, | {USER_UNIT_METRIC, "METRIC", 0, "Metric", ""}, | ||||
| ▲ Show 20 Lines • Show All 3,819 Lines • ▼ Show 20 Lines | # endif | ||||
| /* Nestled Data */ | /* Nestled Data */ | ||||
| /* *** Non-Animated *** */ | /* *** Non-Animated *** */ | ||||
| RNA_define_animate_sdna(false); | RNA_define_animate_sdna(false); | ||||
| rna_def_tool_settings(brna); | rna_def_tool_settings(brna); | ||||
| rna_def_gpencil_interpolate(brna); | rna_def_gpencil_interpolate(brna); | ||||
| rna_def_unified_paint_settings(brna); | rna_def_unified_paint_settings(brna); | ||||
| rna_def_curve_paint_settings(brna); | rna_def_curve_paint_settings(brna); | ||||
| rna_def_statvis(brna); | rna_def_statvis(brna); | ||||
| rna_def_retopology_settings(brna); | |||||
| rna_def_unit_settings(brna); | rna_def_unit_settings(brna); | ||||
| rna_def_scene_image_format_data(brna); | rna_def_scene_image_format_data(brna); | ||||
| rna_def_transform_orientation(brna); | rna_def_transform_orientation(brna); | ||||
| rna_def_transform_orientation_slot(brna); | rna_def_transform_orientation_slot(brna); | ||||
| rna_def_view3d_cursor(brna); | rna_def_view3d_cursor(brna); | ||||
| rna_def_selected_uv_element(brna); | rna_def_selected_uv_element(brna); | ||||
| rna_def_display_safe_areas(brna); | rna_def_display_safe_areas(brna); | ||||
| rna_def_scene_display(brna); | rna_def_scene_display(brna); | ||||
| Show All 11 Lines | |||||
Use this to remove drawing artifacts