Jump to content

Marissa Farrell

Marionette Maven
  • Posts

    1,473
  • Joined

  • Last visited

Posts posted by Marissa Farrell

  1. The post Pat shared I believe is your missing link.

     

    Throw 

    vs.SetObjectVariableBoolean(tbb, 1167, True)

    into your script after you've created the TBB, but before trying to pull/push information to it.

    It appears to be working on my end.

     

    I remember having to use this when I was writing a script my first year at VW to output an animation of a door opening, sending me back to my early years 😛 

    • Like 1
  2. Hi!

     

    On 9/7/2023 at 10:42 PM, floring said:

    1. How to use PenLoc() correctly; now it is always returning 0.0, 0.0 (the center of the page)

    According to the developer wiki, you have to use GetMouse for this. There's a note stating that PenLoc will only return the location of the pen within a script, not the location of the user's coordinate of the mouse. See PenLoc

     

    On 9/7/2023 at 10:42 PM, floring said:

    2. How  to tell a newly created class to "Use at Creation" 

    Consider using SetClUseGraphicSetClUseTextStyle, and SetClUseTexture

     

    On 9/7/2023 at 10:42 PM, floring said:

    3. How to tell the plugin script editor to use spaces when tab is pressed?

    Can you be more clear with this? Are you saying that when you're typing code into the editor that the tab key is inserting a tab character instead of a set of space characters? Can you provide a short video demonstrating this?

  3. On 8/31/2023 at 12:00 PM, Michal Zarzecki said:

    When I built the Marionette in line with @Letti R's structure using the Get 3D Info node, it returned an empty group 🤷‍♂️.

     

    On 8/31/2023 at 4:24 PM, Letti R said:

    The problem with the 3D info is, that you can deactivate the 3D part of this PIO and than the 3D info will return a hight of 0. Which ofcourse is correct, but not what we need.

     

    So it sounds to me that there isn't anything actually wrong with the 3D Info node, but that whatever you're feeding it into isn't handling a zero input correctly. Thanks for clarifying!

  4. @Michal Zarzecki @Letti R

    Can you tell me what issue you're having with the Get 3D Info node? 
    I'm not having an issue here, but would like to make sure there's not something I'm missing. 

    As for string to number conversions, I don't believe Vectorworks has any built in functions for that, and we haven't yet written a comprehensive node to do the necessary handling. Letti's approach is similar to how I would tackle this, but I am also working on writing a conversion node, just I haven't had much free time to tackle it while testing the new version of VW. Hopefully after release when things slow down a bit I can make more progress.

  5. Are you looking for something that gives you the order of the layers dependent on what you have these sorted by?
    The Nav Palette and Org Dialog don't appear to be in sync, so the displayed order could be different between them.
     

    I don't think there's a way to pull what these dialogs are sorted by, but you can create a script based on stacking order or sort them alphabetically/by other value

    • Like 1
  6. On 8/27/2023 at 4:35 PM, rudybeuc@gmail.com said:

    Is there a resource with a bit more contextual information about how each node is used?

     

    Not currently, we're looking into a way to better document nodes, but we don't currently supply anything ourselves. I believe this was user made a while back.

     

    I can try to find time to mock up a file that can give you a framework to working with nested groups/symbols soon.

    • Like 2
  7. @HebHeb

    It appears this is happening because it's counting the "Fr" in From and not just Friend, if you change the capitalization to lowercase for "from" then it works.

    I'm looking into this, the strip function is built-in for Python, so we don't do the handling for it within this node, but maybe there's something we can do to add our own handling.

     

    Edit:

    Here's a post about how the Python "strip" function works:
    https://stackoverflow.com/questions/1687171/why-does-str-lstrip-strip-an-extra-character
    I'll think about how we can get around this limitation.

    In the meantime, I would suggest using the Replace String node with an empty string as the input for sNew.

    • Like 1
  8. Here's a quick pair of Marionette scripts that may help

    The top one looks for objects associated with existing data tags

    The bottom one checks symbols in the document to see if they're associated with objects, and returns the object type.

     

    Your file only had objects with Data Tags associated, so I'm unsure how it would behave with other objects, but it should at least point you in the right direction.

     

    I used User Function nodes instead of hardcoding new nodes, but you can see what functions I used in the OIP of those nodes.

    Check if Objects at Tagged_MFarrell.vwx

    • Like 1
  9. There are a few approaches you can take for this, all would result in a Marionette Object.

    1. You could store the geometry of this object in the Control Geometry portion of a Marionette Object and reference the parts in the Marionette script to make adjustments
    2. You could redraw most/all of the geometry as a standalone script and have nodes that modify them
    3. You could store this object as a symbol and extract the parts of it to use in your Marionette Object.
    4. You could do a combination of all mentioned above

    The current issue with the geometry in your file is that you can't use the symbol object if you want to allow users to have different colors/textures per fixture, you'd have to extract the geometry from that symbol and place it to do that.

     

    I believe our default content includes every node you'd need for any of these approaches.

    Nodes that you may need that aren't obvious are

    • Input > "Control Geometry"
    • Objects > Lights > [various in the category]
    • Attributes > Set Operations > "Set Material"
    • Operations > "Contents"

    If you let me know which approach(es) you'd like to take, I can try to mock something simple up to demonstrate a workflow.

    • Like 1
  10. 11 hours ago, SamIWas said:

    But PenPat 1 isn't a dash style.  It's the PenFore color, while PenPat 2 is the PenBack color.

     

    That's not my understanding. PenPat and PenPatN both set the active linetype, or dash style.

    PenFore sets the front color of the pattern and PenBack sets the back color, which you use in your script.

    • Like 1
  11. @sandertb

    A few things while I'm still in process of finding a solution.
    When you ungroup your object (in a 3D view), you can see that you still have your NURBS profile, which I think you made effort to delete in your code, so may be worth looking into.

    Also, it appears that your texture is being set as Surface UV mapping, if you can get this to always draw with Auto-Align Plane, then I think it would solve your issue.

     

    I'm playing with SetTexMapBoolN to try to resolve this as it works with an EAP object not inside of a PIO, but maybe am referencing the wrong object when placing it in your code so far. The only thing I worry about is I can't get the texture to redraw on the object even while using ResetObject and ReDrawAll, so that's something to also be mindful of. 

    I'm going to submit a bug about that and see where it goes, but for now I think the focus is setting the texture mapping appropriately on your object.

  12. @panpan

    Your script above doesn't link the record to the symbol.

    Here's a fix:

     

    vs.BeginSym('room_index')
    vs.Rect(0,0,1,3)
    vs.TextOrigin(0,0)
    vs.CreateText('*')
    vs.LinkText(vs.LNewObj(),'Rec1','Field1')
    vs.EndSym()
    vs.Record(vs.LNewObj(), 'Rec1')

     

    Hope this helps!

×
×
  • Create New...