CGTalk > Software > Maxon Cinema 4D
Login register
Thread Closed share thread « Previous Thread | Next Thread »  
Thread Tools Search this Thread Display Modes
Old 09-26-2013, 04:47 PM   #1
luis Riera
Graphics designer
America Television
Lima, Peru
Join Date: Aug 2009
Posts: 498
.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

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

this.text (first script in ICE- copy)

this.text (paste ICE)

this.text (paste ICE)

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 (first xpresso tag with names associated)

nulll2 (ctrl drag to paste, replace names associated)

nulll3 (ctrl drag to paste, replace names associated)

nulll4 (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.
Old 09-26-2013, 05:44 PM   #2
littledevil's Avatar
Join Date: Aug 2002
Posts: 616
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.
Old 09-26-2013, 05:44 PM   #3
CGTalk Moderation
CGTalk Forum Leader
Join Date: Sep 2003
Posts: 1,066,478
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

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 03:16 AM.

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