Changeset View
Changeset View
Standalone View
Standalone View
source/blender/makesrna/intern/rna_wm_manipulator.c
| Show First 20 Lines • Show All 800 Lines • ▼ Show 20 Lines | static StructRNA *rna_ManipulatorGroup_register( | ||||
| dummywgt.setup_keymap = (have_function[1]) ? rna_manipulatorgroup_setup_keymap_cb : NULL; | dummywgt.setup_keymap = (have_function[1]) ? rna_manipulatorgroup_setup_keymap_cb : NULL; | ||||
| dummywgt.setup = (have_function[2]) ? rna_manipulatorgroup_setup_cb : NULL; | dummywgt.setup = (have_function[2]) ? rna_manipulatorgroup_setup_cb : NULL; | ||||
| dummywgt.refresh = (have_function[3]) ? rna_manipulatorgroup_refresh_cb : NULL; | dummywgt.refresh = (have_function[3]) ? rna_manipulatorgroup_refresh_cb : NULL; | ||||
| dummywgt.draw_prepare = (have_function[4]) ? rna_manipulatorgroup_draw_prepare_cb : NULL; | dummywgt.draw_prepare = (have_function[4]) ? rna_manipulatorgroup_draw_prepare_cb : NULL; | ||||
| wmManipulatorGroupType *wgt = WM_manipulatorgrouptype_append_ptr( | wmManipulatorGroupType *wgt = WM_manipulatorgrouptype_append_ptr( | ||||
| BPY_RNA_manipulatorgroup_wrapper, (void *)&dummywgt); | BPY_RNA_manipulatorgroup_wrapper, (void *)&dummywgt); | ||||
| { | |||||
| const char *bl_origin = RNA_struct_state_bl_origin_get(); | |||||
| if (bl_origin) { | |||||
| BLI_strncpy(wgt->bl_origin, bl_origin, sizeof(wgt->bl_origin)); | |||||
| } | |||||
| } | |||||
| if (wgt->flag & WM_MANIPULATORGROUPTYPE_PERSISTENT) { | if (wgt->flag & WM_MANIPULATORGROUPTYPE_PERSISTENT) { | ||||
| WM_manipulator_group_type_add_ptr_ex(wgt, mmap_type); | WM_manipulator_group_type_add_ptr_ex(wgt, mmap_type); | ||||
| /* update while blender is running */ | /* update while blender is running */ | ||||
| WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL); | WM_main_add_notifier(NC_SCREEN | NA_EDITED, NULL); | ||||
| } | } | ||||
| return dummywgt.ext.srna; | return dummywgt.ext.srna; | ||||
| ▲ Show 20 Lines • Show All 382 Lines • ▼ Show 20 Lines | #endif | ||||
| RNA_def_property_ui_text(prop, "Space type", "The space where the panel is going to be used in"); | RNA_def_property_ui_text(prop, "Space type", "The space where the panel is going to be used in"); | ||||
| prop = RNA_def_property(srna, "bl_region_type", PROP_ENUM, PROP_NONE); | prop = RNA_def_property(srna, "bl_region_type", PROP_ENUM, PROP_NONE); | ||||
| RNA_def_property_enum_sdna(prop, NULL, "type->mmap_params.regionid"); | RNA_def_property_enum_sdna(prop, NULL, "type->mmap_params.regionid"); | ||||
| RNA_def_property_enum_items(prop, rna_enum_region_type_items); | RNA_def_property_enum_items(prop, rna_enum_region_type_items); | ||||
| RNA_def_property_flag(prop, PROP_REGISTER); | RNA_def_property_flag(prop, PROP_REGISTER); | ||||
| RNA_def_property_ui_text(prop, "Region Type", "The region where the panel is going to be used in"); | RNA_def_property_ui_text(prop, "Region Type", "The region where the panel is going to be used in"); | ||||
| prop = RNA_def_property(srna, "bl_origin", PROP_STRING, PROP_NONE); | |||||
| RNA_def_property_string_sdna(prop, NULL, "type->bl_origin"); | |||||
| RNA_def_property_flag(prop, PROP_REGISTER_OPTIONAL); | |||||
| /* bl_options */ | /* bl_options */ | ||||
| static EnumPropertyItem manipulatorgroup_flag_items[] = { | static EnumPropertyItem manipulatorgroup_flag_items[] = { | ||||
| {WM_MANIPULATORGROUPTYPE_3D, "3D", 0, "3D", | {WM_MANIPULATORGROUPTYPE_3D, "3D", 0, "3D", | ||||
| "Use in 3D viewport"}, | "Use in 3D viewport"}, | ||||
| {WM_MANIPULATORGROUPTYPE_SCALE, "SCALE", 0, "Scale", | {WM_MANIPULATORGROUPTYPE_SCALE, "SCALE", 0, "Scale", | ||||
| "Scale to respect zoom (otherwise zoom independent draw size)"}, | "Scale to respect zoom (otherwise zoom independent draw size)"}, | ||||
| {WM_MANIPULATORGROUPTYPE_DEPTH_3D, "DEPTH_3D", 0, "Depth 3D", | {WM_MANIPULATORGROUPTYPE_DEPTH_3D, "DEPTH_3D", 0, "Depth 3D", | ||||
| "Supports culled depth by other objects in the view"}, | "Supports culled depth by other objects in the view"}, | ||||
| ▲ Show 20 Lines • Show All 100 Lines • Show Last 20 Lines | |||||