Giter Site home page Giter Site logo

bl_ui_widgets's People

Contributors

jayanam avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

bl_ui_widgets's Issues

please add more UI widget, such as InputBox\CheckBox

This project is amazing, using custom UI unit and OpenGL implement UI rather than the inner classes, like Panel\Menu.... This makes the UI more flexiable to creation. But the UI unit is not enough to use, lacking of InputBox\CheckBox\Dropdown\Table, etc. Hope you can realize these UI unit.

StructRNA of type DP_OT_draw_operator has been removed - when swiching to a new scene

Hi,
After opening blender client, I install the widget and invoke it with Ctrl + Shift + k. Everything works fine, the widget displays and works. Then with the widget displayed I click New -> General -> Don't save. In the Console I get the following stack trace:

Read prefs: C:\Users\Grzegorz\AppData\Roaming\Blender Foundation\Blender\2.90\config\userpref.blend
found bundled python: C:\Program Files\Blender Foundation\Blender 2.90\2.90\python
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\addons\bl_ui_widgets-master\bl_ui_draw_op.py", line 82, in draw_callback_px
for widget in self.widgets:
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\modules\bpy_types.py", line 717, in getattribute
properties = StructRNA.path_resolve(self, "properties")
ReferenceError: StructRNA of type DP_OT_draw_operator has been removed
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\addons\bl_ui_widgets-master\bl_ui_draw_op.py", line 82, in draw_callback_px
for widget in self.widgets:
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\modules\bpy_types.py", line 717, in getattribute
properties = StructRNA.path_resolve(self, "properties")
ReferenceError: StructRNA of type DP_OT_draw_operator has been removed
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\addons\bl_ui_widgets-master\bl_ui_draw_op.py", line 82, in draw_callback_px
for widget in self.widgets:
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\modules\bpy_types.py", line 717, in getattribute
properties = StructRNA.path_resolve(self, "properties")
ReferenceError: StructRNA of type DP_OT_draw_operator has been removed
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\addons\bl_ui_widgets-master\bl_ui_draw_op.py", line 82, in draw_callback_px
for widget in self.widgets:
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\modules\bpy_types.py", line 717, in getattribute
properties = StructRNA.path_resolve(self, "properties")
ReferenceError: StructRNA of type DP_OT_draw_operator has been removed
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\addons\bl_ui_widgets-master\bl_ui_draw_op.py", line 82, in draw_callback_px
for widget in self.widgets:
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\modules\bpy_types.py", line 717, in getattribute
properties = StructRNA.path_resolve(self, "properties")
ReferenceError: StructRNA of type DP_OT_draw_operator has been removed
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\addons\bl_ui_widgets-master\bl_ui_draw_op.py", line 82, in draw_callback_px
for widget in self.widgets:
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\modules\bpy_types.py", line 717, in getattribute
properties = StructRNA.path_resolve(self, "properties")
ReferenceError: StructRNA of type DP_OT_draw_operator has been removed
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\addons\bl_ui_widgets-master\bl_ui_draw_op.py", line 82, in draw_callback_px
for widget in self.widgets:
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\modules\bpy_types.py", line 717, in getattribute
properties = StructRNA.path_resolve(self, "properties")
ReferenceError: StructRNA of type DP_OT_draw_operator has been removed
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\addons\bl_ui_widgets-master\bl_ui_draw_op.py", line 82, in draw_callback_px
for widget in self.widgets:
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\modules\bpy_types.py", line 717, in getattribute
properties = StructRNA.path_resolve(self, "properties")
ReferenceError: StructRNA of type DP_OT_draw_operator has been removed
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\addons\bl_ui_widgets-master\bl_ui_draw_op.py", line 82, in draw_callback_px
for widget in self.widgets:
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\modules\bpy_types.py", line 717, in getattribute
properties = StructRNA.path_resolve(self, "properties")
ReferenceError: StructRNA of type DP_OT_draw_operator has been removed
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\addons\bl_ui_widgets-master\bl_ui_draw_op.py", line 82, in draw_callback_px
for widget in self.widgets:
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\modules\bpy_types.py", line 717, in getattribute
properties = StructRNA.path_resolve(self, "properties")
ReferenceError: StructRNA of type DP_OT_draw_operator has been removed
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\addons\bl_ui_widgets-master\bl_ui_draw_op.py", line 82, in draw_callback_px
for widget in self.widgets:
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\modules\bpy_types.py", line 717, in getattribute
properties = StructRNA.path_resolve(self, "properties")
ReferenceError: StructRNA of type DP_OT_draw_operator has been removed
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\addons\bl_ui_widgets-master\bl_ui_draw_op.py", line 82, in draw_callback_px
for widget in self.widgets:
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\modules\bpy_types.py", line 717, in getattribute
properties = StructRNA.path_resolve(self, "properties")
ReferenceError: StructRNA of type DP_OT_draw_operator has been removed
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\addons\bl_ui_widgets-master\bl_ui_draw_op.py", line 82, in draw_callback_px
for widget in self.widgets:
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\modules\bpy_types.py", line 717, in getattribute
properties = StructRNA.path_resolve(self, "properties")
ReferenceError: StructRNA of type DP_OT_draw_operator has been removed
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\addons\bl_ui_widgets-master\bl_ui_draw_op.py", line 82, in draw_callback_px
for widget in self.widgets:
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\modules\bpy_types.py", line 717, in getattribute
properties = StructRNA.path_resolve(self, "properties")
ReferenceError: StructRNA of type DP_OT_draw_operator has been removed
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\addons\bl_ui_widgets-master\bl_ui_draw_op.py", line 82, in draw_callback_px
for widget in self.widgets:
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\modules\bpy_types.py", line 717, in getattribute
properties = StructRNA.path_resolve(self, "properties")
ReferenceError: StructRNA of type DP_OT_draw_operator has been removed
Traceback (most recent call last):
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\addons\bl_ui_widgets-master\bl_ui_draw_op.py", line 82, in draw_callback_px
for widget in self.widgets:
File "C:\Program Files\Blender Foundation\Blender 2.90\2.90\scripts\modules\bpy_types.py", line 717, in getattribute
properties = StructRNA.path_resolve(self, "properties")
ReferenceError: StructRNA of type DP_OT_draw_operator has been removed

Then, in the new scene, when I press Ctrl + Shift + k, the widget displays, but in the consol window I get a continuous stream of errors exactly like above. Any idea how to fix this?

Ability to redefine layout on during modal

It would be great to re-define layout during execution, although it's possible that the new .visible property will be sufficient if it will work for e.g. a panel with children together.

Maximizing the area looses the connection

Simply hitting ctrl+space to maximize area throws error and causes the sampel widget operator to hang:
I think the library should store the link to areas differently (like indices or something), and should actively find a new area if it looses the original one, or end itself.

location: :-1
Error: Python: Traceback (most recent call last):
File "C:\Users\vilem\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\bl_ui_widgets-master\bl_ui_draw_op.py", line 60, in modal
def modal(self, context, event):
File "C:\Users\vilem\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\bl_ui_widgets-master\bl_ui_draw_op.py", line 52, in handle_widget_events

File "C:\Users\vilem\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\bl_ui_widgets-master\bl_ui_widget.py", line 93, in handle_event
inrect = self.is_in_rect(x, y)
File "C:\Users\vilem\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\bl_ui_widgets-master\bl_ui_widget.py", line 119, in is_in_rect
area_height = self.get_area_height()
File "C:\Users\vilem\AppData\Roaming\Blender Foundation\Blender\2.92\scripts\addons\bl_ui_widgets-master\bl_ui_widget.py", line 116, in get_area_height
return self.context.area.height
AttributeError: 'NoneType' object has no attribute 'height'

Mimic Blender's UI components and adopt themes colors

Hi Jayanam. I found your widgets so brilliant that I ended up making a fork of it with some additional features for my personal use. Now I've put together a full addon using the widgets and it works as expected. The few changes I did over your original code was to make the widgets mimic Blender's components and also to have them all follow the selected themes (in regards to colors, resolution scale etc). Thank you very much for creating this awesome UI and sharing it with the community. That is much appreciated. Everyone is welcome to take a look and try my fork at: githup.com/mmmrqs/bl_ui_widgets.

Below is a small image of how the sample panel appears on the viewport display.
sample

All the best,
Marcelo

Attempting to define multiple sliders confuses UI

image

her I defined 4 different sliders, mapped to different properties and added them to the widgets list. I epxected 4 sliders in a column. But instead all the sliders are on the same bar. I will dig into the panel setup code to understand how the sliders are populated.

Invoke widget when reloading scene

Hi, great tool. Instead of invoking the widget with a key combination I would like for it to happen whenever addon is loaded and I reload a scene. I tried to run it via Operator Search in the gui and by executing bpy.ops.object.dp_ot_draw_operator('EXEC_DEFAULT') in a persistent handler that I add in the register method - no success there. Any ideas? Thanks

Mouse enter/exit functions

Disecting what I tried to commit in the pull requests to a few needed functions.

-Need to call these to draw a tooltip or call own functions on entering elements.

-Also would be great to be able to parse keyboard shortcuts - on_keystroke or similar in modal function.

Further needed functions are actually for all mouse interactions - mouse wheel, right-click .

Button image upper right corner has wrong coordinates. (with solution)

bl_ui_button.py - from line 88 should be:

vertices = (
(self.x_screen + off_x, y_screen_flip - off_y),
(self.x_screen + off_x, y_screen_flip - sy - off_y),
(self.x_screen + off_x + sx, y_screen_flip - sy - off_y),
(self.x_screen + off_x + sx, y_screen_flip - off_y))

Currently there's a - off_x on the last coorinate Y which draws the corner offset on non-square offset values.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.