Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2010-07-08 17:48:56 +0400
committerCampbell Barton <ideasman42@gmail.com>2010-07-08 17:48:56 +0400
commitc7230ef044f2880c082f29343aca01629272470a (patch)
treeef08a2002086815f1696796f591e351565965bf1 /space_view3d_property_chart.py
parent35086b9ec95d19d20bd6ecaed0e9c8681c9be2f0 (diff)
copy buttons were copying all properties
Diffstat (limited to 'space_view3d_property_chart.py')
-rw-r--r--space_view3d_property_chart.py30
1 files changed, 12 insertions, 18 deletions
diff --git a/space_view3d_property_chart.py b/space_view3d_property_chart.py
index c98bded1..e28da469 100644
--- a/space_view3d_property_chart.py
+++ b/space_view3d_property_chart.py
@@ -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()'