Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-addons
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
blender
blender-addons
Commits
46c41ca8
Commit
46c41ca8
authored
12 years ago
by
Bastien Montagne
Browse files
Options
Downloads
Patches
Plain Diff
We need no more that hack!
parent
5755991c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
ui_translate/update_addon.py
+2
-12
2 additions, 12 deletions
ui_translate/update_addon.py
with
2 additions
and
12 deletions
ui_translate/update_addon.py
+
2
−
12
View file @
46c41ca8
...
@@ -148,28 +148,18 @@ class UI_OT_i18n_addon_translation_invoke(bpy.types.Operator):
...
@@ -148,28 +148,18 @@ class UI_OT_i18n_addon_translation_invoke(bpy.types.Operator):
module_name
=
EnumProperty
(
items
=
enum_addons
,
name
=
"
Addon
"
,
description
=
"
Addon to process
"
,
options
=
set
())
module_name
=
EnumProperty
(
items
=
enum_addons
,
name
=
"
Addon
"
,
description
=
"
Addon to process
"
,
options
=
set
())
op_id
=
StringProperty
(
name
=
"
Operator Name
"
,
description
=
"
Name (id) of the operator to invoke
"
)
op_id
=
StringProperty
(
name
=
"
Operator Name
"
,
description
=
"
Name (id) of the operator to invoke
"
)
# XXX Ugly hack! invoke_search_popup does not preserve ops' properties :(
_op_id
=
""
def
invoke
(
self
,
context
,
event
):
def
invoke
(
self
,
context
,
event
):
print
(
"
op_id:
"
,
self
.
op_id
)
# XXX Ugly hack! invoke_search_popup does not preserve ops' properties :(
self
.
__class__
.
_op_id
=
self
.
op_id
context
.
window_manager
.
invoke_search_popup
(
self
)
context
.
window_manager
.
invoke_search_popup
(
self
)
return
{
'
RUNNING_MODAL
'
}
return
{
'
RUNNING_MODAL
'
}
def
execute
(
self
,
context
):
def
execute
(
self
,
context
):
print
(
"
op_id:
"
,
self
.
op_id
,
self
.
__class__
.
_op_id
)
if
not
self
.
op_id
:
if
not
self
.
op_id
:
# XXX Ugly hack! invoke_search_popup does not preserve ops' properties :(
return
{
'
CANCELLED
'
}
if
not
self
.
__class__
.
_op_id
:
return
{
'
CANCELLED
'
}
self
.
op_id
=
self
.
__class__
.
_op_id
self
.
__class__
.
_op_id
=
""
op
=
bpy
.
ops
op
=
bpy
.
ops
for
item
in
self
.
op_id
.
split
(
'
.
'
):
for
item
in
self
.
op_id
.
split
(
'
.
'
):
op
=
getattr
(
op
,
item
,
None
)
op
=
getattr
(
op
,
item
,
None
)
print
(
self
.
op_id
,
item
,
op
)
#
print(self.op_id, item, op)
if
op
is
None
:
if
op
is
None
:
return
{
'
CANCELLED
'
}
return
{
'
CANCELLED
'
}
return
op
(
'
INVOKE_DEFAULT
'
,
module_name
=
self
.
module_name
)
return
op
(
'
INVOKE_DEFAULT
'
,
module_name
=
self
.
module_name
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment