Jump to content
Ultimaker Community of 3D Printing Experts
markwal

Plugin dev: where did the name go?

Recommended Posts

In current master, it looks like save local no longer proposes the name of the first mesh as the filename. Back to typing in a name. However, my plugin was also trying to use the following to propose an initial file name, but it no longer works. Did the property move? If so, where to?

 

for n in BreadthFirstIterator(node):   if n.getMeshData():       fileName = n.getName()       if fileName:           break

 

where node is passed into OutputDevice.requestWrite

Share this post


Link to post
Share on other sites

Ah right. It could be that we broke a bunch of stuff while doing this. The code does use the first name it finds as the name to write to the output device, but if no node has a name set, it returns None.

This proves that it's always a good idea to not completely trust the data that you receive from other parts of the application and build in a check if the received name is not set.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×

Important Information

Terms of Use Privacy Policy