XPResso-like GUI-editor possible with SDK
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 14/04/2005 at 15:41, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.1
Platform: Windows ;
Language(s) : C++ ;---------
Hello together,
for my project I want to create an GUI-editor (for the rest of my message I will just write "editor", I then don't mean the editor view of C4D), which you can use to edit additonal options of a tag. You can place elements there and set some relations. While from the GUI point-of-view it's very similar to XPresso, it's is something different concerning the functionality, so I can't simply create additional XPresso-nodes.
My main concern is that any element you select in the editor should show its attributes in the AM (so that I don't have to create my own mini-AM; I only would consider this an option if on the long run it's the way with less pain;-)).
Is this in some way possible with the SDK?
That's what I've figured out so far:
1. To open the editor when the tag is clicked check for MSG_EDIT in the Message(..) -Call of the Plugin-Tag.
2. The editor itself is then best realized as a GeDialog with a GeUserArea where all the elements are drawn.
3. The elements and their data are stored in the basecontainer of the tag and are loaded and saved there from the editor.
4. You should be able to drag around the elements in the editor. This should be possible when taking care of the mouse-inputs events.
5. Upon element selection its parameters should be shown in the AM. For this to be possible the elements have to be compatible with the ActiveObjectManager_SetObject(..) -function. In other words this means they have to be derived at least from the C4DAtom -class. But this isn't possible since you can't extend the C4D-classes itself!? So, I assume the best way to get the same effect would be to derive my elements dircetly from node-data and register them as plugins with RegisterNodePlugin(..).
Am I on the right path with this approach?Thanks for any advice or comment,
Dani -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 14/04/2005 at 16:27, xxxxxxxx wrote:
Sounds like you're on the right track.
This is something I was working on for procedural shader nodes attached to a Material through a ShaderPlugin. In my case though, the nodes are my own classes. But deriving the elements as plugins would be a good approach.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 15/04/2005 at 04:50, xxxxxxxx wrote:
Hello Robert,
thanks for your comment.
Your work looks very good.
Just wondering, is there a certain reason why you chose to write your own classes? Like, has it been easier to intergrate in your design?
Dani