Hi Jean-Samuel, I think your patch will facilitate use of 3rd party python plugins, as the current way of executing commands from the Python shell is not quite user friendly. I vote for merging the patch, but we need to fix some code formatting issues first.
Also, I wonder if it would be the right thing to group menu entries by
their categories to create submenus. It could be a simple way to
organize the actions provided by python plugins. Just an idea.
Another question is about the following lines:
+ if( IsGalCanvasActive() )
+ {
+ UseGalCanvas( GetGalCanvas() );
+ }
What is exactly the goal here? If it is only about refreshing the
canvas, then a simple Refresh() call should fix the problem.
Regards,
Orson
On 01/10/2017 09:40 AM, Jean-Samuel Reynaud wrote:
> Hi,
>
> Yes it is based against HEAD on master. But between the hour I produce
> it and the hour you test it there was some modifications on
> scripting/kicadplugins.i ...
>
> Please find attached the updated patch.
>
> Tell me if you get an other error but on my side this patch look to work
> on a fresh "git clone" directory.
>
>
>
> Le 09/01/2017 à 23:33, Nick Østergaard a écrit :
>> I am unable to apply this patch, are you sure this is made against
>> HEAD on master?
>>
>> 2017-01-09 19:08 GMT+01:00 Jean-Samuel Reynaud <[email protected]>:
>>> Hi,
>>>
>>> Please find attached a patch with an implementation of this feature.
>>>
>>> I modified mainly the file pcbnew/menubar_pcbframe.cpp to add this menu
>>> and some swig interface to implement python basics.
>>>
>>> I added
>>> pcbnew/class_action_plugin.*
>>> pcbnew/swig/pcbnew_action_plugins.*
>>> to implement the feature
>>>
>>> I added
>>> pcbnew/python/plugins/text_by_date.py
>>> to share an example of how to use it.
>>> This sample example (with comments...) just change any text field on
>>> the current board where the content is "$date$" to "$date$" + date in
>>> iso format:
>>> example "$date$ 2017-01-09"
>>>
>>>
>>>
>>> Regards,
>>> Le 04/01/2017 à 22:14, Wayne Stambaugh a écrit :
>>>> To my knowledge no one is currently working on that.
>>>>
>>>> On 1/4/2017 4:16 PM, Jean-Samuel Reynaud wrote:
>>>>> Mainly Action plugins was supposed to add right click/menu/toolbar hooks.
>>>>>
>>>>> There is two reference of this:
>>>>> scripting/kicadplugins.i
>>>>> and
>>>>> pcbnew/swig/TODO.txt
>>>>>
>>>>>
>>>>>
>>>>> Le 04/01/2017 à 20:14, Wayne Stambaugh a écrit :
>>>>>> What do you mean by action plugin? I'm working on the schematic I/O
>>>>>> plugin. AFAIK, that is the only plugin in progress.
>>>>>>
>>>>>> On 1/3/2017 10:02 AM, Jean-Samuel Reynaud wrote:
>>>>>>> Dear All,
>>>>>>>
>>>>>>> Quick question about ActionPlugin. What is the current state ? Is there
>>>>>>> anybody working on it ?
>>>>>>>
>>>>>>> Regards,
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>>>>> Post to : [email protected]
>>>>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>>>>> More help : https://help.launchpad.net/ListHelp
>>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>>>> Post to : [email protected]
>>>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>>>> More help : https://help.launchpad.net/ListHelp
>>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>>> Post to : [email protected]
>>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>>> More help : https://help.launchpad.net/ListHelp
>>>>>
>>>>
>>>> _______________________________________________
>>>> Mailing list: https://launchpad.net/~kicad-developers
>>>> Post to : [email protected]
>>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>>> More help : https://help.launchpad.net/ListHelp
>>>>
>>>
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~kicad-developers
>>> Post to : [email protected]
>>> Unsubscribe : https://launchpad.net/~kicad-developers
>>> More help : https://help.launchpad.net/ListHelp
>>>
>
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~kicad-developers
> Post to : [email protected]
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
signature.asc
Description: OpenPGP digital signature
_______________________________________________ Mailing list: https://launchpad.net/~kicad-developers Post to : [email protected] Unsubscribe : https://launchpad.net/~kicad-developers More help : https://help.launchpad.net/ListHelp

