Jump to content

AlHanson

Member
  • Posts

    86
  • Joined

  • Last visited

Everything posted by AlHanson

  1. Version 1.0.0

    19 downloads

    Quickly converts a single value to a vector
  2. The Procedures list in the Script Editor would benefit from a search function to more quickly find commands when you aren't sure exactly what you're looking for or which category to find a command under.
  3. This should be a simple addition- It would be nice to get a static text note in the Object Info for a Viewport on a sheet layer that lists the resolution of the rendered viewport. Simple math based on the dimensions of the viewport and the DPI of the sheet layer. I often catch myself not paying attention to the size of renders I put on a large Arch D or E page and sometimes set the DPI way higher than it needs to be for the page. Having the capacity to quickly see the output resolution for that viewport would be very useful to determine a proper DPI for the page based off the content being placed on it.
  4. I'm attempting to pull the name or handle of the Texture that is assigned to an object and I can't come up with a working method. Get Texture Set (vs.GetTextureSet) looks like it should do this, but I can't get it to return anything beyond a 0 int. Any insight?
  5. Is there any way to pull the height or aspect ratio from a texture resource? I'm struggling to find any vectorscript or existing marionette commands that can get texture information beyond the width, which is not useful when a texture is not a square image.
  6. The strangeness has to do with your network structure through the IF nodes. The IF wants two data set options versus functioning as a post node downstream routing control like you're attempting. Rather than 2 IF and 3 Separate Symbol/Move commands, you can do this with a single IF, Symbol and Move command. Use the IF to determine if it should insert 1 or 2 pillows as you are but rather than directing the symbol name string, have it direct either the single insertion point, or a list of insertion points for multiple pillows. The symbol node is able to process the list of multiple points, so a single node will run twice if a list of 2 points are sent to it, and then the move command will handle the list of both pillows. I've attached a tweaked version for you to check out. bed v4B.vwx
  7. Found this old post while working on my own batch importer, so maybe you've figured this out by now? I can't find any information or the existence on this vectorscript command anywhere online though so maybe it's somehow an outlier that wasn't documented, but it's in the Procedure List and is working for me in 2020/2021 (maybe wasn't around for 2019 when this was in question?). BOOLEAN = vs.Import3DSFile(fileName, atOrigCoords, position) Were you successful with your batch importer? I'm running into some complications with the OBJ command processing lists of objects to import and retrieving handles for the imported objects that I'm slowly working my way through; would be great to get some help from somebody who's done it successfully.
  8. I second all these points (the integer restriction on the parameters is super annoying!!) and have more to add: -The Focus Point hasn't been terribly useful for me (Didn't even seem to work for me the times I tried it in 2020?) as this appears to automatically snap focus to the 3D center of the object the framing isn't always great. Would possibly work better if you could independently lock the Pan or Tilt to the Focus point so the pan always looks to the object but the tilt can be adjusted as needed? Or vice versa depending on the scenario. -The Tripod needs to be parametric. There's been many times that I'm trying to line up a shot and its too low with the 48" stand, but too high with the 62". Sometimes I can get away with just cheating this on the Z height but I generally am showing camera position in my renders, not just the shot framing and cant just have cameras floating in the air or poking through the floor, or go to the effort to make custom tripods for various heights. -The 2D Field of View line line are definitely way too short in most instances and should be configurable. Just make the line length a parameter and we're set. -Need text options! I can give a camera a name and position but I have no means to insert that text by the camera for identification? Simple Text Options like the ones included with the Television tool would work just fine here. -Need a PERMANENT link to viewports. This has been a frustration of mine with Vectorworks forever. It's not enough to convert a camera to a viewport, I need to have a viewport that is always connected to this camera object and updated automatically with changes. I do a lot of projects that show camera shots and story boards so if a camera position or focus changes I need to update it in multiple sheets and this is irritating. -It would be great if there was some kind of saved view preset option here because I'll often need to show multiple shots from the same camera but it can only ever have one focus at a time. I generally just solve this with multiple layers/objects but its frustrating to be talking about camera shots with a client and have to hop out of one camera and into another to show a different shot. This could tie into the permanent viewport too, with the viewport referencing a specific camera and a specific focus configuration -This would probably need to be another tool but it would be great to have a configurable Jib option as a stand type -This is probably getting too overkill for one tool but it would also be great to have the Camera Path tool baked in in some fashion to more directly create jib motion and dolly shots -a minor annoyance: Why are is the VariCam 35 Body white? I'm not doing anything that requires the exact camera bodies that are going into production so I tend to just wind up with this as the default, but it's white and sticks out like a sore thumb and I have to change it in classes or the symbol or change the body. White versions of this don't seem to exist in any half assed Google image searches I do. 😄 I also have a heap of bugs I've been needing to file a proper report for but was waiting to see if 2021 magically fixed any of these.... They hit a couple, but I still have some doozies here if they're of any worth to anybody else to jump on. -I'm still encountering Symbol ghosting when using the tool. Example, insert any symbol (a chair symbol for example), switch to the video camera and it will show the outline of the previously used symbol as if you're inserting the symbol. Click and it will insert the camera but it will also leave behind the symbol outline which does not register as an actual object, cannot be interacted with and will only go away when you close and reload the file. (see image) -Layer Height isn't being factored into tool at all and having a camera on a layer set to anything other than 0 will make viewing anything through this camera completely wrong. -Mirroring a camera will break the Aim function because the object is mirrored. I end up with this whenever I'm quickly trying to mirror cameras across a center line if I don't remember to correct the flip. -The Aim function is helpful in getting started but doesn't seem to give me a usable tilt in any attempt I make. In 2D it always sets tilt to -20 and 3D seems to always go to +20. -The tool just does not play nice with the Multi View Panes and Mutli View Panes are made for this tool to see everything in 2D but have your camera views in other panes. I try to use this with a 2D view and a 3D camera view via the Activate Camera button and it will work fine at first but making changes can mess up the view panes. Like activating a camera in 3D and then trying to use aim in the 2D pane will completely break the view of the 2D pane and put it into 3D mode with a weird configuration. -Field of View has some general wonkiness. Again with Multi View Panes. The 2D FOV will not get drawn if the 3D is active. I generally only use 2D Show Field of View and it will not show when a 3D view is active which is very unhelpful when considering sightlines. -I just encountered this a few times in my 2021 tests, but haven't nailed down an exact cause to replicate it- Sometimes the drawn FOV breaks free of the plug in object and I had both 2D and 3D versions getting drawn as just individual line objects on the design layer not even lined up to their intended camera positions. These were entirely separate objects that I was able to delete so there's that at least. Old issues that were MAYBE fixed from 2020 to 2021 since I can't seem to replicate them with my limited tests: -The 3D Geometry of some of the camera lenses will end up in renders and block the shots. That was a super frustrating 2 hours of troubleshooting until I realized my renders were coming out solid cyan because it was rendering the camera lens. Looks like this might have been fixed or I just haven't hit the right settings to trigger the problem again. I was able to fix this by just turning off the camera classes in the viewport but sometimes I need to see other cameras in the shots to show when things aren't well hidden and this can get deceptive -The imported camera symbols were Purgable and made a mess of your cameras if you purged the symbols out of the drawing. This one looks to FINALLY fixed in 2021.
  9. I stumbled on the solution to this! Seems obvious it hindsight, but I didn't think the Name node would work on items in the Resource Library, only items in the drawing. Using the Name node and referencing the texture resource name will produce the handle you need for the Get Texture Size node to work. This is a bit clunky for scripting (at least as I'm trying to use it) but I made one minor tweak to the Get Texture Size node to pull the handle by name and the whole thing works the way it seems like it should now. I've attached a file with the modified node if it's of any use to anybody else. Enjoy! Get Texture Size v2.vwx
  10. I tried removing the first lines as you suggested and it doesn't make any difference for me- the new node doesn't function without plugging in an existing group handle. Removing those lines *shouldn't* affect anything- they're both comments that are unrelated to the execution of the script as you say. The first #COMMAND... is only to flag the script as read only. The only thing removing it should accomplish is allowing you to save any changes made. So if that's making the node function on your end that is quite bizarre... but seems to be par for the course for my experience with Marionette so far.
  11. I've noticed the Group node not functioning correctly lately as well and just assumed it had do to the usual marionette quirks and found other work-arounds. This post prompted me to open up the script and take a look. The node was updated in April and added 2 lines to the script to perform a conditional check before running the existing group script. Unfortunately my python is very limited and I'm not entirely sure what this code is meant to accomplish. The April 2020 Node will only function correctly when an existing group handle is provided. So it appears that the If statement is checking that the variable 'original' is a group Handle, and if so will run the rest of the script. With no group provided, 'original' returns 0, therefore isn't recognized as a handle and the code in the If portion does not execute and does no grouping. I think there should be an Else statement here with some slightly different code to create a new group when the If portion fails, but I don't follow why this would be necessary when the 2019 code worked fine without the change. Basically, this appears to just be a bug that should be reported as best I can tell. Maybe somebody with better python/vectorscript knowledge can shine some light on this and explain things if I'm wrong.
  12. Thanks Pat. I'm still confused- what you described is exactly what I was trying and I'm still coming up with a 0 float value on the Texture Size via both the Get Texture Reference and Get Texture nodes. The iTexRef value both nodes provide the index location for the texture (at least I'm assuming that's what this integer value represents?), which presumably should function as the handle here? The texture is currently set for 1" in the resource, so something is not quite right here. I've attached a test file for reference. TextureScaling.vwx
  13. I'm attempting to retrieve the size of a texture and the 'Get Texture Size' node seems to fit the bill, but I'm not able to figure out what input the node wants. I've tried the Get Texture node with both the string name and the integer id from this but neither seems to be what the vs.GetTextureSize() command in the node wants. The description and web info for this vectorscipt command are lacking. How do you interact with this node, or if not this node, how can i go about getting the size of a texture resource?
  14. ...Or using 159 does in fact work. Not sure what I did incorrectly the first time, but it's working now after another attempt. Love it when I solve problems by opening and closing the program...
  15. Not sure how much of this will be the same for 2016 as I know a lot of things were renamed and added later. You're looking for the Popup node. You'll have to Edit it with some minor changes to customize it though. 1-Remove the line at the very top "#COMMAND;READONLYREFFILE;[VWLibDef]/Input\PopupWidget.py;" (This is basically here to lock the node as read only) 2-Change the existing choice list. Keep everything in single quotes to establish strings and you can add more entries by separating them with a comma. This node only gives you Integer values for the item you select from the pop up. @MRoth has provided an excellent modified Pop up node that also provides the string text here:
  16. Continuing to mess around with this- I did find that using int 159 is actually the better usage for the Get function to retrieve just the Title without the Number. Doesnt seem to do anything to help the Setting problem.
  17. I'm attempting to make some nodes for interacting with a Sheet Layer's Sheet Title. I've been able to make the Get Title function work correctly (Although this does also grab the Sheet Number- any way to avoid this outside of scripting its removal?) but I can't seem to get the the Set function to work. I've also tried to just replacing the variable I've created with a string value without success. Here's the code as I've cobbled together and VWX is attached. Sheet Layer Marionette.vwx @Marionette.NodeDefinition class Params(metaclass = Marionette.OrderedClass): #APPEARANCE #Name this = Marionette.Node( 'Set Sheet Layer Title' ) this.SetDescription( 'Retrieves the sheet title from a sheet layer' ) #Input Ports obj = Marionette.PortIn(vs.Handle(0), 'hLayer') obj.SetDescription( "The input layer object") string = Marionette.PortIn( '[Sheet Title]', 'sTitle' ) string.SetDescription( 'The sheet layer title' ) #OIP Controls #Output Ports layer = Marionette.PortOut('hLayer') layer.SetDescription( "The handle for the layer" ) #BEHAVIOR def RunNode(self): #inputs x = self.Params.obj.value title = self.Params.string.value vs.SetObjectVariableString(x, 162,title) #script #outputs self.Params.layer.value=x
  18. Bah, of course it's that easy. Too busy staring at the field names on the fixtures and not thinking about what the record name is actually using. At least it a simple fix. Thanks!
  19. I'm using the Get Record Node to pull information from Spotlight Lighting Fixtures, and I'm getting everything I try just fine with the exception of Instrument Type which just returns a blank string. Anybody know what would cause this? Image and test file attached. MarionetteLightRecords.vwx
  20. I've been using the Ordered List along with the Concatenate Node to combine strings for my tools for a while now and have never had any issue with it. Recently, I've been having trouble getting this to function correctly as it has started giving me a list style string. In this example I'm just trying to create a simple #/# value display- just a simple / between two string values. I should be getting 1/23 from this however I'm getting ['1', '/', '23']. I've generally been working with the ComputerWorks Easy Text node, so I checked this against the stock Text node and the problem exists here too. The weird thing is that if I go back to my tools that have used this exact same method to generate text and copy/paste the Ordered List & Concat nodes into the file they work just fine and produce the previously expected results. Checking the script in the newly inserted nodes versus the copied node shows no difference- they match up exactly. Example file attached. Very confused with this and looking for some help or guidance on a better method for building strings? TextConcat.vwx
  21. The Set OIP node does not appear to function when the OIP Name has a space in it. Is there any trick to using Field Names with space to get the space to process? EDIT: Figured it out- just a simple underscore will replace the spaces just fine. Great node btw!
  22. It would be great to see the face counts of Mesh objects in the OIP for the mesh rather than having to go edit the mesh or find this number in the Simplify Mesh command.
  23. Is there any way to directly access the secondary units that are configured within a document via Marionette? For example, I'm playing with a script to basically recreate the existing Scale Bar tool, but using dual dimensions (feet on top, meters on the bottom). It's easy enough to build this using basic math conversion for a set secondary unit or manually typing the secondary unit in to convert the dim value, but it would be great to directly tie this to the defined secondary units for flexibility and to see those units displayed properly in the OIP. Digging through the DIM node's code it appears that this could be a simple matter of changing the value in the line "units = vs.GetPrefReal(150)" to "units = vs.GetPrefReal(200)" per the VS:Function Appendix (http://developer.vectorworks.net/index.php/VS:Function_Reference_Appendix_F#Secondary_Units_Selectors) but that doesn't seem to work for me, so I guess it's actually tied to the current OIP Marionette.WidgetType.RealCoord implementation?
  24. I'm looking for a way to have calculated information appear in the OIP, ex making a simple grid object that will display the total number of points in the OIP. For a simple 10x10 grid text like "Total Points: 100" would show. Looking through the Marionette Implement a Node guide (http://developer.vectorworks.net/index.php/Marionette_Implement_a_Node) seems to point toward a Static Value if I'm understanding what I'm looking at correctly. I lack any real python knowledge and my attempts to use other nodes for reference to create a node aren't working for me. Is this the correct direction, and is there a way to implement this function into a marionette object that I'm not finding? Assuming I'm heading in the right direction here, is there any way to implement this as a stand alone node that can get values plugged into it within the network? I'm surprised to not find any current implementation for all the OIP functions in the node library. I was ecstatic to stumble across the Separator Node in @sbarrett's Festoon Strings object, and working with that has been a game changer for a lot of my little projects. It would be lovely to have easier access to similar functions in the OIP. Will nodes like this eventually end up in the main Marionette library?
  25. I've experience all these issues as well working with Marionette. Haven't found any common cause or timing, it just feels like it becomes gradually corrupted to the point of being completely non functional until Vectorworks is closed and restarted at which time everything seems to return to normal.
×
×
  • Create New...