Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
B
blender-addons-contrib
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-contrib
Commits
d97fccca
Commit
d97fccca
authored
14 years ago
by
Florian Meyer
Browse files
Options
Downloads
Patches
Plain Diff
added URLs
parent
465d2326
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_batch_rename_datablocks.py
+8
-9
8 additions, 9 deletions
object_batch_rename_datablocks.py
with
8 additions
and
9 deletions
object_batch_rename_datablocks.py
+
8
−
9
View file @
d97fccca
...
...
@@ -25,9 +25,9 @@ bl_addon_info = {
"
location
"
:
"
use the search :)
"
,
"
description
"
:
"
Batch renaming of datablocks (e.g. rename materials after objectnames)
"
,
"
warning
"
:
""
,
"
wiki_url
"
:
""
,
"
tracker_url
"
:
""
,
"
category
"
:
"
USER
"
}
"
wiki_url
"
:
"
http://wiki.blender.org/index.php/Extensions:2.5/Py/Scripts/Object/Batch_Rename_Datablocks
"
,
"
tracker_url
"
:
"
http://projects.blender.org/tracker/index.php?func=detail&aid=25242&group_id=153&atid=468
"
,
"
category
"
:
"
Object
"
}
#######################################################################
import
bpy
...
...
@@ -56,7 +56,8 @@ def get_name(self, ob):
return
self
.
rename_custom
def
rename_datablocks_main
(
self
,
obs
,
context
):
def
rename_datablocks_main
(
self
,
context
):
obs
=
context
.
selected_editable_objects
for
ob
in
obs
:
name
=
get_name
(
self
,
ob
)
...
...
@@ -100,7 +101,6 @@ class OBJECT_OT_batch_rename_datablocks(bpy.types.Operator):
(
'
Custom
'
,
'
Custom
'
,
'
Custom
'
)
]
naming_base
=
EnumProperty
(
name
=
'
Name after:
'
,
default
=
''
,
items
=
name_origins
)
rename_custom
=
StringProperty
(
name
=
'
Custom Name
'
,
default
=
'
New Name
'
,
...
...
@@ -130,7 +130,7 @@ class OBJECT_OT_batch_rename_datablocks(bpy.types.Operator):
default
=
True
,
description
=
'
Prefix Material Names
'
)
dialog_width
=
2
5
0
dialog_width
=
2
6
0
def
draw
(
self
,
context
):
layout
=
self
.
layout
...
...
@@ -166,8 +166,7 @@ class OBJECT_OT_batch_rename_datablocks(bpy.types.Operator):
def
execute
(
self
,
context
):
obs
=
context
.
selected_objects
rename_datablocks_main
(
self
,
obs
,
context
)
rename_datablocks_main
(
self
,
context
)
return
{
'
FINISHED
'
}
...
...
@@ -181,5 +180,5 @@ def register():
pass
def
unregister
():
pass
if
__name__
=
'
__main__
'
:
if
__name__
=
=
'
__main__
'
:
register
()
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