diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2013-05-17 11:10:10 +0400 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2013-05-17 11:10:10 +0400 |
commit | 9d567dd3662e5d79c98c64829f3d039e75697395 (patch) | |
tree | af8b0cd080b62b72f24729df0e15d3f38d61f64a /source/blenderplayer | |
parent | 308d014b498be3aaf3fd74aeee0ed52947d0b6cc (diff) |
This commit addresses the somewhat weak handling of stackless textures in Blender with default (BI) renderer. To do so, it's defining an "other" texture context, and when in this one, it switches to using the "new shading" texture handling already known with Cycles engine.
So now, in the new "other" tex context, you can (depending on active data) have direct access to modifiers', force's or brushes' textures...
I also refactored a bit how texture contexts are handled (once again, we had some quite similar code in both space_buttons and RNA sources). This should also solve some harmless glitches like "no texture context selected in UI" sometimes when you remove data related to current texture (see e.g. after removing the material from default cube, in startup scene).
This usage of two different systems for textures, and the handling of switches between them, has been a bit tricky to get working right, but it is OK now I think. I also had to add a bool flag to buttons space, SB_TEX_USER_LIMITED (use_limited_texture_context in RNA), which indicates "new shading" texture code whether it has to ignore materials, lamps etc. (BI) or not (Cycles).
Btw, pinned textures from modifiers/force/etc. were also broken (showing nothing), now it should work too.
Thanks to Brecht for reviewing.
Diffstat (limited to 'source/blenderplayer')
-rw-r--r-- | source/blenderplayer/bad_level_call_stubs/stubs.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blenderplayer/bad_level_call_stubs/stubs.c b/source/blenderplayer/bad_level_call_stubs/stubs.c index d6dde26a272..d0445236740 100644 --- a/source/blenderplayer/bad_level_call_stubs/stubs.c +++ b/source/blenderplayer/bad_level_call_stubs/stubs.c @@ -391,6 +391,12 @@ float ED_rollBoneToVector(struct EditBone *bone, float new_up_axis[3]) {STUB_ASS void ED_space_image_get_size(struct SpaceImage *sima, int *width, int *height) {STUB_ASSERT(0);} int ED_space_image_check_show_maskedit(struct Scene *scene, struct SpaceImage *sima) {STUB_ASSERT(0); return 0;} +bool ED_texture_context_check_world(struct bContext *C) {STUB_ASSERT(0); return false;} +bool ED_texture_context_check_material(struct bContext *C) {STUB_ASSERT(0); return false;} +bool ED_texture_context_check_lamp(struct bContext *C) {STUB_ASSERT(0); return false;} +bool ED_texture_context_check_particles(struct bContext *C) {STUB_ASSERT(0); return false;} +bool ED_texture_context_check_others(struct bContext *C) {STUB_ASSERT(0); return false;} + void ED_nurb_set_spline_type(struct Nurb *nu, int type) {STUB_ASSERT(0);} void ED_mball_transform(struct MetaBall *mb, float *mat) {STUB_ASSERT(0);} |