diff --git a/source/blender/editors/interface/eyedroppers/eyedropper_colorband.cc b/source/blender/editors/interface/eyedroppers/eyedropper_colorband.cc index 82fc29390b9..dde0063c447 100644 --- a/source/blender/editors/interface/eyedroppers/eyedropper_colorband.cc +++ b/source/blender/editors/interface/eyedroppers/eyedropper_colorband.cc @@ -96,7 +96,7 @@ static bool eyedropper_colorband_init(bContext *C, wmOperator *op) /* Set this to a sub-member of the property to trigger an update. */ rna_update_ptr = ptr; - rna_update_prop = &rna_ColorRamp_color_mode; + rna_update_prop = rna_ColorRamp_color_mode; is_undo = RNA_struct_undo_check(ptr.type); } } diff --git a/source/blender/editors/interface/interface_handlers.cc b/source/blender/editors/interface/interface_handlers.cc index dc706448071..4a43ecf537c 100644 --- a/source/blender/editors/interface/interface_handlers.cc +++ b/source/blender/editors/interface/interface_handlers.cc @@ -964,7 +964,7 @@ static void ui_apply_but_undo(uiBut *but) * because undo systems track data by their ID, see: #67002. */ /* Exception for active shape-key, since changing this in edit-mode updates * the shape key from object mode data. */ - if (ELEM(but->rnaprop, &rna_ID_name, &rna_Object_active_shape_key_index)) { + if (ELEM(but->rnaprop, rna_ID_name, rna_Object_active_shape_key_index)) { /* pass */ } else { diff --git a/source/blender/editors/space_action/space_action.cc b/source/blender/editors/space_action/space_action.cc index 57034a18b53..7973737657b 100644 --- a/source/blender/editors/space_action/space_action.cc +++ b/source/blender/editors/space_action/space_action.cc @@ -492,10 +492,10 @@ static void saction_main_region_message_subscribe(const wmRegionMessageSubscribe { bool use_preview = (scene->r.flag & SCER_PRV_RANGE); const PropertyRNA *props[] = { - use_preview ? &rna_Scene_frame_preview_start : &rna_Scene_frame_start, - use_preview ? &rna_Scene_frame_preview_end : &rna_Scene_frame_end, - &rna_Scene_use_preview_range, - &rna_Scene_frame_current, + use_preview ? rna_Scene_frame_preview_start : rna_Scene_frame_start, + use_preview ? rna_Scene_frame_preview_end : rna_Scene_frame_end, + rna_Scene_use_preview_range, + rna_Scene_frame_current, }; PointerRNA idptr = RNA_id_pointer_create(&scene->id); diff --git a/source/blender/editors/space_graph/space_graph.cc b/source/blender/editors/space_graph/space_graph.cc index 0b3369f484c..4bf20752997 100644 --- a/source/blender/editors/space_graph/space_graph.cc +++ b/source/blender/editors/space_graph/space_graph.cc @@ -518,10 +518,10 @@ static void graph_region_message_subscribe(const wmRegionMessageSubscribeParams { bool use_preview = (scene->r.flag & SCER_PRV_RANGE); const PropertyRNA *props[] = { - use_preview ? &rna_Scene_frame_preview_start : &rna_Scene_frame_start, - use_preview ? &rna_Scene_frame_preview_end : &rna_Scene_frame_end, - &rna_Scene_use_preview_range, - &rna_Scene_frame_current, + use_preview ? rna_Scene_frame_preview_start : rna_Scene_frame_start, + use_preview ? rna_Scene_frame_preview_end : rna_Scene_frame_end, + rna_Scene_use_preview_range, + rna_Scene_frame_current, }; PointerRNA idptr = RNA_id_pointer_create(&scene->id); diff --git a/source/blender/editors/space_nla/space_nla.cc b/source/blender/editors/space_nla/space_nla.cc index 0d781eab15a..c54ff9a4284 100644 --- a/source/blender/editors/space_nla/space_nla.cc +++ b/source/blender/editors/space_nla/space_nla.cc @@ -435,10 +435,10 @@ static void nla_main_region_message_subscribe(const wmRegionMessageSubscribePara { bool use_preview = (scene->r.flag & SCER_PRV_RANGE); const PropertyRNA *props[] = { - use_preview ? &rna_Scene_frame_preview_start : &rna_Scene_frame_start, - use_preview ? &rna_Scene_frame_preview_end : &rna_Scene_frame_end, - &rna_Scene_use_preview_range, - &rna_Scene_frame_current, + use_preview ? rna_Scene_frame_preview_start : rna_Scene_frame_start, + use_preview ? rna_Scene_frame_preview_end : rna_Scene_frame_end, + rna_Scene_use_preview_range, + rna_Scene_frame_current, }; PointerRNA idptr = RNA_id_pointer_create(&scene->id); diff --git a/source/blender/editors/space_sequencer/space_sequencer.cc b/source/blender/editors/space_sequencer/space_sequencer.cc index 1fa56a3d0ec..a9ed11a2550 100644 --- a/source/blender/editors/space_sequencer/space_sequencer.cc +++ b/source/blender/editors/space_sequencer/space_sequencer.cc @@ -604,10 +604,10 @@ static void sequencer_main_region_message_subscribe(const wmRegionMessageSubscri { bool use_preview = (scene->r.flag & SCER_PRV_RANGE); const PropertyRNA *props[] = { - use_preview ? &rna_Scene_frame_preview_start : &rna_Scene_frame_start, - use_preview ? &rna_Scene_frame_preview_end : &rna_Scene_frame_end, - &rna_Scene_use_preview_range, - &rna_Scene_frame_current, + use_preview ? rna_Scene_frame_preview_start : rna_Scene_frame_start, + use_preview ? rna_Scene_frame_preview_end : rna_Scene_frame_end, + rna_Scene_use_preview_range, + rna_Scene_frame_current, }; PointerRNA idptr = RNA_id_pointer_create(&scene->id); diff --git a/source/blender/editors/space_view3d/view3d_gizmo_camera.cc b/source/blender/editors/space_view3d/view3d_gizmo_camera.cc index 4350a156fde..4b0af95b656 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_camera.cc +++ b/source/blender/editors/space_view3d/view3d_gizmo_camera.cc @@ -260,16 +260,16 @@ static void WIDGETGROUP_camera_message_subscribe(const bContext *C, { const PropertyRNA *props[] = { - &rna_CameraDOFSettings_focus_distance, - &rna_Camera_display_size, - &rna_Camera_ortho_scale, - &rna_Camera_sensor_fit, - &rna_Camera_sensor_width, - &rna_Camera_sensor_height, - &rna_Camera_shift_x, - &rna_Camera_shift_y, - &rna_Camera_type, - &rna_Camera_lens, + rna_CameraDOFSettings_focus_distance, + rna_Camera_display_size, + rna_Camera_ortho_scale, + rna_Camera_sensor_fit, + rna_Camera_sensor_width, + rna_Camera_sensor_height, + rna_Camera_shift_x, + rna_Camera_shift_y, + rna_Camera_type, + rna_Camera_lens, }; PointerRNA idptr = RNA_id_pointer_create(&ca->id); diff --git a/source/blender/editors/space_view3d/view3d_gizmo_tool_generic.cc b/source/blender/editors/space_view3d/view3d_gizmo_tool_generic.cc index 7d7892322e9..1323aedc698 100644 --- a/source/blender/editors/space_view3d/view3d_gizmo_tool_generic.cc +++ b/source/blender/editors/space_view3d/view3d_gizmo_tool_generic.cc @@ -174,7 +174,7 @@ static void WIDGETGROUP_gizmo_message_subscribe(const bContext *C, { const PropertyRNA *props[] = { - &rna_ToolSettings_workspace_tool_type, + rna_ToolSettings_workspace_tool_type, }; Scene *scene = CTX_data_scene(C); diff --git a/source/blender/editors/transform/transform.cc b/source/blender/editors/transform/transform.cc index 9d7b0f3426f..371f5442614 100644 --- a/source/blender/editors/transform/transform.cc +++ b/source/blender/editors/transform/transform.cc @@ -1784,19 +1784,19 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op) if (t->spacetype == SPACE_NODE) { snap_flag_ptr = &ts->snap_flag_node; - msg_key_params.prop = &rna_ToolSettings_use_snap_node; + msg_key_params.prop = rna_ToolSettings_use_snap_node; } else if (t->spacetype == SPACE_IMAGE) { snap_flag_ptr = &ts->snap_uv_flag; - msg_key_params.prop = &rna_ToolSettings_use_snap_uv; + msg_key_params.prop = rna_ToolSettings_use_snap_uv; } else if (t->spacetype == SPACE_SEQ) { snap_flag_ptr = &ts->snap_flag_seq; - msg_key_params.prop = &rna_ToolSettings_use_snap_sequencer; + msg_key_params.prop = rna_ToolSettings_use_snap_sequencer; } else { snap_flag_ptr = &ts->snap_flag; - msg_key_params.prop = &rna_ToolSettings_use_snap; + msg_key_params.prop = rna_ToolSettings_use_snap; } if (t->modifiers & MOD_SNAP) { diff --git a/source/blender/editors/transform/transform_gizmo_2d.cc b/source/blender/editors/transform/transform_gizmo_2d.cc index 2f0851a1559..d6088b6966e 100644 --- a/source/blender/editors/transform/transform_gizmo_2d.cc +++ b/source/blender/editors/transform/transform_gizmo_2d.cc @@ -123,8 +123,8 @@ static void gizmo2d_pivot_point_message_subscribe(wmGizmoGroup *gzgroup, PointerRNA ptr = RNA_pointer_create(&screen->id, &RNA_SpaceImageEditor, sima); { const PropertyRNA *props[] = { - &rna_SpaceImageEditor_pivot_point, - (sima->around == V3D_AROUND_CURSOR) ? &rna_SpaceImageEditor_cursor_location : nullptr, + rna_SpaceImageEditor_pivot_point, + (sima->around == V3D_AROUND_CURSOR) ? rna_SpaceImageEditor_cursor_location : nullptr, }; for (int i = 0; i < ARRAY_SIZE(props); i++) { if (props[i] == nullptr) { diff --git a/source/blender/editors/transform/transform_gizmo_3d.cc b/source/blender/editors/transform/transform_gizmo_3d.cc index 135224786e2..a63fce69fdc 100644 --- a/source/blender/editors/transform/transform_gizmo_3d.cc +++ b/source/blender/editors/transform/transform_gizmo_3d.cc @@ -1225,7 +1225,7 @@ void gizmo_xform_message_subscribe(wmGizmoGroup *gzgroup, PointerRNA scene_ptr = RNA_id_pointer_create(&scene->id); { const PropertyRNA *props[] = { - &rna_Scene_transform_orientation_slots, + rna_Scene_transform_orientation_slots, }; for (int i = 0; i < ARRAY_SIZE(props); i++) { WM_msg_subscribe_rna(mbus, &scene_ptr, props[i], &msg_sub_value_gz_tag_refresh, __func__); @@ -1241,8 +1241,8 @@ void gizmo_xform_message_subscribe(wmGizmoGroup *gzgroup, { const PropertyRNA *props[] = { - &rna_TransformOrientationSlot_type, - &rna_TransformOrientationSlot_use, + rna_TransformOrientationSlot_type, + rna_TransformOrientationSlot_use, }; for (int i = 0; i < ARRAY_SIZE(props); i++) { if (props[i]) { @@ -1257,7 +1257,7 @@ void gizmo_xform_message_subscribe(wmGizmoGroup *gzgroup, if (ELEM(type_fn, VIEW3D_GGT_xform_gizmo, VIEW3D_GGT_xform_shear)) { const PropertyRNA *props[] = { - &rna_ToolSettings_transform_pivot_point, + rna_ToolSettings_transform_pivot_point, }; for (int i = 0; i < ARRAY_SIZE(props); i++) { WM_msg_subscribe_rna( @@ -1267,7 +1267,7 @@ void gizmo_xform_message_subscribe(wmGizmoGroup *gzgroup, { const PropertyRNA *props[] = { - &rna_ToolSettings_workspace_tool_type, + rna_ToolSettings_workspace_tool_type, }; for (int i = 0; i < ARRAY_SIZE(props); i++) { WM_msg_subscribe_rna( @@ -1281,9 +1281,9 @@ void gizmo_xform_message_subscribe(wmGizmoGroup *gzgroup, GizmoGroup *ggd = static_cast(gzgroup->customdata); if (ggd->use_twtype_refresh) { const PropertyRNA *props[] = { - &rna_SpaceView3D_show_gizmo_object_translate, - &rna_SpaceView3D_show_gizmo_object_rotate, - &rna_SpaceView3D_show_gizmo_object_scale, + rna_SpaceView3D_show_gizmo_object_translate, + rna_SpaceView3D_show_gizmo_object_rotate, + rna_SpaceView3D_show_gizmo_object_scale, }; for (int i = 0; i < ARRAY_SIZE(props); i++) { WM_msg_subscribe_rna(mbus, &view3d_ptr, props[i], &msg_sub_value_gz_tag_refresh, __func__); diff --git a/source/blender/editors/transform/transform_gizmo_extrude_3d.cc b/source/blender/editors/transform/transform_gizmo_extrude_3d.cc index 62a16ae260c..a031ff71246 100644 --- a/source/blender/editors/transform/transform_gizmo_extrude_3d.cc +++ b/source/blender/editors/transform/transform_gizmo_extrude_3d.cc @@ -480,7 +480,7 @@ static void gizmo_mesh_extrude_message_subscribe(const bContext *C, PointerRNA toolsettings_ptr = RNA_pointer_create( &scene->id, &RNA_ToolSettings, scene->toolsettings); const PropertyRNA *props[] = { - &rna_ToolSettings_workspace_tool_type, + rna_ToolSettings_workspace_tool_type, }; for (int i = 0; i < ARRAY_SIZE(props); i++) { WM_msg_subscribe_rna( diff --git a/source/blender/makesrna/intern/makesrna.cc b/source/blender/makesrna/intern/makesrna.cc index 40c4939c1c7..7b9a786c7f2 100644 --- a/source/blender/makesrna/intern/makesrna.cc +++ b/source/blender/makesrna/intern/makesrna.cc @@ -1625,7 +1625,7 @@ static char *rna_def_property_begin_func( fprintf(f, "\n memset(iter, 0, sizeof(*iter));\n"); fprintf(f, " iter->parent = *ptr;\n"); - fprintf(f, " iter->prop = (PropertyRNA *)&rna_%s_%s;\n", srna->identifier, prop->identifier); + fprintf(f, " iter->prop = rna_%s_%s;\n", srna->identifier, prop->identifier); if (dp->dnalengthname || dp->dnalengthfixed) { if (manualfunc) { @@ -3725,13 +3725,18 @@ static void rna_generate_blender(BlenderRNA *brna, FILE *f) static void rna_generate_external_property_prototypes(BlenderRNA *brna, FILE *f) { + fprintf(f, "struct PropertyRNA;\n\n"); + rna_generate_struct_rna_prototypes(brna, f); + /* NOTE: Generate generic `PropertyRNA *` pointers. The actual, type-refined properties data are + * static variables in their translation units (the `_gen.cc` files), which addresses are + * assigned to these public generic `PointerRNA *` pointers. */ for (StructRNA *srna = static_cast(brna->structs.first); srna; srna = static_cast(srna->cont.next)) { LISTBASE_FOREACH (PropertyRNA *, prop, &srna->cont.properties) { - fprintf(f, "extern struct PropertyRNA rna_%s_%s;\n", srna->identifier, prop->identifier); + fprintf(f, "extern struct PropertyRNA *rna_%s_%s;\n", srna->identifier, prop->identifier); } fprintf(f, "\n"); } @@ -3743,14 +3748,14 @@ static void rna_generate_internal_property_prototypes(BlenderRNA * /*brna*/, { StructRNA *base; + /* NOTE: Generic `PropertyRNA *` pointers, see #rna_generate_external_property_prototypes + * comments for details. */ base = srna->base; while (base) { fprintf(f, "\n"); LISTBASE_FOREACH (PropertyRNA *, prop, &base->cont.properties) { fprintf(f, - "%s%s rna_%s_%s;\n", - "RNA_EXTERN_C_OR_EXTERN ", - rna_property_structname(prop->type), + "RNA_EXTERN_C_OR_EXTERN PropertyRNA *rna_%s_%s;\n", base->identifier, prop->identifier); } @@ -3762,11 +3767,7 @@ static void rna_generate_internal_property_prototypes(BlenderRNA * /*brna*/, } LISTBASE_FOREACH (PropertyRNA *, prop, &srna->cont.properties) { - fprintf(f, - "RNA_EXTERN_C %s rna_%s_%s;\n", - rna_property_structname(prop->type), - srna->identifier, - prop->identifier); + fprintf(f, "RNA_EXTERN_C PropertyRNA *rna_%s_%s;\n", srna->identifier, prop->identifier); } fprintf(f, "\n"); } @@ -3776,11 +3777,11 @@ static void rna_generate_parameter_prototypes(BlenderRNA * /*brna*/, FunctionRNA *func, FILE *f) { + /* NOTE: Generic `PropertyRNA *` pointers, see #rna_generate_external_property_prototypes + * comments for details. */ LISTBASE_FOREACH (PropertyRNA *, parm, &func->cont.properties) { fprintf(f, - "%s%s rna_%s_%s_%s;\n", - "extern ", - rna_property_structname(parm->type), + "extern PropertyRNA *rna_%s_%s_%s;\n", srna->identifier, func->identifier, parm->identifier); @@ -3801,12 +3802,7 @@ static void rna_generate_function_prototypes(BlenderRNA *brna, StructRNA *srna, for (func = static_cast(base->functions.first); func; func = static_cast(func->cont.next)) { - fprintf(f, - "%s%s rna_%s_%s_func;\n", - "extern ", - "FunctionRNA", - base->identifier, - func->identifier); + fprintf(f, "extern FunctionRNA rna_%s_%s_func;\n", base->identifier, func->identifier); rna_generate_parameter_prototypes(brna, base, func, f); } @@ -3820,8 +3816,7 @@ static void rna_generate_function_prototypes(BlenderRNA *brna, StructRNA *srna, for (func = static_cast(srna->functions.first); func; func = static_cast(func->cont.next)) { - fprintf( - f, "%s%s rna_%s_%s_func;\n", "extern ", "FunctionRNA", srna->identifier, func->identifier); + fprintf(f, "extern FunctionRNA rna_%s_%s_func;\n", srna->identifier, func->identifier); rna_generate_parameter_prototypes(brna, srna, func, f); } @@ -4306,23 +4301,24 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr break; } + /* Generate the RNA-private, type-refined property data. + * + * See #rna_generate_external_property_prototypes comments for details. */ fprintf(f, - "%s rna_%s%s_%s = {\n", + "static %s rna_%s%s_%s_ = {\n", rna_property_structname(prop->type), srna->identifier, strnest, prop->identifier); if (prop->next) { - fprintf( - f, "\t{(PropertyRNA *)&rna_%s%s_%s, ", srna->identifier, strnest, prop->next->identifier); + fprintf(f, "\t{rna_%s%s_%s, ", srna->identifier, strnest, prop->next->identifier); } else { fprintf(f, "\t{nullptr, "); } if (prop->prev) { - fprintf( - f, "(PropertyRNA *)&rna_%s%s_%s,\n", srna->identifier, strnest, prop->prev->identifier); + fprintf(f, "rna_%s%s_%s,\n", srna->identifier, strnest, prop->prev->identifier); } else { fprintf(f, "nullptr,\n"); @@ -4569,7 +4565,20 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr } } - fprintf(f, "};\n\n"); + fprintf(f, "};\n"); + + /* Assign the RNA-private, type-refined static (local) property data address to the public + * matching generic `PropertyRNA *` pointer. + * + * See #rna_generate_external_property_prototypes comments for details. */ + fprintf(f, + "PropertyRNA *rna_%s%s_%s = reinterpret_cast(&rna_%s%s_%s_);\n\n", + srna->identifier, + strnest, + prop->identifier, + srna->identifier, + strnest, + prop->identifier); if (freenest) { MEM_freeN(strnest); @@ -4622,11 +4631,7 @@ static void rna_generate_struct(BlenderRNA * /*brna*/, StructRNA *srna, FILE *f) parm = static_cast(func->cont.properties.first); if (parm) { - fprintf(f, - "\t{(PropertyRNA *)&rna_%s_%s_%s, ", - srna->identifier, - func->identifier, - parm->identifier); + fprintf(f, "\t{rna_%s_%s_%s, ", srna->identifier, func->identifier, parm->identifier); } else { fprintf(f, "\t{nullptr, "); @@ -4634,11 +4639,7 @@ static void rna_generate_struct(BlenderRNA * /*brna*/, StructRNA *srna, FILE *f) parm = static_cast(func->cont.properties.last); if (parm) { - fprintf(f, - "(PropertyRNA *)&rna_%s_%s_%s}},\n", - srna->identifier, - func->identifier, - parm->identifier); + fprintf(f, "rna_%s_%s_%s}},\n", srna->identifier, func->identifier, parm->identifier); } else { fprintf(f, "nullptr}},\n"); @@ -4659,11 +4660,7 @@ static void rna_generate_struct(BlenderRNA * /*brna*/, StructRNA *srna, FILE *f) } if (func->c_ret) { - fprintf(f, - "\t(PropertyRNA *)&rna_%s_%s_%s\n", - srna->identifier, - func->identifier, - func->c_ret->identifier); + fprintf(f, "\trna_%s_%s_%s\n", srna->identifier, func->identifier, func->c_ret->identifier); } else { fprintf(f, "\tnullptr\n"); @@ -4692,7 +4689,7 @@ static void rna_generate_struct(BlenderRNA * /*brna*/, StructRNA *srna, FILE *f) prop = static_cast(srna->cont.properties.first); if (prop) { - fprintf(f, "\t{(PropertyRNA *)&rna_%s_%s, ", srna->identifier, prop->identifier); + fprintf(f, "\t{rna_%s_%s, ", srna->identifier, prop->identifier); } else { fprintf(f, "\t{nullptr, "); @@ -4700,7 +4697,7 @@ static void rna_generate_struct(BlenderRNA * /*brna*/, StructRNA *srna, FILE *f) prop = static_cast(srna->cont.properties.last); if (prop) { - fprintf(f, "(PropertyRNA *)&rna_%s_%s}},\n", srna->identifier, prop->identifier); + fprintf(f, "rna_%s_%s}},\n", srna->identifier, prop->identifier); } else { fprintf(f, "nullptr}},\n"); @@ -4723,7 +4720,7 @@ static void rna_generate_struct(BlenderRNA * /*brna*/, StructRNA *srna, FILE *f) base = base->base; } - fprintf(f, "\t(PropertyRNA *)&rna_%s_%s, ", base->identifier, prop->identifier); + fprintf(f, "\trna_%s_%s, ", base->identifier, prop->identifier); } else { fprintf(f, "\tnullptr, "); @@ -4734,7 +4731,7 @@ static void rna_generate_struct(BlenderRNA * /*brna*/, StructRNA *srna, FILE *f) while (base->base && base->base->iteratorproperty == prop) { base = base->base; } - fprintf(f, "(PropertyRNA *)&rna_%s_rna_properties,\n", base->identifier); + fprintf(f, "rna_%s_rna_properties,\n", base->identifier); if (srna->base) { fprintf(f, "\t&RNA_%s,\n", srna->base->identifier); diff --git a/source/blender/makesrna/intern/rna_access.cc b/source/blender/makesrna/intern/rna_access.cc index 7ae5b729c02..bfd995f7a5c 100644 --- a/source/blender/makesrna/intern/rna_access.cc +++ b/source/blender/makesrna/intern/rna_access.cc @@ -434,31 +434,31 @@ static bool rna_idproperty_verify_valid(PointerRNA *ptr, PropertyRNA *prop, IDPr } static PropertyRNA *typemap[IDP_NUMTYPES] = { - &rna_PropertyGroupItem_string, - &rna_PropertyGroupItem_int, - &rna_PropertyGroupItem_float, + rna_PropertyGroupItem_string, + rna_PropertyGroupItem_int, + rna_PropertyGroupItem_float, nullptr, nullptr, nullptr, - &rna_PropertyGroupItem_group, - &rna_PropertyGroupItem_id, - &rna_PropertyGroupItem_double, - &rna_PropertyGroupItem_idp_array, - &rna_PropertyGroupItem_bool, + rna_PropertyGroupItem_group, + rna_PropertyGroupItem_id, + rna_PropertyGroupItem_double, + rna_PropertyGroupItem_idp_array, + rna_PropertyGroupItem_bool, }; static PropertyRNA *arraytypemap[IDP_NUMTYPES] = { nullptr, - &rna_PropertyGroupItem_int_array, - &rna_PropertyGroupItem_float_array, + rna_PropertyGroupItem_int_array, + rna_PropertyGroupItem_float_array, nullptr, nullptr, nullptr, - &rna_PropertyGroupItem_collection, + rna_PropertyGroupItem_collection, nullptr, - &rna_PropertyGroupItem_double_array, + rna_PropertyGroupItem_double_array, nullptr, - (PropertyRNA *)&rna_PropertyGroupItem_bool_array, + rna_PropertyGroupItem_bool_array, }; void rna_property_rna_or_id_get(PropertyRNA *prop, @@ -533,7 +533,7 @@ void rna_property_rna_or_id_get(PropertyRNA *prop, const IDPropertyUIDataInt *ui_data_int = reinterpret_cast( idprop->ui_data); if (ui_data_int && ui_data_int->enum_items_num > 0) { - r_prop_rna_or_id->rnaprop = &rna_PropertyGroupItem_enum; + r_prop_rna_or_id->rnaprop = rna_PropertyGroupItem_enum; return; } } @@ -571,7 +571,7 @@ PropertyRNA *rna_ensure_property(PropertyRNA *prop) const IDPropertyUIDataInt *ui_data_int = reinterpret_cast( idprop->ui_data); if (ui_data_int && ui_data_int->enum_items_num > 0) { - return &rna_PropertyGroupItem_enum; + return rna_PropertyGroupItem_enum; } } return typemap[int(idprop->type)]; diff --git a/source/blender/windowmanager/intern/wm_operators.cc b/source/blender/windowmanager/intern/wm_operators.cc index 4fe08ff8a76..1a284da9eae 100644 --- a/source/blender/windowmanager/intern/wm_operators.cc +++ b/source/blender/windowmanager/intern/wm_operators.cc @@ -2627,7 +2627,7 @@ static void radial_control_set_initial_mouse(bContext *C, RadialControl *rc, con d[1] *= zoom[1]; } rc->scale_fac = 1.0f; - if (rc->ptr.owner_id && GS(rc->ptr.owner_id->name) == ID_BR && rc->prop == &rna_Brush_size) { + if (rc->ptr.owner_id && GS(rc->ptr.owner_id->name) == ID_BR && rc->prop == rna_Brush_size) { Brush *brush = reinterpret_cast(rc->ptr.owner_id); if ((brush && brush->gpencil_settings) && (brush->ob_mode == OB_MODE_PAINT_GPENCIL_LEGACY) && (brush->gpencil_tool == GPAINT_TOOL_DRAW) && (brush->flag & BRUSH_LOCK_SIZE) != 0) diff --git a/source/blender/windowmanager/message_bus/wm_message_bus.hh b/source/blender/windowmanager/message_bus/wm_message_bus.hh index 49bd39be248..e9ac44c1526 100644 --- a/source/blender/windowmanager/message_bus/wm_message_bus.hh +++ b/source/blender/windowmanager/message_bus/wm_message_bus.hh @@ -218,7 +218,7 @@ void WM_msg_publish_ID(wmMsgBus *mbus, ID *id); { \ wmMsgParams_RNA msg_key_params_ = {{0}}; \ msg_key_params_.ptr = RNA_pointer_create(id_, &RNA_##type_, data_); \ - msg_key_params_.prop = &rna_##type_##_##prop_; \ + msg_key_params_.prop = rna_##type_##_##prop_; \ WM_msg_publish_rna_params(mbus, &msg_key_params_); \ } \ ((void)0) @@ -226,7 +226,7 @@ void WM_msg_publish_ID(wmMsgBus *mbus, ID *id); { \ wmMsgParams_RNA msg_key_params_ = {{0}}; \ msg_key_params_.ptr = RNA_pointer_create(id_, &RNA_##type_, data_); \ - msg_key_params_.prop = &rna_##type_##_##prop_; \ + msg_key_params_.prop = rna_##type_##_##prop_; \ WM_msg_subscribe_rna_params(mbus, &msg_key_params_, value, __func__); \ } \ ((void)0) @@ -246,7 +246,7 @@ void WM_msg_publish_ID(wmMsgBus *mbus, ID *id); PointerRNA msg_ptr_ = {0, &RNA_##type_}; \ wmMsgParams_RNA msg_key_params_ = {{0}}; \ msg_key_params_.ptr = msg_ptr_; \ - msg_key_params_.prop = &rna_##type_##_##prop_; \ + msg_key_params_.prop = rna_##type_##_##prop_; \ \ WM_msg_subscribe_rna_params(mbus, &msg_key_params_, value, __func__); \ } \