Cleanup: Grammar and corrections in operator type documentation
This commit is contained in:
parent
efb74555fd
commit
4caa2dddd9
|
@ -923,7 +923,7 @@ struct wmOperatorType {
|
|||
const char *idname;
|
||||
/** Translation context (must not exceed #BKE_ST_MAXNAME) */
|
||||
const char *translation_context;
|
||||
/** Use for tool-tips and Python docs. */
|
||||
/** Use for tooltips and Python docs. */
|
||||
const char *description;
|
||||
/** Identifier to group operators together. */
|
||||
const char *undo_group;
|
||||
|
@ -945,8 +945,8 @@ struct wmOperatorType {
|
|||
bool (*check)(bContext *, wmOperator *);
|
||||
|
||||
/**
|
||||
* For modal temporary operators, initially invoke is called. then
|
||||
* any further events are handled in modal. if the operation is
|
||||
* For modal temporary operators, initially invoke is called, then
|
||||
* any further events are handled in #modal. If the operation is
|
||||
* canceled due to some external reason, cancel is called
|
||||
* See defines below for return values.
|
||||
*/
|
||||
|
@ -959,21 +959,21 @@ struct wmOperatorType {
|
|||
void (*cancel)(bContext *, wmOperator *);
|
||||
|
||||
/**
|
||||
* Modal is used for operators which continuously run, eg:
|
||||
* fly mode, knife tool, circle select are all examples of modal operators.
|
||||
* Modal operators can handle events which would normally access other operators,
|
||||
* they keep running until they don't return `OPERATOR_RUNNING_MODAL`.
|
||||
* Modal is used for operators which continuously run. Fly mode, knife tool, circle select are
|
||||
* all examples of modal operators. Modal operators can handle events which would normally invoke
|
||||
* or execute other operators. They keep running until they don't return
|
||||
* `OPERATOR_RUNNING_MODAL`.
|
||||
*/
|
||||
int (*modal)(bContext *, wmOperator *, const wmEvent *) ATTR_WARN_UNUSED_RESULT;
|
||||
|
||||
/**
|
||||
* Verify if the operator can be executed in the current context, note
|
||||
* that the operator might still fail to execute even if this return true.
|
||||
* Verify if the operator can be executed in the current context. Note
|
||||
* that the operator may still fail to execute even if this returns true.
|
||||
*/
|
||||
bool (*poll)(bContext *) ATTR_WARN_UNUSED_RESULT;
|
||||
|
||||
/**
|
||||
* Use to check if properties should be displayed in auto-generated UI.
|
||||
* Used to check if properties should be displayed in auto-generated UI.
|
||||
* Use 'check' callback to enforce refreshing.
|
||||
*/
|
||||
bool (*poll_property)(const bContext *C,
|
||||
|
@ -985,22 +985,20 @@ struct wmOperatorType {
|
|||
|
||||
/**
|
||||
* Return a different name to use in the user interface, based on property values.
|
||||
* The returned string does not need to be freed.
|
||||
* The returned string is expected to be translated if needed.
|
||||
*/
|
||||
std::string (*get_name)(wmOperatorType *, PointerRNA *);
|
||||
|
||||
/**
|
||||
* Return a different description to use in the user interface, based on property values.
|
||||
* The returned string must be freed by the caller, unless NULL.
|
||||
* The returned string is expected to be translated if needed.
|
||||
*/
|
||||
std::string (*get_description)(bContext *C, wmOperatorType *, PointerRNA *);
|
||||
|
||||
/** rna for properties */
|
||||
/** RNA for properties */
|
||||
StructRNA *srna;
|
||||
|
||||
/** previous settings - for initializing on re-use */
|
||||
/** Previous settings - for initializing on re-use. */
|
||||
IDProperty *last_properties;
|
||||
|
||||
/**
|
||||
|
@ -1012,13 +1010,13 @@ struct wmOperatorType {
|
|||
*/
|
||||
PropertyRNA *prop;
|
||||
|
||||
/** wmOperatorTypeMacro */
|
||||
/** wmOperatorTypeMacro */
|
||||
ListBase macro;
|
||||
|
||||
/** pointer to modal keymap, do not free! */
|
||||
/** Pointer to modal keymap. Do not free! */
|
||||
wmKeyMap *modalkeymap;
|
||||
|
||||
/** python needs the operator type as well */
|
||||
/** Python needs the operator type as well. */
|
||||
bool (*pyop_poll)(bContext *, wmOperatorType *ot) ATTR_WARN_UNUSED_RESULT;
|
||||
|
||||
/** RNA integration */
|
||||
|
|
Loading…
Reference in New Issue