You control the port values with the class public method
sortedPropertyPortKeys, so something like:
+ (NSArray*) sortedPropertyPortKeys
{
return [NSArray arrayWithObjects:@"inputModelPath",
@"inputModelLoadingQuality",
@"inputImage",
@"inputWireframe",
@"inputGenerateUVs",
@"inputUVGenMode",
@"inputRotationX",
@"inputRotationY",
@"inputRotationZ",
@"inputTranslationX",
@"inputTranslationY",
@"inputTranslationZ",
@"inputScaleX",
@"inputScaleY",
@"inputScaleZ",
@"inputBlendMode",
@"inputDepthMode",
@"inputNormalizeScale", nil];
}
Default value for a port is handled in
+ (NSDictionary*) attributesForPropertyPortWithKey:(NSString*)key
so something like:
if([key isEqualToString:@"inputModelLoadingQuality"])
return [NSDictionary dictionaryWithObjectsAndKeys:@"Model
Quality", QCPortAttributeNameKey,
[NSArray arrayWithObjects:@"Realtime Fast", @"Realtime
Quality", @"Max Quality", nil], QCPortAttributeMenuItemsKey,
[NSNumber numberWithUnsignedInt:2],
QCPortAttributeMaximumValueKey,
[NSNumber numberWithUnsignedInt:2],
QCPortAttributeDefaultValueKey,
[NSNumber numberWithUnsignedInt:0],
QCPortAttributeMinimumValueKey, nil];
or
if([key isEqualToString:@"inputRotationX"])
return [NSDictionary dictionaryWithObjectsAndKeys:@"Rotation
X", QCPortAttributeNameKey, [NSNumber
numberWithDouble:0.0],QCPortAttributeDefaultValueKey, nil];
Build settings: Make sure you are compiling release, and that you have valid
architectures in the build settings. This can be a bit nuanced with XCode
"gotchas", but basically build release, and make sure that your target (the
Plugin) hen you get info, has "valid architectures" for i386 and x86_64 (and
the ppc variants if that floats your boat).
On Jan 13, 2011, at 11:35 AM, George Toledo wrote:
> I was looking at the 10.5 GL Square project , and seeing if I could add
> inputs to control the texture UV coords successfully. All of that works fine,
> build successful for 32 bit.
>
> However, I have a few questions that have come from this.
>
> 1- When I attach a video input to the plugin, and turn off composition, the
> iSight light doesn't "go off". I'm using the GL Square's code for image port,
> and haven't changed it in any way, so this must be what the sample does as
> well (admittedly, I haven't tested). What do I need to do to get it to let go
> of the video?
>
> 2- How do I control the default value of input ports? That isn't really an
> issue with the GLSquare project as is, since everything is fine with having a
> 0 value. However, I realize I need to know how to set defaults, so that when
> the patch is dragged from patch creator, some ports have non 0 values. If
> anyone knows a good example of this in a QCplugin project, I appreciate a
> head's up.
>
> 3- What build settings are preferable for having it work for 64/32 bit? I
> tried changing the settings, but was having my build fail.
>
> 4- How do I control order of how the ports present themselves from top to
> bottom on the plugin? Is that possible? Right now, my UV coord inputs go from
> D1-A2 , top to bottom, but I would really like to set the order of the input
> ports to go from A1-D2, top to bottom, if that's possible.
>
> I know I've flung out a flurry of questions. Any insight is appreciated.
>
> I've included the Xcode project as is, and there's a little tester qtz in
> there as well.
>
> --
> George Toledo
> [email protected]
> www.georgetoledo.com
>
> The information contained in this E-mail and any attachments may be
> confidential.
> If you have received this E-mail in error, please notify us immediately by
> telephone or return E-mail.
> You should not use or disclose the contents of this E-mail or any of the
> attachments for any purpose or to any persons.
>
> <GLSquare.zip> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Quartzcomposer-dev mailing list ([email protected])
> Help/Unsubscribe/Update your Subscription:
> http://lists.apple.com/mailman/options/quartzcomposer-dev/doktorp%40mac.com
>
> This email sent to [email protected]
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Quartzcomposer-dev mailing list ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/quartzcomposer-dev/archive%40mail-archive.com
This email sent to [email protected]