Jump to content

MRoth

Member
  • Posts

    65
  • Joined

  • Last visited

Everything posted by MRoth

  1. Version 1.0 (2020)

    34 downloads

    Unlike the default string node, this node can also convert lists into individual strings and Python elements into strings.
  2. Version 1.0 (2020)

    22 downloads

    Assigns the hGet attributes to the hSet object.
  3. Version 1.0 (2020)

    27 downloads

    This node returns TRUE if at least one input is TRUE. In some cases where you have many booleans, it is easier to use this node instead of the default or-node.
  4. MRoth

    Now

    If someone needs another language, I would need the names of the months and days of the week including the corresponding abbreviations to add them to the node.
  5. MRoth

    Now

    Version 1.0 (2020)

    25 downloads

    Returns a string that represents the current date/time.
  6. MRoth

    Ncs2Rgb

    I was not able to find a formula for the reverse. Maybe someone has an idea.
  7. Version 1.0 (2020)

    19 downloads

    This node converts an ncs color code to an rgb color. The color value is only an approximation and varies from the real NCS color depending on the screen and printer.
  8. Version 1.0 (2020)

    26 downloads

    This node converts a tuple into a list. Its the reversed node of tuple2list.
  9. Version 1.0 (2020)

    27 downloads

    This node converts a list into a tuple. Its the reversed node of tuple2list.
  10. Version 1.0 (2020)

    62 downloads

    This node is an alternative to the default Objects by Criteria-Node. I like to use it into a menu command cause its easyer to get the selectet objects.
  11. Version 1.0 (2020)

    22 downloads

    This node returns TRUE if all inputs are TRUE. In some cases where you have many booleans, it is easier to use this node instead of the default and-node.
  12. With your wish there are some problems which I could not yet solve or which might not be solvable at all. 1. How should the values be stored? If they are saved in a text field, this is also visible in the finished MarionetteObject, which is in my opinoin a bit unattractive. 2. When the button is clicked, the previous nodes are not processed. Therefore it is not possible to calculate the options. The dialog always shows the default values of the node. Therefor it is probably the better option to simply use a popup node. If someone still wants to continue working on it I have uploaded the approach for the node here. Popup Dialog on Click.vwx Same text in german Bei deinem Wunsch gibt es einige Probleme die ich noch nicht lösen konnte oder die eventuell gar nicht lösbar sind. 1. Wie sollen die Werte abgespeichert werden? Wenn sie in einem Textfeld gespeichert werden ist dieses in dem fertigen MarionetteObject ebenfalls sichtbar, was in meinen Augen ein wenig unschön ist. 2. Beim Klick auf den Button werden die vorhergehenden Nodes nicht ausgeführt. Daher ist es nicht möglioch die Optionen zu berechnen. Im Dialog werden immer die Defaultwerte des Nodes angezeigt. Von demher ist es wahrscheinlich die bessere Option einfach ein Popup-Node zu verwenden. Wenn trotzdem jemand weiterbasteln möchte habe ich den Ansatz für den Node hier hochgeladen.
  13. Thats what i actually did. For the node above I used the Int-Node as base.This, because it was already on the drawing and (whats more important) the input and output ports are correct. The Int-Node and your node both have an integer OIP input and a single output. This means no new ports need had to be created. It is always an effort to create new ports and therefore much easier to reuse existing structures. For the same reason, the node is not completely rewritten. I always try to copy and reuse as much as possible. It's a lot easier. After deciding which node to use as a basis (A decision on life and death😂), I deletet the first codeline. Without this step it isn't possible to change the code. Then i copied your code into the node and made some changes to create the output list. Next step was to integrate the Integer-Input and replace 1.68 through the code into the phi-node. Last but not least the inputs got new names and descriptions. Between these steps there was always a test whether the node still worked correctly. All in all, the creation of the node took about 5 minutes. This also explains the bad descriptions.
  14. I don't quite understand how your function calculates. That's why I couldn't recreate it with Marionette. But you can easily integrate the function into a node. Below are a few more examples of how you can create rows with ever increasing distances using Marionette. Rows.vwx
  15. Hier ☺️Wenn etwas betreffend Marionette kommt, wird es meistens von @herbieherb, @KroVex oder mir beantwortet. Läuft aber nicht so viel. Eine separate Kategorie gibt es leider (noch) nicht. Here. If something comes concerning Marionette, it is usually answered by @herbieherb, @KroVex or me. Unfortunately there is no separate category (yet).
  16. Gern geschehen. Das nächste Mal auch gerne im deutschen Forum. Dort gehen keine Infos wegen den Übersetzungen verloren. 😊 You're welcome. Next time also gladly in the German forum. No information will be lost there because of the translations.
  17. In this case, that should work. Just replace the float-node by the function-node
  18. What exactly should be the output? That you get an error here makes sense, because '390+10' is a string and therefore could not be converted. You would have to separate the numbers, then convert and add them. Or you simply use a function-node with the function eval(x). Was genau sollte den der Output sein? Dass du hier einen Fehler erhälst, macht Sinn, da '390+10' ein String ist und folglich nich umgewandelt werden könnte. Du müsstest die Zahlen trennen, umwandeln und addieren. Oder du brauchst einfach ein Function-Node mit der Funktion eval(x).
  19. Version 1.0 (2020)

    145 downloads

    This node makes it easier to create a custom popup. In addition to the index, it also returns the string of the selection. I think I have seen a similar node from Marissa before. But I could not find it anymore.
  20. Version 1.0 (2020)

    58 downloads

    This node filters all objects of a certain type from a list. This function could also be achieved with standard nodes, but is easier to do it in a separate node.
  21. Version 1.0 (2020)

    58 downloads

    This node simplifies the creation and the debugging of marionette objects (MO). Outside a MO it returns the geometry from a blue symbol. No contents node are necessary. Within a MO it returns all objects of the control geoemtry. Groups in the control geometry are no longer necessary. If there is no control geometry, the node behaves like outside of a MO and returns the contents of the symbol.
  22. MRoth

    Popup and IF

    I'm not sure I understood you correIch bin nicht sicher, ob ich dich richtig verstanden habe.ctly. (My English isn't so good.) But if I understand you correctly, the network below will work.
  23. Your problem is not the control geometry node. It returns the geometry of the marionette Objekts. The problem is that the locus node gets both 2D and 3D inputs and it can't handle it (for whatever reason). Simply convert the 3D points to 2D points and your network will return the desired points. But you still get some points that are at the same location and the divide curve node deletes the polygon. But you can solve these points with some dataflow/math nodes and a duplicate of the polgon.
  24. @Marissa Farrell or @Stephen Sorenson It seems that the file with the nodes was lost during the forum update. Could you please upload the nodes again? Or is there now a better solution to this problem?
  25. Hi @AlHanson I changed the if node a little bit, so that it can fix your problem now. With the third mode you have to be a bit careful because it reacts to the number of inputs on the test port. Otherwise everything should work fine. Unfortunately I can't send you a document with a finished node, because I use a student version and you wouldn't be able to open it. To implement, simply replace the code in the if node with the code below. Another way to solve your problem is to convert the list to a tuple, which you leave through the if node. Then you convert the tuple back to a list. I think you can find the corresponding nodes in DomC's node gallery. If you can't find them, just tell me and I can send you my version. #MRoth 200129 @Marionette.NodeDefinition class Params(metaclass = Marionette.OrderedClass): #APPEARANCE #Name this = Marionette.Node( 'If enhanced' ) this.SetDescription( 'If test is true, pass the inputs from true otherwise pass the inputs from false' ) #Input Ports true = Marionette.PortIn( None, 'itemTrue' ) true.SetDescription( "An item" ) false = Marionette.PortIn( None, 'itemFalse' ) false.SetDescription( "An item" ) test = Marionette.PortIn( True, 'bTest' ) test.SetDescription( "A boolean value" ) #OIP Controls opt = Marionette.OIPControl( 'Options', Marionette.WidgetType.RadioButton, 3, ['Value', 'List', 'Automatic']) opt.SetDescription('Select how the node should work. ' + vs.Chr(10) + '"Values"=Works like the standard node; ' + vs.Chr(10) + '"List"=Returns the list in its original length; ' + vs.Chr(10) + '"Automatic"=If only one value is entered for Test, the node acts according to the List mode, and if several values are entered, the node acts according to the Value mode.') #Output Ports out = Marionette.PortOut('item') out.SetDescription( "The result item" ) #BEHAVIOR this.SetListAbsorb() def RunNode(self): #libraries import itertools #inputs test = self.Params.test.value true = self.Params.true.value false = self.Params.false.value opt = self.Params.opt.value #script b = False if opt == 2 and len(test) == 1: b = True if opt == 0 or not(b): maxi = max(len(test),len(true),len(false)) test = test + list(itertools.repeat(test[len(test)-1], maxi - len(test))) true = true + list(itertools.repeat(true[len(true)-1], maxi - len(true))) false = false + list(itertools.repeat(false[len(false)-1], maxi - len(false))) out = [] for t in range(len(test)): if test[t]: out.append(true[t]) else: out.append(false[t]) #END if #END for else: if test[0]: out = true else: out = false #END if #END if #outputs self.Params.out.value = out (Sorry for my scripting style. I don't know Python that well yet and have helped me with what I already know. Surely there are nicer ways to solve the problem.)
×
×
  • Create New...