Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 03/12/2004 at 11:53, xxxxxxxx wrote:
User Information: Cinema 4D Version: 9 Platform: Windows ; Language(s) : C++ ;
--------- Hi list
I have a problem with a plug that get like a argument a external spline. The plugin is a standard deformer that use the spline as link to deform object. When i modify spline points or global matrix , the plugin don't refresh.
Any help?
Thanks Renato T.
ps. sorry for english, i hope that someone understand what i mean.
On 05/12/2004 at 03:54, xxxxxxxx wrote:
you have to overload the CheckDirty function. More info in the SDK docs.
On 05/12/2004 at 04:00, xxxxxxxx wrote:
Katachi,
in SDK i see: You can overload this function to check for a change in a deformer object manually. This example will make your deformer update every frame.
Can i overload this function to see if a spline is change?
Thanks Renato T
On 05/12/2004 at 04:09, xxxxxxxx wrote:
yes, you could use GetDirty() to check if the checksum changed.
On 05/12/2004 at 04:35, xxxxxxxx wrote:
THANSK! IT WORK!
Cheers Renato T.
On 05/12/2004 at 05:26, xxxxxxxx wrote:
good luck with your plugin.
On 05/12/2004 at 05:40, xxxxxxxx wrote:
Thanks, but there are some little things that i must verify. With old scene this seem not work, with a fresh scene it's working.
Maybe that i wrong.
void PathDeformer::CheckDirty(PluginObject* op, BaseDocument* doc) { BaseContainer *data = op->GetDataInstance(); BaseObject *spline=data->GetObjectLink(PATHDEFORMER_SPLINE,doc); if (spline) { if (spline->IsDirty(DIRTY_DATA) ) { //GePrint("Points Changed"); op->SetDirty(DIRTY_DATA); }
if (spline->IsDirty(DIRTY_MATRIX)) { //GePrint("Matrix Changed"); op->SetDirty(DIRTY_MATRIX); } else GePrint ("damn!"); } }
what do you think?
thanks Renato T.
On 05/12/2004 at 06:01, xxxxxxxx wrote:
I wouldn´t do it with isDirty but with GetDirty()!
Create a private member in your object class, sth like:
private: ULONG s_dirty;
then use something like (pseudo-code) :
ULONG dirty_bit = spline->GetDirty(DIRTY_DATA|DIRTY_MATRIX); if(dirty_bit!=s_dirty) { s_dirty = dirty_bit; op->SetDirty(DIRTY_MATRIX); /*Or DIRTY_DATA depending on when your deformer updates*/ }
Katachi
On 05/12/2004 at 06:23, xxxxxxxx wrote:
Ok, now it work... it will work, must test