VvierA Posted November 3, 2014 Share Posted November 3, 2014 Hello everybody, recently I made a 2D path object with this nice piece of script (see below), found at www.vectorlab.info: http://www.vectorlab.info/index.php?title=Path_obj_with_2D_Reshape_on_double-click&redirect=no Everything works fine except one thing: If I draw my 2D object in a class with transparency (opacity) of 70% or lower, the object is much more transparent than any object I draw with another tool (i.e. rectangle, polygon etc.). If I change the opacity of the class to 100% you can see no difference in opacity between the custom made 2D object and any standard rectangle. But the lower the opacity of the class is, the more difference is visible. Can anybody help me to make sure that my custom PIO uses exactly the very same opacity that is set for it's class? Thanks for any help VvierA Quote Link to comment
VvierA Posted November 4, 2014 Author Share Posted November 4, 2014 Well maybe I found a clue in the right direction but I am not able yet to figure out the solution... So here is what I found: It appears to me, that the 2D path object is affected twice by the opacity attributes of its class. Once directly - as a filled polygon that's part of a class with a transparency. And then secondly - as a PIO that's part of a class with a transparency. But as I sad - I have no idea yet how to solve that problem. Maybe anyone can help? VvierA Quote Link to comment
Hippocode Posted November 4, 2014 Share Posted November 4, 2014 Hi, I just tested this out with a custom 2D path plug-in in vectorworks 2013 and I seem to have the same bug. You are right about the transparancy being double on a pio, when decomposing it becomes correct. I think you have 2 easy solutions: Double the transparancy so when it's halved it shows up correct. Manually assign the transparant class to the polyline inside your object but not on the object itself. Regards, Wouter Quote Link to comment
JBenghiat Posted November 4, 2014 Share Posted November 4, 2014 This is actually consistent with the behavior of symbols. Unlike other symbol attributes, transparency is "mastered" by the symbol instance's opacity setting. The same appears to be true with PIOs. -Josh Quote Link to comment
VvierA Posted November 5, 2014 Author Share Posted November 5, 2014 Thank you both hippothamus and JBenghiat. May I ask for some more help. Can you give me so hints on how to assign the glass directly to the polyline inside the PIO but not the object itself? VvierA Quote Link to comment
Hippocode Posted November 5, 2014 Share Posted November 5, 2014 (edited) Can you give me so hints on how to assign the glass directly to the polyline inside the PIO but not the object itself? VvierA PROCEDURE SetClass( h :HANDLE; class :STRING); You can use it once to assign the class to the whole object if you use the Pio handle and you can do it on any handle of objects you create inside your pio. Just a heads up that this might reset your object, I'd advise to place it on the end of your script if you use the PIO handle. Edited November 5, 2014 by hippothamus Quote Link to comment
VvierA Posted November 6, 2014 Author Share Posted November 6, 2014 @hippothamus Thank you so much. I'll try that. 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.