CustomDataType/Gui like CUSTOMGUI_SPLINE
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/11/2008 at 20:04, xxxxxxxx wrote:
So you add it to the iCustomGui using the AttachUserArea() method, right?
I'm going to have to see how far I can get this as I haven't quite figured out the integration of the CustomGuiData with the CustomDataTypeClass (et al).
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 19/11/2008 at 21:04, xxxxxxxx wrote:
Do I actually need a Custom data type to go with this or can I just use the available descriptions for buttons and checkboxes and so on showing my custom spline interface in the GeUserArea of the CustomGui (storing the spline data as class variables or maybe in a sub-BaseContainer so that it gets read/written).
Again, I'm not too clear on how these two (CustomGui and CustomDataType) work together and if the data type is actually necessary (except maybe so that it can be included in the .res file). This is more or less a complex custom gui for my own data - but it, of course, needs to be loaded/saved with the document.
Yours truly confused,
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 20/11/2008 at 03:22, xxxxxxxx wrote:
Hey Rob,
here is some code provided by Mikael back then which shows how to include a dialog (you can even use dialog resources) :
CustomDataType -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 20/11/2008 at 10:28, xxxxxxxx wrote:
That one seems to have slipped by in my searchs. I had a couple others from Mikael that were just the CustomGui without the CustomDataType.
This may be very useful.
Thanks, Samir!
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 22/11/2008 at 12:13, xxxxxxxx wrote:
Incidently im trying to make a CustomDataType/Gui, too and the link mentioned by 3D Designer helped me a lot, but i have the same problem mandrake77 described: AllocData is actually never called.
I cant get much info out of his solution ("BaseContainer->InsData ! =)" and "And SetData seems to bew the better choice...."), so im counting on you guys
The GUI part works fine btw and im really happy you discovered this thread, thanks 3D Designer!
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 23/11/2008 at 04:30, xxxxxxxx wrote:
ok, maybe i should go a bit more into detail.
i kept very close to the example code (i just changed a few variables and resource ids) and my problems (just like mandrake77's) are:- in MSASplinePosDialog::SetData(const TriState<GeData> &tristate;) tristate.GetValue().GetType()==DA_NIL and tristate.GetValue().GetCustomDataType(MSA_SPLINEPOS_DATATYPE_ID) returns NULL
- MSASplinePos::AllocData() is never calledplease help
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/11/2008 at 10:45, xxxxxxxx wrote:
I think that I'm in the same boat here. My tristate.GetValue().GetCustomDataType() returns NULL as well and mandrake77's information is uninformative. The best guess that I can give is that he creates the customdata in his plugin's GetDDescription() and inserts it into the BaseContainer there (?). In my case, though, I'm adding my customdatatype/customgui via the resource description file (.res) specifically to avoid GetDDescription() (unless otherwise required).
Here's hoping for Matthias' example soon!
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 27/11/2008 at 11:30, xxxxxxxx wrote:
Okay, it may be this (seems to work) :
>
// NodeData.Init \> //\*---------------------------------------------------------------------------\* \> Bool MyNodeData::Init(GeListNode\* node) \> //\*---------------------------------------------------------------------------\* \> { \> // Initialize container \> if (!node) return FALSE; \> BaseContainer\* bc = ((BaseObject\* )node)->GetDataInstance(); \> if (!bc) return FALSE; \> // The InsData ID is the one specified in your .h/.res for this plugin object. \> // GeData(YOUR_CUSTOMDATATYPE_ID, ...) \> bc->InsData(MAGNETUDE_ZONE_GRAPH, GeData(CUSTOMDATATYPE_KDZFALLOFF, DEFAULTVALUE)); \> return TRUE; \> } \>
Still not getting things working fully yet - like interactive setting my combobox using the customgui isn't sticking. I have everything in place.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/11/2008 at 00:45, xxxxxxxx wrote:
Now onto the juicy bits.
Using Mikael's MSA_SPLINEPOS example, the customgui is using a copy of the customdatatype. But how does one set the actual customdatatype from the copy - especially since the main data is a Vector array? So far, anytime that the AM is switched from then back to this, the data is reset to the customdatatype default information (because the copy hasn't been 'written' to the original). It looks like messaging from the stock SplineData might be the answer (?). I don't know.
Undos. How to do undos on my spline edits? Since the internals of SplineData are hidden, I can only suspect that either real undos are stored for the object with the customdatatype or that it has its own undo history (?). Would a simple AddUndo() setup do the trick here?
Progress is moving forward but at a snail's pace.
Thanks,
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/11/2008 at 01:02, xxxxxxxx wrote:
Afaik, undos are handled automatically by Cinema 4D for custom descriptions.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/11/2008 at 01:09, xxxxxxxx wrote:
Not here. If I add the object and then edit the spline points, an undo removes the object and doesn't undo changes to my spline points. The CUSTOMDATATYPE_INFO_UNDOSAMECUSTOMGUI flag is set for the RegisterCustomDataTypePlugin().
Realize that what I have in my iCustomDataType is the spline 'type', 'count' (number of nodes or knots), and a Vector array containing the nodes/knots. type and count are handled as description resources but the Vector array only exists as such and isn't stored in a Description or BaseContainer.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/11/2008 at 01:18, xxxxxxxx wrote:
You have to set the CUSTOMDATATYPE_INFO_UNDOSAMECUSTOMGUI flag for your CustomDataType plugin. Here is the register call of the gradient for instance.
>
\> RegisterCustomDataTypePlugin(GeLoadString(IDS_DATATYPE_GRADIENT), CUSTOMDATATYPE_INFO_LOADSAVE | CUSTOMDATATYPE_INFO_UNDOSAMECUSTOMGUI | CUSTOMDATATYPE_INFO_HASSUBDESCRIPTION|CUSTOMDATATYPE_INFO_NEEDDATAFORSUBDESC, gNew GradientDataTypeClass,1)); \>
Only use CUSTOMDATATYPE_INFO_UNDOSAMECUSTOMGUI for elelments like the gradient or spline. Simple types don't need and shouldn't use this.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/11/2008 at 01:20, xxxxxxxx wrote:
Hmm, maybe I am missing something but isn´t that just the same what he said he already does? :-?
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 28/11/2008 at 01:33, xxxxxxxx wrote:
oops, indeed, I missed Robert's last post.
cheers,
Matthias -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/11/2008 at 12:02, xxxxxxxx wrote:
Any idea on how to get the customgui data to the customdatatype? I see that iCustomGui::SetData() is called often whereas iCustomGui::GetData() is never called - so my customgui gets the datatype but can never update it. I have found no way to do this. The only real example that I have for my type of datatype/gui is SplineData/SplineCustomGui but its underlying workings are hidden (as expected).
Come on here. It's coming up on TWO WEEKS since I started this request and I'm still groping in the dark. I can't run a business on R&D; and T&E; in this dismal economic situation. I need support here.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/11/2008 at 13:22, xxxxxxxx wrote:
Thank you very much Robert. It seems to do the trick, but it didnt solve it completely. Im stuck where you are.
Concerning the support, i guess ive got sad news for you (if you didnt know already) :
>
I am on vacation from November the 29th to December the 6th. During this time we can't provide any official SDK support. \> \> cheers, \> Matthias
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/11/2008 at 13:36, xxxxxxxx wrote:
No, I didn't catch that. Well, I'm going the alternative route then with a non-modal dialog and a button in the object's A.M. (the current code has been backed up maybe to be revitalized later). Probably my least palatable solution but I can't wait three weeks or more to get this moving.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 30/11/2008 at 13:53, xxxxxxxx wrote:
Unfortunately i dont really have another choice, since the data im trying to put in the CustomDataType/Gui is needed quite often and adding it to the description everytime would be... overkill.
it supposed to hold five different types of color information...
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/12/2008 at 02:19, xxxxxxxx wrote:
sorry, but.... *bump*
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 08/12/2008 at 05:40, xxxxxxxx wrote:
I am sorry but I still have to wrap my head around this stuff as well. I will post again if I have something working.
cheers,
Matthias