Your browser does not seem to support JavaScript. As a result, your viewing experience will be diminished, and you have been placed in read-only mode.
Please download a browser that supports JavaScript, or enable it if it's disabled (i.e. NoScript).
Hi Rage,
you could try CallCommand() with id 1019951 - calling this should delete all selected objects without deleting their children. Might also do what you're after?
WP.
Hi gogeta,
I'm not sure on ScaleBicubic(), but I noticed in your commented line:
//bitmap->ScaleIt(scaledBitmap, defaultBrightness, true, false);
That last 'false' flag, try changing that to true. If you're scaling in a non-proportional way that should be true (might fix your non 'squeeze' issue).
Do the GeUserArea sections display anything? Or are they just spacers?
A mock-up picture might help others to visualise.
How about a 'global' drag and drop function? So, make separate iCustomGui/GeUserAreas for each section. Then just point each of these to the same function held in the parent dialog? That way you only have to write the main drag/catch routine once, in the parent dialog.
Just a thought.
Hi Ferdinand,
What's in this, what does this look like inside:
@ferdinand said in Normal tangents to world:
// Builds a frame, i.e., a rotation matrix/transform for the given texture normal. const Matrix normal_transform = BuildNormalFrame(texture_normal, upVector);
WP
Thanks Ferdinand,
I was writing a reply when your edit came through. I'll post what I was typing, but bear with me while I think about your updated edits.
/* Original message */
no need to rush, all good! I'm trying to get in my head what I'm wanting to ask. I'll try with some examples.
Normal maps can be in different spaces. I'm using the term 'spaces' loosely, but I'm referring to this:
There are three types of normal maps we can have. Tangent, Object and World.
For example, let's say I run a mouse click in the viewport. I can capture all the information I need, like the hit object, hit polygon, the UV texture coords, etc etc and also have the phong shaded normal (in either object or world space). Let's say we have all the bits needed to do all of that.
Now I sample the normal texture map using the UV coordinates and get the normal texture map value at the sampled location. If the sampled texture map value is in tangent 'space', how can I change it to object 'space'?
I want to go from this (tangent):
To this (object):
How can I translate the texture map tangent-based texel, to object 'space'?
Hi folks,
I'm trying to meddle with normal maps by converting them to local (and then world) space. I'm 'printing' the map to the Picture Viewer to see the result.
But I'm not grasping how to change from normal tangent to local space. I've read a bunch of opengl stuff but it's not helping.
// pseudo code Matrix m = Get_ObjectRotMat(); // I've got this Vector normal = Get_PolyNormal(); // I've got this Vector norm_tang_texture = Get_NormalMapValue(); // I've got this /* I can't seem to do this */ Vector norm_tang_to_local = ??; /* I can do this, but is useless without the above? */ Vector local_to_world = etc.;
Would someone be so kind as to give me a lesson on this?
Thanks Frank,
@fwilleke80 said in Getting material 'use' flag:
BaseMaterial* const materialPtr = textureTagPtr->GetMaterial();
Yep, that's what I was missing. I was thinking the texture tag was the material, but it wasn't and I needed to get the link to the material from the texture tag.
Cheers,
having a time trying to get simple material parameters. Would like to get the tick box next to the main options in the material window, like Color and Reflection.
I've been around in circles with the following:
BaseTag *tag = obj->GetFirstTag(); BaseMaterial *texture = (BaseMaterial*)tag; if(texture->GetParameter(DescID(MATERIAL_USE_COLOR),data,DESCFLAGS_GET_0) && data == true) { // this never runs }
A few assumptions with the above, but you get the idea. Where am I going wrong here?
Thanks @Filip and @kbar, I've setup a simple message system that I'm experimenting with.
Just a question (for anyone) regarding the start up procedures for Cinema, will my plugin receive PluginMessage() messages if my main plugin is not registered yet? Asking to make sure I can receive a message from another plugin that Cinema might try to register before mine.
Thanks both of you. I'm still thinking this one through.
@C4DS I hadn't thought of SpecialEventAdd, thanks for the suggestion. This had me looking into, and finding, GePluginMessage(). I'm wondering if I could call this in PluginStart(). This does seem to work. I could maybe avoid Cinema's Register system with this.
@PluginStudent can I register a custom type using GeRegistryAdd()? Or does it have to be one of the listed types? E.g. can I register a type under my main plugin id?
just doing some brainstorming and hoping someone may be able to suggest/contribute some ideas.
I have a dialog plugin with a graphical interface. I'd like to be able to register plugins for my plugin, so that I can build them separately if needed, or perhaps so others in the future may be able to.
Is it possible to register a custom plugin type? Or, could I piggyback off one of the Register*() functions and grab the registration in my plugin somewhere?
Thanks @C4DS, that's what I'm after!
I want to get the editor viewport colours, so I can colour things using the same as the viewport. I'm guessing this is in the preferences.
E.g. how do I get the viewport background colour? How about the grid and world axis colours? Selected point colours... etc.