Graphite icon indicating copy to clipboard operation
Graphite copied to clipboard

Allow constructing IVec2 in graph

Open 0HyperCube opened this issue 1 year ago • 7 comments

The artboard node takes an IVec2 as the dimensions and position. Currently it is impossible to construct this in the graph.

A node taking in two f64s and constructing an IVec2 should be added.

0HyperCube avatar Aug 09 '24 21:08 0HyperCube

We should consider reusing the Vector2 node and letting the type system support casting from an IVec2 to a DVec2.

Keavon avatar Aug 09 '24 22:08 Keavon

I want to try doing this to get a better understanding of how graphene works, how do you suggest i go about it ?

aybdee avatar Sep 02 '24 08:09 aybdee

@TrueDoctor is this okay to work on right now or should it wait until your refactor in #1942 is done?

Keavon avatar Sep 02 '24 08:09 Keavon

Should be fine to do now, will probably become obsolete when we add automatic type conversions

TrueDoctor avatar Sep 02 '24 09:09 TrueDoctor

In that case, @aybdee, you can just reference any of the value nodes. But if you want to wait like a week, the process of creating nodes will become much easier with that refactor mentioned above.

Keavon avatar Sep 02 '24 09:09 Keavon

i think i'd wait then i'll try some other stuff for now

aybdee avatar Sep 02 '24 09:09 aybdee

Sounds great. There are a lot of good options in #code-todo-list on Discord, that's where most of the good beginner issues are at.

Keavon avatar Sep 02 '24 09:09 Keavon

Is it still impossible to create an Ivec2?

lizard-demon avatar Jul 01 '25 21:07 lizard-demon

Yes, but automatic type conversion is right around the corner and it will be supported then.

Keavon avatar Jul 01 '25 22:07 Keavon