Thanks for the small adjustment! What does that do though? I mean, I get what the GetSelected method is doing (didnāt know about that by the way, thanks for the tip) but what is the advantage of removing the bpy dependency and what are the runtime errors you refer to?
ADDITION: On another forum where I mentioned these scripts, someone suggested that I switch
for obj in bpy.data.objects:
to
sce = bpy.data.scenes.active
for obj in sce.objects:
What does that change do? Is that related to the runtime errors you mentioned? Off the top of my head Iām guessing this is to do with errors if you run the script without any objects selected.
blender,like many other 3d-packages. can handle many different scenes.
this makes most sense when doing cg-movies where those scenes refer to pretty much the same as in real movies.
for game-development those are less important in most cases.
getting the objects of the current scene is a ājust in case someone DOES use scenesā precaution. so you donāt get all the stuff from other scenes which are not even related to the stuff you see onscreen.
that would be my interpretation of that code. however. i didnt check the api so it might be off^
With your original code Iāve got a runtime error with a selected object (an object with āDupliGroupā Blender option enabled if I correctly remember) in the āobj.selā check which doesnāt appear with the replaced code.
GetSelected method is used in Chicken exporter too, so I think itās a good idea to use it.