Jump to content
Developer Wiki and Function Reference Links Read more... ×
Andrew Davies

Beginner questions

Recommended Posts

Hi

 

I have just made my first Marionette network and am delighted with the results.

 

But just have two relatively basic questions I just can't resolve.

 

1) I have named all of my variables to make de-bugging easier.  So when I convert the finished network to an Object Node I get all those variables editable in the OIP.  Is there any way of hiding some of the variables?  There are about 10 there, but I only want 2 of them to be adjustable.

2) I can not figure out a way of assigning a class to an object.  In one of Jim's excellent tutorials he showed how to make a selectable drop down list of textures - but I can't work out how to do that for classes.

Can any one help?

Many thanks,

Andrew

Share this post


Link to post

Hi Andrew,

 

I'm glad your first experience with Marionette has gone well!

 

1) To my knowledge there is no way to hide the input from the OIP if you name the node the standard way, however if you're feeling brave, you can rename the node in the script which will not push that input out to the OIP of your Marionette object. I've highlighted the changes you will have to make - you will need to delete the line that starts with #COMMAND; and you can change where I've highlighted Point2 to whatever you would like your node name to be.

(FYI, the #COMMAND; line just links this node script to the Python file associated with it. Removing this line will not break anything, it's mostly used for our change tracking internally)

image.thumb.png.fdf3a2eb2264f501c3509783e3eb4486.png

 

2) I thought we already had a node for this, but I couldn't find it when poking around. I've attached a node that will allow you to choose the class to assign the object to in the OIP. The other way to do this would be to use the Set Class node from the Appearance category and use a String node to define the name of the class, but that wouldn't give you the popup you're requesting. I've also included an input node in case you want to expose this popup list to the OIP.

(Note that the outermost group will not be classed the same, but the object inside the group will, in my example, the rectangle)

image.thumb.png.963cc1c61dab834e0cc368ec4087e8fb.png

 

SetClassV2_MFarrell.vwx

Share this post


Link to post

Perhaps a simpler way to keep the names but not have them in the OIP is to just use a text block next to the node instead of actually naming the node. 


It is more trouble and when you move things you have to move both, but at least you don't end up having to modify the Python code for the node.

 

Share this post


Link to post

That's wonderful!!

Thanks Both

 

I tried adding a label text to each node before, but it soon got very messy.

 

Will try digging into the Python code instead - doesn't look too scary?!:S

Share this post


Link to post

there's a super secret technique for this. (I'm pretty sure it still works..)

 

In your MarioNetwork, draw a 2D locus over input ports that you want to hide. 

 

Let me know if this still works. (Sounds almost too simple to be true...)

Share this post


Link to post

 

 

 

This works :-) But I would use an unnamed pass node to hide input/output of a named wrapper. Because If you move your network without the locus point the in-/output port will show up again.

 

 

 

Share this post


Link to post

@Marissa Farrell I really like the Classes Popup node!

 

Is there a way I can add that node to my library so it'll be in the list of nodes I can use in all my projects in the future?

 

In fact, since I know my way around a little in Python, is there a way to store nodes I might create in the future in a personal library?

 

Share this post


Link to post

@Phileas - Great question!

 

One way to include custom nodes in your library is to create a file at this location

[Your User Folder]/Libraries/Defaults/Marionette

 

Once the file is created, save any nodes you want to have access to as Red Symbols. (in Symbol Options, make sure that "Convert to Plug-in Object" is checked.)

 

The other way follows similar rules - you can create a Workgroup Folder on your network to allow others access to the nodes as well. I personally use my OneDrive folder to share between my 3 computers. The setup is a little more time consuming, but if you're interested, I could walk you through that.

 

Once you've set up the file, you'll need to go to your Resource Manager and choose "Refresh Libraries" to get them to appear in your tool popup.

 

Please let me know if you have any issues and we can troubleshoot together.

 

(and as a final sidenote - the Class Popup node was added in Vectorworks 2019, as well as ~50 other new nodes 🙂 )

Share this post


Link to post

@Marissa Farrell You just gave me one more reason to upgrade to VW2019 😞   I already tried to convince my boss, no f***ing way...

 

 

Anyway: I found the Libraries, and imported the nodes as red symbols into the already present .vwx file in there, "marionette default library.vwx", and classed them in there as I want them to be. However, they do not appear in the later drop-down menu when I want to place a node, as if they don't exist, even after refreshing my Ressource Manager's Libraries. Any Ideas where I went wrong? When I check the symbol options of the nodes they all have the same than the basic ones. I can't find a "convert to Plug-in object" checkbox tho)

 

By now I must look like a helpless chil to you @Marissa Farrell lol

I'm trying to work my way up!

Share this post


Link to post

I think that file may only cater to Menu Commands. I would suggest creating a whole new file with a new name and trying again.

 

Scratch that - are you talking about the file in the Application folder and not the user folder? 

Just trying to get some clarification 🙂

Share this post


Link to post

Although I'm not sure why that's not working, it's recommended to not modify files in the App folder - they may get overwritten during Service Pack updates.

 

Try creating a new file in your user folder using the same pathing as I mentioned above and see if that fares any better, that will ensure (as long as you don't delete it yourself) that it won't get overwritten.

Share this post


Link to post

@Marissa Farrell that's a bit embarrassing, but I can't seem to find a "user" folder

 

we work mainly on a server that's common to all computers, I can't seem to find any kind of personal user library on my local hardrive... 😞

Share this post


Link to post

No problem! Navigate to your Vectorworks Preferences and go to the User Folders tab, in the top section called User Data and Preferences folder, there's path listed and a button that will allow you to navigate to it. Hope this helps!

 

 

 

Screen Shot 2019-05-03 at 9.02.34 AM.png

Share this post


Link to post

For some additional background on setting up User and Workgroup folders see the following threads. Perhaps the biggest hint I can offer is that when you create a NEW file in the User or Workgroup folder, it will not be seen until VW is restarted. You can add and remove resources from existing files without requiring a restart, but the list of files appears to be cached on startup.

 

 

  • Like 1

Share this post


Link to post
4 minutes ago, Pat Stanford said:

Perhaps the biggest hint I can offer is that when you create a NEW file in the User or Workgroup folder, it will not be seen until VW is restarted.

Alternatively, you can call "Refresh Libraries" in the Resource Manager (from the "cog wheel" menu).

  • Like 1

Share this post


Link to post

@Nicolas Goutte Thanks for that information. I was not aware of Refresh Libraries.

 

How many of us do you think you would have to put together to know everything about VW? 😉

 

Share this post


Link to post

coming back to this thread cause I don't know where to go otherwise:

 

Is there in VW 2018 a node that allows me to run a list through it and deletes all duplicate values? Or a boolean kind of operation I can set up that reads a list and goes "if this value already exists in the list, delete said value"?

Share this post


Link to post

In 2018, there is the Remove node which has two inputs, one is for the list and the other is for the item you want to remove from it.

2019 introduced a Remove Duplicates node. I've attached a 2018 file with it. This node will remove all duplicates.

 

 

RemoveDuplicatesNode.vwx

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

 

7150 Riverwood Drive, Columbia, Maryland 21046, USA   |   Contact Us:   410-290-5114

 

© 2018 Vectorworks, Inc. All Rights Reserved. Vectorworks, Inc. is part of the Nemetschek Group.

×