Member kritskiy.001 Posted August 16, 2023 Member Report Share Posted August 16, 2023 First of all, it's awesome to see Python implementation in 3d Coat — it's so, so so much easier to dive into for mere mortals than AS and C. I'm struggling with something: I'm trying to change parent for selected volumes from Root to an object with index 0 and while the console prints out correct values nothing happens in the scene: the parents don't change. My scene consists of 4 simple sphere volumes, two bottom ones are selected (selecting one doesn't make difference) Code: import coat def main(): root = coat.Scene.sculptRoot() new_parent = root.child(index = 0) selected = [] def walker(el): if el.selected(): selected.append(el) root.iterateVisibleSubtree(walker) print(f"selected elements: {selected}") # correctly outputs coat.SceneElement objects for el in selected: print(f"changing parent: {el.name()} from {el.parent().name()} to {new_parent.name()}") # prints out correct names el.changeParent(newParent = new_parent) # nothing happens main() Please let me know what am I missing. Thanks! Quote Link to comment Share on other sites More sharing options...
Solution Andrew Shpagin Posted August 22, 2023 Solution Report Share Posted August 22, 2023 Fixed in 28 (will be released in 1-2 days) 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.