-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow non-interpolation of colors in Cartoon and Ribbon Mesh #393
Comments
@BradyAJohnston What/where is the option to turn off the color interpolation? Edit: I've updated to 4.0.8. Maybe I'm just using the wrong node elements though. |
Disregard, the save file that I have based all of my work on is using the old version of the Mn Utils Style Cartoon node so I wasn't seeing the Interpolate Color checkbox. Even when I pull out a fresh node, the checkbox isn't present. But I open a fresh blender project and use the Mn Utils Style Cartoon node, the new parameters are there. So my MN is on 4.0.8 but the old save file doesn't recognize the updated version of the nodes. When an update pushes changes to a node, how do I cascade that update to the affected nodes that were used in saved blender files? Or do I need to recreate the whole project to utilize the new node types/parameters? |
@rbdavid currently when selecting the nodes from the menu, MN checks if the node already exists in the file, then if not appends it to the current working file. Once MN is updated the node might change but the names won't, which is the problem that you are running in to. To import the new node, you can either rename the old node, then the import will not detect the existence of the node and append the new one, or you can manually append the new node as well. Renaming the Old NodeCleanShot.2024-01-13.at.09.51.04.mp4You can manually append node groups (which will import & If you have suggestions on how you think MN should handle this better, I'm open to suggestions also! |
Oh this is a tough one. Having an update auto-populate nodes with the new parameters would create potential issues with recreating past figures. Certainly something to be avoided. The process you described (client-side renaming of old nodes so that an import of a new MN version loads the updated nodes) is very rough though. Who knows how outdated a user's MN version could get and how many renamings they'd need to do. Very difficult to update MN and continue a working project. But the past versions of Molecular Nodes are available to download still, so versioning in regards to MN can be controlled that way. Instead of But I'm a novice with Blender and have no idea how the Blender community handles this type of thing. |
Also, as a side thought, shouldn't the Interpolate Color checkbox be part of the Color Set node? Or, you'll need to implement the same checkbox with Ribbon and Surface representation styles. (These changes are very low priority for me but its a consideration for other potential users.) Once again, I am uncertain the internals of all of these nodes so I could be confusing the tasks being done by the specific nodes. |
The 'Set Color' node sets the colors based on a per-atom basis. When the styles are created, they pull the color information form the relevant atoms (usually alpha-carbons). Only once it starts to get the color information and apply it to the style mesh, then interpolation will occur / not occur. The option was also added to the ribbon node (might need to load the new one as well), and the option for interpolating colors on the surface style was already there, but they are under the 'Color' tab with an option for 'Blur'. I should change this though to be more consistent with naming throughout the nodes. In terms of versioning, versioning the add-on itself to have multiple installs I don't think would work, and I don't think it would be the best approach. I could potentially have some version number for the nodes themselves, to check for when there is a newer node that has been updated. I don't have access to a lot of metadata options for the nodes but I could potentially create some custom properties for them, so that when the version in your file and the |
Yeah, but having multiple versions of the same named nodes in the drop down menu creates ambiguity, right? And might start to bloat the node lists. Maybe both are inevitable when a project starts to span multiple MN versions. Idk, its a tough problem that's best to be avoided when possible. |
Just tried to create a user-defined path to add-ons (https://docs.blender.org/manual/en/latest/editors/preferences/addons.html -> user-defined add-on path tip). Loaded up three different versions of MN in the user-created addons subdir. When I try to check the import box for any of these different versions, I get this error message: I haven't dug deep into where the molecular_nodes_4 module is in the whole MN file directory so I can't debug this error at the moment. I have changed the Now, that still doesn't change the fact that the node details are saved within a specific project's .blend file... If the parameters/configurations/connections of nodes used explicitly in the graph are saved within that .blend NodeTree subdirectory then switching between add-on versions won't change a thing, right? I'd have to rename the old node(s), save and exit blender, and then load the blender file to get the updated nodes to be imported correctly. Then, I still have to drag the updated node(s) onto the graph, make connections, and update parameters. Is there a way to alter the .blend file and specifically the node graph outside of the GUI? Assuming the node naming issue is solved by version numbering node types, can I write a script to automate the change of nodes within the graph from the outdated node to the updated one? Where default values of the new node are used if parameters are added between versions. Anyways, my questions keep spilling far afield from molecular nodes features. I really appreciate your add-on and hope I can get blender to work the way I want it to. There's something to VMD's human readable vis-state files that make it very easy to script around. I've just gotta figure out how to do those things with blender files. |
I don't think this approach is going to work. For buttons in Blender to work, you have to register operators with a string This is quite out-of-scope of just using the add-on itself, so I can't really help you with multiple installations, because I would highly recommend against such a strategy. |
Currently colors are interpolated on the generated cartoon and ribbon meshes, as the colors are sourced from the alpha carbons.
It is possible however to just do immediate transitions from one to the to the next, and expose this as an option to the user.
The text was updated successfully, but these errors were encountered: