Jump to content

Marissa Farrell

Marionette Maven
  • Posts

    1,474
  • Joined

  • Last visited

Everything posted by Marissa Farrell

  1. Which view were you in when you ran the script? We've had some issues running scripts in 3D views, Top/Plan is the most reliable. Not sure that this is the case, but it may be.
  2. I can try my best to answer your questions. Rounding Errors: This is due to how numbers are stored within vectorworks. We are in the process of having displayed units adhere to the rounding set in the preferences. I haven't yet finished this. Real Coordinates of Marionette Object: I've attached a file that I hope demonstrates what you're asking for. Text Centering: I believe the attached file should also help with this. I can look into better improvements on the text node in general so that you wouldn't have to manually script this. Insertion Point Coordinates: I don't think this is currently set up, but I may be incorrect. There are definitely ways to accomplish this though, with the currently library, if a user sets the object up correctly. CenterTextOnObject_MFarrell.vwx
  3. I agree with Sarah, This is GREAT! Keep sharing what you learn
  4. Hi Alan, The SetWallStyle function takes a string rather than an index, unlike the SetSlabStyle. You can directly wire your String node to the wallStyle port in your Set Wall Style node. Hope this helps!
  5. Thanks Jim! We could throw candy instead.... I would assume positive reinforcement has a better chance of success ;-) I think you should throw kittens. And send some my way! (Although I'm sure all that get thrown at Jim will find their way to my desk anyhow )
  6. if name != "": states "if name is not equal to [empty string]". In Python, != is "does not equal" and == is "equals" This conditional tells the code to only run the script indented below that line to run if name is equal to something. (I think doing "name != None" should have also worked, but I left it as is.) if i != vs.Handle(0): vs.Handle(0) is essentially an empty handle in Vectorworks, or a null handle. I tried using "None" instead of "vs.Handle(0)", but the error was still being returned, and this ended up working instead. It's not what I REALLY wanted to do there. I think overall what Marionette needs is an update on its internal conditionals. Sarah and I have been working together to locate the nodes that could be improved with additional statements, and it's slowly coming along, but with such a vast library things either haven't been gotten to or have been overlooked. I'd like to thank you (and everyone else) for asking questions, as that is the best way for us to see how we can help users to understand and utilize Marionette. I can understand without the plethora of documentation that Marionette deserves, it can really be a hit-or-miss on getting networks to behave as expected. We're definitely trying to tackle the issue of documentation internally, and I'm even working independently on my own time to create resources for you all. I'll keep thinking on if there's any sort of guide that may help you in the meantime, though nothing has come immediately to mind. Thanks again, and don't hesitate to ask more in depth questions if you ever need guidance!
  7. I did a bit of cheating within the nodes... but this works.. The nodes I edited: Symbol Move If you want me to explain what I did within those codes, I'm more than willing to elaborate. (side note: In a 3D view you may still see some shifts on where the cylinder is placed. This is known and being worked on.)
  8. Hi Kevin, Hopefully the file I'm attaching can help you out a bit. It's easier to prevent the symbol from being included if you use an IF node right after the string with the name of the symbol you are considering. Take a look and let me know if this helps at all. There are many other ways to approach this, but I think this is (hopefully) inline with what you're hoping to accomplish.
  9. Currently neither of these are possible, but they are on the list of proposed enhancements.
  10. Just to follow up - although I still think it's behaving improperly - the CTRL key allows the temporary change of modes for the eyedropper. I'm assuming that when it's interrupted by the flyover tool, since that ALSO uses the CTRL key to activate it, there's some sort of interference between the tools causing the mode that's not currently active on the eyedropper to get locked on. I'm looking forward to hearing how the engineers interpret this.
  11. I can reproduce what you're saying, Josh. I'll throw in a bug internally.
  12. What about using a Popup OIP control instead of a boolean? You could use the 'Planar Boolean' node in the Operations category as an example. Basically you'd want to have it set up with Rectangle as option 1 in your OIP control, and Circle as 2. Then all you would need to do in your code below is have your output equal to the value of your OIP control Kind of like this: @Marionette.NodeDefinition class Params(metaclass = Marionette.OrderedClass): this = Marionette.Node( "popup" ) op = Marionette.OIPControl( 'shape', Marionette.WidgetType.Popup, 0, ['rectangle','circle']) out = Marionette.PortOut() def RunNode(self): self.Params.out.value = self.Params.op.value (okay, so exactly like that...)
  13. Hey Alan, Try using the node that you would use for 2D polys. In most cases for the poly nodes, you can use them for either 2d or 3d. (There are some exceptions, but I think this one should work.)
  14. Hey Alan, Looks like the parameter you're missing is vertPart vs.BeginRoof(p1, p2, upslope, riseDistance, runDistance, miter, vertPart) which is labeled as "Dimension of vertical miter for double miter style." in the Developer Wiki.
  15. I don't have a complete answer, but if you look at this page on the Dev Wiki, Pat Stanford made some comments a while back on how to get an object to texture by class. SetTextureRef Hopefully this helps? EDIT: You may want to use vs.SetTextureRefN, but I don't know that the same "-1" method applies, as I haven't tried.
  16. (Extension on Jim's Marionette comment - I'm totally working on that! But I'm sure that was already assumed by all )
  17. Was already on my list! Thanks!
  18. Currently any nodes that accept an input don't show their OIP controls when wrapped. I'm working on narrowing down the best way to solve this, but it probably won't be fixed for 2016.
  19. Name will only accept one object, however, in some cases (depending on what your script does) you are able to connect more than one Name node to the input port of the next node in your network. This won't work in all cases, though, depending on if there is any list manipulation going on further in your network. What does your script do?
  20. It doesn't really matter in the end, but using the TupleMap is only advanced in the sense that if you were adding vectors or points (i.e. (0,1,2) + (1,2,3)) you'd be adding the independent elements (so the result would be (1,3,5)) If you're only trying to accomplish basic math, it's much easier to just use the + - * / operators.
  21. DomC, The issue with including user content in default content is that I believe we would need explicit permission to ship with it. I'm not sure where we're headed with regards to that, but to my understanding, we should soon have a better way to organize on the forums, in the very least.
  22. Hi Alan, What you've written is acceptable. The only thing I've noticed is that you used this line twice: calc = self.Params.calc.value Every user/programmer will have their own style of coding, it's up to you to use whatever you like best. I think that your code is very easy to understand, so I don't think there's an issue with you writing this way. A few notes that don't REALLY matter: 1) Although using "Marionette.TupleMap" makes sense in Marionette networks, I've found it better practice to use use the standard operators on the small scale. (+, -, *, /) 2) Adding comments to your code will always assure that the user can follow what you're doing. I'm glad you used the comments to say which operation is being used for which option. 3) In the Params class, maybe you'd like to add descriptions using .SetDescription to the a, b, and c ports - this will allow descriptions of each of those to appear in the "Description" dialog brought up by the button in the OIP. That is another great way to help a user understand what a node does or requires to work. I personally believe that the most important part of coding is creating code that an unexperienced user will be able to understand moderately easily. It's also very beneficial to comment code because you may return to a project from months or years ago and not remember what a certain part does off the top of your head, or you may not remember why you did it a certain way. Hope this helps!
  23. Great visual aid, Alan! Thanks for sharing!
  24. Thanks Alan! I've gotten into the habit of organizing the scripts in the default content nodes when I make changes to them. I'm glad you noticed It's a work in progress. I'm hoping to cover all of them at some point, but with hundreds of nodes, it may take me longer than I'd like.
  25. You could programmatically include your 2D representation, but to my knowledge you would have to ungroup your result if you want to use the actual auto-hybrid command.
×
×
  • Create New...