Plugin Cafe Homepage
Forum Home Forum Home > Plugin Cafe > SDK Help
  New Posts New Posts
  FAQ FAQ  Forum Search   Register Register  Login Login

LayerShaderLayer safe to "kill"?

 Post Reply Post Reply
Author
Message
Yakuza View Drop Down
Member
Member


Joined: 2008 Feb 10
Location: Germany
Online Status: Offline
Posts: 34
Post Options Post Options   Quote Yakuza Quote  Post ReplyReply Direct Link To This Post Topic: LayerShaderLayer safe to "kill"?
    Posted: 2010 Jul 13 at 11:08am

User Information:

Cinema 4D Version:   R11 
Platform:   Windows  ;   
Language(s):     C++  ;  

---------

hi.

the LayerShaderLayer parameter LAYER_S_PARAM_SHADER_LINK is "read-only" which is too bad really. nevertheless i can delete a BaseLink by setting the parameter like this:
layer->SetParameter(LAYER_S_PARAM_SHADER_LINK, NULL);
this is dirty, filthy, bad style, i know, but can it cause problems?^^
the result is, the BaseLink is deleted and in place of the deleted layer there is now an empty folder.
i could live with this rather than totally discard my little plugin, as there seems to be no way to modify textures and shaders in a layer shader.


Edited by Yakuza - 2010 Jul 13 at 11:08am
Back to Top
c4dJack View Drop Down
Member
Member
Avatar

Joined: 2007 Jul 13
Location: Turkey
Online Status: Offline
Posts: 454
Post Options Post Options   Quote c4dJack Quote  Post ReplyReply Direct Link To This Post Posted: 2010 Jul 16 at 5:12pm
Maybe copy the contents from one layer, modify it as you wish, then insert it as a new layer and delete the old one? Just a quick guess.

Cheers,
Jack
"Violets are blue. Roses are red.
We're coming aboard. Prepare to eat lead."

Rapp Scallion
Back to Top
Yakuza View Drop Down
Member
Member


Joined: 2008 Feb 10
Location: Germany
Online Status: Offline
Posts: 34
Post Options Post Options   Quote Yakuza Quote  Post ReplyReply Direct Link To This Post Posted: 2010 Jul 17 at 3:35am
hmm, i want to replace and or delete layers and i guess modifying them will keep being the problem, for the only function i need is setting the link, which is read-only.


Edited by Yakuza - 2010 Jul 17 at 3:35am
Back to Top
c4dJack View Drop Down
Member
Member
Avatar

Joined: 2007 Jul 13
Location: Turkey
Online Status: Offline
Posts: 454
Post Options Post Options   Quote c4dJack Quote  Post ReplyReply Direct Link To This Post Posted: 2010 Jul 17 at 4:47am
that's what I mean. Create a new layer with a new link, delete the old one.

Cheers,
Jack
"Violets are blue. Roses are red.
We're coming aboard. Prepare to eat lead."

Rapp Scallion
Back to Top
affa View Drop Down
Member
Member


Joined: 2005 Mar 03
Location: Germany
Online Status: Offline
Posts: 68
Post Options Post Options   Quote affa Quote  Post ReplyReply Direct Link To This Post Posted: 2010 Jul 18 at 10:16pm
i don't think this is possible, as seen here:
http://www.plugincafe.com/forum/forum_posts.asp?TID=4340
Back to Top
Matthias Bober View Drop Down
Forum Moderator
Forum Moderator


Joined: 2006 Oct 16
Location: Germany
Online Status: Offline
Posts: 1644
Post Options Post Options   Quote Matthias Bober Quote  Post ReplyReply Direct Link To This Post Posted: 2010 Jul 19 at 1:13am
Originally posted by Yakuza

this is dirty, filthy, bad style, i know, but can it cause problems?^^


At best it shouldn't crash Cinema but use it at your own risk.

cheers,
Matthias

MAXON
developer support
Back to Top
Yakuza View Drop Down
Member
Member


Joined: 2008 Feb 10
Location: Germany
Online Status: Offline
Posts: 34
Post Options Post Options   Quote Yakuza Quote  Post ReplyReply Direct Link To This Post Posted: 2010 Jul 29 at 3:35am
hi,

thanks for your replies. i have to live with this then and will do some more testing to see if it causes problems.
Back to Top
 Post Reply Post Reply

Forum Jump Forum Permissions View Drop Down

Bulletin Board Software by Web Wiz Forums® version 9.61 [Free Express Edition]
Copyright ©2001-2009 Web Wiz

This page was generated in 0.094 seconds.