Is there a way to use python in the preparation of the scene.
like this. (It’s not working)
import bpy
#change Scene
for area in bpy.context.screen.areas:
for space in area.spaces:
if space.type == 'NODE_EDITOR':
bpy.context.space_data.tree_type ='ArmLogicTreeType'
ChangeSceneNT= bpy.ops.node.new_node_tree()
ChangeSceneNT.name = "a"
ChangeSceneNT.add_node(type="LNOnKeyboardNode", use_transform=True)
The Error message is,
"AttributeError:‘SpaceConsole’ object has no attribute ‘tree_type’ "
this one is more a “does what I want is possible?”
I just don’t now (yet) how to do that but you are in a sphere, inside the sphere is a texture of image. a forest for example. If you select a particular tree you jump to the next scene.
How to select the tree, a Switch Zelda Bow pointer will be great, bu how to do that.
I will search for all of that.
The same than 3 but you don’t go to an other scene, you go to a web page giving information about a product, or a popup for the same purpose.
Technically it should be possible, but I don’t exactly understand what you are trying to do. You want to make changes to the scene with Python when the game is built? You should be able to make any kind of changes in Blender with Python, but Armory games are actually run completely separate from Blender. The Armory Blender plugin is actually just a really advanced export plugin in concept. The Armory Blender plugin exports a Kha project and then uses Khamake to compile the Kha project to the resulting game.
If you did anything with Python, it would just serve as a way to automate processes in Blender to prepare the scene for export as an Armory game. Is that what you were thinking? If it is, I don’t see any reason why you couldn’t do what you need to. Armory is using the Blender python API just like you would be. ( I don’t actually know much at all of the Blender python api, though, so I can’t tell what you are trying to do in your code sample ).
Also, it might be possible to add hooks to the Armory plugin so that you can execute custom Python scripts that are in the .blend or in the project folder when the export is run.
I think Armory could have great potential for stuff like that, too.
If you did anything with Python, it would just serve as a way to automate processes in Blender to prepare the scene for export as an Armory game. Is that what you were thinking?
Yes exactly, I have tones of identical assets, company around the world possess the same type of assets, and they are increasing.
Since assets are always the same, in the same order, automation is a logical process.
Once I found that I automate all the processes of node creation, like the one kindly explain up, and then…
The world is mine!!
(but we are quite far from it)