Merge branch 'blender-v2.83-release'
This commit is contained in:
commit
6a1056c6a8
|
@ -2026,6 +2026,24 @@ 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)
|
||||
{
|
||||
Scene *scene = (Scene *)ptr->owner_id;
|
||||
TransformOrientationSlot *orientation_slot = ptr->data;
|
||||
|
||||
if (!ELEM(NULL, scene, orientation_slot)) {
|
||||
for (int i = 0; i < ARRAY_SIZE(scene->orientation_slots); i++) {
|
||||
if (&scene->orientation_slots[i] == orientation_slot) {
|
||||
return BLI_sprintfN("transform_orientation_slots[%d]", i);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Should not happen, but in case, just return defqult path. */
|
||||
BLI_assert(0);
|
||||
return BLI_strdup("transform_orientation_slots[0]");
|
||||
}
|
||||
|
||||
static char *rna_View3DCursor_path(PointerRNA *UNUSED(ptr))
|
||||
{
|
||||
return BLI_strdup("cursor");
|
||||
|
@ -2664,6 +2682,7 @@ static void rna_def_transform_orientation_slot(BlenderRNA *brna)
|
|||
|
||||
srna = RNA_def_struct(brna, "TransformOrientationSlot", NULL);
|
||||
RNA_def_struct_sdna(srna, "TransformOrientationSlot");
|
||||
RNA_def_struct_path_func(srna, "rna_TransformOrientationSlot_path");
|
||||
RNA_def_struct_ui_text(srna, "Orientation Slot", "");
|
||||
|
||||
/* Orientations */
|
||||
|
|
Loading…
Reference in New Issue