THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 25/04/2004 at 18:03, xxxxxxxx wrote:
Cinema 4D Version: 8.5
Platform: Windows ;
Language(s) : C.O.F.F.E.E ;
At the null group level, I have a user data called "Frequency". I would like each of the coffee tags on object under that null group to read and act on this user data setting.
How can I acces this user data from the member objects?
On 25/04/2004 at 23:14, xxxxxxxx wrote:
... as COFFEE is basically an R6 feature, and user data are an R8 feature, I think there is no documented way to achieve that directly - which doesn't mean that it's impossible.
However, If you use a COFFEE node in XPresso, you can feed in the userdata using the standard XPresso nodes.
On 26/04/2004 at 04:59, xxxxxxxx wrote:
You'd think that you could get at it using the group node's data container. Hmm.
Here's the concept. Perhaps you've got a different solution?
One master object loads and stores control data from a file for many objects. The coffee code attached to an object could query this master data and extract the control data for it. For the sake of simplicity, let's just have two objects. A nullobject with coffee that loads the file data and a visible object that acts on that data. Later, I'll want to have many objects using that master data so loading the file data into each object is (doable but...) not the best solution.
Thanks for ideas.
On 26/04/2004 at 11:00, xxxxxxxx wrote:
I would store these data not in user data, but in a tag.
User data are available for and editable by the user - doesn't sound like you woulf prefere that the user messes directly with your data
On 26/04/2004 at 11:26, xxxxxxxx wrote:
While there are instances where I would like to se the user's input or use user data sliders for animation, let's put that thought aside for a moment.
Given a null object with a coffee tag and 2 children beneath also with coffe tags, can the children get data from the partent's coffee tag?
On 01/05/2004 at 17:47, xxxxxxxx wrote:
No. You'd have to store the data in the container of the tags. (Make sure to use a unique ID.)
On 01/05/2004 at 18:34, xxxxxxxx wrote:
Thanks Mikael. Sorry but I'm a newbie to coffee so I'm probably asking basic questions. I've looked over the SDK but I'm still not finding some of the syntax I need. Can you point me to the right place for how I would read and write to the container tags. I just need to find a way for object A and B to both read from the same pool of data. Containers may do it. I just need a kick start.
Thank you for your time.
On 04/05/2004 at 06:05, xxxxxxxx wrote:
var bc = op->GetContainer();
bc->SetData(UNIQUE_ID, "Hello World!");
var bc = op->GetUp()->GetContainer();
var s = bc->GetData(UNIQUE_ID);
On 04/05/2004 at 15:33, xxxxxxxx wrote:
That what I was looking for. Many thanks Mikael!