what's the problem with onCreate? what are you trying to do?

as for the expression link, if you could give me and example script I could 
have a peek


On Apr 5, 2011, at 9:50 AM, John RA Benson wrote:

> Spoke too soon about the bug fix with the expressions. This bug doesn't have 
> to do with renaming nodes though - regardless, still there, 6.2v3: 
> 
> I'm pretty careful about keeping {parent.} in the expressions - the problem 
> is finding the expression in the first place. With 
> node.dependencies(nuke.EXPRESSIONS) one can find the gizmo with the 
> expressions, but there are a bunch of nodes inside it so I have no idea from 
> a casual glance where it's coming from. 
> 
> Ok - found it, maybe. I had {width} and {height} instead of {parent.width} 
> {parent.height} in a crop node inside the gizmo. But nope, fixed that and I'm 
> still getting a link magically appearing.
> 
> As far as I can tell, the only expressions left in all the nodes in the 
> gizmos are expressions that have 'parent' in them.
> 
> part 2:
> 
> I fixed the part about the gizmo bug breaking connections when using an 
> onCreate callback by overriding nuke.nodePaste and skipping the onCreate:
> 
> def nodePaste(*args):
>    import _nuke
>    p = _nuke.nodePaste(*args)
>    s = nuke.selectedNodes(filter='myGizmo')
>    for n in s:
>        buildMyGizmo(node=n)
>    return p
> 
> And for the onCreate callback bug:
> 
> def buildMyGizmos():
>    for n in nuke.allNodes('myGizmo'):
>        buildMyGizmo(node=n)
> 
> nuke.nodePaste = nodePaste
> nuke.addOnScriptLoad(buildMyGizmos)
> 
> Seems to work so far... except that dang expression link...
> Cheers
> JRAB
> 
> On Apr 4, 2011, at 12:49 AM, Frank Rueter wrote:
> 
>> I remember seeing this and I think I was able to fix it by cleaning up the 
>> respective expressions.
>> Can you give an example of one of those expressions? Will the problem go 
>> away if you explicitly reference "parent.knobName" rather than just 
>> "knobName"?
>> 
>> On Apr 4, 2011, at 10:35 AM, John RA Benson wrote:
>> 
>>> The links are there the instant the nodes are pasted, but disappear after 
>>> they are deselected (osx - will try linux tomorrow). They don't seem to 
>>> re-appear like they did previously, so that's good. Unfortunately, the 
>>> broken connections are still happening! Is there a way to tell nuke to do 
>>> something after a paste has been completed? 
>>> 
>>> thanks!
>>> jrab
>>> 
>>> On Apr 3, 2011, at 7:30 PM, Deke Kincaid wrote:
>>> 
>>>> Try out 6.2v3.  One of these bugs sounds like this one which was fixed:
>>>> BUGID 15967-An erroneous expression link was created if you renamed a
>>>> node whose name was in use within a group or a gizmo.
>>>> 
>>>> -deke
>>>> 
>>>> On Sun, Apr 3, 2011 at 09:43, John RA Benson
>>>> <[email protected]> wrote:
>>>>> 6.2v1 linux and osx
>>>>> also turns out it's not the updateUI callback. Arg.
>>>>> 
>>>>> Also dealing with a nasty bug where a gizmo that's getting internal stuff 
>>>>> built will break connections when it's copied. Any hints on that one 
>>>>> appreciated. I'm hoping I can do something where I don't use the onCreate 
>>>>> callback but call the function that builds the gizmo after a paste:
>>>>> 
>>>>> s = nuke.selectedNodes(filter='myGizmo')
>>>>>     for n in s:
>>>>>             buildMyGizmo(node=n)
>>>>> 
>>>>> I see something called nukescripts.drop.dropData and in the docs:
>>>>>     # This function is called whenever data is dropped onto the DAG. 
>>>>> Override it to perform other actions.
>>>>>     # If you handle the drop, return True, otherwise return None.
>>>>> 
>>>>> But I'm nut sure exactly if this applies to what I want to do or how to 
>>>>> do it.
>>>>> 
>>>>> any help appreciated - thanks!
>>>>> jrab
>>>>> 
>>>>> 
>>>>> On Apr 3, 2011, at 5:56 PM, Deke Kincaid wrote:
>>>>> 
>>>>>> What version of nuke?  This sounds like a bug about erroneous 
>>>>>> expressions linking from inside gizmos to external nodes.  It was fixed 
>>>>>> a few v releases ago.
>>>>>> 
>>>>>> -deke
>>>>>> 
>>>>>> On Apr 3, 2011, at 7:52, John RA Benson <[email protected]> 
>>>>>> wrote:
>>>>>> 
>>>>>>> Hey there -
>>>>>>> 
>>>>>>> I have a gizmo that is doing a funny thing. Sometimes when I create it, 
>>>>>>> a green expression link will appear to another gizmo of the same class. 
>>>>>>> If I click on the gizmo it's pointing to, the expression goes away. 
>>>>>>> Yeah, I'm doing some funny stuff with updateUI, but it's nothing 
>>>>>>> (although I could be totally wrong) that would create that link.
>>>>>>> 
>>>>>>> I can do this:
>>>>>>> s = nuke.selectedNode()
>>>>>>> d = s.dependencies(nuke.EXPRESSIONS)[0]
>>>>>>> d.dependent(nuke.EXPRESSIONS)
>>>>>>> 
>>>>>>> and I get 's' showing me that it has an expression pointing to 'd', and 
>>>>>>> d.dependent() points back to 's'. Ok, good.
>>>>>>> 
>>>>>>> if I deselect s and then select d (the green arrow then goes away) and 
>>>>>>> do d.dependent() again, I get an empty list.
>>>>>>> 
>>>>>>> None of the knobs on s or d have an expression, so maybe it's from 
>>>>>>> something inside the gizmo that I'm pythonically setting?
>>>>>>> 
>>>>>>> What would be swell is to find out where this mystery expression is 
>>>>>>> coming from in the first place. is there a 
>>>>>>> 'tellMeWhichKnobHasTheExpressionSinceNuke.EXPRESSIONS_tellsMeThereIsOne'
>>>>>>>  function?
>>>>>>> 
>>>>>>> hmmn - it appears to be due to the updateUI callback, but it would 
>>>>>>> really be good to know which expression is being mysteriously generated 
>>>>>>> by it.
>>>>>>> 
>>>>>>> Cheers!
>>>>>>> JRAB_______________________________________________
>>>>>>> Nuke-python mailing list
>>>>>>> [email protected]
>>>>>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>>>>>> _______________________________________________
>>>>>> Nuke-python mailing list
>>>>>> [email protected]
>>>>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>>>>> 
>>>>> _______________________________________________
>>>>> Nuke-python mailing list
>>>>> [email protected]
>>>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>>>>> 
>>>> _______________________________________________
>>>> Nuke-python mailing list
>>>> [email protected]
>>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>>> 
>>> _______________________________________________
>>> Nuke-python mailing list
>>> [email protected]
>>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>> 
>> _______________________________________________
>> Nuke-python mailing list
>> [email protected]
>> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
> 
> _______________________________________________
> Nuke-python mailing list
> [email protected]
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

_______________________________________________
Nuke-python mailing list
[email protected]
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to