RenderEngine: add .is_animation and .is_preview properties to detect if it's
an animation or preview render that is being done.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user