Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_space.c
- This file is larger than 256 KB, so syntax highlighting is disabled by default.
| Show First 20 Lines • Show All 524 Lines • ▼ Show 20 Lines | static const EnumPropertyItem rna_enum_curve_display_handle_items[] = { | ||||
| {CURVE_HANDLE_NONE, "NONE", 0, "None", ""}, | {CURVE_HANDLE_NONE, "NONE", 0, "None", ""}, | ||||
| {CURVE_HANDLE_SELECTED, "SELECTED", 0, "Selected", ""}, | {CURVE_HANDLE_SELECTED, "SELECTED", 0, "Selected", ""}, | ||||
| {CURVE_HANDLE_ALL, "ALL", 0, "All", ""}, | {CURVE_HANDLE_ALL, "ALL", 0, "All", ""}, | ||||
| {0, NULL, 0, NULL, NULL}, | {0, NULL, 0, NULL, NULL}, | ||||
| }; | }; | ||||
| #ifdef RNA_RUNTIME | #ifdef RNA_RUNTIME | ||||
| # include "AS_asset_representation.h" | |||||
| # include "DNA_anim_types.h" | # include "DNA_anim_types.h" | ||||
| # include "DNA_asset_types.h" | # include "DNA_asset_types.h" | ||||
| # include "DNA_scene_types.h" | # include "DNA_scene_types.h" | ||||
| # include "DNA_screen_types.h" | # include "DNA_screen_types.h" | ||||
| # include "DNA_userdef_types.h" | # include "DNA_userdef_types.h" | ||||
| # include "BLI_path_util.h" | # include "BLI_path_util.h" | ||||
| # include "BLI_string.h" | # include "BLI_string.h" | ||||
| # include "BKE_anim_data.h" | # include "BKE_anim_data.h" | ||||
| # include "BKE_asset.h" | |||||
| # include "BKE_brush.h" | # include "BKE_brush.h" | ||||
| # include "BKE_colortools.h" | # include "BKE_colortools.h" | ||||
| # include "BKE_context.h" | # include "BKE_context.h" | ||||
| # include "BKE_global.h" | # include "BKE_global.h" | ||||
| # include "BKE_icons.h" | # include "BKE_icons.h" | ||||
| # include "BKE_idprop.h" | # include "BKE_idprop.h" | ||||
| # include "BKE_layer.h" | # include "BKE_layer.h" | ||||
| # include "BKE_nla.h" | # include "BKE_nla.h" | ||||
| ▲ Show 20 Lines • Show All 2,209 Lines • ▼ Show 20 Lines | |||||
| static PointerRNA rna_FileBrowser_FileSelectEntry_asset_data_get(PointerRNA *ptr) | static PointerRNA rna_FileBrowser_FileSelectEntry_asset_data_get(PointerRNA *ptr) | ||||
| { | { | ||||
| const FileDirEntry *entry = ptr->data; | const FileDirEntry *entry = ptr->data; | ||||
| if (!entry->asset) { | if (!entry->asset) { | ||||
| return PointerRNA_NULL; | return PointerRNA_NULL; | ||||
| } | } | ||||
| AssetMetaData *asset_data = BKE_asset_representation_metadata_get(entry->asset); | AssetMetaData *asset_data = AS_asset_representation_metadata_get(entry->asset); | ||||
| /* Note that the owning ID of the RNA pointer (`ptr->owner_id`) has to be set carefully: | /* Note that the owning ID of the RNA pointer (`ptr->owner_id`) has to be set carefully: | ||||
| * Local IDs (`entry->id`) own their asset metadata themselves. Asset metadata from other blend | * Local IDs (`entry->id`) own their asset metadata themselves. Asset metadata from other blend | ||||
| * files are owned by the file browser (`entry`). Only if this is set correctly, we can tell from | * files are owned by the file browser (`entry`). Only if this is set correctly, we can tell from | ||||
| * the metadata RNA pointer if the metadata is stored locally and can thus be edited or not. */ | * the metadata RNA pointer if the metadata is stored locally and can thus be edited or not. */ | ||||
| if (BKE_asset_representation_is_local_id(entry->asset)) { | if (AS_asset_representation_is_local_id(entry->asset)) { | ||||
| PointerRNA id_ptr; | PointerRNA id_ptr; | ||||
| RNA_id_pointer_create(entry->id, &id_ptr); | RNA_id_pointer_create(entry->id, &id_ptr); | ||||
| return rna_pointer_inherit_refine(&id_ptr, &RNA_AssetMetaData, asset_data); | return rna_pointer_inherit_refine(&id_ptr, &RNA_AssetMetaData, asset_data); | ||||
| } | } | ||||
| return rna_pointer_inherit_refine(ptr, &RNA_AssetMetaData, asset_data); | return rna_pointer_inherit_refine(ptr, &RNA_AssetMetaData, asset_data); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 4,973 Lines • ▼ Show 20 Lines | static void rna_def_space_clip(BlenderRNA *brna) | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, NULL); | ||||
| /* pivot point */ | /* pivot point */ | ||||
| prop = RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "pivot_point", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "around"); | RNA_def_property_enum_sdna(prop, NULL, "around"); | ||||
| RNA_def_property_enum_items(prop, pivot_items); | RNA_def_property_enum_items(prop, pivot_items); | ||||
| RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling"); | RNA_def_property_ui_text(prop, "Pivot Point", "Pivot center for rotation/scaling"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, NULL); | ||||
| /* Gizmo Toggles. */ | |||||
| prop = RNA_def_property(srna, "show_gizmo", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_negative_sdna(prop, NULL, "gizmo_flag", SCLIP_GIZMO_HIDE); | |||||
| RNA_def_property_ui_text(prop, "Show Gizmo", "Show gizmos of all types"); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, NULL); | |||||
| prop = RNA_def_property(srna, "show_gizmo_navigate", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_negative_sdna(prop, NULL, "gizmo_flag", SCLIP_GIZMO_HIDE_NAVIGATE); | |||||
| RNA_def_property_ui_text(prop, "Navigate Gizmo", "Viewport navigation gizmo"); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, NULL); | |||||
| } | } | ||||
| static void rna_def_spreadsheet_column_id(BlenderRNA *brna) | static void rna_def_spreadsheet_column_id(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| srna = RNA_def_struct(brna, "SpreadsheetColumnID", NULL); | srna = RNA_def_struct(brna, "SpreadsheetColumnID", NULL); | ||||
| ▲ Show 20 Lines • Show All 321 Lines • Show Last 20 Lines | |||||