diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-05-16 07:03:31 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-05-16 07:13:51 +0300 |
commit | 74ddf3bd0d56cb3b6231d2ca0223827c2b7e25f0 (patch) | |
tree | b81ef54805d5024a6486046ea7e8a3e687aadd84 | |
parent | 4ba7d4ca9d7236e13fb89dea5d89de3de1494719 (diff) |
Cleanup: use doxy sections for object_add.c
-rw-r--r-- | source/blender/editors/object/object_add.c | 140 |
1 files changed, 118 insertions, 22 deletions
diff --git a/source/blender/editors/object/object_add.c b/source/blender/editors/object/object_add.c index a7495b516dc..293b3a57fdb 100644 --- a/source/blender/editors/object/object_add.c +++ b/source/blender/editors/object/object_add.c @@ -113,6 +113,10 @@ #include "object_intern.h" +/* -------------------------------------------------------------------- */ +/** \name Local Enum Declarations + * \{ */ + /* this is an exact copy of the define in rna_light.c * kept here because of linking order. * Icons are only defined here */ @@ -171,9 +175,15 @@ static const EnumPropertyItem align_options[] = { {ALIGN_WORLD, "WORLD", 0, "World", "Align the new object to the world"}, {ALIGN_VIEW, "VIEW", 0, "View", "Align the new object to the view"}, {ALIGN_CURSOR, "CURSOR", 0, "3D Cursor", "Use the 3D cursor orientation for the new object"}, - {0, NULL, 0, NULL, NULL}}; + {0, NULL, 0, NULL, NULL}, +}; + +/** \} */ -/************************** Exported *****************************/ +/* -------------------------------------------------------------------- */ +/** \name Public Add Object API + * + * \{ */ void ED_object_location_from_view(bContext *C, float loc[3]) { @@ -278,7 +288,11 @@ float ED_object_new_primitive_matrix( // return 1.0f; } -/********************* Add Object Operator ********************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Add Object Operator + * \{ */ static void view_align_update(struct Main *UNUSED(main), struct Scene *UNUSED(scene), @@ -548,7 +562,11 @@ void OBJECT_OT_add(wmOperatorType *ot) ED_object_add_generic_props(ot, true); } -/********************** Add Probe Operator **********************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Add Probe Operator + * \{ */ /* for object add operator */ static const char *get_lightprobe_defname(int type) @@ -636,7 +654,11 @@ void OBJECT_OT_lightprobe_add(wmOperatorType *ot) ED_object_add_generic_props(ot, true); } -/********************* Add Effector Operator ********************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Add Effector Operator + * \{ */ /* for object add operator */ static int effector_add_exec(bContext *C, wmOperator *op) @@ -709,7 +731,11 @@ void OBJECT_OT_effector_add(wmOperatorType *ot) ED_object_add_generic_props(ot, true); } -/********************* Add Camera Operator ********************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Add Camera Operator + * \{ */ static int object_camera_add_exec(bContext *C, wmOperator *op) { @@ -768,7 +794,11 @@ void OBJECT_OT_camera_add(wmOperatorType *ot) RNA_def_property_flag(prop, PROP_HIDDEN); } -/********************* Add Metaball Operator ********************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Add Metaball Operator + * \{ */ static int object_metaball_add_exec(bContext *C, wmOperator *op) { @@ -829,7 +859,11 @@ void OBJECT_OT_metaball_add(wmOperatorType *ot) ED_object_add_generic_props(ot, true); } -/********************* Add Text Operator ********************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Add Text Operator + * \{ */ static int object_add_text_exec(bContext *C, wmOperator *op) { @@ -874,7 +908,11 @@ void OBJECT_OT_text_add(wmOperatorType *ot) ED_object_add_generic_props(ot, true); } -/********************* Add Armature Operator ********************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Add Armature Operator + * \{ */ static int object_armature_add_exec(bContext *C, wmOperator *op) { @@ -937,7 +975,11 @@ void OBJECT_OT_armature_add(wmOperatorType *ot) ED_object_add_generic_props(ot, true); } -/********************* Add Empty Operator ********************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Add Empty Operator + * \{ */ static int object_empty_add_exec(bContext *C, wmOperator *op) { @@ -1057,7 +1099,12 @@ void OBJECT_OT_drop_named_image(wmOperatorType *ot) ED_object_add_generic_props(ot, false); } -/********************* Add Gpencil Operator ********************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Add Gpencil Operator + * \{ */ + static bool object_gpencil_add_poll(bContext *C) { Scene *scene = CTX_data_scene(C); @@ -1188,7 +1235,11 @@ void OBJECT_OT_gpencil_add(wmOperatorType *ot) ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_object_gpencil_type_items, 0, "Type", ""); } -/********************* Add Light Operator ********************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Add Light Operator + * \{ */ static const char *get_light_defname(int type) { @@ -1268,7 +1319,11 @@ void OBJECT_OT_light_add(wmOperatorType *ot) ED_object_add_generic_props(ot, false); } -/********************* Add Collection Instance Operator ********************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Add Collection Instance Operator + * \{ */ static int collection_instance_add_exec(bContext *C, wmOperator *op) { @@ -1354,7 +1409,11 @@ void OBJECT_OT_collection_instance_add(wmOperatorType *ot) ED_object_add_generic_props(ot, false); } -/********************* Add Speaker Operator ********************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Add Speaker Operator + * \{ */ static int object_speaker_add_exec(bContext *C, wmOperator *op) { @@ -1409,7 +1468,11 @@ void OBJECT_OT_speaker_add(wmOperatorType *ot) ED_object_add_generic_props(ot, true); } -/**************************** Delete Object *************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Delete Object Operator + * \{ */ /* remove base from a specific scene */ /* note: now unlinks constraints as well */ @@ -1567,7 +1630,11 @@ void OBJECT_OT_delete(wmOperatorType *ot) WM_operator_properties_confirm_or_exec(ot); } -/**************************** Copy Utilities ******************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Copy Object Utilities + * \{ */ /* after copying objects, copied data should get new pointers */ static void copy_object_set_idnew(bContext *C) @@ -1582,7 +1649,11 @@ static void copy_object_set_idnew(bContext *C) BKE_main_id_clear_newpoins(bmain); } -/********************* Make Duplicates Real ************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Make Instanced Objects Real Operator + * \{ */ /** * \note regarding hashing dupli-objects when using OB_DUPLICOLLECTION, @@ -1868,7 +1939,11 @@ void OBJECT_OT_duplicates_make_real(wmOperatorType *ot) ot->srna, "use_hierarchy", 0, "Keep Hierarchy", "Maintain parent child relationships"); } -/**************************** Convert **************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Data Convert Operator + * \{ */ static const EnumPropertyItem convert_target_items[] = { {OB_CURVE, "CURVE", ICON_OUTLINER_OB_CURVE, "Curve from Mesh/Text", ""}, @@ -2323,7 +2398,11 @@ void OBJECT_OT_convert(wmOperatorType *ot) "Keep original objects instead of replacing them"); } -/**************************** Duplicate ************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Duplicate Object Operator + * \{ */ /* * dupflag: a flag made from constants declared in DNA_userdef_types.h @@ -2479,7 +2558,13 @@ void OBJECT_OT_duplicate(wmOperatorType *ot) RNA_def_property_flag(prop, PROP_HIDDEN); } -/* **************** add named object, for dragdrop ************* */ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Add Named Object Operator + * + * Use for for drag & drop. + * \{ */ static int add_named_exec(bContext *C, wmOperator *op) { @@ -2557,7 +2642,12 @@ void OBJECT_OT_add_named(wmOperatorType *ot) RNA_def_string(ot->srna, "name", NULL, MAX_ID_NAME - 2, "Name", "Object name to add"); } -/**************************** Join *************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Join Object Operator + * + * \{ */ static bool join_poll(bContext *C) { @@ -2626,7 +2716,11 @@ void OBJECT_OT_join(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } -/**************************** Join as Shape Key*************************/ +/** \} */ + +/* -------------------------------------------------------------------- */ +/** \name Join as Shape Key Operator + * \{ */ static bool join_shapes_poll(bContext *C) { @@ -2679,3 +2773,5 @@ void OBJECT_OT_join_shapes(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } + +/** \} */ |