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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2009-01-02 16:47:33 +0300
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2009-01-02 16:47:33 +0300
commita371f5513a749dcebe789f2e00870083f26725b4 (patch)
tree62a01872745182ae9d3e4b001a99f38c74acaeb3 /source/blender/makesrna/intern
parent326b3122cf6ff2018c94ac4cdc43c21a69039ad8 (diff)
RNA
* Added skeleton code for particle/object_force/userdef. * More Object properties wrapped. * Added User Preferences display in outliner.
Diffstat (limited to 'source/blender/makesrna/intern')
-rw-r--r--source/blender/makesrna/intern/makesrna.c3
-rw-r--r--source/blender/makesrna/intern/rna_actuator.c1
-rw-r--r--source/blender/makesrna/intern/rna_brush.c1
-rw-r--r--source/blender/makesrna/intern/rna_color.c2
-rw-r--r--source/blender/makesrna/intern/rna_controller.c1
-rw-r--r--source/blender/makesrna/intern/rna_define.c12
-rw-r--r--source/blender/makesrna/intern/rna_internal.h3
-rw-r--r--source/blender/makesrna/intern/rna_lamp.c2
-rw-r--r--source/blender/makesrna/intern/rna_material.c4
-rw-r--r--source/blender/makesrna/intern/rna_object.c171
-rw-r--r--source/blender/makesrna/intern/rna_object_force.c93
-rw-r--r--source/blender/makesrna/intern/rna_particle.c66
-rw-r--r--source/blender/makesrna/intern/rna_property.c1
-rw-r--r--source/blender/makesrna/intern/rna_rna.c1
-rw-r--r--source/blender/makesrna/intern/rna_sensor.c1
-rw-r--r--source/blender/makesrna/intern/rna_sequence.c3
-rw-r--r--source/blender/makesrna/intern/rna_sound.c42
-rw-r--r--source/blender/makesrna/intern/rna_text.c1
-rw-r--r--source/blender/makesrna/intern/rna_userdef.c58
-rw-r--r--source/blender/makesrna/intern/rna_world.c4
20 files changed, 420 insertions, 50 deletions
diff --git a/source/blender/makesrna/intern/makesrna.c b/source/blender/makesrna/intern/makesrna.c
index 603533cfe1c..8a915c264c0 100644
--- a/source/blender/makesrna/intern/makesrna.c
+++ b/source/blender/makesrna/intern/makesrna.c
@@ -920,7 +920,9 @@ RNAProcessItem PROCESS_ITEMS[]= {
{"rna_modifier.c", RNA_def_modifier},
{"rna_nodetree.c", RNA_def_nodetree},
{"rna_object.c", RNA_def_object},
+ {"rna_object_force.c", RNA_def_object_force},
{"rna_packedfile.c", RNA_def_packedfile},
+ {"rna_particle.c", RNA_def_particle},
{"rna_property.c", RNA_def_gameproperty},
{"rna_radio.c", RNA_def_radio},
{"rna_rna.c", RNA_def_rna},
@@ -930,6 +932,7 @@ RNAProcessItem PROCESS_ITEMS[]= {
{"rna_sequence.c", RNA_def_sequence},
{"rna_text.c", RNA_def_text},
{"rna_sound.c", RNA_def_sound},
+ {"rna_userdef.c", RNA_def_userdef},
{"rna_vfont.c", RNA_def_vfont},
{"rna_wm.c", RNA_def_wm},
{"rna_world.c", RNA_def_world},
diff --git a/source/blender/makesrna/intern/rna_actuator.c b/source/blender/makesrna/intern/rna_actuator.c
index 1848fd04412..a6e359a6585 100644
--- a/source/blender/makesrna/intern/rna_actuator.c
+++ b/source/blender/makesrna/intern/rna_actuator.c
@@ -24,7 +24,6 @@
#include <stdlib.h>
-#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_types.h"
diff --git a/source/blender/makesrna/intern/rna_brush.c b/source/blender/makesrna/intern/rna_brush.c
index 53de254662a..0a5cc5782ca 100644
--- a/source/blender/makesrna/intern/rna_brush.c
+++ b/source/blender/makesrna/intern/rna_brush.c
@@ -81,7 +81,6 @@ void rna_def_brush(BlenderRNA *brna)
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "rgb");
RNA_def_property_ui_text(prop, "Color", "");
- RNA_def_property_ui_range(prop, 0.0f , 1.0f, 10.0f, 3);
prop= RNA_def_property(srna, "opacity", PROP_FLOAT, PROP_NONE);
RNA_def_property_float_sdna(prop, NULL, "alpha");
diff --git a/source/blender/makesrna/intern/rna_color.c b/source/blender/makesrna/intern/rna_color.c
index 97000deb5a7..83c6da5d7e2 100644
--- a/source/blender/makesrna/intern/rna_color.c
+++ b/source/blender/makesrna/intern/rna_color.c
@@ -214,13 +214,11 @@ static void rna_def_curvemapping(BlenderRNA *brna)
prop= RNA_def_property(srna, "black_level", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "black");
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 10, 3);
RNA_def_property_ui_text(prop, "Black Level", "");
RNA_def_property_float_funcs(prop, NULL, "rna_CurveMapping_black_level_set", NULL);
prop= RNA_def_property(srna, "white_level", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "white");
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 10, 3);
RNA_def_property_ui_text(prop, "White Level", "");
RNA_def_property_float_funcs(prop, NULL, "rna_CurveMapping_white_level_set", NULL);
}
diff --git a/source/blender/makesrna/intern/rna_controller.c b/source/blender/makesrna/intern/rna_controller.c
index dc8f6c4538f..f9766e30db8 100644
--- a/source/blender/makesrna/intern/rna_controller.c
+++ b/source/blender/makesrna/intern/rna_controller.c
@@ -24,7 +24,6 @@
#include <stdlib.h>
-#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_types.h"
diff --git a/source/blender/makesrna/intern/rna_define.c b/source/blender/makesrna/intern/rna_define.c
index 6c3e21cf5a5..3193265084c 100644
--- a/source/blender/makesrna/intern/rna_define.c
+++ b/source/blender/makesrna/intern/rna_define.c
@@ -597,8 +597,14 @@ PropertyRNA *RNA_def_property(StructRNA *srna, const char *identifier, int type,
fprop->hardmin= (subtype == PROP_UNSIGNED)? 0.0f: -FLT_MAX;
fprop->hardmax= FLT_MAX;
- fprop->softmin= (subtype == PROP_UNSIGNED)? 0.0f: -10000.0f; /* rather arbitrary .. */
- fprop->softmax= 10000.0f;
+ if(subtype == PROP_COLOR) {
+ fprop->softmin= 0.0f;
+ fprop->softmax= 1.0f;
+ }
+ else {
+ fprop->softmin= (subtype == PROP_UNSIGNED)? 0.0f: -10000.0f; /* rather arbitrary .. */
+ fprop->softmax= 10000.0f;
+ }
fprop->step= 10;
fprop->precision= 3;
break;
@@ -851,7 +857,7 @@ void RNA_def_property_enum_items(PropertyRNA *prop, const EnumPropertyItem *item
break;
}
default:
- fprintf(stderr, "RNA_def_property_struct_type: %s.%s, invalid type for struct type.\n", srna->identifier, prop->identifier);
+ fprintf(stderr, "RNA_def_property_enum_items: %s.%s, invalid type for struct type.\n", srna->identifier, prop->identifier);
DefRNA.error= 1;
break;
}
diff --git a/source/blender/makesrna/intern/rna_internal.h b/source/blender/makesrna/intern/rna_internal.h
index e5c9fa35847..af9fcedda6a 100644
--- a/source/blender/makesrna/intern/rna_internal.h
+++ b/source/blender/makesrna/intern/rna_internal.h
@@ -118,7 +118,9 @@ void RNA_def_meta(struct BlenderRNA *brna);
void RNA_def_modifier(struct BlenderRNA *brna);
void RNA_def_nodetree(struct BlenderRNA *brna);
void RNA_def_object(struct BlenderRNA *brna);
+void RNA_def_object_force(struct BlenderRNA *brna);
void RNA_def_packedfile(struct BlenderRNA *brna);
+void RNA_def_particle(struct BlenderRNA *brna);
void RNA_def_radio(struct BlenderRNA *brna);
void RNA_def_rna(struct BlenderRNA *brna);
void RNA_def_scene(struct BlenderRNA *brna);
@@ -127,6 +129,7 @@ void RNA_def_sensor(struct BlenderRNA *brna);
void RNA_def_sequence(struct BlenderRNA *brna);
void RNA_def_text(struct BlenderRNA *brna);
void RNA_def_sound(struct BlenderRNA *brna);
+void RNA_def_userdef(struct BlenderRNA *brna);
void RNA_def_vfont(struct BlenderRNA *brna);
void RNA_def_wm(struct BlenderRNA *brna);
void RNA_def_world(struct BlenderRNA *brna);
diff --git a/source/blender/makesrna/intern/rna_lamp.c b/source/blender/makesrna/intern/rna_lamp.c
index 9dd7f079369..bc555abe6b9 100644
--- a/source/blender/makesrna/intern/rna_lamp.c
+++ b/source/blender/makesrna/intern/rna_lamp.c
@@ -306,13 +306,11 @@ void RNA_def_lamp(BlenderRNA *brna)
RNA_def_property_float_sdna(prop, NULL, "r");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Color", "");
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 10.0f, 3);
prop= RNA_def_property(srna, "shadow_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "shdwr");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Shadow Color", "");
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 10.0f, 3);
/* Booleans */
prop= RNA_def_property(srna, "auto_clip_start", PROP_BOOLEAN, PROP_NONE);
diff --git a/source/blender/makesrna/intern/rna_material.c b/source/blender/makesrna/intern/rna_material.c
index 26245ef3125..784ca82611a 100644
--- a/source/blender/makesrna/intern/rna_material.c
+++ b/source/blender/makesrna/intern/rna_material.c
@@ -64,25 +64,21 @@ static void rna_def_material_colors(StructRNA *srna, PropertyRNA *prop)
RNA_def_property_float_sdna(prop, NULL, "r");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Diffuse Color", "");
- RNA_def_property_ui_range(prop, 0.0f , 1.0f, 10.0f, 3);
prop= RNA_def_property(srna, "specular_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "specr");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Specular Color", "");
- RNA_def_property_ui_range(prop, 0.0f , 1.0f, 10.0f, 3);
prop= RNA_def_property(srna, "mirror_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "mirr");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Mirror Color", "");
- RNA_def_property_ui_range(prop, 0.0f , 1.0f, 10.0f, 3);
prop= RNA_def_property(srna, "ambient_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "ambr");
RNA_def_property_array(prop, 3);
RNA_def_property_ui_text(prop, "Ambient Color", "");
- RNA_def_property_ui_range(prop, 0.0f , 1.0f, 10.0f, 3);
prop= RNA_def_property(srna, "alpha", PROP_FLOAT, PROP_NONE);
RNA_def_property_range(prop, 0.0f, 1.0f);
diff --git a/source/blender/makesrna/intern/rna_object.c b/source/blender/makesrna/intern/rna_object.c
index d1a91e200d9..5c84650cadb 100644
--- a/source/blender/makesrna/intern/rna_object.c
+++ b/source/blender/makesrna/intern/rna_object.c
@@ -24,7 +24,6 @@
#include <stdlib.h>
-#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_types.h"
@@ -32,6 +31,7 @@
#include "DNA_object_types.h"
#include "DNA_property_types.h"
+#include "DNA_scene_types.h"
#include "WM_types.h"
@@ -58,6 +58,13 @@ static void *rna_Object_active_vertex_group_get(PointerRNA *ptr)
return BLI_findlink(&ob->defbase, ob->actdef);
}
+static void rna_Object_active_material_range(PointerRNA *ptr, int *min, int *max)
+{
+ Object *ob= (Object*)ptr->id.data;
+ *min= 0;
+ *max= ob->totcol-1;
+}
+
static void *rna_Object_game_settings_get(PointerRNA *ptr)
{
return ptr->id.data;
@@ -239,13 +246,39 @@ static void rna_def_object_game_settings(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "init_state", 1);
RNA_def_property_array(prop, 30);
RNA_def_property_ui_text(prop, "Initial State", "Initial state when the game starts.");
+
+ prop= RNA_def_property(srna, "soft_body", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "bsoft");
+ RNA_def_property_ui_text(prop, "Soft Body Settings", "Settings for Bullet soft body simulation.");
}
static void rna_def_object(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
-
+
+ static EnumPropertyItem parent_type_items[] = {
+ {PAROBJECT, "OBJECT", "Object", ""},
+ {PARCURVE, "CURVE", "Curve", ""},
+ //{PARKEY, "KEY", "Key", ""},
+ {PARSKEL, "ARMATURE", "Armature", ""},
+ {PARSKEL, "LATTICE", "Lattice", ""}, // PARSKEL reuse will give issues
+ {PARVERT1, "VERTEX", "Vertex", ""},
+ {PARVERT3, "VERTEX_3", "3 Vertices", ""},
+ {PARBONE, "BONE", "Bone", ""},
+ {0, NULL, NULL, NULL}};
+
+ static EnumPropertyItem empty_drawtype_items[] = {
+ {OB_ARROWS, "ARROWS", "Arrows", ""},
+ {OB_SINGLE_ARROW, "SINGLE_ARROW", "Single Arrow", ""},
+ {OB_PLAINAXES, "PLAIN_AXES", "Plain Axes", ""},
+ {OB_CIRCLE, "CIRCLE", "Circle", ""},
+ {OB_CUBE, "CUBE", "Cube", ""},
+ {OB_EMPTY_SPHERE, "SPHERE", "Sphere", ""},
+ {OB_EMPTY_CONE, "CONE", "Cone", ""},
+ {0, NULL, NULL, NULL}};
+
+
srna= RNA_def_struct(brna, "Object", "ID");
RNA_def_struct_ui_text(srna, "Object", "DOC_BROKEN");
@@ -264,9 +297,61 @@ static void rna_def_object(BlenderRNA *brna)
prop= RNA_def_property(srna, "parent", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Parent", "Parent Object");
+ prop= RNA_def_property(srna, "parent_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_bitflag_sdna(prop, NULL, "partype");
+ RNA_def_property_enum_items(prop, parent_type_items);
+ RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
+ RNA_def_property_ui_text(prop, "Parent Type", "Type of parent relation.");
+
+ prop= RNA_def_property(srna, "parent_vertices", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_sdna(prop, NULL, "par1");
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
+ RNA_def_property_ui_text(prop, "Parent Vertices", "Indices of vertices in cases of a vertex parenting relation.");
+
+ prop= RNA_def_property(srna, "parent_bone", PROP_STRING, PROP_NONE);
+ RNA_def_property_string_sdna(prop, NULL, "parsubstr");
+ RNA_def_property_ui_text(prop, "Parent Bone", "Name of parent bone in case of a bone parenting relation.");
+
prop= RNA_def_property(srna, "track", PROP_POINTER, PROP_NONE);
RNA_def_property_ui_text(prop, "Track", "Object being tracked to define the rotation (Old Track).");
+ /* proxy */
+
+ prop= RNA_def_property(srna, "proxy", PROP_POINTER, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Proxy", "Library object this proxy object controls.");
+
+ prop= RNA_def_property(srna, "proxy_group", PROP_POINTER, PROP_NONE);
+ RNA_def_property_ui_text(prop, "Proxy Group", "Library group duplicator object this proxy object controls.");
+
+ /* action / pose */
+
+ prop= RNA_def_property(srna, "action", PROP_POINTER, PROP_NONE);
+ RNA_def_property_struct_type(prop, "UnknownType");
+ RNA_def_property_ui_text(prop, "Action", "Action used by object to define Ipo curves.");
+
+ prop= RNA_def_property(srna, "pose_library", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "poselib");
+ RNA_def_property_struct_type(prop, "UnknownType");
+ RNA_def_property_ui_text(prop, "Pose Library", "Action used as a pose library for armatures.");
+
+ prop= RNA_def_property(srna, "pose", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "pose");
+ RNA_def_property_struct_type(prop, "UnknownType");
+ RNA_def_property_ui_text(prop, "Pose", "Current pose for armatures.");
+
+ /* materials */
+
+ prop= RNA_def_property(srna, "materials", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_sdna(prop, NULL, "mat", "totcol");
+ RNA_def_property_struct_type(prop, "Material");
+ RNA_def_property_ui_text(prop, "Materials", "");
+
+ prop= RNA_def_property(srna, "active_material", PROP_INT, PROP_UNSIGNED);
+ RNA_def_property_int_sdna(prop, NULL, "actcol");
+ RNA_def_property_int_funcs(prop, NULL, NULL, "rna_Object_active_material_range");
+ RNA_def_property_ui_text(prop, "Active Material", "Index of active material.");
+
/* transform */
prop= RNA_def_property(srna, "location", PROP_FLOAT, PROP_VECTOR);
@@ -299,15 +384,35 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Delta Scale", "Extra added scaling to the scale of the object.");
RNA_def_property_update(prop, NC_OBJECT|ND_TRANSFORM, "rna_Object_update");
+ prop= RNA_def_property(srna, "lock_location", PROP_BOOLEAN, PROP_VECTOR);
+ RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_LOCX);
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Lock Location", "Lock editing of location in the interface.");
+
+ prop= RNA_def_property(srna, "lock_rotation", PROP_BOOLEAN, PROP_VECTOR);
+ RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_ROTX);
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Lock Rotation", "Lock editing of rotation in the interface.");
+
+ prop= RNA_def_property(srna, "lock_scale", PROP_BOOLEAN, PROP_VECTOR);
+ RNA_def_property_boolean_sdna(prop, NULL, "protectflag", OB_LOCK_SCALEX);
+ RNA_def_property_array(prop, 3);
+ RNA_def_property_ui_text(prop, "Lock Scale", "Lock editing of scale in the interface.");
+
/* collections */
prop= RNA_def_property(srna, "ipo", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "Ipo");
- RNA_def_property_ui_text(prop, "Ipo", "DOC_BROKEN");
+ RNA_def_property_ui_text(prop, "Ipo Curves", "Ipo curves used by the object.");
prop= RNA_def_property(srna, "constraints", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "Constraint");
- RNA_def_property_ui_text(prop, "Constraints", "DOC_BROKEN");
+ RNA_def_property_ui_text(prop, "Constraints", "Constraints of the object.");
+
+ prop= RNA_def_property(srna, "constraint_channels", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_sdna(prop, NULL, "constraintChannels", NULL);
+ RNA_def_property_struct_type(prop, "UnknownType");
+ RNA_def_property_ui_text(prop, "Constraint Channels", "Ipo curves for the object constraints.");
prop= RNA_def_property(srna, "modifiers", PROP_COLLECTION, PROP_NONE);
RNA_def_property_struct_type(prop, "Modifier");
@@ -315,7 +420,7 @@ static void rna_def_object(BlenderRNA *brna)
/* game engine */
- prop= RNA_def_property(srna, "game_settings", PROP_POINTER, PROP_NONE);
+ prop= RNA_def_property(srna, "game", PROP_POINTER, PROP_NONE);
RNA_def_property_struct_type(prop, "ObjectGameSettings");
RNA_def_property_pointer_funcs(prop, "rna_Object_game_settings_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Game Settings", "Game engine related settings for the object.");
@@ -332,6 +437,18 @@ static void rna_def_object(BlenderRNA *brna)
RNA_def_property_pointer_funcs(prop, "rna_Object_active_vertex_group_get", NULL, NULL);
RNA_def_property_ui_text(prop, "Active Vertex Group", "Vertex groups of the object.");
+ /* empty */
+
+ prop= RNA_def_property(srna, "empty_draw_type", PROP_ENUM, PROP_NONE);
+ RNA_def_property_enum_sdna(prop, NULL, "empty_drawtype");
+ RNA_def_property_enum_items(prop, empty_drawtype_items);
+ RNA_def_property_ui_text(prop, "Empty Draw Type", "Viewport display style for empties.");
+
+ prop= RNA_def_property(srna, "empty_draw_size", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "empty_drawsize");
+ RNA_def_property_range(prop, 0.01, 10.0);
+ RNA_def_property_ui_text(prop, "Empty Draw Size", "Size of of display for empties in the viewport.");
+
/* various */
prop= RNA_def_property(srna, "pass_index", PROP_INT, PROP_UNSIGNED);
@@ -341,13 +458,53 @@ static void rna_def_object(BlenderRNA *brna)
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "col");
RNA_def_property_ui_text(prop, "Color", "Object color and alpha, used when faces have the ObColor mode enabled.");
+
+ prop= RNA_def_property(srna, "time_offset", PROP_FLOAT, PROP_NONE);
+ RNA_def_property_float_sdna(prop, NULL, "sf");
+ RNA_def_property_range(prop, -MAXFRAMEF, MAXFRAMEF);
+ RNA_def_property_ui_text(prop, "Time Offset", "Animation offset in frames for ipo's and dupligroup instances.");
+
+ /* physics */
+
+ prop= RNA_def_property(srna, "field", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "pd");
+ RNA_def_property_struct_type(prop, "FieldSettings");
+ RNA_def_property_ui_text(prop, "Field Settings", "Settings for using the objects as a field in physics simulation.");
+
+ prop= RNA_def_property(srna, "collision", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "pd");
+ RNA_def_property_struct_type(prop, "CollisionSettings");
+ RNA_def_property_ui_text(prop, "Collision Settings", "Settings for using the objects as a collider in physics simulation.");
+
+ prop= RNA_def_property(srna, "soft_body", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "soft");
+ RNA_def_property_ui_text(prop, "Soft Body Settings", "Settings for soft body simulation.");
+
+ prop= RNA_def_property(srna, "particle_systems", PROP_COLLECTION, PROP_NONE);
+ RNA_def_property_collection_sdna(prop, NULL, "particlesystem", NULL);
+ RNA_def_property_struct_type(prop, "ParticleSystem");
+ RNA_def_property_ui_text(prop, "Particle Systems", "Particle systems emitted from the object.");
+
+ /* restrict */
+
+ prop= RNA_def_property(srna, "restrict_view", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", OB_RESTRICT_VIEW);
+ RNA_def_property_ui_text(prop, "Restrict View", "Restrict visibility in the viewport.");
+
+ prop= RNA_def_property(srna, "restrict_select", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", OB_RESTRICT_SELECT);
+ RNA_def_property_ui_text(prop, "Restrict Select", "Restrict selection in the viewport.");
+
+ prop= RNA_def_property(srna, "restrict_render", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "restrictflag", OB_RESTRICT_RENDER);
+ RNA_def_property_ui_text(prop, "Restrict Render", "Restrict renderability.");
}
void RNA_def_object(BlenderRNA *brna)
{
- rna_def_vertex_group(brna);
- rna_def_object_game_settings(brna);
rna_def_object(brna);
+ rna_def_object_game_settings(brna);
+ rna_def_vertex_group(brna);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_object_force.c b/source/blender/makesrna/intern/rna_object_force.c
new file mode 100644
index 00000000000..5ae919d2ffd
--- /dev/null
+++ b/source/blender/makesrna/intern/rna_object_force.c
@@ -0,0 +1,93 @@
+/**
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Contributor(s): Blender Foundation (2008).
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <stdlib.h>
+
+#include "RNA_define.h"
+#include "RNA_types.h"
+
+#include "rna_internal.h"
+
+#include "DNA_object_types.h"
+#include "DNA_object_force.h"
+
+#ifdef RNA_RUNTIME
+
+#else
+
+static void rna_def_pointcache(BlenderRNA *brna)
+{
+ StructRNA *srna;
+
+ srna= RNA_def_struct(brna, "PointCache", NULL);
+ RNA_def_struct_ui_text(srna, "Point Cache", "Point cache for physics simulations.");
+}
+
+static void rna_def_collision(BlenderRNA *brna)
+{
+ StructRNA *srna;
+
+ srna= RNA_def_struct(brna, "CollisionSettings", NULL);
+ RNA_def_struct_sdna(srna, "PartDeflect");
+ RNA_def_struct_ui_text(srna, "Collision Settings", "Collision settings for physics simulation.");
+}
+
+static void rna_def_field(BlenderRNA *brna)
+{
+ StructRNA *srna;
+
+ srna= RNA_def_struct(brna, "FieldSettings", NULL);
+ RNA_def_struct_sdna(srna, "PartDeflect");
+ RNA_def_struct_ui_text(srna, "Field Settings", "Field settings for physics simulation.");
+}
+
+static void rna_def_game_softbody(BlenderRNA *brna)
+{
+ StructRNA *srna;
+
+ srna= RNA_def_struct(brna, "GameSoftBodySettings", NULL);
+ RNA_def_struct_sdna(srna, "BulletSoftBody");
+ RNA_def_struct_ui_text(srna, "Game Soft Body Settings", "Soft body simulation settings for an object in the game engine.");
+}
+
+static void rna_def_softbody(BlenderRNA *brna)
+{
+ StructRNA *srna;
+
+ srna= RNA_def_struct(brna, "SoftBodySettings", NULL);
+ RNA_def_struct_sdna(srna, "SoftBody");
+ RNA_def_struct_ui_text(srna, "Soft Body Settings", "Soft body simulation settings for an object.");
+}
+
+void RNA_def_object_force(BlenderRNA *brna)
+{
+ rna_def_pointcache(brna);
+ rna_def_collision(brna);
+ rna_def_field(brna);
+ rna_def_game_softbody(brna);
+ rna_def_softbody(brna);
+}
+
+#endif
+
diff --git a/source/blender/makesrna/intern/rna_particle.c b/source/blender/makesrna/intern/rna_particle.c
new file mode 100644
index 00000000000..25e3df40111
--- /dev/null
+++ b/source/blender/makesrna/intern/rna_particle.c
@@ -0,0 +1,66 @@
+/**
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Contributor(s): Blender Foundation (2008).
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <stdlib.h>
+
+#include "RNA_define.h"
+#include "RNA_types.h"
+
+#include "rna_internal.h"
+
+#include "DNA_particle_types.h"
+
+#ifdef RNA_RUNTIME
+
+#else
+
+static void rna_def_particlesettings(BlenderRNA *brna)
+{
+ StructRNA *srna;
+
+ srna= RNA_def_struct(brna, "ParticleSettings", "ID");
+ RNA_def_struct_ui_text(srna, "Particle Settings", "Particle settings, reusable by multiple particle systems.");
+}
+
+static void rna_def_particlesystem(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "ParticleSystem", NULL);
+ RNA_def_struct_ui_text(srna, "Particle System", "Particle system in an object.");
+
+ prop= RNA_def_property(srna, "settings", PROP_POINTER, PROP_NONE);
+ RNA_def_property_pointer_sdna(prop, NULL, "part");
+ RNA_def_property_ui_text(prop, "Settings", "Particle system settings.");
+}
+
+void RNA_def_particle(BlenderRNA *brna)
+{
+ rna_def_particlesystem(brna);
+ rna_def_particlesettings(brna);
+}
+
+#endif
+
diff --git a/source/blender/makesrna/intern/rna_property.c b/source/blender/makesrna/intern/rna_property.c
index 4e21d033a96..12fdb4a9508 100644
--- a/source/blender/makesrna/intern/rna_property.c
+++ b/source/blender/makesrna/intern/rna_property.c
@@ -24,7 +24,6 @@
#include <stdlib.h>
-#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_types.h"
diff --git a/source/blender/makesrna/intern/rna_rna.c b/source/blender/makesrna/intern/rna_rna.c
index b4d414c727d..aead0ca54c0 100644
--- a/source/blender/makesrna/intern/rna_rna.c
+++ b/source/blender/makesrna/intern/rna_rna.c
@@ -24,7 +24,6 @@
#include <stdlib.h>
-#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_types.h"
diff --git a/source/blender/makesrna/intern/rna_sensor.c b/source/blender/makesrna/intern/rna_sensor.c
index daad0a58689..1db3abe12ec 100644
--- a/source/blender/makesrna/intern/rna_sensor.c
+++ b/source/blender/makesrna/intern/rna_sensor.c
@@ -24,7 +24,6 @@
#include <stdlib.h>
-#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_types.h"
diff --git a/source/blender/makesrna/intern/rna_sequence.c b/source/blender/makesrna/intern/rna_sequence.c
index 7b5d2e85d37..4344c936c94 100644
--- a/source/blender/makesrna/intern/rna_sequence.c
+++ b/source/blender/makesrna/intern/rna_sequence.c
@@ -193,15 +193,12 @@ static void rna_def_strip_color_balance(BlenderRNA *brna)
prop= RNA_def_property(srna, "lift", PROP_FLOAT, PROP_COLOR);
RNA_def_property_ui_text(prop, "Lift", "Color balance lift (shadows).");
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 10, 3);
prop= RNA_def_property(srna, "gamma", PROP_FLOAT, PROP_COLOR);
RNA_def_property_ui_text(prop, "Gamma", "Color balance gamma (midtones).");
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 10, 3);
prop= RNA_def_property(srna, "gain", PROP_FLOAT, PROP_COLOR);
RNA_def_property_ui_text(prop, "Gain", "Color balance gain (highlights).");
- RNA_def_property_ui_range(prop, 0.0f, 1.0f, 10, 3);
prop= RNA_def_property(srna, "inverse_gain", PROP_BOOLEAN, PROP_NONE);
RNA_def_property_boolean_sdna(prop, NULL, "flag", SEQ_COLOR_BALANCE_INVERSE_GAIN);
diff --git a/source/blender/makesrna/intern/rna_sound.c b/source/blender/makesrna/intern/rna_sound.c
index 5d35811e0bc..6a74a324232 100644
--- a/source/blender/makesrna/intern/rna_sound.c
+++ b/source/blender/makesrna/intern/rna_sound.c
@@ -24,7 +24,6 @@
#include <stdlib.h>
-#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_types.h"
@@ -37,31 +36,33 @@
#else
-void RNA_def_sample(BlenderRNA *brna)
+#if 0
+static void rna_def_sample(BlenderRNA *brna)
{
StructRNA *srna;
PropertyRNA *prop;
/* sound types */
static EnumPropertyItem prop_sample_type_items[] = {
- {SAMPLE_INVALID, "SAMPLE_INVALID", "Invalid", ""},
- {SAMPLE_UNKNOWN, "SAMPLE_UNKNOWN", "Unknown", ""},
- {SAMPLE_RAW, "SAMPLE_RAW", "Raw", ""},
- {SAMPLE_WAV, "SAMPLE_WAV", "WAV", "Uncompressed"},
- {SAMPLE_MP2, "SAMPLE_MP2", "MP2", "MPEG-1 Audio Layer 2"},
- {SAMPLE_MP3, "SAMPLE_MP3", "MP3", "MPEG-1 Audio Layer 3"},
- {SAMPLE_OGG_VORBIS, "SAMPLE_OGG_VORBIS", "Ogg Vorbis", ""},
- {SAMPLE_WMA, "SAMPLE_WMA", "WMA", "Windows Media Audio"},
- {SAMPLE_ASF, "SAMPLE_ASF", "ASF", "Windows Advanced Systems Format"},
- {SAMPLE_AIFF, "SAMPLE_AIFF", "AIFF", "Audio Interchange File Format"},
+ {SAMPLE_INVALID, "INVALID", "Invalid", ""},
+ {SAMPLE_UNKNOWN, "UNKNOWN", "Unknown", ""},
+ {SAMPLE_RAW, "RAW", "Raw", ""},
+ {SAMPLE_WAV, "WAV", "WAV", "Uncompressed"},
+ {SAMPLE_MP2, "MP2", "MP2", "MPEG-1 Audio Layer 2"},
+ {SAMPLE_MP3, "MP3", "MP3", "MPEG-1 Audio Layer 3"},
+ {SAMPLE_OGG_VORBIS, "OGG_VORBIS", "Ogg Vorbis", ""},
+ {SAMPLE_WMA, "WMA", "WMA", "Windows Media Audio"},
+ {SAMPLE_ASF, "ASF", "ASF", "Windows Advanced Systems Format"},
+ {SAMPLE_AIFF, "AIFF", "AIFF", "Audio Interchange File Format"},
{0, NULL, NULL, NULL}};
- srna= RNA_def_struct(brna, "Sample", "ID");
+ srna= RNA_def_struct(brna, "SoundSample", "ID");
RNA_def_struct_sdna(srna, "bSample");
RNA_def_struct_ui_text(srna, "SoundSample", "Sound Sample");
prop= RNA_def_property(srna, "type", PROP_ENUM, PROP_NONE);
RNA_def_property_enum_items(prop, prop_sample_type_items);
+ RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
RNA_def_property_ui_text(prop, "Types", "");
prop= RNA_def_property(srna, "filename", PROP_STRING, PROP_FILEPATH);
@@ -85,10 +86,10 @@ void RNA_def_sample(BlenderRNA *brna)
prop= RNA_def_property(srna, "channels", PROP_INT, PROP_UNSIGNED);
RNA_def_property_ui_text(prop, "Channels", "Number of channels (mono=1; stereo=2)");
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
-
}
+#endif
-void RNA_def_soundlistener(BlenderRNA *brna)
+static void rna_def_soundlistener(BlenderRNA *brna)
{
StructRNA *srna;
@@ -121,10 +122,9 @@ void RNA_def_soundlistener(BlenderRNA *brna)
RNA_def_property_int_sdna(prop, NULL, "numsoundsgameengine");
RNA_def_property_ui_text(prop, "Total Sounds in Game Engine", "The total number of sounds in the Game Engine.");
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
-
}
-void RNA_def_sound(BlenderRNA *brna)
+static void rna_def_sound(BlenderRNA *brna)
{
StructRNA *srna;
@@ -213,7 +213,13 @@ void RNA_def_sound(BlenderRNA *brna)
RNA_def_property_boolean_sdna(prop, NULL, "flags", SOUND_FLAGS_SEQUENCE); /* use bitflags */
RNA_def_property_ui_text(prop, "Priority", "DOC_BROKEN");
RNA_def_property_flag(prop, PROP_NOT_EDITABLE);
-
+}
+
+void RNA_def_sound(BlenderRNA *brna)
+{
+ //rna_def_sample(brna);
+ rna_def_soundlistener(brna);
+ rna_def_sound(brna);
}
#endif
diff --git a/source/blender/makesrna/intern/rna_text.c b/source/blender/makesrna/intern/rna_text.c
index 50fdd978a73..77cff4f8d15 100644
--- a/source/blender/makesrna/intern/rna_text.c
+++ b/source/blender/makesrna/intern/rna_text.c
@@ -163,7 +163,6 @@ static void rna_def_text_marker(BlenderRNA *brna)
RNA_def_property_ui_text(prop, "Edit All", "Edit all markers of the same group as one.");
prop= RNA_def_property(srna, "color", PROP_FLOAT, PROP_COLOR);
- RNA_def_property_range(prop, 0.0f, 1.0f);
RNA_def_property_float_funcs(prop, "rna_TextMarker_color_get", "rna_TextMarker_color_set", NULL);
RNA_def_property_ui_text(prop, "Color", "Color to display the marker with.");
}
diff --git a/source/blender/makesrna/intern/rna_userdef.c b/source/blender/makesrna/intern/rna_userdef.c
new file mode 100644
index 00000000000..a26c3e566cd
--- /dev/null
+++ b/source/blender/makesrna/intern/rna_userdef.c
@@ -0,0 +1,58 @@
+/**
+ * $Id$
+ *
+ * ***** BEGIN GPL LICENSE BLOCK *****
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software Foundation,
+ * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+ *
+ * Contributor(s): Blender Foundation (2008).
+ *
+ * ***** END GPL LICENSE BLOCK *****
+ */
+
+#include <stdlib.h>
+
+#include "RNA_define.h"
+#include "RNA_types.h"
+
+#include "rna_internal.h"
+
+#include "DNA_userdef_types.h"
+
+#ifdef RNA_RUNTIME
+
+#else
+
+static void rna_def_userdef(BlenderRNA *brna)
+{
+ StructRNA *srna;
+ PropertyRNA *prop;
+
+ srna= RNA_def_struct(brna, "UserPreferences", NULL);
+ RNA_def_struct_sdna(srna, "UserDef");
+ RNA_def_struct_ui_text(srna, "User Preferences", "");
+
+ prop= RNA_def_property(srna, "auto_save_temporary_files", PROP_BOOLEAN, PROP_NONE);
+ RNA_def_property_boolean_sdna(prop, NULL, "flag", USER_AUTOSAVE);
+ RNA_def_property_ui_text(prop, "Auto Save Temporary Files", "Automatic saving of temporary files.");
+}
+
+void RNA_def_userdef(BlenderRNA *brna)
+{
+ rna_def_userdef(brna);
+}
+
+#endif
+
diff --git a/source/blender/makesrna/intern/rna_world.c b/source/blender/makesrna/intern/rna_world.c
index faf8a17363b..ef6905ad19f 100644
--- a/source/blender/makesrna/intern/rna_world.c
+++ b/source/blender/makesrna/intern/rna_world.c
@@ -24,7 +24,6 @@
#include <stdlib.h>
-#include "RNA_access.h"
#include "RNA_define.h"
#include "RNA_types.h"
@@ -68,19 +67,16 @@ void RNA_def_world(BlenderRNA *brna)
prop= RNA_def_property(srna, "horizon_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "horr");
RNA_def_property_array(prop, 3);
- RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Horizon Color", "Color at the horizon.");
prop= RNA_def_property(srna, "zenith_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "zenr");
RNA_def_property_array(prop, 3);
- RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Zenith Color", "Color at the zenith.");
prop= RNA_def_property(srna, "ambient_color", PROP_FLOAT, PROP_COLOR);
RNA_def_property_float_sdna(prop, NULL, "ambr");
RNA_def_property_array(prop, 3);
- RNA_def_property_range(prop, 0.0, 1.0);
RNA_def_property_ui_text(prop, "Ambient Color", "");
/* exp, range */