R12 Exporter
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/12/2011 at 04:10, xxxxxxxx wrote:
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/12/2011 at 05:51, xxxxxxxx wrote:
Please start Cinema from the Visual Sudio debugger to see where in your code Cinema is crashing.
By the way, it is not necessary to pre-allocate a document (m_Document) for BaseDocument::Polygonize.
Just write something like this:
BaseDocument *m_Document = NULL; m_Document = Doc->Polygonize();
cheers,
Matthias -
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/12/2011 at 06:37, xxxxxxxx wrote:
Sorry, I can not debug your code for you. This is beyond the scope of the SDK support.
Just an idea, have you tried to make your WriteObjects function not a class member?
cheers,
Matthias -
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/12/2011 at 07:41, xxxxxxxx wrote:
Please try in a simple CommandData plugin if you get the same crash.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/12/2011 at 10:20, xxxxxxxx wrote:
The same situation and with CommandData
void WriteObjects(BaseObject* ParentObject) { while(ParentObject) { WriteObjects(ParentObject->GetDown()); ParentObject = ParentObject->GetNext(); } } class CExporter : public CommandData { public: Bool Execute(BaseDocument* Document) { BaseObject* ParentObject = Document->GetFirstObject(); WriteObjects(ParentObject); return m_Dialog.Open(DLG_TYPE_ASYNC, ID_DIALOG,-1,-1); } private: CDialog m_Dialog; }; Bool PluginStart() { if(!RegisterCommandPlugin(ID_PLUGIN, "MyPlugin", 0, 0L, "Description", gNew CExporter)) { return FALSE; } return TRUE; } void PluginEnd() { } Bool PluginMessage(LONG ID, void* Data) { return FALSE; }
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/12/2011 at 06:17, xxxxxxxx wrote:
I used quite the same code some days ago and your iteration should definitely work.
1. What happens if you remove that dialog stuff?
2. Why are you using "CDialog"? Please use "GeDialog" or any of the classes derived from GeDialog. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/12/2011 at 06:33, xxxxxxxx wrote:
c4dJack
#ifndef DIALOG_H #define DIALOG_H #include "preprocessor.h" class CDialog : public GeDialog/*GeModalDialog*/ { public: CDialog(); virtual ~CDialog(); virtual Bool CreateLayout(); virtual Bool InitValues(); virtual Bool Command(LONG ID, const BaseContainer& Message); }; #endif
CDialog::CDialog() { } CDialog::~CDialog() { } Bool CDialog::CreateLayout() { this->SetTitle("tool"); GroupSpace(50, 50); AddButton(BTN_SAVEMESH, BFH_LEFT, 0, 0, "Save"); return TRUE; } Bool CDialog::InitValues() { return TRUE; } Bool CDialog::Command(LONG ID, const BaseContainer& Message) { switch(ID) { case BTN_SAVEMESH: { BaseDocument* Document = GetActiveDocument(); WriteObjects(ParentObject); // <---------- StatusSetText("Mesh saved"); } break; } return TRUE; }
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/12/2011 at 07:15, xxxxxxxx wrote:
Ah, ok. You derived your CDialog class from GeDialog. That should be ok.
Anyway in your last piece of code there was a little error.
Bool CDialog::Command(LONG ID, const BaseContainer& Message) { switch(ID) { case BTN_SAVEMESH: { BaseDocument* Document = GetActiveDocument(); if (!Document) return FALSE; // <---------- FIX WriteObjects(Document->GetFirstObject()); // <---------- FIX StatusSetText("Mesh saved"); } break; } return TRUE; }