diff options
author | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-11-02 17:36:28 +0400 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@pandora.be> | 2011-11-02 17:36:28 +0400 |
commit | 79a389ee3711f0528c33e5aeb4b2a202e5e44b38 (patch) | |
tree | 844f5ad24583cf4664ff98b591fa7859bb71ad78 /source/blender/makesrna/intern/rna_render.c | |
parent | 3d35e004d35faf45968c0cead7d758a5599a2bcc (diff) |
RenderEngine: add .is_animation and .is_preview properties to detect if it's
an animation or preview render that is being done.
Diffstat (limited to 'source/blender/makesrna/intern/rna_render.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_render.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/source/blender/makesrna/intern/rna_render.c b/source/blender/makesrna/intern/rna_render.c index 1498d161209..9b53b477c52 100644 --- a/source/blender/makesrna/intern/rna_render.c +++ b/source/blender/makesrna/intern/rna_render.c @@ -251,9 +251,16 @@ static void rna_def_render_engine(BlenderRNA *brna) prop= RNA_def_string(func, "message", "", 0, "Report Message", ""); RNA_def_property_flag(prop, PROP_REQUIRED); - /* registration */ RNA_define_verify_sdna(0); + prop= RNA_def_property(srna, "is_animation", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", RE_ENGINE_ANIMATION); + + prop= RNA_def_property(srna, "is_preview", PROP_BOOLEAN, PROP_NONE); + RNA_def_property_boolean_sdna(prop, NULL, "flag", RE_ENGINE_PREVIEW); + + /* registration */ + prop= RNA_def_property(srna, "bl_idname", PROP_STRING, PROP_NONE); RNA_def_property_string_sdna(prop, NULL, "type->idname"); RNA_def_property_flag(prop, PROP_REGISTER|PROP_NEVER_CLAMP); |