THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/03/2005 at 23:46, xxxxxxxx wrote:
I'm not ranting as much as venting frustration. And I have nothing but respect for Mikael. It is a shame though that the other vast experiences involved in this forum will not share any of it. There are no other resources (unlike Maya and 3DSMax who have books and videos and courses and limitless online resources) but here, PluginCafe. There might be more under the .de moniker - my Deutsch isn't good enough (nor will it ever be).
1. A ShaderPlugin is required (absolutely and irrevocably) to get the ShaderNode data into each Material's Channel. That's easy and no way around it. I'm not recreating C4D's Material system with its vast amounts of built-in usefulness and then try to keep up with it as it progresses.
2. Since each ShaderTree represents ShaderNodes connected to one Material (the ShaderNodes can connect to more than one Channel in the Material), there is a need to store the ShaderTree someplace outside of the ShaderNode (or, the worst that any programmer could ever conceive: have the ShaderNodes maintain separate but identical ShaderTrees, always keeping them identical - that is both memory consuming and perposterous - I won't even consider such a hair-brained strategy). Make sense?
3. There is no place to store the ShaderTree. UserData (i.e.: CustomeDataType) is too limited. I cannot put the ShaderNode editing dialog in the AM for the UserData (again, as you stated yourself, perposterous), so the editor dialog has to be called upon with a button or similar. But UserData doesn't support buttons (at least not without creating a CustomGUI just for a button). And accessing a non-C4D something class from the UserData is an exercise in futility. A CommandPlugin will only be relevant when it is launched and then would need to store ALL the ShaderTrees for all materials that contain them for all documents. There should be no need to manage all of the ShaderTrees in one place since they are isolated by Material - the only communication may come in cut/copy/paste.
See, you spoke of a 'hub' as if you were controlling all of your nodes for everything in one place or on a PluginMaterial basis. I need to control nodes on a Material by Material basis (thus the extreme focus on attaching it to the Material) - C4D "rigid as steel" Materials with limited extensibility. Yes, I could make a CommandPlugin that lets me work on every material of each Document one at a time, but how does that work during programmatic construction of ShaderTrees for existing Materials (not loading documents but reconstruction of another shader node system)?
So, what was your 'hub'? How does one orchestrate several plugins across more than one document?
I ask because it is difficult and there isn't any second set of eyes to provide support or expertise. I can think abstractly, but not in the same way that the SDK works - at least not without an abstract explanation of the overall architecture. Thus my references to many getting lost in this abstraction unexplained. There are many strange designs to it. Just the way that plugins are described (using NodeData) but created (using some Plugin inteface - sometimes nearly inaccessible) requiring the data attached to the plugin which you created to be passed using messaging. Yikes - I believe in direct and simple. This is obfuscation at its ultimate. You should really check out the amazing simplicity of Java and Python. Much, much, much less work for much, much, much more progress (in an unlimited programming interface).