From c4fe6d0f00aa2a9656445ebb53161768e0c51342 Mon Sep 17 00:00:00 2001 From: Joshua Leung Date: Tue, 2 Dec 2008 10:10:07 +0000 Subject: 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? --- source/blender/makesrna/intern/makesrna.c | 1 + source/blender/makesrna/intern/rna_object.c | 8 ++++++++ 2 files changed, 9 insertions(+) (limited to 'source/blender') 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"); -- cgit v1.2.3