Timeline for How to make node group of an existing material into a new group? (in python)
Current License: CC BY-SA 4.0
37 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Aug 30 at 7:06 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
May 1 at 23:04 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Jan 2 at 12:05 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Aug 30, 2023 at 8:04 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Apr 29, 2023 at 23:01 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Dec 28, 2022 at 20:04 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Aug 28, 2022 at 2:00 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Apr 27, 2022 at 13:06 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Dec 25, 2021 at 11:01 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Aug 25, 2021 at 4:07 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Apr 27, 2021 at 0:06 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Dec 27, 2020 at 20:03 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Aug 26, 2020 at 10:04 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Apr 15, 2020 at 18:01 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
Dec 14, 2019 at 12:03 | history | bumped | CommunityBot | This question has answers that may be good or bad; the system has marked it active so that they can be reviewed. | |
S Nov 12, 2019 at 2:02 | history | bounty ended | CommunityBot | ||
S Nov 12, 2019 at 2:02 | history | notice removed | CommunityBot | ||
Nov 12, 2019 at 0:05 | history | edited | Noob Cat | CC BY-SA 4.0 |
added 209 characters in body
|
Nov 11, 2019 at 20:45 | comment | added | Noob Cat | @RobertGützkow Thank you very much for the accuracy of the information, and the time you're dedicating to this, I'm really frustrated by this, I don't understand how to get around this, this seems to be a lack of API, I really don't know if to report this and how | |
Nov 11, 2019 at 20:23 | comment | added | Robert Gützkow |
The issue with switching the area is that the ids aren't properly updated and edit_tree isn't set before calling the operator. You could set it manually, however the ids aren't updated until the WM_main is executed where wm_event_do_notifiers is called which further down the stack results in a call to node_area_refresh() and snode_set_context() and ED_node_tree_start() (space_node.c ). This is the reason why it works when you run the script a second time.
|
|
Nov 9, 2019 at 18:00 | history | tweeted | twitter.com/StackBlender/status/1193226882726187008 | ||
Nov 9, 2019 at 1:01 | history | edited | Noob Cat | CC BY-SA 4.0 |
added 121 characters in body
|
Nov 9, 2019 at 0:54 | comment | added | Noob Cat | This must group all the nodes present through a function. Obviously the output node remains outside and probably also the mapping and coordinates node. It is simply a question of enclosing the nodes in a group, which I can then manage separately, but the point that interests me is how to group, here there are missing commands in blender "Low level" api that prevent simple grouping (Nothing more), bpy.ops would be convenient (but not very good), I see that there are indeed problems with the context. | |
Nov 9, 2019 at 0:43 | comment | added | Robert Gützkow | I'm was already aware of that, what I'm interested in is understanding your use case. When and why would you want to group nodes? Which nodes do you want to group? Surely you don't want to create a group from all nodes in the material, material output node included. So where does that selection come from? | |
Nov 9, 2019 at 0:10 | comment | added | Noob Cat | @rjg The nodes are easily available by : for n in C.object.active_material.node_tree.nodes: from here you can also make selected or not with n.select = True It is not important to see the nodes, the nodes are already defined, so they will be converted into a group | |
Nov 8, 2019 at 23:42 | comment | added | Robert Gützkow | You could change one of the areas to the node editor and switch back afterwards, but this is not a nice solution. How do you know which nodes should be grouped, since the node editor isn't open so presumably the user didn't select them? | |
Nov 8, 2019 at 15:23 | answer | added | Rakesh choudhary | timeline score: 0 | |
Nov 6, 2019 at 14:32 | comment | added | Noob Cat | @rjg Basically yes, but there are context problems, as I need it to work also with the closed nodes editor. This is very important.Currently if I run this bpy.ops.node.group_make () I get (rightly) this error: RuntimeError: Operator bpy.ops.node.group_make.poll () failed, context is incorrect. I need this to work from the "UI" panel in the 3DView via a button | |
Nov 6, 2019 at 13:28 | comment | added | Robert Gützkow | The operator does exactly what happens when you select nodes and then use Add > Group > Make Group or CTRL + G to create a new group based on the selected nodes. Is that the behavior you want or something else? | |
Nov 4, 2019 at 2:08 | comment | added | Noob Cat | @rjg Hi, thanks for your interest. Only if it is the only possibility without an alternative, I find it quite frustrating to have to do a loop that checks all the links of the nodes and then having to reconnect them within the group. Basically, I think that's what bpy.ops does, but I'm not sure because I have little experience with groups | |
Nov 4, 2019 at 0:44 | comment | added | Robert Gützkow |
Just for clarification, you would be fine with using bpy.ops.node.group_make() if the issue of passing the correct context would be solved?
|
|
S Nov 4, 2019 at 0:18 | history | bounty started | Noob Cat | ||
S Nov 4, 2019 at 0:18 | history | notice added | Noob Cat | Authoritative reference needed | |
Nov 2, 2019 at 13:48 | history | edited | Noob Cat | CC BY-SA 4.0 |
added 115 characters in body
|
Nov 2, 2019 at 12:39 | history | edited | Noob Cat | CC BY-SA 4.0 |
edited title
|
Nov 2, 2019 at 0:10 | history | edited | Noob Cat | CC BY-SA 4.0 |
edited title
|
Nov 2, 2019 at 0:00 | history | asked | Noob Cat | CC BY-SA 4.0 |