diff options
author | Campbell Barton <ideasman42@gmail.com> | 2010-08-24 08:02:50 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2010-08-24 08:02:50 +0400 |
commit | 379fea2d0dc756c92ea2b3c2b805b5f3007977a1 (patch) | |
tree | 405a29409685fad4137e4e76a4dfdeced67a5b8b /source/blender/makesrna/intern/rna_scene.c | |
parent | 5c604e5524ace49caeda7c0bff9443afc43b236f (diff) |
move more active variables to be nested in collections.
Diffstat (limited to 'source/blender/makesrna/intern/rna_scene.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_scene.c | 44 |
1 files changed, 31 insertions, 13 deletions
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c index 442c4b64f91..715613cbd80 100644 --- a/source/blender/makesrna/intern/rna_scene.c +++ b/source/blender/makesrna/intern/rna_scene.c @@ -1810,6 +1810,29 @@ static void rna_def_scene_render_layer(BlenderRNA *brna) rna_def_render_layer_common(srna, 1); } +/* curve.splines */ +static void rna_def_render_layers(BlenderRNA *brna, PropertyRNA *cprop) +{ + StructRNA *srna; + PropertyRNA *prop; + + // FunctionRNA *func; + // PropertyRNA *parm; + + RNA_def_property_srna(cprop, "RenderLayers"); + srna= RNA_def_struct(brna, "RenderLayers", NULL); + RNA_def_struct_sdna(srna, "RenderData"); + RNA_def_struct_ui_text(srna, "Render Layers", "Collection of render layers"); + + prop= RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "actlay"); + RNA_def_property_int_funcs(prop, "rna_RenderSettings_active_layer_index_get", "rna_RenderSettings_active_layer_index_set", "rna_RenderSettings_active_layer_index_range"); + RNA_def_property_ui_text(prop, "Active Layer Index", "Active index in render layer array"); + RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); + + /* todo - active*/ +} + static void rna_def_scene_render_data(BlenderRNA *brna) { StructRNA *srna; @@ -2750,18 +2773,14 @@ static void rna_def_scene_render_data(BlenderRNA *brna) RNA_def_property_collection_sdna(prop, NULL, "layers", NULL); RNA_def_property_struct_type(prop, "SceneRenderLayer"); RNA_def_property_ui_text(prop, "Render Layers", ""); + rna_def_render_layers(brna, prop); + prop= RNA_def_property(srna, "use_single_layer", PROP_BOOLEAN, PROP_NONE); RNA_def_property_boolean_sdna(prop, NULL, "scemode", R_SINGLE_LAYER); RNA_def_property_ui_text(prop, "Single Layer", "Only render the active layer"); RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); - prop= RNA_def_property(srna, "active_layer_index", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "actlay"); - RNA_def_property_int_funcs(prop, "rna_RenderSettings_active_layer_index_get", "rna_RenderSettings_active_layer_index_set", "rna_RenderSettings_active_layer_index_range"); - RNA_def_property_ui_text(prop, "Active Layer Index", "Active index in render layer array"); - RNA_def_property_update(prop, NC_SCENE|ND_RENDER_OPTIONS, NULL); - /* engine */ prop= RNA_def_property(srna, "engine", PROP_ENUM, PROP_NONE); RNA_def_property_enum_items(prop, engine_items); @@ -2940,6 +2959,12 @@ static void rna_def_scene_keying_sets(BlenderRNA *brna, PropertyRNA *cprop) RNA_def_property_pointer_funcs(prop, "rna_Scene_active_keying_set_get", "rna_Scene_active_keying_set_set", NULL, NULL); RNA_def_property_ui_text(prop, "Active Keying Set", "Active Keying Set used to insert/delete keyframes"); RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL); + + prop= RNA_def_property(srna, "active_index", PROP_INT, PROP_NONE); + RNA_def_property_int_sdna(prop, NULL, "active_keyingset"); + RNA_def_property_int_funcs(prop, "rna_Scene_active_keying_set_index_get", "rna_Scene_active_keying_set_index_set", NULL); + RNA_def_property_ui_text(prop, "Active Keying Set Index", "Current Keying Set index (negative for 'builtin' and positive for 'absolute')"); + RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL); } void RNA_def_scene(BlenderRNA *brna) @@ -3134,13 +3159,6 @@ void RNA_def_scene(BlenderRNA *brna) RNA_def_property_ui_text(prop, "All Keying Sets", "All Keying Sets available for use (builtins and Absolute Keying Sets for this Scene)"); RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL); - /* TODO, move into the collection */ - prop= RNA_def_property(srna, "active_keying_set_index", PROP_INT, PROP_NONE); - RNA_def_property_int_sdna(prop, NULL, "active_keyingset"); - RNA_def_property_int_funcs(prop, "rna_Scene_active_keying_set_index_get", "rna_Scene_active_keying_set_index_set", NULL); - RNA_def_property_ui_text(prop, "Active Keying Set Index", "Current Keying Set index (negative for 'builtin' and positive for 'absolute')"); - RNA_def_property_update(prop, NC_SCENE|ND_KEYINGSET, NULL); - /* Tool Settings */ prop= RNA_def_property(srna, "tool_settings", PROP_POINTER, PROP_NONE); RNA_def_property_flag(prop, PROP_NEVER_NULL); |