On 02/07/2015 at 14:54, xxxxxxxx wrote:
it´s really helpful to have modifiers in R16 with the sketch and toon line attributes.
Especially the python slot is awesome, but it seems that the editor has some issues with usual programming commands.
"and, elif, or" etc. aren´t working at the moment.
Furthermore the intentation isn´t set properly and so one…
Aren´t those things supported for now or are they issues we should report?
How could we access the relevant object list for the shader from the python slot? Calling op gives me a standard sphere and I could´t find a way traversing the object hierarchy.
(An example task could be to colorize a stroke dependent on the object hierarchy and their position in world space.)
Thanks in advance
On 03/07/2015 at 01:50, xxxxxxxx wrote:
if you want to have proper highlighting and indentation just click "Editor..." to use the proper Expression Editor. You you have problems executing certain code please post some example to reproduce the issue.
"op" gives you the rendered object. When you edit the python code in the material this is a sphere because only the sphere of the material preview is rendered. But when you assign your shader to an actual object in your scene and render the scene you can access that object. Then you can get the scene with GetDocument().
On 03/07/2015 at 03:43, xxxxxxxx wrote:
please give it try!
open the expression editor from the slot, as you supposed and as I did in the first place
go to line: def main() :
type in: print "hey"
fire up render
check: console window
if you do so with the script manager everything works fine. If you work with the sketch and toon expression editor you´ll receive:
IndentationError: unindent does not match any outer indentation level
I know it´s easy to set the line return c4d.Vector() to a proper indentation level.
But I guess it should be correct in the first place?
open the expression editor from the slot
type in: and
type in: elif
type in: or
Thanks for the hint with GetDocument(). A little cumbersome to travers hierarchy and check it, as this information is accessible before rendering.
It would be great to access the object(s) straight away in future releases.
On 07/07/2015 at 03:03, xxxxxxxx wrote:
thanks for your reply, I can now reproduce the issues. A but report was filed.