SetVector?

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

On 19/11/2009 at 07:52, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   11.5 
Platform:      Mac OSX  ; 
Language(s) :   C.O.F.F.E.E  ;

---------
I created a dialog using Resedit and, in it, I placed a Registered [2D Vector Field].
How can I set and get values from it, in COFFEE?
Thank you for any reply.

Rui Batista

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

On 20/11/2009 at 08:12, xxxxxxxx wrote:

So, I assume that there isn't any way to do it, right?

Rui Batista

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

On 20/11/2009 at 08:43, xxxxxxxx wrote:

Hello Rui,

check out the basecontainer class in the coffee docs, you should be able to set a value that way.

Get the basecontainer of your plugin and call SetVector(..) with the ID of your description element, and the value that you want to set it to.

c++ example :
------------------
// get baseContainer.
// op is your plugin object, generator, or tag for example
BaseContainer* bc = op->GetDataInstance();
// set value
bc->SetVector(ID,Vector(0.0,0.0,0.0));

Im no coffee guru, but in c++ you'd do it like that, IIRC.

greetings,
Daniel

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

On 20/11/2009 at 10:41, xxxxxxxx wrote:

Thank you for your reply, Daniel.
I tried it and SetVector simply doesn't exists (Member not found).
I also tried with SetData and with SetValue but no dice 😞
Then I remembered that colors are simply vectors so I tried setting the vector with SetColorField and it worked. Well, at least it returned no error.
But the 2D Vector shows no cross in it and I can't even edit the X and Y fields. Does this field works in COFFEE at all?
Thank you for any reply.

Rui Batista

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

On 20/11/2009 at 15:59, xxxxxxxx wrote:

Hi Rui,

I do not use COFFEE much anymore so I don't remember exactly what command to use. But in the process of making the current plugin I am working on I found that if you right click on any dialog object in c4d and then go to SHOW HELP. It will show you the Constants that have been used for each description.   Might not help you in this case as you already know this info but that might be useful in the future.

~Shawn

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

On 20/11/2009 at 16:14, xxxxxxxx wrote:

Hello Shawn

What do you mean by dialog object? What and where do I right-click?

Rui Batista

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

On 21/11/2009 at 02:42, xxxxxxxx wrote:

Hi,

userdata access in COFFEE seems to be somewhat limited.
You might want to check out these threads for some info though:

3946
4153
4380
4155

greetings,
Daniel

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

On 21/11/2009 at 05:29, xxxxxxxx wrote:

Thank you Daniel. I will look into it and try to find some solutions.

Rui Batista

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

On 24/11/2009 at 03:47, xxxxxxxx wrote:

The Vector2D GUI element is a custom GUI element and COFFEE can't really access custom GUIs especially in dialogs. It is somewhat possible in descriptions with the use of sub-channels.

cheers,
Matthias