Jump to content
Developer Wiki and Function Reference Links ×

Path object - strange behavior - any ideas?


VvierA

Recommended Posts

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

Link to comment

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

Link to comment

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

Link to comment
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 by hippothamus
Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...