23 const int *object_type_exclude_select)
25 const int view_value = (object_type_exclude_viewport != 0);
27 if (object_type_exclude_select) {
30 const int select_value = (*object_type_exclude_select & ~object_type_exclude_viewport) != 0;
31 return ICON_VIS_SEL_11 + (view_value << 1) + select_value;
34 return view_value ? ICON_HIDE_ON : ICON_HIDE_OFF;
44 area_region_from_regiondata(screen, rv3d, &
area, ®ion);
65 static void rna_SpaceTextEditor_region_location_from_cursor(
66 ID *
id,
SpaceText *
st,
int line,
int column,
int r_pixel_pos[2])
72 const int cursor_co[2] = {line, column};
94 srna,
"cursor_location_from_region",
"rna_SpaceNodeEditor_cursor_location_from_region");
97 parm =
RNA_def_int(func,
"x", 0, INT_MIN, INT_MAX,
"x",
"Region x coordinate", -10000, 10000);
99 parm =
RNA_def_int(func,
"y", 0, INT_MIN, INT_MAX,
"y",
"Region y coordinate", -10000, 10000);
109 srna,
"region_location_from_cursor",
"rna_SpaceTextEditor_region_location_from_cursor");
111 func,
"Retrieve the region position from the given line and character position");
113 parm =
RNA_def_int(func,
"line", 0, INT_MIN, INT_MAX,
"Line",
"Line index", 0, INT_MAX);
115 parm =
RNA_def_int(func,
"column", 0, INT_MIN, INT_MAX,
"Column",
"Column index", 0, INT_MAX);
118 func,
"result", 2,
NULL, -1, INT_MAX,
"",
"Region coordinates", -1, INT_MAX);
129 const char *identifier[2];
131 {
"Mesh", (1 <<
OB_MESH), {
"show_object_viewport_mesh",
"show_object_select_mesh"}},
134 {
"show_object_viewport_curve",
"show_object_select_curve"}},
135 {
"Surface", (1 <<
OB_SURF), {
"show_object_viewport_surf",
"show_object_select_surf"}},
136 {
"Meta", (1 <<
OB_MBALL), {
"show_object_viewport_meta",
"show_object_select_meta"}},
137 {
"Font", (1 <<
OB_FONT), {
"show_object_viewport_font",
"show_object_select_font"}},
140 {
"show_object_viewport_curves",
"show_object_select_curves"}},
143 {
"show_object_viewport_pointcloud",
"show_object_select_pointcloud"}},
144 {
"Volume", (1 <<
OB_VOLUME), {
"show_object_viewport_volume",
"show_object_select_volume"}},
147 {
"show_object_viewport_armature",
"show_object_select_armature"}},
150 {
"show_object_viewport_lattice",
"show_object_select_lattice"}},
151 {
"Empty", (1 <<
OB_EMPTY), {
"show_object_viewport_empty",
"show_object_select_empty"}},
154 {
"show_object_viewport_grease_pencil",
"show_object_select_grease_pencil"}},
155 {
"Camera", (1 <<
OB_CAMERA), {
"show_object_viewport_camera",
"show_object_select_camera"}},
156 {
"Light", (1 <<
OB_LAMP), {
"show_object_viewport_light",
"show_object_select_light"}},
159 {
"show_object_viewport_speaker",
"show_object_select_speaker"}},
162 {
"show_object_viewport_light_probe",
"show_object_select_light_probe"}},
165 const char *view_mask_member[2] = {
166 "object_type_exclude_viewport",
167 "object_type_exclude_select",
169 for (
int mask_index = 0; mask_index < 2; mask_index++) {
170 for (
int type_index = 0; type_index <
ARRAY_SIZE(info); type_index++) {
174 prop,
NULL, view_mask_member[mask_index], info[type_index].type_mask);
186 func =
RNA_def_function(srna,
"activate_asset_by_id",
"ED_fileselect_activate_by_id");
188 func,
"Activate and select the asset entry that represents the given ID");
199 "Whether to activate the ID immediately (false) or after the file browser refreshes (true)");
203 srna,
"activate_file_by_relative_path",
"ED_fileselect_activate_by_relpath");
205 "Set active file and add to selection based on relative path to "
206 "current File Browser directory");
210 func =
RNA_def_function(srna,
"deselect_all",
"ED_fileselect_deselect_all");
struct wmWindowManager * CTX_wm_manager(const bContext *C)
struct Main * CTX_data_main(const bContext *C)
struct Depsgraph * BKE_scene_ensure_depsgraph(struct Main *bmain, struct Scene *scene, struct ViewLayer *view_layer)
struct ARegion * BKE_area_find_region_type(const struct ScrArea *area, int type)
struct ARegion struct ARegion struct ScrArea * BKE_screen_find_area_from_space(struct bScreen *screen, struct SpaceLink *sl) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1
struct Depsgraph Depsgraph
Object is a sort of wrapper for general info.
bool ED_text_region_location_from_cursor(struct SpaceText *st, struct ARegion *region, const int cursor_co[2], int r_pixel_co[2])
void ED_view3d_update_viewmat(struct Depsgraph *depsgraph, const struct Scene *scene, struct View3D *v3d, struct ARegion *region, const float viewmat[4][4], const float winmat[4][4], const struct rcti *rect, bool offscreen)
const Depsgraph * depsgraph
static void area(int d1, int d2, int e1, int e2, float weights[2])
static const pxr::TfToken st("st", pxr::TfToken::Immortal)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, bool default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_int_array(StructOrFunctionRNA *cont_, const char *identifier, int len, const int *default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
void RNA_def_property_ui_text(PropertyRNA *prop, const char *name, const char *description)
FunctionRNA * RNA_def_function(StructRNA *srna, const char *identifier, const char *call)
void RNA_def_function_output(FunctionRNA *UNUSED(func), PropertyRNA *ret)
void RNA_def_property_struct_type(PropertyRNA *prop, const char *type)
void RNA_def_function_ui_description(FunctionRNA *func, const char *description)
void RNA_def_property_update(PropertyRNA *prop, int noteflag, const char *func)
PropertyRNA * RNA_def_property(StructOrFunctionRNA *cont_, const char *identifier, int type, int subtype)
void RNA_def_function_flag(FunctionRNA *func, int flag)
PropertyRNA * RNA_def_int(StructOrFunctionRNA *cont_, const char *identifier, int default_value, int hardmin, int hardmax, const char *ui_name, const char *ui_description, int softmin, int softmax)
void RNA_def_property_boolean_negative_sdna(PropertyRNA *prop, const char *structname, const char *propname, int64_t booleanbit)
void RNA_def_parameter_flags(PropertyRNA *prop, PropertyFlag flag_property, ParameterFlag flag_parameter)
int rna_object_type_visibility_icon_get_common(int object_type_exclude_viewport, const int *object_type_exclude_select)
void RNA_api_region_view3d(StructRNA *srna)
void rna_def_object_type_visibility_flags_common(StructRNA *srna, int noteflag)
void RNA_api_space_filebrowser(StructRNA *srna)
void RNA_api_space_node(StructRNA *srna)
void RNA_api_space_text(StructRNA *srna)
bScreen * WM_window_get_active_screen(const wmWindow *win)
ViewLayer * WM_window_get_active_view_layer(const wmWindow *win)
Scene * WM_window_get_active_scene(const wmWindow *win)