site_archiver@lists.apple.com Delivered-To: pro-apps-dev@lists.apple.com Hi All Best Regards Andy On Dec13 , 2007, at 9:46 PM, Paul Schneider wrote: Hi, Andy, - Paul On Dec 12, 2007, at 10:34 PM, Andy Mees wrote: Hi All Thanks in advance Andy Mees _______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (Pro-apps-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/pro-apps-dev/pschneider%40apple.com _______________________________________________ Do not post admin requests to the list. They will be ignored. Pro-apps-dev mailing list (Pro-apps-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/pro-apps-dev/site_archiver%40lists.ap... Thanks to Paul's excellent help I've put together a simple subtitle generator that conforms our network's specs. It's all pretty spiffy for a newbie, so I was feeling pretty chuffed with myself for a while back there ... trouble is that my text is left justified and I need it to be center justified. I'm currently using the NSAttributredString drawWithRect method but it doesn't appear to have the facility to handle text justification natively, so I'm thinking that I should be using a different method. Can anyone suggest a suitable one, either one that provides the pixel width of the string as it would appear in the bitmap image, so that I can calculate the correct origin so that it appears center justified, or one that handles justification natively? Thanks in advance for your advice and guidance ... and failing that, just for giving the opportunity to ask the question (it helps to clarify it in my own mind !) ScrollingRichText was written as an example of some of the new FxPlug API that we added in FCP 6.0, so it uses features that aren't available in 5.1.4. In particular, it uses the FxTimingAPI to find out the duration of your generator in the timeline; it uses this duration to calculate how much to scroll the current frame. The idea is that the text is just below the canvas on the first frame, and just above the canvas on the last frame. Since FCP 5.1.4 doesn't implement the FxTimingAPI, the plugin is probably always drawing the text outside of the canvas. If you change the "percentThroughEffect" value to 0.5, you should see the text appear. You will miss out on some other niceties by running the plugin in 5.1.4. For example, the plugin will dynamically show and hide some parts of its UI depending on whether you have chosen "simple text" or "RTF file"; this feature only works in FCP 6.0 and later. But hopefully the above fix will get you drawing some text, and you can take it from there. I'm a long time lurker around here and rarely actually do any kind of development so my understanding of the FxPlug SDK is limited right now hence the clueless questions to follow... so please go easy! Our network has specific production guidelines on how to format subtitles for commissioned programme material and that being the case I tam trying to build a very basic text generator that will not allow the user to deviate from those specs. The starting point for me was to create and compile a basic FxPlug Generator container in XCode 3 and then begin to tinker with it. So far so good, my shell plugin compiles, installs and runs just fine. My custom params show up and some simple modification of the default solid color code gives me my 40% opacity strap. OK. So now I need to get the text bit working and therein lies the rub. I planned to start by taking the "ScrollingRichText" example project code, compiling it and looking at what it does and how, then stripping it down and implementing the code needed in my own project. Unfortunately I'm stumbling at the first hurdle ... What is happening is that whilst the ScrollingRichText project compiles and installs as a plugin, it doesn't actually seem to do anything? I am using FCP5.1.4 as a test bed. Is this plugin code FCP version specific? What I get when I try to use it is a plain white canvas, regardless of whether I use the Simple Text option, or load up an rtf file as the text source. I have not modded the code in any way at this point, just compiled it and installed the product. If anyone is able to take a look at that example code and see why its not working (or if it does actually work on your machine) or possibly point me in the direction of some working FxPlug code for text generation text generation then I would be mighty grateful. This email sent to pschneider@apple.com This email sent to site_archiver@lists.apple.com
participants (1)
-
Andrew Mees