willofmaine Posted October 25, 2017 Share Posted October 25, 2017 Is there a way to use a profile symbol in a Marionette object (such as for extrudes and EAPs) such that when the profile symbol is updated (i.e., it's 2D profile shape is changed) all Marionette objects using that profile symbol will automatically update accordingly? With what I have right now, it seems necessary to use a profile symbol that "converts to group," which of course means once it's used by the Marionette object it's no longer linked to the original profile symbol. It would be nice not to have to edit many instances of a Marionette object using the same profile symbol in order to get their scripts to rerun so that they recognize the updated profile symbol... Thanks! Quote Link to comment
Vectorworks, Inc Employee Stephan Moenninghoff Posted October 26, 2017 Vectorworks, Inc Employee Share Posted October 26, 2017 19 hours ago, willofmaine said: Is there a way to use a profile symbol in a Marionette object Have you tried using "Control Geometry"? It should do what you want. You can have nested groups inside it and access each sub-group by criteria. @DomChas also made a node that will do this, overcoming some of the limitations of the stock node. Quote Link to comment
willofmaine Posted October 26, 2017 Author Share Posted October 26, 2017 My limited experience with the "Control Geometry" node is that it links a selected path object to a Marionette object, such as an EAP. How would it be used to link profile symbols to the profiles of EAPs? Quote Link to comment
Pat Stanford Posted October 26, 2017 Share Posted October 26, 2017 Basic Idea: Put the Symbol into the Control Geometry. Inside the Marionette, extract the 2D portion of the Symbol Definition and use that as the profile for your EAP. If you then change the symbol definition and reset the Marionette, you should have the new profile in the EAP. I don't know if the nodes to do this exist in Marionette. I know you can do it in Vectorscript, so it can be done in Python and therefore it can be done in Marionette, but maybe not yet. Quote Link to comment
willofmaine Posted October 26, 2017 Author Share Posted October 26, 2017 I assume we're talking about the "Control Geometry" node. How would I put a symbol into that node? I don't think it even has an input port. In any case, I don't have any problem doing what you describe above. What I'm after is being able to update the symbol definition without having to reset all of the Marionette objects using that symbol definition (which could be quite a few Marionette objects, such as in the case of door and window trim, for which there likely would be many different sizes). Or is there a function to reset all Marionette objects in a file, or some such thing? Quote Link to comment
Marionette Maven Marissa Farrell Posted October 26, 2017 Marionette Maven Share Posted October 26, 2017 You can use the "Reset All Plug-Ins" command in Tools > Utilities, just be aware that this will reset ALL plug in objects in your doc, not just Marionette objects. Quote Link to comment
willofmaine Posted October 26, 2017 Author Share Posted October 26, 2017 "ALL plug in objects" like what? I just did a quick experiment with my Marionette object and some Door PIOs set to different sizes. I duplicated the Marionette object a few times, then updated one of the profile symbols. When I "Reset All Plug-Ins", the Marionette objects all updated, as desired, but the doors retained their sizes (which is good). But it leaves me wondering what types of PIOs, other than Marionette objects, would be affected?... Quote Link to comment
Marionette Maven Marissa Farrell Posted October 26, 2017 Marionette Maven Share Posted October 26, 2017 Just now, willofmaine said: "ALL plug in objects" like what? I just did a quick experiment with my Marionette object and some Door PIOs set to different sizes. I duplicated the Marionette object a few times, then updated one of the profile symbols. When I "Reset All Plug-Ins", the Marionette objects all updated, as desired, but the doors retained their sizes (which is good). But it leaves me wondering what types of PIOs, other than Marionette objects, would be affected?... Windows, Doors, Fireplaces, Cabinets, every other parametric object that Vectorworks has, those will all be reset - resetting doesn't mean "set back to defaults", it just means rerun the behind-the-scenes script with the current defined parameters. It shouldn't break anything, but depending on how many PIOs you have in your document, it could take a while. Quote Link to comment
Pat Stanford Posted October 26, 2017 Share Posted October 26, 2017 Here is a script that will only reset Marionette objects and not other PIO types. Procedure ResetMarionetteObjects; {© 2017, Patrick Stanford, pat@coviana.com} {Licensed under the GNU Lesser General Public License} {No warranty expressed or implied} {Use at your own risk. Side effects may include loss of libido.} Begin ForEachObject(ResetObject, ((R IN ['MarionetteObject2D']))); End; Run(ResetMarionetteObjects); Don't you love it when the comments are longer than the script ;-) 1 Quote Link to comment
willofmaine Posted October 26, 2017 Author Share Posted October 26, 2017 I see. Okay, thanks. Quote Link to comment
willofmaine Posted October 26, 2017 Author Share Posted October 26, 2017 2 minutes ago, Pat Stanford said: Here is a script that will only reset Marionette objects and not other PIO types. I'm not sure what to do with that... It's clearly not a Marionette node. Is it VectorScript or some such thing? In which case, I have no knowledge... Quote Link to comment
Pat Stanford Posted October 26, 2017 Share Posted October 26, 2017 Yes, it is a Vectorscript. Go to the Resource Manager. Click New Resource. Type is Script. It will ask for a name for the Script Palette, I usually stick with the default, but you can name it what you want. It will then ask for the name of the script. I would name it something like Reset All Marionette. The Script Editor will then open. Copy and past the script in the the script editor and click OK. Double click the script in the script palette to run it. Quote Link to comment
willofmaine Posted October 26, 2017 Author Share Posted October 26, 2017 Okay, that failed at first, 'til I got rid of the "Run(ResetMarionetteObjects);" part. Now it works! So that's great, thank you! Quote Link to comment
Pat Stanford Posted October 26, 2017 Share Posted October 26, 2017 You got luck that there were no variables. If there were variables you would need the entire script from the top Procedure through the last semicolon after the Run(); The name of the procedure at the top has to match the name in the Run statement. Quote Link to comment
willofmaine Posted October 26, 2017 Author Share Posted October 26, 2017 Oh, I see, you mean including all of the copyright info & libido warnings... Okay. Is there a way to get this to reset Marionette objects that are within symbols?... As is, it still seems necessary to go into individual symbols and manually reset Marionette objects that are in symbols... Quote Link to comment
willofmaine Posted October 26, 2017 Author Share Posted October 26, 2017 This seems to work(!!). Anything wrong with it?... Procedure ResetMarionetteObjects; {© 2017, Patrick Stanford, pat@coviana.com} {Licensed under the GNU Lesser General Public License} {No warranty expressed or implied} {Use at your own risk. Side effects may include loss of libido.} {insymbol added, WJT} Begin ForEachObject(ResetObject, ((R IN ['MarionetteObject2D']) & (insymbol))); End; Run(ResetMarionetteObjects); Quote Link to comment
Pat Stanford Posted October 27, 2017 Share Posted October 27, 2017 Yes, it looks like you edited the criteria correctly. Good job. Now you are on your way to learning Vectorscript as well as Marionette. ;-) 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.