Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_space.c
| Show First 20 Lines • Show All 282 Lines • ▼ Show 20 Lines | static const EnumPropertyItem buttons_context_items[] = { | ||||
| {BCONTEXT_DATA, "DATA", ICON_NONE, "Data", "Object data"}, | {BCONTEXT_DATA, "DATA", ICON_NONE, "Data", "Object data"}, | ||||
| {BCONTEXT_BONE, "BONE", ICON_BONE_DATA, "Bone", "Bone"}, | {BCONTEXT_BONE, "BONE", ICON_BONE_DATA, "Bone", "Bone"}, | ||||
| {BCONTEXT_BONE_CONSTRAINT, "BONE_CONSTRAINT", ICON_CONSTRAINT_BONE, "Bone Constraints", "Bone constraints"}, | {BCONTEXT_BONE_CONSTRAINT, "BONE_CONSTRAINT", ICON_CONSTRAINT_BONE, "Bone Constraints", "Bone constraints"}, | ||||
| {BCONTEXT_MATERIAL, "MATERIAL", ICON_MATERIAL, "Material", "Material"}, | {BCONTEXT_MATERIAL, "MATERIAL", ICON_MATERIAL, "Material", "Material"}, | ||||
| {BCONTEXT_TEXTURE, "TEXTURE", ICON_TEXTURE, "Texture", "Texture"}, | {BCONTEXT_TEXTURE, "TEXTURE", ICON_TEXTURE, "Texture", "Texture"}, | ||||
| {BCONTEXT_PARTICLE, "PARTICLES", ICON_PARTICLES, "Particles", "Particle"}, | {BCONTEXT_PARTICLE, "PARTICLES", ICON_PARTICLES, "Particles", "Particle"}, | ||||
| {BCONTEXT_PHYSICS, "PHYSICS", ICON_PHYSICS, "Physics", "Physics"}, | {BCONTEXT_PHYSICS, "PHYSICS", ICON_PHYSICS, "Physics", "Physics"}, | ||||
| {BCONTEXT_WORKSPACE, "WORKSPACE", ICON_SPLITSCREEN, "Workspace", "Workspace"}, | {BCONTEXT_WORKSPACE, "WORKSPACE", ICON_SPLITSCREEN, "Workspace", "Workspace"}, | ||||
| {BCONTEXT_SHADERFX, "SHADERFX", ICON_SOLO_ON, "Effects", "Object visual effects" }, | |||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| static const EnumPropertyItem fileselectparams_recursion_level_items[] = { | static const EnumPropertyItem fileselectparams_recursion_level_items[] = { | ||||
| {0, "NONE", 0, "None", "Only list current directory's content, with no recursion"}, | {0, "NONE", 0, "None", "Only list current directory's content, with no recursion"}, | ||||
| {1, "BLEND", 0, "Blend File", "List .blend files' content"}, | {1, "BLEND", 0, "Blend File", "List .blend files' content"}, | ||||
| {2, "ALL_1", 0, "One Level", "List all sub-directories' content, one level of recursion"}, | {2, "ALL_1", 0, "One Level", "List all sub-directories' content, one level of recursion"}, | ||||
| {3, "ALL_2", 0, "Two Levels", "List all sub-directories' content, two levels of recursion"}, | {3, "ALL_2", 0, "Two Levels", "List all sub-directories' content, two levels of recursion"}, | ||||
| {4, "ALL_3", 0, "Three Levels", "List all sub-directories' content, three levels of recursion"}, | {4, "ALL_3", 0, "Three Levels", "List all sub-directories' content, three levels of recursion"}, | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| const EnumPropertyItem rna_enum_file_sort_items[] = { | const EnumPropertyItem rna_enum_file_sort_items[] = { | ||||
| {FILE_SORT_ALPHA, "FILE_SORT_ALPHA", ICON_SORTALPHA, "Sort alphabetically", "Sort the file list alphabetically"}, | {FILE_SORT_ALPHA, "FILE_SORT_ALPHA", ICON_SORTALPHA, "Sort alphabetically", "Sort the file list alphabetically"}, | ||||
| {FILE_SORT_EXTENSION, "FILE_SORT_EXTENSION", ICON_SORTBYEXT, "Sort by extension", "Sort the file list by extension/type"}, | {FILE_SORT_EXTENSION, "FILE_SORT_EXTENSION", ICON_SORTBYEXT, "Sort by extension", "Sort the file list by extension/type"}, | ||||
| {FILE_SORT_TIME, "FILE_SORT_TIME", ICON_SORTTIME, "Sort by time", "Sort files by modification time"}, | {FILE_SORT_TIME, "FILE_SORT_TIME", ICON_SORTTIME, "Sort by time", "Sort files by modification time"}, | ||||
| {FILE_SORT_SIZE, "FILE_SORT_SIZE", ICON_SORTSIZE, "Sort by size", "Sort files by size"}, | {FILE_SORT_SIZE, "FILE_SORT_SIZE", ICON_SORTSIZE, "Sort by size", "Sort files by size"}, | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| static const EnumPropertyItem rna_enum_gpencil_grid_axis_items[] = { | |||||
| {V3D_GP_GRID_AXIS_X, "X", 0, "X", ""}, | |||||
| {V3D_GP_GRID_AXIS_Y, "Y", 0, "Y", ""}, | |||||
| {V3D_GP_GRID_AXIS_Z, "Z", 0, "Z", ""}, | |||||
| {0, NULL, 0, NULL, NULL} | |||||
| }; | |||||
| #ifdef RNA_RUNTIME | #ifdef RNA_RUNTIME | ||||
| #include "DNA_anim_types.h" | #include "DNA_anim_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" | ||||
| ▲ Show 20 Lines • Show All 151 Lines • ▼ Show 20 Lines | static void rna_Space_view2d_sync_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr) | ||||
| if (ar) { | if (ar) { | ||||
| bScreen *sc = (bScreen *)ptr->id.data; | bScreen *sc = (bScreen *)ptr->id.data; | ||||
| View2D *v2d = &ar->v2d; | View2D *v2d = &ar->v2d; | ||||
| UI_view2d_sync(sc, sa, v2d, V2D_LOCK_SET); | UI_view2d_sync(sc, sa, v2d, V2D_LOCK_SET); | ||||
| } | } | ||||
| } | } | ||||
| static void rna_GPencil_update(Main *bmain, Scene *UNUSED(scene), PointerRNA *UNUSED(ptr)) | |||||
| { | |||||
| /* need set all caches as dirty to recalculate onion skinning */ | |||||
| for (Object *ob = bmain->object.first; ob; ob = ob->id.next) { | |||||
| if (ob->type == OB_GPENCIL) { | |||||
| DEG_id_tag_update(&ob->id, OB_RECALC_DATA); | |||||
| } | |||||
| } | |||||
| WM_main_add_notifier(NC_GPENCIL | NA_EDITED, NULL); | |||||
| } | |||||
| /* Space 3D View */ | /* Space 3D View */ | ||||
| static void rna_SpaceView3D_camera_update(Main *bmain, Scene *scene, PointerRNA *ptr) | static void rna_SpaceView3D_camera_update(Main *bmain, Scene *scene, PointerRNA *ptr) | ||||
| { | { | ||||
| View3D *v3d = (View3D *)(ptr->data); | View3D *v3d = (View3D *)(ptr->data); | ||||
| if (v3d->scenelock) { | if (v3d->scenelock) { | ||||
| wmWindowManager *wm = bmain->wm.first; | wmWindowManager *wm = bmain->wm.first; | ||||
| scene->camera = v3d->camera; | scene->camera = v3d->camera; | ||||
| ▲ Show 20 Lines • Show All 847 Lines • ▼ Show 20 Lines | static const EnumPropertyItem *rna_SpaceProperties_context_itemf( | ||||
| if (sbuts->pathflag & (1 << BCONTEXT_CONSTRAINT)) { | if (sbuts->pathflag & (1 << BCONTEXT_CONSTRAINT)) { | ||||
| RNA_enum_items_add_value(&item, &totitem, buttons_context_items, BCONTEXT_CONSTRAINT); | RNA_enum_items_add_value(&item, &totitem, buttons_context_items, BCONTEXT_CONSTRAINT); | ||||
| } | } | ||||
| if (sbuts->pathflag & (1 << BCONTEXT_MODIFIER)) { | if (sbuts->pathflag & (1 << BCONTEXT_MODIFIER)) { | ||||
| RNA_enum_items_add_value(&item, &totitem, buttons_context_items, BCONTEXT_MODIFIER); | RNA_enum_items_add_value(&item, &totitem, buttons_context_items, BCONTEXT_MODIFIER); | ||||
| } | } | ||||
| if (sbuts->pathflag & (1 << BCONTEXT_SHADERFX)) { | |||||
| RNA_enum_items_add_value(&item, &totitem, buttons_context_items, BCONTEXT_SHADERFX); | |||||
| } | |||||
| if (sbuts->pathflag & (1 << BCONTEXT_DATA)) { | if (sbuts->pathflag & (1 << BCONTEXT_DATA)) { | ||||
| RNA_enum_items_add_value(&item, &totitem, buttons_context_items, BCONTEXT_DATA); | RNA_enum_items_add_value(&item, &totitem, buttons_context_items, BCONTEXT_DATA); | ||||
| (item + totitem - 1)->icon = sbuts->dataicon; | (item + totitem - 1)->icon = sbuts->dataicon; | ||||
| } | } | ||||
| if (sbuts->pathflag & (1 << BCONTEXT_BONE)) { | if (sbuts->pathflag & (1 << BCONTEXT_BONE)) { | ||||
| RNA_enum_items_add_value(&item, &totitem, buttons_context_items, BCONTEXT_BONE); | RNA_enum_items_add_value(&item, &totitem, buttons_context_items, BCONTEXT_BONE); | ||||
| } | } | ||||
| ▲ Show 20 Lines • Show All 1,259 Lines • ▼ Show 20 Lines | static void rna_def_space_view3d_overlay(BlenderRNA *brna) | ||||
| RNA_def_struct_sdna(srna, "View3D"); | RNA_def_struct_sdna(srna, "View3D"); | ||||
| RNA_def_struct_nested(brna, srna, "SpaceView3D"); | RNA_def_struct_nested(brna, srna, "SpaceView3D"); | ||||
| RNA_def_struct_path_func(srna, "rna_View3DOverlay_path"); | RNA_def_struct_path_func(srna, "rna_View3DOverlay_path"); | ||||
| RNA_def_struct_ui_text(srna, "3D View Overlay Settings", "Settings for display of overlays in the 3D viewport"); | RNA_def_struct_ui_text(srna, "3D View Overlay Settings", "Settings for display of overlays in the 3D viewport"); | ||||
| prop = RNA_def_property(srna, "show_overlays", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "show_overlays", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_negative_sdna(prop, NULL, "flag2", V3D_RENDER_OVERRIDE); | RNA_def_property_boolean_negative_sdna(prop, NULL, "flag2", V3D_RENDER_OVERRIDE); | ||||
| RNA_def_property_ui_text(prop, "Show Overlays", "Display overlays like gizmos and outlines"); | RNA_def_property_ui_text(prop, "Show Overlays", "Display overlays like gizmos and outlines"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update"); | ||||
| prop = RNA_def_property(srna, "show_floor", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "show_floor", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_FLOOR); | RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_FLOOR); | ||||
| RNA_def_property_ui_text(prop, "Display Grid Floor", "Show the ground plane grid in perspective view"); | RNA_def_property_ui_text(prop, "Display Grid Floor", "Show the ground plane grid in perspective view"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | ||||
| prop = RNA_def_property(srna, "show_axis_x", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "show_axis_x", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_X); | RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_X); | ||||
| ▲ Show 20 Lines • Show All 201 Lines • ▼ Show 20 Lines | static void rna_def_space_view3d_overlay(BlenderRNA *brna) | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | ||||
| prop = RNA_def_property(srna, "weight_paint_mode_opacity", PROP_FLOAT, PROP_FACTOR); | prop = RNA_def_property(srna, "weight_paint_mode_opacity", PROP_FLOAT, PROP_FACTOR); | ||||
| RNA_def_property_float_sdna(prop, NULL, "overlay.weight_paint_mode_opacity"); | RNA_def_property_float_sdna(prop, NULL, "overlay.weight_paint_mode_opacity"); | ||||
| RNA_def_property_float_default(prop, 0.8f); | RNA_def_property_float_default(prop, 0.8f); | ||||
| RNA_def_property_ui_text(prop, "Weight Paint Opacity", "Opacity of the weight paint mode overlay"); | RNA_def_property_ui_text(prop, "Weight Paint Opacity", "Opacity of the weight paint mode overlay"); | ||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | RNA_def_property_range(prop, 0.0f, 1.0f); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | ||||
| /* grease pencil paper settings */ | |||||
| prop = RNA_def_property(srna, "show_annotation", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SHOW_ANNOTATION); | |||||
| RNA_def_property_ui_text(prop, "Show Annotation", | |||||
| "Show annotations for this view"); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | |||||
| prop = RNA_def_property(srna, "use_gpencil_paper", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag3", V3D_GP_SHOW_PAPER); | |||||
| RNA_def_property_ui_text(prop, "Use Paper", | |||||
| "Cover all viewport with a full color layer to improve visibility while drawing over complex scenes"); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | |||||
| prop = RNA_def_property(srna, "use_gpencil_grid", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag3", V3D_GP_SHOW_GRID); | |||||
| RNA_def_property_ui_text(prop, "Use Grid", | |||||
| "Draw a grid over grease pencil paper"); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | |||||
| prop = RNA_def_property(srna, "gpencil_grid_scale", PROP_FLOAT, PROP_NONE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "gpencil_grid_scale"); | |||||
| RNA_def_property_range(prop, 0.01f, FLT_MAX); | |||||
| RNA_def_property_float_default(prop, 1.0f); | |||||
| RNA_def_property_ui_text(prop, "Scale", "Grid scale"); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | |||||
| prop = RNA_def_property(srna, "gpencil_grid_lines", PROP_INT, PROP_NONE); | |||||
| RNA_def_property_int_sdna(prop, NULL, "gpencil_grid_lines"); | |||||
| RNA_def_property_range(prop, 4, INT_MAX); | |||||
| RNA_def_property_int_default(prop, 20); | |||||
| RNA_def_property_ui_text(prop, "Lines", "Number of lines"); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | |||||
| prop = RNA_def_property(srna, "gpencil_grid_axis", PROP_ENUM, PROP_NONE); | |||||
| RNA_def_property_enum_sdna(prop, NULL, "gpencil_grid_axis"); | |||||
| RNA_def_property_enum_items(prop, rna_enum_gpencil_grid_axis_items); | |||||
| RNA_def_property_ui_text(prop, "Axis", "Axis to display grid"); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | |||||
| /* Paper opacity factor */ | |||||
| prop = RNA_def_property(srna, "gpencil_paper_opacity", PROP_FLOAT, PROP_NONE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "gpencil_paper_opacity"); | |||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | |||||
| RNA_def_property_float_default(prop, 0.5f); | |||||
| RNA_def_property_ui_text(prop, "Opacity", "Paper opacity"); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | |||||
| /* show edit lines */ | |||||
| prop = RNA_def_property(srna, "use_gpencil_edit_lines", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag3", V3D_GP_SHOW_EDIT_LINES); | |||||
| RNA_def_property_ui_text(prop, "Edit Lines", "Show edit lines when edit strokes"); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update"); | |||||
| prop = RNA_def_property(srna, "use_gpencil_multiedit_line_only", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag3", V3D_GP_SHOW_MULTIEDIT_LINES); | |||||
| RNA_def_property_ui_text(prop, "Lines Only", "Show only edit lines for additional frames"); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update"); | |||||
| /* main grease pencil onion switch */ | |||||
| prop = RNA_def_property(srna, "use_gpencil_onion_skin", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag3", V3D_GP_SHOW_ONION_SKIN); | |||||
| RNA_def_property_ui_text(prop, "Onion Skins", "Show ghosts of the frames before and after the current frame"); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update"); | |||||
| /* vertex opacity */ | |||||
| prop = RNA_def_property(srna, "vertex_opacity", PROP_FLOAT, PROP_NONE); | |||||
| RNA_def_property_float_sdna(prop, NULL, "vertex_opacity"); | |||||
| RNA_def_property_range(prop, 0.0f, 1.0f); | |||||
| RNA_def_property_ui_text(prop, "Vertex Opacity", "Opacity for edit vertices"); | |||||
| RNA_def_parameter_clear_flags(prop, PROP_ANIMATABLE, 0); | |||||
| RNA_def_property_update(prop, NC_SCENE | ND_TOOLSETTINGS, "rna_GPencil_update"); | |||||
| } | } | ||||
| static void rna_def_space_view3d(BlenderRNA *brna) | static void rna_def_space_view3d(BlenderRNA *brna) | ||||
| { | { | ||||
| StructRNA *srna; | StructRNA *srna; | ||||
| PropertyRNA *prop; | PropertyRNA *prop; | ||||
| static const EnumPropertyItem rv3d_persp_items[] = { | static const EnumPropertyItem rv3d_persp_items[] = { | ||||
| ▲ Show 20 Lines • Show All 110 Lines • ▼ Show 20 Lines | static void rna_def_space_view3d(BlenderRNA *brna) | ||||
| prop = RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_DISTANCE); | prop = RNA_def_property(srna, "clip_end", PROP_FLOAT, PROP_DISTANCE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "far"); | RNA_def_property_float_sdna(prop, NULL, "far"); | ||||
| RNA_def_property_range(prop, 1e-6f, FLT_MAX); | RNA_def_property_range(prop, 1e-6f, FLT_MAX); | ||||
| RNA_def_property_ui_range(prop, 0.001f, FLT_MAX, 10, 3); | RNA_def_property_ui_range(prop, 0.001f, FLT_MAX, 10, 3); | ||||
| RNA_def_property_float_default(prop, 1000.0f); | RNA_def_property_float_default(prop, 1000.0f); | ||||
| RNA_def_property_ui_text(prop, "Clip End", "3D View far clipping distance"); | RNA_def_property_ui_text(prop, "Clip End", "3D View far clipping distance"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | ||||
| prop = RNA_def_property(srna, "show_grease_pencil", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SHOW_GPENCIL); | |||||
| RNA_def_property_ui_text(prop, "Show Grease Pencil", | |||||
| "Show grease pencil for this view"); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | |||||
| prop = RNA_def_property(srna, "show_textured_solid", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "show_textured_solid", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SOLID_TEX); | RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_SOLID_TEX); | ||||
| RNA_def_property_ui_text(prop, "Textured Solid", "Display face-assigned textures in solid view"); | RNA_def_property_ui_text(prop, "Textured Solid", "Display face-assigned textures in solid view"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | ||||
| prop = RNA_def_property(srna, "show_occlude_wire", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "show_occlude_wire", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_OCCLUDE_WIRE); | RNA_def_property_boolean_sdna(prop, NULL, "flag2", V3D_OCCLUDE_WIRE); | ||||
| RNA_def_property_ui_text(prop, "Hidden Wire", "Use hidden wireframe display"); | RNA_def_property_ui_text(prop, "Hidden Wire", "Use hidden wireframe display"); | ||||
| ▲ Show 20 Lines • Show All 164 Lines • ▼ Show 20 Lines | struct { | ||||
| {"Font", (1 << OB_FONT), | {"Font", (1 << OB_FONT), | ||||
| {"show_object_viewport_font", "show_object_select_font"}}, | {"show_object_viewport_font", "show_object_select_font"}}, | ||||
| {"Armature", (1 << OB_ARMATURE), | {"Armature", (1 << OB_ARMATURE), | ||||
| {"show_object_viewport_armature", "show_object_select_armature"}}, | {"show_object_viewport_armature", "show_object_select_armature"}}, | ||||
| {"Lattice", (1 << OB_LATTICE), | {"Lattice", (1 << OB_LATTICE), | ||||
| {"show_object_viewport_lattice", "show_object_select_lattice"}}, | {"show_object_viewport_lattice", "show_object_select_lattice"}}, | ||||
| {"Empty", (1 << OB_EMPTY), | {"Empty", (1 << OB_EMPTY), | ||||
| {"show_object_viewport_empty", "show_object_select_empty"}}, | {"show_object_viewport_empty", "show_object_select_empty"}}, | ||||
| {"Grease Pencil", (1 << OB_GPENCIL), | |||||
| {"show_object_viewport_grease_pencil", "show_object_select_grease_pencil"}}, | |||||
| {"Camera", (1 << OB_CAMERA), | {"Camera", (1 << OB_CAMERA), | ||||
| {"show_object_viewport_camera", "show_object_select_camera"}}, | {"show_object_viewport_camera", "show_object_select_camera"}}, | ||||
| {"Light", (1 << OB_LAMP), | {"Light", (1 << OB_LAMP), | ||||
| {"show_object_viewport_light", "show_object_select_light"}}, | {"show_object_viewport_light", "show_object_select_light"}}, | ||||
| {"Speaker", (1 << OB_SPEAKER), | {"Speaker", (1 << OB_SPEAKER), | ||||
| {"show_object_viewport_speaker", "show_object_select_speaker"}}, | {"show_object_viewport_speaker", "show_object_select_speaker"}}, | ||||
| {"Light Probe", (1 << OB_LIGHTPROBE), | {"Light Probe", (1 << OB_LIGHTPROBE), | ||||
| {"show_object_viewport_light_probe", "show_object_select_light_probe"}}, | {"show_object_viewport_light_probe", "show_object_select_light_probe"}}, | ||||
| ▲ Show 20 Lines • Show All 223 Lines • ▼ Show 20 Lines | static void rna_def_space_image(BlenderRNA *brna) | ||||
| RNA_def_property_ui_text(prop, "Zoom", "Zoom factor"); | RNA_def_property_ui_text(prop, "Zoom", "Zoom factor"); | ||||
| /* image draw */ | /* image draw */ | ||||
| prop = RNA_def_property(srna, "show_repeat", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "show_repeat", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAW_TILE); | RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_DRAW_TILE); | ||||
| RNA_def_property_ui_text(prop, "Draw Repeated", "Draw the image repeated outside of the main view"); | RNA_def_property_ui_text(prop, "Draw Repeated", "Draw the image repeated outside of the main view"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL); | ||||
| prop = RNA_def_property(srna, "show_grease_pencil", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "show_annotation", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_SHOW_GPENCIL); | RNA_def_property_boolean_sdna(prop, NULL, "flag", SI_SHOW_GPENCIL); | ||||
| RNA_def_property_ui_text(prop, "Show Grease Pencil", | RNA_def_property_ui_text(prop, "Show Annotation", | ||||
| "Show grease pencil for this view"); | "Show annotations for this view"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL); | ||||
| prop = RNA_def_property(srna, "draw_channels", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "draw_channels", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); | RNA_def_property_enum_bitflag_sdna(prop, NULL, "flag"); | ||||
| RNA_def_property_enum_items(prop, draw_channels_items); | RNA_def_property_enum_items(prop, draw_channels_items); | ||||
| RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceImageEditor_draw_channels_itemf"); | RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceImageEditor_draw_channels_itemf"); | ||||
| RNA_def_property_ui_text(prop, "Draw Channels", "Channels of the image to draw"); | RNA_def_property_ui_text(prop, "Draw Channels", "Channels of the image to draw"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL); | ||||
| Show All 32 Lines | static void rna_def_space_image(BlenderRNA *brna) | ||||
| RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceImageEditor_pivot_itemf"); | RNA_def_property_enum_funcs(prop, NULL, NULL, "rna_SpaceImageEditor_pivot_itemf"); | ||||
| RNA_def_property_ui_text(prop, "Pivot", "Rotation/Scaling Pivot"); | RNA_def_property_ui_text(prop, "Pivot", "Rotation/Scaling Pivot"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL); | ||||
| /* grease pencil */ | /* grease pencil */ | ||||
| prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "gpd"); | RNA_def_property_pointer_sdna(prop, NULL, "gpd"); | ||||
| RNA_def_property_struct_type(prop, "GreasePencil"); | RNA_def_property_struct_type(prop, "GreasePencil"); | ||||
| RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_GPencil_datablocks_annotations_poll"); | |||||
| RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT); | RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT); | ||||
| RNA_def_property_ui_text(prop, "Grease Pencil", "Grease pencil data for this space"); | RNA_def_property_ui_text(prop, "Grease Pencil", "Grease pencil data for this space"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_IMAGE, NULL); | ||||
| /* update */ | /* update */ | ||||
| prop = RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_realtime_update", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "lock", 0); | RNA_def_property_boolean_sdna(prop, NULL, "lock", 0); | ||||
| RNA_def_property_ui_text(prop, "Update Automatically", | RNA_def_property_ui_text(prop, "Update Automatically", | ||||
| ▲ Show 20 Lines • Show All 137 Lines • ▼ Show 20 Lines | static void rna_def_space_sequencer(BlenderRNA *brna) | ||||
| RNA_def_property_ui_text(prop, "Show Metadata", "Show metadata of first visible strip"); | RNA_def_property_ui_text(prop, "Show Metadata", "Show metadata of first visible strip"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); | ||||
| prop = RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "show_seconds", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SEQ_DRAWFRAMES); | RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", SEQ_DRAWFRAMES); | ||||
| RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames"); | RNA_def_property_ui_text(prop, "Show Seconds", "Show timing in seconds not frames"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); | ||||
| prop = RNA_def_property(srna, "show_grease_pencil", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "show_annotation", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_SHOW_GPENCIL); | RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_SHOW_GPENCIL); | ||||
| RNA_def_property_ui_text(prop, "Show Grease Pencil", | RNA_def_property_ui_text(prop, "Show Annotation", | ||||
| "Show grease pencil for this view"); | "Show annotations for this view"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); | ||||
| prop = RNA_def_property(srna, "display_channel", PROP_INT, PROP_NONE); | prop = RNA_def_property(srna, "display_channel", PROP_INT, PROP_NONE); | ||||
| RNA_def_property_int_sdna(prop, NULL, "chanshown"); | RNA_def_property_int_sdna(prop, NULL, "chanshown"); | ||||
| RNA_def_property_ui_text(prop, "Display Channel", | RNA_def_property_ui_text(prop, "Display Channel", | ||||
| "The channel number shown in the image preview. 0 is the result of all strips combined"); | "The channel number shown in the image preview. 0 is the result of all strips combined"); | ||||
| RNA_def_property_range(prop, -5, MAXSEQ); | RNA_def_property_range(prop, -5, MAXSEQ); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); | ||||
| Show All 22 Lines | static void rna_def_space_sequencer(BlenderRNA *brna) | ||||
| RNA_def_property_ui_text(prop, "Proxy Render Size", | RNA_def_property_ui_text(prop, "Proxy Render Size", | ||||
| "Draw preview using full resolution or different proxy resolutions"); | "Draw preview using full resolution or different proxy resolutions"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); | ||||
| /* grease pencil */ | /* grease pencil */ | ||||
| prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE); | prop = RNA_def_property(srna, "grease_pencil", PROP_POINTER, PROP_NONE); | ||||
| RNA_def_property_pointer_sdna(prop, NULL, "gpd"); | RNA_def_property_pointer_sdna(prop, NULL, "gpd"); | ||||
| RNA_def_property_struct_type(prop, "GreasePencil"); | RNA_def_property_struct_type(prop, "GreasePencil"); | ||||
| RNA_def_property_pointer_funcs(prop, NULL, NULL, NULL, "rna_GPencil_datablocks_annotations_poll"); | |||||
| RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT); | RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_REFCOUNT); | ||||
| RNA_def_property_ui_text(prop, "Grease Pencil", "Grease pencil data for this space"); | RNA_def_property_ui_text(prop, "Grease Pencil", "Grease Pencil data for this Preview region"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); | ||||
| prop = RNA_def_property(srna, "overlay_type", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "overlay_type", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "overlay_type"); | RNA_def_property_enum_sdna(prop, NULL, "overlay_type"); | ||||
| RNA_def_property_enum_items(prop, overlay_type_items); | RNA_def_property_enum_items(prop, overlay_type_items); | ||||
| RNA_def_property_ui_text(prop, "Overlay Type", "Overlay draw type"); | RNA_def_property_ui_text(prop, "Overlay Type", "Overlay draw type"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_SEQUENCER, NULL); | ||||
| ▲ Show 20 Lines • Show All 1,087 Lines • ▼ Show 20 Lines | #endif | ||||
| RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1); | RNA_def_property_ui_icon(prop, ICON_UNPINNED, 1); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE, NULL); | ||||
| prop = RNA_def_property(srna, "show_backdrop", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "show_backdrop", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", SNODE_BACKDRAW); | RNA_def_property_boolean_sdna(prop, NULL, "flag", SNODE_BACKDRAW); | ||||
| RNA_def_property_ui_text(prop, "Backdrop", "Use active Viewer Node output as backdrop for compositing nodes"); | RNA_def_property_ui_text(prop, "Backdrop", "Use active Viewer Node output as backdrop for compositing nodes"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE_VIEW, "rna_SpaceNodeEditor_show_backdrop_update"); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE_VIEW, "rna_SpaceNodeEditor_show_backdrop_update"); | ||||
| prop = RNA_def_property(srna, "show_grease_pencil", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "show_annotation", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", SNODE_SHOW_GPENCIL); | RNA_def_property_boolean_sdna(prop, NULL, "flag", SNODE_SHOW_GPENCIL); | ||||
| RNA_def_property_ui_text(prop, "Show Grease Pencil", | RNA_def_property_ui_text(prop, "Show Annotation", | ||||
| "Show grease pencil for this view"); | "Show annotations for this view"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE_VIEW, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE_VIEW, NULL); | ||||
| prop = RNA_def_property(srna, "use_auto_render", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_auto_render", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", SNODE_AUTO_RENDER); | RNA_def_property_boolean_sdna(prop, NULL, "flag", SNODE_AUTO_RENDER); | ||||
| RNA_def_property_ui_text(prop, "Auto Render", "Re-render and composite changed layers on 3D edits"); | RNA_def_property_ui_text(prop, "Auto Render", "Re-render and composite changed layers on 3D edits"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE_VIEW, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_NODE_VIEW, NULL); | ||||
| prop = RNA_def_property(srna, "backdrop_zoom", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "backdrop_zoom", PROP_FLOAT, PROP_NONE); | ||||
| ▲ Show 20 Lines • Show All 48 Lines • ▼ Show 20 Lines | static void rna_def_space_clip(BlenderRNA *brna) | ||||
| static const EnumPropertyItem view_items[] = { | static const EnumPropertyItem view_items[] = { | ||||
| {SC_VIEW_CLIP, "CLIP", ICON_SEQUENCE, "Clip", "Show editing clip preview"}, | {SC_VIEW_CLIP, "CLIP", ICON_SEQUENCE, "Clip", "Show editing clip preview"}, | ||||
| {SC_VIEW_GRAPH, "GRAPH", ICON_IPO, "Graph", "Show graph view for active element"}, | {SC_VIEW_GRAPH, "GRAPH", ICON_IPO, "Graph", "Show graph view for active element"}, | ||||
| {SC_VIEW_DOPESHEET, "DOPESHEET", ICON_ACTION, "Dopesheet", "Dopesheet view for tracking data"}, | {SC_VIEW_DOPESHEET, "DOPESHEET", ICON_ACTION, "Dopesheet", "Dopesheet view for tracking data"}, | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| static const EnumPropertyItem gpencil_source_items[] = { | static const EnumPropertyItem gpencil_source_items[] = { | ||||
| {SC_GPENCIL_SRC_CLIP, "CLIP", 0, "Clip", "Show grease pencil data-block which belongs to movie clip"}, | {SC_GPENCIL_SRC_CLIP, "CLIP", 0, "Clip", "Show annotation data-block which belongs to movie clip"}, | ||||
| {SC_GPENCIL_SRC_TRACK, "TRACK", 0, "Track", "Show grease pencil data-block which belongs to active track"}, | {SC_GPENCIL_SRC_TRACK, "TRACK", 0, "Track", "Show annotation data-block which belongs to active track"}, | ||||
| {0, NULL, 0, NULL, NULL} | {0, NULL, 0, NULL, NULL} | ||||
| }; | }; | ||||
| static const EnumPropertyItem pivot_items[] = { | static const EnumPropertyItem pivot_items[] = { | ||||
| {V3D_AROUND_CENTER_BOUNDS, "BOUNDING_BOX_CENTER", ICON_ROTATE, "Bounding Box Center", | {V3D_AROUND_CENTER_BOUNDS, "BOUNDING_BOX_CENTER", ICON_ROTATE, "Bounding Box Center", | ||||
| "Pivot around bounding box center of selected object(s)"}, | "Pivot around bounding box center of selected object(s)"}, | ||||
| {V3D_AROUND_CURSOR, "CURSOR", ICON_CURSOR, "2D Cursor", "Pivot around the 2D cursor"}, | {V3D_AROUND_CURSOR, "CURSOR", ICON_CURSOR, "2D Cursor", "Pivot around the 2D cursor"}, | ||||
| {V3D_AROUND_LOCAL_ORIGINS, "INDIVIDUAL_ORIGINS", ICON_ROTATECOLLECTION, | {V3D_AROUND_LOCAL_ORIGINS, "INDIVIDUAL_ORIGINS", ICON_ROTATECOLLECTION, | ||||
| ▲ Show 20 Lines • Show All 133 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); | ||||
| /* manual calibration */ | /* manual calibration */ | ||||
| prop = RNA_def_property(srna, "use_manual_calibration", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_manual_calibration", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_MANUAL_CALIBRATION); | RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_MANUAL_CALIBRATION); | ||||
| RNA_def_property_ui_text(prop, "Manual Calibration", "Use manual calibration helpers"); | RNA_def_property_ui_text(prop, "Manual Calibration", "Use manual calibration helpers"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, NULL); | ||||
| /* show grease pencil */ | /* show annotation */ | ||||
| prop = RNA_def_property(srna, "show_grease_pencil", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "show_annotation", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_GPENCIL); | RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_ANNOTATION); | ||||
| RNA_def_property_ui_text(prop, "Show Grease Pencil", | RNA_def_property_ui_text(prop, "Show Annotation", | ||||
| "Show grease pencil for this view"); | "Show annotations for this view"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, NULL); | ||||
| /* show filters */ | /* show filters */ | ||||
| prop = RNA_def_property(srna, "show_filters", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "show_filters", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_FILTERS); | RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_FILTERS); | ||||
| RNA_def_property_ui_text(prop, "Show Filters", "Show filters for graph editor"); | RNA_def_property_ui_text(prop, "Show Filters", "Show filters for graph editor"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, NULL); | ||||
| ▲ Show 20 Lines • Show All 110 Lines • Show Last 20 Lines | |||||