Page MenuHome

Asad-ullah Khan (kh4n)
Developer

Projects

User does not belong to any projects.

User Details

User Since
Jul 19 2019, 1:42 AM (37 w, 12 h)

Recent Activity

Wed, Apr 1

Asad-ullah Khan (kh4n) removed a watcher for Grease Pencil: Asad-ullah Khan (kh4n).
Wed, Apr 1, 3:53 AM

Mon, Mar 16

Asad-ullah Khan (kh4n) updated the diff for D7018: Fix T74205: manually adjust op_undo_depth to account for sculpt mode undo differences.

Naming was wrong

Mon, Mar 16, 5:03 AM · Sculpt, Paint, Texture, BF Blender
Asad-ullah Khan (kh4n) added a comment to D7018: Fix T74205: manually adjust op_undo_depth to account for sculpt mode undo differences.

Sigh, I have mucked it up...give me a sec

Mon, Mar 16, 4:25 AM · Sculpt, Paint, Texture, BF Blender
Asad-ullah Khan (kh4n) updated the diff for D7018: Fix T74205: manually adjust op_undo_depth to account for sculpt mode undo differences.

Now using sculpt_undo_push_end_ex

Mon, Mar 16, 4:23 AM · Sculpt, Paint, Texture, BF Blender

Tue, Mar 10

Asad-ullah Khan (kh4n) added a comment to D7018: Fix T74205: manually adjust op_undo_depth to account for sculpt mode undo differences.

Hmm I don't believe this skips or does any additional undo pushes. All it does is set op_undo_depth to a value that sculpt_undo_push_end expects. By doing this, the stack_init variable is cleared, preventing an assertion failure down the road

Tue, Mar 10, 12:54 AM · Sculpt, Paint, Texture, BF Blender

Thu, Mar 5

Asad-ullah Khan (kh4n) updated the summary of D7018: Fix T74205: manually adjust op_undo_depth to account for sculpt mode undo differences.
Thu, Mar 5, 4:16 AM · Sculpt, Paint, Texture, BF Blender

Wed, Mar 4

Asad-ullah Khan (kh4n) updated the diff for D7018: Fix T74205: manually adjust op_undo_depth to account for sculpt mode undo differences.

Fixing bad diff

Wed, Mar 4, 5:19 PM · Sculpt, Paint, Texture, BF Blender
Asad-ullah Khan (kh4n) added a comment to D7018: Fix T74205: manually adjust op_undo_depth to account for sculpt mode undo differences.

OH no I have made a mistake....fixing it shortly

Wed, Mar 4, 5:17 PM · Sculpt, Paint, Texture, BF Blender
Asad-ullah Khan (kh4n) updated the diff for D7018: Fix T74205: manually adjust op_undo_depth to account for sculpt mode undo differences.

Fixed comment style

Wed, Mar 4, 5:14 PM · Sculpt, Paint, Texture, BF Blender
Asad-ullah Khan (kh4n) updated the summary of D7018: Fix T74205: manually adjust op_undo_depth to account for sculpt mode undo differences.
Wed, Mar 4, 5:13 PM · Sculpt, Paint, Texture, BF Blender
Asad-ullah Khan (kh4n) added a comment to D7018: Fix T74205: manually adjust op_undo_depth to account for sculpt mode undo differences.

I will fix the comment format, but I don't follow that last part 😅 do you mean I should add some of my previous notes into the comments?

Wed, Mar 4, 4:56 PM · Sculpt, Paint, Texture, BF Blender

Mar 4 2020

Asad-ullah Khan (kh4n) added a comment to T74398: Weight- Vertex- and Texture Painting circle halts when moving under menu..

Ahh I see. It should be added that this does not happen if you are pressing and holding the left mouse button. If I might suggest a slightly more expressive blend file (I have attached it)

Mar 4 2020, 9:52 AM · User Interface, BF Blender
Asad-ullah Khan (kh4n) added a comment to T74400: in object mode pivot point settings bounding box and median point are ignored, and always treated as origin..

Yeah sorry about that, will be more careful next time 😅

Mar 4 2020, 9:23 AM · BF Blender
Asad-ullah Khan (kh4n) changed the status of T74400: in object mode pivot point settings bounding box and median point are ignored, and always treated as origin. from Confirmed to Needs Triage.

Actually I take that back, this may be by design. I believe these two modes are only useful if you are selecting multiple things (it works just fine in that case). I don't know for sure though, so I'll change it back to Needs Triage

Mar 4 2020, 8:31 AM · BF Blender
Asad-ullah Khan (kh4n) changed the status of T74400: in object mode pivot point settings bounding box and median point are ignored, and always treated as origin. from Needs Triage to Confirmed.
Mar 4 2020, 6:46 AM · BF Blender
Asad-ullah Khan (kh4n) added a comment to D6976: Fix T74331: Updated "View Selected" in preferences->keymap to "Frame Selected".

@Brecht Van Lommel (brecht) I changed it where I could find, let me know if anything else needs to be done

Mar 4 2020, 6:33 AM · BF Blender
Asad-ullah Khan (kh4n) added a comment to T74205: Crash in sculpt mode at trying to rotate after a cancelled rotate .

Ahh I'll submit my initial solution, alternative is just too glitchy having to hit Ctrl+z multiple times to undo. Revision here: https://developer.blender.org/D7018

Mar 4 2020, 6:22 AM · Sculpt, Paint, Texture, BF Blender
Asad-ullah Khan (kh4n) created D7018: Fix T74205: manually adjust op_undo_depth to account for sculpt mode undo differences.
Mar 4 2020, 6:20 AM · Sculpt, Paint, Texture, BF Blender
Asad-ullah Khan (kh4n) added a comment to T74205: Crash in sculpt mode at trying to rotate after a cancelled rotate .

Haha, that is true, I just wanted to get at least a slightly less hacky solution before I submitted anything. Also, I'm not familiar with layout mode, but the way I found this solution is by first looking at what happens in Object mode, and then realizing that sculpt mode does undos in a completely different way. Object mode cancels never touch stack_init, whereas sculpt does for all operations. There are also many other differences and also comments that say sculpt mode does undos differently. Essentially sculpt mode does all its ops differently (which is fine because it handles it own stuff) but for rotates etc. it borrows the other ones, which all set OPTYPE_UNDO, which it explicitly doesn't:

/* Flags (sculpt does own undo? (ton)). */
ot->flag = OPTYPE_BLOCKING;

line 8355 blender/source/blender/editors/sculpt_paint/sculpt.c SCULPT_OT_brush_stroke
Adding OPTYPE_UNDO and removing condition sculpt_undo_push_end(void) is another solution, but then you have to hit Ctrl+Z a few times before it actually undoes anything :/
Should I bother submitting either of these?

Mar 4 2020, 5:05 AM · Sculpt, Paint, Texture, BF Blender

Mar 3 2020

Asad-ullah Khan (kh4n) added a comment to T74205: Crash in sculpt mode at trying to rotate after a cancelled rotate .

I have a hack that seems to work, maybe someone who knows more can make it better. File blender/source/blender/editors/transform/transform.c in saveTransform lines 1842-1851:

if ((t->options & CTX_SCULPT) && !(t->options & CTX_PAINT_CURVE)) {
  wmWindowManager *wm = CTX_wm_manager(C);
  if (t->state == TRANS_CANCEL) {
    wm->op_undo_depth--;
  }
  ED_sculpt_end_transform(C);
  if (t->state == TRANS_CANCEL) {
    wm->op_undo_depth++;
  }
}

The core issue is that wm->op_undo_depth is supposed to be 0 here, but it isn't, so I just force it. The reason it is not zero is because of line 1988 of blender/source/blender/windowmanager/intern/wm_event_system.c (wm_handler_operator_call) which is:

if (ot->flag & OPTYPE_UNDO) {
        wm->op_undo_depth++;
}

For whatever reason, canceling while doing a transform has OPTYPE_UNDO. This (I think) is the true cause of the issue.

Mar 3 2020, 9:06 AM · Sculpt, Paint, Texture, BF Blender

Mar 2 2020

Asad-ullah Khan (kh4n) updated the diff for D6976: Fix T74331: Updated "View Selected" in preferences->keymap to "Frame Selected".

Now all "View Selected" instances have been changed

Mar 2 2020, 10:09 PM · BF Blender
Asad-ullah Khan (kh4n) added a comment to T74205: Crash in sculpt mode at trying to rotate after a cancelled rotate .

Ok, it looks like there is a matching call to ED_sculpt_end_transform(C); at line 1843 in blender/source/blender/editors/transform/transform.c (saveTrasform), but it does not reset the step_init because wm->op_undo_depth == 0 has to be true (line 1143 blender/source/blender/editors/sculpt_paint/sculpt_undo.c in sculpt_undo_push_end(void)) but in this case it is equal to 1. Forcefully setting it to 0 does not work (segfault later in code). Looks like it is set 0 after the call in line 2004 in blender/source/blender/windowmanager/intern/wm_event_system.c

Mar 2 2020, 9:53 PM · Sculpt, Paint, Texture, BF Blender
Asad-ullah Khan (kh4n) added a comment to T74205: Crash in sculpt mode at trying to rotate after a cancelled rotate .

I think I can add some info. For starters, this happens when any transform is applied, not just rotate. The other operations (translate, scale, etc.) on the left toolbar (where all the sculpting tools are) all the way down also cause this problem. You can manually click and drag to eg. translate, then without releasing drag, hit escape, and then drag again (or any other operation) for the assertion to fail. Now, for the diagnosis, I believe the culprit is in this callstack, whose sequence is only called when the rotate/translate/scale commands are cancelled with escape:

recalcData_sculpt(TransInfo * t) (blender/source/blender/editors/transform/transform_generics.c:1164)
recalcData(TransInfo * t) (blender/source/blender/editors/transform/transform_generics.c:1188)
restoreTransObjects(TransInfo * t) (blender/source/blender/editors/transform/transform_generics.c:1976)
transformEnd(bContext * C, TransInfo * t) (blender/source/blender/editors/transform/transform.c:2266)
transform_modal(bContext * C, wmOperator * op, const wmEvent * event) (blender/source/blender/editors/transform/transform_ops.c:434)
Mar 2 2020, 11:57 AM · Sculpt, Paint, Texture, BF Blender
Asad-ullah Khan (kh4n) added a comment to T74330: Pose Library not saving rotations for bones prefixed with "DEF_".

Ah I think I see what you mean: https://blender.stackexchange.com/a/142727
Just tried with a bone named DEFsomething and it happened. Definitely not intuitive, what can be done?

Mar 2 2020, 6:18 AM · Animation & Rigging, BF Blender
Asad-ullah Khan (kh4n) added a comment to T74330: Pose Library not saving rotations for bones prefixed with "DEF_".

Wait what is by design?

Mar 2 2020, 5:58 AM · Animation & Rigging, BF Blender
Asad-ullah Khan (kh4n) added a comment to T74330: Pose Library not saving rotations for bones prefixed with "DEF_".

Been trying to see what could be causing it, but it might be out of my scope. Will list all of the things I've noticed here:

Mar 2 2020, 4:51 AM · Animation & Rigging, BF Blender
Asad-ullah Khan (kh4n) added a comment to D6976: Fix T74331: Updated "View Selected" in preferences->keymap to "Frame Selected".

I have gone ahead and changed the ones I've found, but before I submit the diff, I was wondering (since this also makes all the callback names wrong too) why not just change the "Frame Selected" in the action menu back to "View Selected"? Especially since some of the other menus have "View <something>" operators as well?

Mar 2 2020, 3:36 AM · BF Blender

Mar 1 2020

Asad-ullah Khan (kh4n) added a comment to D6976: Fix T74331: Updated "View Selected" in preferences->keymap to "Frame Selected".

There are other "View Selected" instances, but none of them have the same description as this one. Should I still change them? Or is there somewhere else I should look? Currently, I am only looking for/modifying ot->name fields

Mar 1 2020, 8:12 PM · BF Blender
Asad-ullah Khan (kh4n) added a comment to T74330: Pose Library not saving rotations for bones prefixed with "DEF_".

I have successfully reproduced this bug.

Mar 1 2020, 9:05 AM · Animation & Rigging, BF Blender
Asad-ullah Khan (kh4n) added a comment to T74331: Hotkey action mislabeled.

Done. Link: https://developer.blender.org/D6976
I did not specify a reviewer; do I need to specify someone?

Mar 1 2020, 7:36 AM · User Interface, BF Blender
Asad-ullah Khan (kh4n) created D6976: Fix T74331: Updated "View Selected" in preferences->keymap to "Frame Selected".
Mar 1 2020, 7:34 AM · BF Blender
Asad-ullah Khan (kh4n) added a comment to T74331: Hotkey action mislabeled.

I believe I have a fix: line 3113 of blender/source/blender/editors/space_view3d/view3d_edit.c
Change ot->name to "Frame Selected"

Mar 1 2020, 7:13 AM · User Interface, BF Blender

Jul 19 2019

Asad-ullah Khan (kh4n) updated Asad-ullah Khan (kh4n).
Jul 19 2019, 5:10 PM
Asad-ullah Khan (kh4n) updated Asad-ullah Khan (kh4n).
Jul 19 2019, 5:09 PM
Asad-ullah Khan (kh4n) added a watcher for Grease Pencil: Asad-ullah Khan (kh4n).
Jul 19 2019, 5:08 PM