Jump to content

Nebeor

Member
  • Posts

    49
  • Joined

  • Last visited

Everything posted by Nebeor

  1. I made an extension tool that derives from VWExtensionTool like in the provided SDK samples. How can i add preferences AKA object properties or parametric record to this, so that i can edit those as settings for the tool, like in this little screenshot? I was expecting a solution similar to VWExtensionParametric for VWExtensionTool but i didn't found a way to include the parameter definition array, Thanks beforehand for your advice.
  2. Nebeor

    gSDK->GetViewMatrix

    Thank you, This works, but i would like to understand he story behind TransformMatrix and VWTransformMatrix. What's compatible and what is not?
  3. Nebeor

    gSDK->GetViewMatrix

    I'm trying to transform a 3Dpoint in my drawing to a point in the screen, intuitively I would multiply with a (VW)TransformMatrix that should be easy to retrieve. I tried this: VWTransformMatrix viewMatrix; gSDK->GetViewMatrix(gSDK->GetActiveLayer(),viewMatrix); This line returns a empty (identity) matrix, even when i'm not in top view. I'm using an isometric perspective. What could I be doing wrong?
  4. This was exactly what i was missing, it is actually the same as it was in VectorScript.
  5. Hello Stefan, Maybe i wasn't very clear from the beginning. I'm doing exactly as you told me, it's just that it doesn't work. if I double click, i just receive the default dialog that says: choose component : path or profile(because it's a 2D path object), instead of executing the code that i putted in my overridden function.
  6. What should be the purpose of the class of the sub object, should it affect the drawing visually, even when the parent is set to another class? Does this class changing involves plugin objects?
  7. Which SDK version are you using then? Why does the name of the class starts with 'XXX' and not 'VW'?
  8. Thank you for your reply, but, i don't have a XXXRegenSink in my SDK, i'm using Vectorworks 2015. I already tried to overload VWParametric_EventSink::OnSpedialEditID() in my subclass but it didn't seem to work.
  9. How do i show my dialog instead the default dialog when double clicking on a plugin object? In VectorScript this is quite simple, but here it isn't. Intuitively i would think i just have to overwrite override a method of the VWParametric_EventSink. Do i have to use another EventSink specific for clicking? (as there is one for panes) Thanks in advance!
  10. My problem was not related to the plugin that's not transparent, but to extrusion inside: I had to use gSDK->setFillpath(h,0) two times: on the 2DpolygonObj that got extruded on the extrusion itsef. Problem solved!
  11. You give a lot of good suggestions but these will still have some impact on how my end users experience my plug-ins that are originally written in Vectorscript.
  12. When in the OpenGL render mode: I have some trouble with selecting objects that are behind or in the middle of a PluginObject written in C++. This problem doesn't occur in Vectorscript. The blocking object itself containts a transparent extrusion, but It doesn't seems to be transparent itself. I didn't found a way to set the PluginObject itself to transparent other than changing it from class. In other words: I'm looking for some function that can almost any object transparent and not just 2D poly's. like with gSDK->SetFillPat(rect,0); -Edit What I forgot to mention is that at first my extrusion was made transparent just by assigning a class that was set to no fill, this wasn't enough to solve my needs.
  13. std::getLine has nothing to do with my problem but i do should replace it with something native to TXString. casting TXString to std::strings is a quite awful idea.
  14. I have rewritten all my VectorScript Plug-ins to SDK Plug-ins: It doesn't crash anymore. The treatment of 'ResetObject' in Vectorscript or in the SDK seems to follow a different logic, maybe this has something to do with it. Maybe with implementing all the still lacking features, I will find out what might be wrong.
  15. With a logfile I was able to see that there was nothing that halted the execution of the kid's script.
  16. i'm using a VWPolygon2DObj poly as pathhand: it's shaped to a closed rectangle, I suppose there is nothing wrong with that. VWPolygon2DObj poly = VWPolygon2D(); poly.AddVertex( 0, 0, false ); poly.AddVertex( 0,depth, false ); poly.AddVertex( length, depth, false ); poly.AddVertex( length, 0, false ); poly.SetClosed( true ); I'm thinking it should be VWPolygon2DObj all the way.
  17. I understand the issue better now: the crash must be caused by the child that's written in Vectorscript, because this script got executed immediatly. I wonder if i could set the parameters of a new pathObject before triggering the first reset.
  18. In my Case, the child is not IN the parent, but inserted next to the parent, so they are on the same level, this is why i am supposed to use UUID names instead of a kidsGroup, this way i can make one to many relationschips between objects. The crash occurs when iterating the list of kids, kidStr is the name of a kid. this is indeed something thats happens recursive.
  19. What do you mean with 'removing content on reset'? What i find most interesting is that the SDK doesn't wait to terminate the C++ code before running the first reset of the VectorScript Plugin. In Vectorscrip this is not the case.
  20. CreateCustomObjectPath(const TXString& name, MCObjectHandle pathHand = NULL, MCObjectHandle profileGroupHand = NULL) so, would you all agree that this function needs at least two arguments because the pathHand should not be null? also, i tried to add a closed VWPolygon2DObj as pathHand but it doesn't resolve my bug.
  21. I have linked multiple Plugin Objects with child<->parent relationships: parents are managing the shape of kids and are triggering kids resets if they got changed: Parents can create new instances of kid objects with gSDK->CreateCustomObjectPath(...). After creation the children gets their first reset triggered, this is where i experience problems. The problem that i experience is that this process is not stable: sometimes the program crashes, sometimes the program doesn't, this seems impossible to predict, this could happen each time I add a few kids to my parent. The error I recieved: First-chance exception at 0x00007FF6A3B00708 in Vectorworks2015.exe: 0xC0000005: Access violation writing location 0x000000006C5F2840. Unhandled exception at 0x00007FF6A3B00708 in Vectorworks2015.exe: 0xC000041D: An unhandled exception was encountered during a user callback. If i break with debugger, the debugger points here, I assume there was something wrong with the reset of newly created objects? How can i avoid this problem? What checks do i need? Thanks beforehand for your useful feedback. I'm working with VW 2015, windows 10 and visual studio 2012.
  22. Thanks for the suggestions. I'm already using a workaround myself: I added a hidden boolean parameter __isNew that triggers some code on first reset, this is where my default class is used. Unfortunately i cannot set the default parameter value for __isNew to True because of backward compability, but that's ok!
  23. Hello everyone, For Vectorscript/Python plugins you can set the default class in the graphical interface, So I figure there must be a simple way in the SDK to do this as well. There is a function in the SDK : SetDefaultClass(InternalIndex classID), but I don’t understand how this can be used in combination with the plug-in definition in question.
  24. What you really want is a log file, You just put this in your code: log_file = open(vs.GetFolderPath(-2) + 'log.txt', 'a') log_file.write('Whatever you want to log') log_file.close() This wil create a log.txt on a relative place in the user folder. You can open this with a program as baretail: https://www.baremetalsoft.com/baretail/ the free version will do fine. You can delete the file without having to reopen it.
×
×
  • Create New...