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:
authorBastien Montagne <montagne29@wanadoo.fr>2016-12-12 17:23:55 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-12-12 17:46:06 +0300
commit440d1042798113a0e8115ea1f1d016a44712e7a0 (patch)
tree147ca3dfc851aa635538a988005afa5ed89ac65a /source/blender/makesrna/intern/rna_sequencer_api.c
parent62703850ad560b5832c4e42143f563d11ba21cf4 (diff)
Refactor RNA property: split flags in property flags, parameter flags, and internal flags.
This gives us 9 flags available again for properties (we had none anymore), and also makes things slightly cleaner. To simplify (and make more clear the differences between mere properties and function parameters), also added RNA_def_parameter_flags function (and its clear counterpart), to be used instead of RNA_def_property_flag for function parameters. This patch is also a big cleanup (some RNA function definitions were still using 'prop' PropertyRNA pointer, etc.). And yes, am aware this will be annoying for all branches, but we really need to get new flags available for properties (will need at least one for override, etc.). Reviewers: sergey, Severin Subscribers: dfelinto, brecht Differential Revision: https://developer.blender.org/D2400
Diffstat (limited to 'source/blender/makesrna/intern/rna_sequencer_api.c')
-rw-r--r--source/blender/makesrna/intern/rna_sequencer_api.c68
1 files changed, 34 insertions, 34 deletions
diff --git a/source/blender/makesrna/intern/rna_sequencer_api.c b/source/blender/makesrna/intern/rna_sequencer_api.c
index 13fda02c7c8..76f5a4934cf 100644
--- a/source/blender/makesrna/intern/rna_sequencer_api.c
+++ b/source/blender/makesrna/intern/rna_sequencer_api.c
@@ -414,14 +414,14 @@ void RNA_api_sequence_strip(StructRNA *srna)
RNA_def_function_ui_description(func, "Return the strip element from a given frame or None");
parm = RNA_def_int(func, "frame", 0, -MAXFRAME, MAXFRAME, "Frame",
"The frame to get the strip element from", -MAXFRAME, MAXFRAME);
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
RNA_def_function_return(func, RNA_def_pointer(func, "elem", "SequenceElement", "",
"strip element of the current frame"));
func = RNA_def_function(srna, "swap", "rna_Sequence_swap_internal");
RNA_def_function_flag(func, FUNC_USE_REPORTS);
parm = RNA_def_pointer(func, "other", "Sequence", "Other", "");
- RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
+ RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED);
}
void RNA_api_sequence_elements(BlenderRNA *brna, PropertyRNA *cprop)
@@ -439,7 +439,7 @@ void RNA_api_sequence_elements(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_flag(func, FUNC_USE_SELF_ID);
RNA_def_function_ui_description(func, "Push an image from ImageSequence.directory");
parm = RNA_def_string(func, "filename", "File", 0, "", "Filepath to image");
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
/* return type */
parm = RNA_def_pointer(func, "elem", "SequenceElement", "", "New SequenceElement");
RNA_def_function_return(func, parm);
@@ -448,7 +448,7 @@ void RNA_api_sequence_elements(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID);
RNA_def_function_ui_description(func, "Pop an image off the collection");
parm = RNA_def_int(func, "index", -1, INT_MIN, INT_MAX, "", "Index of image to remove", INT_MIN, INT_MAX);
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
}
void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop)
@@ -487,15 +487,15 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_flag(func, FUNC_USE_SELF_ID);
RNA_def_function_ui_description(func, "Add a new movie clip sequence");
parm = RNA_def_string(func, "name", "Name", 0, "", "Name for the new sequence");
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
parm = RNA_def_pointer(func, "clip", "MovieClip", "", "Movie clip to add");
- RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
+ RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED);
parm = RNA_def_int(func, "channel", 0, 1, MAXSEQ, "Channel",
"The channel for the new sequence", 1, MAXSEQ);
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
parm = RNA_def_int(func, "frame_start", 0, -MAXFRAME, MAXFRAME, "",
"The start frame for the new sequence", -MAXFRAME, MAXFRAME);
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
/* return type */
parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence");
RNA_def_function_return(func, parm);
@@ -504,15 +504,15 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_flag(func, FUNC_USE_SELF_ID);
RNA_def_function_ui_description(func, "Add a new mask sequence");
parm = RNA_def_string(func, "name", "Name", 0, "", "Name for the new sequence");
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
parm = RNA_def_pointer(func, "mask", "Mask", "", "Mask to add");
- RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
+ RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED);
parm = RNA_def_int(func, "channel", 0, 1, MAXSEQ, "Channel",
"The channel for the new sequence", 1, MAXSEQ);
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
parm = RNA_def_int(func, "frame_start", 0, -MAXFRAME, MAXFRAME, "",
"The start frame for the new sequence", -MAXFRAME, MAXFRAME);
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
/* return type */
parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence");
RNA_def_function_return(func, parm);
@@ -521,15 +521,15 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_flag(func, FUNC_USE_SELF_ID);
RNA_def_function_ui_description(func, "Add a new scene sequence");
parm = RNA_def_string(func, "name", "Name", 0, "", "Name for the new sequence");
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
parm = RNA_def_pointer(func, "scene", "Scene", "", "Scene to add");
- RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL);
+ RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED);
parm = RNA_def_int(func, "channel", 0, 1, MAXSEQ, "Channel",
"The channel for the new sequence", 1, MAXSEQ);
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
parm = RNA_def_int(func, "frame_start", 0, -MAXFRAME, MAXFRAME, "",
"The start frame for the new sequence", -MAXFRAME, MAXFRAME);
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
/* return type */
parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence");
RNA_def_function_return(func, parm);
@@ -538,15 +538,15 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID);
RNA_def_function_ui_description(func, "Add a new image sequence");
parm = RNA_def_string(func, "name", "Name", 0, "", "Name for the new sequence");
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
parm = RNA_def_string(func, "filepath", "File", 0, "", "Filepath to image");
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
parm = RNA_def_int(func, "channel", 0, 1, MAXSEQ, "Channel",
"The channel for the new sequence", 1, MAXSEQ);
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
parm = RNA_def_int(func, "frame_start", 0, -MAXFRAME, MAXFRAME, "",
"The start frame for the new sequence", -MAXFRAME, MAXFRAME);
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
/* return type */
parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence");
RNA_def_function_return(func, parm);
@@ -555,15 +555,15 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID);
RNA_def_function_ui_description(func, "Add a new movie sequence");
parm = RNA_def_string(func, "name", "Name", 0, "", "Name for the new sequence");
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
parm = RNA_def_string(func, "filepath", "File", 0, "", "Filepath to movie");
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
parm = RNA_def_int(func, "channel", 0, 1, MAXSEQ, "Channel",
"The channel for the new sequence", 1, MAXSEQ);
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
parm = RNA_def_int(func, "frame_start", 0, -MAXFRAME, MAXFRAME, "",
"The start frame for the new sequence", -MAXFRAME, MAXFRAME);
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
/* return type */
parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence");
RNA_def_function_return(func, parm);
@@ -572,15 +572,15 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID | FUNC_USE_MAIN);
RNA_def_function_ui_description(func, "Add a new sound sequence");
parm = RNA_def_string(func, "name", "Name", 0, "", "Name for the new sequence");
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
parm = RNA_def_string(func, "filepath", "File", 0, "", "Filepath to movie");
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
parm = RNA_def_int(func, "channel", 0, 1, MAXSEQ, "Channel",
"The channel for the new sequence", 1, MAXSEQ);
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
parm = RNA_def_int(func, "frame_start", 0, -MAXFRAME, MAXFRAME, "",
"The start frame for the new sequence", -MAXFRAME, MAXFRAME);
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
/* return type */
parm = RNA_def_pointer(func, "sequence", "Sequence", "", "New Sequence");
RNA_def_function_return(func, parm);
@@ -589,17 +589,17 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_flag(func, FUNC_USE_REPORTS | FUNC_USE_SELF_ID);
RNA_def_function_ui_description(func, "Add a new effect sequence");
parm = RNA_def_string(func, "name", "Name", 0, "", "Name for the new sequence");
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
parm = RNA_def_enum(func, "type", seq_effect_items, 0, "Type",
"type for the new sequence");
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
parm = RNA_def_int(func, "channel", 0, 1, MAXSEQ, "Channel",
"The channel for the new sequence", 1, MAXSEQ);
/* don't use MAXFRAME since it makes importer scripts fail */
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
parm = RNA_def_int(func, "frame_start", 0, INT_MIN, INT_MAX, "",
"The start frame for the new sequence", INT_MIN, INT_MAX);
- RNA_def_property_flag(parm, PROP_REQUIRED);
+ RNA_def_parameter_flags(parm, 0, PARM_REQUIRED);
RNA_def_int(func, "frame_end", 0, INT_MIN, INT_MAX, "",
"The end frame for the new sequence", INT_MIN, INT_MAX);
RNA_def_pointer(func, "seq1", "Sequence", "", "Sequence 1 for effect");
@@ -614,8 +614,8 @@ void RNA_api_sequences(BlenderRNA *brna, PropertyRNA *cprop)
RNA_def_function_flag(func, FUNC_USE_SELF_ID | FUNC_USE_REPORTS);
RNA_def_function_ui_description(func, "Remove a Sequence");
parm = RNA_def_pointer(func, "sequence", "Sequence", "", "Sequence to remove");
- RNA_def_property_flag(parm, PROP_REQUIRED | PROP_NEVER_NULL | PROP_RNAPTR);
- RNA_def_property_clear_flag(parm, PROP_THICK_WRAP);
+ RNA_def_parameter_flags(parm, PROP_NEVER_NULL, PARM_REQUIRED | PARM_RNAPTR);
+ RNA_def_parameter_clear_flags(parm, PROP_THICK_WRAP, 0);
}