diff options
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_main.c | 20 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_modifier.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_object_api.c | 2 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_rigidbody.c | 19 | ||||
-rw-r--r-- | source/blender/makesrna/intern/rna_space.c | 15 |
5 files changed, 52 insertions, 6 deletions
diff --git a/source/blender/makesrna/intern/rna_main.c b/source/blender/makesrna/intern/rna_main.c index 6a43fed3ac6..b7b793ebeaf 100644 --- a/source/blender/makesrna/intern/rna_main.c +++ b/source/blender/makesrna/intern/rna_main.c @@ -42,6 +42,22 @@ /* all the list begin functions are added manually here, Main is not in SDNA */ +static int rna_Main_use_autopack_get(PointerRNA *UNUSED(ptr)) +{ + if (G.fileflags & G_AUTOPACK) + return 1; + + return 0; +} + +static void rna_Main_use_autopack_set(PointerRNA *UNUSED(ptr), int value) +{ + if (value) + G.fileflags |= G_AUTOPACK; + else + G.fileflags &= ~G_AUTOPACK; +} + static int rna_Main_is_saved_get(PointerRNA *UNUSED(ptr)) { return G.relbase_valid; @@ -356,6 +372,10 @@ void RNA_def_main(BlenderRNA *brna) RNA_def_property_boolean_funcs(prop, "rna_Main_is_saved_get", NULL); RNA_def_property_ui_text(prop, "File is Saved", "Has the current session been saved to disk as a .blend file"); + prop = RNA_def_property(srna, "use_autopack", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_funcs(prop, "rna_Main_use_autopack_get", "rna_Main_use_autopack_set"); + RNA_def_property_ui_text(prop, "Use Autopack", "Automatically pack all external data into .blend file"); + for (i = 0; lists[i].name; i++) { prop = RNA_def_property(srna, lists[i].identifier, PROP_COLLECTION, PROP_NONE); RNA_def_property_struct_type(prop, lists[i].type); diff --git a/source/blender/makesrna/intern/rna_modifier.c b/source/blender/makesrna/intern/rna_modifier.c index 84ee2b1402e..de002bdfd2c 100644 --- a/source/blender/makesrna/intern/rna_modifier.c +++ b/source/blender/makesrna/intern/rna_modifier.c @@ -80,7 +80,7 @@ EnumPropertyItem modifier_type_items[] = { {eModifierType_Solidify, "SOLIDIFY", ICON_MOD_SOLIDIFY, "Solidify", ""}, {eModifierType_Subsurf, "SUBSURF", ICON_MOD_SUBSURF, "Subdivision Surface", ""}, {eModifierType_Triangulate, "TRIANGULATE", ICON_MOD_TRIANGULATE, "Triangulate", ""}, - {eModifierType_Wireframe, "WIREFRAME", ICON_MOD_WIREFRAME, "Wireframe", "Generates a wireframe on the edges of a mesh"}, + {eModifierType_Wireframe, "WIREFRAME", ICON_MOD_WIREFRAME, "Wireframe", "Generate a wireframe on the edges of a mesh"}, {0, "", 0, N_("Deform"), ""}, {eModifierType_Armature, "ARMATURE", ICON_MOD_ARMATURE, "Armature", ""}, {eModifierType_Cast, "CAST", ICON_MOD_CAST, "Cast", ""}, diff --git a/source/blender/makesrna/intern/rna_object_api.c b/source/blender/makesrna/intern/rna_object_api.c index 8cd3252fe10..85e0d91fc71 100644 --- a/source/blender/makesrna/intern/rna_object_api.c +++ b/source/blender/makesrna/intern/rna_object_api.c @@ -386,7 +386,7 @@ void rna_Object_dm_info(struct Object *ob, int type, char *result) switch (type) { case 0: if (ob->type == OB_MESH) { - dm = CDDM_from_mesh(ob->data, ob); + dm = CDDM_from_mesh(ob->data); ret = DM_debug_info(dm); dm_release = TRUE; } diff --git a/source/blender/makesrna/intern/rna_rigidbody.c b/source/blender/makesrna/intern/rna_rigidbody.c index cc14e60f45a..58fc9ab25d4 100644 --- a/source/blender/makesrna/intern/rna_rigidbody.c +++ b/source/blender/makesrna/intern/rna_rigidbody.c @@ -76,6 +76,13 @@ EnumPropertyItem rigidbody_constraint_type_items[] = { {RBC_TYPE_MOTOR, "MOTOR", ICON_NONE, "Motor", "Drive rigid body around or along an axis"}, {0, NULL, 0, NULL, NULL}}; +/* mesh source for collision shape creation */ +EnumPropertyItem rigidbody_mesh_source_items[] = { + {RBO_MESH_BASE, "BASE", 0, "Base", "Base mesh"}, + {RBO_MESH_DEFORM, "DEFORM", 0, "Deform", "Deformations (shaps keys, deform modifiers"}, + {RBO_MESH_FINAL, "FINAL", 0, "Final", "All modifiers"}, + {0, NULL, 0, NULL, NULL}}; + #ifdef RNA_RUNTIME @@ -769,6 +776,13 @@ static void rna_def_rigidbody_object(BlenderRNA *brna) RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); RNA_def_property_update(prop, NC_OBJECT | ND_POINTCACHE, "rna_RigidBodyOb_reset"); + prop = RNA_def_property(srna, "mesh_source", PROP_ENUM, PROP_NONE); + RNA_def_property_enum_sdna(prop, NULL, "mesh_source"); + RNA_def_property_enum_items(prop, rigidbody_mesh_source_items); + RNA_def_property_ui_text(prop, "Mesh Source", "Source of the mesh used to create collision shape"); + RNA_def_property_clear_flag(prop, PROP_ANIMATABLE); + RNA_def_property_update(prop, NC_OBJECT | ND_POINTCACHE, "rna_RigidBodyOb_reset"); + /* booleans */ prop = RNA_def_property(srna, "enabled", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_negative_sdna(prop, NULL, "flag", RBO_FLAG_DISABLED); @@ -790,6 +804,11 @@ static void rna_def_rigidbody_object(BlenderRNA *brna) RNA_def_property_ui_text(prop, "Kinematic", "Allow rigid body to be controlled by the animation system"); RNA_def_property_update(prop, NC_OBJECT | ND_POINTCACHE, "rna_RigidBodyOb_reset"); + prop = RNA_def_property(srna, "use_deform", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", RBO_FLAG_USE_DEFORM); + RNA_def_property_ui_text(prop, "Deforming", "Rigid body deforms during simulation"); + RNA_def_property_update(prop, NC_OBJECT | ND_POINTCACHE, "rna_RigidBodyOb_reset"); + /* Physics Parameters */ prop = RNA_def_property(srna, "mass", PROP_FLOAT, PROP_UNIT_MASS); RNA_def_property_float_sdna(prop, NULL, "mass"); diff --git a/source/blender/makesrna/intern/rna_space.c b/source/blender/makesrna/intern/rna_space.c index fdaf204be23..ae6b2e75658 100644 --- a/source/blender/makesrna/intern/rna_space.c +++ b/source/blender/makesrna/intern/rna_space.c @@ -3745,14 +3745,21 @@ static void rna_def_space_clip(BlenderRNA *brna) "Show curve for per-frame average error (camera motion should be solved first)"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, NULL); - /* show graph_tracks */ - prop = RNA_def_property(srna, "show_graph_tracks", PROP_BOOLEAN, PROP_NONE); - RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_GRAPH_TRACKS); - RNA_def_property_ui_text(prop, "Show Tracks", + /* show graph tracks motion */ + prop = RNA_def_property(srna, "show_graph_tracks_motion", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_GRAPH_TRACKS_MOTION); + RNA_def_property_ui_text(prop, "Show Tracks Motion", "Display the speed curves (in \"x\" direction red, in \"y\" direction green) " "for the selected tracks"); RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, NULL); + /* show graph tracks motion */ + prop = RNA_def_property(srna, "show_graph_tracks_error", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_GRAPH_TRACKS_ERROR); + RNA_def_property_ui_text(prop, "Show Tracks Error", + "Display the reprojection error curve for selected tracks"); + RNA_def_property_update(prop, NC_SPACE | ND_SPACE_CLIP, NULL); + /* show_only_selected */ prop = RNA_def_property(srna, "show_graph_only_selected", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "flag", SC_SHOW_GRAPH_SEL_ONLY); |