diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-01-05 03:38:17 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-01-05 03:38:17 +0300 |
commit | 91be2ba9b556a88877c4fa2f3c6ecd339f7e626a (patch) | |
tree | 7a85bfbb90222db1e6c389c7787d0189b479f143 /source/blender/makesrna/intern/rna_constraint.c | |
parent | 33dd818310c9a43edc59bb28df9fb4803a20c5e7 (diff) |
2.5 - Various Cleanups/Fixes
* Animation channels - cleaned up the code for selecting channels (removed various TODO stuff that's going to be replaced by something better later). Also, added back the ctrl-shift select feature for groups, which should be extended for other channels too at some stage.
* Outliner - added missing flags to do-versions, and replaced the width calculations with the rna-width version for now, as that uses constant width of 100 with OL_X*indention
Diffstat (limited to 'source/blender/makesrna/intern/rna_constraint.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_constraint.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/makesrna/intern/rna_constraint.c b/source/blender/makesrna/intern/rna_constraint.c index 4d800e36887..d5865bab424 100644 --- a/source/blender/makesrna/intern/rna_constraint.c +++ b/source/blender/makesrna/intern/rna_constraint.c @@ -33,6 +33,17 @@ #ifdef RNA_RUNTIME +static StructRNA* rna_Constraint_refine(struct PointerRNA *ptr) +{ + bConstraint *con= (bConstraint*)ptr->data; + + switch(con->type) { + // FIXME: add constraint types + default: + return &RNA_Constraint; + } +} + #else /* base struct for constraints */ @@ -73,6 +84,7 @@ void rna_def_constraint_basedata(BlenderRNA *brna) /* data */ srna= RNA_def_struct(brna, "Constraint", NULL ); RNA_def_struct_ui_text(srna, "Constraint", "alter the transformation of 'Objects' or 'Bones' from a number of predefined constraints"); + //RNA_def_struct_refine_func(srna, "rna_Constraint_refine"); // XXX or should this go down below with the data? RNA_def_struct_sdna(srna, "bConstraint"); /* strings */ @@ -114,10 +126,6 @@ void rna_def_constraint_basedata(BlenderRNA *brna) /* pointers */ - // err... how to enable this to work, since data pointer can be of various types? - //prop= RNA_def_property(srna, "data", PROP_POINTER, PROP_NONE); - //RNA_def_property_ui_text(prop, "Settings", "Settings specific to this constraint type."); - prop= RNA_def_property(srna, "ipo", PROP_POINTER, PROP_NONE); RNA_def_property_ui_text(prop, "IPO", "Local IPO data."); } |