.thisMaterial .thisObject (from XSI ICE)

Become a member of the CGSociety

Connect, Share, and Learn with our Large Growing CG Art Community. It's Free!

Thread Tools Search this Thread Display Modes
  09 September 2013
.thisMaterial .thisObject (from XSI ICE)

Hi. let me take a moment explaining something first before I ask my question

For example I have a null, the null have a material associated to it, and it also contains a box and a text.

In softimage I can script ICE like this ("this" container is the null, and then only add "this.material", "this.cube". "this.text), then if I have several nulls with materials and a box

nulll ....box
....texta text, I only have to copy my script to all the nulls and voilaaa.

this.null... this.box
this.text (first script in ICE- copy)

this.null... this.box
this.text (paste ICE)

this.null... this.box
this.text (paste ICE)

this.null... this.box
this.text (paste ICE)

Now in C4D, with my little knowledge, if I have several nulls with materials and a box and a text inside of them, I have to manually drag and drop the corresponding names into their corresponding boxes, like this:

nulll1 ....box (first xpresso tag with names associated)

nulll2 ....box (ctrl drag to paste, replace names associated)

nulll3 ....box (ctrl drag to paste, replace names associated)

nulll4 ....box (ctrl drag to paste, replace names associated)

Now, I have a lot of things to change, and I would like to know If there is a faster way so I can optimize the scene.

Im including a dropbox link of my example scene in C4D.

  09 September 2013
the c4d api very different from the xsi api. a pointer to the executing instance does not
exist. however there is op, which can fulfill a somewhat similar role. op is variable which
is predefined for scripts, script tags and script nodes. it originates from the api where op
is often passed as a method argument holding some sort of node.

op in a script is the currently selected object. If there is no selection or a multiselection, op is None
op in py tag is the tag instance
op in py gvnode is the gvnode instance

so for your scenario as a script:

this = op
box = this.GetNext() # assuming there is fixed hierarchy structure
txt = box.GetNext()

as a tag:
this = op.GetObject() # get the object the tag is sitting on
There are holes in the sky. Where the rain gets in.
But they're ever so small. That's why the rain is thin.
  09 September 2013
Thread automatically closed

This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.
CGTalk Policy/Legalities
Note that as CGTalk Members, you agree to the terms and conditions of using this website.
Thread Closed share thread

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Society of Digital Artists

Powered by vBulletin
Copyright 2000 - 2006,
Jelsoft Enterprises Ltd.
Minimize Ads
Forum Jump

All times are GMT. The time now is 10:24 AM.

Powered by vBulletin
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.