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
c7230ef0
Commit
c7230ef0
authored
14 years ago
by
Campbell Barton
Browse files
Options
Downloads
Patches
Plain Diff
copy buttons were copying all properties
parent
35086b9e
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
space_view3d_property_chart.py
+12
-18
12 additions, 18 deletions
space_view3d_property_chart.py
with
12 additions
and
18 deletions
space_view3d_property_chart.py
+
12
−
18
View file @
c7230ef0
...
...
@@ -125,7 +125,7 @@ def _property_chart_draw(self, context):
props
=
rowsub
.
operator
(
"
wm.chart_copy
"
,
text
=
""
,
icon
=
'
PASTEDOWN
'
,
emboss
=
False
)
props
.
data_path_active
=
self
.
context_data_path_active
props
.
data_path_selected
=
self
.
context_data_path_selected
props
.
data_path
_storage
=
self
.
_PROP_STORAGE_ID
props
.
data_path
=
strings
[
i
]
for
obj
,
prop_pairs
in
prop_all
:
data
,
attr
=
prop_pairs
[
i
]
...
...
@@ -180,23 +180,17 @@ def _property_chart_copy(self, context):
if
not
obj
:
return
id_storage
=
context
.
scene
strings
=
id_storage
.
get
(
self
.
properties
.
data_path_storage
)
if
strings
:
strings
=
strings
.
split
()
data_path
=
self
.
properties
.
data_path
# quick & nasty method!
for
obj_iter
in
selected_objects
:
if
obj
!=
obj_iter
:
for
prop_path
in
strings
:
try
:
exec
(
"
obj_iter.%s = obj.%s
"
%
(
prop_path
,
prop_path
))
except
:
# just incase we need to know what went wrong!
import
traceback
traceback
.
print_exc
()
# quick & nasty method!
for
obj_iter
in
selected_objects
:
if
obj
!=
obj_iter
:
try
:
exec
(
"
obj_iter.%s = obj.%s
"
%
(
data_path
,
data_path
))
except
:
# just incase we need to know what went wrong!
import
traceback
traceback
.
print_exc
()
from
bpy.props
import
StringProperty
...
...
@@ -208,7 +202,7 @@ class CopyPropertyChart(bpy.types.Operator):
data_path_active
=
StringProperty
()
data_path_selected
=
StringProperty
()
data_path
_storage
=
StringProperty
()
data_path
=
StringProperty
()
def
execute
(
self
,
context
):
# so attributes are found for '_property_chart_data_get()'
...
...
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