#70267 Retopology Overlay #104599

Merged
Clément Foucault merged 30 commits from bonj/blender:retopology-overlay into main 2023-03-03 00:35:56 +01:00
6 changed files with 14 additions and 11 deletions
Showing only changes of commit 9240dd0e13 - Show all commits

View File

@ -223,7 +223,7 @@ typedef struct KeyingSetInfo {
/* identifier so that user can hook this up to a KeyingSet (used as label). */
char name[64];
/* short help/description. */
char description[240]; /* RNA_DYN_DESCR_MAX */
char description[1024]; /* #RNA_DYN_DESCR_MAX */
/* keying settings */
short keyingflag;

View File

@ -26,6 +26,7 @@ struct Object;
struct Scene;
struct SpaceImage;
struct ToolSettings;
struct UVPackIsland_Params;
struct View2D;
struct ViewLayer;
struct bContext;

View File

@ -968,8 +968,8 @@ typedef struct KeyingSet {
char idname[64];
/** User-viewable name for KeyingSet (for menus, etc.) - `MAX_ID_NAME - 2`. */
char name[64];
/** (RNA_DYN_DESCR_MAX) short help text. */
char description[240];
/** (#RNA_DYN_DESCR_MAX) help text. */
char description[1024];
/** Name of the typeinfo data used for the relative paths - `MAX_ID_NAME - 2`. */
char typeinfo[64];

View File

@ -573,7 +573,7 @@ extern const float rna_default_quaternion[4];
extern const float rna_default_scale_3d[3];
/** Maximum size for dynamic defined type descriptors, this value is arbitrary. */
#define RNA_DYN_DESCR_MAX 240
#define RNA_DYN_DESCR_MAX 1024
#ifdef __cplusplus
}

View File

@ -16,6 +16,7 @@
#include "BLT_translation.h"
#include "BKE_keyconfig.h"
#include "BKE_screen.h"
#include "BKE_workspace.h"
#include "RNA_access.h"
@ -1479,7 +1480,7 @@ static StructRNA *rna_Operator_register(Main *bmain,
char idname[OP_MAX_TYPENAME];
char name[OP_MAX_TYPENAME];
char description[RNA_DYN_DESCR_MAX];
char translation_context[RNA_DYN_DESCR_MAX];
char translation_context[BKE_ST_MAXNAME];
char undo_group[OP_MAX_TYPENAME];
} temp_buffers;
@ -1633,7 +1634,7 @@ static StructRNA *rna_MacroOperator_register(Main *bmain,
char idname[OP_MAX_TYPENAME];
char name[OP_MAX_TYPENAME];
char description[RNA_DYN_DESCR_MAX];
char translation_context[RNA_DYN_DESCR_MAX];
char translation_context[BKE_ST_MAXNAME];
char undo_group[OP_MAX_TYPENAME];
} temp_buffers;
@ -1792,7 +1793,7 @@ static void rna_Operator_bl_label_set(PointerRNA *ptr, const char *value)
return BLI_strnlen(str ? str : "", len); \
}
OPERATOR_STR_MAYBE_NULL_GETSET(translation_context, RNA_DYN_DESCR_MAX)
OPERATOR_STR_MAYBE_NULL_GETSET(translation_context, BKE_ST_MAXNAME)
OPERATOR_STR_MAYBE_NULL_GETSET(description, RNA_DYN_DESCR_MAX)
OPERATOR_STR_MAYBE_NULL_GETSET(undo_group, OP_MAX_TYPENAME)
@ -1880,14 +1881,14 @@ static void rna_def_operator_common(StructRNA *srna)
prop = RNA_def_property(srna, "bl_label", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "type->name");
RNA_def_property_string_maxlength(prop, RNA_DYN_DESCR_MAX); /* else it uses the pointer size! */
RNA_def_property_string_maxlength(prop, OP_MAX_TYPENAME); /* else it uses the pointer size! */
RNA_def_property_string_funcs(prop, NULL, NULL, "rna_Operator_bl_label_set");
// RNA_def_property_clear_flag(prop, PROP_EDITABLE);
RNA_def_property_flag(prop, PROP_REGISTER);
prop = RNA_def_property(srna, "bl_translation_context", PROP_STRING, PROP_NONE);
RNA_def_property_string_sdna(prop, NULL, "type->translation_context");
RNA_def_property_string_maxlength(prop, RNA_DYN_DESCR_MAX); /* else it uses the pointer size! */
RNA_def_property_string_maxlength(prop, BKE_ST_MAXNAME); /* else it uses the pointer size! */
RNA_def_property_string_funcs(prop,
"rna_Operator_bl_translation_context_get",
"rna_Operator_bl_translation_context_length",

View File

@ -881,10 +881,11 @@ typedef struct wmTimer {
} wmTimer;
typedef struct wmOperatorType {
/** Text for UI, undo. */
/** Text for UI, undo (should not exceed #OP_MAX_TYPENAME). */
const char *name;
/** Unique identifier. */
/** Unique identifier (must not exceed #OP_MAX_TYPENAME). */
const char *idname;
/** Translation context (must not exceed #BKE_ST_MAXNAME) */
const char *translation_context;
/** Use for tool-tips and Python docs. */
const char *description;