Grzegorz Krzemien Posted August 26, 2020 Share Posted August 26, 2020 Hello, I tried to recreate my old script from 2019 and I have encountered strange thing. Group node in v2020 is different than Group node from v2019. In my example new node (v2020) does not work (gives 0 values), while v2019 node works fine. Does anyone has an idea why this node needed to be changed any why it does not work now? Both nodes in example file. Group test.vwx Quote Link to comment
AlHanson Posted August 28, 2020 Share Posted August 28, 2020 (edited) I've noticed the Group node not functioning correctly lately as well and just assumed it had do to the usual marionette quirks and found other work-arounds. This post prompted me to open up the script and take a look. The node was updated in April and added 2 lines to the script to perform a conditional check before running the existing group script. Unfortunately my python is very limited and I'm not entirely sure what this code is meant to accomplish. The April 2020 Node will only function correctly when an existing group handle is provided. So it appears that the If statement is checking that the variable 'original' is a group Handle, and if so will run the rest of the script. With no group provided, 'original' returns 0, therefore isn't recognized as a handle and the code in the If portion does not execute and does no grouping. I think there should be an Else statement here with some slightly different code to create a new group when the If portion fails, but I don't follow why this would be necessary when the 2019 code worked fine without the change. Basically, this appears to just be a bug that should be reported as best I can tell. Maybe somebody with better python/vectorscript knowledge can shine some light on this and explain things if I'm wrong. Edited August 28, 2020 by AlHanson Quote Link to comment
the frog Posted August 28, 2020 Share Posted August 28, 2020 Hello I have tried to understand the differences between the scripts. In the node “group” at the end the only one is the beginning: #COMMAND;READONLYREFFILE;[VWLibDef]/Operations\Group.py; #Modified April 2017 If you take this out of the script the node works perfectly fine. Don’t ask me why ??? And you get the same result as in 2019 What is weird is that this text is only a reference about the node and shouldn’t interfere in the node process. Quote Link to comment
AlHanson Posted August 28, 2020 Share Posted August 28, 2020 I tried removing the first lines as you suggested and it doesn't make any difference for me- the new node doesn't function without plugging in an existing group handle. Removing those lines *shouldn't* affect anything- they're both comments that are unrelated to the execution of the script as you say. The first #COMMAND... is only to flag the script as read only. The only thing removing it should accomplish is allowing you to save any changes made. So if that's making the node function on your end that is quite bizarre... but seems to be par for the course for my experience with Marionette so far. Quote Link to comment
the frog Posted August 29, 2020 Share Posted August 29, 2020 Now we have another subject! I edited both nodes from the script and beside the “locker” they are alike. You have another group node with more lines. If you start from the original file and run the network the 19 is working and not the 20. By deleting the first 2 lines in the 20 the network works on my version of 2020 SP3/ build 537701 French version. Marionette mystery… A copy of the scripts bellow Quote Link to comment
Grzegorz Krzemien Posted August 29, 2020 Author Share Posted August 29, 2020 13 hours ago, AlHanson said: Basically, this appears to just be a bug that should be reported as best I can tell. Maybe somebody with better python/vectorscript knowledge can shine some light on this and explain things if I'm wrong. I think the same. This really looks like a bug or some kind of "work in progress" thing that was not finished. I will report it and maybe it will be changed in the next patch. It is a quite important node so it should be fixed as soon as possible. @AlHanson, @the frog - thank you so much for your time 🙂 Quote Link to comment
MrPilot Posted November 7, 2020 Share Posted November 7, 2020 I have a similar issue with this... can't get the Loft node to function, as the Group node always returns an empty set. Quote Link to comment
MrPilot Posted November 11, 2020 Share Posted November 11, 2020 This is my code for a New Group node, which resolved the problem for me (in conjunction with the Loft Surface node): #REFFILE;REFFILE;[VWLibDef]/Operations\Group.py; #Author: ? #Modified on: 2020.11.11 17:00 #Modified by: Konrad Br. @Marionette.NodeDefinition class Params(metaclass = Marionette.OrderedClass): #APPEARANCE #Name this = Marionette.Node( "New Group" ) this.SetDescription( 'This node creates a new group.\n' ) #Input Ports handle = Marionette.PortInLists( vs.Handle(0), 'hObjs' ) handle.SetDescription('The objects to add to the group') #OIP Controls #Output Ports group = Marionette.PortOut('hGroup') group.SetDescription('A new group containing the objects') #BEHAVIOR this.SetLinksObjects() def RunNode(self): #inputs h = self.Params.handle.value #script new_group = vs.BeginGroupN() for i in h: vs.CreateDuplicateObject(i, None) vs.EndGroup() for i in h: vs.Marionette_DisposeObj(i) #outputs self.Params.group.value = new_group Quote Link to comment
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.