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:
authorCampbell Barton <ideasman42@gmail.com>2009-11-13 19:08:03 +0300
committerCampbell Barton <ideasman42@gmail.com>2009-11-13 19:08:03 +0300
commit91352006c4ba8276ff2c7c8ae21461d16cf3f702 (patch)
tree6eb2a8d52e697c045eadca8e9e122e14dc73a4a6 /source/blender/makesrna/intern/rna_fcurve_api.c
parent6df83fba020c596aaf242271237f333d178e4c0e (diff)
arbitrary property and function support for rna properties (arrays and collections), this means functions can be easily added.
eg. scene.objects.link() object.constraints.new() mesh.verts.transform(...) mesh.faces.active PropertyRNA stores an StructRNA pointer where these can be defined.
Diffstat (limited to 'source/blender/makesrna/intern/rna_fcurve_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_fcurve_api.c40
1 files changed, 2 insertions, 38 deletions
diff --git a/source/blender/makesrna/intern/rna_fcurve_api.c b/source/blender/makesrna/intern/rna_fcurve_api.c
index 0abb5e8e499..d066d4f63fb 100644
--- a/source/blender/makesrna/intern/rna_fcurve_api.c
+++ b/source/blender/makesrna/intern/rna_fcurve_api.c
@@ -43,48 +43,12 @@
#include "BKE_animsys.h"
#include "BKE_fcurve.h"
-DriverTarget *rna_Driver_add_target(ChannelDriver *driver, char *name)
-{
- DriverTarget *dtar= driver_add_new_target(driver);
-
- /* set the name if given */
- if (name && name[0]) {
- BLI_strncpy(dtar->name, name, 64);
- BLI_uniquename(&driver->targets, dtar, "var", '_', offsetof(DriverTarget, name), 64);
- }
-
- /* return this target for the users to play with */
- return dtar;
-}
-
-void rna_Driver_remove_target(ChannelDriver *driver, DriverTarget *dtar)
-{
- /* call the API function for this */
- driver_free_target(driver, dtar);
-}
-
#else
void RNA_api_drivers(StructRNA *srna)
{
- FunctionRNA *func;
- PropertyRNA *parm;
-
- /* add target */
- func= RNA_def_function(srna, "targets__add", "rna_Driver_add_target");
- RNA_def_function_ui_description(func, "Add a new target for the driver.");
- /* return type */
- parm= RNA_def_pointer(func, "target", "DriverTarget", "", "Newly created Driver Target.");
- RNA_def_function_return(func, parm);
- /* optional name parameter */
- parm= RNA_def_string(func, "name", "", 64, "Name", "Name to use in scripted expressions/functions. (No spaces or dots are allowed. Also, must not start with a symbol or digit)");
-
- /* remove target */
- func= RNA_def_function(srna, "targets__remove", "rna_Driver_remove_target");
- RNA_def_function_ui_description(func, "Remove an existing target from the driver.");
- /* target to remove*/
- parm= RNA_def_pointer(func, "target", "DriverTarget", "", "Target to remove from the driver.");
- RNA_def_property_flag(parm, PROP_REQUIRED);
+// FunctionRNA *func;
+// PropertyRNA *parm;
}
#endif