diff --git a/source/blender/editors/interface/eyedroppers/eyedropper_colorband.cc b/source/blender/editors/interface/eyedroppers/eyedropper_colorband.cc index 1dab3d82acc..e25e0bf1ce3 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 4532a1c091b..2ae97c181cf 100644 --- a/source/blender/editors/interface/interface_handlers.cc +++ b/source/blender/editors/interface/interface_handlers.cc @@ -965,7 +965,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 7973737657b..57034a18b53 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 4bf20752997..0b3369f484c 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 c54ff9a4284..0d781eab15a 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 a9ed11a2550..1fa56a3d0ec 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 4b0af95b656..4350a156fde 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 1323aedc698..7d7892322e9 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 371f5442614..9d7b0f3426f 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 d6088b6966e..2f0851a1559 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 a63fce69fdc..135224786e2 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 a031ff71246..62a16ae260c 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 0d5f498a627..f668dd97169 100644 --- a/source/blender/makesrna/intern/makesrna.cc +++ b/source/blender/makesrna/intern/makesrna.cc @@ -1621,7 +1621,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 = 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,14 +3725,14 @@ static void rna_generate_external_property_prototypes(BlenderRNA *brna, FILE *f) 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. */ + /* NOTE: Generate generic `PropertyRNA &` references. The actual, type-refined properties data + * are static variables in their translation units (the `_gen.cc` files), which are assigned to + * these public generic `PointerRNA &` references. */ 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 PropertyRNA *rna_%s_%s;\n", srna->identifier, prop->identifier); + fprintf(f, "extern PropertyRNA &rna_%s_%s;\n", srna->identifier, prop->identifier); } fprintf(f, "\n"); } @@ -3744,13 +3744,13 @@ static void rna_generate_internal_property_prototypes(BlenderRNA * /*brna*/, { StructRNA *base; - /* NOTE: Generic `PropertyRNA *` pointers, see #rna_generate_external_property_prototypes + /* NOTE: Generic `PropertyRNA &` references, 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, "extern PropertyRNA *rna_%s_%s;\n", base->identifier, prop->identifier); + fprintf(f, "extern PropertyRNA &rna_%s_%s;\n", base->identifier, prop->identifier); } base = base->base; } @@ -3760,7 +3760,7 @@ static void rna_generate_internal_property_prototypes(BlenderRNA * /*brna*/, } LISTBASE_FOREACH (PropertyRNA *, prop, &srna->cont.properties) { - fprintf(f, "extern PropertyRNA *rna_%s_%s;\n", srna->identifier, prop->identifier); + fprintf(f, "extern PropertyRNA &rna_%s_%s;\n", srna->identifier, prop->identifier); } fprintf(f, "\n"); } @@ -3770,11 +3770,11 @@ static void rna_generate_parameter_prototypes(BlenderRNA * /*brna*/, FunctionRNA *func, FILE *f) { - /* NOTE: Generic `PropertyRNA *` pointers, see #rna_generate_external_property_prototypes + /* NOTE: Generic `PropertyRNA &` references, see #rna_generate_external_property_prototypes * comments for details. */ LISTBASE_FOREACH (PropertyRNA *, parm, &func->cont.properties) { fprintf(f, - "extern PropertyRNA *rna_%s_%s_%s;\n", + "extern PropertyRNA &rna_%s_%s_%s;\n", srna->identifier, func->identifier, parm->identifier); @@ -4305,13 +4305,13 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr prop->identifier); if (prop->next) { - fprintf(f, "\t{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, "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"); @@ -4560,12 +4560,12 @@ static void rna_generate_property(FILE *f, StructRNA *srna, const char *nest, Pr fprintf(f, "};\n"); - /* Assign the RNA-private, type-refined static (local) property data address to the public - * matching generic `PropertyRNA *` pointer. + /* Assign the RNA-private, type-refined static (local) property data to the public matching + * generic `PropertyRNA &` reference. * * See #rna_generate_external_property_prototypes comments for details. */ fprintf(f, - "PropertyRNA *rna_%s%s_%s = reinterpret_cast(&rna_%s%s_%s_);\n\n", + "PropertyRNA &rna_%s%s_%s = reinterpret_cast(rna_%s%s_%s_);\n\n", srna->identifier, strnest, prop->identifier, @@ -4624,7 +4624,7 @@ static void rna_generate_struct(BlenderRNA * /*brna*/, StructRNA *srna, FILE *f) parm = static_cast(func->cont.properties.first); if (parm) { - fprintf(f, "\t{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, "); @@ -4632,7 +4632,7 @@ static void rna_generate_struct(BlenderRNA * /*brna*/, StructRNA *srna, FILE *f) parm = static_cast(func->cont.properties.last); if (parm) { - fprintf(f, "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"); @@ -4653,7 +4653,7 @@ static void rna_generate_struct(BlenderRNA * /*brna*/, StructRNA *srna, FILE *f) } if (func->c_ret) { - fprintf(f, "\trna_%s_%s_%s\n", srna->identifier, func->identifier, func->c_ret->identifier); + fprintf(f, "\t&rna_%s_%s_%s\n", srna->identifier, func->identifier, func->c_ret->identifier); } else { fprintf(f, "\tnullptr\n"); @@ -4682,7 +4682,7 @@ static void rna_generate_struct(BlenderRNA * /*brna*/, StructRNA *srna, FILE *f) prop = static_cast(srna->cont.properties.first); if (prop) { - fprintf(f, "\t{rna_%s_%s, ", srna->identifier, prop->identifier); + fprintf(f, "\t{&rna_%s_%s, ", srna->identifier, prop->identifier); } else { fprintf(f, "\t{nullptr, "); @@ -4690,7 +4690,7 @@ static void rna_generate_struct(BlenderRNA * /*brna*/, StructRNA *srna, FILE *f) prop = static_cast(srna->cont.properties.last); if (prop) { - fprintf(f, "rna_%s_%s}},\n", srna->identifier, prop->identifier); + fprintf(f, "&rna_%s_%s}},\n", srna->identifier, prop->identifier); } else { fprintf(f, "nullptr}},\n"); @@ -4713,7 +4713,7 @@ static void rna_generate_struct(BlenderRNA * /*brna*/, StructRNA *srna, FILE *f) base = base->base; } - fprintf(f, "\trna_%s_%s, ", base->identifier, prop->identifier); + fprintf(f, "\t&rna_%s_%s, ", base->identifier, prop->identifier); } else { fprintf(f, "\tnullptr, "); @@ -4724,7 +4724,7 @@ static void rna_generate_struct(BlenderRNA * /*brna*/, StructRNA *srna, FILE *f) while (base->base && base->base->iteratorproperty == prop) { base = base->base; } - fprintf(f, "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 6bfc74895de..06ea45773e8 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, - 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 595f4ad51d2..d9efaa2c3ae 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 3add92f6b94..7a36f51051b 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__); \ } \