diff options
author | Campbell Barton <ideasman42@gmail.com> | 2020-03-26 02:24:44 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-03-26 07:32:40 +0300 |
commit | 7354f07eadcc276c0daf83954aced41a0d6a265a (patch) | |
tree | 7ccb75a03693c403ddbff5f43b0d7cca2e4b1c30 | |
parent | ba8d819c9b1ccb7dae50167755167dc3e54bd657 (diff) |
Cleanup: use doxy sections & add missing sections
-rw-r--r-- | source/blender/editors/object/object_constraint.c | 152 | ||||
-rw-r--r-- | source/blender/editors/object/object_modifier.c | 135 | ||||
-rw-r--r-- | source/blender/editors/object/object_relations.c | 84 | ||||
-rw-r--r-- | source/blender/python/intern/bpy_app_translations.c | 32 |
4 files changed, 347 insertions, 56 deletions
diff --git a/source/blender/editors/object/object_constraint.c b/source/blender/editors/object/object_constraint.c index d9fb48afcbf..ba641fb2a39 100644 --- a/source/blender/editors/object/object_constraint.c +++ b/source/blender/editors/object/object_constraint.c @@ -76,7 +76,9 @@ #include "object_intern.h" -/* -------------- Get Active Constraint Data ---------------------- */ +/* ------------------------------------------------------------------- */ +/** \name Constraint Data Accessors + * \{ */ /* if object in posemode, active bone constraints, else object constraints */ ListBase *get_active_constraints(Object *ob) @@ -146,9 +148,13 @@ bConstraint *get_active_constraint(Object *ob) return BKE_constraints_active_get(get_active_constraints(ob)); } -/* -------------- Constraint Management (Add New, Remove, Rename) -------------------- */ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name PyConstraints (Unused) + * \{ */ + #ifdef WITH_PYTHON -/* ------------- PyConstraints ------------------ */ /* this callback sets the text-file to be used for selected menu item */ static void validate_pyconstraint_cb(Main *bmain, void *arg1, void *arg2) @@ -231,6 +237,12 @@ static void update_pyconstraint_cb(void *arg1, void *arg2) } #endif // UNUSED +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Add Constraint Utilities + * \{ */ + /* helper function for add_constriant - sets the last target for the active constraint */ static void set_constraint_nth_target(bConstraint *con, Object *target, @@ -272,7 +284,11 @@ static void set_constraint_nth_target(bConstraint *con, } } -/* ------------- Constraint Sanity Testing ------------------- */ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Constraint Sanity Testing + * \{ */ static void test_constraint( Main *bmain, Object *owner, bPoseChannel *pchan, bConstraint *con, int type) @@ -626,7 +642,11 @@ static void object_test_constraint(Main *bmain, Object *owner, bConstraint *con) } } -/*** generic functions for operators using constraint names and data context *********************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Generic Functions for Operators Using Constraint Names and Data Context + * \{ */ #define EDIT_CONSTRAINT_OWNER_OBJECT 0 #define EDIT_CONSTRAINT_OWNER_BONE 1 @@ -766,10 +786,13 @@ static bConstraint *edit_constraint_property_get(wmOperator *op, Object *ob, int return con; } -/* ********************** CONSTRAINT-SPECIFIC STUFF ********************* */ +/** \} */ -/* ---------- Distance-Dependent Constraints ---------- */ -/* StretchTo, Limit Distance */ +/* ------------------------------------------------------------------- */ +/** \name Stretch-To/Limit-Distance Constraint (Reset Original Length Operator) + * + * For Stretch-To & Limit-Distance constraints. + * \{ */ static int stretchto_reset_exec(bContext *C, wmOperator *op) { @@ -820,6 +843,14 @@ void CONSTRAINT_OT_stretchto_reset(wmOperatorType *ot) edit_constraint_properties(ot); } +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Distance Constraint (Reset Operator) + * + * For Limit-Distance constraint. + * \{ */ + static int limitdistance_reset_exec(bContext *C, wmOperator *op) { Main *bmain = CTX_data_main(C); @@ -869,7 +900,11 @@ void CONSTRAINT_OT_limitdistance_reset(wmOperatorType *ot) edit_constraint_properties(ot); } -/* ------------- Child-Of Constraint ------------------ */ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Child-Of Constraint (Set Inverse Operator) + * \{ */ /* Force evaluation so that the 'set inverse' flag is handled. * No-op when the constraint is enabled, as in such cases the evaluation will happen anyway. @@ -996,7 +1031,11 @@ void CONSTRAINT_OT_childof_clear_inverse(wmOperatorType *ot) edit_constraint_properties(ot); } -/* --------------- Follow Path Constraint ------------------ */ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Follow Path Constraint (Auto Animate Path Operator) + * \{ */ static int followpath_path_animate_exec(bContext *C, wmOperator *op) { @@ -1138,7 +1177,11 @@ void CONSTRAINT_OT_followpath_path_animate(wmOperatorType *ot) MAXFRAME); } -/* ------------- Object Solver Constraint ------------------ */ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Object Solver Constraint (Set Inverse Operator) + * \{ */ static int objectsolver_set_inverse_exec(bContext *C, wmOperator *op) { @@ -1198,6 +1241,12 @@ void CONSTRAINT_OT_objectsolver_set_inverse(wmOperatorType *ot) edit_constraint_properties(ot); } +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Object Solver Constraint (Clear Inverse Operator) + * \{ */ + static int objectsolver_clear_inverse_exec(bContext *C, wmOperator *op) { Main *bmain = CTX_data_main(C); @@ -1250,7 +1299,11 @@ void CONSTRAINT_OT_objectsolver_clear_inverse(wmOperatorType *ot) edit_constraint_properties(ot); } -/***************************** BUTTONS ****************************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Constraint Management Utilities + * \{ */ void ED_object_constraint_set_active(Object *ob, bConstraint *con) { @@ -1344,6 +1397,12 @@ static bool constraint_poll(bContext *C) return (ptr.owner_id && ptr.data); } +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Delete Constraint Operator + * \{ */ + static int constraint_delete_exec(bContext *C, wmOperator *UNUSED(op)) { Main *bmain = CTX_data_main(C); @@ -1388,6 +1447,12 @@ void CONSTRAINT_OT_delete(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Move Down Constraint Operator + * \{ */ + static int constraint_move_down_exec(bContext *C, wmOperator *op) { Object *ob = ED_object_active_context(C); @@ -1438,6 +1503,12 @@ void CONSTRAINT_OT_move_down(wmOperatorType *ot) edit_constraint_properties(ot); } +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Move Up Constraint Operator + * \{ */ + static int constraint_move_up_exec(bContext *C, wmOperator *op) { Object *ob = ED_object_active_context(C); @@ -1486,9 +1557,11 @@ void CONSTRAINT_OT_move_up(wmOperatorType *ot) edit_constraint_properties(ot); } -/***************************** OPERATORS ****************************/ +/** \} */ -/************************ remove constraint operators *********************/ +/* ------------------------------------------------------------------- */ +/** \name Clear Pose Constraints Operator + * \{ */ static int pose_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op)) { @@ -1549,6 +1622,12 @@ static int object_constraints_clear_exec(bContext *C, wmOperator *UNUSED(op)) return OPERATOR_FINISHED; } +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Clear Object Constraints Operator + * \{ */ + void OBJECT_OT_constraints_clear(wmOperatorType *ot) { /* identifiers */ @@ -1561,7 +1640,11 @@ void OBJECT_OT_constraints_clear(wmOperatorType *ot) ot->poll = ED_operator_object_active_editable; } -/************************ copy all constraints operators *********************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Copy Pose Constraints Operator + * \{ */ static int pose_constraint_copy_exec(bContext *C, wmOperator *op) { @@ -1616,6 +1699,12 @@ void POSE_OT_constraints_copy(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Copy Object Constraints Operator + * \{ */ + static int object_constraint_copy_exec(bContext *C, wmOperator *UNUSED(op)) { Main *bmain = CTX_data_main(C); @@ -1655,7 +1744,11 @@ void OBJECT_OT_constraints_copy(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } -/************************ add constraint operators *********************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Add Constraints Operator + * \{ */ /* get the Object and/or PoseChannel to use as target */ static bool get_new_constraint_target( @@ -2013,6 +2106,12 @@ void OBJECT_OT_constraint_add(wmOperatorType *ot) ot->prop = prop; } +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Add Constraints With Targets Operator + * \{ */ + void OBJECT_OT_constraint_add_with_targets(wmOperatorType *ot) { PropertyRNA *prop; @@ -2078,8 +2177,14 @@ void POSE_OT_constraint_add_with_targets(wmOperatorType *ot) ot->prop = RNA_def_enum(ot->srna, "type", rna_enum_constraint_type_items, 0, "Type", ""); } -/************************ IK Constraint operators *********************/ -/* NOTE: only for Pose-Channels */ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Add IK to Bone Operator + * + * \note Only for pose-channels. + * \{ */ + // TODO: should these be here, or back in editors/armature/poseobject.c again? /* present menu with options + validation for targets to use */ @@ -2178,9 +2283,14 @@ void POSE_OT_ik_add(wmOperatorType *ot) "Assign IK Constraint with targets derived from the select bones/objects"); } -/* ------------------ */ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Clear IK from Bone Operator + * + * Remove IK constraints from selected bones. + * \{ */ -/* remove IK constraints from selected bones */ static int pose_ik_clear_exec(bContext *C, wmOperator *UNUSED(op)) { Object *prev_ob = NULL; @@ -2228,3 +2338,5 @@ void POSE_OT_ik_clear(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } + +/** \} */ diff --git a/source/blender/editors/object/object_modifier.c b/source/blender/editors/object/object_modifier.c index f2629b0b02f..f6c13212976 100644 --- a/source/blender/editors/object/object_modifier.c +++ b/source/blender/editors/object/object_modifier.c @@ -94,7 +94,9 @@ static void modifier_skin_customdata_delete(struct Object *ob); -/******************************** API ****************************/ +/* ------------------------------------------------------------------- */ +/** \name Public Api + * \{ */ static void object_force_modifier_update_for_bind(Depsgraph *depsgraph, Object *ob) { @@ -841,7 +843,11 @@ int ED_object_modifier_copy(ReportList *UNUSED(reports), Object *ob, ModifierDat return 1; } -/************************ add modifier operator *********************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Add Modifier Operator + * \{ */ static int modifier_add_exec(bContext *C, wmOperator *op) { @@ -933,7 +939,13 @@ void OBJECT_OT_modifier_add(wmOperatorType *ot) ot->prop = prop; } -/********** generic functions for operators using mod names and data context *********************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Generic Functions For Operators + * + * Using modifier names and data context. + * \{ */ bool edit_modifier_poll_generic(bContext *C, StructRNA *rna_type, @@ -1015,7 +1027,11 @@ ModifierData *edit_modifier_property_get(wmOperator *op, Object *ob, int type) return md; } -/************************ remove modifier operator *********************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Remove Modifier Operator + * \{ */ static int modifier_remove_exec(bContext *C, wmOperator *op) { @@ -1067,7 +1083,11 @@ void OBJECT_OT_modifier_remove(wmOperatorType *ot) edit_modifier_properties(ot); } -/************************ move up modifier operator *********************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Move Up Modifier Operator + * \{ */ static int modifier_move_up_exec(bContext *C, wmOperator *op) { @@ -1109,7 +1129,11 @@ void OBJECT_OT_modifier_move_up(wmOperatorType *ot) edit_modifier_properties(ot); } -/************************ move down modifier operator *********************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Move Down Modifier Operator + * \{ */ static int modifier_move_down_exec(bContext *C, wmOperator *op) { @@ -1151,7 +1175,11 @@ void OBJECT_OT_modifier_move_down(wmOperatorType *ot) edit_modifier_properties(ot); } -/************************ apply modifier operator *********************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Apply Modifier Operator + * \{ */ static bool modifier_apply_poll(bContext *C) { @@ -1241,7 +1269,11 @@ void OBJECT_OT_modifier_apply(wmOperatorType *ot) edit_modifier_properties(ot); } -/************************ convert modifier operator *********************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Convert Modifier Operator + * \{ */ static int modifier_convert_exec(bContext *C, wmOperator *op) { @@ -1288,7 +1320,11 @@ void OBJECT_OT_modifier_convert(wmOperatorType *ot) edit_modifier_properties(ot); } -/************************ copy modifier operator *********************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Copy Modifier Operator + * \{ */ static int modifier_copy_exec(bContext *C, wmOperator *op) { @@ -1330,7 +1366,11 @@ void OBJECT_OT_modifier_copy(wmOperatorType *ot) edit_modifier_properties(ot); } -/************* multires delete higher levels operator ****************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Multires Delete Higher Levels Operator + * \{ */ static bool multires_poll(bContext *C) { @@ -1385,7 +1425,11 @@ void OBJECT_OT_multires_higher_levels_delete(wmOperatorType *ot) edit_modifier_properties(ot); } -/****************** multires subdivide operator *********************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Multires Subdivide Operator + * \{ */ static int multires_subdivide_exec(bContext *C, wmOperator *op) { @@ -1438,7 +1482,11 @@ void OBJECT_OT_multires_subdivide(wmOperatorType *ot) edit_modifier_properties(ot); } -/****************** multires reshape operator *********************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Multires Reshape Operator + * \{ */ static int multires_reshape_exec(bContext *C, wmOperator *op) { @@ -1505,7 +1553,11 @@ void OBJECT_OT_multires_reshape(wmOperatorType *ot) edit_modifier_properties(ot); } -/****************** multires save external operator *********************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Multires Save External Operator + * \{ */ static int multires_external_save_exec(bContext *C, wmOperator *op) { @@ -1594,7 +1646,11 @@ void OBJECT_OT_multires_external_save(wmOperatorType *ot) edit_modifier_properties(ot); } -/****************** multires pack operator *********************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Multires Pack Operator + * \{ */ static int multires_external_pack_exec(bContext *C, wmOperator *UNUSED(op)) { @@ -1624,7 +1680,12 @@ void OBJECT_OT_multires_external_pack(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } -/********************* multires apply base ***********************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Multires Apply Base + * \{ */ + static int multires_base_apply_exec(bContext *C, wmOperator *op) { Depsgraph *depsgraph = CTX_data_depsgraph_pointer(C); @@ -1669,7 +1730,11 @@ void OBJECT_OT_multires_base_apply(wmOperatorType *ot) edit_modifier_properties(ot); } -/************************** skin modifier ***********************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Skin Modifier + * \{ */ static void modifier_skin_customdata_delete(Object *ob) { @@ -2041,7 +2106,11 @@ void OBJECT_OT_skin_armature_create(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL; edit_modifier_properties(ot); } -/************************ delta mush bind operator *********************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Delta Mesh Bind Operator + * \{ */ static bool correctivesmooth_poll(bContext *C) { @@ -2119,7 +2188,11 @@ void OBJECT_OT_correctivesmooth_bind(wmOperatorType *ot) edit_modifier_properties(ot); } -/************************ mdef bind operator *********************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Mesh Deform Bind Operator + * \{ */ static bool meshdeform_poll(bContext *C) { @@ -2192,7 +2265,11 @@ void OBJECT_OT_meshdeform_bind(wmOperatorType *ot) edit_modifier_properties(ot); } -/****************** explode refresh operator *********************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Explode Refresh Operator + * \{ */ static bool explode_poll(bContext *C) { @@ -2242,7 +2319,11 @@ void OBJECT_OT_explode_refresh(wmOperatorType *ot) edit_modifier_properties(ot); } -/****************** ocean bake operator *********************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Ocean Bake Operator + * \{ */ static bool ocean_bake_poll(bContext *C) { @@ -2444,7 +2525,11 @@ void OBJECT_OT_ocean_bake(wmOperatorType *ot) RNA_def_boolean(ot->srna, "free", false, "Free", "Free the bake, rather than generating it"); } -/************************ LaplacianDeform bind operator *********************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Laplaciandeform Bind Operator + * \{ */ static bool laplaciandeform_poll(bContext *C) { @@ -2519,7 +2604,11 @@ void OBJECT_OT_laplaciandeform_bind(wmOperatorType *ot) edit_modifier_properties(ot); } -/************************ sdef bind operator *********************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Surface Deform Bind Operator + * \{ */ static bool surfacedeform_bind_poll(bContext *C) { @@ -2583,3 +2672,5 @@ void OBJECT_OT_surfacedeform_bind(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO | OPTYPE_INTERNAL; edit_modifier_properties(ot); } + +/** \} */ diff --git a/source/blender/editors/object/object_relations.c b/source/blender/editors/object/object_relations.c index 7c8a9750b36..c6d6a7b1c22 100644 --- a/source/blender/editors/object/object_relations.c +++ b/source/blender/editors/object/object_relations.c @@ -115,7 +115,9 @@ #include "object_intern.h" -/*********************** Make Vertex Parent Operator ************************/ +/* ------------------------------------------------------------------- */ +/** \name Make Vertex Parent Operator + * \{ */ static bool vertex_parent_set_poll(bContext *C) { @@ -331,7 +333,11 @@ void OBJECT_OT_vertex_parent_set(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } -/********************** Make Proxy Operator *************************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Make Proxy Operator + * \{ */ /* set the object to proxify */ static int make_proxy_invoke(bContext *C, wmOperator *op, const wmEvent *event) @@ -485,7 +491,11 @@ void OBJECT_OT_proxy_make(wmOperatorType *ot) ot->prop = prop; } -/********************** Clear Parent Operator ******************* */ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Clear Parent Operator + * \{ */ EnumPropertyItem prop_clear_parent_types[] = { {CLEAR_PARENT_ALL, @@ -619,7 +629,11 @@ void OBJECT_OT_parent_clear(wmOperatorType *ot) ot->prop = RNA_def_enum(ot->srna, "type", prop_clear_parent_types, CLEAR_PARENT_ALL, "Type", ""); } -/* ******************** Make Parent Operator *********************** */ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Make Parent Operator + * \{ */ void ED_object_parent(Object *ob, Object *par, const int type, const char *substr) { @@ -1138,7 +1152,11 @@ void OBJECT_OT_parent_set(wmOperatorType *ot) "Apply transformation before parenting"); } -/* ************ Make Parent Without Inverse Operator ******************* */ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Make Parent Without Inverse Operator + * \{ */ static int parent_noinv_set_exec(bContext *C, wmOperator *op) { @@ -1191,7 +1209,11 @@ void OBJECT_OT_parent_no_inverse_set(wmOperatorType *ot) ot->flag = OPTYPE_REGISTER | OPTYPE_UNDO; } -/* ******************** Clear Track Operator ******************* */ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Clear Track Operator + * \{ */ enum { CLEAR_TRACK = 1, @@ -1267,7 +1289,11 @@ void OBJECT_OT_track_clear(wmOperatorType *ot) ot->prop = RNA_def_enum(ot->srna, "type", prop_clear_track_types, 0, "Type", ""); } -/************************** Make Track Operator *****************************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Make Track Operator + * \{ */ enum { CREATE_TRACK_DAMPTRACK = 1, @@ -1386,7 +1412,11 @@ void OBJECT_OT_track_set(wmOperatorType *ot) ot->prop = RNA_def_enum(ot->srna, "type", prop_make_track_types, 0, "Type", ""); } -/************************** Link to Scene Operator *****************************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Link to Scene Operator + * \{ */ #if 0 static void link_to_scene(Main *UNUSED(bmain), unsigned short UNUSED(nr)) @@ -1702,7 +1732,11 @@ void OBJECT_OT_make_links_data(wmOperatorType *ot) ot->prop = RNA_def_enum(ot->srna, "type", make_links_items, 0, "Type", ""); } -/**************************** Make Single User ********************************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Make Single User Operator + * \{ */ static void libblock_relink_collection(Collection *collection, const bool do_collection) { @@ -2084,7 +2118,11 @@ void ED_object_single_users(Main *bmain, DEG_relations_tag_update(bmain); } -/******************************* Make Local ***********************************/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Make Local Operator + * \{ */ enum { MAKE_LOCAL_SELECT_OB = 1, @@ -2324,6 +2362,12 @@ void OBJECT_OT_make_local(wmOperatorType *ot) ot->prop = RNA_def_enum(ot->srna, "type", type_items, 0, "Type", ""); } +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Make Library Override Operator + * \{ */ + static void make_override_library_tag_object(Object *obact, Object *ob) { if (ob == obact) { @@ -2585,6 +2629,12 @@ void OBJECT_OT_make_override_library(wmOperatorType *ot) ot->prop = prop; } +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Make Single User Operator + * \{ */ + enum { MAKE_SINGLE_USER_ALL = 1, MAKE_SINGLE_USER_SELECTED = 2, @@ -2673,6 +2723,12 @@ void OBJECT_OT_make_single_user(wmOperatorType *ot) ot->srna, "animation", 0, "Object Animation", "Make animation data local to each object"); } +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Drop Named Material on Object Operator + * \{ */ + static int drop_named_material_invoke(bContext *C, wmOperator *op, const wmEvent *event) { Main *bmain = CTX_data_main(C); @@ -2716,6 +2772,12 @@ void OBJECT_OT_drop_named_material(wmOperatorType *ot) RNA_def_string(ot->srna, "name", "Material", MAX_ID_NAME - 2, "Name", "Material name to assign"); } +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Unlink Object Operator + * \{ */ + static int object_unlink_data_exec(bContext *C, wmOperator *op) { ID *id; @@ -2766,3 +2828,5 @@ void OBJECT_OT_unlink_data(wmOperatorType *ot) /* flags */ ot->flag = OPTYPE_INTERNAL; } + +/** \} */ diff --git a/source/blender/python/intern/bpy_app_translations.c b/source/blender/python/intern/bpy_app_translations.c index cf4550089ba..190d4eb1855 100644 --- a/source/blender/python/intern/bpy_app_translations.c +++ b/source/blender/python/intern/bpy_app_translations.c @@ -45,6 +45,10 @@ # include "BLI_string.h" #endif +/* ------------------------------------------------------------------- */ +/** \name Local Struct to Store Translation + * \{ */ + typedef struct { PyObject_HEAD /** The string used to separate context from actual message in PY_TRANSLATE RNA props. */ @@ -63,9 +67,14 @@ typedef struct { /* Our singleton instance pointer */ static BlenderAppTranslations *_translations = NULL; +/** \} */ + #ifdef WITH_INTERNATIONAL -/***** Helpers for ghash *****/ +/* ------------------------------------------------------------------- */ +/** \name Helpers for GHash + * \{ */ + typedef struct GHashKey { const char *msgctxt; const char *msgid; @@ -111,7 +120,11 @@ static void _ghashutil_keyfree(void *ptr) # define _ghashutil_valfree MEM_freeN -/***** Python's messages cache *****/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Python'S Messages Cache + * \{ */ /* We cache all messages available for a given locale from all py dicts into a single ghash. * Changing of locale is not so common, while looking for a message translation is, @@ -389,7 +402,12 @@ static PyObject *app_translations_py_messages_unregister(BlenderAppTranslations Py_RETURN_NONE; } -/***** C-defined contexts *****/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name C-defined Contexts + * \{ */ + /* This is always available (even when WITH_INTERNATIONAL is not defined). */ static PyTypeObject BlenderAppTranslationsContextsType; @@ -439,7 +457,11 @@ static PyObject *app_translations_contexts_make(void) return translations_contexts; } -/***** Main BlenderAppTranslations Py object definition *****/ +/** \} */ + +/* ------------------------------------------------------------------- */ +/** \name Main #BlenderAppTranslations #PyObject Definition + * \{ */ PyDoc_STRVAR(app_translations_contexts_doc, "A named tuple containing all pre-defined translation contexts.\n" @@ -887,3 +909,5 @@ void BPY_app_translations_end(void) _clear_translations_cache(); #endif } + +/** \} */ |