Cannot Execute TOOL_PROPs draw #58944

Closed
opened 2018-12-07 15:20:53 +01:00 by Tomasz Muszynski · 19 comments

System Information
Operating system: Windows
Graphics card:

Blender Version
Broken:
2.80 2018-12-06

Worked: (optional)
2.79

Short description of error
The TOOL_PROPs window does not appear after execution operator via PROPERITEIS Panel Button Click or Python Console

Exact steps for others to reproduce the error

Download and install this add-on
https://github.com/muchasty/Lightmap-Auto-UV/tree/master/SureUVbox-2.80

After clicking button: Properiteis->Object Data->Sure UVW Mapping->[ UVW Box Map ]
the mapping is processed but cannot see a popup window [TOOL_PROPS] on the 3DView with parameters to interactive change.
Only when I execute operator bpy.ops.object.sureuvw_operator(action='box') from PieMenuEtior Addon then this popup TOOL_PROPS window appears ( see attached JPEG image )
But if I try to run this operator from Python Console then nothing appears.

It all worked fine with 2.79.

SureUVWMap.JPG

**System Information** Operating system: Windows Graphics card: **Blender Version** Broken: 2.80 2018-12-06 Worked: (optional) 2.79 **Short description of error** The TOOL_PROPs window does not appear after execution operator via PROPERITEIS Panel Button Click or Python Console **Exact steps for others to reproduce the error** Download and install this add-on https://github.com/muchasty/Lightmap-Auto-UV/tree/master/SureUVbox-2.80 After clicking button: *Properiteis->Object Data->Sure UVW Mapping->*[ **UVW Box Map** ] the mapping is processed but cannot see a popup window [TOOL_PROPS] on the 3DView with parameters to interactive change. Only when I execute operator ***bpy.ops.object.sureuvw_operator(action='box')*** from PieMenuEtior Addon then this popup TOOL_PROPS window appears ( see attached JPEG image ) But if I try to run this operator from Python Console then nothing appears. It all worked fine with 2.79. ![SureUVWMap.JPG](https://archive.blender.org/developer/F5870926/SureUVWMap.JPG)

Added subscriber: @TomaszMuszynski

Added subscriber: @TomaszMuszynski
Member

Added subscriber: @lichtwerk

Added subscriber: @lichtwerk
Member

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'
Philipp Oeser self-assigned this 2018-12-07 16:56:01 +01:00
Member

This addon is not maintained by blender, so please report the bug to the original author https://github.com/muchasty/Lightmap-Auto-UV/issues

This addon is not maintained by blender, so please report the bug to the original author https://github.com/muchasty/Lightmap-Auto-UV/issues

Hold your horses Philipp!

Why is that after changes that have been made in API of Blender cannot show that TOOL_PROPs until the mouse cursor is inside the 3dView area or operator is executed form element related to 3dView (as i.e. menu) ?
It worked with no problems with previous version of Blender.
I think that there could be a problem with API.
Official docs do not mention that changes made for 2.80 API can influence on that TOOL_PROPs appearance !!!!!
If I am wrong then tell me what should I change to adapt to changes you made in new API and update the API changes log for other developers.

Could you be so kind and reinvestigate that case, please?

Hold your horses Philipp! Why is that after changes that have been made in API of Blender cannot show that TOOL_PROPs until the mouse cursor is inside the 3dView area or operator is executed form element related to 3dView (as i.e. menu) ? It worked with no problems with previous version of Blender. I think that there could be a problem with API. Official docs do not mention that changes made for 2.80 API can influence on that TOOL_PROPs appearance !!!!! If I am wrong then tell me what should I change to adapt to changes you made in new API and update the API changes log for other developers. Could you be so kind and reinvestigate that case, please?
Member

Added subscribers: @WilliamReynish, @ideasman42

Added subscribers: @WilliamReynish, @ideasman42
Member

As far as I can see the reason for that is that the UI for adjusting the Last operation changed in 2.8 (see #55039, #57731).
In 2.79 it was showing in the 3D View for any command [no matter what editor it was executed in]. I think we all agree this was awkward if you had to have a 3D View open to tweak something you were doing in the UVEditor for example.
In 2.8 this is now done per Editor [Image Editor has it, 3D View has it, probably more to come...]

OK, so without relying on your particular addon, lets move the discussion to something more general (in a way you have already done that in your previous post, thx)
The same thing/issue can be observed with the Python Template ui_panel_simple.py that is shipping with blender [in Text Editor > Templates]
(It makes a panel in Properties Editor with an operator button to add a cube)

  • In 2.79 operator settings for adding the cube could be tweaked in the 3d view (even though executed from the Properties Editor)
  • In 2.8 there is no HUD to tweak the settings for the op when being executed from the Properties Editor (Properties Editor just doesnt have it)

Atm. I am unaware of a method to tweak/override the operator context (see [here ]], [ https:*docs.blender.org/api/blender2.8/bpy.ops.html?#overriding-context | here ) to an extend that it would be thinking it was executed from the 3D view.
(I might have done something wrong but I wasnt able to get it to work when calling an operator from a UILayout, also tried tweaking context in invoke() to no avail...)

As a (workaround) solution you could of course move your UI from the Properties Editor to the 3D view sidebar / N-Panel [but I could understand if this is not desired...]

I will add @WilliamReynish and @ideasman42 here to discuss further if this is considered an issue to be solved? [or if this can be done right now (and I just dont know how to do...)]

As far as I can see the reason for that is that the UI for adjusting the Last operation changed in 2.8 (see #55039, #57731). In 2.79 it was showing **in the 3D View** for **any** command [no matter what editor it was executed in]. I think we all agree this was awkward if you had to have a 3D View open to tweak something you were doing in the UVEditor for example. In 2.8 this is now done per Editor [Image Editor has it, 3D View has it, probably more to come...] OK, so without relying on your particular addon, lets move the discussion to something more general (in a way you have already done that in your previous post, thx) The same thing/issue can be observed with the Python Template `ui_panel_simple.py` that is shipping with blender [in `Text Editor` > `Templates`] (It makes a panel in Properties Editor with an operator button to add a cube) - In 2.79 operator settings for adding the cube could be tweaked in the 3d view (even though executed from the Properties Editor) - In 2.8 there is no HUD to tweak the settings for the op when being executed from the Properties Editor (Properties Editor just doesnt have it) Atm. I am unaware of a method to tweak/override the operator context (see [here ]], [[ https:*docs.blender.org/api/blender2.8/bpy.ops.html?#overriding-context | here ](https:*docs.blender.org/api/blender2.8/bpy.types.UILayout.html?highlight=uilayout#bpy.types.UILayout.operator_context)) to an extend that it would be thinking it was executed from the 3D view. (I might have done something wrong but I wasnt able to get it to work when calling an operator from a UILayout, also tried tweaking context in `invoke()` to no avail...) As a (workaround) solution you could of course move your UI from the Properties Editor to the 3D view sidebar / N-Panel [but I could understand if this is not desired...] I will add @WilliamReynish and @ideasman42 here to discuss further if this is considered an issue to be solved? [or if this can be done right now (and I just dont know how to do...)]

Yes, as you say, the solution would be for the operator to set a different context.

Or even simpler, just move this command into the UV menu inside the viewport where it belongs, and get the correct context for free.

I would say this is an issue with the addon more than an issue with Blender itself.

Yes, as you say, the solution would be for the operator to set a different context. Or even simpler, just move this command into the UV menu inside the viewport where it belongs, and get the correct context for free. I would say this is an issue with the addon more than an issue with Blender itself.
Member

Changed status from 'Archived' to: 'Open'

Changed status from 'Archived' to: 'Open'
Member

reopening for now...

reopening for now...
Member

@WilliamReynish : reg. setting the different context: do you know of an example that does that [when called from a UILayout.operator() -- sorry, seems I am too blind to see atm...]?

@WilliamReynish : reg. setting the different context: do you know of an example that does that [when called from a UILayout.operator() -- sorry, seems I am too blind to see atm...]?

@lichtwerk: Not sure, maybe @ideasman42 knows a way?

But why not just add these commands to the 3d viewport? We already have a menu for UV commands that can be extended.

@lichtwerk: Not sure, maybe @ideasman42 knows a way? But why not just add these commands to the 3d viewport? We already have a menu for UV commands that can be extended.

Thanks for taking care of this!

I could not find other solution so I add all operators to the UI menu in VIEW_3D (look at the images on the github main page).

https://github.com/muchasty/UV-Tools
Now it works fine and seems to be placed right for the UX.

But many old and good add-ons that are abandoned somehow could have similar problems.
If there will be some annotation about changes with the limitations of the UI in 2.80 then we will able to do some adaptation.

Thanks for taking care of this! I could not find other solution so I add all operators to the UI menu in VIEW_3D (look at the images on the github main page). https://github.com/muchasty/UV-Tools Now it works fine and seems to be placed right for the UX. But many old and good add-ons that are abandoned somehow could have similar problems. If there will be some annotation about changes with the limitations of the UI in 2.80 then we will able to do some adaptation.

@TomaszMuszynski: I would simply add the item to the UV menu. What's the point of adding a panel? I see no reason for that. Just extend the appropriate place in Blender's UI - no need to invent new panels for simply adding more commands.

Like so:

Screenshot 2018-12-08 at 18.11.19.png

@TomaszMuszynski: I would simply add the item to the UV menu. What's the point of adding a panel? I see no reason for that. Just extend the appropriate place in Blender's UI - no need to invent new panels for simply adding more commands. Like so: ![Screenshot 2018-12-08 at 18.11.19.png](https://archive.blender.org/developer/F5889260/Screenshot_2018-12-08_at_18.11.19.png)

Panel is very handy for me.
But I will try to add it to the UV menu also.
I have to say that I do not use Blenders menu at all. Just shotcuts and panels.
I use menu only if I cannot find a shortcut for desired operation. :)

Panel is very handy for me. But I will try to add it to the UV menu also. I have to say that I do not use Blenders menu at all. Just shotcuts and panels. I use menu only if I cannot find a shortcut for desired operation. :)

We use the menus for all commands. If you want quicker access, users can map a shortcut or add to Quick Favourites. Adding UI panels just to add a command is not needed, and not appropriate.

Cheers

We use the menus for all commands. If you want quicker access, users can map a shortcut or add to Quick Favourites. Adding UI panels just to add a command is not needed, and not appropriate. Cheers
Member

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Member

I guess this can be considered "Resolved" now?

It was tempting to put these operators in the Properties Editor [close to other mesh related data], but as @WilliamReynish pointed out the UV menu provides even more context, so +1 for that [and panel in the sidebar also works...]

I guess this can be considered "Resolved" now? It was tempting to put these operators in the Properties Editor [close to other mesh related data], but as @WilliamReynish pointed out the UV menu provides even more context, so +1 for that [and panel in the sidebar also works...]

Not always one way is suitable for everyone.
We have tested sth like "one-right-way" in the past and it was called - communism. I honestly do not recommend that way for anyone :)
But I am joking now ...
Only one conclusion is that all depends on this what SHOULD and CAN (in the matter of resources and time) BE GIVEN in API for developers to use.
So all depends on you guys and your vision.
Thanks for taking care of it !

For me this case can be closed. Thank you!

Not always one way is suitable for everyone. We have tested sth like "one-right-way" in the past and it was called - communism. I honestly do not recommend that way for anyone :) But I am joking now ... Only one conclusion is that all depends on this what SHOULD and CAN (in the matter of resources and time) BE GIVEN in API for developers to use. So all depends on you guys and your vision. Thanks for taking care of it ! For me this case can be closed. Thank you!
Sign in to join this conversation.
No Label
Interest
Alembic
Interest
Animation & Rigging
Interest
Asset Browser
Interest
Asset Browser Project Overview
Interest
Audio
Interest
Automated Testing
Interest
Blender Asset Bundle
Interest
BlendFile
Interest
Collada
Interest
Compatibility
Interest
Compositing
Interest
Core
Interest
Cycles
Interest
Dependency Graph
Interest
Development Management
Interest
EEVEE
Interest
EEVEE & Viewport
Interest
Freestyle
Interest
Geometry Nodes
Interest
Grease Pencil
Interest
ID Management
Interest
Images & Movies
Interest
Import Export
Interest
Line Art
Interest
Masking
Interest
Metal
Interest
Modeling
Interest
Modifiers
Interest
Motion Tracking
Interest
Nodes & Physics
Interest
OpenGL
Interest
Overlay
Interest
Overrides
Interest
Performance
Interest
Physics
Interest
Pipeline, Assets & IO
Interest
Platforms, Builds & Tests
Interest
Python API
Interest
Render & Cycles
Interest
Render Pipeline
Interest
Sculpt, Paint & Texture
Interest
Text Editor
Interest
Translations
Interest
Triaging
Interest
Undo
Interest
USD
Interest
User Interface
Interest
UV Editing
Interest
VFX & Video
Interest
Video Sequencer
Interest
Virtual Reality
Interest
Vulkan
Interest
Wayland
Interest
Workbench
Interest: X11
Legacy
Blender 2.8 Project
Legacy
Milestone 1: Basic, Local Asset Browser
Legacy
OpenGL Error
Meta
Good First Issue
Meta
Papercut
Meta
Retrospective
Meta
Security
Module
Animation & Rigging
Module
Core
Module
Development Management
Module
EEVEE & Viewport
Module
Grease Pencil
Module
Modeling
Module
Nodes & Physics
Module
Pipeline, Assets & IO
Module
Platforms, Builds & Tests
Module
Python API
Module
Render & Cycles
Module
Sculpt, Paint & Texture
Module
Triaging
Module
User Interface
Module
VFX & Video
Platform
FreeBSD
Platform
Linux
Platform
macOS
Platform
Windows
Priority
High
Priority
Low
Priority
Normal
Priority
Unbreak Now!
Status
Archived
Status
Confirmed
Status
Duplicate
Status
Needs Info from Developers
Status
Needs Information from User
Status
Needs Triage
Status
Resolved
Type
Bug
Type
Design
Type
Known Issue
Type
Patch
Type
Report
Type
To Do
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender#58944
No description provided.