Type checks for internal ID-Property UI min/max/tip & use defines to get values from...
[blender.git] / source / blender / editors / sculpt_paint / paint_image.c
index ba73c488c461ce7dc61024fc1b0c9840b199b6bd..6a8d5043c43d5a96447ca96f5e5e6b04c6f3a691 100644 (file)
@@ -5452,10 +5452,10 @@ static int texture_paint_camera_project_exec(bContext *C, wmOperator *op)
        idgroup= IDP_GetProperties(&image->id, 0);
 
        if(idgroup) {
-               view_data= IDP_GetPropertyFromGroup(idgroup, PROJ_VIEW_DATA_ID);
+               view_data= IDP_GetPropertyTypeFromGroup(idgroup, PROJ_VIEW_DATA_ID, IDP_ARRAY);
 
                /* type check to make sure its ok */
-               if(view_data->len != PROJ_VIEW_DATA_SIZE || view_data->type != IDP_ARRAY || view_data->subtype != IDP_FLOAT) {
+               if(view_data->len != PROJ_VIEW_DATA_SIZE || view_data->subtype != IDP_FLOAT) {
                        BKE_report(op->reports, RPT_ERROR, "Image project data invalid.");
                        return OPERATOR_CANCELLED;
                }