"flip -> pen_flip" missing rename on particle edit mode
[blender.git] / source / blender / editors / physics / particle_edit.c
index d491b1a973111009d6fe3a2b4b079b9beb3cd29c..132533fc12314c34918ada4e51de1a3f6114c3ae 100644 (file)
@@ -3573,7 +3573,7 @@ static void brush_edit_apply_event(bContext *C, wmOperator *op, wmEvent *event)
        RNA_collection_add(op->ptr, "stroke", &itemptr);
 
        RNA_float_set_array(&itemptr, "mouse", mouse);
-       RNA_boolean_set(&itemptr, "flip", event->shift != 0); // XXX hardcoded
+       RNA_boolean_set(&itemptr, "pen_flip", event->shift != 0); // XXX hardcoded
 
        /* apply */
        brush_edit_apply(C, op, &itemptr);
@@ -4151,6 +4151,13 @@ static int clear_edited_exec(bContext *C, wmOperator *op)
                        DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
                }
        }
+       else { /* some operation might have protected hair from editing so let's clear the flag */
+               psys->recalc |= PSYS_RECALC_RESET;
+               psys->flag &= ~PSYS_GLOBAL_HAIR;
+               psys->flag &= ~PSYS_EDITED;
+               WM_event_add_notifier(C, NC_OBJECT|ND_PARTICLE|NA_EDITED, ob);
+               DAG_id_flush_update(&ob->id, OB_RECALC_DATA);
+       }
 
        return OPERATOR_FINISHED;
 }