G'day Everyone
This is my first time here, sorry if this has already been answered but i'll be buggered if i can find it.
I'm writing a custom consumer patch for Quartz Composer. It is a simple land generator, nothing fancy, simply a GL_QUAD_STRIP.
My question is that i want to be able to access my default input port variables when the patch gets initialised.
For example i have (this has been shortend for ease of reading)
This works fine and i can use this value (by self.inputWidth)in -(void)execute:, but in either -(id)init or - (BOOL) startExecution: it returns 0, instead of 2. I'm assuming 0 is the default default, and the value 2 gets added after.
I'm pretty tired so i'm not sure if i've worded my problem correctly or not. If not sorry about that.
I just want to be able to use the properties when the object gets initialised. I know i can't 'set' them in init: because they are read only.
Is there a way i can use it, or have i just made a simple mistake somewhere
Any help would be super.
Cheers
Lango
This is my first time here, sorry if this has already been answered but i'll be buggered if i can find it.
I'm writing a custom consumer patch for Quartz Composer. It is a simple land generator, nothing fancy, simply a GL_QUAD_STRIP.
My question is that i want to be able to access my default input port variables when the patch gets initialised.
For example i have (this has been shortend for ease of reading)
Code:
+ (NSDictionary*) attributesForPropertyPortWithKey:(NSString*)key
{
if([key isEqualToString:@"inputWidth"])
return [NSDictionary dictionaryWithObjectsAndKeys:
@"Width", QCPortAttributeNameKey,
@"2", QCPortAttributeDefaultValueKey,
nil];
return nil;
}
This works fine and i can use this value (by self.inputWidth)in -(void)execute:, but in either -(id)init or - (BOOL) startExecution: it returns 0, instead of 2. I'm assuming 0 is the default default, and the value 2 gets added after.
I'm pretty tired so i'm not sure if i've worded my problem correctly or not. If not sorry about that.
I just want to be able to use the properties when the object gets initialised. I know i can't 'set' them in init: because they are read only.
Is there a way i can use it, or have i just made a simple mistake somewhere
Any help would be super.
Cheers
Lango