Page MenuHome

Can't undo annotations in Sculpt
Closed, ArchivedPublic

Description

System Information
Operating system: Windows-10-10.0.18362 64 Bits
Graphics card: Radeon RX 580 Series ATI Technologies Inc. 4.5.13570 Core Profile Context 19.8.1 26.20.13001.29010

Blender Version
Broken: version: 2.81 (sub 5), branch: master, commit date: 2019-09-04 00:01, hash: rBda25aca2677e
Worked: (optional)

Short description of error
Can't undo annotations in Sculpt Mode

Exact steps for others to reproduce the error
Go to sculpt
Make some strokes with annotation tool
CTRL+Z (can't undo)

Due to the lack of this feature I made a similar (and specific) way to undo annotations by just deleting the last stroke:
Also it can be temp. saved to perform a redo with the same operator.

class NSMUI_OT_SculptNotes_UndoStroke(Operator):
    bl_idname = "nsmui.sculpt_notes_undo_stroke"
    bl_label = "Undo Note in Sculpt"
    bl_options = {'REGISTER', 'UNDO'}

    def error(self, context):
        self.layout.label(text="No strokes to undo !")

    def execute(self, context):   
        noteData = context.scene.grease_pencil
        frame = noteData.layers.active.active_frame
        if len(frame.strokes) < 1:
            bpy.context.window_manager.popup_menu(NSMUI_OT_SculptNotes_UndoStroke.error, title = "Can't do this !", icon = 'INFO')
        else:
            numStrokes = len(frame.strokes)
            lastStroke = frame.strokes[numStrokes-1]
            frame.strokes.remove(lastStroke)
        return {'FINISHED'}

Event Timeline

Antonio Vazquez (antoniov) lowered the priority of this task from 90 to 50.Sep 5 2019, 7:37 PM

@Pablo Dobarro (pablodp606) Do you know what can be the reason? In object mode the Undo works perfect, but in Sculpt mode the Ctrl+Z is not working.

@Antonio Vazquez (antoniov) I checked it and it is calling the specific sculpt mesh undo code after a grease pencil stroke, so it is not doing anything. Probably sculpt_undosys_poll needs to check if the last operation was a grease pencil stroke.

Philipp Oeser (lichtwerk) lowered the priority of this task from 50 to 30.Nov 20 2019, 4:23 PM

Cant redo this in rB0418e2894467, guess this is resolved (there were some changes to sculpt undo, no?)

Can anyone still reproduce this?

Philipp Oeser (lichtwerk) changed the task status from Unknown Status to Unknown Status.Dec 5 2019, 3:25 PM
Philipp Oeser (lichtwerk) claimed this task.

More than a week without reply or activity. Due to the policy of the tracker archiving for until required info/data are provided.