Hello.
Can I make a script in a blender that will set a custom property to an object and use a command (operator) to create a text file and write the values of these properties there?
In 3ds max, this is done like this.
I created a checkbox that writes text to the properties of an object.
Which I marked red.
I also created a list of surface properties that, when selected, writes its number.
surfaceproperty=1 (surfaceproperty=0 - 27).
After that, I press 1 button which creates a text file and writes there the names of all the meshes and all the properties that I set.
$Sphere001
"notcollidable3d
surfaceproperty=1
"
$Box001
"notcollidable3d
"
The text of the file itself.
How can I do the same in a blender?
there’s a lot to unpack in this question, and I’m not at my computer so I am not able to go into too much depth, but you need to know how to do the following:
1.) read and write custom properties from blender data blocks
2.) write data to a file using basic python file I/O