RDS Casa Posted February 14, 2020 Share Posted February 14, 2020 Hello, simple one this time I hope? The current text node uses the insertion point based on the current text settings (in terms of vertical/horizontal properties etc). The set text properties node can adapt the a text object, but it does not move the text, it moves the insertion point. How do I blend these together, so I can set the text vert/horizontal properties before its inserted? or is it better to createit, apply properties node, then move it? Basically I need the centre of the text to be inserted in the centre of an object. Thanks Quote Link to comment
m.graf Posted February 14, 2020 Share Posted February 14, 2020 try this node... . 1 Quote Link to comment
RDS Casa Posted February 17, 2020 Author Share Posted February 17, 2020 Great, Thanks so much. I've only just seen this reply, sorry, and had got some of the way to resolving it using a few other nodes. This is neater. Thanks. However, I then shortly hit another problem. My issue here is I don't understand why its not working, because I think it should? Can anyone advise? In the attached file is a short network. It is intended to place a text string extracted from a layer name in the centre of polygon. All good so far with great help from m.graf (thanks so much again), but.... I also need it to rotate the text depending on the orientation of the polygon. So I thought the using the get width, get height nodes, with some simple logic (height>width then push 90 into set text orientation input), which I thought would be easy enough.... but as soon as I attach the rotation part of the network, the script just stops working??? Whats odd is when I use the debug tool, it kind of works.... I run the network without the rotate branch attached, then attach the rotate branch, without re-running the network. When I use the debug, I can see the outputs are correct. All looks good. However, when I run it again, it stops working completely, and the debug outputs disappear?? what is happening here? is it the get width & get height nodes?? can they not cope with a list of multiple inputs? I thought I had this.... !!!! darn. Thanks all. ID script.vwx Quote Link to comment
m.graf Posted February 17, 2020 Share Posted February 17, 2020 try this file... i have change the Nodes for the Input angle from "INT" to "ANY"... in your Network ID script-fix.vwx 1 Quote Link to comment
m.graf Posted February 17, 2020 Share Posted February 17, 2020 (edited) and here a simple solution for all angles between 0-360°, not a perfect solution - only one example for your next steps 🙂 if you take the "getvertex" node, take all the vertex(points) create all lines and then choose the longest line angle... ID script-freeangle.vwx Edited February 17, 2020 by m.graf 1 Quote Link to comment
RDS Casa Posted February 17, 2020 Author Share Posted February 17, 2020 mmmm. Interesting. Firstly thanks again. I worked out what was happening. I could not have got this far without your help. I found a big cause of my problems - is it a VW bug? or is it common knowledge for marionette? Here is the trick. Took me an ages to work out why yours worked, and mine did not. It looks like if you name the ANY node as a number, its stops working?? (or the real node I had before!) I was calling the input nodes that feed a number in, by the number it was, so I could see what was happening. So... This Works (no names) As does this (alpha naming),.... but this... does not (numerical naming). Sometimes, as I got close to thinking I was getting there, I would start naming nodes. Then it all stopped working!!!! arghhh. Other networks would run. And I was losing it!!! Basically, don't call your nodes a number !!!! Beyond this, thanks again for your input. This is all a big learning curve. But I'm moving through it. Quote Link to comment
m.graf Posted February 17, 2020 Share Posted February 17, 2020 (edited) Okay good to know, but i only take numbers in names, to sort the input parameter for wrapper or objectnodes (such as 01_Input, 02_Input...) anything else only with simpel Text, without "ä,ö,ü,...@-*/&" greatings M.Graf Edited February 17, 2020 by m.graf Quote Link to comment
RDS Casa Posted February 17, 2020 Author Share Posted February 17, 2020 Thanks again for the angle node. Feels like I'm getting somewhere. Found this also, And following a bit of trial and error with the insets in the coding, got it working I think !. It now pushes the text back into the layer that the ID box is in. Awesome. Thanks so much again for your help. It really has enabled me to progress. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.