Page MenuHome

rna_gizmo_target_set_prop reports incorrect propname
Closed, ResolvedPublic

Description

System Information
Operating system: n/a
Graphics card: n/a

master
Broken: master since e12c08e8d170
Worked: (optional)

Attempting to set an invalid property in in the widget API causes a confusing error message. Fix shown below:

File: https://developer.blender.org/diffusion/B/browse/master/source/blender/makesrna/intern/rna_wm_gizmo_api.c
Line: 87-94

  PropertyRNA *prop = RNA_struct_find_property(ptr, propname);
	  if (prop == NULL) {
	    BKE_reportf(reports,
	                RPT_ERROR,
	                "Property '%s.%s' not found",
	                RNA_struct_identifier(ptr->type),
	                target_propname); <----------------------- this should be propname
	    return;
	  }

It's also unintuitive that target is used to refer to the gizmo property, when target implicitly refers to a foreign class.