RDS Casa Posted February 14, 2020 Share Posted February 14, 2020 Hello, happy friday. back into Marionette following time elsewhere.... I need to process a lot of geometry which is coming from other software package, pretty minor process but it still takes time. I thought this would be a simple marionette exercise, but having searched the forum for tips using a few key words, I'm think maybe marionette is not the best process to do this, and I should try scripting it... see this for example: Basically, I need a tool to select everything, then simply assign attributes, based on part of the name of a class. (and this can't be colour by class... the software the geometry then gets pushed to does not recognise this, we already tried, the attributes have to be carried by the object itself) So, for example. >import file with hundreds of polygons. >all objects on a layer with string "ABCD" in layer name > set attributes, pen colour to blue. That kind of thing. Is this a marionette type problem, or should I be looking into a python script - not a challenge I can do quickly! Thanks Quote Link to comment
RDS Casa Posted February 14, 2020 Author Share Posted February 14, 2020 ah, I have found the "obs by crit" node.... I can see the code in there. but I'm not sure its easy to add a logic input to the selection criteria, as its pulling a standard VW selection command, and I don't think it can have a concatenate type logic forced in it??? if this makes any sense. Quote Link to comment
m.graf Posted February 14, 2020 Share Posted February 14, 2020 Maybe this simple example could help you. and here the VWX File... Attrib_by_ClassName.vwx 1 Quote Link to comment
RDS Casa Posted February 14, 2020 Author Share Posted February 14, 2020 thanks so much. Could you save as 2019? will these nodes work in 2019? Thanks so much Quote Link to comment
m.graf Posted February 14, 2020 Share Posted February 14, 2020 here the file in VW 2019 Attrib_by_ClassName_v2019.vwx 1 Quote Link to comment
RDS Casa Posted February 14, 2020 Author Share Posted February 14, 2020 Thanks so much, I'm checking this out now. Quote Link to comment
RDS Casa Posted February 14, 2020 Author Share Posted February 14, 2020 Awesome. Powerful thing that filter node. Very good. Thanks so much, I can grow this to what I need I think. Thanks Quote Link to comment
RDS Casa Posted February 14, 2020 Author Share Posted February 14, 2020 I do have a further general question... how come when I convert the network to a menu command, and run it, it does not work (all objects adopt fill and pen attributes of none?), or if I save as a python script, and run it on another file, it outputs an error, and most of the geometry disappears, bar one object which also has a pen and fill attribute of none? I can copy the network between files and run it, but running it from the menu would be best... Is there another step needed when "covert to menu command" is used? (its basically exactly as per m.graf's very brilliant network above, but I took out the print debug once it was all working). Thanks all. Quote Link to comment
m.graf Posted February 14, 2020 Share Posted February 14, 2020 try this spezial old "crit node" for menu 🙂 i believe the "criterium" by Popup (PIO?) will lost in new file or in Menucommand. Attrib_by_ClassName_v2019.vwx 1 Quote Link to comment
RDS Casa Posted February 14, 2020 Author Share Posted February 14, 2020 Great, thanks. again. For anyone else following this, I found a link to how to delete marionette menu commands here Quote Link to comment
RDS Casa Posted February 17, 2020 Author Share Posted February 17, 2020 Hello, I've discovered those nodes which rely on controlling the attributes of the node itself, to SET the attributes of the process in the network (i.e. the standard "Set attributes" node) do not work when its wrapped and set as a menu command. What does work is using the Set line attribute node Using the Int input to set the RGB colour from [0,65335] - you would think a quick google search might give a way of converting RGB to this index number, I think called a decimal colour.... but no. More difficult than you might think. I've been trying to find a bright green for 20 mins. Any useful colour charts people know! Thanks Quote Link to comment
m.graf Posted February 17, 2020 Share Posted February 17, 2020 my workaround for RGB. maybe not the regular inputnode but it works... line_attrib.vwx 1 Quote Link to comment
RDS Casa Posted February 17, 2020 Author Share Posted February 17, 2020 got it. its not just a value between 0 and 65335, its a list (x,y,z) with the three values EACH between 0 and 65335, and these correspond to the R,G,B value. They don't make this too clear in the description. But it makes sense when you think about it. And this "non regular" vec3 input node can be used to drive it. It works! great. Thanks again again again. 1 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.