the question I want to ask is exactly this, I want to paste the following code in the script section in iclone and run it, but how will it be? can you help the administrator? how can we paste and run lines of code like this.
It works very easily in the blender program when you paste the code, it doesn't work in iclone.
can you explain with an example video?
Here is the code:
# Import the necessary modules
from iclone import get_active_project
from iclone.global_functions import add_box_actor
from iclone.global_functions import move_actor
# Get the active project
project = get_active_project()
# Add 4 box actors to the project
box1 = add_box_actor(project, "Box1")
box2 = add_box_actor(project, "Box2")
box3 = add_box_actor(project, "Box3")
box4 = add_box_actor(project, "Box4")
# Set the initial positions of the boxes
move_actor(box1, 0, 10, 0)
move_actor(box2, 5, 10, 0)
move_actor(box3, -5, 10, 0)
move_actor(box4, 0, 10, 5)
# Set the jumping animation for the boxes
jump_animation = project.animation_library.get("Jump")
box1.animation_mixer.add_clip(jump_animation)
box2.animation_mixer.add_clip(jump_animation)
box3.animation_mixer.add_clip(jump_animation)
box4.animation_mixer.add_clip(jump_animation)
# Play the jumping animation
box1.animation_mixer.play()
box2.animation_mixer.play()
box3.animation_mixer.play()
box4.animation_mixer.play()