Jump to content
Sign in to follow this  
ahedley

Marionette Nodes

Recommended Posts

I would like to make available a number of marionette nodes to the community for free which I have been working on.

The nodes I have produced are based on the vectorscript function reference with the aim of making a simple conversion to nodes and really just to make a number of building blocks that can be utilized.

The nodes are in the categories : Utilities, Dimensions, Worksheets and 2d Objects – 167 in total.

You are absolutely free to modify any of the nodes. I would appreciate your comments and feedback.

If there is any one node I would encourage you to try out, it is the message node in the Utility category. I have found it very useful to test nodes or to get feedback from a network in progress.

Regards

Adrian

Share this post


Link to post

Hi,

So I added them in the location you mentioned and nothing showed up, could you be more specific as to the location.

Thanks

Share this post


Link to post

Sorry about that Allan,

When you extract the zip file you will get a main folder – MarionetteNodesVol1, which contains the subfolders -

2DObjects$, Dimensions$, Utility$ and Worksheets$.

You copy the sub folders NOT the main folder into the Marionette folder located in your vectorworks user Library/Defaults folder. On PC look for something like this in your user folder : Vectorworks/2016/Libraries/Defaults/Marionette/ .

There is an existing post that may also prove helpful :

https://techboard.vectorworks.net/ubbthreads.php?ubb=showflat&Number=218292#Post218292

Regards

Adrian

Share this post


Link to post

Allan brought to my attention that two nodes in the 2d Objects category contained typo errors namely RRectangle and RRectangleN Nodes.

Attached are the corrected nodes.

Regards

Adrian

Share this post


Link to post

Adrian,

Don't know much about programming but trying to understand more so in you nodes the RRectangle line 22 the origin does not have an "_" after it which matches line 28 whilst rotation etc does. Is there a reason for this or as long as they match it doesn't matter.

Thanks

Just looked at the Oval one also and has the same issue, so I just took out the "_" from line 14pt1 and line 15 pt2 to match line 16 and all works fine.

Also Rectangle same, same fix and ok.

Edited by Alan Woodwell

Share this post


Link to post

Alan,

These are variable names. In order for the scripts to work properly the variables need to be defined at the beginning of the script and consistently named. The underscore character _ is just part of the variable name and in these instances is just a character like any other (ie. it doesn't need to be the underscore, it just needs to match the other instances). There may be other best practices about whether to use special characters like the underscore in variable names.....

Kevin

Share this post


Link to post

Alan,

I agree with Kevin.

For Python, PEP 8 has emerged as the style guide that most projects adhere to.

For classes and functions the convention is to use CamelCase for classes and lower_case_with_underscores for functions and methods.

For variables, the first character must be one of the letters a through z, A through Z, or an underscore character(_). After the first character you may use the letters a through z or A through Z, the digits 0 through 9, or underscores.

Vectorscript has its own set of naming conventions, which I have grown accustomed to. I noticed the practice of using the underscore after the variable being used by vectorworks, hence I just followed a similar practice.

However, I definitely have to reconsider its usage in scripts I develop, it is apparent my eye has difficulty detecting its absence leading to very embarrassing errors.

I have gone through each node and I believe I have made the necessary changes. I have attached the modified files.

Something I should mention especially if you start to code your own scripts. When you use the script editor to write vectorscript scripts and your compile is successful you are generally confident the script will work. However in python, particularly creating nodes, your compile may be successful however your code may still have errors.

Thanks again Alan, if you notice any further problems please let me know.

Regards

Adrian

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
Sign in to follow this  

 

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.

×