Expression jumps back

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 30/09/2008 at 22:55, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   10.5 
Platform:      Mac OSX  ; 
Language(s) :     C++  ;

---------
I have a tag plugin that sets the lokal Object Matrix during Execute() :

> ... \> op->SetMl(NewObjectMat,TRUE); \> return EXECUTION_RESULT_OK;

The expression works just fine in general.

However, as soon as I deselect all objects, or select a tag, then the object jumps back to another state (initial?).

Any idea what causes this behaviour? Do I have to commit the change in the Matrix somehow? Do I set the objcet matrix the wrong way, so it get's destoyed? NewObjectMat is created during execute from scratch.

Thanks for any helpful pointers!

Kabe

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 01/10/2008 at 12:12, xxxxxxxx wrote:

Hi Klaus,

don't see anything wrong here. I think the problem is rather how you calculate the new matrix.

Maybe it's also safer to calculate a global matrix and transform it to the object's local? Would be stupid, but you never know...

Cheers,
Jack

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 02/10/2008 at 10:52, xxxxxxxx wrote:

Well, as already said... the calculation of the new matrix is correct, and the tag works just fine, as long as I don't deselect anything.

I'm creating the Matrix with

> Matrix NewObjectMat; \> \> ... \> \> NewObjectMat = MatrixRotY(d);

It seems that MatrixRotY delivers only a temporary Matrix, that is destroyed as soon as any other proces is called.

any advice?

Thanks

Kabe

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 02/10/2008 at 11:15, xxxxxxxx wrote:

Hi,

> Quote: __
>
> * * *
>
> .. as long as I don't deselect anything.
>
>
> * * *

sounds like a check for doc- >getActiveObject() is not fulfilled anymore. do you do anything if nothing is selected somewhere in your code?

your code above looks alright, i dont think there's much to be done wrong there..

> Quote: __
>
> * * *
>
> It seems that MatrixRotY delivers only a temporary Matrix
>
>
> * * *

i dont think this is possible..
maybe you have to do a MSG_UPDATE or sth, but thats just guessing on my side.

greetings,
Daniel

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 02/10/2008 at 13:12, xxxxxxxx wrote:

Npe, it's a tag plugin, there shouldn't be a need to signal an update.

Kabe

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 09/10/2008 at 07:55, xxxxxxxx wrote:

Still struggling with this. Any further ideas would be appreciated. Kind of frustrating if a plugin works fine, but the results don't "stick"...

Kabe

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 21/10/2008 at 07:21, xxxxxxxx wrote:

I can not confirm this. I may need some more detailed code. You can contact me through [email protected] if it is confidential data.

cheers,
Matthias