[Bf-blender-cvs] [654a03a] mesh-transfer-data: use modifier attribute name 'object' from python/rna

Campbell Barton noreply at git.blender.org
Mon Nov 17 23:45:25 CET 2014


Commit: 654a03a1f003378e8ff2eb8df7d051b56c6298de
Author: Campbell Barton
Date:   Mon Nov 17 23:35:39 2014 +0100
Branches: mesh-transfer-data
https://developer.blender.org/rB654a03a1f003378e8ff2eb8df7d051b56c6298de

use modifier attribute name 'object' from python/rna

===================================================================

M	release/scripts/startup/bl_ui/properties_data_modifier.py
M	source/blender/makesrna/intern/rna_modifier.c

===================================================================

diff --git a/release/scripts/startup/bl_ui/properties_data_modifier.py b/release/scripts/startup/bl_ui/properties_data_modifier.py
index e4883c2..aeb0737 100644
--- a/release/scripts/startup/bl_ui/properties_data_modifier.py
+++ b/release/scripts/startup/bl_ui/properties_data_modifier.py
@@ -1227,9 +1227,9 @@ class DATA_PT_modifiers(ModifierButtonsPanel, Panel):
 
     def DATA_TRANSFER(self, layout, ob, md):
         row = layout.row(align=True)
-        row.prop(md, "ob_source")
+        row.prop(md, "object")
         sub = row.row(align=True)
-        sub.active = bool(md.ob_source)
+        sub.active = bool(md.object)
         sub.prop(md, "use_object_transform", text="", icon='GROUP')
 
         layout.separator()
diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c
index decf928..bbe1c45 100644
--- a/source/blender/makesrna/intern/rna_modifier.c
+++ b/source/blender/makesrna/intern/rna_modifier.c
@@ -4093,7 +4093,8 @@ static void rna_def_modifier_datatransfer(BlenderRNA *brna)
 	RNA_def_struct_sdna(srna, "DataTransferModifierData");
 	RNA_def_struct_ui_icon(srna, ICON_MOD_WIREFRAME);  /* XXX TODO */
 
-	prop = RNA_def_property(srna, "ob_source", PROP_POINTER, PROP_NONE);
+	prop = RNA_def_property(srna, "object", PROP_POINTER, PROP_NONE);
+	RNA_def_property_pointer_sdna(prop, NULL, "ob_source");
 	RNA_def_property_ui_text(prop, "Source Object", "Object to transfer data from");
 	RNA_def_property_flag(prop, PROP_EDITABLE | PROP_ID_SELF_CHECK);
 	RNA_def_property_pointer_funcs(prop, NULL, "rna_DataTransferModifier_ob_source_set", NULL, "rna_Mesh_object_poll");




More information about the Bf-blender-cvs mailing list