Skip to main content
Rollback to Revision 3
Source Link
iKlsR
  • 43.7k
  • 12
  • 157
  • 190

I need to ascertain if it's possible to complete a project in Blender exclusively (my preference) or if I need to use an OpenGL API to write an external application for my needs.

If the project can be completed in Blender, then I need to be able to color pixels on a 2D image using Python within Blender. If that can be done by pixel coordinate, then my project can be completed in Blender.

Because the Blender API documentation is laid out by structure of API itself rather than by task (a good thing!) I'm having trouble locating the part of it that I'm interested in. Because usually Blender isn't used for this, I can't find any discussions that point me in the right direction.

edit: I see that bpy.ops.paint.sample_color() can be used to sample a color on an image; I'm just having trouble finding a way to directly manipulate pixels.

edit2: I should mention that I also found this in old documentation, but searches for something similar in the current documentation come up empty.

last edit: This thread from 2007 includes a script for pixel level access to images. however, it is dependent upon classes that are not a part of the Blender API and do not appear to be part of the Python repository. The colour class does not inherit as_tuple, which in turn only seems to be part of the decimal class.

So, I'm not listing it as an answer because there's no way to know with certainty just what the author meant when those classes are used.

edit regarding a duplicate question:

This absolutely is a duplicate, but it doesn't look like it on the surface.

After spending three hours scouring Google, I didn't happen upon the other question because it's worded as if the user is focused on writing files to disk and not generating images programmatically. Programming languages are engineered to avoid ambiguity, so tasks in programming are very specific and we need to be careful to be equally specific when asking about them.

The problem is that the wording isn't necessarily what people would think of when they encounter this problem -- there are many, many other ways the question could be phrased, and in fact the other question is more likely to be read by people just looking to write files.

So, I encourage future readers who end up here to see both this and the other question. I have a handle on this topic now, but looking that one over, it seems that the answers in both submissions are helpful.

If it's possible to merge questions while preserving their wording, that would be neat for this. If not, then maybe somebody with more StackExchange sway can suggest it because often times answers already exist but can only be found if the seeker's brain just happens by chance to produce the question with exactly the same wording as the other person. Tags aren't helping like they could either because they're so restricted. We need something that we can use a bit more freely and creatively to help people looking for the same answers in the future.

In fact, this aspect of submissions here kind of discourages people from scouring Google to find past threads and that's antithetical to the poor moderators' duties (I'm sorry, I really am!). When someone has loads of work to do and hits a stumbling block, they look for ways to reduce the related down time and start to eschew anything that adds to it... like scraping their brain for strange, tangentially related ways to phrase things.

I need to ascertain if it's possible to complete a project in Blender exclusively (my preference) or if I need to use an OpenGL API to write an external application for my needs.

If the project can be completed in Blender, then I need to be able to color pixels on a 2D image using Python within Blender. If that can be done by pixel coordinate, then my project can be completed in Blender.

Because the Blender API documentation is laid out by structure of API itself rather than by task (a good thing!) I'm having trouble locating the part of it that I'm interested in. Because usually Blender isn't used for this, I can't find any discussions that point me in the right direction.

edit: I see that bpy.ops.paint.sample_color() can be used to sample a color on an image; I'm just having trouble finding a way to directly manipulate pixels.

edit2: I should mention that I also found this in old documentation, but searches for something similar in the current documentation come up empty.

last edit: This thread from 2007 includes a script for pixel level access to images. however, it is dependent upon classes that are not a part of the Blender API and do not appear to be part of the Python repository. The colour class does not inherit as_tuple, which in turn only seems to be part of the decimal class.

So, I'm not listing it as an answer because there's no way to know with certainty just what the author meant when those classes are used.

edit regarding a duplicate question:

This absolutely is a duplicate, but it doesn't look like it on the surface.

After spending three hours scouring Google, I didn't happen upon the other question because it's worded as if the user is focused on writing files to disk and not generating images programmatically. Programming languages are engineered to avoid ambiguity, so tasks in programming are very specific and we need to be careful to be equally specific when asking about them.

The problem is that the wording isn't necessarily what people would think of when they encounter this problem -- there are many, many other ways the question could be phrased, and in fact the other question is more likely to be read by people just looking to write files.

So, I encourage future readers who end up here to see both this and the other question. I have a handle on this topic now, but looking that one over, it seems that the answers in both submissions are helpful.

If it's possible to merge questions while preserving their wording, that would be neat for this. If not, then maybe somebody with more StackExchange sway can suggest it because often times answers already exist but can only be found if the seeker's brain just happens by chance to produce the question with exactly the same wording as the other person. Tags aren't helping like they could either because they're so restricted. We need something that we can use a bit more freely and creatively to help people looking for the same answers in the future.

In fact, this aspect of submissions here kind of discourages people from scouring Google to find past threads and that's antithetical to the poor moderators' duties (I'm sorry, I really am!). When someone has loads of work to do and hits a stumbling block, they look for ways to reduce the related down time and start to eschew anything that adds to it... like scraping their brain for strange, tangentially related ways to phrase things.

I need to ascertain if it's possible to complete a project in Blender exclusively (my preference) or if I need to use an OpenGL API to write an external application for my needs.

If the project can be completed in Blender, then I need to be able to color pixels on a 2D image using Python within Blender. If that can be done by pixel coordinate, then my project can be completed in Blender.

Because the Blender API documentation is laid out by structure of API itself rather than by task (a good thing!) I'm having trouble locating the part of it that I'm interested in. Because usually Blender isn't used for this, I can't find any discussions that point me in the right direction.

edit: I see that bpy.ops.paint.sample_color() can be used to sample a color on an image; I'm just having trouble finding a way to directly manipulate pixels.

edit2: I should mention that I also found this in old documentation, but searches for something similar in the current documentation come up empty.

last edit: This thread from 2007 includes a script for pixel level access to images. however, it is dependent upon classes that are not a part of the Blender API and do not appear to be part of the Python repository. The colour class does not inherit as_tuple, which in turn only seems to be part of the decimal class.

So, I'm not listing it as an answer because there's no way to know with certainty just what the author meant when those classes are used.

added 443 characters in body
Source Link
JPHarford
  • 133
  • 1
  • 8

I need to ascertain if it's possible to complete a project in Blender exclusively (my preference) or if I need to use an OpenGL API to write an external application for my needs.

If the project can be completed in Blender, then I need to be able to color pixels on a 2D image using Python within Blender. If that can be done by pixel coordinate, then my project can be completed in Blender.

Because the Blender API documentation is laid out by structure of API itself rather than by task (a good thing!) I'm having trouble locating the part of it that I'm interested in. Because usually Blender isn't used for this, I can't find any discussions that point me in the right direction.

edit: I see that bpy.ops.paint.sample_color() can be used to sample a color on an image; I'm just having trouble finding a way to directly manipulate pixels.

edit2: I should mention that I also found this in old documentation, but searches for something similar in the current documentation come up empty.

last edit: This thread from 2007 includes a script for pixel level access to images. however, it is dependent upon classes that are not a part of the Blender API and do not appear to be part of the Python repository. The colour class does not inherit as_tuple, which in turn only seems to be part of the decimal class.

So, I'm not listing it as an answer because there's no way to know with certainty just what the author meant when those classes are used.

edit regarding a duplicate question:

This absolutely is a duplicate, but it doesn't look like it on the surface.

After spending three hours scouring Google, I didn't happen upon the other question because it's worded as if the user is focused on writing files to disk and not generating images programmatically. Programming languages are engineered to avoid ambiguity, so tasks in programming are very specific and we need to be careful to be equally specific when asking about them.

The problem is that the wording isn't necessarily what people would think of when they encounter this problem -- there are many, many other ways the question could be phrased, and in fact the other question is more likely to be read by people just looking to write files.

So, I encourage future readers who end up here to see both this and the other question. I have a handle on this topic now, but looking that one over, it seems that the answers in both submissions are helpful.

If it's possible to merge questions while preserving their wording, that would be neat for this. If not, then maybe somebody with more StackExchange sway can suggest it because often times answers already exist but can only be found if the seeker's brain just happens by chance to produce the question with exactly the same wording as the other person. Tags aren't helping like they could either because they're so restricted. We need something that we can use a bit more freely and creatively to help people looking for the same answers in the future.

In fact, this aspect of submissions here kind of discourages people from scouring Google to find past threads and that's antithetical to the poor moderators' duties (I'm sorry, I really am!). When someone has loads of work to do and hits a stumbling block, they look for ways to reduce the related down time and start to eschew anything that adds to it... like scraping their brain for strange, tangentially related ways to phrase things.

I need to ascertain if it's possible to complete a project in Blender exclusively (my preference) or if I need to use an OpenGL API to write an external application for my needs.

If the project can be completed in Blender, then I need to be able to color pixels on a 2D image using Python within Blender. If that can be done by pixel coordinate, then my project can be completed in Blender.

Because the Blender API documentation is laid out by structure of API itself rather than by task (a good thing!) I'm having trouble locating the part of it that I'm interested in. Because usually Blender isn't used for this, I can't find any discussions that point me in the right direction.

edit: I see that bpy.ops.paint.sample_color() can be used to sample a color on an image; I'm just having trouble finding a way to directly manipulate pixels.

edit2: I should mention that I also found this in old documentation, but searches for something similar in the current documentation come up empty.

last edit: This thread from 2007 includes a script for pixel level access to images. however, it is dependent upon classes that are not a part of the Blender API and do not appear to be part of the Python repository. The colour class does not inherit as_tuple, which in turn only seems to be part of the decimal class.

So, I'm not listing it as an answer because there's no way to know with certainty just what the author meant when those classes are used.

edit regarding a duplicate question:

This absolutely is a duplicate, but it doesn't look like it on the surface.

After spending three hours scouring Google, I didn't happen upon the other question because it's worded as if the user is focused on writing files to disk and not generating images programmatically.

The problem is that the wording isn't necessarily what people would think of when they encounter this problem -- there are many, many other ways the question could be phrased, and in fact the other question is more likely to be read by people just looking to write files.

So, I encourage future readers who end up here to see both this and the other question. I have a handle on this topic now, but looking that one over, it seems that the answers in both submissions are helpful.

If it's possible to merge questions while preserving their wording, that would be neat for this. If not, then maybe somebody with more StackExchange sway can suggest it because often times answers already exist but can only be found if the seeker's brain just happens by chance to produce the question with exactly the same wording as the other person. Tags aren't helping like they could either because they're so restricted. We need something that we can use a bit more freely and creatively to help people looking for the same answers in the future.

I need to ascertain if it's possible to complete a project in Blender exclusively (my preference) or if I need to use an OpenGL API to write an external application for my needs.

If the project can be completed in Blender, then I need to be able to color pixels on a 2D image using Python within Blender. If that can be done by pixel coordinate, then my project can be completed in Blender.

Because the Blender API documentation is laid out by structure of API itself rather than by task (a good thing!) I'm having trouble locating the part of it that I'm interested in. Because usually Blender isn't used for this, I can't find any discussions that point me in the right direction.

edit: I see that bpy.ops.paint.sample_color() can be used to sample a color on an image; I'm just having trouble finding a way to directly manipulate pixels.

edit2: I should mention that I also found this in old documentation, but searches for something similar in the current documentation come up empty.

last edit: This thread from 2007 includes a script for pixel level access to images. however, it is dependent upon classes that are not a part of the Blender API and do not appear to be part of the Python repository. The colour class does not inherit as_tuple, which in turn only seems to be part of the decimal class.

So, I'm not listing it as an answer because there's no way to know with certainty just what the author meant when those classes are used.

edit regarding a duplicate question:

This absolutely is a duplicate, but it doesn't look like it on the surface.

After spending three hours scouring Google, I didn't happen upon the other question because it's worded as if the user is focused on writing files to disk and not generating images programmatically. Programming languages are engineered to avoid ambiguity, so tasks in programming are very specific and we need to be careful to be equally specific when asking about them.

The problem is that the wording isn't necessarily what people would think of when they encounter this problem -- there are many, many other ways the question could be phrased, and in fact the other question is more likely to be read by people just looking to write files.

So, I encourage future readers who end up here to see both this and the other question. I have a handle on this topic now, but looking that one over, it seems that the answers in both submissions are helpful.

If it's possible to merge questions while preserving their wording, that would be neat for this. If not, then maybe somebody with more StackExchange sway can suggest it because often times answers already exist but can only be found if the seeker's brain just happens by chance to produce the question with exactly the same wording as the other person. Tags aren't helping like they could either because they're so restricted. We need something that we can use a bit more freely and creatively to help people looking for the same answers in the future.

In fact, this aspect of submissions here kind of discourages people from scouring Google to find past threads and that's antithetical to the poor moderators' duties (I'm sorry, I really am!). When someone has loads of work to do and hits a stumbling block, they look for ways to reduce the related down time and start to eschew anything that adds to it... like scraping their brain for strange, tangentially related ways to phrase things.

added 811 characters in body
Source Link
JPHarford
  • 133
  • 1
  • 8

I need to ascertain if it's possible to complete a project in Blender exclusively (my preference) or if I need to use an OpenGL API to write an external application for my needs.

If the project can be completed in Blender, then I need to be able to color pixels on a 2D image using Python within Blender. If that can be done by pixel coordinate, then my project can be completed in Blender.

Because the Blender API documentation is laid out by structure of API itself rather than by task (a good thing!) I'm having trouble locating the part of it that I'm interested in. Because usually Blender isn't used for this, I can't find any discussions that point me in the right direction.

edit: I see that bpy.ops.paint.sample_color() can be used to sample a color on an image; I'm just having trouble finding a way to directly manipulate pixels.

edit2: I should mention that I also found this in old documentation, but searches for something similar in the current documentation come up empty.

last edit: This thread from 2007 includes a script for pixel level access to images. however, it is dependent upon classes that are not a part of the Blender API and do not appear to be part of the Python repository. The colour class does not inherit as_tuple, which in turn only seems to be part of the decimal class.

So, I'm not listing it as an answer because there's no way to know with certainty just what the author meant when those classes are used.

edit regarding a duplicate question:

This absolutely is a duplicate, but it doesn't look like it on the surface.

After spending three hours scouring Google, I didn't happen upon the other question because it's worded as if the user is focused on writing files to disk and not generating images programmatically.

The problem is that the wording isn't necessarily what people would think of when they encounter this problem -- there are many, many other ways the question could be phrased, and in fact the other question is more likely to be read by people just looking to write files.

So, I encourage future readers who end up here to see both this and the other question. I have a handle on this topic now, but looking that one over, it seems that the answers in both submissions are helpful.

If it's possible to merge questions while preserving their wording, that would be neat for this. If not, then maybe somebody with more StackExchange sway can suggest it because often times answers already exist but can only be found if the seeker's brain just happens by chance to produce the question with exactly the same wording as the other person. Tags aren't helping like they could either because they're so restricted. We need something that we can use a bit more freely and creatively to help people looking for the same answers in the future.

I need to ascertain if it's possible to complete a project in Blender exclusively (my preference) or if I need to use an OpenGL API to write an external application for my needs.

If the project can be completed in Blender, then I need to be able to color pixels on a 2D image using Python within Blender. If that can be done by pixel coordinate, then my project can be completed in Blender.

Because the Blender API documentation is laid out by structure of API itself rather than by task (a good thing!) I'm having trouble locating the part of it that I'm interested in. Because usually Blender isn't used for this, I can't find any discussions that point me in the right direction.

edit: I see that bpy.ops.paint.sample_color() can be used to sample a color on an image; I'm just having trouble finding a way to directly manipulate pixels.

edit2: I should mention that I also found this in old documentation, but searches for something similar in the current documentation come up empty.

last edit: This thread from 2007 includes a script for pixel level access to images. however, it is dependent upon classes that are not a part of the Blender API and do not appear to be part of the Python repository. The colour class does not inherit as_tuple, which in turn only seems to be part of the decimal class.

So, I'm not listing it as an answer because there's no way to know with certainty just what the author meant when those classes are used.

I need to ascertain if it's possible to complete a project in Blender exclusively (my preference) or if I need to use an OpenGL API to write an external application for my needs.

If the project can be completed in Blender, then I need to be able to color pixels on a 2D image using Python within Blender. If that can be done by pixel coordinate, then my project can be completed in Blender.

Because the Blender API documentation is laid out by structure of API itself rather than by task (a good thing!) I'm having trouble locating the part of it that I'm interested in. Because usually Blender isn't used for this, I can't find any discussions that point me in the right direction.

edit: I see that bpy.ops.paint.sample_color() can be used to sample a color on an image; I'm just having trouble finding a way to directly manipulate pixels.

edit2: I should mention that I also found this in old documentation, but searches for something similar in the current documentation come up empty.

last edit: This thread from 2007 includes a script for pixel level access to images. however, it is dependent upon classes that are not a part of the Blender API and do not appear to be part of the Python repository. The colour class does not inherit as_tuple, which in turn only seems to be part of the decimal class.

So, I'm not listing it as an answer because there's no way to know with certainty just what the author meant when those classes are used.

edit regarding a duplicate question:

This absolutely is a duplicate, but it doesn't look like it on the surface.

After spending three hours scouring Google, I didn't happen upon the other question because it's worded as if the user is focused on writing files to disk and not generating images programmatically.

The problem is that the wording isn't necessarily what people would think of when they encounter this problem -- there are many, many other ways the question could be phrased, and in fact the other question is more likely to be read by people just looking to write files.

So, I encourage future readers who end up here to see both this and the other question. I have a handle on this topic now, but looking that one over, it seems that the answers in both submissions are helpful.

If it's possible to merge questions while preserving their wording, that would be neat for this. If not, then maybe somebody with more StackExchange sway can suggest it because often times answers already exist but can only be found if the seeker's brain just happens by chance to produce the question with exactly the same wording as the other person. Tags aren't helping like they could either because they're so restricted. We need something that we can use a bit more freely and creatively to help people looking for the same answers in the future.

Post Closed as "Duplicate" by ideasman42
added 574 characters in body
Source Link
JPHarford
  • 133
  • 1
  • 8
Loading
added 238 characters in body
Source Link
JPHarford
  • 133
  • 1
  • 8
Loading
Source Link
JPHarford
  • 133
  • 1
  • 8
Loading