Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_space.c
| Show First 20 Lines • Show All 97 Lines • ▼ Show 20 Lines | const EnumPropertyItem rna_enum_space_type_items[] = { | ||||
| {SPACE_OUTLINER, "OUTLINER", ICON_OOPS, "Outliner", "Overview of scene graph and all available data-blocks"}, | {SPACE_OUTLINER, "OUTLINER", ICON_OOPS, "Outliner", "Overview of scene graph and all available data-blocks"}, | ||||
| {SPACE_BUTS, "PROPERTIES", ICON_BUTS, "Properties", "Edit properties of active object and related data-blocks"}, | {SPACE_BUTS, "PROPERTIES", ICON_BUTS, "Properties", "Edit properties of active object and related data-blocks"}, | ||||
| {SPACE_FILE, "FILE_BROWSER", ICON_FILESEL, "File Browser", "Browse for files and assets"}, | {SPACE_FILE, "FILE_BROWSER", ICON_FILESEL, "File Browser", "Browse for files and assets"}, | ||||
| {SPACE_USERPREF, "USER_PREFERENCES", ICON_PREFERENCES, "User Preferences", | {SPACE_USERPREF, "USER_PREFERENCES", ICON_PREFERENCES, "User Preferences", | ||||
| "Edit persistent configuration settings"}, | "Edit persistent configuration settings"}, | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| const EnumPropertyItem rna_enum_space_image_mode_items[] = { | |||||
| {SI_MODE_VIEW, "VIEW", ICON_FILE_IMAGE, "View", "View the image and UV edit in mesh editmode"}, | |||||
| {SI_MODE_PAINT, "PAINT", ICON_TPAINT_HLT, "Paint", "2D image painting mode"}, | |||||
| {SI_MODE_MASK, "MASK", ICON_MOD_MASK, "Mask", "Mask editing"}, | |||||
| {0, NULL, 0, NULL, NULL} | |||||
| }; | |||||
| #define V3D_S3D_CAMERA_LEFT {STEREO_LEFT_ID, "LEFT", ICON_RESTRICT_RENDER_OFF, "Left", ""}, | #define V3D_S3D_CAMERA_LEFT {STEREO_LEFT_ID, "LEFT", ICON_RESTRICT_RENDER_OFF, "Left", ""}, | ||||
| #define V3D_S3D_CAMERA_RIGHT {STEREO_RIGHT_ID, "RIGHT", ICON_RESTRICT_RENDER_OFF, "Right", ""}, | #define V3D_S3D_CAMERA_RIGHT {STEREO_RIGHT_ID, "RIGHT", ICON_RESTRICT_RENDER_OFF, "Right", ""}, | ||||
| #define V3D_S3D_CAMERA_S3D {STEREO_3D_ID, "S3D", ICON_CAMERA_STEREO, "3D", ""}, | #define V3D_S3D_CAMERA_S3D {STEREO_3D_ID, "S3D", ICON_CAMERA_STEREO, "3D", ""}, | ||||
| #ifdef RNA_RUNTIME | #ifdef RNA_RUNTIME | ||||
| #define V3D_S3D_CAMERA_VIEWS {STEREO_MONO_ID, "MONO", ICON_RESTRICT_RENDER_OFF, "Views", ""}, | #define V3D_S3D_CAMERA_VIEWS {STEREO_MONO_ID, "MONO", ICON_RESTRICT_RENDER_OFF, "Views", ""}, | ||||
| #endif | #endif | ||||
| static const EnumPropertyItem stereo3d_camera_items[] = { | static const EnumPropertyItem stereo3d_camera_items[] = { | ||||
| ▲ Show 20 Lines • Show All 2,831 Lines • ▼ Show 20 Lines | static void rna_def_space_buttons(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "use_pin_id", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_pin_id", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", SB_PIN_CONTEXT); | RNA_def_property_boolean_sdna(prop, NULL, "flag", SB_PIN_CONTEXT); | ||||
| RNA_def_property_ui_text(prop, "Pin ID", "Use the pinned context"); | RNA_def_property_ui_text(prop, "Pin ID", "Use the pinned context"); | ||||
| } | } | ||||
| static void rna_def_space_image(BlenderRNA *brna) | static void rna_def_space_image(BlenderRNA *brna) | ||||
| { | { | ||||
| static const EnumPropertyItem image_space_mode_items[] = { | |||||
| {SI_MODE_VIEW, "VIEW", ICON_FILE_IMAGE, "View", "View the image and UV edit in mesh editmode"}, | |||||
| {SI_MODE_PAINT, "PAINT", ICON_TPAINT_HLT, "Paint", "2D image painting mode"}, | |||||
| {SI_MODE_MASK, "MASK", ICON_MOD_MASK, "Mask", "Mask editing"}, | |||||
| {0, NULL, 0, NULL, NULL} | |||||
| }; | |||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| srna = RNA_def_struct(brna, "SpaceImageEditor", "Space"); | srna = RNA_def_struct(brna, "SpaceImageEditor", "Space"); | ||||
| RNA_def_struct_sdna(srna, "SpaceImage"); | RNA_def_struct_sdna(srna, "SpaceImage"); | ||||
| RNA_def_struct_ui_text(srna, "Space Image Editor", "Image and UV editor space data"); | RNA_def_struct_ui_text(srna, "Space Image Editor", "Image and UV editor space data"); | ||||
| /* image */ | /* image */ | ||||
| ▲ Show 20 Lines • Show All 64 Lines • ▼ Show 20 Lines | static void rna_def_space_image(BlenderRNA *brna) | ||||
| RNA_def_property_flag(prop, PROP_NEVER_NULL); | RNA_def_property_flag(prop, PROP_NEVER_NULL); | ||||
| RNA_def_property_struct_type(prop, "SpaceUVEditor"); | RNA_def_property_struct_type(prop, "SpaceUVEditor"); | ||||
| RNA_def_property_pointer_funcs(prop, "rna_SpaceImageEditor_uvedit_get", NULL, NULL, NULL); | RNA_def_property_pointer_funcs(prop, "rna_SpaceImageEditor_uvedit_get", NULL, NULL, NULL); | ||||
| RNA_def_property_ui_text(prop, "UV Editor", "UV editor settings"); | RNA_def_property_ui_text(prop, "UV Editor", "UV editor settings"); | ||||
| /* mode */ | /* mode */ | ||||
| prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "mode", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "mode"); | RNA_def_property_enum_sdna(prop, NULL, "mode"); | ||||
| RNA_def_property_enum_items(prop, image_space_mode_items); | RNA_def_property_enum_items(prop, rna_enum_space_image_mode_items); | ||||
| RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed"); | RNA_def_property_ui_text(prop, "Mode", "Editing context being displayed"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, "rna_SpaceImageEditor_mode_update"); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, "rna_SpaceImageEditor_mode_update"); | ||||
| /* transform */ | /* transform */ | ||||
| prop = RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ); | prop = RNA_def_property(srna, "cursor_location", PROP_FLOAT, PROP_XYZ); | ||||
| RNA_def_property_array(prop, 2); | RNA_def_property_array(prop, 2); | ||||
| RNA_def_property_float_funcs(prop, "rna_SpaceImageEditor_cursor_location_get", | RNA_def_property_float_funcs(prop, "rna_SpaceImageEditor_cursor_location_get", | ||||
| "rna_SpaceImageEditor_cursor_location_set", NULL); | "rna_SpaceImageEditor_cursor_location_set", NULL); | ||||
| ▲ Show 20 Lines • Show All 1,667 Lines • Show Last 20 Lines | |||||