A lot of structs do use an ID entry. Let's get ID.name.
Blender 3.0.0:
...
ID 176
struct ID {
void *next; // 8
void *prev; // 8
ID *newid; // 8
Library *lib; // 8
AssetMetaData *asset_data; // 8
char name[66]; // 66
short flag; // 2
int tag; // 4
int us; // 4
int icon_id; // 4
int recalc; // 4
int recalc_up_to_undo_push; // 4
int recalc_after_undo_push; // 4
int session_uuid; // 4
IDProperty *properties; // 8
IDOverrideLibrary *override_library; // 8
ID *orig_id; // 8
void *py_instance; // 8
LibraryWeakReference *library_weak_reference; // 8
}; // 176
...
Blender 2.79:
...
ID 120
struct ID {
void *next; // 8
void *prev; // 8
ID *newid; // 8
Library *lib; // 8
char name[66]; // 66
short flag; // 2
short tag; // 2
short pad_s1; // 2
int us; // 4
int icon_id; // 4
IDProperty *properties; // 8
}; // 120
...
Jan Walter referenced this ticket in commit 44bf207.
$ ./target/release/blend_info blend/factory_v279.blend | grep "ID\.name" ID.name[66] = "CACamera" $ ./target/release/blend_info blend/factory_v300.blend | grep "ID\.name" ID.name[66] = "CACamera"
Question: Does this resolve the ticket already, or should we clean up and try to solve the problem in a more general way?
In the meantime we have an option to search for a struct name:
$ ./target/release/blend_info -h blend_info 0.1.0 Print some information about a Blender scene file USAGE: blend_info [FLAGS] [OPTIONS] <path> FLAGS: --dna Print information about Blender's DNA -h, --help Prints help information -V, --version Prints version information OPTIONS: -n, --struct_name <struct-name> Print information about a particular struct ARGS: <path> The path to the file to readWhat we would like to have is the ability to use a
.
char to get from the structCamera
to the structID
and get the name from there:$ ./target/release/blend_info -n Camera.ID.name blend/factory_v279.blend
Test, if the public key is used for emails ...
Jan Walter referenced this ticket in commit ef4a185.
Jan Walter referenced this ticket in commit 44bf207.
Jan Walter referenced this ticket in commit ef4a185.
Jan Walter referenced this ticket in commit 44bf207.
Jan Walter referenced this ticket in commit ef4a185.
Jan Walter referenced this ticket in commit 44bf207.
Jan Walter referenced this ticket in commit ef4a185.
Jan Walter referenced this ticket in commit ef4a185.
Jan Walter referenced this ticket in commit ef4a185.
Jan Walter referenced this ticket in commit ef4a185.