Skip to content
Discussion options

You must be logged in to vote

hey, i don't know your problem like this but i think if you try it this way it should work.
You don't always have to recreate the scene, you can simply delete the existing elements and then insert the new ones.

import cadwork
import scene_controller

not_nested_part_scene = "Not nested"

scene_list = scene_controller.get_scene_list()
print(scene_list)

if not_nested_part_scene in scene_list:
    toRemove = scene_controller.get_elements_from_scene(not_nested_part_scene)
    scene_controller.remove_elements_from_scene(not_nested_part_scene,toRemove)
else:
    scene_controller.add_scene(not_nested_part_scene)

not_nested = [123, 456, 789]

if not_nested:
    scene_controller.add_elements_to_…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@ancelin-charpentier
Comment options

Answer selected by ancelin-charpentier
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants