Jump to content

AlHanson

Member
  • Posts

    86
  • Joined

  • Last visited

Reputation

17 Good

Personal Information

  • Occupation
    Entertainment Designer
  • Location
    United States

Recent Profile Visitors

1,868 profile views
  1. You basically answered your own question already. 😅 Look at vs.GetZatXY. It can be a little flakey from my experience though, and works best when you specify the object handle rather than leaving it as None and having it figure things out for you. Even when specifying the object to check against I occasionally still get incorrect results which cause some situational funkiness.
  2. The PIO is going to function just like a symbol with separate 2D/3D. The stage pieces are being treated as 3d and the dimensions are 2D, hence why you're only seeing the dimensions in 2D. There's a couple different solutions for this depending on your needs: 1) Assign the dim objects to the ground plane with vs.SetPlanarRefIDToGround() and then they will show in 3D with the rest of it. If everything is 3D it will always draw the same in 2D and 3D. It'll work but it's not always the most optimal approach. 2A) Draw a 2D version of the stage pieces as well as the 3D. Just like a symbol you'll see the simplified 2D version when in 2D only and the full detailed in 3D. 2B) Use vs.Generate2DFrom3DComp() to have Vectorworks figure out the 2D version of your 3D for you. It can get slow depending on your 3D but would likely be just fine for something basic like some rectangular platforms
  3. Kinda? I never had any luck getting this particular approach of inserting a popup into the OIP to work, but eventually found no reason to approach it in this manner. The easier approach I've been using which I've never had any issues with is just creating a popup field parameter via the plug in editor and then just populating it using the vs.vsoWidgetPopupAdd. Unless there's some reason to not approach it that way, that's my recommendation.
  4. This should be your missing piece- Try dropping this into the kObjOnInitXProperties event. kObjXPropSupportResourcePopup = 53 vs.SetObjPropVS(kObjXPropSupportResourcePopup, True)
  5. Actually, just figured it out! If anybody else needs the help in the future: Use vs.NumCustomObjectChoices to loop through the index range and vs.GetLocalizedPluginChoice to get the values at that index.
  6. Anybody have an approach for getting the options from a pop-up field in a Plug In Object? vs.PopupGetChoices doesn't appear to work with hidden parametric records from everything I've been throwing at it. Tried both field name and localized field names and I always get 0 for the number of values and None for the list returned when used on a PIO Record. Works fine on standard record definitions in the resource browser. This command didn't exist before v2023 so there has to be an alternate approach I'm overlooking... I hope?
  7. Does anybody know a way to modify a texture’s image shader map to flag the image as Inverted? Trying to make this an accessible option on a batch import script and I can’t track down anything that controls this directly, or even indirectly via records or variables for the shader or the bitmap on the shader. The shader records themselves only contain the basic parameters and nothing specific to the image. The image field of the shader record always seems to just be ‘4’ for every texture and I can’t figure out what that means, as it’s certainly not an image index. Any thoughts?
  8. Digging a bit deeper today... and it doesn't seem like this is possible at the moment? VS-List_Browsers_part_4 Went back to this very helpful guide and found there are some specific notes about the LB events that call out direct edit not being VS accessible. Older version listed, but from my testing with it today I'm not receiving any of these events in 2023 either when interacting with an editable field in my browser. Guess we're out of luck for the time being?
  9. @Gelde-Aart I actually hit a point on the plug in I was intending to use this on that I didn't wind up needing it. I came across the read only commands while looking for some other info, plugged them in just to see if it would function and it appeared to work initially. I was able to enter the field and type in new data but that's about all I tested at the time. However when I load that script up today the read only control didn't seem to want to enable anymore at first. After a few tries of me throwing in some debug stuff to try to see what was going on it suddenly finally kicked in and gave me the option to edit the fields, but the new values I type in won't actually stick. I was thinking maybe something would have to be scripted to commit the change, but I tried monitoring the events happening via vs.GetLBEventInfo and while kMessageSelectionChangeClick (-4) gets flagged when entering the field, no events appear to occur when committing or exiting the field after a change. So there's something more to this I'm missing... I'll have to dig in deeper whenever I can find some time to experiment and see if I can figure this out.
  10. I'm struggling with adding a resource popup widget to my OIP. I can make a resource popup work with using a kWidgetButtonResourcePopup (105) and then calling vs.vsoButtonGetResource when the widget button is pressed just fine, but it sure isn't as pretty as the actual resource popup. 😁 Whenever I use kWidgetResourcePopup (107) I'm adding the popup to my OIP just fine, however there's no data there and it's just greyed out. Clicking on it doesn't cause the resource pop up to display like with the button, nor does it do anything in terms of flagging events like the kWidgetButtonResourcePopup approach. I've enabled kObjXPropSupportResourcePopup (53) via vs.SetObjPropVS during kObjOnInitXProperties. I've tried using vs.vsoWidgetPopupAdd(N) to feed random data to it which doesn't seem to be the way to go about this. Doesn't seem to be a way to link it to a resource list that's been built...? What am I overlooking here to make this work?
  11. FYI for anybody looking for help down the line- vs.SetLBReadOnly & vs.SetLBItemReadOnly cover this, however in my testing it works as should on Windows but doesn't seem to function correctly on Mac? Need to dig in further...
  12. I thought it might function like this somewhere... why I didn't look at the NewField when digging around is beyond me. Thanks everybody!
  13. Is it possible to create a Record Format via script? I'm not seeing any commands related to this...
  14. Is it possible to edit/enter text/dimension fields directly in a List Browser? I don't seem to be finding any function controls for this nor seeing any details in any of the resources I've spent the past hour digging through. Anything I'm overlooking here or is this just not possible at the moment?
  15. Didn't ever see any alerts that there was a response here! Correct, this is just a bunch of light objects in spotlight mode. The code creates some lists for the general properties for the light and then applies everything using the basic property adjustment commands for the spotlight in a For loop for the list of insert points. I've tried disabling some of the other property setting commands to make sure they aren't having any possible impact and I still get the same results when running. So this is the bare bones of what's going on: for pt in ptList: #for each point in the list of insertion points hLight = vs.CreateLight(pt[0], pt[1], pt[2], lightTypeDic[lightType], bLightIsOn, bCastShadows) #Insert a light vs.SetLightColorRGB(hLight, rgb[0], rgb[1], rgb[2]) #Set the color of the light Everything is still functioning correctly in the tool. Colors are clearly set correctly on the light objects, they just don't render any output properly in Shaded Render mode, but will render correctly in Final Quality. This screams bug to me based on that fact unless there's something else I'm overlooking.
×
×
  • Create New...