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

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2008-12-02 13:10:07 +0300
committerJoshua Leung <aligorith@gmail.com>2008-12-02 13:10:07 +0300
commitc4fe6d0f00aa2a9656445ebb53161768e0c51342 (patch)
treea3f730faf3c83f6c02f2e1c7265527412f4bcf75 /source/blender
parent628d7013e2c0236894d329abfde705d023833092 (diff)
RNA - Wrapped a few more simple Object transforms.
Note: Rotations are still exposed directly in radians. We should probably do some wrapping around this, perhaps at UI-level?
Diffstat (limited to 'source/blender')
-rw-r--r--source/blender/makesrna/intern/makesrna.c1
-rw-r--r--source/blender/makesrna/intern/rna_object.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 3c174b11834..cf779b42fec 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -625,6 +625,7 @@ static const char *rna_property_subtypename(PropertyType type)
case PROP_COLOR: return "PROP_COLOR";
case PROP_VECTOR: return "PROP_VECTOR";
case PROP_MATRIX: return "PROP_MATRIX";
+ case PROP_ROTATION: return "PROP_ROTATION";
default: return "PROP_UNKNOWN";
}
}
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index 0821345b3f1..735d524032f 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -74,6 +74,14 @@ void RNA_def_object(BlenderRNA *brna)
prop= RNA_def_property(srna, "loc", PROP_FLOAT, PROP_VECTOR);
RNA_def_property_ui_text(prop, "Location", "");
+
+ //prop= RNA_def_property(srna, "rot", PROP_FLOAT, PROP_ROTATION);
+ //RNA_def_property_ui_text(prop, "Rotation", "");
+ prop= RNA_def_property(srna, "rot", PROP_FLOAT, PROP_VECTOR);
+ RNA_def_property_ui_text(prop, "Rotation", "");
+
+ prop= RNA_def_property(srna, "size", PROP_FLOAT, PROP_VECTOR);
+ RNA_def_property_ui_text(prop, "Scale", "");
prop= RNA_def_property(srna, "modifiers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "ModifierData");