Cleanup: Add more const'ness to RNA API.
This commit makes PointerRNA passed to RNA path API const. Main change was in the `path` callback for RNA structs, and indirectly the `getlength` callback of properties.
This commit is contained in:
parent
4949dd54eb
commit
c64e9c6ae2
|
@ -177,7 +177,7 @@ int RNA_property_multi_array_length(PointerRNA *ptr, PropertyRNA *prop, int dime
|
|||
/**
|
||||
* Used by BPY to make an array from the python object.
|
||||
*/
|
||||
int RNA_property_array_dimension(PointerRNA *ptr, PropertyRNA *prop, int length[]);
|
||||
int RNA_property_array_dimension(const PointerRNA *ptr, PropertyRNA *prop, int length[]);
|
||||
char RNA_property_array_item_char(PropertyRNA *prop, int index);
|
||||
int RNA_property_array_item_index(PropertyRNA *prop, char name);
|
||||
|
||||
|
@ -402,7 +402,9 @@ int RNA_property_collection_length(PointerRNA *ptr, PropertyRNA *prop);
|
|||
* without having to iterate over items in the collection (needed for some kinds of collections).
|
||||
*/
|
||||
bool RNA_property_collection_is_empty(PointerRNA *ptr, PropertyRNA *prop);
|
||||
int RNA_property_collection_lookup_index(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *t_ptr);
|
||||
int RNA_property_collection_lookup_index(PointerRNA *ptr,
|
||||
PropertyRNA *prop,
|
||||
const PointerRNA *t_ptr);
|
||||
int RNA_property_collection_lookup_int(PointerRNA *ptr,
|
||||
PropertyRNA *prop,
|
||||
int key,
|
||||
|
@ -614,21 +616,23 @@ struct ID *RNA_find_real_ID_and_path(struct Main *bmain, struct ID *id, const ch
|
|||
|
||||
char *RNA_path_from_ID_to_struct(const PointerRNA *ptr);
|
||||
|
||||
char *RNA_path_from_real_ID_to_struct(struct Main *bmain, PointerRNA *ptr, struct ID **r_real);
|
||||
char *RNA_path_from_real_ID_to_struct(struct Main *bmain,
|
||||
const PointerRNA *ptr,
|
||||
struct ID **r_real);
|
||||
|
||||
char *RNA_path_from_ID_to_property(PointerRNA *ptr, PropertyRNA *prop);
|
||||
char *RNA_path_from_ID_to_property(const PointerRNA *ptr, PropertyRNA *prop);
|
||||
/**
|
||||
* \param index_dim: The dimension to show, 0 disables. 1 for 1d array, 2 for 2d. etc.
|
||||
* \param index: The *flattened* index to use when \a `index_dim > 0`,
|
||||
* this is expanded when used with multi-dimensional arrays.
|
||||
*/
|
||||
char *RNA_path_from_ID_to_property_index(PointerRNA *ptr,
|
||||
char *RNA_path_from_ID_to_property_index(const PointerRNA *ptr,
|
||||
PropertyRNA *prop,
|
||||
int index_dim,
|
||||
int index);
|
||||
|
||||
char *RNA_path_from_real_ID_to_property_index(struct Main *bmain,
|
||||
PointerRNA *ptr,
|
||||
const PointerRNA *ptr,
|
||||
PropertyRNA *prop,
|
||||
int index_dim,
|
||||
int index,
|
||||
|
@ -638,8 +642,8 @@ char *RNA_path_from_real_ID_to_property_index(struct Main *bmain,
|
|||
* \return the path to given ptr/prop from the closest ancestor of given type,
|
||||
* if any (else return NULL).
|
||||
*/
|
||||
char *RNA_path_resolve_from_type_to_property(struct PointerRNA *ptr,
|
||||
struct PropertyRNA *prop,
|
||||
char *RNA_path_resolve_from_type_to_property(const PointerRNA *ptr,
|
||||
PropertyRNA *prop,
|
||||
const struct StructRNA *type);
|
||||
|
||||
/**
|
||||
|
@ -651,27 +655,27 @@ char *RNA_path_full_ID_py(struct Main *bmain, struct ID *id);
|
|||
* Get the ID.struct as a python representation, eg:
|
||||
* bpy.data.foo["bar"].some_struct
|
||||
*/
|
||||
char *RNA_path_full_struct_py(struct Main *bmain, struct PointerRNA *ptr);
|
||||
char *RNA_path_full_struct_py(struct Main *bmain, const PointerRNA *ptr);
|
||||
/**
|
||||
* Get the ID.struct.property as a python representation, eg:
|
||||
* bpy.data.foo["bar"].some_struct.some_prop[10]
|
||||
*/
|
||||
char *RNA_path_full_property_py_ex(
|
||||
struct Main *bmain, PointerRNA *ptr, PropertyRNA *prop, int index, bool use_fallback);
|
||||
struct Main *bmain, const PointerRNA *ptr, PropertyRNA *prop, int index, bool use_fallback);
|
||||
char *RNA_path_full_property_py(struct Main *bmain,
|
||||
struct PointerRNA *ptr,
|
||||
struct PropertyRNA *prop,
|
||||
const PointerRNA *ptr,
|
||||
PropertyRNA *prop,
|
||||
int index);
|
||||
/**
|
||||
* Get the struct.property as a python representation, eg:
|
||||
* some_struct.some_prop[10]
|
||||
*/
|
||||
char *RNA_path_struct_property_py(struct PointerRNA *ptr, struct PropertyRNA *prop, int index);
|
||||
char *RNA_path_struct_property_py(const PointerRNA *ptr, PropertyRNA *prop, int index);
|
||||
/**
|
||||
* Get the struct.property as a python representation, eg:
|
||||
* some_prop[10]
|
||||
*/
|
||||
char *RNA_path_property_py(const struct PointerRNA *ptr, struct PropertyRNA *prop, int index);
|
||||
char *RNA_path_property_py(const PointerRNA *ptr, PropertyRNA *prop, int index);
|
||||
|
||||
/* Quick name based property access
|
||||
*
|
||||
|
|
|
@ -1131,7 +1131,7 @@ static void rna_ImagePreview_size_set(PointerRNA *ptr, const int *values, enum e
|
|||
prv_img->flag[size] |= (PRV_CHANGED | PRV_USER_EDITED);
|
||||
}
|
||||
|
||||
static int rna_ImagePreview_pixels_get_length(PointerRNA *ptr,
|
||||
static int rna_ImagePreview_pixels_get_length(const PointerRNA *ptr,
|
||||
int length[RNA_MAX_ARRAY_DIMENSION],
|
||||
enum eIconSizes size)
|
||||
{
|
||||
|
@ -1176,7 +1176,7 @@ static void rna_ImagePreview_pixels_set(PointerRNA *ptr, const int *values, enum
|
|||
prv_img->flag[size] |= PRV_USER_EDITED;
|
||||
}
|
||||
|
||||
static int rna_ImagePreview_pixels_float_get_length(PointerRNA *ptr,
|
||||
static int rna_ImagePreview_pixels_float_get_length(const PointerRNA *ptr,
|
||||
int length[RNA_MAX_ARRAY_DIMENSION],
|
||||
enum eIconSizes size)
|
||||
{
|
||||
|
@ -1256,7 +1256,7 @@ static void rna_ImagePreview_image_size_set(PointerRNA *ptr, const int *values)
|
|||
rna_ImagePreview_size_set(ptr, values, ICON_SIZE_PREVIEW);
|
||||
}
|
||||
|
||||
static int rna_ImagePreview_image_pixels_get_length(PointerRNA *ptr,
|
||||
static int rna_ImagePreview_image_pixels_get_length(const PointerRNA *ptr,
|
||||
int length[RNA_MAX_ARRAY_DIMENSION])
|
||||
{
|
||||
return rna_ImagePreview_pixels_get_length(ptr, length, ICON_SIZE_PREVIEW);
|
||||
|
@ -1272,7 +1272,7 @@ static void rna_ImagePreview_image_pixels_set(PointerRNA *ptr, const int *values
|
|||
rna_ImagePreview_pixels_set(ptr, values, ICON_SIZE_PREVIEW);
|
||||
}
|
||||
|
||||
static int rna_ImagePreview_image_pixels_float_get_length(PointerRNA *ptr,
|
||||
static int rna_ImagePreview_image_pixels_float_get_length(const PointerRNA *ptr,
|
||||
int length[RNA_MAX_ARRAY_DIMENSION])
|
||||
{
|
||||
return rna_ImagePreview_pixels_float_get_length(ptr, length, ICON_SIZE_PREVIEW);
|
||||
|
@ -1303,7 +1303,7 @@ static void rna_ImagePreview_icon_size_set(PointerRNA *ptr, const int *values)
|
|||
rna_ImagePreview_size_set(ptr, values, ICON_SIZE_ICON);
|
||||
}
|
||||
|
||||
static int rna_ImagePreview_icon_pixels_get_length(PointerRNA *ptr,
|
||||
static int rna_ImagePreview_icon_pixels_get_length(const PointerRNA *ptr,
|
||||
int length[RNA_MAX_ARRAY_DIMENSION])
|
||||
{
|
||||
return rna_ImagePreview_pixels_get_length(ptr, length, ICON_SIZE_ICON);
|
||||
|
@ -1319,7 +1319,7 @@ static void rna_ImagePreview_icon_pixels_set(PointerRNA *ptr, const int *values)
|
|||
rna_ImagePreview_pixels_set(ptr, values, ICON_SIZE_ICON);
|
||||
}
|
||||
|
||||
static int rna_ImagePreview_icon_pixels_float_get_length(PointerRNA *ptr,
|
||||
static int rna_ImagePreview_icon_pixels_float_get_length(const PointerRNA *ptr,
|
||||
int length[RNA_MAX_ARRAY_DIMENSION])
|
||||
{
|
||||
return rna_ImagePreview_pixels_float_get_length(ptr, length, ICON_SIZE_ICON);
|
||||
|
|
|
@ -302,7 +302,8 @@ static int rna_ensure_property_array_length(PointerRNA *ptr, PropertyRNA *prop)
|
|||
{
|
||||
if (prop->magic == RNA_MAGIC) {
|
||||
int arraylen[RNA_MAX_ARRAY_DIMENSION];
|
||||
return (prop->getlength && ptr->data) ? prop->getlength(ptr, arraylen) : prop->totarraylength;
|
||||
return (prop->getlength && ptr->data) ? prop->getlength(ptr, arraylen) :
|
||||
(int)prop->totarraylength;
|
||||
}
|
||||
IDProperty *idprop = (IDProperty *)prop;
|
||||
|
||||
|
@ -322,7 +323,7 @@ static bool rna_ensure_property_array_check(PropertyRNA *prop)
|
|||
return (idprop->type == IDP_ARRAY);
|
||||
}
|
||||
|
||||
static void rna_ensure_property_multi_array_length(PointerRNA *ptr,
|
||||
static void rna_ensure_property_multi_array_length(const PointerRNA *ptr,
|
||||
PropertyRNA *prop,
|
||||
int length[])
|
||||
{
|
||||
|
@ -1080,7 +1081,7 @@ bool RNA_property_array_check(PropertyRNA *prop)
|
|||
return rna_ensure_property_array_check(prop);
|
||||
}
|
||||
|
||||
int RNA_property_array_dimension(PointerRNA *ptr, PropertyRNA *prop, int length[])
|
||||
int RNA_property_array_dimension(const PointerRNA *ptr, PropertyRNA *prop, int length[])
|
||||
{
|
||||
PropertyRNA *rprop = rna_ensure_property(prop);
|
||||
|
||||
|
@ -4025,7 +4026,9 @@ void RNA_property_collection_clear(PointerRNA *ptr, PropertyRNA *prop)
|
|||
}
|
||||
}
|
||||
|
||||
int RNA_property_collection_lookup_index(PointerRNA *ptr, PropertyRNA *prop, PointerRNA *t_ptr)
|
||||
int RNA_property_collection_lookup_index(PointerRNA *ptr,
|
||||
PropertyRNA *prop,
|
||||
const PointerRNA *t_ptr)
|
||||
{
|
||||
CollectionPropertyIterator iter;
|
||||
int index = 0;
|
||||
|
@ -5724,7 +5727,7 @@ char *RNA_path_from_ID_to_struct(const PointerRNA *ptr)
|
|||
return ptrpath;
|
||||
}
|
||||
|
||||
char *RNA_path_from_real_ID_to_struct(Main *bmain, PointerRNA *ptr, struct ID **r_real)
|
||||
char *RNA_path_from_real_ID_to_struct(Main *bmain, const PointerRNA *ptr, struct ID **r_real)
|
||||
{
|
||||
char *path = RNA_path_from_ID_to_struct(ptr);
|
||||
|
||||
|
@ -5753,7 +5756,7 @@ static void rna_path_array_multi_from_flat_index(const int dimsize[RNA_MAX_ARRAY
|
|||
BLI_assert(index == 0);
|
||||
}
|
||||
|
||||
static void rna_path_array_multi_string_from_flat_index(PointerRNA *ptr,
|
||||
static void rna_path_array_multi_string_from_flat_index(const PointerRNA *ptr,
|
||||
PropertyRNA *prop,
|
||||
int index_dim,
|
||||
int index,
|
||||
|
@ -5772,7 +5775,7 @@ static void rna_path_array_multi_string_from_flat_index(PointerRNA *ptr,
|
|||
}
|
||||
}
|
||||
|
||||
char *RNA_path_from_ID_to_property_index(PointerRNA *ptr,
|
||||
char *RNA_path_from_ID_to_property_index(const PointerRNA *ptr,
|
||||
PropertyRNA *prop,
|
||||
int index_dim,
|
||||
int index)
|
||||
|
@ -5828,13 +5831,17 @@ char *RNA_path_from_ID_to_property_index(PointerRNA *ptr,
|
|||
return path;
|
||||
}
|
||||
|
||||
char *RNA_path_from_ID_to_property(PointerRNA *ptr, PropertyRNA *prop)
|
||||
char *RNA_path_from_ID_to_property(const PointerRNA *ptr, PropertyRNA *prop)
|
||||
{
|
||||
return RNA_path_from_ID_to_property_index(ptr, prop, 0, -1);
|
||||
}
|
||||
|
||||
char *RNA_path_from_real_ID_to_property_index(
|
||||
Main *bmain, PointerRNA *ptr, PropertyRNA *prop, int index_dim, int index, ID **r_real_id)
|
||||
char *RNA_path_from_real_ID_to_property_index(Main *bmain,
|
||||
const PointerRNA *ptr,
|
||||
PropertyRNA *prop,
|
||||
int index_dim,
|
||||
int index,
|
||||
ID **r_real_id)
|
||||
{
|
||||
char *path = RNA_path_from_ID_to_property_index(ptr, prop, index_dim, index);
|
||||
|
||||
|
@ -5843,7 +5850,7 @@ char *RNA_path_from_real_ID_to_property_index(
|
|||
return path != NULL ? rna_prepend_real_ID_path(bmain, ptr->owner_id, path, r_real_id) : NULL;
|
||||
}
|
||||
|
||||
char *RNA_path_resolve_from_type_to_property(PointerRNA *ptr,
|
||||
char *RNA_path_resolve_from_type_to_property(const PointerRNA *ptr,
|
||||
PropertyRNA *prop,
|
||||
const StructRNA *type)
|
||||
{
|
||||
|
@ -5916,7 +5923,7 @@ char *RNA_path_full_ID_py(Main *bmain, ID *id)
|
|||
path);
|
||||
}
|
||||
|
||||
char *RNA_path_full_struct_py(Main *bmain, struct PointerRNA *ptr)
|
||||
char *RNA_path_full_struct_py(Main *bmain, const PointerRNA *ptr)
|
||||
{
|
||||
char *id_path;
|
||||
char *data_path;
|
||||
|
@ -5945,7 +5952,7 @@ char *RNA_path_full_struct_py(Main *bmain, struct PointerRNA *ptr)
|
|||
}
|
||||
|
||||
char *RNA_path_full_property_py_ex(
|
||||
Main *bmain, PointerRNA *ptr, PropertyRNA *prop, int index, bool use_fallback)
|
||||
Main *bmain, const PointerRNA *ptr, PropertyRNA *prop, int index, bool use_fallback)
|
||||
{
|
||||
char *id_path;
|
||||
const char *data_delim;
|
||||
|
@ -5992,12 +5999,12 @@ char *RNA_path_full_property_py_ex(
|
|||
return ret;
|
||||
}
|
||||
|
||||
char *RNA_path_full_property_py(Main *bmain, PointerRNA *ptr, PropertyRNA *prop, int index)
|
||||
char *RNA_path_full_property_py(Main *bmain, const PointerRNA *ptr, PropertyRNA *prop, int index)
|
||||
{
|
||||
return RNA_path_full_property_py_ex(bmain, ptr, prop, index, false);
|
||||
}
|
||||
|
||||
char *RNA_path_struct_property_py(PointerRNA *ptr, PropertyRNA *prop, int index)
|
||||
char *RNA_path_struct_property_py(const PointerRNA *ptr, PropertyRNA *prop, int index)
|
||||
{
|
||||
char *data_path;
|
||||
|
||||
|
|
|
@ -340,7 +340,7 @@ bool rna_Action_actedit_assign_poll(PointerRNA *ptr, PointerRNA value)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static char *rna_DopeSheet_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_DopeSheet_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("dopesheet");
|
||||
}
|
||||
|
|
|
@ -216,10 +216,10 @@ static void rna_Bone_select_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Po
|
|||
WM_main_add_notifier(NC_ANIMATION | ND_ANIMCHAN, id);
|
||||
}
|
||||
|
||||
static char *rna_Bone_path(PointerRNA *ptr)
|
||||
static char *rna_Bone_path(const PointerRNA *ptr)
|
||||
{
|
||||
ID *id = ptr->owner_id;
|
||||
Bone *bone = (Bone *)ptr->data;
|
||||
const ID *id = ptr->owner_id;
|
||||
const Bone *bone = (const Bone *)ptr->data;
|
||||
char name_esc[sizeof(bone->name) * 2];
|
||||
|
||||
BLI_str_escape(name_esc, bone->name, sizeof(name_esc));
|
||||
|
|
|
@ -118,9 +118,9 @@ const EnumPropertyItem rna_enum_color_attribute_domain_items[] = {
|
|||
|
||||
/* Attribute */
|
||||
|
||||
static char *rna_Attribute_path(PointerRNA *ptr)
|
||||
static char *rna_Attribute_path(const PointerRNA *ptr)
|
||||
{
|
||||
CustomDataLayer *layer = ptr->data;
|
||||
const CustomDataLayer *layer = ptr->data;
|
||||
return BLI_sprintfN("attributes['%s']", layer->name);
|
||||
}
|
||||
|
||||
|
|
|
@ -162,9 +162,9 @@ static StructRNA *rna_BoidRule_refine(struct PointerRNA *ptr)
|
|||
}
|
||||
}
|
||||
|
||||
static char *rna_BoidRule_path(PointerRNA *ptr)
|
||||
static char *rna_BoidRule_path(const PointerRNA *ptr)
|
||||
{
|
||||
BoidRule *rule = (BoidRule *)ptr->data;
|
||||
const BoidRule *rule = (BoidRule *)ptr->data;
|
||||
char name_esc[sizeof(rule->name) * 2];
|
||||
|
||||
BLI_str_escape(name_esc, rule->name, sizeof(name_esc));
|
||||
|
@ -222,16 +222,16 @@ static void rna_BoidState_active_boid_rule_index_set(struct PointerRNA *ptr, int
|
|||
}
|
||||
}
|
||||
|
||||
static int particle_id_check(PointerRNA *ptr)
|
||||
static int particle_id_check(const PointerRNA *ptr)
|
||||
{
|
||||
ID *id = ptr->owner_id;
|
||||
const ID *id = ptr->owner_id;
|
||||
|
||||
return (GS(id->name) == ID_PA);
|
||||
}
|
||||
|
||||
static char *rna_BoidSettings_path(PointerRNA *ptr)
|
||||
static char *rna_BoidSettings_path(const PointerRNA *ptr)
|
||||
{
|
||||
BoidSettings *boids = (BoidSettings *)ptr->data;
|
||||
const BoidSettings *boids = (BoidSettings *)ptr->data;
|
||||
|
||||
if (particle_id_check(ptr)) {
|
||||
ParticleSettings *part = (ParticleSettings *)ptr->owner_id;
|
||||
|
|
|
@ -934,7 +934,7 @@ static const EnumPropertyItem *rna_Brush_stroke_itemf(bContext *C,
|
|||
}
|
||||
|
||||
/* Grease Pencil Drawing Brushes Settings */
|
||||
static char *rna_BrushGpencilSettings_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_BrushGpencilSettings_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("tool_settings.gpencil_paint.brush.gpencil_settings");
|
||||
}
|
||||
|
|
|
@ -117,7 +117,7 @@ static void rna_Camera_dof_update(Main *bmain, Scene *scene, PointerRNA *UNUSED(
|
|||
WM_main_add_notifier(NC_SCENE | ND_SEQUENCER, scene);
|
||||
}
|
||||
|
||||
char *rna_CameraDOFSettings_path(PointerRNA *ptr)
|
||||
char *rna_CameraDOFSettings_path(const PointerRNA *ptr)
|
||||
{
|
||||
/* if there is ID-data, resolve the path using the index instead of by name,
|
||||
* since the name used is the name of the texture assigned, but the texture
|
||||
|
|
|
@ -436,10 +436,10 @@ static void rna_ClothSettings_gravity_set(PointerRNA *ptr, const float *values)
|
|||
sim->gravity[2] = values[2];
|
||||
}
|
||||
|
||||
static char *rna_ClothSettings_path(PointerRNA *ptr)
|
||||
static char *rna_ClothSettings_path(const PointerRNA *ptr)
|
||||
{
|
||||
Object *ob = (Object *)ptr->owner_id;
|
||||
ModifierData *md = BKE_modifiers_findby_type(ob, eModifierType_Cloth);
|
||||
const Object *ob = (Object *)ptr->owner_id;
|
||||
const ModifierData *md = BKE_modifiers_findby_type(ob, eModifierType_Cloth);
|
||||
|
||||
if (md) {
|
||||
char name_esc[sizeof(md->name) * 2];
|
||||
|
@ -451,10 +451,10 @@ static char *rna_ClothSettings_path(PointerRNA *ptr)
|
|||
}
|
||||
}
|
||||
|
||||
static char *rna_ClothCollisionSettings_path(PointerRNA *ptr)
|
||||
static char *rna_ClothCollisionSettings_path(const PointerRNA *ptr)
|
||||
{
|
||||
Object *ob = (Object *)ptr->owner_id;
|
||||
ModifierData *md = BKE_modifiers_findby_type(ob, eModifierType_Cloth);
|
||||
const Object *ob = (Object *)ptr->owner_id;
|
||||
const ModifierData *md = BKE_modifiers_findby_type(ob, eModifierType_Cloth);
|
||||
|
||||
if (md) {
|
||||
char name_esc[sizeof(md->name) * 2];
|
||||
|
|
|
@ -157,7 +157,7 @@ static void rna_CurveMapping_clipmaxy_range(
|
|||
*max = 100.0f;
|
||||
}
|
||||
|
||||
static char *rna_ColorRamp_path(PointerRNA *ptr)
|
||||
static char *rna_ColorRamp_path(const PointerRNA *ptr)
|
||||
{
|
||||
char *path = NULL;
|
||||
|
||||
|
@ -208,7 +208,7 @@ static char *rna_ColorRamp_path(PointerRNA *ptr)
|
|||
return path;
|
||||
}
|
||||
|
||||
static char *rna_ColorRampElement_path(PointerRNA *ptr)
|
||||
static char *rna_ColorRampElement_path(const PointerRNA *ptr)
|
||||
{
|
||||
PointerRNA ramp_ptr;
|
||||
PropertyRNA *prop;
|
||||
|
@ -438,7 +438,7 @@ static void rna_ColorManagedDisplaySettings_display_device_update(Main *bmain,
|
|||
}
|
||||
}
|
||||
|
||||
static char *rna_ColorManagedDisplaySettings_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_ColorManagedDisplaySettings_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("display_settings");
|
||||
}
|
||||
|
@ -526,7 +526,7 @@ static void rna_ColorManagedViewSettings_use_curves_set(PointerRNA *ptr, bool va
|
|||
}
|
||||
}
|
||||
|
||||
static char *rna_ColorManagedViewSettings_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_ColorManagedViewSettings_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("view_settings");
|
||||
}
|
||||
|
@ -662,12 +662,12 @@ static void rna_ColorManagedColorspaceSettings_reload_update(Main *bmain,
|
|||
}
|
||||
}
|
||||
|
||||
static char *rna_ColorManagedSequencerColorspaceSettings_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_ColorManagedSequencerColorspaceSettings_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("sequencer_colorspace_settings");
|
||||
}
|
||||
|
||||
static char *rna_ColorManagedInputColorspaceSettings_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_ColorManagedInputColorspaceSettings_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("colorspace_settings");
|
||||
}
|
||||
|
|
|
@ -440,7 +440,7 @@ static char *rna_Constraint_do_compute_path(Object *ob, bConstraint *con)
|
|||
}
|
||||
}
|
||||
|
||||
static char *rna_Constraint_path(PointerRNA *ptr)
|
||||
static char *rna_Constraint_path(const PointerRNA *ptr)
|
||||
{
|
||||
Object *ob = (Object *)ptr->owner_id;
|
||||
bConstraint *con = ptr->data;
|
||||
|
@ -448,7 +448,7 @@ static char *rna_Constraint_path(PointerRNA *ptr)
|
|||
return rna_Constraint_do_compute_path(ob, con);
|
||||
}
|
||||
|
||||
static bConstraint *rna_constraint_from_target(PointerRNA *ptr)
|
||||
static bConstraint *rna_constraint_from_target(const PointerRNA *ptr)
|
||||
{
|
||||
Object *ob = (Object *)ptr->owner_id;
|
||||
bConstraintTarget *tgt = ptr->data;
|
||||
|
@ -456,7 +456,7 @@ static bConstraint *rna_constraint_from_target(PointerRNA *ptr)
|
|||
return BKE_constraint_find_from_target(ob, tgt, NULL);
|
||||
}
|
||||
|
||||
static char *rna_ConstraintTarget_path(PointerRNA *ptr)
|
||||
static char *rna_ConstraintTarget_path(const PointerRNA *ptr)
|
||||
{
|
||||
Object *ob = (Object *)ptr->owner_id;
|
||||
bConstraintTarget *tgt = ptr->data;
|
||||
|
@ -691,11 +691,11 @@ static void rna_ActionConstraint_minmax_range(
|
|||
}
|
||||
}
|
||||
|
||||
static int rna_SplineIKConstraint_joint_bindings_get_length(PointerRNA *ptr,
|
||||
static int rna_SplineIKConstraint_joint_bindings_get_length(const PointerRNA *ptr,
|
||||
int length[RNA_MAX_ARRAY_DIMENSION])
|
||||
{
|
||||
bConstraint *con = (bConstraint *)ptr->data;
|
||||
bSplineIKConstraint *ikData = (bSplineIKConstraint *)con->data;
|
||||
const bConstraint *con = (bConstraint *)ptr->data;
|
||||
const bSplineIKConstraint *ikData = (bSplineIKConstraint *)con->data;
|
||||
|
||||
if (ikData) {
|
||||
length[0] = ikData->numpoints;
|
||||
|
|
|
@ -770,7 +770,7 @@ static void rna_Curve_active_spline_set(PointerRNA *ptr,
|
|||
}
|
||||
}
|
||||
|
||||
static char *rna_Curve_spline_path(PointerRNA *ptr)
|
||||
static char *rna_Curve_spline_path(const PointerRNA *ptr)
|
||||
{
|
||||
Curve *cu = (Curve *)ptr->owner_id;
|
||||
ListBase *nubase = BKE_curve_nurbs_get(cu);
|
||||
|
@ -786,7 +786,7 @@ static char *rna_Curve_spline_path(PointerRNA *ptr)
|
|||
}
|
||||
|
||||
/* use for both bezier and nurbs */
|
||||
static char *rna_Curve_spline_point_path(PointerRNA *ptr)
|
||||
static char *rna_Curve_spline_point_path(const PointerRNA *ptr)
|
||||
{
|
||||
Curve *cu = (Curve *)ptr->owner_id;
|
||||
Nurb *nu;
|
||||
|
@ -808,10 +808,10 @@ static char *rna_Curve_spline_point_path(PointerRNA *ptr)
|
|||
}
|
||||
}
|
||||
|
||||
static char *rna_TextBox_path(PointerRNA *ptr)
|
||||
static char *rna_TextBox_path(const PointerRNA *ptr)
|
||||
{
|
||||
Curve *cu = (Curve *)ptr->owner_id;
|
||||
TextBox *tb = ptr->data;
|
||||
const Curve *cu = (Curve *)ptr->owner_id;
|
||||
const TextBox *tb = ptr->data;
|
||||
int index = (int)(tb - cu->tb);
|
||||
|
||||
if (index >= 0 && index < cu->totbox) {
|
||||
|
|
|
@ -30,7 +30,7 @@
|
|||
# include "WM_api.h"
|
||||
# include "WM_types.h"
|
||||
|
||||
static Curves *rna_curves(PointerRNA *ptr)
|
||||
static Curves *rna_curves(const PointerRNA *ptr)
|
||||
{
|
||||
return (Curves *)ptr->owner_id;
|
||||
}
|
||||
|
@ -52,13 +52,18 @@ static void rna_Curves_curve_offset_data_begin(CollectionPropertyIterator *iter,
|
|||
NULL);
|
||||
}
|
||||
|
||||
static int rna_CurvePoint_index_get(PointerRNA *ptr)
|
||||
static int rna_CurvePoint_index_get_const(const PointerRNA *ptr)
|
||||
{
|
||||
const Curves *curves = rna_curves(ptr);
|
||||
const float(*co)[3] = ptr->data;
|
||||
return (int)(co - curves->geometry.position);
|
||||
}
|
||||
|
||||
static int rna_CurvePoint_index_get(PointerRNA *ptr)
|
||||
{
|
||||
return rna_CurvePoint_index_get_const(ptr);
|
||||
}
|
||||
|
||||
static void rna_CurvePoint_location_get(PointerRNA *ptr, float value[3])
|
||||
{
|
||||
copy_v3_v3(value, (const float *)ptr->data);
|
||||
|
@ -89,20 +94,25 @@ static void rna_CurvePoint_radius_set(PointerRNA *ptr, float value)
|
|||
curves->geometry.radius[co - curves->geometry.position] = value;
|
||||
}
|
||||
|
||||
static char *rna_CurvePoint_path(PointerRNA *ptr)
|
||||
static char *rna_CurvePoint_path(const PointerRNA *ptr)
|
||||
{
|
||||
return BLI_sprintfN("points[%d]", rna_CurvePoint_index_get(ptr));
|
||||
return BLI_sprintfN("points[%d]", rna_CurvePoint_index_get_const(ptr));
|
||||
}
|
||||
|
||||
static int rna_CurveSlice_index_get(PointerRNA *ptr)
|
||||
static int rna_CurveSlice_index_get_const(const PointerRNA *ptr)
|
||||
{
|
||||
Curves *curves = rna_curves(ptr);
|
||||
return (int)((int *)ptr->data - curves->geometry.curve_offsets);
|
||||
}
|
||||
|
||||
static char *rna_CurveSlice_path(PointerRNA *ptr)
|
||||
static int rna_CurveSlice_index_get(PointerRNA *ptr)
|
||||
{
|
||||
return BLI_sprintfN("curves[%d]", rna_CurveSlice_index_get(ptr));
|
||||
return rna_CurveSlice_index_get_const(ptr);
|
||||
}
|
||||
|
||||
static char *rna_CurveSlice_path(const PointerRNA *ptr)
|
||||
{
|
||||
return BLI_sprintfN("curves[%d]", rna_CurveSlice_index_get_const(ptr));
|
||||
}
|
||||
|
||||
static void rna_CurveSlice_points_begin(CollectionPropertyIterator *iter, PointerRNA *ptr)
|
||||
|
|
|
@ -37,30 +37,30 @@ const EnumPropertyItem rna_enum_prop_dynamicpaint_type_items[] = {
|
|||
# include "DEG_depsgraph.h"
|
||||
# include "DEG_depsgraph_build.h"
|
||||
|
||||
static char *rna_DynamicPaintCanvasSettings_path(PointerRNA *ptr)
|
||||
static char *rna_DynamicPaintCanvasSettings_path(const PointerRNA *ptr)
|
||||
{
|
||||
DynamicPaintCanvasSettings *settings = (DynamicPaintCanvasSettings *)ptr->data;
|
||||
ModifierData *md = (ModifierData *)settings->pmd;
|
||||
const DynamicPaintCanvasSettings *settings = (DynamicPaintCanvasSettings *)ptr->data;
|
||||
const ModifierData *md = (ModifierData *)settings->pmd;
|
||||
char name_esc[sizeof(md->name) * 2];
|
||||
|
||||
BLI_str_escape(name_esc, md->name, sizeof(name_esc));
|
||||
return BLI_sprintfN("modifiers[\"%s\"].canvas_settings", name_esc);
|
||||
}
|
||||
|
||||
static char *rna_DynamicPaintBrushSettings_path(PointerRNA *ptr)
|
||||
static char *rna_DynamicPaintBrushSettings_path(const PointerRNA *ptr)
|
||||
{
|
||||
DynamicPaintBrushSettings *settings = (DynamicPaintBrushSettings *)ptr->data;
|
||||
ModifierData *md = (ModifierData *)settings->pmd;
|
||||
const DynamicPaintBrushSettings *settings = (DynamicPaintBrushSettings *)ptr->data;
|
||||
const ModifierData *md = (ModifierData *)settings->pmd;
|
||||
char name_esc[sizeof(md->name) * 2];
|
||||
|
||||
BLI_str_escape(name_esc, md->name, sizeof(name_esc));
|
||||
return BLI_sprintfN("modifiers[\"%s\"].brush_settings", name_esc);
|
||||
}
|
||||
|
||||
static char *rna_DynamicPaintSurface_path(PointerRNA *ptr)
|
||||
static char *rna_DynamicPaintSurface_path(const PointerRNA *ptr)
|
||||
{
|
||||
DynamicPaintSurface *surface = (DynamicPaintSurface *)ptr->data;
|
||||
ModifierData *md = (ModifierData *)surface->canvas->pmd;
|
||||
const DynamicPaintSurface *surface = (DynamicPaintSurface *)ptr->data;
|
||||
const ModifierData *md = (ModifierData *)surface->canvas->pmd;
|
||||
char name_esc[sizeof(md->name) * 2];
|
||||
char name_esc_surface[sizeof(surface->name) * 2];
|
||||
|
||||
|
|
|
@ -786,11 +786,11 @@ static void rna_FModifier_active_update(Main *bmain, Scene *scene, PointerRNA *p
|
|||
rna_FModifier_update(bmain, scene, ptr);
|
||||
}
|
||||
|
||||
static int rna_FModifierGenerator_coefficients_get_length(PointerRNA *ptr,
|
||||
static int rna_FModifierGenerator_coefficients_get_length(const PointerRNA *ptr,
|
||||
int length[RNA_MAX_ARRAY_DIMENSION])
|
||||
{
|
||||
FModifier *fcm = (FModifier *)ptr->data;
|
||||
FMod_Generator *gen = fcm->data;
|
||||
const FModifier *fcm = (FModifier *)ptr->data;
|
||||
const FMod_Generator *gen = fcm->data;
|
||||
|
||||
if (gen) {
|
||||
length[0] = gen->arraysize;
|
||||
|
|
|
@ -857,30 +857,30 @@ static void rna_Fluid_domaintype_set(struct PointerRNA *ptr, int value)
|
|||
BKE_fluid_fields_sanitize(settings);
|
||||
}
|
||||
|
||||
static char *rna_FluidDomainSettings_path(PointerRNA *ptr)
|
||||
static char *rna_FluidDomainSettings_path(const PointerRNA *ptr)
|
||||
{
|
||||
FluidDomainSettings *settings = (FluidDomainSettings *)ptr->data;
|
||||
ModifierData *md = (ModifierData *)settings->fmd;
|
||||
const FluidDomainSettings *settings = (FluidDomainSettings *)ptr->data;
|
||||
const ModifierData *md = (ModifierData *)settings->fmd;
|
||||
char name_esc[sizeof(md->name) * 2];
|
||||
|
||||
BLI_str_escape(name_esc, md->name, sizeof(name_esc));
|
||||
return BLI_sprintfN("modifiers[\"%s\"].domain_settings", name_esc);
|
||||
}
|
||||
|
||||
static char *rna_FluidFlowSettings_path(PointerRNA *ptr)
|
||||
static char *rna_FluidFlowSettings_path(const PointerRNA *ptr)
|
||||
{
|
||||
FluidFlowSettings *settings = (FluidFlowSettings *)ptr->data;
|
||||
ModifierData *md = (ModifierData *)settings->fmd;
|
||||
const FluidFlowSettings *settings = (FluidFlowSettings *)ptr->data;
|
||||
const ModifierData *md = (ModifierData *)settings->fmd;
|
||||
char name_esc[sizeof(md->name) * 2];
|
||||
|
||||
BLI_str_escape(name_esc, md->name, sizeof(name_esc));
|
||||
return BLI_sprintfN("modifiers[\"%s\"].flow_settings", name_esc);
|
||||
}
|
||||
|
||||
static char *rna_FluidEffectorSettings_path(PointerRNA *ptr)
|
||||
static char *rna_FluidEffectorSettings_path(const PointerRNA *ptr)
|
||||
{
|
||||
FluidEffectorSettings *settings = (FluidEffectorSettings *)ptr->data;
|
||||
ModifierData *md = (ModifierData *)settings->fmd;
|
||||
const FluidEffectorSettings *settings = (FluidEffectorSettings *)ptr->data;
|
||||
const ModifierData *md = (ModifierData *)settings->fmd;
|
||||
char name_esc[sizeof(md->name) * 2];
|
||||
|
||||
BLI_str_escape(name_esc, md->name, sizeof(name_esc));
|
||||
|
@ -893,9 +893,10 @@ static char *rna_FluidEffectorSettings_path(PointerRNA *ptr)
|
|||
|
||||
# ifdef WITH_FLUID
|
||||
|
||||
static int rna_FluidModifier_grid_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
|
||||
static int rna_FluidModifier_grid_get_length(const PointerRNA *ptr,
|
||||
int length[RNA_MAX_ARRAY_DIMENSION])
|
||||
{
|
||||
FluidDomainSettings *fds = (FluidDomainSettings *)ptr->data;
|
||||
const FluidDomainSettings *fds = (FluidDomainSettings *)ptr->data;
|
||||
float *density = NULL;
|
||||
int size = 0;
|
||||
|
||||
|
@ -918,7 +919,7 @@ static int rna_FluidModifier_grid_get_length(PointerRNA *ptr, int length[RNA_MAX
|
|||
return length[0];
|
||||
}
|
||||
|
||||
static int rna_FluidModifier_color_grid_get_length(PointerRNA *ptr,
|
||||
static int rna_FluidModifier_color_grid_get_length(const PointerRNA *ptr,
|
||||
int length[RNA_MAX_ARRAY_DIMENSION])
|
||||
{
|
||||
rna_FluidModifier_grid_get_length(ptr, length);
|
||||
|
@ -927,10 +928,10 @@ static int rna_FluidModifier_color_grid_get_length(PointerRNA *ptr,
|
|||
return length[0];
|
||||
}
|
||||
|
||||
static int rna_FluidModifier_velocity_grid_get_length(PointerRNA *ptr,
|
||||
static int rna_FluidModifier_velocity_grid_get_length(const PointerRNA *ptr,
|
||||
int length[RNA_MAX_ARRAY_DIMENSION])
|
||||
{
|
||||
FluidDomainSettings *fds = (FluidDomainSettings *)ptr->data;
|
||||
const FluidDomainSettings *fds = (FluidDomainSettings *)ptr->data;
|
||||
float *vx = NULL;
|
||||
float *vy = NULL;
|
||||
float *vz = NULL;
|
||||
|
@ -948,10 +949,10 @@ static int rna_FluidModifier_velocity_grid_get_length(PointerRNA *ptr,
|
|||
return length[0];
|
||||
}
|
||||
|
||||
static int rna_FluidModifier_heat_grid_get_length(PointerRNA *ptr,
|
||||
static int rna_FluidModifier_heat_grid_get_length(const PointerRNA *ptr,
|
||||
int length[RNA_MAX_ARRAY_DIMENSION])
|
||||
{
|
||||
FluidDomainSettings *fds = (FluidDomainSettings *)ptr->data;
|
||||
const FluidDomainSettings *fds = (FluidDomainSettings *)ptr->data;
|
||||
float *heat = NULL;
|
||||
int size = 0;
|
||||
|
||||
|
|
|
@ -307,7 +307,7 @@ bool rna_GPencil_datablocks_obdata_poll(PointerRNA *UNUSED(ptr), const PointerRN
|
|||
return (gpd->flag & GP_DATA_ANNOTATIONS) == 0;
|
||||
}
|
||||
|
||||
static char *rna_GPencilLayer_path(PointerRNA *ptr)
|
||||
static char *rna_GPencilLayer_path(const PointerRNA *ptr)
|
||||
{
|
||||
bGPDlayer *gpl = (bGPDlayer *)ptr->data;
|
||||
char name_esc[sizeof(gpl->info) * 2];
|
||||
|
@ -407,7 +407,7 @@ static void rna_GPencilLayer_parent_bone_set(PointerRNA *ptr, const char *value)
|
|||
}
|
||||
}
|
||||
|
||||
static char *rna_GPencilLayerMask_path(PointerRNA *ptr)
|
||||
static char *rna_GPencilLayerMask_path(const PointerRNA *ptr)
|
||||
{
|
||||
bGPdata *gpd = (bGPdata *)ptr->owner_id;
|
||||
bGPDlayer *gpl = BKE_gpencil_layer_active_get(gpd);
|
||||
|
@ -1122,7 +1122,7 @@ static void rna_GPencil_clear(bGPdata *gpd)
|
|||
WM_main_add_notifier(NC_GPENCIL | ND_DATA | NA_EDITED, NULL);
|
||||
}
|
||||
|
||||
static char *rna_GreasePencilGrid_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_GreasePencilGrid_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("grid");
|
||||
}
|
||||
|
|
|
@ -341,9 +341,9 @@ static void rna_GpencilModifier_name_set(PointerRNA *ptr, const char *value)
|
|||
BKE_animdata_fix_paths_rename_all(NULL, "grease_pencil_modifiers", oldname, gmd->name);
|
||||
}
|
||||
|
||||
static char *rna_GpencilModifier_path(PointerRNA *ptr)
|
||||
static char *rna_GpencilModifier_path(const PointerRNA *ptr)
|
||||
{
|
||||
GpencilModifierData *gmd = ptr->data;
|
||||
const GpencilModifierData *gmd = ptr->data;
|
||||
char name_esc[sizeof(gmd->name) * 2];
|
||||
|
||||
BLI_str_escape(name_esc, gmd->name, sizeof(name_esc));
|
||||
|
@ -752,11 +752,11 @@ static void rna_GpencilDash_segments_begin(CollectionPropertyIterator *iter, Poi
|
|||
iter, dmd->segments, sizeof(DashGpencilModifierSegment), dmd->segments_len, false, NULL);
|
||||
}
|
||||
|
||||
static char *rna_DashGpencilModifierSegment_path(PointerRNA *ptr)
|
||||
static char *rna_DashGpencilModifierSegment_path(const PointerRNA *ptr)
|
||||
{
|
||||
DashGpencilModifierSegment *ds = (DashGpencilModifierSegment *)ptr->data;
|
||||
const DashGpencilModifierSegment *ds = (DashGpencilModifierSegment *)ptr->data;
|
||||
|
||||
DashGpencilModifierData *dmd = (DashGpencilModifierData *)ds->dmd;
|
||||
const DashGpencilModifierData *dmd = (DashGpencilModifierData *)ds->dmd;
|
||||
|
||||
BLI_assert(dmd != NULL);
|
||||
|
||||
|
|
|
@ -175,7 +175,7 @@ static void rna_ImageUser_relations_update(Main *bmain, Scene *scene, PointerRNA
|
|||
DEG_relations_tag_update(bmain);
|
||||
}
|
||||
|
||||
static char *rna_ImageUser_path(PointerRNA *ptr)
|
||||
static char *rna_ImageUser_path(const PointerRNA *ptr)
|
||||
{
|
||||
if (ptr->owner_id) {
|
||||
/* ImageUser *iuser = ptr->data; */
|
||||
|
@ -446,7 +446,7 @@ static int rna_Image_frame_duration_get(PointerRNA *ptr)
|
|||
return duration;
|
||||
}
|
||||
|
||||
static int rna_Image_pixels_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
|
||||
static int rna_Image_pixels_get_length(const PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
|
||||
{
|
||||
Image *ima = (Image *)ptr->owner_id;
|
||||
ImBuf *ibuf;
|
||||
|
|
|
@ -373,7 +373,7 @@ void rna_ViewLayer_active_lightgroup_index_set(PointerRNA *ptr, int value);
|
|||
* `rna_path_buffer_size` should be at least `sizeof(ViewLayer.name) * 3`.
|
||||
* \return actual length of the generated RNA path.
|
||||
*/
|
||||
size_t rna_ViewLayer_path_buffer_get(struct ViewLayer *view_layer,
|
||||
size_t rna_ViewLayer_path_buffer_get(const struct ViewLayer *view_layer,
|
||||
char *r_rna_path,
|
||||
const size_t rna_path_buffer_size);
|
||||
|
||||
|
@ -402,8 +402,8 @@ bool rna_GPencil_datablocks_annotations_poll(struct PointerRNA *ptr,
|
|||
const struct PointerRNA value);
|
||||
bool rna_GPencil_datablocks_obdata_poll(struct PointerRNA *ptr, const struct PointerRNA value);
|
||||
|
||||
char *rna_TextureSlot_path(struct PointerRNA *ptr);
|
||||
char *rna_Node_ImageUser_path(struct PointerRNA *ptr);
|
||||
char *rna_TextureSlot_path(const struct PointerRNA *ptr);
|
||||
char *rna_Node_ImageUser_path(const struct PointerRNA *ptr);
|
||||
|
||||
/* Set U.is_dirty and redraw. */
|
||||
|
||||
|
|
|
@ -50,9 +50,10 @@ typedef int (*EditableFunc)(struct PointerRNA *ptr, const char **r_info);
|
|||
typedef int (*ItemEditableFunc)(struct PointerRNA *ptr, int index);
|
||||
typedef struct IDProperty **(*IDPropertiesFunc)(struct PointerRNA *ptr);
|
||||
typedef struct StructRNA *(*StructRefineFunc)(struct PointerRNA *ptr);
|
||||
typedef char *(*StructPathFunc)(struct PointerRNA *ptr);
|
||||
typedef char *(*StructPathFunc)(const struct PointerRNA *ptr);
|
||||
|
||||
typedef int (*PropArrayLengthGetFunc)(struct PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION]);
|
||||
typedef int (*PropArrayLengthGetFunc)(const struct PointerRNA *ptr,
|
||||
int length[RNA_MAX_ARRAY_DIMENSION]);
|
||||
typedef bool (*PropBooleanGetFunc)(struct PointerRNA *ptr);
|
||||
typedef void (*PropBooleanSetFunc)(struct PointerRNA *ptr, bool value);
|
||||
typedef void (*PropBooleanArrayGetFunc)(struct PointerRNA *ptr, bool *values);
|
||||
|
|
|
@ -159,7 +159,7 @@ static void rna_ShapeKey_slider_max_set(PointerRNA *ptr, float value)
|
|||
* such case looks rather unlikely - and not worth adding some kind of caching in key-blocks.
|
||||
*/
|
||||
|
||||
static Mesh *rna_KeyBlock_normals_get_mesh(PointerRNA *ptr, ID *id)
|
||||
static Mesh *rna_KeyBlock_normals_get_mesh(const PointerRNA *ptr, ID *id)
|
||||
{
|
||||
Key *key = rna_ShapeKey_find_key((id == NULL && ptr != NULL) ? ptr->owner_id : id);
|
||||
id = key ? key->from : NULL;
|
||||
|
@ -182,9 +182,10 @@ static Mesh *rna_KeyBlock_normals_get_mesh(PointerRNA *ptr, ID *id)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static int rna_KeyBlock_normals_vert_len(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
|
||||
static int rna_KeyBlock_normals_vert_len(const PointerRNA *ptr,
|
||||
int length[RNA_MAX_ARRAY_DIMENSION])
|
||||
{
|
||||
Mesh *me = rna_KeyBlock_normals_get_mesh(ptr, NULL);
|
||||
const Mesh *me = rna_KeyBlock_normals_get_mesh(ptr, NULL);
|
||||
|
||||
length[0] = me ? me->totvert : 0;
|
||||
length[1] = 3;
|
||||
|
@ -211,9 +212,10 @@ static void rna_KeyBlock_normals_vert_calc(ID *id,
|
|||
BKE_keyblock_mesh_calc_normals(data, me, (float(*)[3])(*normals), NULL, NULL);
|
||||
}
|
||||
|
||||
static int rna_KeyBlock_normals_poly_len(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
|
||||
static int rna_KeyBlock_normals_poly_len(const PointerRNA *ptr,
|
||||
int length[RNA_MAX_ARRAY_DIMENSION])
|
||||
{
|
||||
Mesh *me = rna_KeyBlock_normals_get_mesh(ptr, NULL);
|
||||
const Mesh *me = rna_KeyBlock_normals_get_mesh(ptr, NULL);
|
||||
|
||||
length[0] = me ? me->totpoly : 0;
|
||||
length[1] = 3;
|
||||
|
@ -240,9 +242,10 @@ static void rna_KeyBlock_normals_poly_calc(ID *id,
|
|||
BKE_keyblock_mesh_calc_normals(data, me, NULL, (float(*)[3])(*normals), NULL);
|
||||
}
|
||||
|
||||
static int rna_KeyBlock_normals_loop_len(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
|
||||
static int rna_KeyBlock_normals_loop_len(const PointerRNA *ptr,
|
||||
int length[RNA_MAX_ARRAY_DIMENSION])
|
||||
{
|
||||
Mesh *me = rna_KeyBlock_normals_get_mesh(ptr, NULL);
|
||||
const Mesh *me = rna_KeyBlock_normals_get_mesh(ptr, NULL);
|
||||
|
||||
length[0] = me ? me->totloop : 0;
|
||||
length[1] = 3;
|
||||
|
@ -656,10 +659,10 @@ int rna_ShapeKey_data_lookup_int(PointerRNA *ptr, int index, PointerRNA *r_ptr)
|
|||
return false;
|
||||
}
|
||||
|
||||
static char *rna_ShapeKey_path(PointerRNA *ptr)
|
||||
static char *rna_ShapeKey_path(const PointerRNA *ptr)
|
||||
{
|
||||
KeyBlock *kb = (KeyBlock *)ptr->data;
|
||||
ID *id = ptr->owner_id;
|
||||
const KeyBlock *kb = (KeyBlock *)ptr->data;
|
||||
const ID *id = ptr->owner_id;
|
||||
char name_esc[sizeof(kb->name) * 2];
|
||||
|
||||
BLI_str_escape(name_esc, kb->name, sizeof(name_esc));
|
||||
|
@ -750,7 +753,7 @@ static int rna_ShapeKeyPoint_get_index(Key *key, KeyBlock *kb, float *point)
|
|||
return (int)(pt - start) / key->elemsize;
|
||||
}
|
||||
|
||||
static char *rna_ShapeKeyPoint_path(PointerRNA *ptr)
|
||||
static char *rna_ShapeKeyPoint_path(const PointerRNA *ptr)
|
||||
{
|
||||
ID *id = ptr->owner_id;
|
||||
Key *key = rna_ShapeKey_find_key(ptr->owner_id);
|
||||
|
|
|
@ -209,11 +209,11 @@ static void rna_Lattice_vg_name_set(PointerRNA *ptr, const char *value)
|
|||
}
|
||||
|
||||
/* annoying, but is a consequence of RNA structures... */
|
||||
static char *rna_LatticePoint_path(PointerRNA *ptr)
|
||||
static char *rna_LatticePoint_path(const PointerRNA *ptr)
|
||||
{
|
||||
Lattice *lt = (Lattice *)ptr->owner_id;
|
||||
void *point = ptr->data;
|
||||
BPoint *points = NULL;
|
||||
const Lattice *lt = (Lattice *)ptr->owner_id;
|
||||
const void *point = ptr->data;
|
||||
const BPoint *points = NULL;
|
||||
|
||||
if (lt->editlatt && lt->editlatt->latt->def) {
|
||||
points = lt->editlatt->latt->def;
|
||||
|
|
|
@ -98,7 +98,7 @@ static void rna_LayerObjects_active_object_set(PointerRNA *ptr,
|
|||
}
|
||||
}
|
||||
|
||||
size_t rna_ViewLayer_path_buffer_get(ViewLayer *view_layer,
|
||||
size_t rna_ViewLayer_path_buffer_get(const ViewLayer *view_layer,
|
||||
char *r_rna_path,
|
||||
const size_t rna_path_buffer_size)
|
||||
{
|
||||
|
@ -108,9 +108,9 @@ size_t rna_ViewLayer_path_buffer_get(ViewLayer *view_layer,
|
|||
return BLI_snprintf_rlen(r_rna_path, rna_path_buffer_size, "view_layers[\"%s\"]", name_esc);
|
||||
}
|
||||
|
||||
static char *rna_ViewLayer_path(PointerRNA *ptr)
|
||||
static char *rna_ViewLayer_path(const PointerRNA *ptr)
|
||||
{
|
||||
ViewLayer *view_layer = (ViewLayer *)ptr->data;
|
||||
const ViewLayer *view_layer = (ViewLayer *)ptr->data;
|
||||
char rna_path[sizeof(view_layer->name) * 3];
|
||||
|
||||
rna_ViewLayer_path_buffer_get(view_layer, rna_path, sizeof(rna_path));
|
||||
|
|
|
@ -239,33 +239,33 @@ static StructRNA *rna_LineStyle_geometry_modifier_refine(struct PointerRNA *ptr)
|
|||
}
|
||||
}
|
||||
|
||||
static char *rna_LineStyle_color_modifier_path(PointerRNA *ptr)
|
||||
static char *rna_LineStyle_color_modifier_path(const PointerRNA *ptr)
|
||||
{
|
||||
LineStyleModifier *m = (LineStyleModifier *)ptr->data;
|
||||
const LineStyleModifier *m = (LineStyleModifier *)ptr->data;
|
||||
char name_esc[sizeof(m->name) * 2];
|
||||
BLI_str_escape(name_esc, m->name, sizeof(name_esc));
|
||||
return BLI_sprintfN("color_modifiers[\"%s\"]", name_esc);
|
||||
}
|
||||
|
||||
static char *rna_LineStyle_alpha_modifier_path(PointerRNA *ptr)
|
||||
static char *rna_LineStyle_alpha_modifier_path(const PointerRNA *ptr)
|
||||
{
|
||||
LineStyleModifier *m = (LineStyleModifier *)ptr->data;
|
||||
const LineStyleModifier *m = (LineStyleModifier *)ptr->data;
|
||||
char name_esc[sizeof(m->name) * 2];
|
||||
BLI_str_escape(name_esc, m->name, sizeof(name_esc));
|
||||
return BLI_sprintfN("alpha_modifiers[\"%s\"]", name_esc);
|
||||
}
|
||||
|
||||
static char *rna_LineStyle_thickness_modifier_path(PointerRNA *ptr)
|
||||
static char *rna_LineStyle_thickness_modifier_path(const PointerRNA *ptr)
|
||||
{
|
||||
LineStyleModifier *m = (LineStyleModifier *)ptr->data;
|
||||
const LineStyleModifier *m = (LineStyleModifier *)ptr->data;
|
||||
char name_esc[sizeof(m->name) * 2];
|
||||
BLI_str_escape(name_esc, m->name, sizeof(name_esc));
|
||||
return BLI_sprintfN("thickness_modifiers[\"%s\"]", name_esc);
|
||||
}
|
||||
|
||||
static char *rna_LineStyle_geometry_modifier_path(PointerRNA *ptr)
|
||||
static char *rna_LineStyle_geometry_modifier_path(const PointerRNA *ptr)
|
||||
{
|
||||
LineStyleModifier *m = (LineStyleModifier *)ptr->data;
|
||||
const LineStyleModifier *m = (LineStyleModifier *)ptr->data;
|
||||
char name_esc[sizeof(m->name) * 2];
|
||||
BLI_str_escape(name_esc, m->name, sizeof(name_esc));
|
||||
return BLI_sprintfN("geometry_modifiers[\"%s\"]", name_esc);
|
||||
|
|
|
@ -165,9 +165,9 @@ static void rna_Mask_layer_active_index_range(
|
|||
*softmax = *max;
|
||||
}
|
||||
|
||||
static char *rna_MaskLayer_path(PointerRNA *ptr)
|
||||
static char *rna_MaskLayer_path(const PointerRNA *ptr)
|
||||
{
|
||||
MaskLayer *masklay = (MaskLayer *)ptr->data;
|
||||
const MaskLayer *masklay = (MaskLayer *)ptr->data;
|
||||
char name_esc[sizeof(masklay->name) * 2];
|
||||
BLI_str_escape(name_esc, masklay->name, sizeof(name_esc));
|
||||
return BLI_sprintfN("layers[\"%s\"]", name_esc);
|
||||
|
|
|
@ -362,7 +362,7 @@ static void rna_gpcolordata_uv_update(Main *bmain, Scene *scene, PointerRNA *ptr
|
|||
rna_MaterialGpencil_update(bmain, scene, ptr);
|
||||
}
|
||||
|
||||
static char *rna_GpencilColorData_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_GpencilColorData_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("grease_pencil");
|
||||
}
|
||||
|
|
|
@ -71,7 +71,7 @@ static const EnumPropertyItem rna_enum_mesh_remesh_mode_items[] = {
|
|||
/** \name Generic Helpers
|
||||
* \{ */
|
||||
|
||||
static Mesh *rna_mesh(PointerRNA *ptr)
|
||||
static Mesh *rna_mesh(const PointerRNA *ptr)
|
||||
{
|
||||
Mesh *me = (Mesh *)ptr->owner_id;
|
||||
return me;
|
||||
|
@ -102,7 +102,7 @@ static CustomData *rna_mesh_fdata_helper(Mesh *me)
|
|||
return (me->edit_mesh) ? NULL : &me->fdata;
|
||||
}
|
||||
|
||||
static CustomData *rna_mesh_vdata(PointerRNA *ptr)
|
||||
static CustomData *rna_mesh_vdata(const PointerRNA *ptr)
|
||||
{
|
||||
Mesh *me = rna_mesh(ptr);
|
||||
return rna_mesh_vdata_helper(me);
|
||||
|
@ -114,13 +114,13 @@ static CustomData *rna_mesh_edata(PointerRNA *ptr)
|
|||
return rna_mesh_edata_helper(me);
|
||||
}
|
||||
# endif
|
||||
static CustomData *rna_mesh_pdata(PointerRNA *ptr)
|
||||
static CustomData *rna_mesh_pdata(const PointerRNA *ptr)
|
||||
{
|
||||
Mesh *me = rna_mesh(ptr);
|
||||
return rna_mesh_pdata_helper(me);
|
||||
}
|
||||
|
||||
static CustomData *rna_mesh_ldata(PointerRNA *ptr)
|
||||
static CustomData *rna_mesh_ldata(const PointerRNA *ptr)
|
||||
{
|
||||
Mesh *me = rna_mesh(ptr);
|
||||
return rna_mesh_ldata_helper(me);
|
||||
|
@ -689,9 +689,9 @@ DEFINE_CUSTOMDATA_LAYER_COLLECTION_ACTIVEITEM(uv_layer, ldata, CD_MLOOPUV, rende
|
|||
|
||||
/* MeshUVLoopLayer */
|
||||
|
||||
static char *rna_MeshUVLoopLayer_path(PointerRNA *ptr)
|
||||
static char *rna_MeshUVLoopLayer_path(const PointerRNA *ptr)
|
||||
{
|
||||
CustomDataLayer *cdl = ptr->data;
|
||||
const CustomDataLayer *cdl = ptr->data;
|
||||
char name_esc[sizeof(cdl->name) * 2];
|
||||
BLI_str_escape(name_esc, cdl->name, sizeof(name_esc));
|
||||
return BLI_sprintfN("uv_layers[\"%s\"]", name_esc);
|
||||
|
@ -932,16 +932,16 @@ static int rna_Mesh_polygon_string_layers_length(PointerRNA *ptr)
|
|||
/* Skin vertices */
|
||||
DEFINE_CUSTOMDATA_LAYER_COLLECTION(skin_vertice, vdata, CD_MVERT_SKIN)
|
||||
|
||||
static char *rna_MeshSkinVertexLayer_path(PointerRNA *ptr)
|
||||
static char *rna_MeshSkinVertexLayer_path(const PointerRNA *ptr)
|
||||
{
|
||||
CustomDataLayer *cdl = ptr->data;
|
||||
const CustomDataLayer *cdl = ptr->data;
|
||||
char name_esc[sizeof(cdl->name) * 2];
|
||||
BLI_str_escape(name_esc, cdl->name, sizeof(name_esc));
|
||||
return BLI_sprintfN("skin_vertices[\"%s\"]", name_esc);
|
||||
}
|
||||
|
||||
static char *rna_VertCustomData_data_path(PointerRNA *ptr, const char *collection, int type);
|
||||
static char *rna_MeshSkinVertex_path(PointerRNA *ptr)
|
||||
static char *rna_VertCustomData_data_path(const PointerRNA *ptr, const char *collection, int type);
|
||||
static char *rna_MeshSkinVertex_path(const PointerRNA *ptr)
|
||||
{
|
||||
return rna_VertCustomData_data_path(ptr, "skin_vertices", CD_MVERT_SKIN);
|
||||
}
|
||||
|
@ -964,8 +964,7 @@ static int rna_MeshSkinVertexLayer_data_length(PointerRNA *ptr)
|
|||
/* Vertex creases */
|
||||
DEFINE_CUSTOMDATA_LAYER_COLLECTION(vertex_crease, vdata, CD_CREASE)
|
||||
|
||||
static char *rna_VertCustomData_data_path(PointerRNA *ptr, const char *collection, int type);
|
||||
static char *rna_MeshVertexCreaseLayer_path(PointerRNA *ptr)
|
||||
static char *rna_MeshVertexCreaseLayer_path(const PointerRNA *ptr)
|
||||
{
|
||||
return rna_VertCustomData_data_path(ptr, "vertex_creases", CD_CREASE);
|
||||
}
|
||||
|
@ -988,15 +987,15 @@ static int rna_MeshVertexCreaseLayer_data_length(PointerRNA *ptr)
|
|||
/* Paint mask */
|
||||
DEFINE_CUSTOMDATA_LAYER_COLLECTION(vertex_paint_mask, vdata, CD_PAINT_MASK)
|
||||
|
||||
static char *rna_MeshPaintMaskLayer_path(PointerRNA *ptr)
|
||||
static char *rna_MeshPaintMaskLayer_path(const PointerRNA *ptr)
|
||||
{
|
||||
CustomDataLayer *cdl = ptr->data;
|
||||
const CustomDataLayer *cdl = ptr->data;
|
||||
char name_esc[sizeof(cdl->name) * 2];
|
||||
BLI_str_escape(name_esc, cdl->name, sizeof(name_esc));
|
||||
return BLI_sprintfN("vertex_paint_masks[\"%s\"]", name_esc);
|
||||
}
|
||||
|
||||
static char *rna_MeshPaintMask_path(PointerRNA *ptr)
|
||||
static char *rna_MeshPaintMask_path(const PointerRNA *ptr)
|
||||
{
|
||||
return rna_VertCustomData_data_path(ptr, "vertex_paint_masks", CD_PAINT_MASK);
|
||||
}
|
||||
|
@ -1023,9 +1022,9 @@ DEFINE_CUSTOMDATA_LAYER_COLLECTION(face_map, pdata, CD_FACEMAP)
|
|||
DEFINE_CUSTOMDATA_LAYER_COLLECTION_ACTIVEITEM(
|
||||
face_map, pdata, CD_FACEMAP, active, MeshFaceMapLayer)
|
||||
|
||||
static char *rna_MeshFaceMapLayer_path(PointerRNA *ptr)
|
||||
static char *rna_MeshFaceMapLayer_path(const PointerRNA *ptr)
|
||||
{
|
||||
CustomDataLayer *cdl = ptr->data;
|
||||
const CustomDataLayer *cdl = ptr->data;
|
||||
char name_esc[sizeof(cdl->name) * 2];
|
||||
BLI_str_escape(name_esc, cdl->name, sizeof(name_esc));
|
||||
return BLI_sprintfN("face_maps[\"%s\"]", name_esc);
|
||||
|
@ -1090,9 +1089,10 @@ static void rna_Mesh_face_map_remove(struct Mesh *me,
|
|||
/* End face maps */
|
||||
|
||||
/* poly.vertices - this is faked loop access for convenience */
|
||||
static int rna_MeshPoly_vertices_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
|
||||
static int rna_MeshPoly_vertices_get_length(const PointerRNA *ptr,
|
||||
int length[RNA_MAX_ARRAY_DIMENSION])
|
||||
{
|
||||
MPoly *mp = (MPoly *)ptr->data;
|
||||
const MPoly *mp = (MPoly *)ptr->data;
|
||||
/* NOTE: raw access uses dummy item, this _could_ crash,
|
||||
* watch out for this, mface uses it but it can't work here. */
|
||||
return (length[0] = mp->totloop);
|
||||
|
@ -1182,11 +1182,11 @@ static int rna_MeshLoop_index_get(PointerRNA *ptr)
|
|||
|
||||
/* path construction */
|
||||
|
||||
static char *rna_VertexGroupElement_path(PointerRNA *ptr)
|
||||
static char *rna_VertexGroupElement_path(const PointerRNA *ptr)
|
||||
{
|
||||
Mesh *me = rna_mesh(ptr); /* XXX not always! */
|
||||
MDeformWeight *dw = (MDeformWeight *)ptr->data;
|
||||
MDeformVert *dvert;
|
||||
const Mesh *me = rna_mesh(ptr); /* XXX not always! */
|
||||
const MDeformWeight *dw = (MDeformWeight *)ptr->data;
|
||||
const MDeformVert *dvert;
|
||||
int a, b;
|
||||
|
||||
for (a = 0, dvert = me->dvert; a < me->totvert; a++, dvert++) {
|
||||
|
@ -1200,37 +1200,37 @@ static char *rna_VertexGroupElement_path(PointerRNA *ptr)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static char *rna_MeshPolygon_path(PointerRNA *ptr)
|
||||
static char *rna_MeshPolygon_path(const PointerRNA *ptr)
|
||||
{
|
||||
return BLI_sprintfN("polygons[%d]", (int)((MPoly *)ptr->data - rna_mesh(ptr)->mpoly));
|
||||
}
|
||||
|
||||
static char *rna_MeshLoopTriangle_path(PointerRNA *ptr)
|
||||
static char *rna_MeshLoopTriangle_path(const PointerRNA *ptr)
|
||||
{
|
||||
return BLI_sprintfN("loop_triangles[%d]",
|
||||
(int)((MLoopTri *)ptr->data - rna_mesh(ptr)->runtime.looptris.array));
|
||||
}
|
||||
|
||||
static char *rna_MeshEdge_path(PointerRNA *ptr)
|
||||
static char *rna_MeshEdge_path(const PointerRNA *ptr)
|
||||
{
|
||||
return BLI_sprintfN("edges[%d]", (int)((MEdge *)ptr->data - rna_mesh(ptr)->medge));
|
||||
}
|
||||
|
||||
static char *rna_MeshLoop_path(PointerRNA *ptr)
|
||||
static char *rna_MeshLoop_path(const PointerRNA *ptr)
|
||||
{
|
||||
return BLI_sprintfN("loops[%d]", (int)((MLoop *)ptr->data - rna_mesh(ptr)->mloop));
|
||||
}
|
||||
|
||||
static char *rna_MeshVertex_path(PointerRNA *ptr)
|
||||
static char *rna_MeshVertex_path(const PointerRNA *ptr)
|
||||
{
|
||||
return BLI_sprintfN("vertices[%d]", (int)((MVert *)ptr->data - rna_mesh(ptr)->mvert));
|
||||
}
|
||||
|
||||
static char *rna_VertCustomData_data_path(PointerRNA *ptr, const char *collection, int type)
|
||||
static char *rna_VertCustomData_data_path(const PointerRNA *ptr, const char *collection, int type)
|
||||
{
|
||||
CustomDataLayer *cdl;
|
||||
Mesh *me = rna_mesh(ptr);
|
||||
CustomData *vdata = rna_mesh_vdata(ptr);
|
||||
const CustomDataLayer *cdl;
|
||||
const Mesh *me = rna_mesh(ptr);
|
||||
const CustomData *vdata = rna_mesh_vdata(ptr);
|
||||
int a, b, totvert = (me->edit_mesh) ? 0 : me->totvert;
|
||||
|
||||
for (cdl = vdata->layers, a = 0; a < vdata->totlayer; cdl++, a++) {
|
||||
|
@ -1247,11 +1247,11 @@ static char *rna_VertCustomData_data_path(PointerRNA *ptr, const char *collectio
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static char *rna_PolyCustomData_data_path(PointerRNA *ptr, const char *collection, int type)
|
||||
static char *rna_PolyCustomData_data_path(const PointerRNA *ptr, const char *collection, int type)
|
||||
{
|
||||
CustomDataLayer *cdl;
|
||||
Mesh *me = rna_mesh(ptr);
|
||||
CustomData *pdata = rna_mesh_pdata(ptr);
|
||||
const CustomDataLayer *cdl;
|
||||
const Mesh *me = rna_mesh(ptr);
|
||||
const CustomData *pdata = rna_mesh_pdata(ptr);
|
||||
int a, b, totpoly = (me->edit_mesh) ? 0 : me->totpoly;
|
||||
|
||||
for (cdl = pdata->layers, a = 0; a < pdata->totlayer; cdl++, a++) {
|
||||
|
@ -1268,11 +1268,11 @@ static char *rna_PolyCustomData_data_path(PointerRNA *ptr, const char *collectio
|
|||
return NULL;
|
||||
}
|
||||
|
||||
static char *rna_LoopCustomData_data_path(PointerRNA *ptr, const char *collection, int type)
|
||||
static char *rna_LoopCustomData_data_path(const PointerRNA *ptr, const char *collection, int type)
|
||||
{
|
||||
CustomDataLayer *cdl;
|
||||
Mesh *me = rna_mesh(ptr);
|
||||
CustomData *ldata = rna_mesh_ldata(ptr);
|
||||
const CustomDataLayer *cdl;
|
||||
const Mesh *me = rna_mesh(ptr);
|
||||
const CustomData *ldata = rna_mesh_ldata(ptr);
|
||||
int a, b, totloop = (me->edit_mesh) ? 0 : me->totloop;
|
||||
|
||||
for (cdl = ldata->layers, a = 0; a < ldata->totlayer; cdl++, a++) {
|
||||
|
@ -1315,58 +1315,58 @@ static int rna_Mesh_poly_normals_length(PointerRNA *ptr)
|
|||
return mesh->totpoly;
|
||||
}
|
||||
|
||||
static char *rna_MeshUVLoop_path(PointerRNA *ptr)
|
||||
static char *rna_MeshUVLoop_path(const PointerRNA *ptr)
|
||||
{
|
||||
return rna_LoopCustomData_data_path(ptr, "uv_layers", CD_MLOOPUV);
|
||||
}
|
||||
|
||||
static char *rna_MeshLoopColorLayer_path(PointerRNA *ptr)
|
||||
static char *rna_MeshLoopColorLayer_path(const PointerRNA *ptr)
|
||||
{
|
||||
CustomDataLayer *cdl = ptr->data;
|
||||
const CustomDataLayer *cdl = ptr->data;
|
||||
char name_esc[sizeof(cdl->name) * 2];
|
||||
BLI_str_escape(name_esc, cdl->name, sizeof(name_esc));
|
||||
return BLI_sprintfN("vertex_colors[\"%s\"]", name_esc);
|
||||
}
|
||||
|
||||
static char *rna_MeshColor_path(PointerRNA *ptr)
|
||||
static char *rna_MeshColor_path(const PointerRNA *ptr)
|
||||
{
|
||||
return rna_LoopCustomData_data_path(ptr, "vertex_colors", CD_PROP_BYTE_COLOR);
|
||||
}
|
||||
|
||||
static char *rna_MeshVertColorLayer_path(PointerRNA *ptr)
|
||||
static char *rna_MeshVertColorLayer_path(const PointerRNA *ptr)
|
||||
{
|
||||
CustomDataLayer *cdl = ptr->data;
|
||||
const CustomDataLayer *cdl = ptr->data;
|
||||
char name_esc[sizeof(cdl->name) * 2];
|
||||
BLI_str_escape(name_esc, cdl->name, sizeof(name_esc));
|
||||
return BLI_sprintfN("sculpt_vertex_colors[\"%s\"]", name_esc);
|
||||
}
|
||||
|
||||
static char *rna_MeshVertColor_path(PointerRNA *ptr)
|
||||
static char *rna_MeshVertColor_path(const PointerRNA *ptr)
|
||||
{
|
||||
return rna_VertCustomData_data_path(ptr, "sculpt_vertex_colors", CD_PROP_COLOR);
|
||||
}
|
||||
|
||||
/**** Float Property Layer API ****/
|
||||
static char *rna_MeshVertexFloatPropertyLayer_path(PointerRNA *ptr)
|
||||
static char *rna_MeshVertexFloatPropertyLayer_path(const PointerRNA *ptr)
|
||||
{
|
||||
CustomDataLayer *cdl = ptr->data;
|
||||
const CustomDataLayer *cdl = ptr->data;
|
||||
char name_esc[sizeof(cdl->name) * 2];
|
||||
BLI_str_escape(name_esc, cdl->name, sizeof(name_esc));
|
||||
return BLI_sprintfN("vertex_float_layers[\"%s\"]", name_esc);
|
||||
}
|
||||
static char *rna_MeshPolygonFloatPropertyLayer_path(PointerRNA *ptr)
|
||||
static char *rna_MeshPolygonFloatPropertyLayer_path(const PointerRNA *ptr)
|
||||
{
|
||||
CustomDataLayer *cdl = ptr->data;
|
||||
const CustomDataLayer *cdl = ptr->data;
|
||||
char name_esc[sizeof(cdl->name) * 2];
|
||||
BLI_str_escape(name_esc, cdl->name, sizeof(name_esc));
|
||||
return BLI_sprintfN("polygon_float_layers[\"%s\"]", name_esc);
|
||||
}
|
||||
|
||||
static char *rna_MeshVertexFloatProperty_path(PointerRNA *ptr)
|
||||
static char *rna_MeshVertexFloatProperty_path(const PointerRNA *ptr)
|
||||
{
|
||||
return rna_VertCustomData_data_path(ptr, "vertex_layers_float", CD_PROP_FLOAT);
|
||||
}
|
||||
static char *rna_MeshPolygonFloatProperty_path(PointerRNA *ptr)
|
||||
static char *rna_MeshPolygonFloatProperty_path(const PointerRNA *ptr)
|
||||
{
|
||||
return rna_PolyCustomData_data_path(ptr, "polygon_layers_float", CD_PROP_FLOAT);
|
||||
}
|
||||
|
@ -1398,26 +1398,26 @@ static int rna_MeshPolygonFloatPropertyLayer_data_length(PointerRNA *ptr)
|
|||
}
|
||||
|
||||
/**** Int Property Layer API ****/
|
||||
static char *rna_MeshVertexIntPropertyLayer_path(PointerRNA *ptr)
|
||||
static char *rna_MeshVertexIntPropertyLayer_path(const PointerRNA *ptr)
|
||||
{
|
||||
CustomDataLayer *cdl = ptr->data;
|
||||
const CustomDataLayer *cdl = ptr->data;
|
||||
char name_esc[sizeof(cdl->name) * 2];
|
||||
BLI_str_escape(name_esc, cdl->name, sizeof(name_esc));
|
||||
return BLI_sprintfN("vertex_int_layers[\"%s\"]", name_esc);
|
||||
}
|
||||
static char *rna_MeshPolygonIntPropertyLayer_path(PointerRNA *ptr)
|
||||
static char *rna_MeshPolygonIntPropertyLayer_path(const PointerRNA *ptr)
|
||||
{
|
||||
CustomDataLayer *cdl = ptr->data;
|
||||
const CustomDataLayer *cdl = ptr->data;
|
||||
char name_esc[sizeof(cdl->name) * 2];
|
||||
BLI_str_escape(name_esc, cdl->name, sizeof(name_esc));
|
||||
return BLI_sprintfN("polygon_int_layers[\"%s\"]", name_esc);
|
||||
}
|
||||
|
||||
static char *rna_MeshVertexIntProperty_path(PointerRNA *ptr)
|
||||
static char *rna_MeshVertexIntProperty_path(const PointerRNA *ptr)
|
||||
{
|
||||
return rna_VertCustomData_data_path(ptr, "vertex_layers_int", CD_PROP_INT32);
|
||||
}
|
||||
static char *rna_MeshPolygonIntProperty_path(PointerRNA *ptr)
|
||||
static char *rna_MeshPolygonIntProperty_path(const PointerRNA *ptr)
|
||||
{
|
||||
return rna_PolyCustomData_data_path(ptr, "polygon_layers_int", CD_PROP_INT32);
|
||||
}
|
||||
|
@ -1449,26 +1449,26 @@ static int rna_MeshPolygonIntPropertyLayer_data_length(PointerRNA *ptr)
|
|||
}
|
||||
|
||||
/**** String Property Layer API ****/
|
||||
static char *rna_MeshVertexStringPropertyLayer_path(PointerRNA *ptr)
|
||||
static char *rna_MeshVertexStringPropertyLayer_path(const PointerRNA *ptr)
|
||||
{
|
||||
CustomDataLayer *cdl = ptr->data;
|
||||
const CustomDataLayer *cdl = ptr->data;
|
||||
char name_esc[sizeof(cdl->name) * 2];
|
||||
BLI_str_escape(name_esc, cdl->name, sizeof(name_esc));
|
||||
return BLI_sprintfN("vertex_string_layers[\"%s\"]", name_esc);
|
||||
}
|
||||
static char *rna_MeshPolygonStringPropertyLayer_path(PointerRNA *ptr)
|
||||
static char *rna_MeshPolygonStringPropertyLayer_path(const PointerRNA *ptr)
|
||||
{
|
||||
CustomDataLayer *cdl = ptr->data;
|
||||
const CustomDataLayer *cdl = ptr->data;
|
||||
char name_esc[sizeof(cdl->name) * 2];
|
||||
BLI_str_escape(name_esc, cdl->name, sizeof(name_esc));
|
||||
return BLI_sprintfN("polygon_string_layers[\"%s\"]", name_esc);
|
||||
}
|
||||
|
||||
static char *rna_MeshVertexStringProperty_path(PointerRNA *ptr)
|
||||
static char *rna_MeshVertexStringProperty_path(const PointerRNA *ptr)
|
||||
{
|
||||
return rna_VertCustomData_data_path(ptr, "vertex_layers_string", CD_PROP_STRING);
|
||||
}
|
||||
static char *rna_MeshPolygonStringProperty_path(PointerRNA *ptr)
|
||||
static char *rna_MeshPolygonStringProperty_path(const PointerRNA *ptr)
|
||||
{
|
||||
return rna_PolyCustomData_data_path(ptr, "polygon_layers_string", CD_PROP_STRING);
|
||||
}
|
||||
|
@ -1519,7 +1519,7 @@ void rna_MeshStringProperty_s_set(PointerRNA *ptr, const char *value)
|
|||
BLI_strncpy(ms->s, value, sizeof(ms->s));
|
||||
}
|
||||
|
||||
static char *rna_MeshFaceMap_path(PointerRNA *ptr)
|
||||
static char *rna_MeshFaceMap_path(const PointerRNA *ptr)
|
||||
{
|
||||
return rna_PolyCustomData_data_path(ptr, "face_maps", CD_FACEMAP);
|
||||
}
|
||||
|
|
|
@ -156,10 +156,10 @@ static bool rna_Meta_is_editmode_get(PointerRNA *ptr)
|
|||
return (mb->editelems != NULL);
|
||||
}
|
||||
|
||||
static char *rna_MetaElement_path(PointerRNA *ptr)
|
||||
static char *rna_MetaElement_path(const PointerRNA *ptr)
|
||||
{
|
||||
MetaBall *mb = (MetaBall *)ptr->owner_id;
|
||||
MetaElem *ml = ptr->data;
|
||||
const MetaBall *mb = (MetaBall *)ptr->owner_id;
|
||||
const MetaElem *ml = ptr->data;
|
||||
int index = -1;
|
||||
|
||||
if (mb->editelems) {
|
||||
|
|
|
@ -722,9 +722,9 @@ static void rna_Modifier_name_set(PointerRNA *ptr, const char *value)
|
|||
BKE_animdata_fix_paths_rename_all(NULL, "modifiers", oldname, md->name);
|
||||
}
|
||||
|
||||
static char *rna_Modifier_path(PointerRNA *ptr)
|
||||
static char *rna_Modifier_path(const PointerRNA *ptr)
|
||||
{
|
||||
ModifierData *md = ptr->data;
|
||||
const ModifierData *md = ptr->data;
|
||||
char name_esc[sizeof(md->name) * 2];
|
||||
|
||||
BLI_str_escape(name_esc, md->name, sizeof(name_esc));
|
||||
|
@ -947,10 +947,10 @@ static void rna_HookModifier_subtarget_set(PointerRNA *ptr, const char *value)
|
|||
BKE_object_modifier_hook_reset(owner, hmd);
|
||||
}
|
||||
|
||||
static int rna_HookModifier_vertex_indices_get_length(PointerRNA *ptr,
|
||||
static int rna_HookModifier_vertex_indices_get_length(const PointerRNA *ptr,
|
||||
int length[RNA_MAX_ARRAY_DIMENSION])
|
||||
{
|
||||
HookModifierData *hmd = ptr->data;
|
||||
const HookModifierData *hmd = ptr->data;
|
||||
int indexar_num = hmd->indexar ? hmd->indexar_num : 0;
|
||||
return (length[0] = indexar_num);
|
||||
}
|
||||
|
|
|
@ -57,7 +57,7 @@ static void rna_NlaStrip_name_set(PointerRNA *ptr, const char *value)
|
|||
}
|
||||
}
|
||||
|
||||
static char *rna_NlaStrip_path(PointerRNA *ptr)
|
||||
static char *rna_NlaStrip_path(const PointerRNA *ptr)
|
||||
{
|
||||
NlaStrip *strip = (NlaStrip *)ptr->data;
|
||||
AnimData *adt = BKE_animdata_from_id(ptr->owner_id);
|
||||
|
|
|
@ -1598,16 +1598,16 @@ static StructRNA *rna_Node_refine(struct PointerRNA *ptr)
|
|||
}
|
||||
}
|
||||
|
||||
static char *rna_Node_path(PointerRNA *ptr)
|
||||
static char *rna_Node_path(const PointerRNA *ptr)
|
||||
{
|
||||
bNode *node = (bNode *)ptr->data;
|
||||
const bNode *node = (bNode *)ptr->data;
|
||||
char name_esc[sizeof(node->name) * 2];
|
||||
|
||||
BLI_str_escape(name_esc, node->name, sizeof(name_esc));
|
||||
return BLI_sprintfN("nodes[\"%s\"]", name_esc);
|
||||
}
|
||||
|
||||
char *rna_Node_ImageUser_path(PointerRNA *ptr)
|
||||
char *rna_Node_ImageUser_path(const PointerRNA *ptr)
|
||||
{
|
||||
bNodeTree *ntree = (bNodeTree *)ptr->owner_id;
|
||||
bNode *node;
|
||||
|
@ -2756,7 +2756,7 @@ static StructRNA *rna_NodeSocket_refine(PointerRNA *ptr)
|
|||
}
|
||||
}
|
||||
|
||||
static char *rna_NodeSocket_path(PointerRNA *ptr)
|
||||
static char *rna_NodeSocket_path(const PointerRNA *ptr)
|
||||
{
|
||||
bNodeTree *ntree = (bNodeTree *)ptr->owner_id;
|
||||
bNodeSocket *sock = (bNodeSocket *)ptr->data;
|
||||
|
@ -3070,10 +3070,10 @@ static StructRNA *rna_NodeSocketInterface_refine(PointerRNA *ptr)
|
|||
}
|
||||
}
|
||||
|
||||
static char *rna_NodeSocketInterface_path(PointerRNA *ptr)
|
||||
static char *rna_NodeSocketInterface_path(const PointerRNA *ptr)
|
||||
{
|
||||
bNodeTree *ntree = (bNodeTree *)ptr->owner_id;
|
||||
bNodeSocket *sock = (bNodeSocket *)ptr->data;
|
||||
const bNodeTree *ntree = (bNodeTree *)ptr->owner_id;
|
||||
const bNodeSocket *sock = (bNodeSocket *)ptr->data;
|
||||
int socketindex;
|
||||
|
||||
socketindex = BLI_findindex(&ntree->inputs, sock);
|
||||
|
|
|
@ -1320,12 +1320,17 @@ static int rna_Object_rotation_4d_editable(PointerRNA *ptr, int index)
|
|||
return PROP_EDITABLE;
|
||||
}
|
||||
|
||||
static int rna_MaterialSlot_index(PointerRNA *ptr)
|
||||
static int rna_MaterialSlot_index(const PointerRNA *ptr)
|
||||
{
|
||||
/* There is an offset, so that `ptr->data` is not null and unique across IDs. */
|
||||
return (uintptr_t)ptr->data - (uintptr_t)ptr->owner_id;
|
||||
}
|
||||
|
||||
static int rna_MaterialSlot_index_get(PointerRNA *ptr)
|
||||
{
|
||||
return rna_MaterialSlot_index(ptr);
|
||||
}
|
||||
|
||||
static int rna_MaterialSlot_material_editable(PointerRNA *ptr, const char **UNUSED(r_info))
|
||||
{
|
||||
Object *ob = (Object *)ptr->owner_id;
|
||||
|
@ -1451,7 +1456,7 @@ static void rna_MaterialSlot_update(Main *bmain, Scene *scene, PointerRNA *ptr)
|
|||
DEG_relations_tag_update(bmain);
|
||||
}
|
||||
|
||||
static char *rna_MaterialSlot_path(PointerRNA *ptr)
|
||||
static char *rna_MaterialSlot_path(const PointerRNA *ptr)
|
||||
{
|
||||
int index = rna_MaterialSlot_index(ptr);
|
||||
return BLI_sprintfN("material_slots[%d]", index);
|
||||
|
@ -1504,7 +1509,7 @@ static PointerRNA rna_Object_display_get(PointerRNA *ptr)
|
|||
return rna_pointer_inherit_refine(ptr, &RNA_ObjectDisplay, ptr->data);
|
||||
}
|
||||
|
||||
static char *rna_ObjectDisplay_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_ObjectDisplay_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("display");
|
||||
}
|
||||
|
@ -2484,7 +2489,7 @@ static void rna_def_material_slot(BlenderRNA *brna)
|
|||
|
||||
prop = RNA_def_property(srna, "slot_index", PROP_INT, PROP_NONE);
|
||||
RNA_def_property_clear_flag(prop, PROP_EDITABLE);
|
||||
RNA_def_property_int_funcs(prop, "rna_MaterialSlot_index", NULL, NULL);
|
||||
RNA_def_property_int_funcs(prop, "rna_MaterialSlot_index_get", NULL, NULL);
|
||||
|
||||
prop = RNA_def_property(srna, "name", PROP_STRING, PROP_NONE);
|
||||
RNA_def_property_string_funcs(
|
||||
|
|
|
@ -130,7 +130,7 @@ static bool rna_Cache_get_valid_owner_ID(PointerRNA *ptr, Object **ob, Scene **s
|
|||
return (*ob != NULL || *scene != NULL);
|
||||
}
|
||||
|
||||
static char *rna_PointCache_path(PointerRNA *ptr)
|
||||
static char *rna_PointCache_path(const PointerRNA *ptr)
|
||||
{
|
||||
ModifierData *md;
|
||||
Object *ob = (Object *)ptr->owner_id;
|
||||
|
@ -443,7 +443,7 @@ int rna_Cache_info_length(PointerRNA *ptr)
|
|||
return (int)strlen(cache->info);
|
||||
}
|
||||
|
||||
static char *rna_CollisionSettings_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_CollisionSettings_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
/* both methods work ok, but return the shorter path */
|
||||
# if 0
|
||||
|
@ -619,17 +619,17 @@ static void rna_SoftBodySettings_spring_vgroup_set(PointerRNA *ptr, const char *
|
|||
rna_object_vgroup_name_set(ptr, value, sb->namedVG_Spring_K, sizeof(sb->namedVG_Spring_K));
|
||||
}
|
||||
|
||||
static char *rna_SoftBodySettings_path(PointerRNA *ptr)
|
||||
static char *rna_SoftBodySettings_path(const PointerRNA *ptr)
|
||||
{
|
||||
Object *ob = (Object *)ptr->owner_id;
|
||||
ModifierData *md = (ModifierData *)BKE_modifiers_findby_type(ob, eModifierType_Softbody);
|
||||
const Object *ob = (Object *)ptr->owner_id;
|
||||
const ModifierData *md = BKE_modifiers_findby_type(ob, eModifierType_Softbody);
|
||||
char name_esc[sizeof(md->name) * 2];
|
||||
|
||||
BLI_str_escape(name_esc, md->name, sizeof(name_esc));
|
||||
return BLI_sprintfN("modifiers[\"%s\"].settings", name_esc);
|
||||
}
|
||||
|
||||
static int particle_id_check(PointerRNA *ptr)
|
||||
static int particle_id_check(const PointerRNA *ptr)
|
||||
{
|
||||
ID *id = ptr->owner_id;
|
||||
|
||||
|
@ -731,7 +731,7 @@ static void rna_FieldSettings_dependency_update(Main *bmain, Scene *scene, Point
|
|||
}
|
||||
}
|
||||
|
||||
static char *rna_FieldSettings_path(PointerRNA *ptr)
|
||||
static char *rna_FieldSettings_path(const PointerRNA *ptr)
|
||||
{
|
||||
PartDeflect *pd = (PartDeflect *)ptr->data;
|
||||
|
||||
|
@ -787,7 +787,7 @@ static void rna_EffectorWeight_dependency_update(Main *bmain,
|
|||
WM_main_add_notifier(NC_OBJECT | ND_DRAW, NULL);
|
||||
}
|
||||
|
||||
static char *rna_EffectorWeight_path(PointerRNA *ptr)
|
||||
static char *rna_EffectorWeight_path(const PointerRNA *ptr)
|
||||
{
|
||||
EffectorWeights *ew = (EffectorWeights *)ptr->data;
|
||||
/* Check through all possible places the settings can be to find the right one */
|
||||
|
|
|
@ -1208,19 +1208,19 @@ static int rna_ParticleTarget_name_length(PointerRNA *ptr)
|
|||
return strlen(tstr);
|
||||
}
|
||||
|
||||
static int particle_id_check(PointerRNA *ptr)
|
||||
static int particle_id_check(const PointerRNA *ptr)
|
||||
{
|
||||
ID *id = ptr->owner_id;
|
||||
const ID *id = ptr->owner_id;
|
||||
|
||||
return (GS(id->name) == ID_PA);
|
||||
}
|
||||
|
||||
static char *rna_SPHFluidSettings_path(PointerRNA *ptr)
|
||||
static char *rna_SPHFluidSettings_path(const PointerRNA *ptr)
|
||||
{
|
||||
SPHFluidSettings *fluid = (SPHFluidSettings *)ptr->data;
|
||||
const SPHFluidSettings *fluid = (SPHFluidSettings *)ptr->data;
|
||||
|
||||
if (particle_id_check(ptr)) {
|
||||
ParticleSettings *part = (ParticleSettings *)ptr->owner_id;
|
||||
const ParticleSettings *part = (ParticleSettings *)ptr->owner_id;
|
||||
|
||||
if (part->fluid == fluid) {
|
||||
return BLI_strdup("fluid");
|
||||
|
@ -1463,9 +1463,9 @@ static void psys_vg_name_set__internal(PointerRNA *ptr, const char *value, int i
|
|||
}
|
||||
}
|
||||
|
||||
static char *rna_ParticleSystem_path(PointerRNA *ptr)
|
||||
static char *rna_ParticleSystem_path(const PointerRNA *ptr)
|
||||
{
|
||||
ParticleSystem *psys = (ParticleSystem *)ptr->data;
|
||||
const ParticleSystem *psys = (ParticleSystem *)ptr->data;
|
||||
char name_esc[sizeof(psys->name) * 2];
|
||||
|
||||
BLI_str_escape(name_esc, psys->name, sizeof(name_esc));
|
||||
|
|
|
@ -27,18 +27,23 @@
|
|||
# include "WM_api.h"
|
||||
# include "WM_types.h"
|
||||
|
||||
static PointCloud *rna_pointcloud(PointerRNA *ptr)
|
||||
static PointCloud *rna_pointcloud(const PointerRNA *ptr)
|
||||
{
|
||||
return (PointCloud *)ptr->owner_id;
|
||||
}
|
||||
|
||||
static int rna_Point_index_get(PointerRNA *ptr)
|
||||
static int rna_Point_index_get_const(const PointerRNA *ptr)
|
||||
{
|
||||
const PointCloud *pointcloud = rna_pointcloud(ptr);
|
||||
const float(*co)[3] = ptr->data;
|
||||
return (int)(co - pointcloud->co);
|
||||
}
|
||||
|
||||
static int rna_Point_index_get(PointerRNA *ptr)
|
||||
{
|
||||
return rna_Point_index_get_const(ptr);
|
||||
}
|
||||
|
||||
static void rna_Point_location_get(PointerRNA *ptr, float value[3])
|
||||
{
|
||||
copy_v3_v3(value, (const float *)ptr->data);
|
||||
|
@ -69,9 +74,9 @@ static void rna_Point_radius_set(PointerRNA *ptr, float value)
|
|||
pointcloud->radius[co - pointcloud->co] = value;
|
||||
}
|
||||
|
||||
static char *rna_Point_path(PointerRNA *ptr)
|
||||
static char *rna_Point_path(const PointerRNA *ptr)
|
||||
{
|
||||
return BLI_sprintfN("points[%d]", rna_Point_index_get(ptr));
|
||||
return BLI_sprintfN("points[%d]", rna_Point_index_get_const(ptr));
|
||||
}
|
||||
|
||||
static void rna_PointCloud_update_data(struct Main *UNUSED(bmain),
|
||||
|
|
|
@ -108,14 +108,14 @@ static void rna_Pose_IK_update(Main *UNUSED(bmain), Scene *UNUSED(scene), Pointe
|
|||
BIK_clear_data(ob->pose);
|
||||
}
|
||||
|
||||
static char *rna_Pose_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_Pose_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("pose");
|
||||
}
|
||||
|
||||
static char *rna_PoseBone_path(PointerRNA *ptr)
|
||||
static char *rna_PoseBone_path(const PointerRNA *ptr)
|
||||
{
|
||||
bPoseChannel *pchan = ptr->data;
|
||||
const bPoseChannel *pchan = ptr->data;
|
||||
char name_esc[sizeof(pchan->name) * 2];
|
||||
|
||||
BLI_str_escape(name_esc, pchan->name, sizeof(name_esc));
|
||||
|
|
|
@ -483,9 +483,10 @@ static void rna_RenderLayer_passes_begin(CollectionPropertyIterator *iter, Point
|
|||
rna_iterator_listbase_begin(iter, &rl->passes, NULL);
|
||||
}
|
||||
|
||||
static int rna_RenderPass_rect_get_length(PointerRNA *ptr, int length[RNA_MAX_ARRAY_DIMENSION])
|
||||
static int rna_RenderPass_rect_get_length(const PointerRNA *ptr,
|
||||
int length[RNA_MAX_ARRAY_DIMENSION])
|
||||
{
|
||||
RenderPass *rpass = (RenderPass *)ptr->data;
|
||||
const RenderPass *rpass = (RenderPass *)ptr->data;
|
||||
|
||||
length[0] = rpass->rectx * rpass->recty;
|
||||
length[1] = rpass->channels;
|
||||
|
|
|
@ -148,7 +148,7 @@ static void rna_RigidBodyWorld_reset(Main *UNUSED(bmain), Scene *UNUSED(scene),
|
|||
BKE_rigidbody_cache_reset(rbw);
|
||||
}
|
||||
|
||||
static char *rna_RigidBodyWorld_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_RigidBodyWorld_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("rigidbody_world");
|
||||
}
|
||||
|
@ -240,7 +240,7 @@ static void rna_RigidBodyOb_mesh_source_update(Main *bmain, Scene *scene, Pointe
|
|||
WM_main_add_notifier(NC_OBJECT | ND_DRAW, ob);
|
||||
}
|
||||
|
||||
static char *rna_RigidBodyOb_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_RigidBodyOb_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
/* NOTE: this hardcoded path should work as long as only Objects have this */
|
||||
return BLI_strdup("rigid_body");
|
||||
|
@ -432,7 +432,7 @@ static void rna_RigidBodyOb_angular_damping_set(PointerRNA *ptr, float value)
|
|||
# endif
|
||||
}
|
||||
|
||||
static char *rna_RigidBodyCon_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_RigidBodyCon_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
/* NOTE: this hardcoded path should work as long as only Objects have this */
|
||||
return BLI_strdup("rigid_body_constraint");
|
||||
|
|
|
@ -721,7 +721,7 @@ static int rna_IntProperty_default_get(PointerRNA *ptr)
|
|||
return ((IntPropertyRNA *)prop)->defaultvalue;
|
||||
}
|
||||
/* int/float/bool */
|
||||
static int rna_NumberProperty_default_array_get_length(PointerRNA *ptr,
|
||||
static int rna_NumberProperty_default_array_get_length(const PointerRNA *ptr,
|
||||
int length[RNA_MAX_ARRAY_DIMENSION])
|
||||
{
|
||||
PropertyRNA *prop = (PropertyRNA *)ptr->data;
|
||||
|
|
|
@ -1100,12 +1100,12 @@ static void rna_Scene_all_keyingsets_next(CollectionPropertyIterator *iter)
|
|||
iter->valid = (internal->link != NULL);
|
||||
}
|
||||
|
||||
static char *rna_SceneEEVEE_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_SceneEEVEE_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("eevee");
|
||||
}
|
||||
|
||||
static char *rna_SceneGpencil_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_SceneGpencil_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("grease_pencil_settings");
|
||||
}
|
||||
|
@ -1129,17 +1129,17 @@ static void rna_RenderSettings_stereoViews_begin(CollectionPropertyIterator *ite
|
|||
rna_iterator_listbase_begin(iter, &rd->views, rna_RenderSettings_stereoViews_skip);
|
||||
}
|
||||
|
||||
static char *rna_RenderSettings_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_RenderSettings_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("render");
|
||||
}
|
||||
|
||||
static char *rna_BakeSettings_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_BakeSettings_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("render.bake");
|
||||
}
|
||||
|
||||
static char *rna_ImageFormatSettings_path(PointerRNA *ptr)
|
||||
static char *rna_ImageFormatSettings_path(const PointerRNA *ptr)
|
||||
{
|
||||
ImageFormatData *imf = (ImageFormatData *)ptr->data;
|
||||
ID *id = ptr->owner_id;
|
||||
|
@ -1787,10 +1787,11 @@ void rna_ViewLayer_pass_update(Main *bmain, Scene *activescene, PointerRNA *ptr)
|
|||
rna_Scene_glsl_update(bmain, activescene, ptr);
|
||||
}
|
||||
|
||||
static char *rna_ViewLayerEEVEE_path(PointerRNA *ptr)
|
||||
static char *rna_ViewLayerEEVEE_path(const PointerRNA *ptr)
|
||||
{
|
||||
ViewLayerEEVEE *view_layer_eevee = (ViewLayerEEVEE *)ptr->data;
|
||||
ViewLayer *view_layer = (ViewLayer *)((uint8_t *)view_layer_eevee - offsetof(ViewLayer, eevee));
|
||||
const ViewLayerEEVEE *view_layer_eevee = (ViewLayerEEVEE *)ptr->data;
|
||||
const ViewLayer *view_layer = (ViewLayer *)((uint8_t *)view_layer_eevee -
|
||||
offsetof(ViewLayer, eevee));
|
||||
char rna_path[sizeof(view_layer->name) * 3];
|
||||
|
||||
const size_t view_layer_path_len = rna_ViewLayer_path_buffer_get(
|
||||
|
@ -1801,9 +1802,9 @@ static char *rna_ViewLayerEEVEE_path(PointerRNA *ptr)
|
|||
return BLI_strdup(rna_path);
|
||||
}
|
||||
|
||||
static char *rna_SceneRenderView_path(PointerRNA *ptr)
|
||||
static char *rna_SceneRenderView_path(const PointerRNA *ptr)
|
||||
{
|
||||
SceneRenderView *srv = (SceneRenderView *)ptr->data;
|
||||
const SceneRenderView *srv = (SceneRenderView *)ptr->data;
|
||||
char srv_name_esc[sizeof(srv->name) * 2];
|
||||
BLI_str_escape(srv_name_esc, srv->name, sizeof(srv_name_esc));
|
||||
return BLI_sprintfN("render.views[\"%s\"]", srv_name_esc);
|
||||
|
@ -2071,10 +2072,10 @@ static void rna_View3DCursor_matrix_set(PointerRNA *ptr, const float *values)
|
|||
BKE_scene_cursor_from_mat4(cursor, unit_mat, false);
|
||||
}
|
||||
|
||||
static char *rna_TransformOrientationSlot_path(PointerRNA *ptr)
|
||||
static char *rna_TransformOrientationSlot_path(const PointerRNA *ptr)
|
||||
{
|
||||
Scene *scene = (Scene *)ptr->owner_id;
|
||||
TransformOrientationSlot *orientation_slot = ptr->data;
|
||||
const Scene *scene = (Scene *)ptr->owner_id;
|
||||
const TransformOrientationSlot *orientation_slot = ptr->data;
|
||||
|
||||
if (!ELEM(NULL, scene, orientation_slot)) {
|
||||
for (int i = 0; i < ARRAY_SIZE(scene->orientation_slots); i++) {
|
||||
|
@ -2089,7 +2090,7 @@ static char *rna_TransformOrientationSlot_path(PointerRNA *ptr)
|
|||
return BLI_strdup("transform_orientation_slots[0]");
|
||||
}
|
||||
|
||||
static char *rna_View3DCursor_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_View3DCursor_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("cursor");
|
||||
}
|
||||
|
@ -2188,17 +2189,17 @@ static void rna_UnifiedPaintSettings_radius_update(bContext *C, PointerRNA *ptr)
|
|||
rna_UnifiedPaintSettings_update(C, ptr);
|
||||
}
|
||||
|
||||
static char *rna_UnifiedPaintSettings_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_UnifiedPaintSettings_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("tool_settings.unified_paint_settings");
|
||||
}
|
||||
|
||||
static char *rna_CurvePaintSettings_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_CurvePaintSettings_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("tool_settings.curve_paint_settings");
|
||||
}
|
||||
|
||||
static char *rna_SequencerToolSettings_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_SequencerToolSettings_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("tool_settings.sequencer_tool_settings");
|
||||
}
|
||||
|
@ -2222,7 +2223,7 @@ static void rna_EditMesh_update(bContext *C, PointerRNA *UNUSED(ptr))
|
|||
}
|
||||
}
|
||||
|
||||
static char *rna_MeshStatVis_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_MeshStatVis_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("tool_settings.statvis");
|
||||
}
|
||||
|
@ -2260,7 +2261,7 @@ static void rna_SceneSequencer_update(Main *UNUSED(bmain), Scene *UNUSED(scene),
|
|||
SEQ_cache_cleanup((Scene *)ptr->owner_id);
|
||||
}
|
||||
|
||||
static char *rna_ToolSettings_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_ToolSettings_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("tool_settings");
|
||||
}
|
||||
|
@ -2701,12 +2702,12 @@ static void rna_UnitSettings_system_update(Main *UNUSED(bmain),
|
|||
}
|
||||
}
|
||||
|
||||
static char *rna_UnitSettings_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_UnitSettings_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("unit_settings");
|
||||
}
|
||||
|
||||
static char *rna_FFmpegSettings_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_FFmpegSettings_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("render.ffmpeg");
|
||||
}
|
||||
|
|
|
@ -259,7 +259,7 @@ static bool rna_ParticleEdit_hair_get(PointerRNA *ptr)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static char *rna_ParticleEdit_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_ParticleEdit_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("tool_settings.particle_edit");
|
||||
}
|
||||
|
@ -403,15 +403,15 @@ static void rna_Sculpt_ShowMask_update(bContext *C, PointerRNA *UNUSED(ptr))
|
|||
WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, object);
|
||||
}
|
||||
|
||||
static char *rna_Sculpt_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_Sculpt_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("tool_settings.sculpt");
|
||||
}
|
||||
|
||||
static char *rna_VertexPaint_path(PointerRNA *ptr)
|
||||
static char *rna_VertexPaint_path(const PointerRNA *ptr)
|
||||
{
|
||||
Scene *scene = (Scene *)ptr->owner_id;
|
||||
ToolSettings *ts = scene->toolsettings;
|
||||
const Scene *scene = (Scene *)ptr->owner_id;
|
||||
const ToolSettings *ts = scene->toolsettings;
|
||||
if (ptr->data == ts->vpaint) {
|
||||
return BLI_strdup("tool_settings.vertex_paint");
|
||||
}
|
||||
|
@ -420,47 +420,47 @@ static char *rna_VertexPaint_path(PointerRNA *ptr)
|
|||
}
|
||||
}
|
||||
|
||||
static char *rna_ImagePaintSettings_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_ImagePaintSettings_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("tool_settings.image_paint");
|
||||
}
|
||||
|
||||
static char *rna_PaintModeSettings_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_PaintModeSettings_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("tool_settings.paint_mode");
|
||||
}
|
||||
|
||||
static char *rna_UvSculpt_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_UvSculpt_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("tool_settings.uv_sculpt");
|
||||
}
|
||||
|
||||
static char *rna_CurvesSculpt_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_CurvesSculpt_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("tool_settings.curves_sculpt");
|
||||
}
|
||||
|
||||
static char *rna_GpPaint_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_GpPaint_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("tool_settings.gpencil_paint");
|
||||
}
|
||||
|
||||
static char *rna_GpVertexPaint_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_GpVertexPaint_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("tool_settings.gpencil_vertex_paint");
|
||||
}
|
||||
|
||||
static char *rna_GpSculptPaint_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_GpSculptPaint_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("tool_settings.gpencil_sculpt_paint");
|
||||
}
|
||||
|
||||
static char *rna_GpWeightPaint_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_GpWeightPaint_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("tool_settings.gpencil_weight_paint");
|
||||
}
|
||||
|
||||
static char *rna_ParticleBrush_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_ParticleBrush_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("tool_settings.particle_edit.brush");
|
||||
}
|
||||
|
@ -578,12 +578,12 @@ static bool rna_ImaPaint_detect_data(ImagePaintSettings *imapaint)
|
|||
return imapaint->missing_data == 0;
|
||||
}
|
||||
|
||||
static char *rna_GPencilSculptSettings_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_GPencilSculptSettings_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("tool_settings.gpencil_sculpt");
|
||||
}
|
||||
|
||||
static char *rna_GPencilSculptGuide_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_GPencilSculptGuide_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("tool_settings.gpencil_sculpt.guide");
|
||||
}
|
||||
|
|
|
@ -504,7 +504,7 @@ static Sequence *sequence_get_by_transform(Editing *ed, StripTransform *transfor
|
|||
return data.seq;
|
||||
}
|
||||
|
||||
static char *rna_SequenceTransform_path(PointerRNA *ptr)
|
||||
static char *rna_SequenceTransform_path(const PointerRNA *ptr)
|
||||
{
|
||||
Scene *scene = (Scene *)ptr->owner_id;
|
||||
Editing *ed = SEQ_editing_get(scene);
|
||||
|
@ -556,7 +556,7 @@ static Sequence *sequence_get_by_crop(Editing *ed, StripCrop *crop)
|
|||
return data.seq;
|
||||
}
|
||||
|
||||
static char *rna_SequenceCrop_path(PointerRNA *ptr)
|
||||
static char *rna_SequenceCrop_path(const PointerRNA *ptr)
|
||||
{
|
||||
Scene *scene = (Scene *)ptr->owner_id;
|
||||
Editing *ed = SEQ_editing_get(scene);
|
||||
|
@ -700,9 +700,9 @@ static StructRNA *rna_Sequence_refine(struct PointerRNA *ptr)
|
|||
}
|
||||
}
|
||||
|
||||
static char *rna_Sequence_path(PointerRNA *ptr)
|
||||
static char *rna_Sequence_path(const PointerRNA *ptr)
|
||||
{
|
||||
Sequence *seq = (Sequence *)ptr->data;
|
||||
const Sequence *seq = (Sequence *)ptr->data;
|
||||
|
||||
/* sequencer data comes from scene...
|
||||
* TODO: would be nice to make SequenceEditor data a data-block of its own (for shorter paths)
|
||||
|
@ -1034,7 +1034,7 @@ static Sequence *sequence_get_by_colorbalance(Editing *ed,
|
|||
return data.seq;
|
||||
}
|
||||
|
||||
static char *rna_SequenceColorBalance_path(PointerRNA *ptr)
|
||||
static char *rna_SequenceColorBalance_path(const PointerRNA *ptr)
|
||||
{
|
||||
Scene *scene = (Scene *)ptr->owner_id;
|
||||
SequenceModifierData *smd;
|
||||
|
@ -1178,7 +1178,7 @@ static StructRNA *rna_SequenceModifier_refine(struct PointerRNA *ptr)
|
|||
}
|
||||
}
|
||||
|
||||
static char *rna_SequenceModifier_path(PointerRNA *ptr)
|
||||
static char *rna_SequenceModifier_path(const PointerRNA *ptr)
|
||||
{
|
||||
Scene *scene = (Scene *)ptr->owner_id;
|
||||
Editing *ed = SEQ_editing_get(scene);
|
||||
|
@ -1396,7 +1396,7 @@ static void rna_SequenceTimelineChannel_name_set(PointerRNA *ptr, const char *va
|
|||
sizeof(channel->name));
|
||||
}
|
||||
|
||||
static char *rna_SeqTimelineChannel_path(PointerRNA *ptr)
|
||||
static char *rna_SeqTimelineChannel_path(const PointerRNA *ptr)
|
||||
{
|
||||
Scene *scene = (Scene *)ptr->owner_id;
|
||||
Editing *ed = SEQ_editing_get(scene);
|
||||
|
|
|
@ -142,9 +142,9 @@ static void rna_ShaderFx_name_set(PointerRNA *ptr, const char *value)
|
|||
BKE_animdata_fix_paths_rename_all(NULL, "shader_effects", oldname, gmd->name);
|
||||
}
|
||||
|
||||
static char *rna_ShaderFx_path(PointerRNA *ptr)
|
||||
static char *rna_ShaderFx_path(const PointerRNA *ptr)
|
||||
{
|
||||
ShaderFxData *gmd = ptr->data;
|
||||
const ShaderFxData *gmd = ptr->data;
|
||||
char name_esc[sizeof(gmd->name) * 2];
|
||||
|
||||
BLI_str_escape(name_esc, gmd->name, sizeof(name_esc));
|
||||
|
|
|
@ -1565,7 +1565,7 @@ static int rna_SpaceView3D_icon_from_show_object_viewport_get(PointerRNA *ptr)
|
|||
&v3d->object_type_exclude_select);
|
||||
}
|
||||
|
||||
static char *rna_View3DShading_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_View3DShading_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("shading");
|
||||
}
|
||||
|
@ -1575,7 +1575,7 @@ static PointerRNA rna_SpaceView3D_overlay_get(PointerRNA *ptr)
|
|||
return rna_pointer_inherit_refine(ptr, &RNA_View3DOverlay, ptr->data);
|
||||
}
|
||||
|
||||
static char *rna_View3DOverlay_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_View3DOverlay_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("overlay");
|
||||
}
|
||||
|
@ -1587,12 +1587,12 @@ static PointerRNA rna_SpaceImage_overlay_get(PointerRNA *ptr)
|
|||
return rna_pointer_inherit_refine(ptr, &RNA_SpaceImageOverlay, ptr->data);
|
||||
}
|
||||
|
||||
static char *rna_SpaceImageOverlay_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_SpaceImageOverlay_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("overlay");
|
||||
}
|
||||
|
||||
static char *rna_SpaceUVEditor_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_SpaceUVEditor_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("uv_editor");
|
||||
}
|
||||
|
@ -2024,7 +2024,7 @@ static void rna_SpaceProperties_context_update(Main *UNUSED(bmain),
|
|||
}
|
||||
}
|
||||
|
||||
static int rna_SpaceProperties_tab_search_results_getlength(PointerRNA *ptr,
|
||||
static int rna_SpaceProperties_tab_search_results_getlength(const PointerRNA *ptr,
|
||||
int length[RNA_MAX_ARRAY_DIMENSION])
|
||||
{
|
||||
SpaceProperties *sbuts = ptr->data;
|
||||
|
@ -2426,12 +2426,12 @@ static void rna_Sequencer_view_type_update(Main *UNUSED(bmain),
|
|||
ED_area_tag_refresh(area);
|
||||
}
|
||||
|
||||
static char *rna_SpaceSequencerPreviewOverlay_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_SpaceSequencerPreviewOverlay_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("preview_overlay");
|
||||
}
|
||||
|
||||
static char *rna_SpaceSequencerTimelineOverlay_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_SpaceSequencerTimelineOverlay_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("timeline_overlay");
|
||||
}
|
||||
|
@ -2442,7 +2442,7 @@ static PointerRNA rna_SpaceNode_overlay_get(PointerRNA *ptr)
|
|||
return rna_pointer_inherit_refine(ptr, &RNA_SpaceNodeOverlay, ptr->data);
|
||||
}
|
||||
|
||||
static char *rna_SpaceNodeOverlay_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_SpaceNodeOverlay_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("overlay");
|
||||
}
|
||||
|
@ -2635,7 +2635,7 @@ static void rna_SpaceClipEditor_view_type_update(Main *UNUSED(bmain),
|
|||
|
||||
/* File browser. */
|
||||
|
||||
static char *rna_FileSelectParams_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_FileSelectParams_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("params");
|
||||
}
|
||||
|
|
|
@ -291,7 +291,7 @@ void rna_TextureSlot_update(bContext *C, PointerRNA *ptr)
|
|||
}
|
||||
}
|
||||
|
||||
char *rna_TextureSlot_path(PointerRNA *ptr)
|
||||
char *rna_TextureSlot_path(const PointerRNA *ptr)
|
||||
{
|
||||
MTex *mtex = ptr->data;
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@
|
|||
|
||||
# include "WM_api.h"
|
||||
|
||||
static char *rna_tracking_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_tracking_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("tracking");
|
||||
}
|
||||
|
@ -72,7 +72,7 @@ static void rna_tracking_defaultSettings_searchUpdate(Main *UNUSED(bmain),
|
|||
}
|
||||
}
|
||||
|
||||
static char *rna_trackingTrack_path(PointerRNA *ptr)
|
||||
static char *rna_trackingTrack_path(const PointerRNA *ptr)
|
||||
{
|
||||
MovieClip *clip = (MovieClip *)ptr->owner_id;
|
||||
MovieTrackingTrack *track = (MovieTrackingTrack *)ptr->data;
|
||||
|
@ -255,7 +255,7 @@ static void rna_trackingPlaneMarker_frame_set(PointerRNA *ptr, int value)
|
|||
}
|
||||
}
|
||||
|
||||
static char *rna_trackingPlaneTrack_path(PointerRNA *ptr)
|
||||
static char *rna_trackingPlaneTrack_path(const PointerRNA *ptr)
|
||||
{
|
||||
MovieClip *clip = (MovieClip *)ptr->owner_id;
|
||||
MovieTrackingPlaneTrack *plane_track = (MovieTrackingPlaneTrack *)ptr->data;
|
||||
|
@ -289,7 +289,7 @@ static void rna_trackingPlaneTrack_name_set(PointerRNA *ptr, const char *value)
|
|||
}
|
||||
}
|
||||
|
||||
static char *rna_trackingCamera_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_trackingCamera_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("tracking.camera");
|
||||
}
|
||||
|
@ -321,7 +321,7 @@ static void rna_trackingCamera_focal_mm_set(PointerRNA *ptr, float value)
|
|||
}
|
||||
}
|
||||
|
||||
static char *rna_trackingStabilization_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_trackingStabilization_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("tracking.stabilization");
|
||||
}
|
||||
|
|
|
@ -46,12 +46,12 @@ const EnumPropertyItem rna_enum_volume_grid_data_type_items[] = {
|
|||
# include "WM_api.h"
|
||||
# include "WM_types.h"
|
||||
|
||||
static char *rna_VolumeRender_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_VolumeRender_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("render");
|
||||
}
|
||||
|
||||
static char *rna_VolumeDisplay_path(PointerRNA *UNUSED(ptr))
|
||||
static char *rna_VolumeDisplay_path(const PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("display");
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue