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
88c3fc87
Commit
88c3fc87
authored
5 years ago
by
Ryan Inch
Browse files
Options
Downloads
Patches
Plain Diff
Collection Manager: Fix bug in name update. Task: T69577
Fix rto_history not getting updated on collection name change.
parent
3c181d7e
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
object_collection_manager/__init__.py
+1
-1
1 addition, 1 deletion
object_collection_manager/__init__.py
object_collection_manager/internals.py
+33
-3
33 additions, 3 deletions
object_collection_manager/internals.py
with
34 additions
and
4 deletions
object_collection_manager/__init__.py
+
1
−
1
View file @
88c3fc87
...
...
@@ -22,7 +22,7 @@ bl_info = {
"
name
"
:
"
Collection Manager
"
,
"
description
"
:
"
Manage collections and their objects
"
,
"
author
"
:
"
Ryan Inch
"
,
"
version
"
:
(
2
,
7
,
3
),
"
version
"
:
(
2
,
7
,
4
),
"
blender
"
:
(
2
,
80
,
0
),
"
location
"
:
"
View3D - Object Mode (Shortcut - M)
"
,
"
warning
"
:
''
,
# used for warning icon and text in addons panel
...
...
This diff is collapsed.
Click to expand it.
object_collection_manager/internals.py
+
33
−
3
View file @
88c3fc87
...
...
@@ -227,6 +227,7 @@ qcd_slots = QCDSlots()
def
update_col_name
(
self
,
context
):
global
layer_collections
global
qcd_slots
global
rto_history
if
self
.
name
!=
self
.
last_name
:
if
self
.
name
==
''
:
...
...
@@ -235,6 +236,8 @@ def update_col_name(self, context):
# if statement prevents update on list creation
if
self
.
last_name
!=
''
:
view_layer_name
=
context
.
view_layer
.
name
# update collection name
layer_collections
[
self
.
last_name
][
"
ptr
"
].
collection
.
name
=
self
.
name
...
...
@@ -253,10 +256,30 @@ def update_col_name(self, context):
qcd_slots
.
overrides
.
remove
(
self
.
last_name
)
qcd_slots
.
overrides
.
add
(
self
.
name
)
# update history
rtos
=
[
"
exclude
"
,
"
select
"
,
"
hide
"
,
"
disable
"
,
"
render
"
]
orig_targets
=
{
rto
:
rto_history
[
rto
][
view_layer_name
][
"
target
"
]
for
rto
in
rtos
if
rto_history
[
rto
].
get
(
view_layer_name
)
}
for
rto
in
rtos
:
history
=
rto_history
[
rto
].
get
(
view_layer_name
)
if
history
and
orig_targets
[
rto
]
==
self
.
last_name
:
history
[
"
target
"
]
=
self
.
name
# update names in expanded, qcd slots, and rto_history for any other
# collection names that changed as a result of this name change
cm_list_collection
=
context
.
scene
.
collection_manager
.
cm_list_collection
# update names in expanded and qcd slots for any other collection names
# that changed as a result of this name change
count
=
0
laycol_iter_list
=
list
(
context
.
view_layer
.
layer_collection
.
children
)
...
...
@@ -284,6 +307,13 @@ def update_col_name(self, context):
qcd_slots
.
overrides
.
add
(
layer_collection
.
name
)
# update history
for
rto
in
rtos
:
history
=
rto_history
[
rto
].
get
(
view_layer_name
)
if
history
and
orig_targets
[
rto
]
==
cm_list_item
.
last_name
:
history
[
"
target
"
]
=
layer_collection
.
name
if
layer_collection
.
children
:
laycol_iter_list
[
0
:
0
]
=
list
(
layer_collection
.
children
)
...
...
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