Jump to content

Justin Smith

Member
  • Posts

    32
  • Joined

  • Last visited

Everything posted by Justin Smith

  1. Thanks Andrew and Miguel. I think I'm going to try Andrew's 1st suggestion, as I've done some similar scripts (working with symbols rather than plugins. )
  2. Curious if it's possible to Customize Spotlight (or any other included, standard) plugins that come with the Vectorworks suites, beyond just adding parameters. I see that it's possible to add additional parameters to the plugin records. I'm using this for instance with the LED Screens plugin. I've added a weight parameter and I can now calculate the weights of the screens directly in my worksheets. That's great, however, I'd like to extend my customized LED Screen plugin with actual code too! Currently the plugin only works with labels in the 2D View. In this case I'd like to create a 3D label that is added to the LED Screen in 3D, in addition to the standard functionality. Ideally I'd like to execute code after the rest of the plugin is done generating the geometry. It'd be great if this was part of the "Customized" plugin itself. However, if that's not possible, what about a second script that comes in after the fact and adds the 3D label to all of my LED plugins?? I guess that would work, I'd just have to iterate through the drawing and search for plugins records that match the LED Screen Record, correct? Would I be able to add my geometry inside the individual LED Screen PIO's, or would they have to be outside that PIO geometry? Thanks for any insight
  3. Hmm, possibly I've only used this to import Hybrid or 3D symbols. Let me look into this
  4. Still would love some insight here. The workflow I'm trying to accomplish is loading up images from disk automatically (based on a worksheet) and then creating a renderworks texture out of them. So far I can only figure out how to import the images as an image and can't convert them to a textureBitmap. Here's code (partially taken from a VW sample plugin). How or what could I do to instead of insert a image below insert a bitmapTexture?
  5. I updated my make unique code here. This only works for 3D symbols that are not inside of a group. https://gist.github.com/justinmilo/bbc1d64f28509737b601#file-makeunique-py
  6. Hmm was still a zip in my 2015 not a package.
  7. Here's my base functions that load up a symbol in the folder inside my plugins user folder called "JRSPlugins/JRSPythonProjectsLinked/VWXSymbols" I have a gist of this code here: https://gist.github.com/justinmilo/d85a048cb1ec4ce54270#file-jsbase-py ef JRSymbol(name, x, y, rotation): if not symbolExists(name): importSymbol(name) vs.Symbol(name, x, y, rotation) return vs.LNewObj() def importSymbol(id): aListID = 1 objectType = 16 #Symbol Index folderIndex = -2 # Plug-In Data Folder (negative means user folder) aListID, numOfItems = vs.BuildResourceList( objectType , folderIndex, "JRSPlugins/JRSPythonProjectsLinked/VWXSymbols") aString = "" for i in range(0, numOfItems): #myInt = vs.InsertImagePopupResource (dialog1, 4, aListID, i) name = vs.GetNameFromResourceList (aListID, i) if name == id: vs.ImportResourceToCurrentFile(aListID, i) def symbolExists (id): objectType = 16 #Symbol Index folderIndex = 0 # Current Document aListID, numOfItems = vs.BuildResourceList( objectType , folderIndex, "") for i in range(0, numOfItems): name = vs.GetNameFromResourceList (aListID, i) if name == id: return True return False def Symbol2D3D(SymString, X, Y, Z, Xr, Yr, Zr): JRSymbol (SymString, X, Y, Xr) vs.Move3DObj(vs.LNewObj(), 0, 0, Z)# to move an individual
  8. Ahh I should be using CreateThumbnailPopup not CreateControl Thanks to Klinzey for the tip
  9. Thanks guys. Klinzey. Totally right. I should be using CreateThumbnailPopup not CreateControl. Carry on!
  10. Questioning wether the issue i'm seeing is related to the same depreciated calls I'm having issues with vector script Modern Dialogs that work fine in 2014, but they are ?not working? in 2015. The dialog seems collapsed in 2015. I am wondering if it has something do to with the swap to cocoa. I'm running OS X Mavericks. screenshots below: https://www.dropbox.com/sh/0u0g3m6e4tpij75/AADsXpB8e4sFLPhazlCDvVtma?dl=0 The code is as follows: dialog1 = vs.CreateLayout('Select From this list', False, 'OK', '') vs.CreateStaticText( dialog1, kListBox1, "My test String", -1 ); vs.CreateControl(dialog1, 4, ImagePopup, 'displayName', 0) vs.SetFirstLayoutItem(dialog1, 4) vs.SetBelowItem(dialog1,4, kListBox1, 0, 0) myInt = vs.RunLayoutDialog(dialog1, dialog2_Handler)
  11. Jim, I'm having issues with vector script Modern Dialogs that work fine in 2014, but they are ?not working? in 2015. The dialog seems collapsed in 2015. I am wondering if it has something do to with the swap to cocoa. I'm running OS X Mavericks. screenshots below: https://www.dropbox.com/sh/0u0g3m6e4tpij75/AADsXpB8e4sFLPhazlCDvVtma?dl=0
  12. Hah! Why didn't someone mention CreateDuplicateObject! Thanks pat.
  13. In sketchup there is a "Make Unique" command in the context menu when you select a symbol, it works great for just what you are talking about. I'm working on making a similar menu command for Vectorworks. It's in python. I've added as a gist here if anyone's interested. https://gist.github.com/justinmilo/bbc1d64f28509737b601#file-makeunique-py BTW, why don't plugin's work as contextual menus?
  14. Pat, I've run into that issue myself. Is there a work around to get the actual objects width and height?
  15. Jim how about my favorite pet bug? Rendering of image bitmaps in OpenGL and Renderworks views. If you remember some times image bitmaps would render in 2014... and then sometimes they wouldn't. That fixed by chance? How about Vectorscript/python improvements. Anything been added or updated there?
  16. FYI I got this working by looking at a great sample script for python that was posted.
  17. Has anyone else run into an issue where bitmap images won't show up in OpenGL rendered viewports? Bitmaps seem to always show in my design layer views but as soon as I bring them into a viewport they vanish. Only show up with wireframe. I've checked the usual suspects and have Planar display on. I've also made sure my OpenGl viewport settings are the same as my Layer OpenGL settings. This might be related to an issue where render works can't render bitmap images in some case, which Jim let me know is a known issue. Here's my post on that. https://techboard.vectorworks.net/ubbthreads.php?ubb=showflat&Main=39870&Number=198509#Post198509
  18. Anyone one have any luck using ImportImageFile ? Every file I try keeps coming up Nil...
  19. Anyone know how CreatePaintFromImage or CreatePaintFromImgN are supposed to work? I've tried passing both an image (14) and a TextureDefinitionMaterial (97) and get back a nil obj. I'm also not exactly sure what a "paint node" is. "Return Value Returns the handle to the newly created paint node." My hope was that it would take a bitmap image and convert it to a texture bitmap.
  20. So it definitely appears that I need to be using a bitmap texture with vs.SetTextureBitmap(shaderRecord, textureBitmap): What I need to figure out is if its possible to go from a bitmap image to a bitmap texture. Some of the paintnode Functions perhaps?
  21. So i'm running into the same issues. Not really sure what this image texture (93) is or how that relates to a bitmap (14). I'm trying to go the other way, from a bitmap to a texture. I want to grab existing bitmaps from the drawing (not bring up a dialog box that asks to locate an image). Can't seem to figure it out.
  22. Any one have any luck with this function? def vs.SetTextureBitmap(shaderRecord, textureBitmap): return None I'm trying to pass a bitmap image (ObjectId 14) into the function. Doesn't seem to be working. Do I need to be using a bitmap texture? What I'm trying to do is take a Bitmap Image object and make it into a texture with an image shader. I make the texture fine, I can add the shader record. Just can't seem to add a bitmap to the texture. Specifically want to add a bitmap that is already in the document but not setup as a render works texture.
  23. Alright so I'm definitely still seeing this issue even when the bitmaps are floating in in space. If i move the bitmaps to a smaller file they seem to render fine. In bigger models they fail to render. At least this is my new hypothesis.
×
×
  • Create New...