nortikin / sverchok

Sverchok
http://nortikin.github.io/sverchok/
GNU General Public License v3.0
2.26k stars 233 forks source link

idea for text viewer #894

Closed nortikin closed 8 years ago

nortikin commented 8 years ago

to create Frame for inserted ViewerText node that binded automatically to Sverchok viewer text file. So user can view automatically, no need to open text window. But question is size of frame and where to post it and if add new viewer, we not need to add new frame. And when removing last viewer, should we remove frame (i guess not)? That is simple improvement, i think.

zeffii commented 8 years ago

you want to autosplit the (nodeview) to (textview+nodeview) ? and select the textblok of the newly created textview to match the textblok that the ViewerText is writing to?

simple Tickbox for ViewerText to turn on/off auto updates, and make ratelimit the update frequency,... like .. 'if last update < 0.2 second skip this update`

zeffii commented 8 years ago

if so.. perhaps may help: https://github.com/zeffii/BlenderPythonRecipes/wiki/Areas

nortikin commented 8 years ago

nonono, easier. Ctrl+J frame will contain text from sverchok viewer text file. no need areas

nortikin commented 8 years ago

so nodeview will contain text in frame

zeffii commented 8 years ago

oooh. i read incorrectly, literally the Frame . i see :) cool :)

nortikin commented 8 years ago

but autoupdate is needed, as sthetascope do maybe. or leave button...

zeffii commented 8 years ago

so, ViewText is added and it Auto packs itself into a Frame?

nortikin commented 8 years ago

that is question. where to put frame? maybe separately add as empty or to add framed text viewer + size

nortikin commented 8 years ago

additionally adding text viewer need to initiate text file Sverchok_viewer and create frame and link text file to frame than

zeffii commented 8 years ago

I like this.. difficult to decide, but I think option to 'Frame Me' would be neat for ViewerText , it would then autoset the Frame.txt to the correct one.

nortikin commented 8 years ago

or... define minimum velues left-up and add frame to leftest uppest corner once and leave it alone. We can additionally add form to describe layout in some text, adding header and description in upside of layout. auto-typography. this may be contained in some meta-data of layout and import-export. than added when importing. Finding out username automaticelly to sign. I discribe my user experience as an architect.

nortikin commented 8 years ago

if you "frameme" the node, node will cover frame text and hide data.

zeffii commented 8 years ago

well I see your point, but you can frame.shrink = False and translate the inner node away

zeffii commented 8 years ago

but you are right, it does not need to autoframe the ViewerText..

nortikin commented 8 years ago

https://gist.github.com/nortikin/4852a618a14d9dfe439bafc2ff6c0c13 this gist prototype for init of viewer text and i found an https://github.com/JacquesLucke/animation_nodes/blob/master/base_types/template.py can have popup windows at creation. this is cool.

nortikin commented 8 years ago

this is ugly, it moves with new node https://github.com/nortikin/sverchok/blob/text_viewer/nodes/basic_view/viewer_text.py

nortikin commented 8 years ago

maybe better to add this node at layout creation... but how?

zeffii commented 8 years ago

There is no constructor for Layouts.. We wanted this to force an automatic User for each new layout. The only useful suggestion was to create an operator replacement for making a new node tree.

SvNewNodeTreeCreation(....):

    def execute(self, context):
         self.fake_user = True
         self.nodes.new('...your template ')
zeffii commented 8 years ago

@nortikin don't use underscore in classname/ bl_idname for the node ViewerNode_text

nortikin commented 8 years ago

I use name instead.

zeffii commented 8 years ago

pitty Frame doesn't do syntax highlighting :/

nortikin commented 8 years ago

got it about underscore ok. need to rename?

nortikin commented 8 years ago

https://blenderartists.org/forum/showthread.php?388143-WIP-Blender-Plugin-BGE-Logic-nodes-Alpha what i found

nortikin commented 8 years ago

I admit we ned separate button for this frame stuff and so on. question is how to add script to ops bpy.ops.node.new_node_tree(type='SverchCustomTreeType', name='NewSv') with frame creation automatically.

zeffii commented 8 years ago

for convenience bl_idname and classname are identical for all nodes. (I think). ViewerTextMK2 would be fine right? that tells us it's a new / remake.

I'm not sure we can override default ops like new_node_tree , this is one area where Blender sucks, but we could replace the operator that's triggered by Ctrl+N.

nortikin commented 8 years ago

so, for now viewer text makes Frame at button pressing. It is strange behavior, but i ready to push. playing some with Frame color to mutch current theme also.

enzyme69 commented 8 years ago

​By any chance, the viewer, can it be multi row and column with numbers like Excel spreadsheet? Depending on how many data plugged in?

nortikin commented 8 years ago

@enzyme69 do you mean text have to look like:

vertices | pols/edges | matrices
=1=      | =0=        | =1=
()       |            | ()
()       |            | ()
()       |            | ()
()       |            | ()

? Or to add three frames for each? or to make frame for every node separately?

nortikin commented 8 years ago

the text from text area will looks like:

vertices | pols/edges | matrices
=1=      | =0=            | =1=
()           |                    | ()
()           |                    | ()
()           |                    | ()
()           |                    | ()

or

vertices | pols/edges | matrices
=1= | =0= | =1=
() | | ()
() | | ()
() | | ()
() | | ()
nortikin commented 8 years ago

or to break data that longer than frame height?

enzyme69 commented 8 years ago

Hmm... in a way that we can see all in one window not scrolling to find data in other column :)

On Monday, 3 October 2016, nikitron notifications@github.com wrote:

or to break data that longer than frame heigh?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/nortikin/sverchok/issues/894#issuecomment-251098769, or mute the thread https://github.com/notifications/unsubscribe-auth/ADxQLw-SFr5qbt0HohOeMQKXhdr8EoLOks5qwPt2gaJpZM4KK_CB .


nortikin commented 8 years ago

it is hard. Font in blender is not monospace i guess.

enzyme69 commented 8 years ago

​I see... become comma/space/tab separated value is fine.

nortikin commented 8 years ago

ok, patrially text out node's functionality can be supported, but hey, why not upgrade text out node itself? we can use it to make csv file that updated every time (with boolean active) with form of data you ask now. How do you think? It is not matter of frame text, but of csv format.

enzyme69 commented 8 years ago

​Sounds good to me!

nortikin commented 8 years ago

Dealga thought of it as i see from comments in code.