Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_space.c
| Show First 20 Lines • Show All 741 Lines • ▼ Show 20 Lines | |||||
| static void rna_RegionView3D_view_matrix_set(PointerRNA *ptr, const float *values) | static void rna_RegionView3D_view_matrix_set(PointerRNA *ptr, const float *values) | ||||
| { | { | ||||
| RegionView3D *rv3d = (RegionView3D *)(ptr->data); | RegionView3D *rv3d = (RegionView3D *)(ptr->data); | ||||
| float mat[4][4]; | float mat[4][4]; | ||||
| invert_m4_m4(mat, (float(*)[4])values); | invert_m4_m4(mat, (float(*)[4])values); | ||||
| ED_view3d_from_m4(mat, rv3d->ofs, rv3d->viewquat, &rv3d->dist); | ED_view3d_from_m4(mat, rv3d->ofs, rv3d->viewquat, &rv3d->dist); | ||||
| } | } | ||||
| static bool rna_RegionView3D_is_orthographic_side_view_get(PointerRNA *ptr) | |||||
| { | |||||
| RegionView3D *rv3d = (RegionView3D *)(ptr->data); | |||||
| return RV3D_VIEW_IS_AXIS(rv3d->view); | |||||
| } | |||||
| static void rna_3DViewShading_type_update(Main *bmain, Scene *scene, PointerRNA *ptr) | static void rna_3DViewShading_type_update(Main *bmain, Scene *scene, PointerRNA *ptr) | ||||
| { | { | ||||
| ID *id = ptr->id.data; | ID *id = ptr->id.data; | ||||
| if (GS(id->name) == ID_SCE) { | if (GS(id->name) == ID_SCE) { | ||||
| return; | return; | ||||
| } | } | ||||
| for (Material *ma = bmain->materials.first; ma; ma = ma->id.next) { | for (Material *ma = bmain->materials.first; ma; ma = ma->id.next) { | ||||
| ▲ Show 20 Lines • Show All 2,168 Lines • ▼ Show 20 Lines | static void rna_def_space_view3d_overlay(BlenderRNA *brna) | ||||
| RNA_def_struct_ui_text( | RNA_def_struct_ui_text( | ||||
| srna, "3D View Overlay Settings", "Settings for display of overlays in the 3D viewport"); | 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_HIDE_OVERLAYS); | RNA_def_property_boolean_negative_sdna(prop, NULL, "flag2", V3D_HIDE_OVERLAYS); | ||||
| 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, "rna_GPencil_update"); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_GPencil_update"); | ||||
| prop = RNA_def_property(srna, "show_ortho_grid", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "gridflag", V3D_SHOW_ORTHO_GRID); | |||||
| RNA_def_property_ui_text(prop, "Display Grid", "Show grid in othographic side view"); | |||||
brecht: othographics axis aligned view -> orthographic side views
Axis aligned is more a programming… | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | |||||
| 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( | RNA_def_property_ui_text( | ||||
| prop, "Display Grid Floor", "Show the ground plane grid in perspective view"); | 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 830 Lines • ▼ Show 20 Lines | static void rna_def_space_view3d(BlenderRNA *brna) | ||||
| RNA_def_property_ui_text(prop, "Perspective", "View Perspective"); | RNA_def_property_ui_text(prop, "Perspective", "View Perspective"); | ||||
| 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, "is_perspective", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "is_perspective", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "is_persp", 1); | RNA_def_property_boolean_sdna(prop, NULL, "is_persp", 1); | ||||
| RNA_def_property_ui_text(prop, "Is Perspective", ""); | RNA_def_property_ui_text(prop, "Is Perspective", ""); | ||||
| RNA_def_property_flag(prop, PROP_EDITABLE); | RNA_def_property_flag(prop, PROP_EDITABLE); | ||||
| prop = RNA_def_property(srna, "is_orthographic_side_view", PROP_BOOLEAN, PROP_NONE); | |||||
Done Inline ActionsDo we want this in the API, or do we want to add the view property in its whole? jbakker: Do we want this in the API, or do we want to add the view property in its whole? | |||||
Done Inline ActionsI'm fine having this in the API. But I would call it is_orthographic_side_view and not introduce new terminology. brecht: I'm fine having this in the API. But I would call it `is_orthographic_side_view` and not… | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "view", 0); | |||||
| RNA_def_property_boolean_funcs(prop, "rna_RegionView3D_is_orthographic_side_view_get", NULL); | |||||
| RNA_def_property_ui_text(prop, "Is Axis Aligned", "Is current view an orthographic side view"); | |||||
| /* This isn't directly accessible from the UI, only an operator. */ | /* This isn't directly accessible from the UI, only an operator. */ | ||||
| prop = RNA_def_property(srna, "use_clip_planes", PROP_BOOLEAN, PROP_NONE); | prop = RNA_def_property(srna, "use_clip_planes", PROP_BOOLEAN, PROP_NONE); | ||||
| RNA_def_property_boolean_sdna(prop, NULL, "rflag", RV3D_CLIPPING); | RNA_def_property_boolean_sdna(prop, NULL, "rflag", RV3D_CLIPPING); | ||||
| RNA_def_property_ui_text(prop, "Use Clip Planes", ""); | RNA_def_property_ui_text(prop, "Use Clip Planes", ""); | ||||
| prop = RNA_def_property(srna, "clip_planes", PROP_FLOAT, PROP_NONE); | prop = RNA_def_property(srna, "clip_planes", PROP_FLOAT, PROP_NONE); | ||||
| RNA_def_property_float_sdna(prop, NULL, "clip"); | RNA_def_property_float_sdna(prop, NULL, "clip"); | ||||
| RNA_def_property_multi_array(prop, 2, (int[]){6, 4}); | RNA_def_property_multi_array(prop, 2, (int[]){6, 4}); | ||||
| ▲ Show 20 Lines • Show All 2,139 Lines • Show Last 20 Lines | |||||
othographics axis aligned view -> orthographic side views
Axis aligned is more a programming term.