XPresso meets plugins
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 24/04/2006 at 04:12, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 9.102
Platform: Windows ; Mac ; Mac OSX ;
Language(s) : C++ ;---------
This is going to be difficult to describe succinctly. I'll try to do it.In order to accomodate Poser paradigms, the construction for Poser figures is thus:
Polygon Object
Plugin Deformer Bone: plugin tags representing 'dials'/sliders for translation, rotation, scale, morph.
Plugin Deformer Bone: similar
... (for an entire rigged hierarchy)All of the plugin tags are collected on the Plugin Deformer as a list of sliders (using dynamic descriptions with GetDDescription()). When the sliders are changed, the values are converted within the plugin tags and make the appropriate translations into Cinema 4D for the action they represent.
Now enter master-slave control. 'Dials'/sliders can be master or slave to any other 'Dials'/sliders (on the figure or betwixt figures or props even). I've decided that the best implementation is by way of XPresso tags with nodes that take the master setting and affect the slave setting (on the plugin tag - dial). Poser doesn't directly affect the dial/slider, but instead uses its value as input to a calculation of the resulting slave value (not on the slider directly). In other words, you can set the slider value, but the master uses that to set the resultant value independently.
Now, I've set up a means to do this with XPresso tags: the slave dial setting is fed into the calculation along with the master dial setting to arrive at a result into a 'slave' setting that is not the same as the slave dial setting. The problem is that when I go to resolve the slave settings of the master, there is no way to force the XPresso tags to calculate their results.
What I mean is this: When the master slider value is changed by the user, SetDParameter() of the Plugin deformer is used to find and set the appropriate plugin tag on that deformer. This, in turn, checks to see if the slider is a master and calculates the slave values. But it appears that the XPresso nodes are not being evaluated so that the current settings are applied to the slave dials. This keeps the settings out of synch by one step, something that must be avoided.
I've tried everything (EventAdd(), AnimateObjet(), Message(), ...) but a change on the master dial does not immediately reflect in its slaves because the XPresso nodes are not being forced to reevaluate. If source code is required, I will be glad to profer it to the required party (as complex as it is) to be analyzed for solutions.
Thank you very much,
Robert -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 24/04/2006 at 10:36, xxxxxxxx wrote:
I can't say that I understand exactly how the system you describe works. Could it be a priority problem with the plugin or Xpresso tags? You could see if changing the priority value (either using PriorityData or though the GUI) fixes the problem.
The source code of your whole poser project sounds really huge. But if you think it's possible to understand the parts necessary to see what is being done, you could send it to [email protected]. If it's too complex, I cannot guarantee that I will have time to work it through; in that case, a couple of screenshots might help more. -
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 25/04/2006 at 01:12, xxxxxxxx wrote:
Hi Mikael,
I've sent the project attached to an email. Although I specified testing, I forgot that you'll need Poser content (I do have a simple figure being used to test this). And although the code is massive, the issue only involves three classes (as noted in the email).
Definitely not a priority problem. As was mentioned to Srek over at CGTalk, I even put the XPresso tags on the topmost object (root PolygonObject) and set their priority to "Initial" at -499. That had no effect.
To me it appears that when SetDParameter() gets called (or the code directly calls SetValue() which does the actual 'work'), the XPresso nodes have not yet updated. The value always seems to be the previous value when the actions are applied in my code.
Thanks,
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/04/2006 at 07:21, xxxxxxxx wrote:
Looks like I'm off to see the Wizard (that'd be me).
Some more ideas were attempted and with either slow downs, no change, or a particularly nice crash (C4D just goes away). I was able to sort out my first attempted non-XPresso master-slave control system and make it work. It is much faster than XPresso and there is a guarantee that values will be evaluated when required and remain synchronized.
Allowing users to edit the controls via XPresso was nice though. Doing my own interface later will not be so nice.
Thanks,
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/05/2006 at 13:46, xxxxxxxx wrote:
Sorry that I haven't been able to have a look at your Xpresso code yet. I don't have Poser, but I'll see if I can find anything out just by looking at the code. Otherwise, it's good to hear that you have an alternate solution cooking in case Xpresso doesn't work out in the end.