-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Invoke widget when reloading scene #6
Comments
Hi,
checkout these handlers
https://docs.blender.org/api/current/bpy.app.handlers.html
Best regards
Jayanam
…On Thu, Nov 19, 2020 at 9:38 PM gpogorzelski ***@***.***> wrote:
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. Any ideas? Thanks
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#6>, or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEJUGIF4MUM6F73WEPIX2PDSQV64JANCNFSM4T34V72Q>
.
|
Hi, thanks for the answer but unfortunately when I call bpy.ops.object.dp_ot_draw_operator('EXEC_DEFAULT') in a persistent handler as in the documentation link you providede it doesn't work. |
Could you send your code?
…On Fri, Nov 20, 2020 at 10:03 AM gpogorzelski ***@***.***> wrote:
Hi, thanks for the answer but unfortunately when I call
bpy.ops.object.dp_ot_draw_operator('EXEC_DEFAULT') in a persistent handler
as in the documentation link you providede it doesn't work.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEJUGIDOYCFYLATCVQFUYHLSQYWHNANCNFSM4T34V72Q>
.
|
And did you try "INVOKE_DEFAULT"
…On Fri, Nov 20, 2020 at 10:10 AM Jayanam ***@***.***> wrote:
Could you send your code?
On Fri, Nov 20, 2020 at 10:03 AM gpogorzelski ***@***.***>
wrote:
> Hi, thanks for the answer but unfortunately when I call
> bpy.ops.object.dp_ot_draw_operator('EXEC_DEFAULT') in a persistent handler
> as in the documentation link you providede it doesn't work.
>
> —
> You are receiving this because you commented.
> Reply to this email directly, view it on GitHub
> <#6 (comment)>,
> or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AEJUGIDOYCFYLATCVQFUYHLSQYWHNANCNFSM4T34V72Q>
> .
>
|
Hi, please find a minimal working example here: And yes I did try INVOKE_DEFAULT. Still no success |
Also, how would you change the value of the text label in the DP_OT_draw_operator, from outside of the class? Say I want to change the label to the number of the currently displayed frame, how would I access the operator instance and its members? |
An operator can have properties that you can define and change.
https://blender.stackexchange.com/questions/60422/access-operators-property-with-python
…On Fri, Nov 20, 2020 at 4:58 PM gpogorzelski ***@***.***> wrote:
Also, how would you change the value of the text label in the
DP_OT_draw_operator, from outside of the class? Say I want to change the
label to the number of the currently displayed frame, how would I access
the operator instance and its members?
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#6 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEJUGIBBBPFR5CKP3NTSEZDSQ2GY7ANCNFSM4T34V72Q>
.
|
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
The text was updated successfully, but these errors were encountered: