Rhino Script Compiler for Rhino5, first Beta

Yes, we are working on releasing a new version of the script compiler that fixes a bug with respect to python scripts

Would it be possible to add an option of creating a pull-down menu item for the compiled plugin, as the old version of Monkey Compiler had?

thanks,

Jarek

1 Like

Yes, I agree. We need that functionality back.

Dan

Just putting in my two cents that I’m very much looking forward to making python-based .rhp plugins from multiple python files once that becomes available. This could really help advance the functionality of Rhino.

2 Likes

Same here. Still waiting to able to compile python files with multiple file support.

1 Like

Also i have need this.
Vittorio

when will encryption be available as option? I’m hoping for next beta, please!

Encryption is already being applied to all the strings. You cannot not use it, it’s not an option you can toggle anywhere.

when will we get a compiler that will include the same functionality that we had in Version 4, we were encouraged by the previous version to create plug ins with a full menu structure and now Rhino has moved on we are further behind and can no longer keep up our development.

Roger

This is great, looking forward to having multi-file support.

Lukas

I don’t know why, maybe I don’t know how to use this compiler, it doesn’t work for my python scripts…

i made several scripts with python which are works well in pythoneditor, but when i compile it to rhp file, it doesn’t work.

seems commands are made, but it simply doesn’t work.

anyone tell me how to fix this? file is the one of my scripts

ppleMaker.py (33.9 KB)

Thanks.

I wonder if the code inside the compiled script is not setting

__name__ = "__main__".

This would be a bug in our code and not yours, but you may want to try compiling and running without the

if __name__=="__main__":

test

stevebaer,

Thanks for replying. i’ve checked my scripts and it’s running without it.

hope this Script Compiler could recognize the syntax soon.

thank you for your reply again.

Hello Steve
I´m trying to compile a simple python script but at the moment I try to make the build I get the following errors:

Is there an specific structure my rhinoscript needs to have to compile properly ?

here is the file I want to compile circle.py (429 Bytes)

Thanks !!

Strange thing here too, i´ve been able to compile your original script to rhp (compiler version RSC_12082013.exe) on Win7 x64 and this is what i got:

once i load the plugin file below in Rhino5 Sr8 x64, it registers a new command “BlaBlaCircle”. If i run the command it does not create the circle. BUT: if i run any script from the python editor once, then run the BlaBlaCircle command a circle gets created :smile:

Btw. it seems not to be related to the

if __name__=="__main__":

problem mentioned above, i´ve used this code in a second build which behaves identical, this is the one inside the plugin:

import Rhino
import scriptcontext
import System.Guid

def MyAddCircle():
    center = Rhino.Geometry.Point3d(0, 0, 0)
    radius = 10.0
    c = Rhino.Geometry.Circle(center, radius)
    if scriptcontext.doc.Objects.AddCircle(c)!=System.Guid.Empty:
        scriptcontext.doc.Views.Redraw()
        return Rhino.Commands.Result.Success
    return Rhino.Commands.Result.Failure

MyAddCircle()

Here is the compiled plugin: MakeCircle.rhp (7 KB)

@stevebaer could it be that in order to run a compiled python script, it only works after initialisation as done when running a script using the python editor the first time ?

@Rodrigo_Medina_ which version of the compiler did you use ? The first one i mentioned above or this one ?

c.

Hey guys,
I’m on a business trip for the next couple weeks. I most likely won’t get a chance to look at this issue before I get back. I do have this post bookmarked to look at when I get back.

Thanks Steve I´ll keep you posted if I manage to solve it.

Hi Clement thanks for giving a look into it , I actually tried with both compilers and got the exact same errors, also working on Win7 x64 , I have Rhino 5(64-bi) updated and the .NET 4.5 installed.

I also tried with other several phyton scripts an kept getting the same error so I´m assuming the problem is not coming from the python files , I´ll keep trying to see if I can come up with something.

Thanks again