Jump to content
Developer Wiki and Function Reference Links ×

select and process geometry


RDS Casa

Recommended Posts

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 

Link to comment

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. 

Link to comment

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. 

Link to comment

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

image.thumb.png.65439131713940e46172c806120548f2.png

 

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

Link to comment

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. 

  • Like 1
Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...