Closed miladshowkatbakhsh closed 4 years ago
Your addon is obfuscated and fails to load in my indexer. Maybe if you can provide a non-obfuscated addon GHA, those additional components can be read.
Your addon is obfuscated and fails to load in my indexer. Maybe if you can provide a non-obfuscated addon GHA, those additional components can be read.
Is your indexer an offline (analyze the assembly without GH) or online (analyze in a GH env) one? Recently I changed the component infrastructure of Pancake to support localization. It will be sort of like what Elefront has done: individual component classes <- PancakeComponent
<- GH_Component
. And components' names, descriptions, parameter names, descriptions, etc are read on the fly (during initialization of individual component classes). The code will be like:
public PancakeComponent() : base(string.Empty, string.Empty, string.Empty, string.Empty, string.Empty)
{
var type = GetType();
while (type != typeof(PancakeComponent))
{
ReadAttributes(type);
type = type.BaseType;
}
if (_subPanelIndex == -1)
Debug.WriteLine("missing: " + GetType().Name + " no subpanel info.");
RefreshLocalizationAppearance(); // Read names, descriptions, parameter identifiers, and load localized strings from resources
SaveCurrentLangIfNot();
}
public void RefreshLocalizationAppearance()
{
CopyFrom(new GH_InstanceDescription(DisplayName,
LocalizedNickname, DisplayDescription, CategoryName, _sectionName));
}
public string DisplayName => LocalizationHelper.GetDisplayName(this);
public string DisplayDescription => LocalizationHelper.GetDisplayDescription(this);
I am not quite sure if your indexer can process this.
I support both modes. But whenever I try loading Wallacei add-on into my application as an add-on (and using reflection to instantiate classes) then my entire app hangs, so I'm forced to read the add-on in offline mode and that doesn't work very coz your add-on is obfuscated.
I'll send you the json schema and you can enter in the details manually. At least that way we'll be able to get your add-on into the GH site.
But whenever I try loading your add-on into my application as an add-on (and using reflection to instantiate classes) then my entire app hangs, so I'm forced to read the add-on in offline mode and that doesn't work very coz your add-on is obfuscated.
It's weird because my plugin is never obfuscated. I don't like doing that. Have you filtered out abstract classes?
I can see the base component class, which is defined abstract
, listed separately in the docs.
Anyway, let me deal with the JSON and really thanks for your effort!
public abstract class pcNativeExport : GH_Component
{
public override GH_Exposure Exposure => IsRhinoSupported() ? GH_Exposure.primary : GH_Exposure.hidden;
public pcNativeExport(string formatName)
: base("Export " + formatName, "pcExport" + formatName, "This component exports geometries from GH to " + formatName + " file directly\r\nThis component doesn't rely on Export command.", "Pancake", "I/O")
{
}
...
I was saying that Wallacei add on was obfuscated. Please add another github issue for your addon as I'm not sure what the issue is.
@karakasa I index all classes that extend from GH_Component. I have no way of knowing its a base class. If you tell me I can filter it out.
@miladshowkatbakhsh All issues fixed.
First of all, thank you for this, This is incredible. I noticed that a couple of components are missing in Wallacei addon (.gha). The ones that are listed here are the user objects (Analytics components). Wallacei plugin has both user objects and .gha. Components like![Wallacei](https://user-images.githubusercontent.com/10748119/74433666-c193d100-4e58-11ea-8c5d-dc96637bc5dc.JPG)
Wallacei X
(this is the solver)Shuffler
GDecoder
PDecoder
andDistributer
are missing. Here is the link of the plugin. I also attached an image for your reference.Best, Milad