Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_space.c
| Show First 20 Lines • Show All 743 Lines • ▼ Show 20 Lines | static EnumPropertyItem *rna_SpaceView3D_stereo3d_camera_itemf(bContext *UNUSED(C), PointerRNA *ptr, | ||||
| Scene *scene = ((bScreen *)ptr->id.data)->scene; | Scene *scene = ((bScreen *)ptr->id.data)->scene; | ||||
| if (scene->r.views_format == SCE_VIEWS_FORMAT_MULTIVIEW) | if (scene->r.views_format == SCE_VIEWS_FORMAT_MULTIVIEW) | ||||
| return multiview_camera_items; | return multiview_camera_items; | ||||
| else | else | ||||
| return stereo3d_camera_items; | return stereo3d_camera_items; | ||||
| } | } | ||||
| #ifdef WITH_INPUT_HMD | |||||
| static void rna_SpaceView3D_use_hmd_mirror_update(bContext *C, PointerRNA *ptr, PropertyRNA *UNUSED(prop)) | |||||
| { | |||||
| View3D *v3d = (View3D *)ptr->data; | |||||
| ScrArea *sa = CTX_wm_area(C); | |||||
| BLI_assert(sa->spacetype == SPACE_VIEW3D); | |||||
| BLI_assert(sa->spacedata.first == v3d); | |||||
| for (ARegion *ar = sa->regionbase.first; ar; ar = ar->next) { | |||||
| if (ar->regiontype == RGN_TYPE_WINDOW) { | |||||
| RegionView3D *rv3d = ar->regiondata; | |||||
| if ((v3d->flag3 & V3D_SHOW_HMD_MIRROR) && (rv3d->viewlock & RV3D_LOCKED) == 0) { | |||||
| rv3d->viewlock |= RV3D_LOCKED_SHARED; | |||||
| } | |||||
| else if (((v3d->flag3 & V3D_SHOW_HMD_MIRROR) == 0) && RV3D_IS_LOCKED_SHARED(rv3d)) { | |||||
| rv3d->viewlock &= ~RV3D_LOCKED_SHARED; | |||||
| } | |||||
| } | |||||
| } | |||||
| } | |||||
| #endif | |||||
| /* Space Image Editor */ | /* Space Image Editor */ | ||||
| static PointerRNA rna_SpaceImageEditor_uvedit_get(PointerRNA *ptr) | static PointerRNA rna_SpaceImageEditor_uvedit_get(PointerRNA *ptr) | ||||
| { | { | ||||
| return rna_pointer_inherit_refine(ptr, &RNA_SpaceUVEditor, ptr->data); | return rna_pointer_inherit_refine(ptr, &RNA_SpaceUVEditor, ptr->data); | ||||
| } | } | ||||
| static void rna_SpaceImageEditor_mode_update(Main *bmain, Scene *scene, PointerRNA *UNUSED(ptr)) | static void rna_SpaceImageEditor_mode_update(Main *bmain, Scene *scene, PointerRNA *UNUSED(ptr)) | ||||
| ▲ Show 20 Lines • Show All 2,016 Lines • ▼ Show 20 Lines | static void rna_def_space_view3d(BlenderRNA *brna) | ||||
| RNA_def_property_ui_text(prop, "Volume", "Show the stereo 3d frustum volume"); | RNA_def_property_ui_text(prop, "Volume", "Show the stereo 3d frustum volume"); | ||||
| 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, "stereo_3d_volume_alpha", PROP_FLOAT, PROP_FACTOR); | prop = RNA_def_property(srna, "stereo_3d_volume_alpha", PROP_FLOAT, PROP_FACTOR); | ||||
| RNA_def_property_float_sdna(prop, NULL, "stereo3d_volume_alpha"); | RNA_def_property_float_sdna(prop, NULL, "stereo3d_volume_alpha"); | ||||
| RNA_def_property_ui_text(prop, "Volume Alpha", "Opacity (alpha) of the cameras' frustum volume"); | RNA_def_property_ui_text(prop, "Volume Alpha", "Opacity (alpha) of the cameras' frustum volume"); | ||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, NULL); | ||||
| #ifdef WITH_INPUT_HMD | |||||
| prop = RNA_def_property(srna, "use_hmd_mirror", PROP_BOOLEAN, PROP_NONE); | |||||
| RNA_def_property_boolean_sdna(prop, NULL, "flag3", V3D_SHOW_HMD_MIRROR); | |||||
| RNA_def_property_ui_text(prop, "Mirror HMD View", "Link the orientation of this 3D View to the HMD view " | |||||
| "(may slowdown viewport drawing)"); | |||||
| RNA_def_property_flag(prop, PROP_CONTEXT_UPDATE); | |||||
| RNA_def_property_update(prop, NC_SPACE | ND_SPACE_VIEW3D, "rna_SpaceView3D_use_hmd_mirror_update"); | |||||
| #endif | |||||
| /* *** Animated *** */ | /* *** Animated *** */ | ||||
| RNA_define_animate_sdna(true); | RNA_define_animate_sdna(true); | ||||
| /* region */ | /* region */ | ||||
| srna = RNA_def_struct(brna, "RegionView3D", NULL); | srna = RNA_def_struct(brna, "RegionView3D", NULL); | ||||
| RNA_def_struct_sdna(srna, "RegionView3D"); | RNA_def_struct_sdna(srna, "RegionView3D"); | ||||
| RNA_def_struct_ui_text(srna, "3D View Region", "3D View region data"); | RNA_def_struct_ui_text(srna, "3D View Region", "3D View region data"); | ||||
| ▲ Show 20 Lines • Show All 2,009 Lines • Show Last 20 Lines | |||||