nutti / Screencast-Keys

Blender Add-on: Screencast Keys
GNU General Public License v3.0
1.27k stars 112 forks source link

Wrong alignment when "Origin" set to "Window" #40

Closed ghost closed 3 years ago

ghost commented 3 years ago

System Information

Description about the bug

  1. When "Origin" option set to "Windows", and "Align" option set to "Center", the keys prompt is displayed at right border of current Blender window.
  2. ... and "Align" option set to "Right", the keys prompt is missing from screen.

Screenshots/Files [Optional]
https://pasteboard.co/JGqWW7l.jpg

Additional comments [Optional] My graphic card is outdated, I wonder if this is the culprit for this error.

nutti commented 3 years ago

@camtofu

Unfortunately, I could not reproduce this issue in my environment. Is it possible to test without GPU?

BTW, blender does not support 300 series officially. https://www.blender.org/download/requirements/ So, I recommend you to use newer graphic card.

ghost commented 3 years ago

@nutti I corrected a typo in my former report, Former (wrong) below,

  1. ... and "Align" option set to "Center", the keys prompt is missing from screen.

Corrected below,

  1. ... and "Align" option set to "Right", the keys prompt is missing from screen.

Could you please give one more test?

Have a good day.

nutti commented 3 years ago

@camtofu

Yeah, I have already tried them. But I found there is no issue.

ghost commented 3 years ago

On my machine, below modification fixed my reported issue. But I don't know the reason. I don't know coding.

File: ops.py

Line 625: x += (window.width * 2 - draw_area_width) / 2 change to x += (window.width - draw_area_width) / 2

Line 654 x += window.width * 2 - draw_area_width change to x += window.width - draw_area_width

nutti commented 3 years ago

@camtofu

In my environment, your patch does not work correctly. From my investigation, window.width does not return correct value in my environment. I'm not sure whether this is blender's bug or specification. But your patch looks good to me.

I'll check this patch in other environment. If this patch is valid, I'll approve this patch. If possible, I would like you to make a pull request to include this patch to this project. Of course, I will add your name to the author of this add-on.

MjTs140914 commented 3 years ago

Can overlay active if blender statup?

I mean when I open the blender, this tool is immediately active and no need to activate it again, can you provide that option?

I use Blender 2.9

nutti commented 3 years ago

@MjTs140914

Please do not post your issue which is not related to the original issue. Instead, you need to make new issue.

Also, your issue is already found FAQ. Please see it why this feature is not supported in this add-on.

MjTs140914 commented 3 years ago

@nutti I'm really sorry.

nutti commented 3 years ago

@camtofu

I confirmed that your patch is valid in other environment. And I also posted this problem to the D.B.O. https://developer.blender.org/T84204

Anyway, your patch should be included in this project. Is it possible to make a pull request?

Thanks for your great work!

ghost commented 3 years ago

Is it possible to make a pull request?

@nutti

To be frank, I don't know how to pull request. I'm not a coder.

It would be very kind of you to include my patch into the code. Thank you.

nutti commented 3 years ago

@camtofu

OK. Then I will merge it. If you don't mind, I will add your name to the author and contributor.

If you want to do this, could you give me your name to be registered.

ghost commented 3 years ago

If you don't mind, I will add your name to the author and contributor.

@nutti Thank you very much but plz don't bother to do that.

nutti commented 3 years ago

@camtofu

I merged your patch. Thanks for your contribution!

I didn't add your name to the contribution list because of your wish. Please do not hesitate if you change your mind.