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
6a382b66
Commit
6a382b66
authored
5 years ago
by
meta-androcto
Browse files
Options
Downloads
Patches
Plain Diff
object_edit_linked: remove keymaps, disable open blender instance: T70110
parent
1eb9bec2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
object_edit_linked.py
+4
-19
4 additions, 19 deletions
object_edit_linked.py
with
4 additions
and
19 deletions
object_edit_linked.py
+
4
−
19
View file @
6a382b66
...
...
@@ -20,7 +20,7 @@
bl_info
=
{
"
name
"
:
"
Edit Linked Library
"
,
"
author
"
:
"
Jason van Gumster (Fweeb), Bassam Kurdali, Pablo Vazquez, Rainer Trummer
"
,
"
version
"
:
(
0
,
9
,
2
),
"
version
"
:
(
0
,
9
,
1
),
"
blender
"
:
(
2
,
80
,
0
),
"
location
"
:
"
File > External Data / View3D > Sidebar > Item Tab
"
,
"
description
"
:
"
Allows editing of objects linked from a .blend library.
"
,
...
...
@@ -173,15 +173,13 @@ class VIEW3D_PT_PanelLinkedEdit(bpy.types.Panel):
props
.
use_instance
=
scene
.
use_instance
layout
.
prop
(
scene
,
"
use_autosave
"
)
layout
.
prop
(
scene
,
"
use_instance
"
)
#
layout.prop(scene, "use_instance")
def
draw
(
self
,
context
:
bpy
.
context
):
scene
=
context
.
scene
layout
=
self
.
layout
layout
.
use_property_split
=
True
layout
.
use_property_decorate
=
False
active_collection
=
context
.
active_object
.
instance_collection
icon
=
"
OUTLINER_DATA_
"
+
context
.
active_object
.
type
target
=
None
...
...
@@ -214,7 +212,7 @@ class VIEW3D_PT_PanelLinkedEdit(bpy.types.Panel):
elif
settings
[
"
original_file
"
]
!=
""
:
if
scene
.
use_instance
and
active_collection
:
if
scene
.
use_instance
:
layout
.
operator
(
"
wm.return_to_original
"
,
text
=
"
Reload Current File
"
,
icon
=
"
FILE_REFRESH
"
).
use_autosave
=
False
...
...
@@ -281,16 +279,7 @@ def register():
# add the function to the file menu
bpy
.
types
.
TOPBAR_MT_file_external_data
.
append
(
TOPBAR_MT_edit_linked_submenu
.
draw
)
# Keymapping (deactivated by default; activated when a library object is selected)
kc
=
bpy
.
context
.
window_manager
.
keyconfigs
.
addon
if
kc
:
# don't register keymaps from command line
km
=
kc
.
keymaps
.
new
(
name
=
"
3D View
"
,
space_type
=
'
VIEW_3D
'
)
kmi
=
km
.
keymap_items
.
new
(
"
object.edit_linked
"
,
'
NUMPAD_SLASH
'
,
'
PRESS
'
,
shift
=
True
)
kmi
.
active
=
True
addon_keymaps
.
append
((
km
,
kmi
))
kmi
=
km
.
keymap_items
.
new
(
"
wm.return_to_original
"
,
'
NUMPAD_SLASH
'
,
'
PRESS
'
,
shift
=
True
)
kmi
.
active
=
True
addon_keymaps
.
append
((
km
,
kmi
))
def
unregister
():
...
...
@@ -301,10 +290,6 @@ def unregister():
del
bpy
.
types
.
Scene
.
use_autosave
del
bpy
.
types
.
Scene
.
use_instance
# handle the keymap
for
km
,
kmi
in
addon_keymaps
:
km
.
keymap_items
.
remove
(
kmi
)
addon_keymaps
.
clear
()
for
c
in
reversed
(
classes
):
bpy
.
utils
.
unregister_class
(
c
)
...
...
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