Jump to content

Cachino King

Member
  • Posts

    19
  • Joined

  • Last visited

Everything posted by Cachino King

  1. Thank you very much! Now I understand the structure. How do I use VectorWorks::Imaging::ICompressedImage if I want to export image maps? I need Filepath, Brightness, Width, Height, uv and Rotation data, and I found some of them in struct CompressedImageDesc. So what do I do if I want to get data in this struct?
  2. I'm having some more problems. After I successfully exported the model, I tried to export the material, but didn't understand some of the code written in the wiki: SDK:Using_Shader_Records. I looked up these functions with a few hints, But I don't know what is "fieldID". Is fieldID a Prototype value? Can I get transparency by writing it this way? if (hMaterial == NULL) return 0.0f; MCObjectHandle hTransShaderRec = ::GS_GetShaderRecord(gCBP, hMaterial, kShaderFamily_Transparency); if (hTransShaderRec == NULL) return 0.0f; float transparency = 0.0f; VWTextureShaderBase transparencyShader(hTransShaderRec); transparency = transparencyShader.GetShaderRecordDouble(kShaderPrototypeTransparency_Plain); return transparency; Also I found a function: GetParamReal(const TXString& univParamName) const; Does this function get data about object materials? Where can I see an enumeration of univParamName?
  3. Emmmm, I'm still understanding TesselateObject. There are so many problems I don't know how to describe. Maybe I need few days to read the code.
  4. That's quite helpful. I'll try to keep going this task. Thank you very much!
  5. Thank you! I already sent you an email. Thank you very much!
  6. Okay, I just found the VGS plugin. But I still don't understand why the GetMesh will cause my program crashed. //this function used like this: /* gSDK->ForEachObject(allObjects | descendIntoAll, CollectMesh, this); */ void CollectMesh(Handle h, CallBackPtr cbp, void* env) { // convert solid to 3DPolygons Handle meshH = gSDK->ConvertTo3DPolygons(h); // convert polygons to mesh short meshErrorType = gSDK->GroupToMesh(meshH); if (meshErrorType == 0) { VectorWorks::IMeshData **thisMesh; bool isGetMesh = gSDK->GetMesh(meshH, thisMesh);///crashed here //(**thisMesh).GetVertexPosition(vertexNum - 2, vertexs); } }
  7. I used GroupToMesh first,then It crashes when it running to GetMesh. I used GetObjectType and found the object type is 40. The sheet of GetObjectType: kMeshNode 40 3D mesh object. Thank you very much! There is too little documentation related to VGS, and I just found this: SDK:Using the VGS API for Vectorworks model export and live sync I tried to download the VGS Sample, but I didn't know how to use it. After I put those two files in the "Plug-Ins", I didn't see anything about VGS in the "Tools --> Workspaces --> Edit Workspace".
  8. VGS is too difficult to me. I just need some mesh data and material data and send to my program. Although vectorwork use solid-base to save model data, I still want to convert solid to mesh. And I found the function can implement this. I read some guidance documents of my task that live sync they said is actually dynamic updating. If the scene changes in VW, the model information needs to be retransmitted. This method doesn't sound nearly as efficient as VGS, but it's easier to implement.
  9. Yeah, that's quite difficult for me. The functions that implement FBX export do not exist. I looked up the file "MockSDK.h" and found a funtion "GetMesh". After some test, this function can let me get the vertexs of the mesh, and I found normal data, uv data all in the class "IMeshData". I just need to get these data and some material data and send these to another software. This part is relatively simple. Maybe there are very few kinds of polygons can convert to mesh. But I think it's enough to finish this task.
  10. Thank you. My project is completly coded by C++. Now I know that is difficult to export FBX directly.
  11. I develop this project for myself, this task is very important for me. It is related to my graduation project. I noticed that there is a option: "File -> Export -> Export FBX". But I didn't find it in the Class Reference. Is this function used the same way as VCOM:VectorWorks:Filing:IImportExport3DS::Export?
  12. That's ... terrible. I didn't think it would be difficult... Thank you for your help.
  13. I need to live sync the VW scene to another software. So I need to get the data for all the models in the scene includes mesh, textures, coordinates. And after some calculation VW scene should display on that software. So I just need to know the data of models. The scenes I need to synchronize should all be 3D scenes. I don't know how model data is stored, so I can't get such data I want. Also I need to export some .fbx files of these model to make sure it can be used by other software. Thank you!
  14. I need to get some data of models such as mesh, textures, coordinates, etc. I found that there is a function that can iterate over all objects: VCOM:VectorWorks:ISDK::ForEachObject. Does this "object" contain all of the models in the scene? I noticed that this function used like this: gSDK->ForEachObject( allObjects | descendIntoAll, MyCallBack, & data ); So what kind of data can I get from this "& data"? I also found these functions: VCOM:VectorWorks:ISDK::GetTextures, VCOM:VectorWorks:ISDK::GroupToMesh. Can these functions get the data what I want? Thank you!
  15. OK, I just found it. Thank you very much. Now I'm going to solve the problem of layout. I've never used this software before, so I feel rusty.
  16. After I installed the Dialog Builder, I noticed that the interface in my VW is different from the website. This is my VW: And this is the website's: It seems my builder doesn't have the button tools. And another question is how to create a new layout. I can just import the .vs file. Is there anything wrong with my tools? Or is there anything wrong with my installation way? Thank you very much.
  17. Thank you for your reply. I believe it will solve my problem
  18. I want to create a dialog, and I found this function: bool CSampleDlg3::CreateDialogLayout() { return this->CreateDialogLayoutFromVWR("VWUI Dialogs Sample/DialogLayout/SampleDlg3.vs"); } So I went through this file, found this: But I didn't have the "Dialog Builder Tools". Where can I get this tool? Or can I just use C++ build my dialog?
×
×
  • Create New...