Freelance UI Designer
GetClone creates a take from a source take but its overrides are linked to source take. if I remove overrides from cloned take, original take's overrides also deleted. Is this a bug or GetClone produces a kind of instance object with linking to source object? How can I fix this? How can I break them from the source take?
# Script clones selected take to under Main Take
# AliasTrans did not work
#trans = c4d.AliasTrans()
#if trans is None or trans.Init(doc) is False:
# return False
takeData = doc.GetTakeData()
# Execute main()
@a_block I tried your suggestion and it is working.
First tag setting instance links. Tag priority: Generator and index: -1
Second tag is getting width value and sets cube position with it. priority: Generator index:0
I moved user data to null object instead of using it on python tag. (Some one have suggested this before for another issue but I don't understand why we should use user data on python tag instead of object)
By the way after @zipit reply I tried to research about priority but could not find them in 3d4 doc. if you know a good page I would want to know it.
thank you both again.
thank you for the suggestion. I really did not think that using 2 tags instead of one. This may be work and thank you so much for this I hope it works (probably will work I'm guessing)
thank you for your help. I tested it but in this case it can't get currently assigned linked object. Old shape assignment is staying after new shape assignment. if you have time you can see this by assigning different shape objects.
I have an null container with a python tag. Object structure as below:
problem is when I assign new value to loftShapeLink user data I can't get loft object's width value correctly. I have to trigger python tag again and that time it runs perfectly. As you can see in sample file, after new shape assignments instance object link value is correctly assigned but width value is not updated(I got previous value).
How can I get correct width value after first execution of the script? This is a problem because I can't use takes to render scenes. Because when marked takes render is started scripts run only 1 time for active take and shape positions are not correctly rendered.
Note: I have to use null containers for shapes just because axis points. I tried only shape objects as link objects but it is not effect the result.
hi @x_nerve thank you for your time.
code is not simple actually it has about 500 lines as far as I remember. To make scenario clear here I wrote very simple scripts. I needed to use external link for all python tags because that code is changing time to time (bug or new features etc) so with this way I change code in a single source.
With this entry I had an "infinitely running script" problem and it was solved by removing "c4d.EventAdd()" line from external function. After this I had another issue with python tags. It was triggered whenever is changed in the scene. To prevent that I tried frame triggered python tags so with your answer it mixed with that issue below paragraph is my further step about the main topic)
I've tried frame triggered tags but not by your way. I added null object and attach a python tag on it. This simple code watch current take changing and if take is changed it changes the frame so tags are triggered that way. Because I use takes. every take holds different data values. So when I changed active take, python tags has to be run.
I will check your code as well currently I've been struggling with new issue about takes - user data - scene update :/
thank you again.
I have a null object that has 3 user data variable on it. My take structure is like below. Every branch null object's data values are changed as mentioned below:
but, for example after data values are changed (while auto take and lock overrides are active) parent values are changing (Step1 and Main)
My explanation may be confusing so you can find the scene file below. Please try to
I tried to understand this behavior but I could not understand yet. could anyone know why parent take values are changing after sub take values are changed?
(Cinema 4D Latest version)
I've created the scene again because I changed that workflow tons of time. You can find scene file and script. If I remove "c4d.EventAdd()" line from external code problem is gone.
External Script file: customCode.py
Scene file: externalPythonSample-infinity_problem.c4d
thank you for that suggestion. I did not think that method frankly. I will try it.
Currently I made all python tags as frame dependent. I wrote a script and assign it to a null object in my scene. This script checks current take and compare it previous one. If takes are different it changes current frame +1. In that way other python tags are running only one time.
there is a issue but I could not achieve to solve it that as if some part of the script does not work properly :) anyway I guess your suggestion may help me rather than using frame dependent Python tags.
thank you again.
I've solved the issue
c4d.EventAdd() was added end of my external function script. I removed it and used it in tag script. I think after that line python tag was triggered again.