On Mon, 2013-10-14 at 22:57 +0100, Craig Shelley wrote:
> -------- Forwarded Message --------
> From: Craig Shelley <[email protected]>
> To: [email protected]
> Subject: FIXED: proxychange.py WAS: Proxy editing: Masks and
> Projector/Camera automation
> Date: Sun, 10 Mar 2013 20:15:02 +0000
>
> On Sun, 2013-03-10 at 14:43 +0000, Craig Shelley wrote:
> > Hello,
> >
> > I have just finished quite a complex proxy edit. It is one of the more
> > complicated edits I have ever done, with 17 video tracks, and heavy
> > usage of the camera/projector/masks and effect keyframes.
> >
> > I'm having a few problems with
> > http://cinelerra.org/docs/proxychange.py/proxychange.py and the mask
> > automation.
> >
> > Is there an updated version of proxychange.py?
> >
> > Regards,
> > Craig
> >
>
>
> Hello again,
>
> To get this to work, I've made the following changes to proxychange.py
> (Attached)
>
> 1. Added code to support resizing of project output
> 2. Added code to support resizing of assets
> 3. Added code to support resizing of all tracks
> 4. Added code to support replacing of all asset file names
> 5. Added code to support resizing of all mask automation
> 6. Added code to support correct positioning of camera x,y automation
> 7. Added code to support correct positioning of projector x,y automation
> 8. Deactivated camera_z automation scaling
>
>
> Regards,
> Craig
>
>
>
This is my final attempt to send this patch.
There appears to be a major problem with this mailing list server
sending some posts to /dev/null
It took me a while to realise that my posts weren't getting through, and
unfortunately I now no-longer have the patches to fix the PNG alpha
problems.
Regards,
Craig
134a135,198
>
> #Update the project video output size
> if 1.0 != args['scale']:
> videos = dom.getElementsByTagName('VIDEO')
> for video in videos:
> if video.getAttribute('OUTPUTW') and video.getAttribute('OUTPUTH'):
> video.setAttribute('OUTPUTW', "%i" % (int(video.getAttribute('OUTPUTW')) * args['scale']))
> video.setAttribute('OUTPUTH', "%i" % (int(video.getAttribute('OUTPUTH')) * args['scale']))
>
> #Update the size of all assets
> if 1.0 != args['scale']:
> assets = dom.getElementsByTagName('ASSET')
> for asset in assets:
> videos = asset.getElementsByTagName('VIDEO')
> for video in videos:
> video.setAttribute('WIDTH', "%i" % (int(video.getAttribute('WIDTH')) * args['scale']))
> video.setAttribute('HEIGHT', "%i" % (int(video.getAttribute('HEIGHT')) * args['scale']))
>
> #Update the size of all tracks
> if 1.0 != args['scale']:
> tracks = dom.getElementsByTagName('TRACK')
> for track in tracks:
> track.setAttribute('TRACK_W', "%i" % (int(track.getAttribute('TRACK_W')) * args['scale']))
> track.setAttribute('TRACK_H', "%i" % (int(track.getAttribute('TRACK_H')) * args['scale']))
>
>
> #Replace the file name in all assets
> assets = dom.getElementsByTagName('ASSET')
> for asset in assets:
> filename = asset.getAttribute('SRC')
> match = args['regExp'].search(filename)
> if not match: continue
> repl = match.expand(args['template'])
> repl = filename[:match.start()]+repl+filename[match.end():]
> asset.setAttribute('SRC',repl)
>
> #Modify all mask automation
> if 1.0 != args['scale']:
> points = dom.getElementsByTagName('POINT')
> for point in points:
> newstr=""
> for coord in point.childNodes[0].nodeValue.split( ','):
> if newstr!="": newstr+=", "
> newstr+="%10.8e" % (float(coord) * float (args['scale']))
> point.childNodes[0].nodeValue=newstr
>
> #Modify all camera automation
> if 1.0 != args['scale']:
> camerax = dom.getElementsByTagName('CAMERA_X')
> cameray = dom.getElementsByTagName('CAMERA_Y')
> for camera in camerax + cameray:
> autos = camera.getElementsByTagName('AUTO')
> for auto in autos:
> auto.setAttribute('VALUE', "%10.8e" % (float(auto.getAttribute('VALUE')) * args['scale']))
>
> #Modify all projector automation
> if 1.0 != args['scale']:
> camerax = dom.getElementsByTagName('PROJECTOR_X')
> cameray = dom.getElementsByTagName('PROJECTOR_Y')
> for camera in camerax + cameray:
> autos = camera.getElementsByTagName('AUTO')
> for auto in autos:
> auto.setAttribute('VALUE', "%10.8e" % (float(auto.getAttribute('VALUE')) * args['scale']))
>
164c228,229
< if really_modified and 1.0 != args['scale']:
---
> if not really_modified and 1.0 != args['scale']:
> print "Zooming track..."
_______________________________________________
Cinelerra mailing list
[email protected]
https://lists.skolelinux.org/listinfo/cinelerra