Skip to main content
Adobe Photoshop Family

4.5K Messages

 • 

76.3K Points

Tue, Nov 19, 2013 12:17 PM

Lightrooom SDK: is view-factory object passed to dialog functions special?

example:

MyExportFilter.sectionForFilterInDialog( viewFactory, propertyTable )

One can ignore view-factory passed as parameter and use a global view factory created during plugin initialization with no perceivable difference in behavior.

Is the view-factory parameter just a convenience?
Is it OK to use a global view factory everywhere and ignore view-factory parameters? Certainly seems OK, but is it possible to have a problem by doing it? - if so, please elaborate.

Thanks,
Rob

Responses

Champion

 • 

5.3K Messages

 • 

95.4K Points

7 years ago

Good question. You might compare the parameter with the global to see if indeed the same object:

Debug.pauseIf (viewFactory ~= globalViewFactory)

Not the same as an authoritative answer from Adobe (if only it would come), but it might increase your confidence.

4.5K Messages

 • 

76.3K Points

They are not the same - Lr is creating a new view-factory object to pass. I'm guessing such is not necessary (any view factory will create views as well as any other, in any context, or so it seems to me so far), and it's just kinda how it turned out, or keeps options open for future... - dunno.

4.5K Messages

 • 

76.3K Points

6 years ago

I just checked (Lr5.6) - all members of view factory are functions (no data type members), and all functions are the same in all view factory instances.

So, unless I've missed something, all view-factory instances are equivalent/interchangeable.